couple missing semi colons
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
angular.module("umbraco")
|
||||
.controller("Umbraco.PropertyEditors.TagsController",
|
||||
function ($rootScope, $scope, $log, assetsService) {
|
||||
|
||||
//load current value
|
||||
$scope.currentTags = [];
|
||||
if($scope.model.value){
|
||||
$scope.currentTags = $scope.model.value.split(",");
|
||||
}
|
||||
|
||||
$scope.addTag = function(e){
|
||||
var code = e.keyCode || e.which;
|
||||
if(code == 13) { //Enter keycode
|
||||
if($scope.currentTags.indexOf($scope.tagToAdd) < 0){
|
||||
$scope.currentTags.push($scope.tagToAdd);
|
||||
}
|
||||
$scope.tagToAdd = "";
|
||||
}
|
||||
}
|
||||
//load current value
|
||||
$scope.currentTags = [];
|
||||
if ($scope.model.value) {
|
||||
$scope.currentTags = $scope.model.value.split(",");
|
||||
}
|
||||
|
||||
$scope.removeTag = function(tag){
|
||||
var i = $scope.currentTags.indexOf(tag);
|
||||
if(i >= 0){
|
||||
$scope.currentTags.splice(i,1);
|
||||
}
|
||||
}
|
||||
|
||||
//sync model on submit (needed since we convert an array to string)
|
||||
$scope.$on("formSubmitting", function (ev, args) {
|
||||
$scope.model.value = $scope.currentTags.join();
|
||||
});
|
||||
$scope.addTag = function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code == 13) { //Enter keycode
|
||||
if ($scope.currentTags.indexOf($scope.tagToAdd) < 0) {
|
||||
$scope.currentTags.push($scope.tagToAdd);
|
||||
}
|
||||
$scope.tagToAdd = "";
|
||||
}
|
||||
};
|
||||
|
||||
//vice versa
|
||||
$scope.model.onValueChanged = function (newVal, oldVal) {
|
||||
//update the display val again if it has changed from the server
|
||||
$scope.model.val = newVal;
|
||||
$scope.currentTags = $scope.model.value.split(",");
|
||||
};
|
||||
$scope.removeTag = function (tag) {
|
||||
var i = $scope.currentTags.indexOf(tag);
|
||||
if (i >= 0) {
|
||||
$scope.currentTags.splice(i, 1);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
//sync model on submit (needed since we convert an array to string)
|
||||
$scope.$on("formSubmitting", function (ev, args) {
|
||||
$scope.model.value = $scope.currentTags.join();
|
||||
});
|
||||
|
||||
//vice versa
|
||||
$scope.model.onValueChanged = function (newVal, oldVal) {
|
||||
//update the display val again if it has changed from the server
|
||||
$scope.model.val = newVal;
|
||||
$scope.currentTags = $scope.model.value.split(",");
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user