Merge pull request #2712 from mvanhelmont/U4-11334
U4 11334 Content type edit, click on icon always shows black empty icon
This commit is contained in:
@@ -212,6 +212,8 @@ Use this directive to construct a header inside the main editor window.
|
||||
scope.dialogModel = {
|
||||
view: "iconpicker",
|
||||
show: true,
|
||||
icon: scope.icon.split(' ')[0],
|
||||
color: scope.icon.split(' ')[1],
|
||||
submit: function (model) {
|
||||
|
||||
/* ensure an icon is selected, because on focus on close button
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
}
|
||||
|
||||
.umb-iconpicker-item a:hover,
|
||||
.umb-iconpicker-item a:focus{
|
||||
.umb-iconpicker-item a:focus,
|
||||
.umb-iconpicker-item.-selected {
|
||||
background: @gray-10;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,19 @@
|
||||
function IconPickerOverlay($scope, iconHelper, localizationService) {
|
||||
|
||||
$scope.loading = true;
|
||||
$scope.model.hideSubmitButton = true;
|
||||
$scope.model.hideSubmitButton = false;
|
||||
|
||||
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;
|
||||
@@ -26,6 +34,9 @@ function IconPickerOverlay($scope, iconHelper, localizationService) {
|
||||
$scope.submitForm($scope.model);
|
||||
};
|
||||
|
||||
$scope.changeColor = function (color) {
|
||||
$scope.model.color = color;
|
||||
};
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Overlays.IconPickerOverlay", IconPickerOverlay);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
|
||||
<div class="umb-control-group">
|
||||
<select ng-model="color" class="input-block-level">
|
||||
<select ng-model="color" ng-change="changeColor(color)" class="input-block-level">
|
||||
<option value=""><localize key="colors_black">Black</localize></option>
|
||||
<option value="color-blue-grey"><localize key="colors_bluegrey">Blue Grey</localize></option>
|
||||
<option value="color-grey"><localize key="colors_grey">Grey</localize></option>
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<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-repeat="icon in filtered = (icons | filter: searchTerm) track by $id(icon)">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user