remove icon picker overlay

This commit is contained in:
Mads Rasmussen
2018-08-21 15:23:54 +02:00
parent 564eb0f059
commit f35c1866b9
2 changed files with 0 additions and 118 deletions

View File

@@ -1,78 +0,0 @@
/**
* @ngdoc controller
* @name Umbraco.Editors.DocumentType.PropertyController
* @function
*
* @description
* The controller for the content type editor property dialog
*/
function IconPickerOverlay($scope, iconHelper, localizationService) {
$scope.loading = true;
$scope.model.hideSubmitButton = false;
$scope.colors = [
{ name: "Black", value: "color-black" },
{ name: "Blue Grey", value: "color-blue-grey" },
{ name: "Grey", value: "color-grey" },
{ name: "Brown", value: "color-brown" },
{ name: "Blue", value: "color-blue" },
{ name: "Light Blue", value: "color-light-blue" },
{ name: "Indigo", value: "color-indigo" },
{ name: "Purple", value: "color-purple" },
{ name: "Deep Purple", value: "color-deep-purple" },
{ name: "Cyan", value: "color-cyan" },
{ name: "Green", value: "color-green" },
{ name: "Light Green", value: "color-light-green" },
{ name: "Lime", value: "color-lime" },
{ name: "Yellow", value: "color-yellow" },
{ name: "Amber", value: "color-amber" },
{ name: "Orange", value: "color-orange" },
{ name: "Deep Orange", value: "color-deep-orange" },
{ name: "Red", value: "color-red" },
{ name: "Pink", value: "color-pink" }
];
if (!$scope.color) {
// Set default selected color to black
$scope.color = $scope.colors[0].value;
};
if (!$scope.model.title) {
$scope.model.title = localizationService.localize("defaultdialogs_selectIcon");
};
if ($scope.model.color) {
$scope.color = $scope.model.color;
};
if ($scope.model.icon) {
$scope.icon = $scope.model.icon;
};
iconHelper.getIcons().then(function (icons) {
$scope.icons = icons;
$scope.loading = false;
});
$scope.selectIcon = function (icon, color) {
$scope.model.icon = icon;
$scope.model.color = color;
$scope.submitForm($scope.model);
};
var unsubscribe = $scope.$on("formSubmitting",
function () {
if ($scope.color) {
$scope.model.color = $scope.color;
}
});
//when the scope is destroyed we need to unsubscribe
$scope.$on("$destroy",
function () {
unsubscribe();
});
}
angular.module("umbraco").controller("Umbraco.Overlays.IconPickerOverlay", IconPickerOverlay);

View File

@@ -1,40 +0,0 @@
<div ng-controller="Umbraco.Overlays.IconPickerOverlay">
<div class="umb-control-group">
<div class="form-search">
<i class="icon-search"></i>
<input type="text"
style="width: 100%"
ng-model="searchTerm"
class="umb-search-field search-query input-block-level"
localize="placeholder"
placeholder="@placeholders_filter"
umb-auto-focus
no-dirty-check />
</div>
</div>
<div class="umb-control-group">
<umb-color-swatches colors="colors" selected-color="color" size="s"></umb-color-swatches>
</div>
<umb-load-indicator ng-if="loading"></umb-load-indicator>
<div class="umb-control-group" ng-show="!loading && filtered.length > 0 ">
<ul class="umb-iconpicker" ng-class="color" ng-show="icons">
<li class="umb-iconpicker-item" ng-class="{'-selected': icon == model.icon}" ng-repeat="icon in filtered = (icons | filter: searchTerm) track by $id(icon)">
<a href="#" title="{{icon}}" ng-click="selectIcon(icon, color)" prevent-default>
<i class="{{icon}} large"></i>
</a>
</li>
</ul>
</div>
<umb-empty-state
ng-if="filtered.length === 0"
position="center">
<localize key="defaultdialogs_noIconsFound">No icons were found.</localize>
</umb-empty-state>
</div>