From: Bill Erickson Date: Wed, 16 Jul 2014 18:25:10 +0000 (-0400) Subject: catalog record / html view X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7a68ae1289ca72f71340f76484f66e2043d36c00;p=working%2FEvergreen.git catalog record / html view Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/cat/catalog/index.tt2 b/Open-ILS/src/templates/staff/cat/catalog/index.tt2 index 61e4862ff1..9a207d8e1c 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/index.tt2 @@ -1,11 +1,12 @@ [% WRAPPER "staff/base.tt2"; - ctx.page_title = l("Record Buckets"); + ctx.page_title = l("Catalog"); ctx.page_app = "egCatalogApp"; %] [% BLOCK APP_JS %] + [% END %] diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 new file mode 100644 index 0000000000..a21e45c07c --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/catalog/t_catalog.tt2 @@ -0,0 +1,36 @@ + +
+
+
+ [% l('Catalog') %] +
+
+ +
+ +
+ +
+ +
+ +
+ +
+
+ diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 99ce5f7d83..e9bd6e0331 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -12,7 +12,13 @@ angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','egCoreMod']) ['egStartup', function(egStartup) {return egStartup.go()}]} $routeProvider.when('/cat/catalog/index', { - template: '', + templateUrl: './cat/catalog/t_catalog', + controller: 'CatalogCtrl', + resolve : resolver + }); + + $routeProvider.when('/cat/catalog/record/:record_id', { + templateUrl: './cat/catalog/t_catalog', controller: 'CatalogCtrl', resolve : resolver }); @@ -30,8 +36,33 @@ function($scope , $routeParams , $location , egCore) { // TODO: is start path configurable in the xul client? var url = $location.absUrl().replace(/\/staff.*/, '/opac/advanced'); + if ($routeParams.record_id) { + $scope.record_id = $routeParams.record_id; + url = url.replace(/advanced/, '/record/' + $scope.record_id); + } + // pass the reg URL into the scope, thus into the $scope.catalog_url = url; + // default to catalog view of the record page + $scope.record_tab = 'catalog'; + + $scope.set_record_tab = function(tab) { + $scope.record_tab = tab; + } + + $scope.handle_page = function(url) { + var match = url.match(/\/+opac\/+record\/+(\d+)/); + if (match) { + $scope.record_id = match[1]; + console.debug('loading record ' + $scope.record_id); + + // force the record_id to show up in the page. + // not sure why a $digest isn't occuring here. + try { $scope.$apply() } catch(E) {} + } else { + delete $scope.record_id; + } + } $scope.handlers = {}; }]) diff --git a/Open-ILS/web/js/ui/default/staff/services/eframe.js b/Open-ILS/web/js/ui/default/staff/services/eframe.js index fa5207ec20..fbbf88626d 100644 --- a/Open-ILS/web/js/ui/default/staff/services/eframe.js +++ b/Open-ILS/web/js/ui/default/staff/services/eframe.js @@ -13,7 +13,10 @@ angular.module('egCoreMod') // optional hash of functions which augment or override // the stock xulG functions defined below. - handlers : '=' + handlers : '=', + + // called after onload of each new iframe page + onchange : '=' }, template : '