/*! umbraco * https://github.com/umbraco/umbraco-cms/ * Copyright (c) 2016 Umbraco HQ; * Licensed */ (function() { angular.module("umbraco.mocks", ['ngCookies']); angular.module("umbraco.mocks.services", []); angular.module('umbraco.mocks'). factory('prevaluesMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function getRichTextConfiguration(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, { "plugins": [{ "name": "code", "useOnFrontend": true }, { "name": "paste", "useOnFrontend": true }, { "name": "umbracolink", "useOnFrontend": true }], "commands": [{ "icon": "images/editor/code.gif", "command": "code", "alias": "code", "userInterface": "false", "frontEndCommand": "code", "value": "", "priority": 1, "isStylePicker": false }, { "icon": "images/editor/removeformat.gif", "command": "removeformat", "alias": "removeformat", "userInterface": "false", "frontEndCommand": "removeformat", "value": "", "priority": 2, "isStylePicker": false }, { "icon": "images/editor/undo.gif", "command": "undo", "alias": "undo", "userInterface": "false", "frontEndCommand": "undo", "value": "", "priority": 11, "isStylePicker": false }, { "icon": "images/editor/redo.gif", "command": "redo", "alias": "redo", "userInterface": "false", "frontEndCommand": "redo", "value": "", "priority": 12, "isStylePicker": false }, { "icon": "images/editor/cut.gif", "command": "cut", "alias": "cut", "userInterface": "false", "frontEndCommand": "cut", "value": "", "priority": 13, "isStylePicker": false }, { "icon": "images/editor/copy.gif", "command": "copy", "alias": "copy", "userInterface": "false", "frontEndCommand": "copy", "value": "", "priority": 14, "isStylePicker": false }, { "icon": "images/editor/showStyles.png", "command": "styleselect", "alias": "styleselect", "userInterface": "false", "frontEndCommand": "styleselect", "value": "", "priority": 20, "isStylePicker": false }, { "icon": "images/editor/bold.gif", "command": "bold", "alias": "bold", "userInterface": "false", "frontEndCommand": "bold", "value": "", "priority": 21, "isStylePicker": false }, { "icon": "images/editor/italic.gif", "command": "italic", "alias": "italic", "userInterface": "false", "frontEndCommand": "italic", "value": "", "priority": 22, "isStylePicker": false }, { "icon": "images/editor/underline.gif", "command": "underline", "alias": "underline", "userInterface": "false", "frontEndCommand": "underline", "value": "", "priority": 23, "isStylePicker": false }, { "icon": "images/editor/strikethrough.gif", "command": "strikethrough", "alias": "strikethrough", "userInterface": "false", "frontEndCommand": "strikethrough", "value": "", "priority": 24, "isStylePicker": false }, { "icon": "images/editor/justifyleft.gif", "command": "justifyleft", "alias": "justifyleft", "userInterface": "false", "frontEndCommand": "alignleft", "value": "", "priority": 31, "isStylePicker": false }, { "icon": "images/editor/justifycenter.gif", "command": "justifycenter", "alias": "justifycenter", "userInterface": "false", "frontEndCommand": "aligncenter", "value": "", "priority": 32, "isStylePicker": false }, { "icon": "images/editor/justifyright.gif", "command": "justifyright", "alias": "justifyright", "userInterface": "false", "frontEndCommand": "alignright", "value": "", "priority": 33, "isStylePicker": false }, { "icon": "images/editor/justifyfull.gif", "command": "justifyfull", "alias": "justifyfull", "userInterface": "false", "frontEndCommand": "alignfull", "value": "", "priority": 34, "isStylePicker": false }, { "icon": "images/editor/bullist.gif", "command": "bullist", "alias": "bullist", "userInterface": "false", "frontEndCommand": "bullist", "value": "", "priority": 41, "isStylePicker": false }, { "icon": "images/editor/numlist.gif", "command": "numlist", "alias": "numlist", "userInterface": "false", "frontEndCommand": "numlist", "value": "", "priority": 42, "isStylePicker": false }, { "icon": "images/editor/outdent.gif", "command": "outdent", "alias": "outdent", "userInterface": "false", "frontEndCommand": "outdent", "value": "", "priority": 43, "isStylePicker": false }, { "icon": "images/editor/indent.gif", "command": "indent", "alias": "indent", "userInterface": "false", "frontEndCommand": "indent", "value": "", "priority": 44, "isStylePicker": false }, { "icon": "images/editor/link.gif", "command": "link", "alias": "mcelink", "userInterface": "true", "frontEndCommand": "link", "value": "", "priority": 51, "isStylePicker": false }, { "icon": "images/editor/unLink.gif", "command": "unlink", "alias": "unlink", "userInterface": "false", "frontEndCommand": "unlink", "value": "", "priority": 52, "isStylePicker": false }, { "icon": "images/editor/anchor.gif", "command": "anchor", "alias": "mceinsertanchor", "userInterface": "false", "frontEndCommand": "anchor", "value": "", "priority": 53, "isStylePicker": false }, { "icon": "images/editor/image.gif", "command": "image", "alias": "mceimage", "userInterface": "true", "frontEndCommand": "umbmediapicker", "value": "", "priority": 61, "isStylePicker": false }, { "icon": "images/editor/insMacro.gif", "command": "umbracomacro", "alias": "umbracomacro", "userInterface": "true", "frontEndCommand": "umbmacro", "value": "", "priority": 62, "isStylePicker": false }, { "icon": "images/editor/table.gif", "command": "table", "alias": "mceinserttable", "userInterface": "true", "frontEndCommand": "table", "value": "", "priority": 63, "isStylePicker": false }, { "icon": "images/editor/media.gif", "command": "umbracoembed", "alias": "umbracoembed", "userInterface": "true", "frontEndCommand": "umbembeddialog", "value": "", "priority": 66, "isStylePicker": false }, { "icon": "images/editor/hr.gif", "command": "hr", "alias": "inserthorizontalrule", "userInterface": "false", "frontEndCommand": "hr", "value": "", "priority": 71, "isStylePicker": false }, { "icon": "images/editor/sub.gif", "command": "sub", "alias": "subscript", "userInterface": "false", "frontEndCommand": "sub", "value": "", "priority": 72, "isStylePicker": false }, { "icon": "images/editor/sup.gif", "command": "sup", "alias": "superscript", "userInterface": "false", "frontEndCommand": "sup", "value": "", "priority": 73, "isStylePicker": false }, { "icon": "images/editor/charmap.gif", "command": "charmap", "alias": "mcecharmap", "userInterface": "false", "frontEndCommand": "charmap", "value": "", "priority": 74, "isStylePicker": false }], "validElements": "+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align],-h2[id|dir|class|align],-h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*]", "inValidElements": "font", "customConfig": { "entity_encoding": "raw" } }, null]; } } function getCanvasEditorConfiguration(status, data, headers){ if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, [ { "name": "Rich text editor", "alias": "rte", "view": "rte", "icon": "icon-article" }, { "name": "Image", "alias": "media", "view": "media", "icon": "icon-picture" }, { "name": "Macro", "alias": "macro", "view": "macro", "icon": "icon-settings-alt" }, { "name": "Embed", "alias": "embed", "view": "embed", "icon": "icon-movie-alt" }, { "name": "Headline", "alias": "headline", "view": "textstring", "icon": "icon-coin", "config": { "style": "font-size: 36px; line-height: 45px; font-weight: bold", "markup": "
#value#" } } ], null]; } } return { register: function() { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/RichTextPreValue/GetConfiguration')) .respond(getRichTextConfiguration); $httpBackend .whenGET(mocksUtils.urlRegex('../config/canvas.editors.config.js')) .respond(getCanvasEditorConfiguration); } }; }]); angular.module('umbraco.mocks'). factory('mocksUtils', ['$cookieStore', function($cookieStore) { 'use strict'; //by default we will perform authorization var doAuth = true; return { getMockDataType: function(id, selectedId) { var dataType = { id: id, name: "Simple editor " + id, selectedEditor: selectedId, availableEditors: [ { name: "Simple editor 1", editorId: String.CreateGuid() }, { name: "Simple editor 2", editorId: String.CreateGuid() }, { name: "Simple editor " + id, editorId: selectedId }, { name: "Simple editor 4", editorId: String.CreateGuid() }, { name: "Simple editor 5", editorId: String.CreateGuid() }, { name: "Simple editor 6", editorId: String.CreateGuid() } ], preValues: [ { label: "Custom pre value 1 for editor " + selectedId, description: "Enter a value for this pre-value", key: "myPreVal1", view: "requiredfield" }, { label: "Custom pre value 2 for editor " + selectedId, description: "Enter a value for this pre-value", key: "myPreVal2", view: "requiredfield" } ] }; return dataType; }, /** Creats a mock content object */ getMockContent: function(id) { var node = { name: "My content with id: " + id, updateDate: new Date().toIsoDateTimeString(), publishDate: new Date().toIsoDateTimeString(), createDate: new Date().toIsoDateTimeString(), id: id, parentId: 1234, icon: "icon-umb-content", owner: { name: "Administrator", id: 0 }, updater: { name: "Per Ploug Krogslund", id: 1 }, path: "-1,1234,2455", allowedActions: ["U", "H", "A"], tabs: [ { label: "Grid", id: 1, active: true, properties: [ { alias: "grid", label: "Grid", view: "grid", value: "", hideLabel: true, config: { items:{ styles:[ { label: "Set a background image", description: "Set a row background", key: "background-image", view: "imagepicker", modifier: "url({0})" } ], config:[ { label: "Class", description: "Set a css class", key: "class", view: "textstring" } ], columns: 12, templates:[ { name: "1 column layout", sections: [ { grid: 12, } ] }, { name: "2 column layout", sections: [ { grid: 4, }, { grid: 8 } ] } ], layouts:[ { name: "Headline", areas: [ { grid: 12, editors: ["headline"] } ] }, { name: "Article", areas: [ { grid: 12 }, { grid: 4 }, { grid: 8 }, { grid: 12 } ] } ] } } }, ] }, { label: "Content", id: 2, properties: [ { alias: "valTest", label: "Validation test", view: "validationtest", value: "asdfasdf" }, { alias: "bodyText", label: "Body Text", description: "Here you enter the primary article contents", view: "rte", value: "
askjdkasj lasjd
", config: {} }, { alias: "textarea", label: "textarea", view: "textarea", value: "ajsdka sdjkds", config: { rows: 4 } }, { alias: "media", label: "Media picker", view: "mediapicker", value: "1234,23242,23232,23231", config: {multiPicker: 1} } ] }, { label: "Sample Editor", id: 3, properties: [ { alias: "datepicker", label: "Datepicker", view: "datepicker", config: { pickTime: false, format: "yyyy-MM-dd" } }, { alias: "tags", label: "Tags", view: "tags", value: "" } ] }, { label: "This", id: 4, properties: [ { alias: "valTest4", label: "Validation test", view: "validationtest", value: "asdfasdf" }, { alias: "bodyText4", label: "Body Text", description: "Here you enter the primary article contents", view: "rte", value: "askjdkasj lasjd
", config: {} }, { alias: "textarea4", label: "textarea", view: "textarea", value: "ajsdka sdjkds", config: { rows: 4 } }, { alias: "content4", label: "Content picker", view: "contentpicker", value: "1234,23242,23232,23231" } ] }, { label: "Is", id: 5, properties: [ { alias: "valTest5", label: "Validation test", view: "validationtest", value: "asdfasdf" }, { alias: "bodyText5", label: "Body Text", description: "Here you enter the primary article contents", view: "rte", value: "askjdkasj lasjd
", config: {} }, { alias: "textarea5", label: "textarea", view: "textarea", value: "ajsdka sdjkds", config: { rows: 4 } }, { alias: "content5", label: "Content picker", view: "contentpicker", value: "1234,23242,23232,23231" } ] }, { label: "Overflown", id: 6, properties: [ { alias: "valTest6", label: "Validation test", view: "validationtest", value: "asdfasdf" }, { alias: "bodyText6", label: "Body Text", description: "Here you enter the primary article contents", view: "rte", value: "askjdkasj lasjd
", config: {} }, { alias: "textarea6", label: "textarea", view: "textarea", value: "ajsdka sdjkds", config: { rows: 4 } }, { alias: "content6", label: "Content picker", view: "contentpicker", value: "1234,23242,23232,23231" } ] }, { label: "Generic Properties", id: 0, properties: [ { label: 'Id', value: 1234, view: "readonlyvalue", alias: "_umb_id" }, { label: 'Created by', description: 'Original author', value: "Administrator", view: "readonlyvalue", alias: "_umb_createdby" }, { label: 'Created', description: 'Date/time this document was created', value: new Date().toIsoDateTimeString(), view: "readonlyvalue", alias: "_umb_createdate" }, { label: 'Updated', description: 'Date/time this document was created', value: new Date().toIsoDateTimeString(), view: "readonlyvalue", alias: "_umb_updatedate" }, { label: 'Document Type', value: "Home page", view: "readonlyvalue", alias: "_umb_doctype" }, { label: 'Publish at', description: 'Date/time to publish this document', value: new Date().toIsoDateTimeString(), view: "datepicker", alias: "_umb_releasedate" }, { label: 'Unpublish at', description: 'Date/time to un-publish this document', value: new Date().toIsoDateTimeString(), view: "datepicker", alias: "_umb_expiredate" }, { label: 'Template', value: "myTemplate", view: "dropdown", alias: "_umb_template", config: { items: { "" : "-- Choose template --", "myTemplate" : "My Templates", "home" : "Home Page", "news" : "News Page" } } }, { label: 'Link to document', value: ["/testing" + id, "http://localhost/testing" + id, "http://mydomain.com/testing" + id].join(), view: "urllist", alias: "_umb_urllist" }, { alias: "test", label: "Stuff", view: "test", value: "", config: { fields: [ { alias: "embedded", label: "Embbeded", view: "textstring", value: "" }, { alias: "embedded2", label: "Embbeded 2", view: "contentpicker", value: "" }, { alias: "embedded3", label: "Embbeded 3", view: "textarea", value: "" }, { alias: "embedded4", label: "Embbeded 4", view: "datepicker", value: "" } ] } } ] } ] }; return node; }, getMockEntity : function(id){ return {name: "hello", id: id, icon: "icon-file"}; }, /** generally used for unit tests, calling this will disable the auth check and always return true */ disableAuth: function() { doAuth = false; }, /** generally used for unit tests, calling this will enabled the auth check */ enabledAuth: function() { doAuth = true; }, /** Checks for our mock auth cookie, if it's not there, returns false */ checkAuth: function () { if (doAuth) { var mockAuthCookie = $cookieStore.get("mockAuthCookie"); if (!mockAuthCookie) { return false; } return true; } else { return true; } }, /** Creates/sets the auth cookie with a value indicating the user is now authenticated */ setAuth: function() { //set the cookie for loging $cookieStore.put("mockAuthCookie", "Logged in!"); }, /** removes the auth cookie */ clearAuth: function() { $cookieStore.remove("mockAuthCookie"); }, urlRegex: function(url) { url = url.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); return new RegExp("^" + url); }, getParameterByName: function(url, name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"), results = regex.exec(url); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }, getParametersByName: function(url, name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp(name + "=([^]*)", "mg"), results = []; var match; while ( ( match = regex.exec(url) ) !== null ) { results.push(decodeURIComponent(match[1].replace(/\+/g, " "))); } return results; } }; }]); angular.module('umbraco.mocks'). factory('contentMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnChildren(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var pageNumber = Number(mocksUtils.getParameterByName(data, "pageNumber")); var filter = mocksUtils.getParameterByName(data, "filter"); var pageSize = Number(mocksUtils.getParameterByName(data, "pageSize")); var parentId = Number(mocksUtils.getParameterByName(data, "id")); if (pageNumber === 0) { pageNumber = 1; } var collection = { pageSize: pageSize, totalItems: 68, totalPages: 7, pageNumber: pageNumber, filter: filter }; collection.totalItems = 56 - (filter.length); if (pageSize > 0) { collection.totalPages = Math.round(collection.totalItems / collection.pageSize); } else { collection.totalPages = 1; } collection.items = []; if (collection.totalItems < pageSize || pageSize < 1) { collection.pageSize = collection.totalItems; } else { collection.pageSize = pageSize; } var id = 0; for (var i = 0; i < collection.pageSize; i++) { id = (parentId + i) * pageNumber; var cnt = mocksUtils.getMockContent(id); //here we fake filtering if (filter !== '') { cnt.name = filter + cnt.name; } //set a fake sortOrder cnt.sortOrder = i + 1; collection.items.push(cnt); } return [200, collection, null]; } function returnDeletedNode(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } return [200, null, null]; } function returnEmptyNode(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var response = returnNodebyId(200, "", null); var node = response[1]; var parentId = mocksUtils.getParameterByName(data, "parentId") || 1234; node.name = ""; node.id = 0; node.parentId = parentId; $(node.tabs).each(function(i,tab){ $(tab.properties).each(function(i, property){ property.value = ""; }); }); return response; } function returnNodebyId(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var id = mocksUtils.getParameterByName(data, "id") || "1234"; id = parseInt(id, 10); var node = mocksUtils.getMockContent(id); return [200, node, null]; } function returnNodebyIds(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var ids = mocksUtils.getParameterByName(data, "ids") || [1234,23324,2323,23424]; var nodes = []; $(ids).each(function(i, id){ var _id = parseInt(id, 10); nodes.push(mocksUtils.getMockContent(_id)); }); return [200, nodes, null]; } function returnSort(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } return [200, null, null]; } function returnSave(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } return [200, null, null]; } return { register: function () { $httpBackend .whenPOST(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/PostSave')) .respond(returnSave); $httpBackend .whenPOST(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/PostSort')) .respond(returnSort); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/GetChildren')) .respond(returnChildren); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/GetByIds')) .respond(returnNodebyIds); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/GetById?')) .respond(returnNodebyId); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/GetEmpty')) .respond(returnEmptyNode); $httpBackend .whenDELETE(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/DeleteById')) .respond(returnDeletedNode); $httpBackend .whenDELETE(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/EmptyRecycleBin')) .respond(returnDeletedNode); }, expectGetById: function() { $httpBackend .expectGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Content/GetById')); } }; }]); angular.module('umbraco.mocks'). factory('contentTypeMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnAllowedChildren(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var types = [ { name: "News Article", description: "Standard news article", alias: "newsArticle", id: 1234, icon: "icon-file", thumbnail: "icon-file" }, { name: "News Area", description: "Area to hold all news articles, there should be only one", alias: "newsArea", id: 1234, icon: "icon-suitcase", thumbnail: "icon-suitcase" }, { name: "Employee", description: "Employee profile information page", alias: "employee", id: 1234, icon: "icon-user", thumbnail: "icon-user" } ]; return [200, types, null]; } return { register: function() { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/Api/ContentType/GetAllowedChildren')) .respond(returnAllowedChildren); }, expectAllowedChildren: function(){ console.log("expecting get"); $httpBackend.expectGET(mocksUtils.urlRegex('/umbraco/Api/ContentType/GetAllowedChildren')); } }; }]); angular.module('umbraco.mocks'). factory('dashboardMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function getDashboard(status, data, headers) { //check for existence of a cookie so we can do login/logout in the belle app (ignore for tests). if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { //TODO: return real mocked data return [200, [], null]; } } return { register: function() { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Dashboard/GetDashboard')) .respond(getDashboard); } }; }]); angular.module('umbraco.mocks'). factory('dataTypeMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnById(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var id = mocksUtils.getParameterByName(data, "id") || 1234; var selectedId = String.CreateGuid(); var dataType = mocksUtils.getMockDataType(id, selectedId); return [200, dataType, null]; } function returnEmpty(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var response = returnById(200, "", null); var node = response[1]; node.name = ""; node.selectedEditor = ""; node.id = 0; node.preValues = []; return response; } function returnPreValues(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var editorId = mocksUtils.getParameterByName(data, "editorId") || "83E9AD36-51A7-4440-8C07-8A5623AC6979"; var preValues = [ { label: "Custom pre value 1 for editor " + editorId, description: "Enter a value for this pre-value", key: "myPreVal", view: "requiredfield", validation: [ { type: "Required" } ] }, { label: "Custom pre value 2 for editor " + editorId, description: "Enter a value for this pre-value", key: "myPreVal", view: "requiredfield", validation: [ { type: "Required" } ] } ]; return [200, preValues, null]; } function returnSave(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var postedData = angular.fromJson(headers); var dataType = mocksUtils.getMockDataType(postedData.id, postedData.selectedEditor); dataType.notifications = [{ header: "Saved", message: "Data type saved", type: 0 }]; return [200, dataType, null]; } return { register: function() { $httpBackend .whenPOST(mocksUtils.urlRegex('/umbraco/UmbracoApi/DataType/PostSave')) .respond(returnSave); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/DataType/GetById')) .respond(returnById); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/DataType/GetEmpty')) .respond(returnEmpty); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/DataType/GetPreValues')) .respond(returnPreValues); }, expectGetById: function() { $httpBackend .expectGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/DataType/GetById')); } }; }]); angular.module('umbraco.mocks'). factory('entityMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnEntitybyId(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var id = mocksUtils.getParameterByName(data, "id") || "1234"; id = parseInt(id, 10); var node = mocksUtils.getMockEntity(id); return [200, node, null]; } function returnEntitybyIds(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var ids = mocksUtils.getParametersByName(data, "ids") || [1234, 23324, 2323, 23424]; var nodes = []; $(ids).each(function (i, id) { var _id = parseInt(id, 10); nodes.push(mocksUtils.getMockEntity(_id)); }); return [200, nodes, null]; } return { register: function () { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Entity/GetByIds')) .respond(returnEntitybyIds); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Entity/GetAncestors')) .respond(returnEntitybyIds); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Entity/GetById?')) .respond(returnEntitybyId); } }; }]); angular.module('umbraco.mocks'). factory('macroMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnParameters(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var nodes = [{ alias: "parameter1", name: "Parameter 1" }, { alias: "parameter2", name: "Parameter 2" }]; return [200, nodes, null]; } return { register: function () { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Macro/GetMacroParameters')) .respond(returnParameters); } }; }]); angular.module('umbraco.mocks'). factory('mediaMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function returnNodeCollection(status, data, headers){ var nodes = [{"properties":[{"id":348,"value":"/media/1045/windows95.jpg","alias":"umbracoFile"},{"id":349,"value":"640","alias":"umbracoWidth"},{"id":350,"value":"472","alias":"umbracoHeight"},{"id":351,"value":"53472","alias":"umbracoBytes"},{"id":352,"value":"jpg","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:08","createDate":"2013-08-27 15:50:08","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":0,"name":"windows95.jpg","id":1128,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":353,"value":"/media/1046/pete.png","alias":"umbracoFile"},{"id":354,"value":"240","alias":"umbracoWidth"},{"id":355,"value":"240","alias":"umbracoHeight"},{"id":356,"value":"87408","alias":"umbracoBytes"},{"id":357,"value":"png","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:08","createDate":"2013-08-27 15:50:08","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":1,"name":"pete.png","id":1129,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":358,"value":"/media/1047/unicorn.jpg","alias":"umbracoFile"},{"id":359,"value":"640","alias":"umbracoWidth"},{"id":360,"value":"640","alias":"umbracoHeight"},{"id":361,"value":"577380","alias":"umbracoBytes"},{"id":362,"value":"jpg","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:09","createDate":"2013-08-27 15:50:09","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":2,"name":"unicorn.jpg","id":1130,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":363,"value":"/media/1049/exploding-head.gif","alias":"umbracoFile"},{"id":364,"value":"500","alias":"umbracoWidth"},{"id":365,"value":"279","alias":"umbracoHeight"},{"id":366,"value":"451237","alias":"umbracoBytes"},{"id":367,"value":"gif","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:09","createDate":"2013-08-27 15:50:09","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":3,"name":"exploding head.gif","id":1131,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":368,"value":"/media/1048/bighead.jpg","alias":"umbracoFile"},{"id":369,"value":"1240","alias":"umbracoWidth"},{"id":370,"value":"1655","alias":"umbracoHeight"},{"id":371,"value":"836261","alias":"umbracoBytes"},{"id":372,"value":"jpg","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:09","createDate":"2013-08-27 15:50:09","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":4,"name":"bighead.jpg","id":1132,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":373,"value":"/media/1050/powerlines.jpg","alias":"umbracoFile"},{"id":374,"value":"636","alias":"umbracoWidth"},{"id":375,"value":"423","alias":"umbracoHeight"},{"id":376,"value":"79874","alias":"umbracoBytes"},{"id":377,"value":"jpg","alias":"umbracoExtension"}],"updateDate":"2013-08-27 15:50:09","createDate":"2013-08-27 15:50:09","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Image","sortOrder":5,"name":"powerlines.jpg","id":1133,"icon":"mediaPhoto.gif","parentId":1127},{"properties":[{"id":430,"value":"","alias":"contents"}],"updateDate":"2013-08-30 08:53:22","createDate":"2013-08-30 08:53:22","owner":{"id":0,"name":"admin"},"updater":null,"contentTypeAlias":"Folder","sortOrder":6,"name":"new folder","id":1146,"icon":"folder.gif","parentId":1127}]; return [200, nodes, null]; } function returnNodebyIds(status, data, headers) { var ids = mocksUtils.getParameterByName(data, "ids") || "1234,1234,4234"; var items = []; _.each(ids, function(id){ items.push(_getNode( parseInt( id, 10 )) ); }); return [200, items, null]; } function returnNodebyId(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var id = mocksUtils.getParameterByName(data, "id") || 1234; id = parseInt(id, 10); return [200, _getNode(id), null]; } function _getNode(id){ var node = { name: "My media with id: " + id, updateDate: new Date(), publishDate: new Date(), id: id, parentId: 1234, icon: "icon-file-alt", owner: {name: "Administrator", id: 0}, updater: {name: "Per Ploug Krogslund", id: 1}, path: "-1,1234,2455", tabs: [ { label: "Media", alias: "tab0", id: 0, properties: [ { alias: "umbracoFile", label: "File", description:"Some file", view: "rte", value: "/media/1234/random.jpg" } ] } ] }; return node; } return { register: function() { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Media/GetById?')) .respond(returnNodebyId); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Media/GetByIds?')) .respond(returnNodebyIds); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Media/GetChildren')) .respond(returnNodeCollection); }, expectGetById: function() { $httpBackend .expectGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Media/GetById')); } }; }]); /** * @ngdoc service * @name umbraco.mocks.sectionMocks * @description * Mocks data retrival for the sections **/ function sectionMocks($httpBackend, mocksUtils) { /** internal method to mock the sections to be returned */ function getSections() { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var sections = [ { name: "Content", cssclass: "icon-umb-content", alias: "content" }, { name: "Media", cssclass: "icon-umb-media", alias: "media" }, { name: "Settings", cssclass: "icon-umb-settings", alias: "settings" }, { name: "Developer", cssclass: "icon-umb-developer", alias: "developer" }, { name: "Users", cssclass: "icon-umb-users", alias: "users" }, { name: "Developer", cssclass: "icon-umb-developer", alias: "developer" }, { name: "Users", cssclass: "icon-umb-users", alias: "users" } ]; return [200, sections, null]; } return { register: function () { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Section/GetSections')) .respond(getSections); } }; } angular.module('umbraco.mocks').factory('sectionMocks', ['$httpBackend', 'mocksUtils', sectionMocks]); angular.module('umbraco.mocks'). factory('treeMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function getMenuItems() { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var menu = [ { name: "Create", cssclass: "plus", alias: "create", metaData: {} }, { seperator: true, name: "Delete", cssclass: "remove", alias: "delete", metaData: {} }, { name: "Move", cssclass: "move", alias: "move", metaData: {} }, { name: "Copy", cssclass: "copy", alias: "copy", metaData: {} }, { name: "Sort", cssclass: "sort", alias: "sort", metaData: {} }, { seperator: true, name: "Publish", cssclass: "globe", alias: "publish", metaData: {} }, { name: "Rollback", cssclass: "undo", alias: "rollback", metaData: {} }, { seperator: true, name: "Permissions", cssclass: "lock", alias: "permissions", metaData: {} }, { name: "Audit Trail", cssclass: "time", alias: "audittrail", metaData: {} }, { name: "Notifications", cssclass: "envelope", alias: "notifications", metaData: {} }, { seperator: true, name: "Hostnames", cssclass: "home", alias: "hostnames", metaData: {} }, { name: "Public Access", cssclass: "group", alias: "publicaccess", metaData: {} }, { seperator: true, name: "Reload", cssclass: "refresh", alias: "users", metaData: {} }, { seperator: true, name: "Empty Recycle Bin", cssclass: "trash", alias: "emptyrecyclebin", metaData: {} } ]; var result = { menuItems: menu, defaultAlias: "create" }; return [200, result, null]; } function returnChildren(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var id = mocksUtils.getParameterByName(data, "id"); var section = mocksUtils.getParameterByName(data, "treeType"); var level = mocksUtils.getParameterByName(data, "level")+1; var url = "/umbraco/UmbracoTrees/ApplicationTreeApi/GetChildren?treeType=" + section + "&id=1234&level=" + level; var menuUrl = "/umbraco/UmbracoTrees/ApplicationTreeApi/GetMenu?treeType=" + section + "&id=1234&parentId=456"; //hack to have create as default content action var action; if (section === "content") { action = "create"; } var children = [ { name: "child-of-" + section, childNodesUrl: url, id: level + "" + 1234, icon: "icon-document", children: [], expanded: false, hasChildren: true, level: level, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: level + "" + 1235, icon: "icon-document", children: [], expanded: false, hasChildren: true, level: level, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: level + "" + 1236, icon: "icon-document", children: [], expanded: false, hasChildren: true, level: level, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: level + "" + 1237, icon: "icon-document", routePath: "common/legacy/1237?p=" + encodeURI("developer/contentType.aspx?idequal1234"), children: [], expanded: false, hasChildren: true, level: level, menuUrl: menuUrl } ]; return [200, children, null]; } function returnDataTypes(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var children = [ { name: "Textstring", childNodesUrl: null, id: 10, icon: "icon-document", children: [], expanded: false, hasChildren: false, level: 1, menuUrl: null }, { name: "Multiple textstring", childNodesUrl: null, id: 11, icon: "icon-document", children: [], expanded: false, hasChildren: false, level: 1, menuUrl: null }, { name: "Yes/No", childNodesUrl: null, id: 12, icon: "icon-document", children: [], expanded: false, hasChildren: false, level: 1, menuUrl: null }, { name: "Rich Text Editor", childNodesUrl: null, id: 13, icon: "icon-document", children: [], expanded: false, hasChildren: false, level: 1, menuUrl: null } ]; return [200, children, null]; } function returnDataTypeMenu(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var menu = [ { name: "Create", cssclass: "plus", alias: "create", metaData: { jsAction: "umbracoMenuActions.CreateChildEntity" } }, { seperator: true, name: "Reload", cssclass: "refresh", alias: "users", metaData: {} } ]; return [200, menu, null]; } function returnApplicationTrees(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } var section = mocksUtils.getParameterByName(data, "application"); var url = "/umbraco/UmbracoTrees/ApplicationTreeApi/GetChildren?treeType=" + section + "&id=1234&level=1"; var menuUrl = "/umbraco/UmbracoTrees/ApplicationTreeApi/GetMenu?treeType=" + section + "&id=1234&parentId=456"; var t; switch (section) { case "content": t = { name: "content", id: -1, children: [ { name: "My website", id: 1234, childNodesUrl: url, icon: "icon-home", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "Components", id: 1235, childNodesUrl: url, icon: "icon-document", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "Archieve", id: 1236, childNodesUrl: url, icon: "icon-document", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "Recycle Bin", id: -20, childNodesUrl: url, icon: "icon-trash", routePath: section + "/recyclebin", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl } ], expanded: true, hasChildren: true, level: 0, menuUrl: menuUrl, metaData: { treeAlias: "content" } }; break; case "media": t = { name: "media", id: -1, children: [ { name: "random-name-" + section, childNodesUrl: url, id: 1234, icon: "icon-home", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1235, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1236, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1237, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl } ], expanded: true, hasChildren: true, level: 0, menuUrl: menuUrl, metaData: { treeAlias: "media" } }; break; case "developer": var dataTypeChildrenUrl = "/umbraco/UmbracoTrees/DataTypeTree/GetNodes?id=-1&application=developer"; var dataTypeMenuUrl = "/umbraco/UmbracoTrees/DataTypeTree/GetMenu?id=-1&application=developer"; t = { name: "developer", id: -1, children: [ { name: "Data types", childNodesUrl: dataTypeChildrenUrl, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: dataTypeMenuUrl, metaData: { treeAlias: "dataTypes" } }, { name: "Macros", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "macros" } }, { name: "Packages", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "packager" } }, { name: "XSLT Files", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "xslt" } }, { name: "Partial View Macros", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "partialViewMacros" } } ], expanded: true, hasChildren: true, level: 0, isContainer: true }; break; case "settings": t = { name: "settings", id: -1, children: [ { name: "Stylesheets", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "stylesheets" } }, { name: "Templates", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "templates" } }, { name: "Dictionary", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "dictionary" } }, { name: "Media types", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "mediaTypes" } }, { name: "Document types", childNodesUrl: url, id: -1, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl, metaData: { treeAlias: "documentTypes" } } ], expanded: true, hasChildren: true, level: 0, isContainer: true }; break; default: t = { name: "randomTree", id: -1, children: [ { name: "random-name-" + section, childNodesUrl: url, id: 1234, icon: "icon-home", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1235, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1236, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl }, { name: "random-name-" + section, childNodesUrl: url, id: 1237, icon: "icon-folder-close", children: [], expanded: false, hasChildren: true, level: 1, menuUrl: menuUrl } ], expanded: true, hasChildren: true, level: 0, menuUrl: menuUrl, metaData: { treeAlias: "randomTree" } }; break; } return [200, t, null]; } return { register: function() { $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoTrees/ApplicationTreeApi/GetApplicationTrees')) .respond(returnApplicationTrees); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoTrees/ApplicationTreeApi/GetChildren')) .respond(returnChildren); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoTrees/DataTypeTree/GetNodes')) .respond(returnDataTypes); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoTrees/DataTypeTree/GetMenu')) .respond(returnDataTypeMenu); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoTrees/ApplicationTreeApi/GetMenu')) .respond(getMenuItems); } }; }]); angular.module('umbraco.mocks'). factory('userMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function generateMockedUser() { // Ensure a new user object each call return { name: "Per Ploug", email: "test@test.com", emailHash: "f9879d71855b5ff21e4963273a886bfc", id: 0, locale: 'da-DK', remainingAuthSeconds: 600, allowedSections: ["content", "media"] }; } function isAuthenticated() { //check for existence of a cookie so we can do login/logout in the belle app (ignore for tests). if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, null, null]; } } function getCurrentUser(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, generateMockedUser(), null]; } } function getRemainingTimeoutSeconds(status, data, headers) { if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, 600, null]; } } function returnUser(status, data, headers) { //set the cookie for loging mocksUtils.setAuth(); return [200, generateMockedUser(), null]; } function logout() { mocksUtils.clearAuth(); return [200, null, null]; } return { register: function() { $httpBackend .whenPOST(mocksUtils.urlRegex('/umbraco/UmbracoApi/Authentication/PostLogin')) .respond(returnUser); $httpBackend .whenPOST(mocksUtils.urlRegex('/umbraco/UmbracoApi/Authentication/PostLogout')) .respond(logout); $httpBackend .whenGET(mocksUtils.urlRegex('/umbraco/UmbracoApi/Authentication/IsAuthenticated')) .respond(isAuthenticated); $httpBackend .whenGET('/umbraco/UmbracoApi/Authentication/GetCurrentUser') .respond(getCurrentUser); $httpBackend .whenGET('/umbraco/UmbracoApi/Authentication/GetRemainingTimeoutSeconds') .respond(getRemainingTimeoutSeconds); } }; }]); angular.module('umbraco.mocks.services') .factory('assetsService', function ($q) { return { loadCss : function(path, scope, attributes, timeout){ var deferred = $q.defer(); deferred.resolve(); return deferred.promise; }, loadJs : function(path, scope, attributes, timeout){ var deferred = $q.defer(); if(path[0] !== "/"){ path = "/" + path; } $.getScript( "base" + path, function( data, textStatus, jqxhr ) { deferred.resolve(); }); return deferred.promise; } }; }); angular.module("umbraco.mocks").factory('externalLoginInfo', function () { return { errors: [], providers: [] }; } ); angular.module('umbraco.mocks'). factory('localizationMocks', ['$httpBackend', 'mocksUtils', function ($httpBackend, mocksUtils) { 'use strict'; function getLanguageResource(status, data, headers) { //check for existence of a cookie so we can do login/logout in the belle app (ignore for tests). if (!mocksUtils.checkAuth()) { return [401, null, null]; } else { return [200, { "actions_assignDomain": "Culture and Hostnames", "actions_auditTrail": "Audit Trail", "actions_browse": "Browse Node", "actions_changeDocType": "Change Document Type", "actions_copy": "Copy", "actions_create": "Create", "actions_createPackage": "Create Package", "actions_delete": "Delete", "actions_disable": "Disable", "actions_emptyTrashcan": "Empty recycle bin", "actions_exportDocumentType": "Export Document Type", "actions_importDocumentType": "Import Document Type", "actions_importPackage": "Import Package", "actions_liveEdit": "Edit in Canvas", "actions_logout": "Exit", "actions_move": "Move", "actions_notify": "Notifications", "actions_protect": "Public access", "actions_publish": "Publish", "actions_unpublish": "Unpublish", "actions_refreshNode": "Reload nodes", "actions_republish": "Republish entire site", "actions_rights": "Permissions", "actions_rollback": "Rollback", "actions_sendtopublish": "Send To Publish", "actions_sendToTranslate": "Send To Translation", "actions_sort": "Sort", "actions_toPublish": "Send to publication", "actions_translate": "Translate", "actions_update": "Update", "actions_exportContourForm": "Export form", "actions_importContourForm": "Import form", "actions_archiveContourForm": "Archive form", "actions_unarchiveContourForm": "Unarchive form", "actions_defaultValue": "Default value", "assignDomain_permissionDenied": "Permission denied.", "assignDomain_addNew": "Add new Domain", "assignDomain_remove": "remove", "assignDomain_invalidNode": "Invalid node.", "assignDomain_invalidDomain": "Invalid domain format.", "assignDomain_duplicateDomain": "Domain has already been assigned.", "assignDomain_domain": "Domain", "assignDomain_language": "Language", "assignDomain_domainCreated": "New domain '%0%' has been created", "assignDomain_domainDeleted": "Domain '%0%' is deleted", "assignDomain_domainExists": "Domain '%0%' has already been assigned", "assignDomain_domainHelp": "Valid domain names are: 'example.com', 'www.example.com', 'example.com:8080' or 'https://www.example.com/'.<asp:content /> element.",
"defaultdialogs_templateContentPlaceHolderHelp": "Select a placeholder id from the list below. You can only choose Id's from the current template's master.",
"defaultdialogs_thumbnailimageclickfororiginal": "Click on the image to see full size",
"defaultdialogs_treepicker": "Pick item",
"defaultdialogs_viewCacheItem": "View Cache Item",
"dictionaryItem_description": "Edit the different language versions for the dictionary item '%0%' belowDatabase not found! Please check that the information in the 'connection string' of the \"web.config\" file is correct.
To proceed, please edit the 'web.config' file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named 'UmbracoDbDSN' and save the file.
Click the retry button when done.
More information on editing web.config here.
Press the upgrade button to upgrade your database to Umbraco %0%
Don't worry - no content will be deleted and everything will continue working afterwards!
", "installer_databaseUpgradeDone": "Your database has been upgraded to the final version %0%.No further actions needs to be taken. Click Next to proceed.", "installer_defaultUserPassChanged": "The Default user's password has been successfully changed since the installation!
No further actions needs to be taken. Click Next to proceed.", "installer_defaultUserPasswordChanged": "The password is changed!", "installer_defaultUserText": "
Umbraco creates a default user with a login ('admin') and password ('default'). It's important that the password is changed to something unique.
This step will check the default user's password and suggest if it needs to be changed.
", "installer_greatStart": "Get a great start, watch our introduction videos", "installer_licenseText": "By clicking the next button (or modifying the UmbracoConfigurationStatus in web.config), you accept the license for this software as specified in the box below. Notice that this Umbraco distribution consists of two different licenses, the open source MIT license for the framework and the Umbraco freeware license that covers the UI.", "installer_None": "Not installed yet.", "installer_permissionsAffectedFolders": "Affected files and folders", "installer_permissionsAffectedFoldersMoreInfo": "More information on setting up permissions for Umbraco here", "installer_permissionsAffectedFoldersText": "You need to grant ASP.NET modify permissions to the following files/folders", "installer_permissionsAlmostPerfect": "Your permission settings are almost perfect!'Runway' is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically, but you can easily edit, extend or remove it. It's not necessary and you can perfectly use Umbraco without it. However, Runway offers an easy foundation based on best practices to get you started faster than ever. If you choose to install Runway, you can optionally select basic building blocks called Runway Modules to enhance your Runway pages.
Included with Runway: Home page, Getting Started page, Installing Modules page.© 2001 - %0%
Umbraco.org
Hi %0%
This is an automated mail to inform you that the task '%1%' has been performed on the page '%2%' by the user '%3%'
Have a nice day!
Cheers from the Umbraco robot