File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,15 @@ function kalatheme_process_page(&$variables) {
116116 if (!kalatheme_use_libraries ()) {
117117 $ library = theme_get_setting ('bootstrap_library ' );
118118 if ($ library !== 'none ' && !empty ($ library )) {
119- // Add the JS
120- drupal_add_js ($ base ['scheme ' ] . ": " . KALATHEME_BOOTSTRAP_JS , 'external ' );
119+ // Add the JS. Note that we have to put Bootstrap after jQuery, but before jQuery UI.
120+ $ url = $ base ['scheme ' ] . ": " . KALATHEME_BOOTSTRAP_JS ;
121+ $ jquery_ui_library = drupal_get_library ('system ' , 'ui ' );
122+ $ jquery_ui_js = reset ($ jquery_ui_library ['js ' ]);
123+ drupal_add_js ($ url , array (
124+ 'type ' => 'external ' ,
125+ 'group ' => JS_LIBRARY ,
126+ 'weight ' => $ jquery_ui_js ['weight ' ] - 1 ,
127+ ));
121128
122129 // Add the CSS
123130 if ($ library == 'default ' ) {
You can’t perform that action at this time.
0 commit comments