Update Umbraco to 7.12.2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(function () {
|
||||
(function () {
|
||||
|
||||
//JavaScript extension methods on the core JavaScript objects (like String, Date, etc...)
|
||||
if (!Date.prototype.toIsoDateTimeString) {
|
||||
@@ -69,22 +69,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.htmlEncode) {
|
||||
/** htmlEncode extension method for string */
|
||||
String.prototype.htmlEncode = function () {
|
||||
//create a in-memory div, set it's inner text(which jQuery automatically encodes)
|
||||
//then grab the encoded contents back out. The div never exists on the page.
|
||||
return $('<div/>').text(this).html();
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.htmlDecode) {
|
||||
/** htmlDecode extension method for string */
|
||||
String.prototype.htmlDecode = function () {
|
||||
return $('<div/>').html(this).text();
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.startsWith) {
|
||||
/** startsWith extension method for string */
|
||||
String.prototype.startsWith = function (str) {
|
||||
@@ -100,27 +84,21 @@
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.trimStart) {
|
||||
|
||||
/** trims the start of the string*/
|
||||
String.prototype.trimStart = function (str) {
|
||||
if (this.startsWith(str)) {
|
||||
return this.substring(str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
||||
if (!String.prototype.trimEnd) {
|
||||
/** trims the start of the string*/
|
||||
String.prototype.trimStart = function (str) {
|
||||
if (this.startsWith(str)) {
|
||||
return this.substring(str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/** trims the end of the string*/
|
||||
String.prototype.trimEnd = function (str) {
|
||||
if (this.endsWith(str)) {
|
||||
return this.substring(0, this.length - str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
/** trims the end of the string*/
|
||||
String.prototype.trimEnd = function (str) {
|
||||
if (this.endsWith(str)) {
|
||||
return this.substring(0, this.length - str.length);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
if (!String.prototype.utf8Encode) {
|
||||
|
||||
@@ -348,4 +326,4 @@
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
//TODO: WE NEED TO CONVERT ALL OF THESE METHODS TO PROXY TO OUR APPLICATION SINCE MANY CUSTOM APPS USE THIS!
|
||||
|
||||
Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
|
||||
@@ -179,7 +179,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
var injector = getRootInjector();
|
||||
var navService = injector.get("navigationService");
|
||||
var localizationService = injector.get("localizationService");
|
||||
var userResource = injector.get("userResource");
|
||||
var usersResource = injector.get("usersResource");
|
||||
//var appState = injector.get("appState");
|
||||
var angularHelper = injector.get("angularHelper");
|
||||
var $rootScope = injector.get("$rootScope");
|
||||
@@ -194,7 +194,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
if (currentMenuNode) {
|
||||
if (confirm(txtConfirmDisable + ' "' + UmbClientMgr.mainTree().getActionNode().nodeName + '"?\n\n')) {
|
||||
angularHelper.safeApply($rootScope, function () {
|
||||
userResource.disableUser(currentMenuNode.nodeId).then(function () {
|
||||
usersResource.disableUsers(currentMenuNode.nodeId).then(function () {
|
||||
UmbClientMgr.mainTree().syncTree("-1," + currentMenuNode.nodeId, true);
|
||||
});
|
||||
});
|
||||
@@ -362,10 +362,28 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
return getRootScope();
|
||||
},
|
||||
|
||||
reloadLocation: function() {
|
||||
/**
|
||||
This will reload the content frame based on it's current route, if pathToMatch is specified it will only reload it if the current
|
||||
location matches the path
|
||||
*/
|
||||
reloadLocation: function(pathToMatch) {
|
||||
|
||||
var injector = getRootInjector();
|
||||
var $route = injector.get("$route");
|
||||
$route.reload();
|
||||
var doChange = true;
|
||||
if (pathToMatch) {
|
||||
var $location = injector.get("$location");
|
||||
var path = $location.path();
|
||||
if (path != pathToMatch) {
|
||||
doChange = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (doChange) {
|
||||
var $route = injector.get("$route");
|
||||
$route.reload();
|
||||
var $rootScope = injector.get("$rootScope");
|
||||
$rootScope.$apply();
|
||||
}
|
||||
},
|
||||
|
||||
closeModalWindow: function(rVal) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if (typeof Umbraco == 'undefined') var Umbraco = {};
|
||||
if (typeof Umbraco == 'undefined') var Umbraco = {};
|
||||
if (!Umbraco.Sys) Umbraco.Sys = {};
|
||||
|
||||
Umbraco.Sys.registerNamespace = function(namespace) {
|
||||
|
||||
Reference in New Issue
Block a user