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