webstaff: wrap serials app directives in ng-if
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 24 Apr 2017 21:30:26 +0000 (17:30 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 30 May 2017 16:06:38 +0000 (12:06 -0400)
This is meant to reduce running initialization code unnecessarily
when a user goes directly to one of the tabs

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/serials/t_manage.tt2

index 61a11ee..326b779 100644 (file)
@@ -8,7 +8,8 @@
       <!-- note that non-numeric index values must be enclosed in single-quotes,
            otherwise selecting the active table won't work cleanly -->
       <uib-tab index="'manage-subscriptions'" heading="[% l('Manage Subscriptions') %]">
-        <eg-subscription-manager bib-id="bib_id"></eg-subscription-manager>
+        <eg-subscription-manager ng-if="active_tab == 'manage-subscriptions'" bib-id="bib_id">
+        </eg-subscription-manager>
       </uib-tab>
       <uib-tab index="'prediction'" heading="[% l('Manage Predictions') %]">
         <p>Frequency TODO</p>