Skip to content

Commit d1ecf1a

Browse files
author
Jon Prindiville
committed
Fix whitespace, remove '?' from script selector.
The '?' which was removed would cause the selector to only find the <script> tag if cms.changelist.js had been specified with a query string following it.
1 parent 3a08148 commit d1ecf1a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

cms/static/cms/js/plugins/cms.changelist.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ $(document).ready(function () {
5555
};
5656

5757
// For passing in to jsTree's settings.ui.theme_path in order to enable
58-
// it to construct a proper relative URL for its assets. If theme_path
59-
// remains false, jsTree will construct a path using the contents of the
60-
// location bar. In the case that static files (including jsTree's
61-
// javascript) are served from a location other than that of the HTML
62-
// files, the URLs constructed will be incorrect.
58+
// it to construct a proper relative URL for its assets. If theme_path
59+
// remains false, jsTree will construct a path using the contents of the
60+
// location bar. In the case that static files (including jsTree's
61+
// javascript) are served from a location other than that of the HTML
62+
// files, the URLs constructed will be incorrect.
6363
function script_url_path() {
64-
// Find the URL that loaded this script (not sure if we can
65-
// programatically determine the name of the current script, so it is
66-
// hardcoded here)
67-
full_url = $('script[src*="/cms.changelist.js?"]').attr('src');
68-
// Return everything but the filename
64+
// Find the URL that loaded this script (not sure if we can
65+
// programatically determine the name of the current script, so it is
66+
// hardcoded here)
67+
full_url = $('script[src*="/cms.changelist.js"]').attr('src');
68+
// Return everything but the filename
6969
return full_url.slice(0,full_url.lastIndexOf('/'));
7070
}
7171

@@ -94,7 +94,7 @@ $(document).ready(function () {
9494
animation: 0,
9595
hover_mode: true,
9696
theme_path: script_url_path() + "/../jstree/themes/",
97-
theme_name: "default",
97+
theme_name: "default",
9898
a_class: "title"
9999
},
100100
cookies : {

0 commit comments

Comments
 (0)