Index: trunk/tools/wp-photocommons/inc/class-photocommons.php |
— | — | @@ -25,10 +25,15 @@ |
26 | 26 | wp_register_style('jquid_jquery_blog_stylesheet', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/sunny/jquery-ui.css'); |
27 | 27 | wp_enqueue_style('jquid_jquery_blog_stylesheet'); |
28 | 28 | |
| 29 | + wp_register_style('suggestions', self::PLUGIN_PATH . "css/jquery.suggestions.css"); |
| 30 | + wp_enqueue_style('suggestions'); |
| 31 | + |
29 | 32 | wp_register_script('admin', self::PLUGIN_PATH . 'js/admin.js'); |
30 | 33 | wp_register_script('search', self::PLUGIN_PATH . 'js/search.js'); |
| 34 | + wp_register_script('suggestions', self::PLUGIN_PATH . 'js/jquery.suggestions.js'); |
31 | 35 | wp_enqueue_script('admin'); |
32 | 36 | wp_enqueue_script('search'); |
| 37 | + wp_enqueue_script('suggestions'); |
33 | 38 | } |
34 | 39 | |
35 | 40 | private function initFrontend() { |
Index: trunk/tools/wp-photocommons/js/search.js |
— | — | @@ -162,6 +162,7 @@ |
163 | 163 | }); |
164 | 164 | |
165 | 165 | // Init |
| 166 | + // FIXME |
166 | 167 | $( document ).ready( Photocommons.init ); |
167 | 168 | |
168 | 169 | })(jQuery); |
\ No newline at end of file |
Index: trunk/tools/wp-photocommons/js/admin.js |
— | — | @@ -13,6 +13,8 @@ |
14 | 14 | |
15 | 15 | $("body").prepend('<div id="photocommons-dialog"></div>'); |
16 | 16 | $("#photocommons-dialog").load(PATH + "/search.php?standalone=1", function() { |
| 17 | + console.log(Photocommons, $.suggestions); |
| 18 | + Photocommons.init(); |
17 | 19 | var $self = $("#photocommons-dialog"); |
18 | 20 | $self.dialog(); |
19 | 21 | $self.find("button").click(function() { |
Index: trunk/tools/wp-photocommons/js/jquery.suggestions.js |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | * highlightInput: Whether to hightlight matched portions of the input or not |
43 | 43 | * Type: Boolean, Default: false |
44 | 44 | */ |
45 | | - |
| 45 | +(function($) { |
46 | 46 | $.suggestions = { |
47 | 47 | /** |
48 | 48 | * Cancel any delayed updateSuggestions() call and inform the user so |
— | — | @@ -513,4 +513,5 @@ |
514 | 514 | $(this).data( 'suggestions-context', context ); |
515 | 515 | } ); |
516 | 516 | return returnValue !== null ? returnValue : $(this); |
517 | | -}; |
\ No newline at end of file |
| 517 | +}; |
| 518 | +})(jQuery); |
\ No newline at end of file |