diff --git a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js index 8160dfccea..40d24b3472 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js @@ -75,7 +75,7 @@ function appState($rootScope) { * @function * * @description - * Returns the current global state value by key - we do not return an object here - we do NOT want this + * Returns the current global state value by key - we do not return an object reference here - we do NOT want this * to be publicly mutable and allow setting arbitrary values * */ @@ -203,13 +203,52 @@ angular.module('umbraco.services').factory("editorState", function() { var current = null; var state = { + + /** + * @ngdoc function + * @name umbraco.services.angularHelper#set + * @methodOf umbraco.services.editorState + * @function + * + * @description + * Sets the current entity object for the currently active editor + * This is only used when implementing an editor with a complex model + * like the content editor, where the model is modified by several + * child controllers. + */ set: function (entity) { current = entity; }, + + /** + * @ngdoc function + * @name umbraco.services.angularHelper#reset + * @methodOf umbraco.services.editorState + * @function + * + * @description + * Since the editorstate entity is read-only, you cannot set it to null + * only through the reset() method + */ reset: function() { current = null; } - + + /** + * @ngdoc function + * @name umbraco.services.angularHelper#current + * @methodOf umbraco.services.editorState + * @function + * + * @description + * Returns an object reference to the current editor entity. + * the entity is the root object of the editor. + * EditorState is used by property/parameter editors that need + * access to the entire entity being edited, not just the property/parameter + * + * editorState.current can not be overwritten, you should only read values from it + * since modifying individual properties should be handled by the property editors + */ }; //create a get/set property but don't allow setting diff --git a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js index 004d3128da..fd68af3673 100644 --- a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js +++ b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js @@ -39,7 +39,7 @@ module.exports = function(karma) { 'src/common/mocks/**/*.js', 'src/views/**/*.controller.js', 'test/unit/**/*.spec.js', - {pattern: 'lib/umbraco/namespacemanager.js', watched: true, served: true} + {pattern: 'lib/**/*.js', watched: true, served: true, included: false} ], // list of files to exclude @@ -65,7 +65,7 @@ module.exports = function(karma) { // level of logging // possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG // CLI --log-level debug - logLevel: karma.LOG_DEBUG, + logLevel: karma.LOG_INFO, // enable / disable watching file and executing tests whenever any file changes // CLI --auto-watch --no-auto-watch diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs index 90538bfb33..696aa8534a 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/BrowseRepository.aspx.cs @@ -49,7 +49,7 @@ namespace umbraco.presentation.developer.packages { iframeGen.Text = string.Format( - "", + "", url, repoGuid, category, Request.ServerVariables["SERVER_NAME"], Request.ServerVariables["SERVER_PORT"], IOHelper.ResolveUrl(SystemDirectories.Umbraco), IOHelper.ResolveUrl(SystemDirectories.Umbraco).Trim('/'), repoGuid,