Marius Cramer
2014-05-08 0cea7258483942438827967de0b68248ab629263
- added js hook from master
1 files modified
15 ■■■■■ changed files
interface/web/js/scrigo.js.php 15 ●●●●● patch | view | raw | blame | history
interface/web/js/scrigo.js.php
@@ -18,6 +18,7 @@
var indicatorPaddingH = -1;
var indicatorPaddingW = -1;
var indicatorCompleted = false;
var registeredHooks = new Array();
redirect = '';
function reportError(request) {
@@ -28,6 +29,20 @@
    /*alert(request);*/
}
function registerHook(name, callback) {
    if(!registeredHooks[name]) registeredHooks[name] = new Array();
    var newindex = registeredHooks[name].length;
    registeredHooks[name][newindex] = callback;
}
function callHook(name, params) {
    if(!registeredHooks[name]) return;
    for(var i = 0; i < registeredHooks[name].length; i++) {
        var callback = registeredHooks[name][i];
        callback(name, params);
    }
}
function resetFormChanged() {
    pageFormChanged = false;
}