LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 Strip the viewmode from the charmid when processing to check for proper | 230 Strip the viewmode from the charmid when processing to check for proper |
231 routing. | 231 routing. |
232 | 232 |
233 @method _stripViewMode | 233 @method _stripViewMode |
234 @param {String} id the req.param.id found. | 234 @param {String} id the req.param.id found. |
235 */ | 235 */ |
236 _stripViewMode: function(id) { | 236 _stripViewMode: function(id) { |
237 // Clear out any parts of /sidebar/search, /sidebar, or /search from the | 237 // Clear out any parts of /sidebar/search, /sidebar, or /search from the |
238 // id. See if we still really have an id. | 238 // id. See if we still really have an id. |
239 var match = | 239 var match = |
240 /^(sidebar|fullscreen|minimized|search|test\/index\.html)\/?(search)?/
; | 240 /^(sidebar|fullscreen|minimized|search|test\/index\.html)\/?(search)?\
/?/; |
241 | 241 |
242 if (id && id.match(match)) { | 242 if (id && id.match(match)) { |
243 // Strip it out. | 243 // Strip it out. |
244 id = id.replace(match, ''); | 244 id = id.replace(match, ''); |
245 | 245 |
246 // if the id is now empty, set it to null. | 246 // if the id is now empty, set it to null. |
247 if (id === '') { | 247 if (id === '') { |
248 id = null; | 248 id = null; |
249 } | 249 } |
250 } | 250 } |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 'querystring', | 835 'querystring', |
836 'sub-app', | 836 'sub-app', |
837 'subapp-browser-charmview', | 837 'subapp-browser-charmview', |
838 'subapp-browser-editorial', | 838 'subapp-browser-editorial', |
839 'subapp-browser-fullscreen', | 839 'subapp-browser-fullscreen', |
840 'subapp-browser-minimized', | 840 'subapp-browser-minimized', |
841 'subapp-browser-searchview', | 841 'subapp-browser-searchview', |
842 'subapp-browser-sidebar' | 842 'subapp-browser-sidebar' |
843 ] | 843 ] |
844 }); | 844 }); |
LEFT | RIGHT |