Line 6: |
Line 6: |
| */ | | */ |
| // See also: MediaWiki:Gadget-EmptyDetect.js and MediaWiki:Gadget-RfDHelper.js | | // See also: MediaWiki:Gadget-EmptyDetect.js and MediaWiki:Gadget-RfDHelper.js |
− |
| |
− |
| |
| | | |
| (function ($, mw, OO) { | | (function ($, mw, OO) { |
− |
| |
| 'use strict'; | | 'use strict'; |
| var messages, entityId = mw.config.get('wbEntityId'), api = new mw.Api(); | | var messages, entityId = mw.config.get('wbEntityId'), api = new mw.Api(); |
| + | |
| messages = (function () { | | messages = (function () { |
| var translations = { | | var translations = { |
Line 668: |
Line 666: |
| mw.storage.remove('merge-pending-id'); | | mw.storage.remove('merge-pending-id'); |
| } | | } |
− |
| |
| | | |
| /** | | /** |
Line 710: |
Line 707: |
| }); | | }); |
| } | | } |
− |
| |
| | | |
| /** | | /** |
Line 804: |
Line 800: |
| }); | | }); |
| }; | | }; |
− |
| |
| | | |
| /** | | /** |
Line 861: |
Line 856: |
| } | | } |
| OO.inheritClass(MergeDialog, OO.ui.ProcessDialog); | | OO.inheritClass(MergeDialog, OO.ui.ProcessDialog); |
− |
| + | |
| MergeDialog.static.name = 'mergeDialog'; | | MergeDialog.static.name = 'mergeDialog'; |
| MergeDialog.static.title = messages.mergeWizard; | | MergeDialog.static.title = messages.mergeWizard; |
Line 884: |
Line 879: |
| } | | } |
| ]; | | ]; |
− |
| + | |
| /** | | /** |
| * @inheritdoc | | * @inheritdoc |
Line 943: |
Line 938: |
| ]); | | ]); |
| this.mergeUnwatch = new OO.ui.CheckboxInputWidget({ | | this.mergeUnwatch = new OO.ui.CheckboxInputWidget({ |
− | selected: mw.storage.get('merge-unwatch') === true | + | selected: mw.storage.get('merge-unwatch') === 'true' |
| }); | | }); |
| fieldset.addItems([ | | fieldset.addItems([ |
Line 955: |
Line 950: |
| ]); | | ]); |
| this.loadMergeDestination = new OO.ui.CheckboxInputWidget({ | | this.loadMergeDestination = new OO.ui.CheckboxInputWidget({ |
− | selected: mw.storage.get('merge-load-destination') !== false | + | selected: mw.storage.get('merge-load-destination') !== 'false' |
| }); | | }); |
| fieldset.addItems([ | | fieldset.addItems([ |
Line 995: |
Line 990: |
| */ | | */ |
| MergeDialog.prototype.saveOptions = function () { | | MergeDialog.prototype.saveOptions = function () { |
− | mw.storage.set('merge-always-lowest-id', this.mergeAlwaysLowestId.isSelected()); | + | mw.storage.set('merge-always-lowest-id', this.mergeAlwaysLowestId.isSelected().toString()); |
− | mw.storage.set('merge-unwatch', this.mergeUnwatch.isSelected()); | + | mw.storage.set('merge-unwatch', this.mergeUnwatch.isSelected().toString()); |
− | mw.storage.set('merge-create-redirect', this.mergeCreateRedirect.isSelected()); | + | mw.storage.set('merge-create-redirect', this.mergeCreateRedirect.isSelected().toString()); |
− | mw.storage.set('merge-load-destination', this.loadMergeDestination.isSelected()); | + | mw.storage.set('merge-load-destination', this.loadMergeDestination.isSelected().toString()); |
| }; | | }; |
| | | |
Line 1,114: |
Line 1,109: |
| windowManager.openWindow(dialog); | | windowManager.openWindow(dialog); |
| } | | } |
− |
| + | |
| // Initialization | | // Initialization |
| if (entityId !== null && | | if (entityId !== null && |
Line 1,169: |
Line 1,164: |
| launchDialog: launchDialog | | launchDialog: launchDialog |
| }; | | }; |
− |
| |
| }(jQuery, mediaWiki, OO)); | | }(jQuery, mediaWiki, OO)); |