Show More
@@ -72,6 +72,7 b'' | |||||
72 | <option value="ga">Google Analytics</option> |
|
72 | <option value="ga">Google Analytics</option> | |
73 | <option value="clicky">Clicky</option> |
|
73 | <option value="clicky">Clicky</option> | |
74 | <option value="server_announce">${_('Server Announcement')}</option> |
|
74 | <option value="server_announce">${_('Server Announcement')}</option> | |
|
75 | <option value="flash_filtering">${_('Example flash message filtering')}</option> | |||
75 | </select> |
|
76 | </select> | |
76 | </div> |
|
77 | </div> | |
77 | <div style="padding: 10px 0px"></div> |
|
78 | <div style="padding: 10px 0px"></div> | |
@@ -198,7 +199,24 b'' | |||||
198 | </%text> |
|
199 | </%text> | |
199 | </script> |
|
200 | </script> | |
200 |
|
201 | |||
|
202 | <script id="flash_filtering_tmpl" type='text/x-template'> | |||
|
203 | <%text filter="h"> | |||
|
204 | <script> | |||
|
205 | // This filters out some flash messages before they are presented to user | |||
|
206 | // based on their contents | |||
201 |
|
207 | |||
|
208 | var filteredMessages = []; | |||
|
209 | for(var i =0; i< alertMessagePayloads.length; i++){ | |||
|
210 | if (typeof alertMessagePayloads[i].message.subdata.subtype !== 'undefined' && | |||
|
211 | alertMessagePayloads[i].message.subdata.subtype.indexOf('rc_license') !== -1){ | |||
|
212 | continue | |||
|
213 | } | |||
|
214 | filteredMessages.push(alertMessagePayloads[i]); | |||
|
215 | } | |||
|
216 | alertMessagePayloads = filteredMessages; | |||
|
217 | </script> | |||
|
218 | </%text> | |||
|
219 | </script> | |||
202 |
|
220 | |||
203 | <script> |
|
221 | <script> | |
204 | var pre_cm = initCodeMirror('rhodecode_pre_code', '', false); |
|
222 | var pre_cm = initCodeMirror('rhodecode_pre_code', '', false); | |
@@ -217,7 +235,8 b' var get_data = function(type, old){' | |||||
217 | '#': old, |
|
235 | '#': old, | |
218 | 'ga': get_tmpl('ga'), |
|
236 | 'ga': get_tmpl('ga'), | |
219 | 'clicky': get_tmpl('clicky'), |
|
237 | 'clicky': get_tmpl('clicky'), | |
220 | 'server_announce': get_tmpl('server_announce') |
|
238 | 'server_announce': get_tmpl('server_announce'), | |
|
239 | 'flash_filtering': get_tmpl('flash_filtering') | |||
221 | }[type] |
|
240 | }[type] | |
222 | }; |
|
241 | }; | |
223 |
|
242 |
General Comments 0
You need to be logged in to leave comments.
Login now