webstaff: use ng-show rather than ng-if for showIframe
authorGalen Charlton <gmc@esilibrary.com>
Wed, 30 Nov 2016 10:54:22 +0000 (05:54 -0500)
committerKathy Lussier <klussier@masslnc.org>
Mon, 9 Jan 2017 15:59:00 +0000 (10:59 -0500)
This avoids an issue with ng-if creating a separate
scope.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/share/t_eframe.tt2
Open-ILS/web/js/ui/default/staff/services/eframe.js

index 0c9d72d..8bb274d 100644 (file)
@@ -3,7 +3,7 @@
   <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 -->
   <iframe 
-    ng-if="showIframe"
+    ng-show="showIframe"
     ng-attr-style="{{ autoresize ? undefined : 'height:' + height + 'px' }}"
     src="{{url}}">
   </iframe>
index 9bd6e3d..e87b0ba 100644 (file)
@@ -280,6 +280,7 @@ angular.module('egCoreMod')
             }
             $scope.restoreEmbed = function() {
                 $scope.showIframe = true;
+                $scope.reload();
             }
         }]
     }