Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
jquery_ui
Commits
c0482d99
Commit
c0482d99
authored
Jun 27, 2009
by
sun
Browse files
#503848
by Gábor Hojtsy: Added default weight of JS_LIBRARY for JavaScripts.
parent
c20e2279
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.txt
View file @
c0482d99
...
...
@@ -6,6 +6,7 @@ jQuery UI x.x-x.x, xxxx-xx-xx
jQuery UI 7.x-1.x, xxxx-xx-xx
-----------------------------
#503848 by Gbor Hojtsy: Added default weight of JS_LIBRARY for JavaScripts.
#325831 by quicksketch, James Andres, ksenzee: Fixed drupal_get_path() fails
during Drupal installation.
#357780 by Gbor Hojtsy: Ported to 7.x.
...
...
jquery_ui.module
View file @
c0482d99
...
...
@@ -35,7 +35,7 @@ else {
* on the page, or a string with a single file name.
*/
function
jquery_ui_add
(
$files
=
array
())
{
static
$loaded_files
,
$ui_core
,
$effects_core
;
static
$loaded_files
,
$ui_core
,
$effects_core
,
$weight
;
$jquery_ui_path
=
JQUERY_UI_PATH
.
'/ui'
;
$compression
=
variable_get
(
'jquery_update_compression_type'
,
'mini'
);
...
...
@@ -45,6 +45,10 @@ function jquery_ui_add($files = array()) {
$files
=
array
(
$files
);
}
if
(
!
isset
(
$weight
))
{
$weight
=
JS_LIBRARY
+
5
;
}
// If core hasn't been added yet, add it.
if
(
!
isset
(
$ui_core
))
{
$ui_core
=
TRUE
;
...
...
@@ -76,7 +80,7 @@ function jquery_ui_add($files = array()) {
break
;
}
$js_path
=
$jquery_ui_path
.
'/'
.
$file_path
;
drupal_add_js
(
$js_path
);
drupal_add_js
(
$js_path
,
array
(
'weight'
=>
$weight
++
)
);
$loaded_files
[
$file
]
=
$js_path
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment