# HG changeset patch # User hertzhaft # Date 1472986508 -7200 # Node ID debdc9fdf48f3fe1f1b8822b63e5a0ea08a8d805 # Parent 3709c60f4c2e3cb989fdc317b71aa8da51aaad51 init hook for digilib plugin to initialize nested options diff -r 3709c60f4c2e -r debdc9fdf48f webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Sun Aug 28 01:28:49 2016 +0200 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Sun Sep 04 12:55:08 2016 +0200 @@ -125,7 +125,7 @@ * @param options * @returns */ - init : function(options) { + init : function(options, hook) { // import geometry classes if (plugins.geometry == null) { $.error("jquery.digilib.geometry plugin not found!"); @@ -260,6 +260,11 @@ } // create HTML structure for scaler setupScalerDiv(data); + // additional initializations before setup (e.g. for single nested settings) + if (typeof hook === 'function') { + hook(data); + console.debug('init hook', hook, data); + } // send setup event $(data).trigger('setup'); });