##// END OF EJS Templates
fix: dismiss license warnings should be also possible in non base.mako pages
super-admin -
Show More
@@ -1111,39 +1111,6
1111 }
1111 }
1112 });
1112 });
1113
1113
1114 var dismissNotice = function(noticeId) {
1115
1116 var url = pyroutes.url('user_notice_dismiss',
1117 {"user_id": templateContext.rhodecode_user.user_id});
1118
1119 var postData = {
1120 'csrf_token': CSRF_TOKEN,
1121 'notice_id': noticeId,
1122 };
1123
1124 var success = function(response) {
1125 $('#notice-message-' + noticeId).remove();
1126 return false;
1127 };
1128 var failure = function(data, textStatus, xhr) {
1129 alert("error processing request: " + textStatus);
1130 return false;
1131 };
1132 ajaxPOST(url, postData, success, failure);
1133 }
1134
1135 var hideLicenseWarning = function () {
1136 var fingerprint = templateContext.session_attrs.license_fingerprint;
1137 storeUserSessionAttr('rc_user_session_attr.hide_license_warning', fingerprint);
1138 $('#notifications').hide();
1139 }
1140
1141 var hideLicenseError = function () {
1142 var fingerprint = templateContext.session_attrs.license_fingerprint;
1143 storeUserSessionAttr('rc_user_session_attr.hide_license_error', fingerprint);
1144 $('#notifications').hide();
1145 }
1146
1147 </script>
1114 </script>
1148 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
1115 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
1149 </%def>
1116 </%def>
@@ -104,6 +104,38 c.template_context['attachment_store'] = {
104 rhodecode_edition: '${c.rhodecode_edition}'
104 rhodecode_edition: '${c.rhodecode_edition}'
105 }
105 }
106 };
106 };
107 var dismissNotice = function(noticeId) {
108
109 var url = pyroutes.url('user_notice_dismiss',
110 {"user_id": templateContext.rhodecode_user.user_id});
111
112 var postData = {
113 'csrf_token': CSRF_TOKEN,
114 'notice_id': noticeId,
115 };
116
117 var success = function(response) {
118 $('#notice-message-' + noticeId).remove();
119 return false;
120 };
121 var failure = function(data, textStatus, xhr) {
122 alert("error processing request: " + textStatus);
123 return false;
124 };
125 ajaxPOST(url, postData, success, failure);
126 }
127
128 var hideLicenseWarning = function () {
129 var fingerprint = templateContext.session_attrs.license_fingerprint;
130 storeUserSessionAttr('rc_user_session_attr.hide_license_warning', fingerprint);
131 $('#notifications').hide();
132 }
133
134 var hideLicenseError = function () {
135 var fingerprint = templateContext.session_attrs.license_fingerprint;
136 storeUserSessionAttr('rc_user_session_attr.hide_license_error', fingerprint);
137 $('#notifications').hide();
138 }
107
139
108 </script>
140 </script>
109 <%include file="/base/plugins_base.mako"/>
141 <%include file="/base/plugins_base.mako"/>
General Comments 0
You need to be logged in to leave comments. Login now