r80340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80339‎ | r80340 | r80341 >
Date:22:40, 14 January 2011
Author:husky
Status:ok
Tags:
Comment:
omg it works
Modified paths:
  • /trunk/tools/wp-photocommons/inc/class-photocommons.php (modified) (history)
  • /trunk/tools/wp-photocommons/js/admin.js (modified) (history)
  • /trunk/tools/wp-photocommons/js/jquery.suggestions.js (modified) (history)
  • /trunk/tools/wp-photocommons/js/search.js (modified) (history)

Diff [purge]

Index: trunk/tools/wp-photocommons/inc/class-photocommons.php
@@ -25,10 +25,15 @@
2626 wp_register_style('jquid_jquery_blog_stylesheet', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/sunny/jquery-ui.css');
2727 wp_enqueue_style('jquid_jquery_blog_stylesheet');
2828
 29+ wp_register_style('suggestions', self::PLUGIN_PATH . "css/jquery.suggestions.css");
 30+ wp_enqueue_style('suggestions');
 31+
2932 wp_register_script('admin', self::PLUGIN_PATH . 'js/admin.js');
3033 wp_register_script('search', self::PLUGIN_PATH . 'js/search.js');
 34+ wp_register_script('suggestions', self::PLUGIN_PATH . 'js/jquery.suggestions.js');
3135 wp_enqueue_script('admin');
3236 wp_enqueue_script('search');
 37+ wp_enqueue_script('suggestions');
3338 }
3439
3540 private function initFrontend() {
Index: trunk/tools/wp-photocommons/js/search.js
@@ -162,6 +162,7 @@
163163 });
164164
165165 // Init
 166+ // FIXME
166167 $( document ).ready( Photocommons.init );
167168
168169 })(jQuery);
\ No newline at end of file
Index: trunk/tools/wp-photocommons/js/admin.js
@@ -13,6 +13,8 @@
1414
1515 $("body").prepend('<div id="photocommons-dialog"></div>');
1616 $("#photocommons-dialog").load(PATH + "/search.php?standalone=1", function() {
 17+ console.log(Photocommons, $.suggestions);
 18+ Photocommons.init();
1719 var $self = $("#photocommons-dialog");
1820 $self.dialog();
1921 $self.find("button").click(function() {
Index: trunk/tools/wp-photocommons/js/jquery.suggestions.js
@@ -41,7 +41,7 @@
4242 * highlightInput: Whether to hightlight matched portions of the input or not
4343 * Type: Boolean, Default: false
4444 */
45 -
 45+(function($) {
4646 $.suggestions = {
4747 /**
4848 * Cancel any delayed updateSuggestions() call and inform the user so
@@ -513,4 +513,5 @@
514514 $(this).data( 'suggestions-context', context );
515515 } );
516516 return returnValue !== null ? returnValue : $(this);
517 -};
\ No newline at end of file
 517+};
 518+})(jQuery);
\ No newline at end of file

Status & tagging log