show selected icon and set selected color on editing icon

This commit is contained in:
Marcel
2018-06-20 18:59:01 +02:00
parent d30ec335b8
commit 2af5cf97ef
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -15,6 +15,14 @@ function IconPickerOverlay($scope, iconHelper, localizationService) {
$scope.model.title = localizationService.localize("defaultdialogs_selectIcon");
}
if ($scope.model.color) {
$scope.color = $scope.model.color;
}
if ($scope.model.icon) {
$scope.searchTerm = $scope.model.icon;
}
iconHelper.getIcons().then(function(icons) {
$scope.icons = icons;
$scope.loading = false;