webstaff: Browser client: integrate address alert HTML UI
authorBill Erickson <berickxx@gmail.com>
Wed, 15 Jul 2015 02:04:39 +0000 (22:04 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:52 +0000 (14:58 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/admin/actor/index.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/admin/actor/app.js [new file with mode: 0644]

diff --git a/Open-ILS/src/templates/staff/admin/actor/index.tt2 b/Open-ILS/src/templates/staff/admin/actor/index.tt2
new file mode 100644 (file)
index 0000000..5a3ba07
--- /dev/null
@@ -0,0 +1,14 @@
+[%
+  WRAPPER "staff/base.tt2";
+  ctx.page_title = l("Evergreen Configuration"); 
+  ctx.page_app = "egAdminActor";
+%]
+
+[% BLOCK APP_JS %]
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/eframe.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/admin/actor/app.js"></script>
+[% END %]
+
+<div ng-view></div>
+
+[% END %]
diff --git a/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 b/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2
new file mode 100644 (file)
index 0000000..c84c9e2
--- /dev/null
@@ -0,0 +1 @@
+<eg-embed-frame url="address_alert_url" handlers="funcs"></eg-embed-frame>
diff --git a/Open-ILS/web/js/ui/default/staff/admin/actor/app.js b/Open-ILS/web/js/ui/default/staff/admin/actor/app.js
new file mode 100644 (file)
index 0000000..94ac8e5
--- /dev/null
@@ -0,0 +1,50 @@
+/**
+ * App to drive the base page. 
+ * Login Form
+ * Splash Page
+ */
+
+angular.module('egAdminActor',
+    ['ngRoute', 'ui.bootstrap', 'egCoreMod','egUiMod'])
+
+.config(['$routeProvider','$locationProvider','$compileProvider', 
+ function($routeProvider , $locationProvider , $compileProvider) {
+
+    $locationProvider.html5Mode(true);
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    var resolver = {delay : function(egStartup) {return egStartup.go()}};
+
+    $routeProvider.when('/admin/actor/address_alert', {
+        templateUrl: './admin/actor/t_address_alert',
+        controller: 'AddressAlertCtl',
+        resolve : resolver
+    });
+
+    // default page 
+    /*
+    $routeProvider.otherwise({
+        templateUrl : 'user-perms-template',
+        controller: 'UserPermsCtrl',
+        resolve : resolver
+    });
+    */
+}])
+
+.controller('AddressAlertCtl',
+       ['$scope','$routeParams','$window','$location','egCore',
+function($scope , $routeParams , $window , $location , egCore) {
+
+    console.log('addr alert');
+    
+    $scope.funcs = {
+        ses : egCore.auth.token(),
+    }
+
+    // have to use the full URL, not just the path, to ensure
+    // the embeded page is not a nested version of this page (ad infinitum)
+    $scope.address_alert_url = $location.absUrl().replace(
+        /\/eg\/staff.*/, '/eg/conify/global/actor/address_alert');
+
+    console.log($scope.address_alert_url);
+
+}])