diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/create.html b/src/Umbraco.Web.UI.Client/src/views/dictionary/create.html index 5b73df3f86..88a67aaf18 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/create.html @@ -1,19 +1,19 @@ -
+ \ No newline at end of file +
diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js index a3efd9e990..82c4e6e7b5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js @@ -7,38 +7,41 @@ * The controller for creating dictionary items */ function DictionaryCreateController($scope, $location, dictionaryResource, navigationService, notificationsService, formHelper, appState) { + var vm = this; vm.itemKey = ""; + vm.createItem = createItem; + function createItem() { - var node = $scope.currentNode; + if (formHelper.submitForm({ scope: $scope, formCtrl: this.createDictionaryForm })) { - dictionaryResource.create(node.id, vm.itemKey).then(function (data) { - navigationService.hideMenu(); + var node = $scope.currentNode; - // set new item as active in tree - var currPath = node.path ? node.path : "-1"; - navigationService.syncTree({ tree: "dictionary", path: currPath + "," + data, forceReload: true, activate: true }); - - // reset form state - formHelper.resetForm({ scope: $scope }); - - // navigate to edit view - var currentSection = appState.getSectionState("currentSection"); - $location.path("/" + currentSection + "/dictionary/edit/" + data); - - - }, function (err) { - if (err.data && err.data.message) { - notificationsService.error(err.data.message); + dictionaryResource.create(node.id, vm.itemKey).then(function (data) { navigationService.hideMenu(); - } - }); - } - vm.createItem = createItem; + // set new item as active in tree + var currPath = node.path ? node.path : "-1"; + navigationService.syncTree({ tree: "dictionary", path: currPath + "," + data, forceReload: true, activate: true }); + + // reset form state + formHelper.resetForm({ scope: $scope }); + + // navigate to edit view + var currentSection = appState.getSectionState("currentSection"); + $location.path("/" + currentSection + "/dictionary/edit/" + data); + + }, function (err) { + if (err.data && err.data.message) { + notificationsService.error(err.data.message); + navigationService.hideMenu(); + } + }); + } + } } angular.module("umbraco").controller("Umbraco.Editors.Dictionary.CreateController", DictionaryCreateController); diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html b/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html index db0314639c..dfb126cc8e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html @@ -1,4 +1,5 @@ 
+ @@ -12,12 +13,22 @@ - + + + + + There are no dictionary items. + + + + + +
- + @@ -31,7 +42,7 @@
Name {{column.displayName}}
- +
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index f94fd56f18..05098ad7d2 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -444,6 +444,9 @@ Vælg snippet Dette vil slette noden og alle dets sprog. Hvis du kun vil slette et sprog, så afpublicér det i stedet. + + Der er ingen ordbogselementer. + Du tilføjer flere sprog under 'sprog' i menuen til venstre @@ -452,7 +455,7 @@ - Ordbog + Ordbogsoversigt Konfigurerede søgere diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index ae9fac15d1..46ecfe7b51 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -462,6 +462,9 @@ Select snippet This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead. + + There are no dictionary items. + %0%' below
You can add additional languages under the 'languages' in the menu on the left diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 81e1d9971c..572feaa6bb 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -465,6 +465,9 @@ Select snippet This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead. + + There are no dictionary items. + %0%' below
You can add additional languages under the 'languages' in the menu on the left diff --git a/src/Umbraco.Web/Editors/DictionaryController.cs b/src/Umbraco.Web/Editors/DictionaryController.cs index 186b3ac4a4..dde64a440b 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -74,7 +74,7 @@ namespace Umbraco.Web.Editors { if (string.IsNullOrEmpty(key)) return Request - .CreateNotificationValidationErrorResponse("Key can not be empty;"); // TODO: translate + .CreateNotificationValidationErrorResponse("Key can not be empty."); // TODO: translate if (Services.LocalizationService.DictionaryItemExists(key)) {