Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jquery_update
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
jquery_update
Commits
ee074818
Commit
ee074818
authored
11 months ago
by
Drew Webber
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3345221
by mcdruid, q2_faith: Should relative custom paths should have a leading slash?
parent
6d15395d
No related branches found
No related tags found
1 merge request
!10
test tweaks for relative paths in examples
Pipeline
#298815
passed
11 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jquery_update.admin.inc
+8
-6
8 additions, 6 deletions
jquery_update.admin.inc
with
8 additions
and
6 deletions
jquery_update.admin.inc
+
8
−
6
View file @
ee074818
...
@@ -227,8 +227,10 @@ function jquery_update_settings_form() {
...
@@ -227,8 +227,10 @@ function jquery_update_settings_form() {
'#collapsed'
=>
FALSE
,
'#collapsed'
=>
FALSE
,
'#tree'
=>
FALSE
,
'#tree'
=>
FALSE
,
'#group'
=>
'jquery_update'
,
'#group'
=>
'jquery_update'
,
'#description'
=>
t
(
'Custom paths for jQuery libraries (e.g. CDN URLs or paths to local files).'
),
'#description'
=>
t
(
'Custom paths for jQuery libraries (e.g. CDN URLs or paths to local files).'
)
.
'<br /><em>'
.
t
(
'Note that the examples may not be correct, e.g. if Drupal is installed in a subdirectory or as part of a multisite.'
)
.
'</em>'
,
);
);
$example_path
=
str_replace
(
$GLOBALS
[
'base_url'
],
''
,
file_create_url
(
'public://jquery_update/'
));
$latest_version
=
jquery_update_latest_version
(
'jquery'
);
$latest_version
=
jquery_update_latest_version
(
'jquery'
);
$example_version
=
$latest_version
?
$latest_version
:
JQUERY_UPDATE_EXAMPLE_JQUERY_VERSION
;
$example_version
=
$latest_version
?
$latest_version
:
JQUERY_UPDATE_EXAMPLE_JQUERY_VERSION
;
...
@@ -238,7 +240,7 @@ function jquery_update_settings_form() {
...
@@ -238,7 +240,7 @@ function jquery_update_settings_form() {
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_jquery'
,
''
),
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_jquery'
,
''
),
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'%url'
=>
'https://code.jquery.com/jquery-'
.
$example_version
.
'.js'
,
'%url'
=>
'https://code.jquery.com/jquery-'
.
$example_version
.
'.js'
,
'%path'
=>
'/sites/default/files/jquery_update
/jquery.js'
,
'%path'
=>
$example_path
.
'
/jquery.js'
,
)),
)),
);
);
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery'
]
=
array
(
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery'
]
=
array
(
...
@@ -256,7 +258,7 @@ function jquery_update_settings_form() {
...
@@ -256,7 +258,7 @@ function jquery_update_settings_form() {
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_jqueryui'
,
''
),
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_jqueryui'
,
''
),
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'%url'
=>
'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/'
.
$example_version
.
'/jquery-ui.min.js'
,
'%url'
=>
'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/'
.
$example_version
.
'/jquery-ui.min.js'
,
'%path'
=>
'/sites/default/files/jquery_update
/jquery-ui.min.js'
,
'%path'
=>
$example_path
.
'
/jquery-ui.min.js'
,
)),
)),
);
);
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jqueryui'
]
=
array
(
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jqueryui'
]
=
array
(
...
@@ -274,7 +276,7 @@ function jquery_update_settings_form() {
...
@@ -274,7 +276,7 @@ function jquery_update_settings_form() {
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_migrate'
,
''
),
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_migrate'
,
''
),
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'%url'
=>
'https://cdn.jsdelivr.net/npm/jquery-migrate@'
.
$example_version
.
'/dist/jquery-migrate.min.js'
,
'%url'
=>
'https://cdn.jsdelivr.net/npm/jquery-migrate@'
.
$example_version
.
'/dist/jquery-migrate.min.js'
,
'%path'
=>
'/sites/default/files/jquery_update
/jquery-migrate.js'
,
'%path'
=>
$example_path
.
'
/jquery-migrate.js'
,
)),
)),
);
);
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_migrate'
]
=
array
(
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_migrate'
]
=
array
(
...
@@ -292,7 +294,7 @@ function jquery_update_settings_form() {
...
@@ -292,7 +294,7 @@ function jquery_update_settings_form() {
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_cookie'
,
''
),
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_cookie'
,
''
),
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'%url'
=>
'https://cdn.jsdelivr.net/gh/carhartl/jquery-cookie@'
.
$example_version
.
'/jquery.cookie.js'
,
'%url'
=>
'https://cdn.jsdelivr.net/gh/carhartl/jquery-cookie@'
.
$example_version
.
'/jquery.cookie.js'
,
'%path'
=>
'/sites/default/files/jquery_update
/jquery.cookie.js'
,
'%path'
=>
$example_path
.
'
/jquery.cookie.js'
,
)),
)),
);
);
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_cookie'
]
=
array
(
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_cookie'
]
=
array
(
...
@@ -310,7 +312,7 @@ function jquery_update_settings_form() {
...
@@ -310,7 +312,7 @@ function jquery_update_settings_form() {
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_form'
,
''
),
'#default_value'
=>
variable_get
(
'jquery_update_custom_path_form'
,
''
),
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'#description'
=>
t
(
'Example: %url or %path'
,
array
(
'%url'
=>
'https://cdn.jsdelivr.net/gh/jquery-form/form@'
.
$example_version
.
'/dist/jquery.form.min.js'
,
'%url'
=>
'https://cdn.jsdelivr.net/gh/jquery-form/form@'
.
$example_version
.
'/dist/jquery.form.min.js'
,
'%path'
=>
'/sites/default/files/jquery_update
/jquery.form.js'
,
'%path'
=>
$example_path
.
'
/jquery.form.js'
,
)),
)),
);
);
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_form'
]
=
array
(
$form
[
'jquery_custom'
][
'jquery_update_custom_version_jquery_form'
]
=
array
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment