Merge pull request #257 from niphlod/enhancement/admin_static_version
response.static_version support in admin
This commit is contained in:
commit
e64a6d6129
2 files changed
+6
-3
No files matched your search
@@ -79,3 +79,6 @@ PLUGINS_APP = 'http://web2py.com/plugins'
|
|||||||
# set the language
|
# set the language
|
||||||
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
|
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
|
||||||
T.force(request.cookies['adminLanguage'].value)
|
T.force(request.cookies['adminLanguage'].value)
|
||||||
|
|
||||||
|
#set static_version
|
||||||
|
response.static_version = '2.7.3'
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
url = URL('edit', args=args, vars=vars)
|
url = URL('edit', args=args, vars=vars)
|
||||||
return A(file, _class='editor_filelink', _href=url, _style='word-wrap: nowrap;')
|
return A(file, _class='editor_filelink', _href=url, _style='word-wrap: nowrap;')
|
||||||
}}
|
}}
|
||||||
{{cm=URL('static','codemirror')}}
|
{{cm=URL('static%s' % (response.static_version and '/_' + response.static_version or ''),'codemirror')}}
|
||||||
<link rel="stylesheet" href="{{=cm}}/lib/codemirror.css">
|
<link rel="stylesheet" href="{{=cm}}/lib/codemirror.css">
|
||||||
<link rel="stylesheet" href="{{='%s/theme/%s.css' % (cm, editor_settings['theme'])}}">
|
<link rel="stylesheet" href="{{='%s/theme/%s.css' % (cm, editor_settings['theme'])}}">
|
||||||
<script src="{{=cm}}/lib/codemirror.js"></script>
|
<script src="{{=cm}}/lib/codemirror.js"></script>
|
||||||
@@ -235,8 +235,8 @@ jQuery(document).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<!-- Typeahead scripts here so the page load faster -->
|
<!-- Typeahead scripts here so the page load faster -->
|
||||||
<script src="{{=URL('static/js', 'typeahead.min.js')}}"></script>
|
<script src="{{=URL('static%s' % (response.static_version and '/_' + response.static_version or ''), 'js/typeahead.min.js')}}"></script>
|
||||||
<script src="{{=URL('static/js', 'hogan-2.0.0.js')}}"></script>
|
<script src="{{=URL('static%s' % (response.static_version and '/_' + response.static_version or ''), 'js/hogan-2.0.0.js')}}"></script>
|
||||||
<script>
|
<script>
|
||||||
jQuery('.typeahead-tw').typeahead({
|
jQuery('.typeahead-tw').typeahead({
|
||||||
name: 'files',
|
name: 'files',
|
||||||
|
|||||||
Reference in new issue
Block a user