File modules/cms/ui/themes/default/script/openrat/callback.js
Last commit: Sat Nov 27 04:39:51 2021 +0100 Jan Dankert Refactoring: Extract the api request form.js into a new api class which returns a promise.
1 /** 2 * Simple Callback. 3 */ 4 export default class Callback { 5 6 // internal callbacks. 7 8 constructor() { 9 this.list = []; 10 } 11 12 /** 13 * Add a callback to the list 14 * 15 * @param callable the new callback 16 */ 17 add( callable ) { 18 this.list.push( callable ); 19 } 20 21 /** 22 * Fire all callbacks. 23 */ 24 fire() { 25 for( let c of this.list) 26 c.apply(null,arguments); 27 } 28 29 } 30 31 Callback.afterViewLoadedHandler = new Callback(); 32 Callback.dataChangedHandler = new Callback(); 33 Callback.afterNewActionHandler = new Callback(); 34 Callback.afterAllViewsLoaded = new Callback();
Downloadmodules/cms/ui/themes/default/script/openrat/callback.js
History Sat, 27 Nov 2021 04:39:51 +0100 Jan Dankert Refactoring: Extract the api request form.js into a new api class which returns a promise. Sat, 27 Mar 2021 11:14:12 +0100 Jan Dankert Fix: QRCode 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.