Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd888cab4b | |||
| 50597b5715 | |||
| f35110309a | |||
| c73860d144 |
@@ -3,37 +3,8 @@
|
||||
"browser": true
|
||||
},
|
||||
|
||||
"plugins": [
|
||||
"angular"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
"eqeqeq": 2,
|
||||
"curly": 2,
|
||||
|
||||
"no-unused-vars": 1,
|
||||
"no-eval": 1,
|
||||
"no-delete-var": 1,
|
||||
"quotes": 1,
|
||||
"dot-notation": 1,
|
||||
|
||||
"no-use-before-define": 0,
|
||||
"angular/ng_controller_as": 1,
|
||||
"angular/ng_controller_as_vm": 1,
|
||||
|
||||
|
||||
"strict": 0,
|
||||
"no-irregular-whitespace": 0,
|
||||
"no-mixed-spaces-and-tabs": 0,
|
||||
"no-multi-spaces": 0,
|
||||
"key-spacing": 0,
|
||||
"semi-spacing": 0,
|
||||
"space-infix-ops": 0,
|
||||
"comma-spacing": 0,
|
||||
"no-trailing-spaces": 0,
|
||||
"eol-last": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"camelcase": 0
|
||||
"comma-dangle": ["error", "never"]
|
||||
},
|
||||
|
||||
"globals": {
|
||||
|
||||
@@ -12,6 +12,9 @@ const imagemin = require('gulp-imagemin');
|
||||
var _ = require('lodash');
|
||||
var MergeStream = require('merge-stream');
|
||||
|
||||
// js
|
||||
const eslint = require('gulp-eslint');
|
||||
|
||||
//Less + css
|
||||
var postcss = require('gulp-postcss');
|
||||
var less = require('gulp-less');
|
||||
@@ -30,6 +33,11 @@ Helper functions
|
||||
function processJs(files, out) {
|
||||
|
||||
return gulp.src(files)
|
||||
// check for js errors
|
||||
.pipe(eslint())
|
||||
// outputs the lint results to the console
|
||||
.pipe(eslint.format())
|
||||
// sort files in stream by path or any custom sort comparator
|
||||
.pipe(sort())
|
||||
.pipe(concat(out))
|
||||
.pipe(wrap('(function(){\n%= body %\n})();'))
|
||||
|
||||
+10487
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-connect": "5.0.0",
|
||||
"gulp-eslint": "^5.0.0",
|
||||
"gulp-imagemin": "^4.1.0",
|
||||
"gulp-less": "^3.5.0",
|
||||
"gulp-ngdocs": "^0.3.0",
|
||||
|
||||
@@ -12,7 +12,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "color",
|
||||
@@ -45,12 +45,12 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "border",
|
||||
category: "Color",
|
||||
name: "Border",
|
||||
name: "Border"
|
||||
},
|
||||
{
|
||||
type: "color",
|
||||
@@ -83,7 +83,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "googlefontpicker",
|
||||
category: "Font",
|
||||
name: "Font familly",
|
||||
name: "Font familly"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -105,7 +105,7 @@ var canvasdesignerConfig = {
|
||||
name: "Margin",
|
||||
enable: ["top", "bottom"],
|
||||
schema: "#header"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -124,7 +124,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -137,7 +137,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -150,7 +150,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
@@ -163,7 +163,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "margin",
|
||||
category: "Position",
|
||||
name: "Margin",
|
||||
name: "Margin"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -177,7 +177,7 @@ var canvasdesignerConfig = {
|
||||
type: "color",
|
||||
category: "Font",
|
||||
name: "Font color",
|
||||
css: "color",
|
||||
css: "color"
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
@@ -190,7 +190,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "margin",
|
||||
category: "Position",
|
||||
name: "Margin",
|
||||
name: "Margin"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -216,7 +216,7 @@ var canvasdesignerConfig = {
|
||||
{
|
||||
type: "background",
|
||||
category: "Color",
|
||||
name: "Background",
|
||||
name: "Background"
|
||||
},
|
||||
{
|
||||
type: "padding",
|
||||
@@ -305,7 +305,7 @@ var canvasdesignerConfig = {
|
||||
name: "Background Hover",
|
||||
css: "background",
|
||||
schema: ".button-alt:hover"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -73,7 +73,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
topbordertype: 'solid',
|
||||
bottombordersize: '',
|
||||
bottombordercolor: '',
|
||||
bottombordertype: 'solid',
|
||||
bottombordertype: 'solid'
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: '',
|
||||
fontType: '',
|
||||
fontWeight: '',
|
||||
fontStyle: '',
|
||||
fontStyle: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontType: "safe",
|
||||
fontFamily: value,
|
||||
fontWeight: "normal",
|
||||
fontStyle: "normal",
|
||||
fontStyle: "normal"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -121,7 +121,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -161,7 +161,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
fontFamily: $scope.selectedFont.fontFamily,
|
||||
fontType: $scope.selectedFont.fontType,
|
||||
fontWeight: $scope.selectedFont.fontWeight,
|
||||
fontStyle: $scope.selectedFont.fontStyle,
|
||||
fontStyle: $scope.selectedFont.fontStyle
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedmargin = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedmargin = function (margintype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
leftmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
rightmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
topmarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottommarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottommarginvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedpadding = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedpadding = function (paddingtype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
leftpaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
rightpaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
toppaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottompaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottompaddingvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
|
||||
$scope.selectedradius = {
|
||||
name: "",
|
||||
value: 0,
|
||||
value: 0
|
||||
};
|
||||
|
||||
$scope.setSelectedradius = function (radiustype) {
|
||||
@@ -50,7 +50,7 @@ angular.module("Umbraco.canvasdesigner")
|
||||
topleftradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 1 ? $scope.item.defaultValue[1] : '',
|
||||
toprightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 2 ? $scope.item.defaultValue[2] : '',
|
||||
bottomleftradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 3 ? $scope.item.defaultValue[3] : '',
|
||||
bottomrightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : '',
|
||||
bottomrightradiusvalue: $scope.item.defaultValue && $scope.item.defaultValue.length > 4 ? $scope.item.defaultValue[4] : ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ angular.module('spectrumcolorpicker', [])
|
||||
scope.colorselected = initColor;
|
||||
scope.$apply();
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@
|
||||
backdropOpacity: "=?",
|
||||
highlightElement: "=?",
|
||||
highlightPreventClick: "=?",
|
||||
disableEventsOnClick: "=?",
|
||||
disableEventsOnClick: "=?"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ angular.module("umbraco.directives")
|
||||
var $container = element.find(".crop-container");
|
||||
|
||||
//default constraints for drag n drop
|
||||
var constraints = {left: {max: scope.dimensions.margin, min: scope.dimensions.margin}, top: {max: scope.dimensions.margin, min: scope.dimensions.margin}, };
|
||||
var constraints = {left: {max: scope.dimensions.margin, min: scope.dimensions.margin}, top: {max: scope.dimensions.margin, min: scope.dimensions.margin} };
|
||||
scope.constraints = constraints;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: 'views/components/umb-dropdown-item.html',
|
||||
templateUrl: 'views/components/umb-dropdown-item.html'
|
||||
};
|
||||
|
||||
return directive;
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
},
|
||||
stop: function(e, ui) {
|
||||
updateTabsSortOrder();
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
scope.sortableOptionsProperty = {
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ angular.module("umbraco.directives")
|
||||
restrict: 'A',
|
||||
replace: false,
|
||||
scope: {
|
||||
node: '=umbLaunchMiniEditor',
|
||||
node: '=umbLaunchMiniEditor'
|
||||
},
|
||||
link: function(scope, element, attrs) {
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
$http.get(url),
|
||||
'Failed to retrieve content types'
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -329,7 +329,7 @@ angular.module('umbraco.services').factory("editorState", function() {
|
||||
},
|
||||
set: function (value) {
|
||||
throw "Use editorState.set to set the value of the current entity";
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
canDelete: _.contains(intersectPermissions, 'D'), //Magic Char = D
|
||||
canMove: _.contains(intersectPermissions, 'M'), //Magic Char = M
|
||||
canPublish: _.contains(intersectPermissions, 'U'), //Magic Char = U
|
||||
canUnpublish: _.contains(intersectPermissions, 'U'), //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
canUnpublish: _.contains(intersectPermissions, 'U') //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -641,7 +641,7 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
|
||||
|
||||
//These will show up on the dialog controller's $scope under dialogOptions
|
||||
currentNode: args.node,
|
||||
currentAction: args.action,
|
||||
currentAction: args.action
|
||||
});
|
||||
|
||||
//save the currently assigned dialog so it can be removed before a new one is created
|
||||
|
||||
@@ -16,7 +16,7 @@ function LegacyDeleteController($scope, legacyResource, treeService, navigationS
|
||||
legacyResource.deleteItem({
|
||||
nodeId: $scope.currentNode.id,
|
||||
nodeType: $scope.currentNode.nodeType,
|
||||
alias: $scope.currentNode.name,
|
||||
alias: $scope.currentNode.name
|
||||
}).then(function () {
|
||||
$scope.currentNode.loading = false;
|
||||
//TODO: Need to sync tree, etc...
|
||||
|
||||
@@ -106,7 +106,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController",
|
||||
hasChildren: false,
|
||||
name: searchText,
|
||||
metaData: {
|
||||
listViewNode: child,
|
||||
listViewNode: child
|
||||
},
|
||||
cssClass: "icon umb-tree-icon sprTree icon-search",
|
||||
cssClasses: ["not-published"]
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
modalClass: "login-overlay",
|
||||
animation: "slide",
|
||||
show: true,
|
||||
callback: callback,
|
||||
callback: callback
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ angular.module("umbraco").controller('Umbraco.Dialogs.Template.QueryBuilderContr
|
||||
sort:{
|
||||
property:{
|
||||
alias: "",
|
||||
name: "",
|
||||
name: ""
|
||||
},
|
||||
direction: "ascending"
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
|
||||
},
|
||||
name: searchText,
|
||||
metaData: {
|
||||
listViewNode: child,
|
||||
listViewNode: child
|
||||
},
|
||||
cssClass: "icon-search",
|
||||
cssClasses: ["not-published"]
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ angular.module("umbraco")
|
||||
pageSize: 100,
|
||||
totalItems: 0,
|
||||
totalPages: 0,
|
||||
filter: '',
|
||||
filter: ''
|
||||
};
|
||||
|
||||
//preload selected item
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
sort: {
|
||||
property: {
|
||||
alias: "",
|
||||
name: "",
|
||||
name: ""
|
||||
},
|
||||
direction: "ascending", //This is the value for sorting sent to server
|
||||
translation: {
|
||||
|
||||
@@ -28,7 +28,7 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
|
||||
label: preVals[i].label,
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value,
|
||||
config: preVals[i].config,
|
||||
config: preVals[i].config
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
});
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ angular.module("umbraco")
|
||||
name: "1 column layout",
|
||||
sections: [
|
||||
{
|
||||
grid: 12,
|
||||
grid: 12
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -36,7 +36,7 @@ angular.module("umbraco")
|
||||
name: "2 column layout",
|
||||
sections: [
|
||||
{
|
||||
grid: 4,
|
||||
grid: 4
|
||||
},
|
||||
{
|
||||
grid: 8
|
||||
|
||||
@@ -57,10 +57,10 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
totalPages: 0,
|
||||
items: []
|
||||
};
|
||||
|
||||
|
||||
//when this is null, we don't check permissions
|
||||
$scope.currentNodePermissions = null;
|
||||
|
||||
$scope.currentNodePermissions = null;
|
||||
|
||||
if ($scope.entityType === "content") {
|
||||
//Just ensure we do have an editorState
|
||||
if (editorState.current) {
|
||||
@@ -75,9 +75,9 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
"canDelete": _.contains(currentUserPermissions, 'D'), //Magic Char = D
|
||||
"canMove": _.contains(currentUserPermissions, 'M'), //Magic Char = M
|
||||
"canPublish": _.contains(currentUserPermissions, 'U'), //Magic Char = U
|
||||
"canUnpublish": _.contains(currentUserPermissions, 'U'), //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
"canUnpublish": _.contains(currentUserPermissions, 'U') //Magic Char = Z (however UI says it can't be set, so if we can publish 'U' we can unpublish)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//when this is null, we don't check permissions
|
||||
|
||||
@@ -183,7 +183,7 @@ angular.module("umbraco")
|
||||
tagsHound.get(query, function (suggestions) {
|
||||
cb(removeCurrentTagsFromSuggestions(suggestions));
|
||||
});
|
||||
},
|
||||
}
|
||||
}).bind("typeahead:selected", function (obj, datum, name) {
|
||||
angularHelper.safeApply($scope, function () {
|
||||
addTag(datum["value"]);
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
});
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
}
|
||||
]);
|
||||
|
||||
// initial cursor placement
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
});
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
|
||||
@@ -51,17 +51,24 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
internal static string GetRootNodeDisplayName(this TreeAttribute attribute, ILocalizedTextService textService)
|
||||
{
|
||||
var label = $"[{attribute.Alias}]";
|
||||
|
||||
// try to look up a the localized tree header matching the tree alias
|
||||
var localizedLabel = textService.Localize("treeHeaders/" + attribute.Alias);
|
||||
if (string.IsNullOrEmpty(localizedLabel) == false)
|
||||
return localizedLabel;
|
||||
|
||||
// otherwise return the header if it's defined
|
||||
if (string.IsNullOrEmpty(attribute.Title) == false)
|
||||
return attribute.Title;
|
||||
|
||||
// if all fails, return this to signal that a label was not found
|
||||
return "[" + attribute.Alias + "]";
|
||||
// if the localizedLabel returns [alias] then return the title attribute from the trees.config file, if it's defined
|
||||
if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
if (string.IsNullOrEmpty(attribute.Title) == false)
|
||||
label = attribute.Title;
|
||||
}
|
||||
else
|
||||
{
|
||||
// the localizedLabel translated into something that's not just [alias], so use the translation
|
||||
label = localizedLabel;
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
internal static Attempt<Type> TryGetControllerTree(this ApplicationTree appTree)
|
||||
|
||||
Reference in New Issue
Block a user