Commit 0cea7258 authored by Marius Cramer's avatar Marius Cramer
Browse files

- added js hook from master

parent 6a1dced4
......@@ -18,6 +18,7 @@ var requestsRunning = 0;
var indicatorPaddingH = -1;
var indicatorPaddingW = -1;
var indicatorCompleted = false;
var registeredHooks = new Array();
redirect = '';
function reportError(request) {
......@@ -28,6 +29,20 @@ function reportError(request) {
/*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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment