summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/WikiEditor/modules/jquery.wikiEditor.publish.js')
-rw-r--r--extensions/WikiEditor/modules/jquery.wikiEditor.publish.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js b/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js
index b61140dc..058fa1b3 100644
--- a/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js
+++ b/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js
@@ -1,4 +1,5 @@
/* Publish module for wikiEditor */
+/*jshint onevar:false */
( function ( $ ) {
$.wikiEditor.modules.publish = {
@@ -31,7 +32,7 @@ fn: {
* @param context Context object of editor to create module in
* @param config Configuration object to create module from
*/
- create: function ( context, config ) {
+ create: function ( context ) {
// Build the dialog behind the Publish button
var dialogID = 'wikiEditor-' + context.instance + '-dialog';
$.wikiEditor.modules.dialogs.fn.create(
@@ -89,16 +90,18 @@ fn: {
);
/* END OF REALLY DIRTY HACK */
- if ( $( '#wpMinoredit' ).length === 0 )
+ if ( $( '#wpMinoredit' ).length === 0 ) {
$( '#wikiEditor-' + context.instance + '-dialog-minor' ).hide();
- else if ( $( '#wpMinoredit' ).is( ':checked' ) )
+ } else if ( $( '#wpMinoredit' ).prop( 'checked' ) ) {
$( '#wikiEditor-' + context.instance + '-dialog-minor' )
.prop( 'checked', true );
- if ( $( '#wpWatchthis' ).length === 0 )
+ }
+ if ( $( '#wpWatchthis' ).length === 0 ) {
$( '#wikiEditor-' + context.instance + '-dialog-watch' ).hide();
- else if ( $( '#wpWatchthis' ).is( ':checked' ) )
+ } else if ( $( '#wpWatchthis' ).prop( 'checked' ) ) {
$( '#wikiEditor-' + context.instance + '-dialog-watch' )
.prop( 'checked', true );
+ }
$(this).find( 'form' ).submit( function ( e ) {
$(this).closest( '.ui-dialog' ).find( 'button:first' ).click();