File modules/cms/ui/themes/default/script/openrat/navigator.js
Last commit: Sat Dec 18 03:47:23 2021 +0100 dankert New: Every ES6-Module should have a minified version for performance reasons. Bad: The Minifier "Jsqueeze" is unable to minify ES6-modules, so we had to implement a simple JS-Minifier which strips out all comments.
1 /** 2 * Navigation. 3 * 4 * Controls the history API. 5 */ 6 export default class WorkbenchNavigator { 7 'use strict'; 8 9 /** 10 * 11 * Creates a new history entry. 12 */ 13 static navigateToNew(obj) { 14 15 window.history.pushState(obj,obj.name,WorkbenchNavigator.createShortUrl(obj.action,obj.id) ); 16 } 17 18 /** 19 * Sets the state for the current history entry. 20 * This will be called once while initializing the workbench. 21 * 22 * @param obj 23 */ 24 static toActualHistory(obj) { 25 window.history.replaceState(obj,obj.name,WorkbenchNavigator.createShortUrl(obj.action,obj.id) ); 26 } 27 28 29 /** 30 * Creates the URL for the browser adress bar. 31 * 32 * @param action action 33 * @param id ID 34 * @return string 35 */ 36 static createShortUrl(action,id) { 37 return './#/'+action+(id?'/'+id:''); 38 } 39 }
Downloadmodules/cms/ui/themes/default/script/openrat/navigator.js
History Sat, 18 Dec 2021 03:47:23 +0100 dankert New: Every ES6-Module should have a minified version for performance reasons. Bad: The Minifier "Jsqueeze" is unable to minify ES6-modules, so we had to implement a simple JS-Minifier which strips out all comments. Sat, 27 Mar 2021 05:14:11 +0100 Jan Dankert Refactoring: Converting all script files to ES6 modules (work in progress); removed jquery-ui (drag and drop will be replaced by HTML5, sortable by a small lib) Wed, 17 Mar 2021 22:27:33 +0100 Jan Dankert Refactoring: Using ES6-Modules (experimental) Tue, 16 Mar 2021 23:52:22 +0100 Jan Dankert Refactoring: Use ES6 classes. Wed, 3 Mar 2021 23:39:37 +0100 Jan Dankert New: Link groups from users Sun, 23 Feb 2020 04:01:30 +0100 Jan Dankert Refactoring with Namespaces for the cms modules, part 1: moving.