MediaWiki:ReferencePopups/code.configure.js

// __NOWYSIWYG__ \ ' + msg.confActivateBy + ' \ \ ' + msg.confActivateByHover + ' \ \ ' + msg.confActivateByClick + ' \ ' + msg.confEnableAnimations + ' \ ',		{			buttons: [ {					id: 'refpopups-save', message: 'Save', defaultButton: true, handler: function { saveDialog; $modal.closeModal; if (typeof(onClose) === 'function') { onClose; } }				}, {					id: 'refpopups-close', message: 'Cancel', handler: function { $modal.closeModal; if (typeof(onClose) === 'function') { onClose; } }				}			],			onClose: onClose }	);

// Monobook fix if (mw.config.get('skin') !== 'oasis') { $('#refpopups-save, #refpopups-close').button; }

// Configure dialog properties var $slider = $('#refpopups-delay-slider').slider({		min: 1,		max: 1000, // Long enough to be frustratingly slow		value: settings.hoverDelay,		slide: function(ev, ui) {			$delay.val(ui.value); // Link slider and textbox together		}	}); var $delay = $('#refpopups-delay').val(settings.hoverDelay).on('change', function {		$slider.slider('value', $(this).val);	}); $('#refpopups-sticky').prop('checked', settings.stick); $('#refpopups-animate').prop('checked', settings.animate);

// Interface lock when switching between click/hover $('#refpopups-byclick').click(function {		if (!this.checked) { return; }		$('#refpopups-delay, #refpopups-sticky').prop('disabled', true);		$('#refpopups-delay-slider').slider('disable');	}); $('#refpopups-byhover').click(function {		if (!this.checked) { return; }		$('#refpopups-delay, #refpopups-sticky').prop('disabled', false);		$('#refpopups-delay-slider').slider('enable');	}); $('#refpopups-by' + settings.react).prop('checked', true).click;

// Disable button event $('#refpopups-disable').data('val', !settings.disabled).click(function {		var $this = $(this), toggle = !$this.data('val');		$this.data('val', toggle).text(msg[toggle ? 'confEnable' : 'confDisable']);	}).click;

// Lockdown feature removes menu items for configuration, that means that it can't	// be disabled. if (module.lockdown) { $('#refpopups-disable').prop('disabled', true); $modal.find('#refpopups-disable + p').html(		'' + msg.confLockdown + ' ' + msg.confLockdownMsg		); } };

});

//