Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- "use strict";
- 'use strict';
- var app = angular.module('viewCustom', ['angularLoad']);
- /****************************************************************************************************/
- /*In case of CENTRAL_PACKAGE - comment out the below line to replace the other module definition*/
- /*var app = angular.module('centralCustom', ['angularLoad']);*/
- /****************************************************************************************************/
- app.controller('hideHtgController', function() {
- var vm = this;
- vm.item = vm.parentCtrl.item || false;
- vm.available = vm.item.delivery.availability[0] || false;
- vm.insts = vm.item.delivery.almaInstitutionsList || false;
- if (vm.available == "no_inventory" && vm.insts.length == 0) {
- // this code is executed if there is no IZ holding
- // and no other alma institution hodlings reported
- console.log("really not available, hiding howtogetit")
- //vm.item.delivery.GetIt1 = false;
- console.log(vm.item)
- }
- });
- app.component('prmFullViewAfter', {
- bindings: {parentCtrl: '<'},
- controller: 'hideHtgController',
- });
- app.controller('showILLNoHtg', function() {
- var vm = this;
- vm.item = vm.parentCtrl.item || false;
- vm.link = vm.item.delivery.link || false;
- if (vm.item.delivery.GetIt1 == false) {
- vm.show = true;
- } else {
- vm.show = false;
- }
- });
- app.component('prmActionListAfter', {
- bindings: {parentCtrl: '<'},
- controller: 'showILLNoHtg',
- template: `<md-list ng-if="$ctrl.show" layout="column" class="separate-list-items md-primoExplore-theme layout-column" role="list">
- <md-list-item role="listitem" class="_md">
- <button class="neutralized-button layout-full-width layout-display-flex md-button md-ink-ripple md-primoExplore-theme" type="button">
- <div class="in-element-dialog-context layout-row flex" layout="row" flex="">
- <div class="md-list-item-text layout-wrap flex layout-row" layout="row">
- <div flex="" flex-xs="100" layout="column" class="layout-column flex-xs-100 flex">
- <span><a href="#">Request this item via ILL</a></span>
- </div>
- </div>
- </div>
- </button>
- </md-list-item>
- </md-list>`
- });
- })();
Add Comment
Please, Sign In to add comment