I'm trying to drupal_add_library('system', 'ui.spinner') but it's not being added, the library array for ui.spinner is empty .. how do I add new widgets from jquery_update module? And also any scripts from ui/external folder, i.e. globalize.js

Comments

OnkelTem’s picture

Same shit

UPDATE. Oh. It's simple. They didn't bother to declare it. It's just missed in jquery_update.

OnkelTem’s picture

quick patch

diff --git a/jquery_update.module b/jquery_update.module
index 76644f8..9b9cd2d 100644
--- a/jquery_update.module
+++ b/jquery_update.module
@@ -68,6 +68,21 @@ function jquery_update_library() {
     ),
     'version' => '2.1.2',
   );
+  $libraries['ui.spinner'] = array(
+    'title' => 'jQuery UI: Spinner',
+    'website' => 'http://jqueryui.com/demos/spinner/',
+    'version' => '1.10.2',
+    'js' => array(
+      drupal_get_path('module', 'jquery_update') . '/replace/ui/ui/jquery.ui.spinner.js' => array(),
+    ),
+    'css' => array(
+      drupal_get_path('module', 'jquery_update') . '/replace/ui/themes/base/jquery.ui.spinner.css' => array(),
+    ),
+    'dependencies' => array(
+      array('system', 'ui.widget'),
+      array('system', 'ui.button'),
+    ),
+  );
   return $libraries;
 }

Now drupal_add_library('jquery_update', 'ui.spinner'); should work.

ericduran’s picture

Category: bug » support
Status: Active » Fixed

This is fixed in the latest dev. You should now be able to do drupal_add_library('system', 'ui.spinner').

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

danylevskyi’s picture

Issue summary: View changes

I'd like to make a note that system module should be used instead jquery_update to add the library.
Example:

$form['#attached']['library'][] = array('system', 'ui.spinner');
MykolaVeryha’s picture

Drupal 8
Libraries
core/jquery.ui.spinner