| Param | -Type | -Details | -
|---|---|---|
| model.multiPicker | -Boolean | -Pick one or multiple items | -
| Returns | -Type | -Details | -
|---|---|---|
| model.selection | -Array | -Array of content objects | -
| Returns | -Type | -Details | -
|---|---|---|
| model.icon | -String | -The icon class | -
| Param | -Type | -Details | -
|---|---|---|
| model.dialogData | -Object | -Object which contains array of allowedMacros. Set to null to allow all. |
-
| Returns | -Type | -Details | -
|---|---|---|
| model.macroParams | -Array | -Array of macro params | -
| model.selectedMacro | -Object | -The selected macro | -
| Param | -Type | -Details | -
|---|---|---|
| model.multiPicker | -Boolean | -Pick one or multiple items | -
| model.onlyImages | -Boolean | -Only display files that have an image file-extension | -
| model.disableFolderSelect | -Boolean | -Disable folder selection | -
| Returns | -Type | -Details | -
|---|---|---|
| model.selectedImages | -Array | -Array of selected images | -
| Param | -Type | -Details | -
|---|---|---|
| model.multiPicker | -Boolean | -Pick one or multiple items | -
| Returns | -Type | -Details | -
|---|---|---|
| model.selectedMemberGroup | -String | -The selected member group | -
| model.selectedMemberGroups (multiPicker) | -Array | -The selected member groups | -
| Param | -Type | -Details | -
|---|---|---|
| model.multiPicker | -Boolean | -Pick one or multiple items | -
| Returns | -Type | -Details | -
|---|---|---|
| model.selection | -Array | -Array of selected members/td> - |
+ * relationTypeResource.getById(1234)
+ * .then(function() {
+ * alert('Found it!');
+ * });
+ *
+ *
+ * @param {Int} id of the relation type to get.
+ * @returns {Promise} resourcePromise containing relation type data.
+ */
+ getById: function (id) {
+ return umbRequestHelper.resourcePromise(
+ $http.get(umbRequestHelper.getApiUrl("relationTypeApiBaseUrl", "GetById", [{ id: id }])),
+ "Failed to get item " + id
+ );
+ },
+
+ /**
+ * @ngdoc method
+ * @name umbraco.resources.relationTypeResource#getRelationObjectTypes
+ * @methodOf umbraco.resources.relationTypeResource
+ *
+ * @description
+ * Gets a list of Umbraco object types which can be associated with a relation.
+ *
+ * @returns {Object} A collection of Umbraco object types.
+ */
+ getRelationObjectTypes: function() {
+ return umbRequestHelper.resourcePromise(
+ $http.get(
+ umbRequestHelper.getApiUrl("relationTypeApiBaseUrl", "GetRelationObjectTypes")
+ ),
+ "Failed to get object types"
+ );
+ },
+
+ /**
+ * @ngdoc method
+ * @name umbraco.resources.relationTypeResource#save
+ * @methodOf umbraco.resources.relationTypeResource
+ *
+ * @description
+ * Updates a relation type.
+ *
+ * @param {Object} relationType The relation type object to update.
+ * @returns {Promise} A resourcePromise object.
+ */
+ save: function (relationType) {
+ var saveModel = umbDataFormatter.formatRelationTypePostData(relationType);
+
+ return umbRequestHelper.resourcePromise(
+ $http.post(umbRequestHelper.getApiUrl("relationTypeApiBaseUrl", "PostSave"), saveModel),
+ "Failed to save data for relation type ID" + relationType.id
+ );
+ },
+
+ /**
+ * @ngdoc method
+ * @name umbraco.resources.relationTypeResource#create
+ * @methodOf umbraco.resources.relationTypeResource
+ *
+ * @description
+ * Creates a new relation type.
+ *
+ * @param {Object} relationType The relation type object to create.
+ * @returns {Promise} A resourcePromise object.
+ */
+ create: function (relationType) {
+ var createModel = umbDataFormatter.formatRelationTypePostData(relationType);
+
+ return umbRequestHelper.resourcePromise(
+ $http.post(umbRequestHelper.getApiUrl("relationTypeApiBaseUrl", "PostCreate"), createModel),
+ "Failed to create new realtion"
+ );
+ },
+
+ /**
+ * @ngdoc method
+ * @name umbraco.resources.relationTypeResource#deleteById
+ * @methodOf umbraco.resources.relationTypeResource
+ *
+ * @description
+ * Deletes a relation type with a given ID.
+ *
+ * * ## Usage
+ *
+ * relationTypeResource.deleteById(1234).then(function() {
+ * alert('Deleted it!');
+ * });
+ *
+ *
+ * @param {Int} id The ID of the relation type to delete.
+ * @returns {Promose} resourcePromise object.
+ */
+ deleteById: function (id) {
+ return umbRequestHelper.resourcePromise(
+ $http.post(umbRequestHelper.getApiUrl("relationTypeApiBaseUrl", "DeleteById", [{ id: id }])),
+ "Failed to delete item " + id
+ );
+ }
+
+ };
+}
+
+angular.module("umbraco.resources").factory("relationTypeResource", relationTypeResource);
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
index 449470f54c..0dbd27b7a5 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
@@ -4,6 +4,76 @@
*
* @description
* Added in Umbraco 8.0. Application-wide service for handling infinite editing.
+ *
+ *
+++ ++ + + ++
+ (function () {
+
+ "use strict";
+
+ function Controller() {
+
+ var vm = this;
+
+ vm.open = open;
+
+ function open() {
+ var mediaPickerOptions = {
+ multiPicker: true,
+ submit: function(model) {
+ editorService.close();
+ },
+ close: function() {
+ editorService.close();
+ }
+ }
+ editorService.mediaPicker(mediaPickerOptions);
+ };
+ }
+
+ angular.module("umbraco").controller("My.Controller", Controller);
+ })();
+
+
+
+ (function () {
+
+ "use strict";
+
+ function Controller() {
+
+ var vm = this;
+
+ vm.open = open;
+
+ function open() {
+ var options = {
+ view: "path/to/view.html"
+ submit: function(model) {
+ editorService.close();
+ },
+ close: function() {
+ editorService.close();
+ }
+ }
+ editorService.open(options);
+ };
+ }
+
+ angular.module("umbraco").controller("My.Controller", Controller);
+ })();
+
*/
(function () {
"use strict";
@@ -43,6 +113,10 @@
*
* @description
* Method to open a new editor in infinite editing
+ *
+ * @param {Object} editor rendering options
+ * @param {String} editor.view Path to view
+ * @param {String} editor.size Sets the size of the editor ("Small"). If nothing is set it will use full width.
*/
function open(editor) {
@@ -98,7 +172,7 @@
editor: null
};
- eventsService.emit("appState.editors.closeAll", args);
+ eventsService.emit("appState.editors.close", args);
}
/**
@@ -108,8 +182,12 @@
*
* @description
* Opens a media editor in infinite editing, the submit callback returns the updated content item
+ * @param {Object} editor rendering options
* @param {String} editor.id The id of the content item
* @param {Boolean} editor.create Create new content item
+ * @param {Function} editor.submit Callback function when the publish and close button is clicked. Returns the editor model object
+ * @param {Function} editor.close Callback function when the close button is clicked.
+ *
* @returns {Object} editor object
*/
function contentEditor(editor) {
@@ -124,6 +202,12 @@
*
* @description
* Opens a content picker in infinite editing, the submit callback returns an array of selected items
+ *
+ * @param {Object} editor rendering options
+ * @param {Boolean} editor.multiPicker Pick one or multiple items
+ * @param {Function} editor.submit Callback function when the submit button is clicked. Returns the editor model object
+ * @param {Function} editor.close Callback function when the close button is clicked.
+ *
* @returns {Object} editor object
*/
function contentPicker(editor) {
@@ -218,11 +302,13 @@
*
* @description
* Opens an embed editor in infinite editing.
+ * @param {Object} editor rendering options
+ * @param {String} editor.icon The icon class
+ * @param {String} editor.color The color class
* @param {Callback} editor.submit Saves, submits, and closes the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
*/
-
function linkPicker(editor) {
editor.view = "views/common/infiniteeditors/linkpicker/linkpicker.html";
editor.size = "small";
@@ -236,6 +322,7 @@
*
* @description
* Opens a media editor in infinite editing, the submit callback returns the updated media item
+ * @param {Object} editor rendering options
* @param {String} editor.id The id of the media item
* @param {Boolean} editor.create Create new media item
* @param {Callback} editor.submit Saves, submits, and closes the editor
@@ -254,6 +341,7 @@
*
* @description
* Opens a media picker in infinite editing, the submit callback returns an array of selected media items
+ * @param {Object} editor rendering options
* @param {Boolean} editor.multiPicker Pick one or multiple items
* @param {Boolean} editor.onlyImages Only display files that have an image file-extension
* @param {Boolean} editor.disableFolderSelect Disable folder selection
@@ -276,6 +364,7 @@
*
* @description
* Opens an icon picker in infinite editing, the submit callback returns the selected icon
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -293,6 +382,7 @@
*
* @description
* Opens the document type editor in infinite editing, the submit callback returns the saved document type
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -309,6 +399,7 @@
*
* @description
* Opens the media type editor in infinite editing, the submit callback returns the saved media type
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -318,24 +409,75 @@
open(editor);
}
+ /**
+ * @ngdoc method
+ * @name umbraco.services.editorService#queryBuilder
+ * @methodOf umbraco.services.editorService
+ *
+ * @description
+ * Opens the query builder in infinite editing, the submit callback returns the generted query
+ * @param {Object} editor rendering options
+ * @param {Callback} editor.submit Submits the editor
+ * @param {Callback} editor.close Closes the editor
+ * @returns {Object} editor object
+ */
function queryBuilder(editor) {
editor.view = "views/common/infiniteeditors/querybuilder/querybuilder.html";
editor.size = "small";
open(editor);
}
+ /**
+ * @ngdoc method
+ * @name umbraco.services.editorService#treePicker
+ * @methodOf umbraco.services.editorService
+ *
+ * @description
+ * Opens the query builder in infinite editing, the submit callback returns the generted query
+ * @param {Object} editor rendering options
+ * @param {String} options.section tree section to display
+ * @param {String} options.treeAlias specific tree to display
+ * @param {Boolean} options.multiPicker should the tree pick one or multiple items before returning
+ * @param {Callback} editor.submit Submits the editor
+ * @param {Callback} editor.close Closes the editor
+ * @returns {Object} editor object
+ */
function treePicker(editor) {
editor.view = "views/common/infiniteeditors/treepicker/treepicker.html";
editor.size = "small";
open(editor);
}
+ /**
+ * @ngdoc method
+ * @name umbraco.services.editorService#nodePermissions
+ * @methodOf umbraco.services.editorService
+ *
+ * @description
+ * Opens the an editor to set node permissions.
+ * @param {Object} editor rendering options
+ * @param {Callback} editor.submit Submits the editor
+ * @param {Callback} editor.close Closes the editor
+ * @returns {Object} editor object
+ */
function nodePermissions(editor) {
editor.view = "views/common/infiniteeditors/nodepermissions/nodepermissions.html";
editor.size = "small";
open(editor);
}
+ /**
+ * @ngdoc method
+ * @name umbraco.services.editorService#insertCodeSnippet
+ * @methodOf umbraco.services.editorService
+ *
+ * @description
+ * Open an editor to insert code snippets into the code editor
+ * @param {Object} editor rendering options
+ * @param {Callback} editor.submit Submits the editor
+ * @param {Callback} editor.close Closes the editor
+ * @returns {Object} editor object
+ */
function insertCodeSnippet(editor) {
editor.view = "views/common/infiniteeditors/insertcodesnippet/insertcodesnippet.html";
editor.size = "small";
@@ -349,6 +491,7 @@
*
* @description
* Opens the user group picker in infinite editing, the submit callback returns an array of the selected user groups
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -366,6 +509,7 @@
*
* @description
* Opens the user group picker in infinite editing, the submit callback returns the saved template
+ * @param {Object} editor rendering options
* @param {String} editor.id The template id
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
@@ -382,7 +526,8 @@
* @methodOf umbraco.services.editorService
*
* @description
- * Opens the section picker in infinite editing, the submit callback returns an array of the selected sections
+ * Opens the section picker in infinite editing, the submit callback returns an array of the selected sections¨
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -400,6 +545,7 @@
*
* @description
* Opens the insert field editor in infinite editing, the submit callback returns the code snippet
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -417,6 +563,7 @@
*
* @description
* Opens the template sections editor in infinite editing, the submit callback returns the type to insert
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -429,11 +576,12 @@
/**
* @ngdoc method
- * @name umbraco.services.editorService#sectionPicker
+ * @name umbraco.services.editorService#userPicker
* @methodOf umbraco.services.editorService
*
* @description
* Opens the section picker in infinite editing, the submit callback returns an array of the selected users
+ * @param {Object} editor rendering options
* @param {Callback} editor.submit Submits the editor
* @param {Callback} editor.close Closes the editor
* @returns {Object} editor object
@@ -452,6 +600,7 @@
* @description
* Opens the section picker in infinite editing, the submit callback returns an array of the selected items
*
+ * @param {Object} editor rendering options
* @param {Array} editor.availableItems Array of available items.
* @param {Array} editor.selectedItems Array of selected items. When passed in the selected items will be filtered from the available items.
* @param {Boolean} editor.filter Set to false to hide the filter.
@@ -485,12 +634,14 @@
/**
* @ngdoc method
- * @name umbraco.services.editorService#macroPicker
+ * @name umbraco.services.editorService#memberGroupPicker
* @methodOf umbraco.services.editorService
*
* @description
* Opens a member group picker in infinite editing.
*
+ * @param {Object} editor rendering options
+ * @param {Object} editor.multiPicker Pick one or multiple items.
* @param {Callback} editor.submit Submits the editor.
* @param {Callback} editor.close Closes the editor.
* @returns {Object} editor object
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
index 668509cdf3..e31742e660 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
@@ -431,6 +431,24 @@
}
return displayModel;
+ },
+
+ /**
+ * Formats the display model used to display the relation type to a model used to save the relation type.
+ * @param {Object} relationType
+ */
+ formatRelationTypePostData : function(relationType) {
+ var saveModel = {
+ id: relationType.id,
+ name: relationType.name,
+ alias: relationType.alias,
+ key : relationType.key,
+ isBidirectional: relationType.isBidirectional,
+ parentObjectType: relationType.parentObjectType,
+ childObjectType: relationType.childObjectType
+ };
+
+ return saveModel;
}
};
}
diff --git a/src/Umbraco.Web.UI.Client/src/less/dashboards.less b/src/Umbraco.Web.UI.Client/src/less/dashboards.less
index 5fd0e25be1..cc13ad31fd 100644
--- a/src/Umbraco.Web.UI.Client/src/less/dashboards.less
+++ b/src/Umbraco.Web.UI.Client/src/less/dashboards.less
@@ -1,13 +1,14 @@
.umb-dashboards-forms-install {
background: url('../img/forms/installer-background.png');
background-repeat: repeat-x;
- position: relative;
- top: -30px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
padding-top: 30px;
- box-shadow: inset 0px -40px 30px 25px rgba(255,255,255,1);
- -moz-border-radius: 0px 0px 200px 200px;
- -webkit-border-radius: 0px 0px 200px 200px;
- border-radius: 0px 0px 200px 200px;
+ background-color: @white;
+ overflow: auto;
small {
font-size: 14px;
diff --git a/src/Umbraco.Web.UI.Client/src/less/hacks.less b/src/Umbraco.Web.UI.Client/src/less/hacks.less
index cd32c64782..0bbb89a250 100644
--- a/src/Umbraco.Web.UI.Client/src/less/hacks.less
+++ b/src/Umbraco.Web.UI.Client/src/less/hacks.less
@@ -106,7 +106,6 @@ iframe, .content-column-body {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
- justify-content: center;
align-items: flex-start;
margin-top: 15px;
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html
index f6a641f2af..f14fb364ab 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html
@@ -32,11 +32,11 @@
- Choose where to copy {{currentNode.name}} to in the tree structure below + Choose where to copy {{source.name}} to in the tree structure below
+
| {{relation.parentName}} | +{{relation.childName}} | +{{relation.timestampFormatted}} | +{{relation.comment}} | +