diff --git a/tw2/jqplugins/ui/base.py b/tw2/jqplugins/ui/base.py
index 6a26a9d..59d6473 100644
--- a/tw2/jqplugins/ui/base.py
+++ b/tw2/jqplugins/ui/base.py
@@ -16,6 +16,8 @@ class jQueryUIMixin(jQueryPluginLinkMixin):
basename='jquery-ui'
modname = 'tw2.jqplugins.ui'
+ url_base = defaults._url_base_
+
class jQueryUIJSLink(twc.JSLink, jQueryUIMixin):
subdir = 'js'
@@ -31,6 +33,12 @@ class jQueryUIThemeCSSLink(jQueryUIMixin, twc.CSSLink):
self.name = get_ui_theme_name()
super(jQueryUIThemeCSSLink, self).prepare()
+ @property
+ def external_link(self):
+ link = '/'.join((
+ self.url_base, 'themes', self.name, self.core_filename))
+ return link
+
def set_ui_theme_name(ui_theme_name):
""" Set the jquery ui theme on a request/thread local basis
diff --git a/tw2/jqplugins/ui/defaults.py b/tw2/jqplugins/ui/defaults.py
index 4a8b723..1a8e373 100644
--- a/tw2/jqplugins/ui/defaults.py
+++ b/tw2/jqplugins/ui/defaults.py
@@ -3,3 +3,5 @@ _ui_theme_name_ = 'smoothness'
_ui_dirname_ = 'jquery/ui/%(version)s/%(subdir)s'
_ui_basename_ = 'jquery_ui'
_ui_version_ = '1.8.17'
+
+_url_base_ = 'http://ajax.googleapis.com/ajax/libs/jqueryui/%(version)s/'
hello friends,
this patch will allow usage of jquery-ui from google apis,
even versions not installed locally.
please submit and enjoy
alex