From ead8f829d65a461ec1c74365fe9748b8e5a0dca1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 14 Jul 2015 22:04:39 -0400 Subject: [PATCH] webstaff: Browser client: integrate address alert HTML UI Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/admin/actor/index.tt2 | 14 ++++++ .../staff/admin/actor/t_address_alert.tt2 | 1 + .../web/js/ui/default/staff/admin/actor/app.js | 50 ++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 Open-ILS/src/templates/staff/admin/actor/index.tt2 create mode 100644 Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 create mode 100644 Open-ILS/web/js/ui/default/staff/admin/actor/app.js 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 index 0000000000..5a3ba07458 --- /dev/null +++ b/Open-ILS/src/templates/staff/admin/actor/index.tt2 @@ -0,0 +1,14 @@ +[% + WRAPPER "staff/base.tt2"; + ctx.page_title = l("Evergreen Configuration"); + ctx.page_app = "egAdminActor"; +%] + +[% BLOCK APP_JS %] + + +[% END %] + +
+ +[% 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 index 0000000000..c84c9e24aa --- /dev/null +++ b/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 @@ -0,0 +1 @@ + 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 index 0000000000..94ac8e5114 --- /dev/null +++ b/Open-ILS/web/js/ui/default/staff/admin/actor/app.js @@ -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); + +}]) -- 2.11.0