Removes 'propertyeditors' package folder from UI.Client project
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<div ng-controller="uComponents.Editors.MNTPController" class="span8">
|
||||
<ul class="nav nav-stacked">
|
||||
<li ng-repeat="node in renderModel">
|
||||
<a href="#" prevent-default ng-click="remove($index)">
|
||||
<i class="icon icon-remove red hover-show pull-right"></i>
|
||||
<i class="{{node.icon}}"></i>
|
||||
{{node.name}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#" ng-click="openContentPicker()" prevent-default>
|
||||
<i class="icon icon-plus"></i> Select
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,58 +0,0 @@
|
||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
angular.module('umbraco')
|
||||
.controller("uComponents.Editors.MNTPController",
|
||||
|
||||
function($scope, dialogService, entityResource, $log, iconHelper){
|
||||
$scope.ids = $scope.model.value.split(',');
|
||||
$scope.renderModel = [];
|
||||
$scope.multipicker = $scope.model.config.multi === "True";
|
||||
|
||||
entityResource.getByIds($scope.ids).then(function(data){
|
||||
$(data).each(function(i, item){
|
||||
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
||||
$scope.renderModel.push({name: item.name, id: item.id, icon: item.icon});
|
||||
});
|
||||
});
|
||||
|
||||
$scope.openContentPicker =function(){
|
||||
var d = dialogService.contentPicker({scope: $scope, multipicker: $scope.multipicker, callback: populate});
|
||||
};
|
||||
|
||||
$scope.remove =function(index){
|
||||
$scope.renderModel.splice(index, 1);
|
||||
$scope.ids.splice(index, 1);
|
||||
$scope.model.value = trim($scope.ids.join(), ",");
|
||||
};
|
||||
|
||||
$scope.add =function(item){
|
||||
if($scope.ids.indexOf(item.id) < 0){
|
||||
item.icon = iconHelper.convertFromLegacyIcon(item.icon);
|
||||
$scope.renderModel.push({name: item.name, id: item.id, icon: item.icon});
|
||||
$scope.ids.push(item.id);
|
||||
$scope.model.value = trim($scope.ids.join(), ",");
|
||||
}
|
||||
};
|
||||
|
||||
$scope.clear = function(){
|
||||
$scope.ids = [];
|
||||
$scope.model.value = "";
|
||||
$scope.renderModel = [];
|
||||
}
|
||||
|
||||
function trim(str, chr) {
|
||||
var rgxtrim = (!chr) ? new RegExp('^\\s+|\\s+$', 'g') : new RegExp('^'+chr+'+|'+chr+'+$', 'g');
|
||||
return str.replace(rgxtrim, '');
|
||||
}
|
||||
|
||||
function populate(data){
|
||||
if(data.selection && angular.isArray(data.selection)){
|
||||
$(data.selection).each(function(i, item){
|
||||
$scope.add(item);
|
||||
});
|
||||
}else{
|
||||
$scope.clear();
|
||||
$scope.add(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
propertyEditors: [
|
||||
{
|
||||
alias: "MyPackage.Boolean",
|
||||
name: "Boolean",
|
||||
editor: {
|
||||
view: "~/Umbraco/views/propertyeditors/boolean/boolean.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
,
|
||||
javascript: [
|
||||
'~/App_Plugins/propertyeditors/relatedlinks/relatedlinks.js',
|
||||
'~/App_Plugins/propertyeditors/mntp/mntp.js'
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{{model | json}}
|
||||
Reference in New Issue
Block a user