r88793 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88792‎ | r88793 | r88794 >
Date:15:13, 25 May 2011
Author:catrope
Status:ok
Tags:
Comment:
WikiLove: Wrap init and defaultOptions in IFFEs aliasing jQuery to $. This is needed to make them not break in debug mode
Modified paths:
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js (modified) (history)
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
@@ -1,3 +1,4 @@
 2+( function( $ ) {
23 $.wikiLove.optionsHook = function() { return {
34 defaultText: '{| style="background-color: $5; border: 1px solid $6;"\n\
45 |rowspan="2" style="vertical-align: middle; padding: 5px;" | [[Image:$3|$4]]\n\
@@ -77,4 +78,5 @@
7879 imageSize: '150px'
7980 }
8081 }
81 -}; };
\ No newline at end of file
 82+}; };
 83+} )( jQuery );
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js
@@ -2,6 +2,7 @@
33 * Init function which is called upon page load. Binds the WikiLove icon to opening the dialog.
44 */
55
 6+( function( $ ) {
67 $.wikiLove.init = function() {
78 $.wikiLove.options = $.wikiLove.optionsHook();
89 $( '#ca-wikilove a' ).click( function( e ) {
@@ -11,3 +12,4 @@
1213 }
1314
1415 $( document ).ready( $.wikiLove.init );
 16+} )( jQuery );

Status & tagging log