<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-libJQuery.js</id>
	<title>MediaWiki:Gadget-libJQuery.js - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-libJQuery.js"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-libJQuery.js&amp;action=history"/>
	<updated>2026-05-04T05:52:14Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-libJQuery.js&amp;diff=26378&amp;oldid=prev</id>
		<title>鹿野耕云：​创建页面，内容为“/** * :commons:MediaWiki:libJQuery-ui.js * jQuery UI additions that can be useful to Wikimedia Commons, and other Wikis. * * This pages has automated jsHint-validation on save. Interested? See :commons:MediaWiki:JSValidator.js, :commons:Help:JSValidator.js. * * @rev 1 (2012-07-26) * @author Rillke, 2012 * * &lt;nowiki&gt; */  /*global jQuery:false, mediaWiki:false*/ /*jshint smarttabs: true*/  (function ($, mw) { &quot;use strict&quot;;  // Extending jQuery-object…”</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-libJQuery.js&amp;diff=26378&amp;oldid=prev"/>
		<updated>2022-12-06T14:54:02Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“&lt;span class=&quot;autocomment&quot;&gt;* * &lt;a href=&quot;https://commons.wikimedia.org/wiki/MediaWiki:libJQuery-ui.js&quot; class=&quot;extiw&quot; title=&quot;commons:MediaWiki:libJQuery-ui.js&quot;&gt;commons:MediaWiki:libJQuery-ui.js&lt;/a&gt; * jQuery UI additions that can be useful to Wikimedia Commons, and other Wikis. * * This pages has automated jsHint-validation on save. Interested? See &lt;a href=&quot;https://commons.wikimedia.org/wiki/MediaWiki:JSValidator.js&quot; class=&quot;extiw&quot; title=&quot;commons:MediaWiki:JSValidator.js&quot;&gt;commons:MediaWiki:JSValidator.js&lt;/a&gt;, &lt;a href=&quot;https://commons.wikimedia.org/wiki/Help:JSValidator.js&quot; class=&quot;extiw&quot; title=&quot;commons:Help:JSValidator.js&quot;&gt;commons:Help:JSValidator.js&lt;/a&gt;. * * @rev 1 (2012-07-26) * @author Rillke, 2012 * * &amp;lt;nowiki&amp;gt;：​&lt;/span&gt;  &lt;span class=&quot;autocomment&quot;&gt;global jQuery:false, mediaWiki:false：​&lt;/span&gt; &lt;span class=&quot;autocomment&quot;&gt;jshint smarttabs: true：​&lt;/span&gt;  (function ($, mw) { &amp;quot;use strict&amp;quot;;  // Extending jQuery-object…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
* [[:commons:MediaWiki:libJQuery-ui.js]]&lt;br /&gt;
* jQuery UI additions that can be useful to Wikimedia Commons, and other Wikis.&lt;br /&gt;
*&lt;br /&gt;
* This pages has automated jsHint-validation on save. Interested? See [[:commons:MediaWiki:JSValidator.js]], [[:commons:Help:JSValidator.js]].&lt;br /&gt;
*&lt;br /&gt;
* @rev 1 (2012-07-26)&lt;br /&gt;
* @author Rillke, 2012&lt;br /&gt;
*&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/*global jQuery:false, mediaWiki:false*/&lt;br /&gt;
/*jshint smarttabs: true*/&lt;br /&gt;
&lt;br /&gt;
(function ($, mw) {&lt;br /&gt;
&amp;quot;use strict&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// Extending jQuery-object&lt;br /&gt;
// You can call the new methods like this: $.method()&lt;br /&gt;
$.extend({&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create&lt;br /&gt;
	 *&lt;br /&gt;
	 * @example&lt;br /&gt;
	 *      $.createIcon(&amp;#039;ui-icon-alert&amp;#039;).appendTo( mw.util.$content );&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} iconClass jQuery UI icon class name.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @context {jQuery}&lt;br /&gt;
	 * @return {Object} jQuery-wrapped DOM-object: The icon that has been created&lt;br /&gt;
	 */&lt;br /&gt;
	createIcon: function (iconClass) {&lt;br /&gt;
		return $(&amp;#039;&amp;lt;span&amp;gt;&amp;#039;, {&lt;br /&gt;
			&amp;#039;class&amp;#039;: &amp;#039;ui-icon &amp;#039; + iconClass + &amp;#039; jquery-inline-icon&amp;#039;,&lt;br /&gt;
			text: &amp;#039; &amp;#039;&lt;br /&gt;
		});&lt;br /&gt;
	},&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a notify-area (area with a background and an icon dependent on the state passed-in)&lt;br /&gt;
	 * More about possible arguments: Look at http://jqueryui.com/ and subpages&lt;br /&gt;
	 *&lt;br /&gt;
	 * @example&lt;br /&gt;
	 *      var $area = $.createNotifyArea( $(&amp;#039;&amp;lt;span&amp;gt;&amp;#039;).text(&amp;#039;Hello World&amp;#039;), &amp;#039;ui-icon-alert&amp;#039;, &amp;#039;ui-state-error&amp;#039; );&lt;br /&gt;
	 *      $area.appendTo( mw.util.$content );&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String|DOM-object|jQuery-wrapped DOM-object} textNode Message-string, HTML or DOM-node that will be used in the area.&lt;br /&gt;
	 * @param {String} icon jQuery UI icon class name.&lt;br /&gt;
	 * @param {String} state class(es) that indicate(s) the state of the area. E.g. ui-state-highlight, ui-state-disabled, ui-state-error, ...&lt;br /&gt;
	 *&lt;br /&gt;
	 * @context {jQuery}&lt;br /&gt;
	 * @return {Object} jQuery-wrapped DOM-object: The area that has been created&lt;br /&gt;
	 */&lt;br /&gt;
	createNotifyArea: function (textNode, icon, state) {&lt;br /&gt;
		return $(&amp;#039;&amp;lt;div&amp;gt;&amp;#039;, {&lt;br /&gt;
			&amp;#039;class&amp;#039;: &amp;#039;ui-widget&amp;#039;&lt;br /&gt;
		}).append(&lt;br /&gt;
			$(&amp;#039;&amp;lt;div&amp;gt;&amp;#039;, {&lt;br /&gt;
				&amp;#039;class&amp;#039;: state + &amp;#039; ui-corner-all&amp;#039;,&lt;br /&gt;
				style: &amp;#039;margin-top:20px; padding:0.7em;&amp;#039;&lt;br /&gt;
			}).append($(&amp;#039;&amp;lt;p&amp;gt;&amp;#039;).append(&lt;br /&gt;
					$.createIcon(icon).css(&amp;#039;margin-right&amp;#039;, &amp;#039;.3em&amp;#039;), textNode)));&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	/* @deprecated since 1.26 */&lt;br /&gt;
	ucFirst: function (str) {&lt;br /&gt;
		return str.charAt(0).toUpperCase() + str.slice(1);&lt;br /&gt;
	}&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
// i18n and configuration for the buttons&lt;br /&gt;
mw.messages.set({&lt;br /&gt;
	&amp;#039;libjq-cancel-title&amp;#039;: &amp;quot;Close this dialog [Esc]&amp;quot;,&lt;br /&gt;
	&amp;#039;libjq-proceed-title&amp;#039;: &amp;quot;Proceed [Enter] in single-line text fields&amp;quot;,&lt;br /&gt;
	&amp;#039;libjq-report-title&amp;#039;: &amp;quot;Reporting errors helps improving the application&amp;quot;&lt;br /&gt;
});&lt;br /&gt;
var buttonConfig = {&lt;br /&gt;
	proceed: {&lt;br /&gt;
		&amp;#039;icon&amp;#039;: &amp;#039;ui-icon-circle-check&amp;#039;,&lt;br /&gt;
		&amp;#039;class&amp;#039;: &amp;#039;ui-button-green&amp;#039;,&lt;br /&gt;
		&amp;#039;title&amp;#039;: &amp;#039;libjq-proceed-title&amp;#039;&lt;br /&gt;
	},&lt;br /&gt;
	cancel: {&lt;br /&gt;
		&amp;#039;icon&amp;#039;: &amp;#039;ui-icon-circle-close&amp;#039;,&lt;br /&gt;
		&amp;#039;class&amp;#039;: &amp;#039;ui-button-red&amp;#039;,&lt;br /&gt;
		&amp;#039;title&amp;#039;: &amp;#039;libjq-cancel-title&amp;#039;&lt;br /&gt;
	},&lt;br /&gt;
	report: {&lt;br /&gt;
		&amp;#039;icon&amp;#039;: &amp;#039;ui-icon-circle-check&amp;#039;,&lt;br /&gt;
		&amp;#039;class&amp;#039;: &amp;#039;&amp;#039;,&lt;br /&gt;
		&amp;#039;title&amp;#039;: &amp;#039;libjq-report-title&amp;#039;&lt;br /&gt;
	}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Extending jQuery&amp;#039;s prototype&lt;br /&gt;
// You can call the new methods like this: $(&amp;#039;selector&amp;#039;).method()&lt;br /&gt;
$.extend($.fn, {&lt;br /&gt;
	/**&lt;br /&gt;
	 * Style a button like a proceed, cancel, ... button&lt;br /&gt;
	 *&lt;br /&gt;
	 * @example&lt;br /&gt;
	 *      $(&amp;#039;#MySelector&amp;#039;).children(&amp;#039;button&amp;#039;).specialButton(&amp;#039;proceed&amp;#039;).hide();&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} which name of the special-button type&lt;br /&gt;
	 *&lt;br /&gt;
	 * @context {jQuery-wrapped DOM-object}&lt;br /&gt;
	 * @return {jQuery-wrapped DOM-object} returns the same jQuery-wrapped DOM-object so you can perform further actions on it&lt;br /&gt;
	 */&lt;br /&gt;
	specialButton: function (which) {&lt;br /&gt;
		return (function ($btn, cfg) {&lt;br /&gt;
			return $btn.button({&lt;br /&gt;
				icons: {&lt;br /&gt;
					primary: cfg.icon&lt;br /&gt;
				}&lt;br /&gt;
			}).addClass(cfg[&amp;#039;class&amp;#039;]).attr(&amp;#039;title&amp;#039;, mw.msg(cfg.title));&lt;br /&gt;
		}&lt;br /&gt;
			(this, buttonConfig[which]));&lt;br /&gt;
	},&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add event/state classes to a node if they are in that state&lt;br /&gt;
	 *&lt;br /&gt;
	 * @example&lt;br /&gt;
	 *      $(&amp;#039;#MyButton&amp;#039;)._jqInteraction().show();&lt;br /&gt;
	 *&lt;br /&gt;
	 * @context {Object} jQuery instance (jQuery DOM node list)&lt;br /&gt;
	 * @return {Object} jQuery instance (jQuery DOM node list)&lt;br /&gt;
	 */&lt;br /&gt;
	_jqInteraction: function () {&lt;br /&gt;
		var $el = this;&lt;br /&gt;
		return $el.hover(function () {&lt;br /&gt;
			$el.addClass(&amp;#039;ui-state-hover&amp;#039;);&lt;br /&gt;
		}, function () {&lt;br /&gt;
			$el.removeClass(&amp;#039;ui-state-hover&amp;#039;).removeClass(&amp;#039;ui-state-active&amp;#039;);&lt;br /&gt;
		}).focusin(function () {&lt;br /&gt;
			$el.addClass(&amp;#039;ui-state-focus&amp;#039;);&lt;br /&gt;
		}).focusout(function () {&lt;br /&gt;
			$el.removeClass(&amp;#039;ui-state-focus&amp;#039;);&lt;br /&gt;
		}).mousedown(function (e) {&lt;br /&gt;
			if (1 === e.which)&lt;br /&gt;
				$el.addClass(&amp;#039;ui-state-active&amp;#039;);&lt;br /&gt;
		}).mouseup(function () {&lt;br /&gt;
			$el.removeClass(&amp;#039;ui-state-active&amp;#039;);&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
(jQuery, mediaWiki));&lt;br /&gt;
&lt;br /&gt;
// &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>鹿野耕云</name></author>
	</entry>
</feed>