##// END OF EJS Templates
license: add helpers to allow users hide license warnings.
marcink -
r4453:a39b0f4b default
parent child Browse files
Show More
@@ -384,7 +384,8 b' def attach_context_attributes(context, r'
384 384 session_attrs = {
385 385 # defaults
386 386 "clone_url_format": "http",
387 "diffmode": "sideside"
387 "diffmode": "sideside",
388 "license_fingerprint": request.session.get('license_fingerprint')
388 389 }
389 390
390 391 if not is_api:
@@ -48,6 +48,7 b' from .utils import ('
48 48
49 49
50 50 FILE_TREE_CACHE_VER = 'v4'
51 LICENSE_CACHE_VER = 'v2'
51 52
52 53
53 54 def configure_dogpile_cache(settings):
@@ -1130,6 +1130,19 b''
1130 1130 };
1131 1131 ajaxPOST(url, postData, success, failure);
1132 1132 }
1133
1134 var hideLicenseWarning = function () {
1135 var fingerprint = templateContext.session_attrs.license_fingerprint;
1136 storeUserSessionAttr('rc_user_session_attr.hide_license_warning', fingerprint);
1137 $('#notifications').hide();
1138 }
1139
1140 var hideLicenseError = function () {
1141 var fingerprint = templateContext.session_attrs.license_fingerprint;
1142 storeUserSessionAttr('rc_user_session_attr.hide_license_error', fingerprint);
1143 $('#notifications').hide();
1144 }
1145
1133 1146 </script>
1134 1147 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
1135 1148 </%def>
General Comments 0
You need to be logged in to leave comments. Login now