Initial commit

This commit is contained in:
Senad Uka
2018-06-11 11:09:35 +02:00
commit ed7df7b11f
1954 changed files with 483354 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
(function () {
global.dashModule
.controller('customersCtrl', ['$scope', customersController])
.directive('customers', [customersDirective]);
function customersDirective() {
return {
restrict: 'E',
templateUrl: 'customers/html/customersTemplate'
};
}
function customersController($scope) {
$scope.isSubmoduleVisible = isSubmoduleVisible;
$scope.setSubModule = setSubModule;
$scope.subModule = global.getParameterByName('subModule') || 'customersView';
addUrlListener();
function addUrlListener() {
window.addEventListener('popstate', function (e) {
$scope.$evalAsync($scope => {
$scope.subModule = e.state ? e.state.subModule : 'customersView';
});
}, false);
}
function setSubModule($event) {
$scope.subModule = $event.currentTarget.attributes.subModule.value;
history.pushState({
subModule: $scope.subModule
}, null, '?subModule=' + $scope.subModule);
}
function isSubmoduleVisible(subModule) {
return subModule === $scope.subModule;
}
}
})();