From: Mike Rylander Date: Thu, 25 May 2017 00:37:17 +0000 (-0400) Subject: LP#1708291: teach egEmbedFrame about an afterload function X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b854319e3b3fa55204ba050ebe45c694053cde25;p=working%2FEvergreen.git 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 --- 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](); + } ); },