diff --git a/src/Umbraco.Web.UI.Client/docs/src/tutorials/CreatingAPropertyEditor.ngdoc b/src/Umbraco.Web.UI.Client/docs/src/tutorials/CreatingAPropertyEditor.ngdoc index 0eff507559..5130a400d9 100644 --- a/src/Umbraco.Web.UI.Client/docs/src/tutorials/CreatingAPropertyEditor.ngdoc +++ b/src/Umbraco.Web.UI.Client/docs/src/tutorials/CreatingAPropertyEditor.ngdoc @@ -30,10 +30,10 @@ create and modify data. ##Setting up a plugin -The first thing we must do is create a new folder inside `/app_plugins` folder. We will call it +The first thing we must do is create a new folder inside `/App_Plugins` folder. We will call it `MarkDownEditor` -Next We will create a simple manifest file to describe what this plugin does. This manifest will tell Umbraco about our new property editor and allows us to inject any needed files into the application, so we create the file `/app_plugins/MarkDownEditor/package.manifest` +Next We will create a simple manifest file to describe what this plugin does. This manifest will tell Umbraco about our new property editor and allows us to inject any needed files into the application, so we create the file `/App_Plugins/MarkDownEditor/package.manifest` Inside this package manifest we add a bit of json to describe the property editor, have a look at the inline comments in the json below for details on each bit: @@ -111,9 +111,9 @@ Then open the `markdowneditor.controller.js` file and edit it so it looks like t //plugin folder assetsService .load([ - "/app_plugins/markdowneditor/lib/markdown.converter.js", - "/app_plugins/markdowneditor/lib/markdown.sanitizer.js", - "/app_plugins/markdowneditor/lib/markdown.editor.js" + "/App_Plugins/MarkDownEditor/lib/markdown.converter.js", + "/App_Plugins/MarkDownEditor/lib/markdown.sanitizer.js", + "/App_Plugins/MarkDownEditor/lib/markdown.editor.js" ]) .then(function () { //this function will execute when all dependencies have loaded @@ -121,7 +121,7 @@ Then open the `markdowneditor.controller.js` file and edit it so it looks like t }); //load the seperat css for the editor to avoid it blocking our js loading - assetsService.loadCss("/app_plugins/markdowneditor/lib/markdown.css"); + assetsService.loadCss("/App_Plugins/MarkDownEditor/lib/markdown.css"); }); This loads in our external dependency, but only when its needed by the editor. diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index 114a9e9b55..aa14df161c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -52,22 +52,16 @@ function ContentEditController($scope, $routeParams, $location, contentResource, contentEditingHelper.handleSuccessfulSave({ scope: $scope, newContent: data, - rebindCallback: contentEditingHelper.reBindChangedProperties( - contentEditingHelper.getAllProps($scope.content), - contentEditingHelper.getAllProps(data)) + rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data) }); }, function (err) { - var allNewProps = contentEditingHelper.getAllProps(err.data); - var allOrigProps = contentEditingHelper.getAllProps($scope.content); - contentEditingHelper.handleSaveError({ err: err, redirectOnFailure: true, - allNewProps: allNewProps, - allOrigProps: contentEditingHelper.getAllProps($scope.content), - rebindCallback: contentEditingHelper.reBindChangedProperties(allOrigProps, allNewProps) + allNewProps: contentEditingHelper.getAllProps(err.data), + rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, err.data) }); }); }; diff --git a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Package.manifest b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Package.manifest index 4bd8049ca3..d706fc29ae 100644 --- a/src/Umbraco.Web.UI/App_Plugins/MyPackage/Package.manifest +++ b/src/Umbraco.Web.UI/App_Plugins/MyPackage/Package.manifest @@ -4,7 +4,7 @@ id: "0BA0F832-D759-4526-9B3E-94BBFC98F92E", name: "Regex", defaultConfig: { - regexStatement: "^\\d*$" + regex: "^\\d*$" }, editor: { view: "~/App_Plugins/MyPackage/PropertyEditors/Views/RegexEditor.html",