--- /dev/null
+<html>
+ <body>
+ <div style="width:100%; padding: 20px; text-align:center">
+ [% l('Loading...') %]
+ <img src="[% ctx.media_prefix %]/images/progressbar_green.gif"
+ title="[% l('Page Loading') %]"/>
+ </div>
+ </body>
+</html>
<div class="eg-embed-frame">
<button type="button" class="btn btn-default btn-xs" ng-show="allowEscape && showIframe" ng-click="escapeEmbed()">[% l('Open in New Window') %]</button>
<button type="button" class="btn btn-default btn-xs" ng-show="allowEscape && !showIframe" ng-click="restoreEmbed()">[% l('Re-embed') %]</button>
- <!-- height is calculated at render time -->
+ <!--
+ 'src' is replaced by the controller, after linking, and as soon as a
+ value is available. height is calculated at render time.
+ -->
<iframe
ng-show="showIframe"
ng-attr-style="{{ autoresize ? undefined : 'height:' + height + 'px' }}"
- src="{{url}}">
+ src="/eg/staff/loading">
</iframe>
</div>
var page = $scope.iframe.contentWindow.location.href;
console.debug('egEmbedFrameLoader(): ' + page);
+ if (page.match(/eg\/staff\/loading$/)) { // loading page
+
+ // If we have a startup-time URL, apply it now.
+ if ($scope.url) {
+ console.debug('Applying initial URL: ' + $scope.url);
+ iframe.contentWindow.location.href = $scope.url;
+ }
+
+ // Watch for future URL changes
+ $scope.$watch('url', function(newVal, oldVal) {
+ if (newVal && newVal != oldVal) {
+ iframe.contentWindow.location.href = newVal;
+ }
+ });
+
+ // Nothing more is needed until the iframe is
+ // loaded once more with a real URL.
+ return;
+ }
+
// reload ifram page w/o reloading the entire UI
$scope.reload = function() {
$scope.iframe.contentWindow.location.replace(