From b854319e3b3fa55204ba050ebe45c694053cde25 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 24 May 2017 20:37:17 -0400 Subject: [PATCH] LP#1708291: teach egEmbedFrame about an afterload function The 'afterload' attribute added by this patch allows specifying the name of a function (to be supplied by the embedded content) to run after the frame has been loaded. Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier Signed-off-by: Dan Wells --- Open-ILS/web/js/ui/default/staff/services/eframe.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/eframe.js b/Open-ILS/web/js/ui/default/staff/services/eframe.js index 3beaa7c271..ae26e7f74a 100644 --- a/Open-ILS/web/js/ui/default/staff/services/eframe.js +++ b/Open-ILS/web/js/ui/default/staff/services/eframe.js @@ -19,6 +19,9 @@ angular.module('egCoreMod') // called after onload of each new iframe page onchange : '=?', + // called after egFrameEmbedLoader, during link phase + afterload : '@', + // for tweaking height saveSpace : '@', minHeight : '=?', @@ -39,7 +42,10 @@ angular.module('egCoreMod') window.IEMBEDXUL = true; element.find('iframe').on( 'load', - function() {scope.egEmbedFrameLoader(this)} + function() { + scope.egEmbedFrameLoader(this); + if (scope.afterload) this.contentWindow[scope.afterload](); + } ); }, -- 2.11.0