Grid mock data and modified tests
all client side changes, will not affect live sites
This commit is contained in:
@@ -18,8 +18,9 @@ module.exports = function (grunt) {
|
||||
|
||||
//triggered from grunt dev or grunt
|
||||
grunt.registerTask('build', ['clean', 'concat', 'recess:min', 'recess:installer', 'recess:canvasdesigner', 'bower', 'copy']);
|
||||
//build-dev doesn't min - we are trying to speed this up and we don't want minified stuff when we are in dev mode
|
||||
grunt.registerTask('build-dev', ['clean', 'concat', 'recess:build', 'recess:installer', 'copy']);
|
||||
|
||||
//build-dev doesn't min - we are trying to speed this up and we don't want minified stuff when we are in dev mode
|
||||
grunt.registerTask('build-dev', ['clean', 'concat', 'recess:build', 'recess:installer', 'copy']);
|
||||
|
||||
//utillity tasks
|
||||
grunt.registerTask('docs', ['ngdocs']);
|
||||
@@ -31,9 +32,9 @@ module.exports = function (grunt) {
|
||||
grunt.log.subhead(Date());
|
||||
});
|
||||
|
||||
// Custom task to run the bower dependency installer
|
||||
// tried, a few other things but this seems to work the best.
|
||||
// https://coderwall.com/p/xnkdqw
|
||||
// Custom task to run the bower dependency installer
|
||||
// tried, a few other things but this seems to work the best.
|
||||
// https://coderwall.com/p/xnkdqw
|
||||
grunt.registerTask('bower', 'Get js packages listed in bower.json',
|
||||
function () {
|
||||
var bower = require('bower');
|
||||
@@ -137,6 +138,9 @@ module.exports = function (grunt) {
|
||||
files: [{ dest: '<%= distdir %>/assets', src : '**', expand: true, cwd: 'src/assets/' }]
|
||||
},
|
||||
|
||||
config: {
|
||||
files: [{ dest: '<%= distdir %>/../config', src : '**', expand: true, cwd: 'src/config/' }]
|
||||
},
|
||||
|
||||
// Copies over the files downloaded by bower
|
||||
bower: {
|
||||
|
||||
@@ -55,11 +55,91 @@ angular.module('umbraco.mocks').
|
||||
allowedActions: ["U", "H", "A"],
|
||||
tabs: [
|
||||
{
|
||||
label: "Child documents",
|
||||
label: "Grid",
|
||||
id: 1,
|
||||
active: true,
|
||||
properties: [
|
||||
{ alias: "list", label: "List", view: "listview", value: "", hideLabel: true, config:{entityType: "content"} },
|
||||
{ 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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -111,22 +191,6 @@ angular.module('umbraco.mocks').
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Tab # 7",
|
||||
id: 7,
|
||||
properties: [
|
||||
{ alias: "valTest7", label: "Validation test", view: "validationtest", value: "asdfasdf" },
|
||||
{ alias: "bodyText7", label: "Body Text", description: "Here you enter the primary article contents", view: "rte", value: "<p>askjdkasj lasjd</p>", config: {} },
|
||||
{ alias: "textarea7", label: "textarea", view: "textarea", value: "ajsdka sdjkds", config: { rows: 4 } },
|
||||
{ alias: "content7", label: "Content picker", view: "contentpicker", value: "1234,23242,23232,23231" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Grid",
|
||||
id: 8,
|
||||
properties: [
|
||||
{ alias: "canvas", label: "Grid", view: "canvas", value: "test", hideLabel: true }
|
||||
]
|
||||
}, {
|
||||
label: "Generic Properties",
|
||||
id: 0,
|
||||
properties: [
|
||||
|
||||
@@ -78,7 +78,7 @@ angular.module('umbraco.mocks').
|
||||
{ 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];
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ function initBackEnd($httpBackend, contentMocks, mediaMocks, treeMocks, userMock
|
||||
prevaluesMocks.register();
|
||||
entityMocks.register();
|
||||
|
||||
$httpBackend.whenGET(/^..\/config\//).passThrough();
|
||||
$httpBackend.whenGET(/^views\//).passThrough();
|
||||
$httpBackend.whenGET(/^js\//).passThrough();
|
||||
$httpBackend.whenGET(/^lib\//).passThrough();
|
||||
|
||||
46
src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js
Normal file
46
src/Umbraco.Web.UI.Client/src/config/grid.editors.config.js
Normal file
@@ -0,0 +1,46 @@
|
||||
[
|
||||
{
|
||||
"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": "<h1>#value#</h1>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Quote",
|
||||
"alias": "quote",
|
||||
"view": "textstring",
|
||||
"icon": "icon-quote",
|
||||
"config": {
|
||||
"style": "border-left: 3px solid #ccc; padding: 10px; color: #ccc; font-family: serif; font-variant: italic; font-size: 18px",
|
||||
"markup": "<blockquote>#value#</blockquote>"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -48,7 +48,7 @@ describe('edit content controller tests', function () {
|
||||
});
|
||||
|
||||
it('it should have a tabs collection', function () {
|
||||
expect(scope.content.tabs.length).toBe(9);
|
||||
expect(scope.content.tabs.length).toBe(7);
|
||||
});
|
||||
|
||||
it('it should have a properties collection on each tab', function () {
|
||||
|
||||
@@ -229,7 +229,7 @@ describe('contentEditingHelper tests', function () {
|
||||
|
||||
//assert
|
||||
expect(changed.length).toBe(2);
|
||||
expect(changed[0].alias).toBe("list");
|
||||
expect(changed[0].alias).toBe("grid");
|
||||
expect(changed[1].alias).toBe("bodyText");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user