demo20230512/Browser_Local/js/View.Directive.js

66 lines
2.1 KiB
JavaScript
Raw Permalink Normal View History

2023-05-12 10:20:28 +08:00
/*
Logic Solution
WeeeCarbonFootprint
Template Directive
*/
angular.module('View.Directive', [])
.directive('toolMenu', function (CONSTANTS) {
return {
restrict: 'E',
templateUrl: CONSTANTS.TB + 'tool_menu'
}
})
.directive('loadSimapro', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last) {
$timeout(function () {
scope.$emit('simaproNgRepeatFinished');
});
}
}
}
})
.directive('popout', function (CONSTANTS) {
return {
restrict: 'E',
transclude: true,
replace: true,
templateUrl: CONSTANTS.TB + 'popout'
}
})
.directive('pcr', function(CONSTANTS){
return {
restrict: 'E',
controller: function ($scope) {
},
templateUrl: CONSTANTS.PLOB + 'PCR'
}
})
.directive('listScheduleTable', function (CONSTANTS, SURVEY_TABLE_MODEL) {
return {
restrict: 'E',
templateUrl: CONSTANTS.TB + 'list_table'
}
})
// 自動計算 Normal Company Body Content 的高度,把 Footer 往下擠
// .directive('bodyHeight', function(){
// return {
// controller: function ($scope, $window) {
// $scope.$on('domready', function (e, d) {
// if (d) {
// var d = angular.element('#CarbonFootprint');
// var ph = angular.element('.home_header_wrap');
// var sh = angular.element('.survey_form_header_wrap');
// var ft = angular.element('.copyright_wrap');
// var sb = angular.element('.survey_form_body_wrap');
// var h = $window.innerHeight - ph.height() - (sh.height() + 15 + 3) - (ft.height() + 24) + 72 + 23;
// d.css('min-height', h + 'px');
// }
// });
// }
// }
// })