fixed debugging code issues in Admin UI
parent
cac434cc5d
commit
79c7725061
|
@ -100,7 +100,6 @@ app.controller('CombinedEquipmentMeterController', function ($scope, $timeout, $
|
||||||
$scope.pairMeter = function (dragEl, dropEl) {
|
$scope.pairMeter = function (dragEl, dropEl) {
|
||||||
var tem_uuid = angular.element('#' + dragEl);
|
var tem_uuid = angular.element('#' + dragEl);
|
||||||
if (angular.isDefined(tem_uuid.scope().combinedequipmentmeter)) {
|
if (angular.isDefined(tem_uuid.scope().combinedequipmentmeter)) {
|
||||||
console.log("this is a spacemeter");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var modalInstance = $uibModal.open({
|
var modalInstance = $uibModal.open({
|
||||||
|
|
|
@ -254,8 +254,6 @@ app.controller('CombinedEquipmentParameterController', function ($scope, $uibMod
|
||||||
$scope.virtualmeters = [];
|
$scope.virtualmeters = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log($scope.mergedmeters);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getAllPoints = function () {
|
$scope.getAllPoints = function () {
|
||||||
|
|
|
@ -54,7 +54,6 @@ app.controller('CostFileController', function (
|
||||||
|
|
||||||
$scope.restoreCostFile = function (costfile) {
|
$scope.restoreCostFile = function (costfile) {
|
||||||
CostFileService.restoreCostFile(costfile, function (response) {
|
CostFileService.restoreCostFile(costfile, function (response) {
|
||||||
console.log(response);
|
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
toaster.pop({
|
toaster.pop({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -45,7 +45,6 @@ app.controller('EnergyFlowDiagramLinkController', function($scope,$uibModal, $tr
|
||||||
EnergyFlowDiagramNodeService.getNodesByEnergyFlowDiagramID(id, function (response) {
|
EnergyFlowDiagramNodeService.getNodesByEnergyFlowDiagramID(id, function (response) {
|
||||||
if (angular.isDefined(response.status) && response.status === 200) {
|
if (angular.isDefined(response.status) && response.status === 200) {
|
||||||
$scope.energyflowdiagramnodes = response.data;
|
$scope.energyflowdiagramnodes = response.data;
|
||||||
console.log($scope.energyflowdiagramnodes);
|
|
||||||
} else {
|
} else {
|
||||||
$scope.energyflowdiagramnodes = [];
|
$scope.energyflowdiagramnodes = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,6 @@ app.controller('EquipmentMeterController', function($scope,$timeout,$uibModal, $
|
||||||
$scope.pairMeter=function(dragEl,dropEl){
|
$scope.pairMeter=function(dragEl,dropEl){
|
||||||
var tem_uuid = angular.element('#' + dragEl);
|
var tem_uuid = angular.element('#' + dragEl);
|
||||||
if (angular.isDefined(tem_uuid.scope().equipmentmeter)) {
|
if (angular.isDefined(tem_uuid.scope().equipmentmeter)) {
|
||||||
console.log("this is a spacemeter");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var modalInstance = $uibModal.open({
|
var modalInstance = $uibModal.open({
|
||||||
|
|
|
@ -177,12 +177,12 @@ app.controller('EquipmentParameterController', function($scope, $uibModal, $tran
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.colorMeterType=function(type){
|
$scope.colorMeterType = function(type) {
|
||||||
if(type=='meters'){
|
if (type === 'meters') {
|
||||||
return 'btn-primary'
|
return 'btn-primary'
|
||||||
}else if(type=='virtualmeters'){
|
} else if (type === 'virtualmeters') {
|
||||||
return 'btn-info'
|
return 'btn-info'
|
||||||
}else{
|
} else {
|
||||||
return 'btn-success'
|
return 'btn-success'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -255,7 +255,6 @@ app.controller('EquipmentParameterController', function($scope, $uibModal, $tran
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log($scope.mergedmeters);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getAllPoints = function() {
|
$scope.getAllPoints = function() {
|
||||||
|
|
|
@ -209,7 +209,6 @@ app.controller('ModalEditPrivilegeCtrl', function ($scope,
|
||||||
$scope.spaces = [];
|
$scope.spaces = [];
|
||||||
var privilege_data = JSON.parse(params.privilege.data);
|
var privilege_data = JSON.parse(params.privilege.data);
|
||||||
$scope.currentSpaceID = privilege_data['spaces'][0];
|
$scope.currentSpaceID = privilege_data['spaces'][0];
|
||||||
console.log($scope.currentSpaceID)
|
|
||||||
|
|
||||||
$scope.getAllSpaces = function () {
|
$scope.getAllSpaces = function () {
|
||||||
SpaceService.getAllSpaces(function (response) {
|
SpaceService.getAllSpaces(function (response) {
|
||||||
|
|
|
@ -4,8 +4,6 @@ module.directive('hjcDraggable', ['$rootScope', 'uuid', function($rootScope, uui
|
||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
link: function(scope, el, attrs, controller) {
|
link: function(scope, el, attrs, controller) {
|
||||||
//console.log("linking draggable element");
|
|
||||||
|
|
||||||
angular.element(el).attr("draggable", "true");
|
angular.element(el).attr("draggable", "true");
|
||||||
var id = angular.element(el).attr("id");
|
var id = angular.element(el).attr("id");
|
||||||
if (!id) {
|
if (!id) {
|
||||||
|
@ -14,9 +12,7 @@ module.directive('hjcDraggable', ['$rootScope', 'uuid', function($rootScope, uui
|
||||||
}
|
}
|
||||||
|
|
||||||
el.bind("dragstart", function(e) {
|
el.bind("dragstart", function(e) {
|
||||||
//console.log("The dragstart event handler fired, and evt.target = " + e.target);
|
|
||||||
e.dataTransfer.setData('text', id);
|
e.dataTransfer.setData('text', id);
|
||||||
|
|
||||||
$rootScope.$emit("HJC-DRAG-START");
|
$rootScope.$emit("HJC-DRAG-START");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue