webstaff: Phys Char Wiz : launcher link
authorBill Erickson <berickxx@gmail.com>
Mon, 7 Sep 2015 15:51:39 +0000 (11:51 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:21 +0000 (15:44 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js
Open-ILS/web/js/ui/default/staff/cat/services/tagtable.js

index d081f0c..40235c9 100644 (file)
@@ -436,8 +436,27 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                       'on-keydown="onKeydown" '+
                       'id="r{{field.record.subfield(\'901\',\'c\')[1]}}f{{field.position}}data"'+
                       '/></span>'+
+                      // TODO: move to TT2 template
+                      '<button class="btn btn-info btn-xs" '+
+                      'aria-label="Physical Characteristics Wizard" '+
+                      'ng-show="showPhysCharLink()"'+
+                      'ng-click="spawnPhysCharWizard()"'+
+                      '>'+
+                      '<span class="glyphicon glyphicon-link"></span>'+
+                      '</button>'+
                   '</div>',
-        scope: { field: "=", onKeydown: '=' }
+        scope: { field: "=", onKeydown: '=' },
+        controller : ['$scope','$modal',
+            function ( $scope,  $modal ) {
+                $scope.showPhysCharLink = function () {
+                    return ($scope.$parent.$parent.record_type == 'bre') 
+                        && $scope.field.tag == '007';
+                }
+                $scope.spawnPhysCharWizard = function() {
+                    console.log('HERE');
+                }
+            }
+        ]
     }
 })
 
index 932794e..de64a13 100644 (file)
@@ -534,7 +534,7 @@ function($q,   egCore,   egAuth) {
     // Fetches + caches the config.marc21_physical_characteristic_value_map
     // for the requested ptype_subfield (subfield_map.id).  
     // Maps are ordered by value.
-    serivice.getPhysCharValueMap = function(ptype_subfield) {
+    service.getPhysCharValueMap = function(ptype_subfield) {
         if (service.phys_char_value_map[ptype_subfield]) {
             return $q.when(service.phys_char_value_map[ptype_subfield]);
         }