Show More
@@ -72,6 +72,7 b'' | |||
|
72 | 72 | <option value="ga">Google Analytics</option> |
|
73 | 73 | <option value="clicky">Clicky</option> |
|
74 | 74 | <option value="server_announce">${_('Server Announcement')}</option> |
|
75 | <option value="flash_filtering">${_('Example flash message filtering')}</option> | |
|
75 | 76 | </select> |
|
76 | 77 | </div> |
|
77 | 78 | <div style="padding: 10px 0px"></div> |
@@ -198,7 +199,24 b'' | |||
|
198 | 199 | </%text> |
|
199 | 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 | 221 | <script> |
|
204 | 222 | var pre_cm = initCodeMirror('rhodecode_pre_code', '', false); |
@@ -217,7 +235,8 b' var get_data = function(type, old){' | |||
|
217 | 235 | '#': old, |
|
218 | 236 | 'ga': get_tmpl('ga'), |
|
219 | 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 | 240 | }[type] |
|
222 | 241 | }; |
|
223 | 242 |
General Comments 0
You need to be logged in to leave comments.
Login now