Skip to content

Commit

Permalink
Merge pull request #8940 from internetarchive/remove-setup_jquery_urls
Browse files Browse the repository at this point in the history
remove setup_jquery_urls
  • Loading branch information
jimchamp authored Apr 17, 2024
2 parents 1447d83 + ff95194 commit 2a1d4a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion conf/openlibrary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ upstream_to_www_migration: true
default_template_root: /upstream
css_root: /upstream/css
js_root: /upstream/js
use_google_cdn: false
logging_config_file: conf/logging.ini
email_config_file: conf/email.ini

Expand Down
17 changes: 0 additions & 17 deletions openlibrary/plugins/upstream/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,21 +277,6 @@ def reload():
all_js().reload()


def setup_jquery_urls():
if config.get('use_google_cdn', True):
jquery_url = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
jqueryui_url = (
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"
)
else:
jquery_url = "/static/upstream/js/jquery-1.3.2.min.js"
jqueryui_url = "/static/upstream/js/jquery-ui-1.7.2.min.js"

web.template.Template.globals['jquery_url'] = jquery_url
web.template.Template.globals['jqueryui_url'] = jqueryui_url
web.template.Template.globals['use_google_cdn'] = config.get('use_google_cdn', True)


def user_can_revert_records():
user = web.ctx.site.get_user()
return user and (
Expand Down Expand Up @@ -418,7 +403,5 @@ def setup():

web.template.STATEMENT_NODES["jsdef"] = jsdef.JSDefNode

setup_jquery_urls()


setup()

0 comments on commit 2a1d4a4

Please sign in to comment.