diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs
index 09411f6d20..c6365ba4a2 100644
--- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs
+++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs
@@ -272,7 +272,7 @@ AnotherContentFinder
public void Resolves_Actions()
{
var actions = _typeLoader.GetActions();
- Assert.AreEqual(35, actions.Count());
+ Assert.AreEqual(34, actions.Count());
}
[Test]
diff --git a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs
index d50e940b1a..ebba8bc1cc 100644
--- a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs
+++ b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs
@@ -67,9 +67,6 @@ namespace Umbraco.Tests.Configurations
Assert.IsTrue(globalSettings.IsReservedPathOrUrl(url));
}
- [TestCase("/umbraco_client/Tree/treeIcons.css")]
- [TestCase("/umbraco_client/Tree/Themes/umbraco/style.css")]
- [TestCase("/umbraco_client/scrollingmenu/style.css")]
[TestCase("/base/somebasehandler")]
[TestCase("/")]
[TestCase("/home.aspx")]
diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
index 9fb908acf5..5f42c8d3ae 100644
--- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
+++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
@@ -63,7 +63,6 @@ namespace Umbraco.Tests.Routing
// do not test for /base here as it's handled before EnsureUmbracoRoutablePage is called
[TestCase("/umbraco_client/Tree/treeIcons.css", false)]
[TestCase("/umbraco_client/Tree/Themes/umbraco/style.css?cdv=37", false)]
- [TestCase("/umbraco_client/scrollingmenu/style.css?cdv=37", false)]
[TestCase("/umbraco/umbraco.aspx", false)]
[TestCase("/umbraco/editContent.aspx", false)]
[TestCase("/install/default.aspx", false)]
@@ -89,7 +88,6 @@ namespace Umbraco.Tests.Routing
[TestCase("/favicon.ico", true)]
[TestCase("/umbraco_client/Tree/treeIcons.css", true)]
[TestCase("/umbraco_client/Tree/Themes/umbraco/style.css?cdv=37", true)]
- [TestCase("/umbraco_client/scrollingmenu/style.css?cdv=37", true)]
[TestCase("/base/somebasehandler", false)]
[TestCase("/", false)]
[TestCase("/home.aspx", false)]
diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json
index 71b393ae9c..b88b6faeec 100644
--- a/src/Umbraco.Web.UI.Client/bower.json
+++ b/src/Umbraco.Web.UI.Client/bower.json
@@ -31,6 +31,8 @@
"jquery": "2.2.4",
"jquery-ui": "~1.12.0",
"jquery-migrate": "1.4.0",
+ "jquery-validate": "~1.17.0",
+ "jquery-validation-unobtrusive": "3.2.10",
"angular-dynamic-locale": "~0.1.36",
"ng-file-upload": "~12.2.13",
"tinymce": "~4.7.1",
@@ -53,39 +55,41 @@
"ace-builds"
],
"sources": {
- "moment": [
- "bower_components/moment/min/moment.min.js",
- "bower_components/moment/min/moment-with-locales.js",
- "bower_components/moment/min/moment-with-locales.min.js",
- "bower_components/moment/locale/*.js"
- ],
- "underscore": [
- "bower_components/underscore/underscore-min.js",
- "bower_components/underscore/underscore-min.map"
- ],
- "jquery": [
- "bower_components/jquery/dist/jquery.min.js",
- "bower_components/jquery/dist/jquery.min.map"
- ],
- "angular-dynamic-locale": [
- "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js",
- "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js.map"
- ],
- "angular-local-storage": [
- "bower_components/angular-local-storage/dist/angular-local-storage.min.js",
- "bower_components/angular-local-storage/dist/angular-local-storage.min.js.map"
- ],
- "tinymce": [
- "bower_components/tinymce/tinymce.min.js"
- ],
- "angular-i18n": "bower_components/angular-i18n/angular-locale_*.js",
- "typeahead.js": "bower_components/typeahead.js/dist/typeahead.bundle.min.js",
- "rgrove-lazyload": "bower_components/rgrove-lazyload/lazyload.js",
- "ng-file-upload": "bower_components/ng-file-upload/ng-file-upload.min.js",
- "jquery-ui": "bower_components/jquery-ui/jquery-ui.min.js",
- "jquery-migrate": "bower_components/jquery-migrate/jquery-migrate.min.js",
- "clipboard": "bower_components/clipboard/dist/clipboard.min.js",
- "animejs": "bower_components/animejs/anime.min.js"
+ "moment": [
+ "bower_components/moment/min/moment.min.js",
+ "bower_components/moment/min/moment-with-locales.js",
+ "bower_components/moment/min/moment-with-locales.min.js",
+ "bower_components/moment/locale/*.js"
+ ],
+ "underscore": [
+ "bower_components/underscore/underscore-min.js",
+ "bower_components/underscore/underscore-min.map"
+ ],
+ "jquery": [
+ "bower_components/jquery/dist/jquery.min.js",
+ "bower_components/jquery/dist/jquery.min.map"
+ ],
+ "angular-dynamic-locale": [
+ "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js",
+ "bower_components/angular-dynamic-locale/tmhDynamicLocale.min.js.map"
+ ],
+ "angular-local-storage": [
+ "bower_components/angular-local-storage/dist/angular-local-storage.min.js",
+ "bower_components/angular-local-storage/dist/angular-local-storage.min.js.map"
+ ],
+ "tinymce": [
+ "bower_components/tinymce/tinymce.min.js"
+ ],
+ "angular-i18n": "bower_components/angular-i18n/angular-locale_*.js",
+ "typeahead.js": "bower_components/typeahead.js/dist/typeahead.bundle.min.js",
+ "rgrove-lazyload": "bower_components/rgrove-lazyload/lazyload.js",
+ "ng-file-upload": "bower_components/ng-file-upload/ng-file-upload.min.js",
+ "jquery-ui": "bower_components/jquery-ui/jquery-ui.min.js",
+ "jquery-migrate": "bower_components/jquery-migrate/jquery-migrate.min.js",
+ "clipboard": "bower_components/clipboard/dist/clipboard.min.js",
+ "animejs": "bower_components/animejs/anime.min.js",
+ "jquery-validate": "bower_components/jquery-validate/dist/jquery.validate.min.js",
+ "jquery-validation-unobtrusive": "bower_components/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js"
}
},
"devDependencies": {
diff --git a/src/Umbraco.Web.UI.Client/src/less/tables.less b/src/Umbraco.Web.UI.Client/src/less/tables.less
index 5f1acfaf5d..fa8a44ec47 100644
--- a/src/Umbraco.Web.UI.Client/src/less/tables.less
+++ b/src/Umbraco.Web.UI.Client/src/less/tables.less
@@ -66,11 +66,12 @@ table {
// CONDENSED TABLE W/ HALF PADDING
// -------------------------------
-.table-condensed {
- th,
- td {
- padding: 4px 5px;
- }
+.table-condensed tbody td {
+ padding: 5px 10px;
+}
+
+.table-condensed thead th {
+ padding: 10px;
}
@@ -249,3 +250,8 @@ table th[class*="span"],
background-color: darken(@infoBackground, 5%);
}
}
+
+// table sortable
+.table-sortable tbody tr {
+ cursor: move;
+}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/assigndomain.html b/src/Umbraco.Web.UI.Client/src/views/content/assigndomain.html
new file mode 100644
index 0000000000..0283459483
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/content/assigndomain.html
@@ -0,0 +1,24 @@
+
+
+
+ UI magic to be done...
+
+
+
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.assigndomain.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.assigndomain.controller.js
new file mode 100644
index 0000000000..6f72543cfc
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/content/content.assigndomain.controller.js
@@ -0,0 +1,17 @@
+(function () {
+ "use strict";
+
+ function AssignDomainController($scope) {
+
+ var vm = this;
+ vm.closeDialog = closeDialog;
+
+ function closeDialog() {
+ $scope.nav.hideDialog();
+ }
+
+ }
+
+ angular.module("umbraco").controller("Umbraco.Editors.Content.AssignDomainController", AssignDomainController);
+
+})();
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.sort.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.sort.controller.js
new file mode 100644
index 0000000000..4581b78c8c
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/content/content.sort.controller.js
@@ -0,0 +1,82 @@
+(function () {
+ "use strict";
+
+ function ContentSortController($scope, $filter, contentResource, navigationService) {
+
+ var vm = this;
+ var parentId = $scope.currentNode.parentId ? $scope.currentNode.parentId : "-1";
+ var id = $scope.currentNode.id;
+
+ vm.loading = false;
+ vm.children = [];
+ vm.saveButtonState = "init";
+ vm.sortOrder = {};
+ vm.sortableOptions = {
+ distance: 10,
+ tolerance: "pointer",
+ opacity: 0.7,
+ scroll: true,
+ cursor: "move",
+ helper: fixSortableHelper,
+ update: function() {
+ // clear the sort order when drag and drop is used
+ vm.sortOrder.column = "";
+ vm.sortOrder.reverse = false;
+ }
+ };
+
+ vm.save = save;
+ vm.sort = sort;
+
+ function onInit() {
+ vm.loading = true;
+ contentResource.getChildren(id)
+ .then(function(data){
+ vm.children = data.items;
+ vm.loading = false;
+ });
+ }
+
+ function save() {
+ vm.saveButtonState = "busy";
+
+ var args = {
+ parentId: parentId,
+ sortedIds: _.map(vm.children, function(child){ return child.id; })
+ };
+
+ contentResource.sort(args)
+ .then(function(){
+ navigationService.syncTree({ tree: "content", path: $scope.currentNode.path, forceReload: true, activate: false });
+ vm.saveButtonState = "success";
+ }, function(error) {
+ vm.error = error;
+ vm.saveButtonState = "error";
+ });
+ }
+
+ function fixSortableHelper(e, ui) {
+ // keep the correct width of each table cell when sorting
+ ui.children().each(function () {
+ $(this).width($(this).width());
+ });
+ return ui;
+ }
+
+ function sort(column) {
+ // reverse if it is already ordered by that column
+ if(vm.sortOrder.column === column) {
+ vm.sortOrder.reverse = !vm.sortOrder.reverse
+ } else {
+ vm.sortOrder.column = column;
+ vm.sortOrder.reverse = false;
+ }
+ vm.children = $filter('orderBy')(vm.children, vm.sortOrder.column, vm.sortOrder.reverse);
+ }
+
+ onInit();
+
+ }
+
+ angular.module("umbraco").controller("Umbraco.Editors.Content.SortController", ContentSortController);
+})();
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/sort.html b/src/Umbraco.Web.UI.Client/src/views/content/sort.html
new file mode 100644
index 0000000000..fd3eae1e7a
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/content/sort.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
{{vm.error.errorMsg}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.sort.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.sort.controller.js
new file mode 100644
index 0000000000..e7d3cc2dfb
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/media/media.sort.controller.js
@@ -0,0 +1,82 @@
+(function () {
+ "use strict";
+
+ function MediaSortController($scope, $filter, mediaResource, navigationService) {
+
+ var vm = this;
+ var parentId = $scope.currentNode.parentId ? $scope.currentNode.parentId : "-1";
+ var id = $scope.currentNode.id;
+
+ vm.loading = false;
+ vm.children = [];
+ vm.saveButtonState = "init";
+ vm.sortOrder = {};
+ vm.sortableOptions = {
+ distance: 10,
+ tolerance: "pointer",
+ opacity: 0.7,
+ scroll: true,
+ cursor: "move",
+ helper: fixSortableHelper,
+ update: function() {
+ // clear the sort order when drag and drop is used
+ vm.sortOrder.column = "";
+ vm.sortOrder.reverse = false;
+ }
+ };
+
+ vm.save = save;
+ vm.sort = sort;
+
+ function onInit() {
+ vm.loading = true;
+ mediaResource.getChildren(id)
+ .then(function(data){
+ vm.children = data.items;
+ vm.loading = false;
+ });
+ }
+
+ function save() {
+ vm.saveButtonState = "busy";
+
+ var args = {
+ parentId: parentId,
+ sortedIds: _.map(vm.children, function(child){ return child.id; })
+ };
+
+ mediaResource.sort(args)
+ .then(function(){
+ navigationService.syncTree({ tree: "media", path: $scope.currentNode.path, forceReload: true, activate: false });
+ vm.saveButtonState = "success";
+ }, function(error) {
+ vm.error = error;
+ vm.saveButtonState = "error";
+ });
+ }
+
+ function fixSortableHelper(e, ui) {
+ // keep the correct width of each table cell when sorting
+ ui.children().each(function () {
+ $(this).width($(this).width());
+ });
+ return ui;
+ }
+
+ function sort(column) {
+ // reverse if it is already ordered by that column
+ if(vm.sortOrder.column === column) {
+ vm.sortOrder.reverse = !vm.sortOrder.reverse
+ } else {
+ vm.sortOrder.column = column;
+ vm.sortOrder.reverse = false;
+ }
+ vm.children = $filter('orderBy')(vm.children, vm.sortOrder.column, vm.sortOrder.reverse);
+ }
+
+ onInit();
+
+ }
+
+ angular.module("umbraco").controller("Umbraco.Editors.Media.SortController", MediaSortController);
+})();
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/sort.html b/src/Umbraco.Web.UI.Client/src/views/media/sort.html
new file mode 100644
index 0000000000..14bf92ec42
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/media/sort.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
{{vm.error.errorMsg}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index db6d974fc2..c90722c08c 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -180,14 +180,6 @@
ChangeDocType.aspx
-
- sort.aspx
- ASPXCodeBehind
-
-
- sort.aspx
- ASPXCodeBehind
-
default.Master
ASPXCodeBehind
@@ -348,31 +340,8 @@
ASPXCodeBehind
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -385,20 +354,10 @@
-
-
-
-
-
-
-
-
-
-
@@ -408,8 +367,6 @@
-
-
Designer
@@ -500,7 +457,6 @@
-
@@ -512,27 +468,12 @@
Form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
index d9606d8af7..dd17f9d6f5 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
@@ -10,9 +10,9 @@
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
- Html.RequiresJs("/umbraco_client/ui/jquery.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
var success = TempData["ProfileUpdateSuccess"] != null;
}
@@ -63,4 +63,4 @@
Save
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
index 5dfdfb36bd..c3fcf04ba3 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
@@ -8,12 +8,12 @@
@{
var loginModel = new LoginModel();
-
+
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
- Html.RequiresJs("/umbraco_client/ui/jquery.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
}
@* NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed *@
@@ -38,4 +38,4 @@
Login
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
index 7c7c9262d0..d9d2c11448 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
@@ -10,12 +10,12 @@
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
- Html.RequiresJs("/umbraco_client/ui/jquery.js");
+ Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
var logoutModel = new PostRedirectModel();
-
+
@*
Here you can specify a redirect URL for after logging out, by default umbraco will simply
redirect to the current page. Example to redirect to the home page:
@@ -40,4 +40,4 @@
@Html.HiddenFor(m => logoutModel.RedirectUrl)
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
index a3fb34d4bf..51c0cc0443 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
@@ -34,9 +34,9 @@
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
- Html.RequiresJs("/umbraco_client/ui/jquery.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
- Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
var success = TempData["FormSuccess"] != null;
}
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
index 86b27d0ff3..a195a1d23a 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
@@ -1368,6 +1368,7 @@ To manage your website, simply open the Umbraco back office and start adding con
Sorting complete.
Drag the different items up or down below to set how they should be arranged. Or click the column headers to sort the entire collection of items
+ This node has no child nodes to sort
Validation
diff --git a/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx b/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx
index 399d2cff3a..ac59074de3 100644
--- a/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx
+++ b/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx
@@ -12,13 +12,7 @@
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx.designer.cs b/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx.designer.cs
index a08f6c3392..5bfa6983d1 100644
--- a/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx.designer.cs
+++ b/src/Umbraco.Web.UI/Umbraco/dashboard/UserControlProxy.aspx.designer.cs
@@ -3,15 +3,15 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Dashboard {
-
-
+
+
public partial class UserControlProxy {
-
+
///
/// ClientLoader control.
///
@@ -20,7 +20,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::Umbraco.Web.UI.JavaScript.UmbracoClientDependencyLoader ClientLoader;
-
+
///
/// CssInclude1 control.
///
@@ -29,7 +29,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::ClientDependency.Core.Controls.CssInclude CssInclude1;
-
+
///
/// JsInclude1 control.
///
@@ -38,16 +38,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
-
- ///
- /// JsInclude3 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;
-
+
///
/// JsInclude4 control.
///
@@ -56,43 +47,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::ClientDependency.Core.Controls.JsInclude JsInclude4;
-
- ///
- /// JsInclude6 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude6;
-
- ///
- /// JsInclude11 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude11;
-
- ///
- /// JsInclude12 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude12;
-
- ///
- /// JsInclude2 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude2;
-
+
///
/// form1 control.
///
@@ -101,7 +56,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// container control.
///
diff --git a/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs b/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs
index 744b36720c..1379e1003b 100644
--- a/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs
+++ b/src/Umbraco.Web.UI/Umbraco/developer/Macros/EditMacro.aspx.cs
@@ -217,11 +217,11 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Macros
Parameters = TabView1.NewTabPage("Parameters");
Parameters.Controls.Add(Panel2);
- var save = TabView1.Menu.NewButton();
- save.ButtonType = MenuButtonType.Primary;
- save.Text = Services.TextService.Localize("save");
- save.ID = "save";
- save.Click += Save_Click;
+ //var save = TabView1.Menu.NewButton();
+ //save.ButtonType = MenuButtonType.Primary;
+ //save.Text = Services.TextService.Localize("save");
+ //save.ID = "save";
+ //save.Click += Save_Click;
}
void Save_Click(object sender, EventArgs e)
diff --git a/src/Umbraco.Web.UI/Umbraco/dialogs/AssignDomain2.aspx b/src/Umbraco.Web.UI/Umbraco/dialogs/AssignDomain2.aspx
index 82faad7c36..60601d1ac0 100644
--- a/src/Umbraco.Web.UI/Umbraco/dialogs/AssignDomain2.aspx
+++ b/src/Umbraco.Web.UI/Umbraco/dialogs/AssignDomain2.aspx
@@ -6,7 +6,7 @@
-
+
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Umbraco/dialogs/umbracoField.aspx b/src/Umbraco.Web.UI/Umbraco/dialogs/umbracoField.aspx
deleted file mode 100644
index 07eee95543..0000000000
--- a/src/Umbraco.Web.UI/Umbraco/dialogs/umbracoField.aspx
+++ /dev/null
@@ -1,141 +0,0 @@
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="umbracoField.aspx.cs"
- AutoEventWireup="True" Inherits="umbraco.dialogs.umbracoField" %>
-
-<%@ Import Namespace="Umbraco.Web" %>
-<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx b/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx
deleted file mode 100644
index 7af2b34b51..0000000000
--- a/src/Umbraco.Web.UI/Umbraco/dialogs/viewAuditTrail.aspx
+++ /dev/null
@@ -1,73 +0,0 @@
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master"Codebehind="viewAuditTrail.aspx.cs" AutoEventWireup="True"
- Inherits="umbraco.presentation.umbraco.dialogs.viewAuditTrail" %>
-<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%=Services.TextService.Localize("action")%>
-
-
-
- <%# FormatAction(DataBinder.Eval(Container.DataItem, "LogType", "{0}")) %>
-
-
-
-
-
- <%=Services.TextService.Localize("user")%>
-
-
-
- <%--TODO: N+1 !!!!!!!!!!!!--%>
- <%# Services.UserService.GetUserById(int.Parse(DataBinder.Eval(Container.DataItem, "UserId", "{0}"))).Name%>
-
-
-
-
-
- <%=Services.TextService.Localize("date")%>
-
-
-
- <%# DataBinder.Eval(Container.DataItem, "Timestamp", "{0:D} {0:T}") %>
-
-
-
-
-
- <%=Services.TextService.Localize("comment")%>
-
-
-
- <%# DataBinder.Eval(Container.DataItem, "Comment", "{0}") %>
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master
index e48ec9175b..d74a41d637 100644
--- a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master
+++ b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoDialog.Master
@@ -20,10 +20,7 @@
-
-
-
-
+
diff --git a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master
index 5d2bf645fc..380ed3d898 100644
--- a/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master
+++ b/src/Umbraco.Web.UI/Umbraco/masterpages/umbracoPage.Master
@@ -20,9 +20,6 @@
-
-
-
diff --git a/src/Umbraco.Web.UI/Umbraco/settings/DictionaryItemList.aspx b/src/Umbraco.Web.UI/Umbraco/settings/DictionaryItemList.aspx
deleted file mode 100644
index 80b505f382..0000000000
--- a/src/Umbraco.Web.UI/Umbraco/settings/DictionaryItemList.aspx
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DictionaryItemList.aspx.cs"
- Inherits="umbraco.presentation.settings.DictionaryItemList" MasterPageFile="../masterpages/umbracoPage.Master" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Umbraco/settings/EditDictionaryItem.aspx b/src/Umbraco.Web.UI/Umbraco/settings/EditDictionaryItem.aspx
deleted file mode 100644
index ffb5ae035d..0000000000
--- a/src/Umbraco.Web.UI/Umbraco/settings/EditDictionaryItem.aspx
+++ /dev/null
@@ -1,14 +0,0 @@
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
-
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
- CodeBehind="EditDictionaryItem.aspx.cs" AutoEventWireup="True" Inherits="umbraco.settings.EditDictionaryItem" %>
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/Extensions.js b/src/Umbraco.Web.UI/umbraco_client/Application/Extensions.js
deleted file mode 100644
index 9fddaad998..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/Extensions.js
+++ /dev/null
@@ -1,403 +0,0 @@
-(function ($) {
-
- //extensions to base classes such as String and extension methods for jquery.
- //NOTE: jquery must be loaded before this file.
-
- //create guid object on the window (which makes it global)
- if (window.Guid == null) {
- window.Guid = {
- generate: function () {
- ///generates a new Guid
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
- var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
- return v.toString(16);
- });
- }
- };
- }
-
- if (!window.__debug__) {
- window.__debug__ = function (msg, category, isErr) {
- ///global method to send debug statements to console that is cross browser (or at least checks if its possible)
-
- if (((typeof console) != "undefined") && console.log && console.error) {
- if (isErr) console.error(category + ": " + msg);
- else console.log(category + ": " + msg);
- }
- };
- }
-
- if (!window.location.getParams) {
- var pl = /\+/g; // Regex for replacing addition symbol with a space
- var search = /([^&=]+)=?([^&]*)/g;
- var decode = function(s) { return decodeURIComponent(s.replace(pl, " ")); };
-
- window.location.getParams = function() {
- var match;
- var query = window.location.search.substring(1);
-
- var urlParams = {};
- while (match = search.exec(query))
- urlParams[decode(match[1])] = decode(match[2]);
-
- return urlParams;
- }
- }
-
- if (!String.prototype.startsWith) {
- String.prototype.startsWith = function (str) {
- ///startsWith extension method for string
-
- return this.substr(0, str.length) === str;
- };
- }
-
- if (!String.prototype.endsWith) {
- String.prototype.endsWith = function (str) {
- ///endsWith extension method for string
-
- return this.substr(this.length - str.length) === str;
- };
- }
-
- if (!String.prototype.utf8Encode) {
- String.prototype.utf8Encode = function () {
- ///UTF8 encoder for string
-
- var str = this.replace(/\r\n/g, "\n");
- var utftext = "";
- for (var n = 0; n < str.length; n++) {
- var c = str.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- }
- else if ((c > 127) && (c < 2048)) {
- utftext += String.fromCharCode((c >> 6) | 192);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- else {
- utftext += String.fromCharCode((c >> 12) | 224);
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- }
- return utftext;
- };
- }
-
- if (!String.prototype.utf8Decode) {
- String.prototype.utf8Decode = function () {
- var utftext = this;
- var string = "";
- var i = 0;
- var c = c1 = c2 = 0;
-
- while (i < utftext.length) {
-
- c = utftext.charCodeAt(i);
-
- if (c < 128) {
- string += String.fromCharCode(c);
- i++;
- }
- else if ((c > 191) && (c < 224)) {
- c2 = utftext.charCodeAt(i + 1);
- string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
- i += 2;
- }
- else {
- c2 = utftext.charCodeAt(i + 1);
- c3 = utftext.charCodeAt(i + 2);
- string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
- i += 3;
- }
-
- }
-
- return string;
- };
- }
-
- if (!String.prototype.base64Encode) {
- String.prototype.base64Encode = function () {
- ///Base64 encoder for string
-
- var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var output = "";
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
- var i = 0;
-
- var input = this.utf8Encode();
-
- while (i < input.length) {
-
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
-
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
- enc4 = chr3 & 63;
-
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
-
- output = output +
- keyStr.charAt(enc1) + keyStr.charAt(enc2) +
- keyStr.charAt(enc3) + keyStr.charAt(enc4);
-
- }
-
- return output;
- };
- }
-
- if (!String.prototype.base64Decode) {
- String.prototype.base64Decode = function () {
- ///Base64 decoder for string
-
- var input = this;
- var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var output = "";
- var chr1, chr2, chr3;
- var enc1, enc2, enc3, enc4;
- var i = 0;
-
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
-
- while (i < input.length) {
-
- enc1 = keyStr.indexOf(input.charAt(i++));
- enc2 = keyStr.indexOf(input.charAt(i++));
- enc3 = keyStr.indexOf(input.charAt(i++));
- enc4 = keyStr.indexOf(input.charAt(i++));
-
- chr1 = (enc1 << 2) | (enc2 >> 4);
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
- chr3 = ((enc3 & 3) << 6) | enc4;
-
- output = output + String.fromCharCode(chr1);
-
- if (enc3 != 64) {
- output = output + String.fromCharCode(chr2);
- }
- if (enc4 != 64) {
- output = output + String.fromCharCode(chr3);
- }
-
- }
-
- return output.utf8Decode();
-
- };
- }
-
-
- if (!Math.randomRange) {
- Math.randomRange = function (from, to) {
- ///randomRange extension for math
-
- return Math.floor(Math.random() * (to - from + 1) + from);
- };
- }
-
- if (!String.prototype.toCamelCase) {
- String.prototype.toCamelCase = function () {
- ///toCamelCase extension method for string
-
- var s = this.toPascalCase();
- if ($.trim(s) == "")
- return "";
- if (s.length > 1) {
- var regex = /^([A-Z]*)([A-Z].*)/g;
- if (s.match(regex)) {
- var match = regex.exec(s);
- s = match[1].toLowerCase() + match[2];
- s = s.substr(0, 1).toLowerCase() + s.substr(1);
- }
- } else {
- s = s.toLowerCase();
- }
- return s;
- };
- }
-
- if (!String.prototype.toPascalCase) {
- String.prototype.toPascalCase = function () {
- ///toPascalCase extension method for string
-
- var s = "";
- $.each($.trim(this).split(/[\s\.-]+/g), function (idx, val) {
- if ($.trim(val) == "")
- return;
- if (val.length > 1)
- s += val.substr(0, 1).toUpperCase() + val.substr(1);
- else
- s += val.toUpperCase();
- });
- return s;
- };
- }
-
- if (!String.prototype.toUmbracoAlias) {
- String.prototype.toUmbracoAlias = function () {
- //////toUmbracoAlias extension method for string
-
- var s = this.replace(/[^a-zA-Z0-9\s\.-]+/g, ''); // Strip none alphanumeric chars
- return s.toCamelCase(); // Convert to camelCase
- };
- }
-
- if (!String.prototype.toFunction) {
- String.prototype.toFunction = function () {
- var arr = this.split(".");
- var fn = (window || this);
- for (var i = 0, len = arr.length; i < len; i++) {
- fn = fn[arr[i]];
- }
- if (typeof fn !== "function") {
- throw new Error("function not found");
- }
- return fn;
- };
- }
-
- //sets defaults for ajax
- $.ajaxSetup({
- dataType: 'json',
- cache: false,
- contentType: 'application/json; charset=utf-8',
- error: function (x, t, e) {
- if (x.status.toString().startsWith("500")) {
- //show ysod overlay if we can
- if (UmbClientMgr) {
- var startIndex = x.responseText.indexOf("");
- var body = x.responseText.substring(startIndex, endIndex + 7);
- var $div = $(body.replace("", "").replace("", "
"));
- $div.appendTo($(UmbClientMgr.mainWindow().document.getElementsByTagName("body")[0]));
- UmbClientMgr.openModalWindowForContent($div, "ysod", true, 640, 640, null, null, null, function() {
- //remove the $div
- $div.closest(".umbModalBox").remove();
- });
- }
- else {
- alert("Unhandled exception occurred.\nStatus: " + x.status + "\nMessage: " + x.statusText + "\n\n" + x.responseText);
- }
- }
- }
- });
-
- $.fn.getAllAttributes = function () {
- ///extension method to get all attributes of a selected element
-
- if ($(this).length != 1) {
- throw "the getAllAttributes method can only be called when matching one jQuery selector";
- };
- var el = $(this).get(0);
- var arr = [];
- for (var i = 0, attrs = el.attributes; i < attrs.length; i++) {
- arr.push({ name: attrs.item(i).nodeName, value: attrs.item(i).nodeValue });
- }
- return arr;
- };
-
- $.fn.outerHtml = function () {
- ///extension to get the 'outer html' of an element
-
- if ($(this).length != 1) {
- throw "the getAllAttributes method can only be called when matching one jQuery selector";
- };
- var nodeName = $(_opts.content).get(0).nodeName.toLowerCase();
- //start creating raw html
- var outerHtml = "<" + nodeName;
- //get all the attributes/values from the original element and add them to the new one
- var allAttributes = $(_opts.content).getAllAttributes();
- for (var a in allAttributes) {
- outerHtml += " " + allAttributes[a].name + "='" + allAttributes[a].value + "'";
- }
- outerHtml += ">";
- outerHtml += $(_opts.content).html();
- outerHtml += "" + nodeName + ">";
- return outerHtml;
- };
-
- $.fn.focusFirst = function () {
- ///extension to focus the first editable field in a form
-
- return $(this).each(function () {
- if ($(this).get(0).nodeName.toLowerCase() != "form") {
- throw "The focusFirst method can only be applied to a form element";
- }
- var first = $(this).find(":input:enabled:visible").not(":submit").not(":button").not(":file").not(":image").not(":radio");
- if (first.length > 0) {
- $(first[0]).focus();
- }
- });
- };
-
- $.fn.getAttributes = function () {
- ///Extension method to return all of the attributes for an element
-
- var attributes = [];
-
- if (!this.length)
- return this;
-
- $.each(this[0].attributes, function (index, attr) {
- attributes.push({ name: attr.name, value: attr.value });
- });
-
- return attributes;
- };
-
-
- //defaults that need to be set on ready
- $(document).ready(function () {
-
- //adds a default ignore parameter to jquery validation
- if ($.validator) {
- $.validator.setDefaults({ ignore: ".ignore" });
- }
-
- //adds a "re-parse" method to the Unobtrusive JS framework since Parse doesn't actually reparse
- if ($.validator && $.validator.unobtrusive) {
- $.validator.unobtrusive.reParse = function ($selector) {
- $selector.removeData("validator");
- $.validator.unobtrusive.parse($selector);
- };
- }
-
- });
-
- //This sets the default jquery ajax headers to include our csrf token, we
- // need to user the beforeSend method because our token changes per user/login so
- // it cannot be static
- $.ajaxSetup({
- beforeSend: function (xhr) {
-
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length === 2)
- return parts.pop().split(";").shift();
- return null;
- }
-
- var cookieVal = getCookie("UMB-XSRF-TOKEN");
- if (cookieVal) {
- xhr.setRequestHeader("X-UMB-XSRF-TOKEN", cookieVal);
- }
-
- var queryString = window.location.getParams();
- if (queryString.umbDebug === "true") {
- xhr.setRequestHeader("X-UMB-DEBUG", cookieVal);
- }
- }
- });
-
-})(jQuery);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery-fieldselection.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery-fieldselection.js
deleted file mode 100644
index dc4dcee5c0..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery-fieldselection.js
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// jQuery plugin: fieldSelection - v0.1.0 - last change: 2006-12-16
-// (c) 2006 Alex Brem - http://blog.0xab.cd
-//
-
-(function() {
-
- var fieldSelection = {
-
- getSelection: function() {
-
- var e = this.jquery ? this[0] : this;
-
- return (
-
- // mozilla or dom 3.0
- ('selectionStart' in e && function() {
- var l = e.selectionEnd - e.selectionStart;
- return { start: e.selectionStart, end: e.selectionEnd, length: l, text: e.value.substr(e.selectionStart, l) };
- }) ||
-
- // exploder
- (document.selection && function() {
-
- e.focus();
-
- var r = document.selection.createRange();
- if (r == null) {
- return { start: 0, end: e.value.length, length: 0 }
- }
-
- var re = e.createTextRange();
- var rc = re.duplicate();
- re.moveToBookmark(r.getBookmark());
- rc.setEndPoint('EndToStart', re);
-
- return { start: rc.text.length, end: rc.text.length + r.text.length, length: r.text.length, text: r.text };
- }) ||
-
- // browser not supported
- function() {
- return { start: 0, end: e.value.length, length: 0 };
- }
-
- )();
-
- },
-
- replaceSelection: function() {
-
- var e = this.jquery ? this[0] : this;
- var text = arguments[0] || '';
-
- return (
-
- // mozilla or dom 3.0
- ('selectionStart' in e && function() {
- e.value = e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length);
- return this;
- }) ||
-
- // exploder
- (document.selection && function() {
- e.focus();
- document.selection.createRange().text = text;
- return this;
- }) ||
-
- // browser not supported
- function() {
- e.value += text;
- return this;
- }
-
- )();
-
- }
-
- };
-
- jQuery.each(fieldSelection, function(i) { jQuery.fn[i] = this; });
-
-})();
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.cookie.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.cookie.js
deleted file mode 100644
index f27f7df16c..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.cookie.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // CAUTION: Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason...
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.hotkeys.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.hotkeys.js
deleted file mode 100644
index fbd71c71ec..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.hotkeys.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * jQuery Hotkeys Plugin
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Based upon the plugin by Tzury Bar Yochay:
- * http://github.com/tzuryby/hotkeys
- *
- * Original idea by:
- * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
-*/
-
-(function(jQuery){
-
- jQuery.hotkeys = {
- version: "0.8",
-
- specialKeys: {
- 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
- 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
- 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
- 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
- },
-
- shiftNums: {
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
- ".": ">", "/": "?", "\\": "|"
- }
- };
-
- function keyHandler( handleObj ) {
- // Only care when a possible input has been specified
- if ( typeof handleObj.data !== "string" ) {
- return;
- }
-
- var origHandler = handleObj.handler,
- keys = handleObj.data.toLowerCase().split(" ");
-
- handleObj.handler = function( event ) {
- // Don't fire in text-accepting inputs that we didn't directly bind to
- if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
- event.target.type === "text") ) {
- return;
- }
-
- // Keypress represents characters, not special keys
- var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
- character = String.fromCharCode( event.which ).toLowerCase(),
- key, modif = "", possible = {};
-
- // check combinations (alt|ctrl|shift+anything)
- if ( event.altKey && special !== "alt" ) {
- modif += "alt+";
- }
-
- if ( event.ctrlKey && special !== "ctrl" ) {
- modif += "ctrl+";
- }
-
- // TODO: Need to make sure this works consistently across platforms
- if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
- modif += "meta+";
- }
-
- if ( event.shiftKey && special !== "shift" ) {
- modif += "shift+";
- }
-
- if ( special ) {
- possible[ modif + special ] = true;
-
- } else {
- possible[ modif + character ] = true;
- possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
-
- // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
- if ( modif === "shift+" ) {
- possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
- }
- }
-
- for ( var i = 0, l = keys.length; i < l; i++ ) {
- if ( possible[ keys[i] ] ) {
- return origHandler.apply( this, arguments );
- }
- }
- };
- }
-
- jQuery.each([ "keydown", "keyup", "keypress" ], function() {
- jQuery.event.special[ this ] = { add: keyHandler };
- });
-
-})( jQuery );
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.metadata.min.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.metadata.min.js
deleted file mode 100644
index 1490a7e64e..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.metadata.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Metadata - jQuery plugin for parsing metadata from elements
- *
- * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $
- *
- */
-(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)data=attr;}if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.min.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.min.js
deleted file mode 100644
index 85afad5380..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery Validation Plugin - v1.10.0 - 9/7/2012
-* https://github.com/jzaefferer/jquery-validation
-* Copyright (c) 2012 Jörn Zaefferer; Licensed MIT, GPL */
-(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d;return c.settings.submitHandler?(c.submitButton&&(d=a(" ").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)),c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){if(a(this[0]).is("form"))return this.validate().form();var b=!0,c=a(this[0].form).validate();return this.each(function(){b&=c.element(this)}),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d=this[0];if(b){var e=a.data(d.form,"validator").settings,f=e.rules,g=a.validator.staticRules(d);switch(b){case"add":a.extend(g,a.validator.normalizeRule(c)),f[d.name]=g,c.messages&&(e.messages[d.name]=a.extend(e.messages[d.name],c.messages));break;case"remove":if(!c)return delete f[d.name],g;var h={};return a.each(c.split(/\s/),function(a,b){h[b]=g[b],delete g[b]}),h}}var i=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(d),a.validator.classRules(d),a.validator.attributeRules(d),a.validator.staticRules(d)),d);if(i.required){var j=i.required;delete i.required,i=a.extend({required:j},i)}return i}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+b.value)},filled:function(b){return!!a.trim(""+b.value)},unchecked:function(a){return!a.checked}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return arguments.length===1?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),c)}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a,b){this.lastActive=a,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a,b){!this.checkable(a)&&(a.name in this.submitted||!this.optional(a))&&this.element(a)},onkeyup:function(a,b){if(b.which===9&&this.elementValue(a)==="")return;(a.name in this.submitted||a===this.lastActive)&&this.element(a)},onclick:function(a,b){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){b.type==="radio"?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){b.type==="radio"?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function d(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,"");c.settings[d]&&c.settings[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var b=this.groups={};a.each(this.settings.groups,function(c,d){a.each(d.split(/\s/),function(a,d){b[d]=c})});var c=this.settings.rules;a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",d).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",d),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){b=this.validationTargetFor(this.clean(b)),this.lastElement=b,this.prepareElement(b),this.currentElements=a(b);var c=this.check(b)!==!1;return c?delete this.invalid[b.name]:this.invalid[b.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),c},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0;for(var c in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(a){return a.element.name===b.name}).length===1&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.replace(" ",".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c=a(b).attr("type"),d=a(b).val();return c==="radio"||c==="checkbox"?a('input[name="'+a(b).attr("name")+'"]:checked').val():typeof d=="string"?d.replace(/\r/g,""):d},check:function(b){b=this.validationTargetFor(this.clean(b));var c=a(b).rules(),d=!1,e=this.elementValue(b),f;for(var g in c){var h={method:g,parameters:c[g]};try{f=a.validator.methods[g].call(this,e,b,h.parameters);if(f==="dependency-mismatch"){d=!0;continue}d=!1;if(f==="pending"){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!f)return this.formatAndAdd(b,h),!1}catch(i){throw this.settings.debug&&window.console&&console.log("exception occured when checking element "+b.id+", check the '"+h.method+"' method",i),i}}if(d)return;return this.objectLength(c)&&this.successList.push(b),!0},customMetaMessage:function(b,c){if(!a.metadata)return;var d=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return d&&d.messages&&d.messages[c]},customDataMessage:function(b,c){return a(b).data("msg-"+c.toLowerCase())||b.attributes&&a(b).attr("data-msg-"+c.toLowerCase())},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;typeof d=="function"?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b;for(a=0;this.errorList[a];a++){var c=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d=this.errorsFor(b);d.length?(d.removeClass(this.settings.validClass).addClass(this.settings.errorClass),d.attr("generated")&&d.html(c)):(d=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:!0}).addClass(this.settings.errorClass).html(c||""),this.settings.wrapper&&(d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b))),!c&&this.settings.success&&(d.text(""),typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d,b)),this.toShow=this.toShow.add(d)},errorsFor:function(b){var c=this.idOrName(b);return this.errors().filter(function(){return a(this).attr("for")===c})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){return this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]),a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find('[name="'+b+'"]')},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a,b){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&this.pendingRequest===0&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c={},d=a(b);for(var e in a.validator.methods){var f;e==="required"?(f=d.get(0).getAttribute(e),f===""&&(f=!0),f=!!f):f=d.attr(e),f?c[e]=f:d[0].getAttribute("type")===e&&(c[e]=!0)}return c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)&&delete c.maxlength,c},metadataRules:function(b){if(!a.metadata)return{};var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1){delete b[d];return}if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=e.param!==undefined?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength","min","max"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){b[this]&&(b[this]=[Number(b[this][0]),Number(b[this][1])])}),a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b.messages&&delete b.messages,b},normalizeRule:function(b){if(typeof b=="string"){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=d!==undefined?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if(c.nodeName.toLowerCase()==="select"){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e=this.previousValue(c);this.settings.messages[c.name]||(this.settings.messages[c.name]={}),e.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=e.message,d=typeof d=="string"&&{url:d}||d;if(this.pending[c.name])return"pending";if(e.old===b)return e.valid;e.old=b;var f=this;this.startRequest(c);var g={};return g[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:g,success:function(d){f.settings.messages[c.name].remote=e.originalMessage;var g=d===!0||d==="true";if(g){var h=f.formSubmitted;f.prepareElement(c),f.formSubmitted=h,f.successList.push(c),delete f.invalid[c.name],f.showErrors()}else{var i={},j=d||f.defaultMessage(c,"remote");i[c.name]=e.message=a.isFunction(j)?j(b):j,f.invalid[c.name]=!0,f.showErrors(i)}e.valid=g,f.stopRequest(c,g)}},d)),"pending"},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c=0,d=0,e=!1;a=a.replace(/\D/g,"");for(var f=a.length-1;f>=0;f--){var g=a.charAt(f);d=parseInt(g,10),e&&(d*=2)>9&&(d-=9),c+=d,e=!e}return c%10===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()}}}),a.format=a.validator.format})(jQuery),function(a){var b={};if(a.ajaxPrefilter)a.ajaxPrefilter(function(a,c,d){var e=a.port;a.mode==="abort"&&(b[e]&&b[e].abort(),b[e]=d)});else{var c=a.ajax;a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return e==="abort"?(b[f]&&b[f].abort(),b[f]=c.apply(this,arguments)):c.apply(this,arguments)}}}(jQuery),function(a){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&a.each({focus:"focusin",blur:"focusout"},function(b,c){function d(b){return b=a.event.fix(b),b.type=c,a.event.handle.call(this,b)}a.event.special[c]={setup:function(){this.addEventListener(b,d,!0)},teardown:function(){this.removeEventListener(b,d,!0)},handler:function(b){var d=arguments;return d[0]=a.event.fix(b),d[0].type=c,a.event.handle.apply(this,d)}}}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);if(e.is(b))return d.apply(e,arguments)})}})}(jQuery)
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js b/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js
deleted file mode 100644
index d0b1c375fd..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
-** Unobtrusive validation support library for jQuery and jQuery Validate
-** Copyright (C) Microsoft Corporation. All rights reserved.
-*/
-(function(a){var d=a.validator,b,f="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function i(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function g(a){return a.substr(0,a.lastIndexOf(".")+1)}function e(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function l(c,d){var b=a(this).find("[data-valmsg-for='"+d[0].name+"']"),e=a.parseJSON(b.attr("data-valmsg-replace"))!==false;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(e){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function k(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a(" ").html(this.message).appendTo(b)})}}function j(c){var b=c.data("unobtrusiveContainer"),d=a.parseJSON(b.attr("data-valmsg-replace"));if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");c.removeData("unobtrusiveContainer");d&&b.empty()}}function h(d){var b=a(d),c=b.data(f);if(!c){c={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(l,d),invalidHandler:a.proxy(k,d),messages:{},rules:{},success:a.proxy(j,d)},attachValidation:function(){b.validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(f,c)}return c}d.unobtrusive={adapters:[],parseElement:function(b,i){var d=a(b),e=d.parents("form")[0],c,g,f;if(!e)return;c=h(e);c.options.rules[b.name]=g={};c.options.messages[b.name]=f={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:e,message:i,params:h,rules:g,messages:f})}});!i&&c.attachValidation()},parse:function(b){a(b).find(":input[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});a("form").each(function(){var a=h(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});b.addSingleVal("accept","exts").addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.add("equalto",["other"],function(b){var h=g(b.element.name),i=b.params.other,d=e(i,h),f=a(b.form).find(":input[name="+d+"]")[0];c(b,"equalTo",f)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","fields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},f=g(b.element.name);a.each(i(b.params.fields||b.element.name),function(h,g){var c=e(g,f);d.data[c]=function(){return a(b.form).find(":input[name='"+c+"']").val()}});c(b,"remote",d)});a(function(){d.unobtrusive.parse(document)})})(jQuery);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/NamespaceManager.js b/src/Umbraco.Web.UI/umbraco_client/Application/NamespaceManager.js
deleted file mode 100644
index 9d4b86b2ba..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/NamespaceManager.js
+++ /dev/null
@@ -1,17 +0,0 @@
-if (typeof Umbraco == 'undefined') var Umbraco = {};
-if (!Umbraco.Sys) Umbraco.Sys = {};
-
-Umbraco.Sys.registerNamespace = function(namespace) {
- ///
- /// Used to easily register namespaces for classes without doing the syntax listed on line 1/2 for each class.
- /// Pretty much the same as ASP.NET's Type.registerNamespace, except in order to use it, you must register
- /// all of your scripts with ScriptManager, this class doesn't require this.
- ///
- namespace = namespace.split('.');
- if (!window[namespace[0]]) window[namespace[0]] = {};
- var strFullNamespace = namespace[0];
- for (var i = 1; i < namespace.length; i++) {
- strFullNamespace += "." + namespace[i];
- eval("if(!window." + strFullNamespace + ")window." + strFullNamespace + "={};");
- }
-};
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js
deleted file mode 100644
index 2ee35ee696..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js
+++ /dev/null
@@ -1,372 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Application");
-
-Umbraco.Application.Actions = function() {
- ///
- /// Application actions actions for the context menu, help dialogs, logout, etc...
- /// This class supports an event listener model. Currently the available events are:
- /// "nodeDeleting","nodeDeleted","nodeRefresh"
- ///
-
- return {
- _utils: Umbraco.Utils, //alias to Umbraco Utils
- _dialogWindow: null,
- /// A reference to a dialog window to open, any action that doesn't open in an overlay, opens in a dialog
- _isDebug: false, //set to true to enable alert debugging
- _windowTitle: " - Umbraco CMS - ",
- _currApp: "",
- _isSaving: "",
-
- addEventHandler: function(fnName, fn) {
- /// Adds an event listener to the event name event
- if (typeof(jQuery) != "undefined") jQuery(window.top).bind(fnName, fn); //if there's no jQuery, there is no events
- },
-
- removeEventHandler: function(fnName, fn) {
- /// Removes an event listener to the event name event
- if (typeof(jQuery) != "undefined") jQuery(window.top).unbind(fnName, fn); //if there's no jQuery, there is no events
- },
-
- showSpeachBubble: function(ico, hdr, msg) {
- if (typeof(UmbClientMgr.mainWindow().UmbSpeechBubble) != "undefined") {
- UmbClientMgr.mainWindow().UmbSpeechBubble.ShowMessage(ico, hdr, msg);
- }
- else alert(msg);
- },
-
- launchCreateWizard: function() {
- /// Launches the create content wizard
-
- if (this._currApp == 'media' || this._currApp == 'content' || this._currApp == '') {
- if (this._currApp == '') {
- this._currApp = 'content';
- }
-
- UmbClientMgr.openModalWindow("dialogs/create.aspx?nodeType=" + this._currApp + "&app=" + this._currApp + "&rnd=" + this._utils.generateRandom(), UmbClientMgr.uiKeys()['actions_create'] + " " + this._currApp, true, 620, 470);
- return false;
-
- }
- else
- alert('Not supported - please create by right clicking the parentnode and choose new...');
- },
-
- logout: function(t) {
-
- if (!t) {
- throw "The security token must be set in order to log a user out using this method";
- }
-
- if (confirm(UmbClientMgr.uiKeys()["defaultdialogs_confirmlogout"])) {
- //raise beforeLogout event
- jQuery(window.top).trigger("beforeLogout", []);
-
- document.location.href = 'logout.aspx?t=' + t;
- }
- return false;
- },
-
- submitDefaultWindow: function() {
-
- if (!this._isSaving) {
- this._isSaving = true;
-
- //v6 way
- var link = jQuery(".btn[id*=save]:first, .editorIcon[id*=save]:first, .editorIcon:input:image[id*=Save]:first");
-
- //this is made of bad, to work around webforms horrible wiring
- if(!link.hasClass("client-side") && link.attr("href").indexOf("javascript:") == 0){
- eval(link.attr('href').replace('javascript:',''));
- }else{
- link.click();
- }
- }
- this._isSaving = false;
- return false;
- },
-
- bindSaveShortCut: function () {
-
- var keys = "ctrl+s";
- if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) {
- keys = "meta+s";
- }
-
- jQuery(document).bind('keydown', keys, function (evt) { UmbClientMgr.appActions().submitDefaultWindow(); return false; });
- jQuery(":input").bind('keydown', keys, function (evt) { UmbClientMgr.appActions().submitDefaultWindow(); return false; });
- },
-
- shiftApp: function (whichApp, appName) {
- /// Changes the application
-
- this._debug("shiftApp: " + whichApp + ", " + appName);
-
- UmbClientMgr.mainTree().saveTreeState(this._currApp == "" ? "content" : this._currApp);
-
- this._currApp = whichApp.toLowerCase();
-
- if (this._currApp != 'media' && this._currApp != 'content' && this._currApp != 'member') {
- jQuery("#buttonCreate").attr("disabled", "true").fadeOut(400);
- jQuery("#FindDocuments .umbracoSearchHolder").fadeOut(400);
- }
- else {
- // create button should still remain disabled for the memebers section
- if (this._currApp == 'member') {
- jQuery("#buttonCreate").attr("disabled", "true").css("display", "inline-block").css("visibility", "hidden");
- }
- else {
- jQuery("#buttonCreate").removeAttr("disabled").fadeIn(500).css("visibility", "visible");
- }
- jQuery("#FindDocuments .umbracoSearchHolder").fadeIn(500);
- //need to set the recycle bin node id based on app
- switch (this._currApp) {
- case ("media"):
- UmbClientMgr.mainTree().setRecycleBinNodeId(-21);
- break;
- case ("content"):
- UmbClientMgr.mainTree().setRecycleBinNodeId(-20);
- break;
- }
- }
-
- UmbClientMgr.mainTree().rebuildTree(whichApp, function(args) {
- //the callback will fire when the tree rebuilding is done, we
- //need to check the args to see if the tree was rebuild from cache
- //and if it had a previously selected node, if it didn't then load the dashboard.
- if (!args) {
- UmbClientMgr.contentFrame('dashboard.aspx?app=' + whichApp);
- }
- });
-
- jQuery("#treeWindowLabel").html(appName);
-
- UmbClientMgr.mainWindow().document.title = appName + this._windowTitle + window.location.hostname.toLowerCase().replace('www', '');
- },
-
- getCurrApp: function() {
- return this._currApp;
- },
-
-
- //TODO: Move this into a window manager class
- openDialog: function(diaTitle, diaDoc, dwidth, dheight, optionalParams) {
- /// Opens the dialog window
-
- if (this._dialogWindow != null && !this._dialogWindow.closed) {
- this._dialogWindow.close();
- }
- this._dialogWindow = UmbClientMgr.mainWindow().open(diaDoc, 'dialogpage', "width=" + dwidth + "px,height=" + dheight + "px" + optionalParams);
- },
-
- openDashboard: function(whichApp) {
- UmbClientMgr.contentFrame('dashboard.aspx?app=' + whichApp);
- },
-
- actionTreeEditMode: function() {
- ///
- UmbClientMgr.mainTree().toggleEditMode(true);
- },
-
- actionSort: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '0' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/sort.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId + '&app=' + this._currApp + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_sort'], true, 600, 450);
- }
-
- },
-
- actionChangeDocType: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '0' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/changeDocType.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId + '&app=' + this._currApp + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_changeDocType'], true, 600, 600);
- }
-
- },
-
- actionProtect: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/protectPage.aspx?mode=cut&nodeId=" + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_protect'], true, 535, 480);
- }
- },
-
- actionRollback: function() {
- ///
-
- UmbClientMgr.openModalWindow('dialogs/rollback.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_rollback'], true, 600, 550);
- },
-
- actionRefresh: function() {
- ///
-
- //raise nodeRefresh event
- jQuery(window.top).trigger("nodeRefresh", []);
- },
-
- actionNotify: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/notifications.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_notify'], true, 300, 480);
- }
- },
-
- actionUpdate: function() {
- ///
- },
-
- actionPublish: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '' != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/publish.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId, uiKeys['actions_publish'], true, 540, 280);
- }
- },
-
- actionToPublish: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- if (confirm(uiKeys['defaultdialogs_confirmSure'] + '\n\n')) {
- UmbClientMgr.openModalWindow('dialogs/SendPublish.aspx?id=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_sendtopublish'], true, 300, 200);
- }
- }
- },
-
- actionQuit: function(t) {
-
- if (!t) {
- throw "The security token must be set in order to log a user out using this method";
- }
-
- if (confirm(uiKeys['defaultdialogs_confirmlogout'] + '\n\n'))
- document.location.href = 'logout.aspx?t=' + t;
- },
-
- actionRePublish: function() {
- ///
-
- UmbClientMgr.openModalWindow('dialogs/republish.aspx?rnd=' + this._utils.generateRandom(), uiKeys['actions_republish'], true, 450, 210);
- },
-
- actionAssignDomain: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/assignDomain2.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId, uiKeys['actions_assignDomain'], true, 500, 620);
- }
- },
-
- actionNew: function() {
- /// Show the create new modal overlay
- var actionNode = UmbClientMgr.mainTree().getActionNode();
- if (actionNode.nodeType != '') {
- if (actionNode.nodeType == "content") {
- UmbClientMgr.openModalWindow("create.aspx?nodeId=" + actionNode.nodeId + "&nodeType=" + actionNode.nodeType + "&nodeName=" + actionNode.nodeName + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_create'], true, 600, 425);
- }
- else if (actionNode.nodeType == "initmember") {
- UmbClientMgr.openModalWindow("create.aspx?nodeId=" + actionNode.nodeId + "&nodeType=" + actionNode.nodeType + "&nodeName=" + actionNode.nodeName + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_create'], true, 480, 380);
- }
- else if (actionNode.nodeType == "users") {
- UmbClientMgr.openModalWindow("create.aspx?nodeId=" + actionNode.nodeId + "&nodeType=" + actionNode.nodeType + "&nodeName=" + actionNode.nodeName + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_create'], true, 480, 380);
- }
- else {
- UmbClientMgr.openModalWindow("create.aspx?nodeId=" + actionNode.nodeId + "&nodeType=" + actionNode.nodeType + "&nodeName=" + actionNode.nodeName + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_create'], true, 420, 270);
- }
- }
- },
-
- actionNewFolder: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- this.openDialog("Opret", "createFolder.aspx?nodeId=" + UmbClientMgr.mainTree().getActionNode().nodeId + "&nodeType=" + UmbClientMgr.mainTree().getActionNode().nodeType + "&nodeName=" + nodeName + '&rnd=' + this._utils.generateRandom(), 320, 225);
- }
- },
-
- actionSendToTranslate: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeId != '-1' && UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/sendToTranslation.aspx?id=" + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_sendToTranslate'], true, 500, 470);
- }
- },
-
-
- actionImport: function() {
- ///
-
- if (UmbClientMgr.mainTree().getActionNode().nodeType != '') {
- UmbClientMgr.openModalWindow("dialogs/importDocumentType.aspx?rnd=" + this._utils.generateRandom(), uiKeys['actions_importDocumentType'], true, 460, 400);
- }
- },
-
- actionAudit: function() {
- ///
-
- UmbClientMgr.openModalWindow('dialogs/viewAuditTrail.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_auditTrail'], true, 550, 500);
- },
-
- actionPackage: function() {
- ///
- },
-
- actionDelete: function() {
- ///
-
- var actionNode = UmbClientMgr.mainTree().getActionNode();
- if (UmbClientMgr.mainTree().getActionNode().nodeType == "content" && UmbClientMgr.mainTree().getActionNode().nodeId == '-1')
- return;
-
- this._debug("actionDelete");
-
- // tg: quick workaround for the are you sure you want to delete 'null' confirm message happening when deleting xslt files
- currrentNodeName = UmbClientMgr.mainTree().getActionNode().nodeName;
- if (currrentNodeName == null || currrentNodeName == "null") {
- currrentNodeName = UmbClientMgr.mainTree().getActionNode().nodeId;
- }
-
- if (confirm(uiKeys['defaultdialogs_confirmdelete'] + ' "' + currrentNodeName + '"?\n\n')) {
- //raise nodeDeleting event
- jQuery(window.top).trigger("nodeDeleting", []);
- var _this = this;
-
- //check if it's in the recycle bin
- if (actionNode.jsNode.closest("li[id='-20']").length == 1 || actionNode.jsNode.closest("li[id='-21']").length == 1) {
- umbraco.presentation.webservices.legacyAjaxCalls.DeleteContentPermanently(
- UmbClientMgr.mainTree().getActionNode().nodeId,
- UmbClientMgr.mainTree().getActionNode().nodeType,
- function() {
- _this._debug("actionDelete: Raising event");
- //raise nodeDeleted event
- jQuery(window.top).trigger("nodeDeleted", []);
- });
- }
- else {
- umbraco.presentation.webservices.legacyAjaxCalls.Delete(
- UmbClientMgr.mainTree().getActionNode().nodeId,
- UmbClientMgr.mainTree().getActionNode().nodeName,
- UmbClientMgr.mainTree().getActionNode().nodeType,
- function() {
- _this._debug("actionDelete: Raising event");
- //raise nodeDeleted event
- jQuery(window.top).trigger("nodeDeleted", []);
- },
- function(error) {
- _this._debug("actionDelete: Raising public error event");
- //raise public error event
- jQuery(window.top).trigger("publicError", [error]);
- });
- }
- }
-
- },
-
- _debug: function(strMsg) {
- if (this._isDebug) {
- Sys.Debug.trace("AppActions: " + strMsg);
- }
- }
- };
-};
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js
deleted file mode 100644
index c3de3c43d0..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js
+++ /dev/null
@@ -1,257 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Application");
-
-(function($) {
- Umbraco.Application.ClientManager = function() {
- ///
- /// A class which ensures that all calls made to the objects that it owns are done in the context
- /// of the main Umbraco application window.
- ///
-
- return {
- _isDirty: false,
- _isDebug: false,
- _mainTree: null,
- _appActions: null,
- _historyMgr: null,
- _rootPath: "/umbraco", //this is the default
- _modal: new Array(), //track all modal window objects (they get stacked)
-
- historyManager: function() {
- if (!this._historyMgr) {
- this._historyMgr = new Umbraco.Controls.HistoryManager();
- }
- return this._historyMgr;
- },
-
- setUmbracoPath: function(strPath) {
- ///
- /// sets the Umbraco root path folder
- ///
- this._debug("setUmbracoPath: " + strPath);
- this._rootPath = strPath;
- },
-
- mainWindow: function() {
- ///
- /// Returns a reference to the main frame of the application
- ///
- return top;
- },
- mainTree: function() {
- ///
- /// Returns a reference to the main UmbracoTree API object.
- /// Sometimes an Umbraco page will need to be opened without being contained in the iFrame from the main window
- /// so this method is will construct a false tree to be returned if this is the case as to avoid errors.
- ///
- ///
-
-
- if (this._mainTree == null) {
- this._mainTree = top.UmbClientMgr.mainTree();
- }
- return this._mainTree;
- },
- appActions: function() {
- ///
- /// Returns a reference to the application actions object
- ///
-
- //if the main window has no actions, we'll create some
- if (this._appActions == null) {
- if (typeof this.mainWindow().appActions == 'undefined') {
- this._appActions = new Umbraco.Application.Actions();
- }
- else this._appActions = this.mainWindow().appActions;
- }
- return this._appActions;
- },
- uiKeys: function() {
- ///
- /// Returns a reference to the main windows uiKeys object for globalization
- ///
-
- //TODO: If there is no main window, we need to go retrieve the appActions from the server!
- return this.mainWindow().uiKeys;
- },
- // windowMgr: function()
- // return null;
- // },
- contentFrameAndSection: function(app, rightFrameUrl) {
- //this.appActions().shiftApp(app, this.uiKeys()['sections_' + app]);
- var self = this;
- self.mainWindow().UmbClientMgr.historyManager().addHistory(app, true);
- window.setTimeout(function() {
- self.mainWindow().UmbClientMgr.contentFrame(rightFrameUrl);
- }, 200);
- },
- contentFrame: function (strLocation) {
- ///
- /// This will return the reference to the right content frame if strLocation is null or empty,
- /// or set the right content frames location to the one specified by strLocation.
- ///
-
- this._debug("contentFrame: " + strLocation);
-
- if (strLocation == null || strLocation == "") {
- if (typeof this.mainWindow().right != "undefined") {
- return this.mainWindow().right;
- }
- else {
- return this.mainWindow(); //return the current window if the content frame doesn't exist in the current context
- }
- }
- else {
-
- //its a hash change so process that like angular
- if (strLocation.substr(0, 1) !== "#") {
- if (strLocation.substr(0, 1) != "/") {
- //if the path doesn't start with "/" or with the root path then
- //prepend the root path
- strLocation = this._rootPath + "/" + strLocation;
- }
- else if (strLocation.length >= this._rootPath.length
- && strLocation.substr(0, this._rootPath.length) != this._rootPath) {
- strLocation = this._rootPath + "/" + strLocation;
- }
- }
-
- this._debug("contentFrame: parsed location: " + strLocation);
-
- if (!this.mainWindow().UmbClientMgr) {
- window.setTimeout(function() {
- var self = this;
- self.mainWindow().location.href = strLocation;
- }, 200);
- }
- else {
- this.mainWindow().UmbClientMgr.contentFrame(strLocation);
- }
- }
- },
- reloadContentFrameUrlIfPathLoaded: function (url) {
- var contentFrame;
- if (typeof this.mainWindow().right != "undefined") {
- contentFrame = this.mainWindow().right;
- }
- else {
- contentFrame = this.mainWindow();
- }
-
- var currentPath = contentFrame.location.pathname + (contentFrame.location.search ? contentFrame.location.search : "");
- if (currentPath == url) {
- contentFrame.location.reload();
- }
- },
-
- /** This is used to launch an angular based modal window instead of the legacy window */
- openAngularModalWindow: function (options) {
- if (!this.mainWindow().UmbClientMgr) {
- throw "An angular modal window can only be launched when the modal is running within the main Umbraco application";
- }
- else {
- this.mainWindow().UmbClientMgr.openAngularModalWindow.apply(this.mainWindow().UmbClientMgr, [options]);
- }
-
- },
-
- /** This is used to launch an angular based modal window instead of the legacy window */
- rootScope: function () {
-
- if (!this.mainWindow().UmbClientMgr) {
- throw "An angular modal window can only be launched when the modal is running within the main Umbraco application";
- }
- else {
- return this.mainWindow().UmbClientMgr.rootScope();
- }
-
- },
-
- reloadLocation: function (pathToMatch) {
- if (this.mainWindow().UmbClientMgr) {
- this.mainWindow().UmbClientMgr.reloadLocation(pathToMatch);
- }
- },
-
- openModalWindow: function(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- //need to create the modal on the top window if the top window has a client manager, if not, create it on the current window
-
- //if this is the top window, or if the top window doesn't have a client manager, create the modal in this manager
- if (window == this.mainWindow() || !this.mainWindow().UmbClientMgr) {
- var m = new Umbraco.Controls.ModalWindow();
- this._modal.push(m);
- m.open(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback);
- }
- else {
- //if the main window has a client manager, then call the main window's open modal method whilst keeping the context of it's manager.
- if (this.mainWindow().UmbClientMgr) {
- this.mainWindow().UmbClientMgr.openModalWindow.apply(this.mainWindow().UmbClientMgr,
- [url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback]);
- }
- else {
- return; //exit recurse.
- }
- }
- },
- openModalWindowForContent: function (jQueryElement, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- //need to create the modal on the top window if the top window has a client manager, if not, create it on the current window
-
- //if this is the top window, or if the top window doesn't have a client manager, create the modal in this manager
- if (window == this.mainWindow() || !this.mainWindow().UmbClientMgr) {
- var m = new Umbraco.Controls.ModalWindow();
- this._modal.push(m);
- m.show(jQueryElement, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback);
- }
- else {
- //if the main window has a client manager, then call the main window's open modal method whilst keeping the context of it's manager.
- if (this.mainWindow().UmbClientMgr) {
- this.mainWindow().UmbClientMgr.openModalWindowForContent.apply(this.mainWindow().UmbClientMgr,
- [jQueryElement, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback]);
- }
- else {
- return; //exit recurse.
- }
- }
- },
- closeModalWindow: function(rVal) {
- ///
- /// will close the latest open modal window.
- /// if an rVal is passed in, then this will be sent to the onCloseCallback method if it was specified.
- ///
- if (this._modal != null && this._modal.length > 0) {
- this._modal.pop().close(rVal);
- }
- else {
- //this will recursively try to close a modal window until the parent window has a modal object or the window is the top and has the modal object
- var mgr = null;
- if (window.parent == null || window.parent == window) {
- //we are at the root window, check if we can close the modal window from here
- if (window.UmbClientMgr != null && window.UmbClientMgr._modal != null && window.UmbClientMgr._modal.length > 0) {
- mgr = window.UmbClientMgr;
- }
- else {
- return; //exit recursion.
- }
- }
- else if (typeof window.parent.UmbClientMgr != "undefined") {
- mgr = window.parent.UmbClientMgr;
- }
- mgr.closeModalWindow.call(mgr, rVal);
- }
- },
- _debug: function(strMsg) {
- if (this._isDebug) {
- Sys.Debug.trace("UmbClientMgr: " + strMsg);
- }
- },
- get_isDirty: function() {
- return this._isDirty;
- },
- set_isDirty: function(value) {
- this._isDirty = value;
- }
- };
- };
-})(jQuery);
-
-//define alias for use throughout application
-var UmbClientMgr = new Umbraco.Application.ClientManager();
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js
deleted file mode 100644
index 1435f27cce..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js
+++ /dev/null
@@ -1,11 +0,0 @@
-///
-
-Umbraco.Sys.registerNamespace("Umbraco.Utils");
-
-Umbraco.Utils.generateRandom = function() {
- /// Returns a random integer for use with URLs
- var day = new Date();
- var z = day.getTime();
- var y = (z - (parseInt(z / 1000, 10) * 1000)) / 10;
- return y;
-}
diff --git a/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.css b/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.css
deleted file mode 100644
index 6bb56bf49c..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Custom styles for AssignDomain2.aspx dialog */
-
-#komask {
- background: #ffffff;
- opacity: .6;
- z-index: 99;
- display: none;
- position: absolute;
-}
-
-
-select.language {
- width: 90px;
-}
-
-label.error {
- padding: 0 0 6px 0;
- margin: 0;
- background: none;
- border:none;
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.js b/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.js
deleted file mode 100644
index b5921b6576..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Dialogs/AssignDomain2.js
+++ /dev/null
@@ -1,145 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Dialogs");
-
-(function ($) {
-
- // register AssignDomain dialog
- Umbraco.Dialogs.AssignDomain2 = base2.Base.extend({
-
- _opts: null,
-
- _isRepeated: function (element) {
- var inputs = $('form input.domain');
- var elementName = element.attr('name');
- var repeated = false;
- inputs.each(function() {
- var input = $(this);
- if (input.attr('name') != elementName && input.val() == element.val())
- repeated = true;
- });
- return repeated;
- },
-
- // constructor
- constructor: function (opts) {
- // merge options with default
- this._opts = $.extend({
- invalidDomain: 'Invalid domain.',
- duplicateDomain: 'Domain has already been assigned.'
- }, opts);
- },
-
- // public methods/variables
-
- languages: null,
- language: null,
- domains: null,
-
- addDomain: function () {
- this.domains.push({
- Name: "",
- Lang: ""
- });
- },
-
- init: function () {
- var self = this;
-
- self.domains = ko.observableArray(self._opts.domains);
- self.languages = self._opts.languages;
- self.language = self._opts.language;
- self.removeDomain = function() { self.domains.remove(this); };
-
- ko.applyBindings(self);
-
- $.validator.addMethod("domain", function (value, element, param) {
- // beware! encode('test') == 'test-'
- // read eg https://rt.cpan.org/Public/Bug/Display.html?id=94347
- value = punycode.encode(value);
- // that regex is best-effort and certainly not exact
- var re = /^(http[s]?:\/\/)?([-\w]+(\.[-\w]+)*)(:\d+)?(\/[-\w]*|-)?$/gi;
- var isopt = this.optional(element);
- var retest = re.test(value);
- var ret = isopt || retest;
- return ret;
- }, self._opts.invalidDomain);
-
- function getDuplicateMessage(val, el) {
- var other = $(el).nextAll('input').val();
- var msg = self._opts.duplicateDomain
- if (other != "" && other != "!!!")
- msg = msg + ' (' + other + ')';
- return msg;
- }
-
- $.validator.addMethod("duplicate", function (value, element, param) {
- return $(element).nextAll('input').val() == "" && !self._isRepeated($(element));
- }, getDuplicateMessage);
-
- $.validator.addClassRules({
- domain: { domain: true },
- duplicate: { duplicate: true }
- });
-
- $('form').validate({
- debug: true,
- focusCleanup: true,
- onkeyup: false
- });
-
- $('form input.domain').on('focus', function(event) {
- if (event.type != 'focusin') return;
- $(this).nextAll('input').val("");
- });
-
- // force validation *now*
- $('form').valid();
-
- $('#btnSave').click(function () {
- if (!$('form').valid())
- return false;
-
- var mask = $('#komask');
- var masked = mask.parent();
- mask.height(masked.height());
- mask.width(masked.width());
- mask.show();
-
- var data = { nodeId: self._opts.nodeId, language: self.language ? self.language : 0, domains: self.domains };
- $.post(self._opts.restServiceLocation + 'PostSaveLanguageAndDomains', ko.toJSON(data), function (json) {
- mask.hide();
-
- if (json.Valid) {
- UmbClientMgr.closeModalWindow();
- }
- else {
- var inputs = $('form input.domain');
- inputs.each(function() { $(this).nextAll('input').val(""); });
- for (var i = 0; i < json.Domains.length; i++) {
- var d = json.Domains[i];
- if (d.Duplicate)
- inputs.each(function() {
- var input = $(this);
- if (input.val() == d.Name)
- input.nextAll('input').val(d.Other ? d.Other : "!!!");
- });
- }
- $('form').valid();
- }
- })
- .fail(function (xhr, textStatus, errorThrown) {
- mask.css('opacity', 1).css('color', "#ff0000").html(xhr.responseText);
- });
- return false;
- });
- }
-
- });
-
- // set defaults for jQuery ajax calls
- $.ajaxSetup({
- dataType: 'json',
- cache: false,
- contentType: 'application/json; charset=utf-8'
- });
-
-})(jQuery);
diff --git a/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.css b/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.css
deleted file mode 100644
index a562e4475e..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.css
+++ /dev/null
@@ -1,58 +0,0 @@
-#sortableFrame
-{
- height: auto;
- overflow: auto;
-}
-
-#sortableNodes
-{
- padding: 4px;
- display: block;
- border-spacing:0;
- border-collapse:collapse;
-}
-
- #sortableNodes thead tr th
- {
- border-bottom: 1px solid #ccc;
- padding: 4px;
- padding-right: 25px;
- background-image: url(../tableSorting/img/bg.gif);
- cursor: pointer;
- font-weight: bold;
- background-repeat: no-repeat;
- background-position: center right;
- }
-
- #sortableNodes thead tr th.headerSortDown
- {
- background-image: url(../tableSorting/img/desc.gif);
- }
-
- #sortableNodes thead tr th.headerSortUp
- {
- background-image: url(../tableSorting/img/asc.gif);
- }
-
- #sortableNodes tbody tr td
- {
- border-bottom: 1px solid #efefef;
- }
-
- #sortableNodes td
- {
- padding: 4px;
- cursor: move;
- }
-
-tr.tDnD_whileDrag, tr.tDnD_whileDrag td
-{
- background: #dcecf3;
- border-color: #a8d8eb !Important;
- margin-top: 20px;
-}
-
-#sortableNodes .nowrap
-{
- white-space: nowrap;
-}
diff --git a/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.js b/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.js
deleted file mode 100644
index da5ae6d61e..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Dialogs/SortDialog.js
+++ /dev/null
@@ -1,122 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Dialogs");
-
-(function ($) {
-
-
- Umbraco.Dialogs.SortDialog = base2.Base.extend({
- //private methods/variables
- _opts: null,
-
- _setupTableSorter: function () {
- //adds a custom sorter to the tablesorter based on the current cultures date/time format
- $.tablesorter.addParser({
- // use a unique id
- id: 'cultureDateParser',
- is: function() {
- //don't auto-detect this parser
- return false;
- },
- format: function(s, table) {
- var c = table.config;
-
- s = s.replace(/\-/g, "/");
- //all of these basically transform the string into year-month-day since that
- //is what JS understands when creating a Date object
- if (c.dateFormat.indexOf("dd/MM/yyyy") == 0 || c.dateFormat.indexOf("dd-MM-yyyy") == 0 || c.dateFormat.indexOf("dd.MM.yyyy") == 0) {
- s = s.replace(/(\d{1,2})[\/\-\.](\d{1,2})[\/\-\.](\d{4})/, "$3-$2-$1");
- }
- else if (c.dateFormat.indexOf("dd/MM/yy") == 0 || c.dateFormat.indexOf("dd-MM-yy") == 0 || c.dateFormat.indexOf("dd.MM.yy") == 0) {
- s = s.replace(/(\d{1,2})[\/\-\.](\d{1,2})[\/\-\.](\d{2})/, "$3-$2-$1");
- }
- else if (c.dateFormat.indexOf("MM/dd/yyyy") == 0 || c.dateFormat.indexOf("MM-dd-yyyy") == 0) {
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3-$1-$2");
- }
- else if (c.dateFormat.indexOf("MM/dd/yy") == 0 || c.dateFormat.indexOf("MM-dd-yy") == 0) {
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$3-$1-$2");
- }
- return $.tablesorter.formatFloat(new Date(s).getTime());
- },
- // set the type to either numeric or text (text uses a natural sort function
- // so it will work for everything, but numeric is faster for numbers
- type: 'numeric'
- });
- },
-
- _saveSort: function() {
- var rows = $('#sortableNodes tbody tr');
- var sortOrder = "";
-
- $.each(rows, function () {
- sortOrder += $(this).attr("id").replace("node_", "") + ",";
- });
-
- $("#sortingDone").hide();
- $("#sortArea").hide();
- $("#loading").show();
-
- var self = this;
-
- $.ajax({
- type: "POST",
- url: self._opts.serviceUrl,
- data: '{ "ParentId": "' + self._opts.currentId + '", "SortOrder": "' + sortOrder + '"}',
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function(msg) {
- self._showConfirm();
- }
- });
- },
-
- _showConfirm: function () {
- $(".umb-dialog-footer").hide();
- $("#loading").hide();
- $("#sortingDone").show();
- UmbClientMgr.mainTree().reloadActionNode();
- },
-
- // Constructor
- constructor: function (opts) {
- // Merge options with default
- this._opts = $.extend({
- // Default options go here
- }, opts);
-
- this._setupTableSorter();
- },
-
- //public methods/variables
-
- init: function () {
- var self = this;
-
- //create the sorter
- $("#sortableNodes").tablesorter({
- dateFormat: self._opts.dateTimeFormat,
- headers: {
- 0: { sorter: "text" },
- 1: { sorter: "cultureDateParser" }, //ensure to set our custom parser here
- 2: { sorter: "numeric" }
- }
- });
-
- //setup the drag/drop sorting
- $("#sortableNodes").tableDnD({ containment: $("#sortableFrame") });
-
- //wire up the submit button
- self._opts.submitButton.click(function() {
- this.disabled = true;
- self._saveSort();
- });
-
- //wire up the close button
- self._opts.closeWindowButton.click(function () {
- UmbClientMgr.closeModalWindow();
- });
- },
-
- });
-
-
-
-})(jQuery);
diff --git a/src/Umbraco.Web.UI/umbraco_client/Dialogs/UmbracoField.js b/src/Umbraco.Web.UI/umbraco_client/Dialogs/UmbracoField.js
deleted file mode 100644
index 894830ab6a..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/Dialogs/UmbracoField.js
+++ /dev/null
@@ -1,145 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Dialogs");
-
-(function($) {
-
-
- Umbraco.Dialogs.UmbracoField = base2.Base.extend({
- //private methods/variables
- _opts: null,
-
- // Constructor
- constructor: function (opts) {
- // Merge options with default
- this._opts = $.extend({
- // Default options go here
- }, opts);
- },
-
- //public methods/variables
-
- init: function () {
- var self = this;
- //bind to the submit handler of the button
- this._opts.submitButton.click(function () {
- self.doSubmit();
- });
- this._opts.cancelButton.click(function () {
- UmbClientMgr.closeModalWindow();
- });
- },
-
- doSubmit: function() {
- //find out if this is an MVC View.
- var url = window.location.href;
- var isMvcView = url.indexOf('mvcView=') != -1;
- var tagString = "";
-
- //get the form
- var fieldForm = this._opts.form;
-
- //formfields
- var field = fieldForm.field.value;
- var useIfEmpty = fieldForm.useIfEmpty.value;
- var alternativeText = fieldForm.alternativeText.value;
- var insertTextBefore = fieldForm.insertTextBefore.value;
- var insertTextAfter = fieldForm.insertTextAfter.value;
-
- if(isMvcView) {
- tagString = "@Umbraco.Field(\"" + field + "\"";
-
- if (useIfEmpty != '')
- tagString += ", altFieldAlias: \"" + useIfEmpty + "\"";
-
- if (alternativeText != '')
- tagString += ", altText: \"" + alternativeText + "\"";
-
- if (fieldForm.recursive.checked)
- tagString += ", recursive: true";
-
- if (insertTextBefore != '')
- tagString += ", insertBefore: \"" + insertTextBefore.replace(/\"/gi, """).replace(/\/gi, ">") + "\"";
-
- if (insertTextAfter != "")
- tagString += ", insertAfter: \"" + insertTextAfter.replace(/\"/gi, """).replace(/\/gi, ">") + "\"";
-
- if (fieldForm.formatAsDate[1].checked)
- tagString += ", formatAsDateWithTime: true, formatAsDateWithTimeSeparator: \"" + fieldForm.formatAsDateWithTimeSeparator.value + "\"";
- else if (fieldForm.formatAsDate[0].checked)
- tagString += ", formatAsDate: true";
-
- if (fieldForm.toCase[1].checked)
- tagString += ", casing: RenderFieldCaseType.Lower";
- else if(fieldForm.toCase[2].checked)
- tagString += ", casing: RenderFieldCaseType.Upper";
-
- if (fieldForm.urlEncode[1].checked)
- tagString += ", encoding: RenderFieldEncodingType.Url";
- else if (fieldForm.urlEncode[2].checked)
- tagString += ", encoding: RenderFieldEncodingType.Html";
-
- if (fieldForm.convertLineBreaks.checked)
- tagString += ", convertLineBreaks: true";
-
- if (fieldForm.stripParagraph.checked)
- tagString += ", removeParagraphTags: true";
-
- tagString += ")";
-
- }
- else
- {
-
- tagString = '<' + this._opts.tagName;
-
- if (field != '')
- tagString += ' field="' + field + '"';
-
- if (useIfEmpty != '')
- tagString += ' useIfEmpty="' + useIfEmpty + '"';
-
- if (alternativeText != '')
- tagString += ' textIfEmpty="' + alternativeText + '"';
-
- if (insertTextBefore != '')
- tagString += ' insertTextBefore="' + insertTextBefore.replace(/\"/gi, """).replace(/\/gi, ">") + '"';
-
- if (insertTextAfter != '')
- tagString += ' insertTextAfter="' + insertTextAfter.replace(/\"/gi, """).replace(/\/gi, ">") + '"';
-
- if (fieldForm.formatAsDate[1].checked)
- tagString += ' formatAsDateWithTime="true" formatAsDateWithTimeSeparator="' + fieldForm.formatAsDateWithTimeSeparator.value + '"';
- else if (fieldForm.formatAsDate[0].checked)
- tagString += ' formatAsDate="true"';
-
- if (fieldForm.toCase[1].checked)
- tagString += ' case="' + fieldForm.toCase[1].value + '"';
- else if (fieldForm.toCase[2].checked)
- tagString += ' case="' + fieldForm.toCase[2].value + '"';
-
- if (fieldForm.recursive.checked)
- tagString += ' recursive="true"';
-
- if (fieldForm.urlEncode[1].checked)
- tagString += ' urlEncode="true"';
- else if (fieldForm.urlEncode[2].checked)
- tagString += ' htmlEncode="true"';
-
- if (fieldForm.stripParagraph.checked)
- tagString += ' stripParagraph="true"';
-
- if (fieldForm.convertLineBreaks.checked)
- tagString += ' convertLineBreaks="true"';
-
- tagString += " runat=\"server\" />";
- }
-
-
- UmbClientMgr.contentFrame().focus();
- UmbClientMgr.contentFrame().UmbEditor.Insert(tagString, '', this._opts.objectId);
- UmbClientMgr.closeModalWindow();
- }
- });
-
-
-
-})(jQuery);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/PunyCode/punycode.min.js b/src/Umbraco.Web.UI/umbraco_client/PunyCode/punycode.min.js
deleted file mode 100644
index e14359fbaf..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/PunyCode/punycode.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! https://mths.be/punycode v1.3.2 by @mathias */
-!function(a){function b(a){throw RangeError(E[a])}function c(a,b){for(var c=a.length,d=[];c--;)d[c]=b(a[c]);return d}function d(a,b){var d=a.split("@"),e="";d.length>1&&(e=d[0]+"@",a=d[1]),a=a.replace(D,".");var f=a.split("."),g=c(f,b).join(".");return e+g}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=H(a>>>10&1023|55296),a=56320|1023&a),b+=H(a)}).join("")}function g(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:t}function h(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function i(a,b,c){var d=0;for(a=c?G(a/x):a>>1,a+=G(a/b);a>F*v>>1;d+=t)a=G(a/F);return G(d+(F+1)*a/(a+w))}function j(a){var c,d,e,h,j,k,l,m,n,o,p=[],q=a.length,r=0,w=z,x=y;for(d=a.lastIndexOf(A),0>d&&(d=0),e=0;d>e;++e)a.charCodeAt(e)>=128&&b("not-basic"),p.push(a.charCodeAt(e));for(h=d>0?d+1:0;q>h;){for(j=r,k=1,l=t;h>=q&&b("invalid-input"),m=g(a.charCodeAt(h++)),(m>=t||m>G((s-r)/k))&&b("overflow"),r+=m*k,n=x>=l?u:l>=x+v?v:l-x,!(n>m);l+=t)o=t-n,k>G(s/o)&&b("overflow"),k*=o;c=p.length+1,x=i(r-j,c,0==j),G(r/c)>s-w&&b("overflow"),w+=G(r/c),r%=c,p.splice(r++,0,w)}return f(p)}function k(a){var c,d,f,g,j,k,l,m,n,o,p,q,r,w,x,B=[];for(a=e(a),q=a.length,c=z,d=0,j=y,k=0;q>k;++k)p=a[k],128>p&&B.push(H(p));for(f=g=B.length,g&&B.push(A);q>f;){for(l=s,k=0;q>k;++k)p=a[k],p>=c&&l>p&&(l=p);for(r=f+1,l-c>G((s-d)/r)&&b("overflow"),d+=(l-c)*r,c=l,k=0;q>k;++k)if(p=a[k],c>p&&++d>s&&b("overflow"),p==c){for(m=d,n=t;o=j>=n?u:n>=j+v?v:n-j,!(o>m);n+=t)x=m-o,w=t-o,B.push(H(h(o+x%w,0))),m=G(x/w);B.push(H(h(m,0))),j=i(d,r,f==g),d=0,++f}++d,++c}return B.join("")}function l(a){return d(a,function(a){return B.test(a)?j(a.slice(4).toLowerCase()):a})}function m(a){return d(a,function(a){return C.test(a)?"xn--"+k(a):a})}var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o="object"==typeof module&&module&&!module.nodeType&&module,p="object"==typeof global&&global;(p.global===p||p.window===p||p.self===p)&&(a=p);var q,r,s=2147483647,t=36,u=1,v=26,w=38,x=700,y=72,z=128,A="-",B=/^xn--/,C=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=t-u,G=Math.floor,H=String.fromCharCode;if(q={version:"1.3.2",ucs2:{decode:e,encode:f},decode:j,encode:k,toASCII:m,toUnicode:l},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return q});else if(n&&o)if(module.exports==n)o.exports=q;else for(r in q)q.hasOwnProperty(r)&&(n[r]=q[r]);else a.punycode=q}(this);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbg.gif b/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbg.gif
deleted file mode 100644
index 6268a1bc0d..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbg.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbgdown.gif b/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbgdown.gif
deleted file mode 100644
index 8c6bcbe03f..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/buttonbgdown.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/split.gif b/src/Umbraco.Web.UI/umbraco_client/menuicon/images/split.gif
deleted file mode 100644
index f6c13b9eef..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/menuicon/images/split.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/menuicon/style.css b/src/Umbraco.Web.UI/umbraco_client/menuicon/style.css
deleted file mode 100644
index 6d3dbc35d4..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/menuicon/style.css
+++ /dev/null
@@ -1,33 +0,0 @@
- .editorIcon, .editorIconOver,.editorIconDown, .editorIconOn, .editorIconDisabled, .editorDropDown, .editorIconSplit {
- margin:2px;
-
- }
-
-.tinymceMenuBar table {
- margin: 1px 0 0 6px;
- _margin-top: 2px;
- }
-
-
- .editorIconOver, .editorIconDown, .editorIconOn{
- cursor: hand;
- margin: 1px;
- background: #EAEAEA;
- border: 1px solid #CAC9C9 !Important;
- }
-
-
-
-.editorIconDisabled {
- /*
- IE ONLY !!!
- */
- Filter: Alpha(Opacity=30);
- }
-
-.editorDropDown {
- font-family: verdana, arial;
- font-size: 10px;
- width: 80px;
- color: #666699;
- }
diff --git a/src/Umbraco.Web.UI/umbraco_client/modal/jquery.simplemodal.1.4.1.custom.js b/src/Umbraco.Web.UI/umbraco_client/modal/jquery.simplemodal.1.4.1.custom.js
deleted file mode 100644
index 2c0320f50e..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/modal/jquery.simplemodal.1.4.1.custom.js
+++ /dev/null
@@ -1,637 +0,0 @@
-
-; (function ($) {
- var ie6 = $.browser && $.browser.msie && parseInt($.browser.version) === 6 && typeof window['XMLHttpRequest'] !== 'object',
- ie7 = $.browser && $.browser.msie && parseInt($.browser.version) === 7,
- ieQuirks = null,
- w = [];
-
- /*
- * Create and display a modal dialog.
- *
- * @param {string, object} data A string, jQuery object or DOM object
- * @param {object} [options] An optional object containing options overrides
- */
- $.fullmodal = function (data, options) {
- return $.fullmodal.impl.init(data, options);
- };
-
- /*
- * Close the modal dialog.
- */
- $.fullmodal.close = function () {
- $.fullmodal.impl.close();
- };
-
- /*
- * Set focus on first or last visible input in the modal dialog. To focus on the last
- * element, call $.fullmodal.focus('last'). If no input elements are found, focus is placed
- * on the data wrapper element.
- */
- $.fullmodal.focus = function (pos) {
- $.fullmodal.impl.focus(pos);
- };
-
- /*
- * Determine and set the dimensions of the modal dialog container.
- * setPosition() is called if the autoPosition option is true.
- */
- $.fullmodal.setContainerDimensions = function () {
- $.fullmodal.impl.setContainerDimensions();
- };
-
- /*
- * Re-position the modal dialog.
- */
- $.fullmodal.setPosition = function () {
- $.fullmodal.impl.setPosition();
- };
-
- /*
- * Update the modal dialog. If new dimensions are passed, they will be used to determine
- * the dimensions of the container.
- *
- * setContainerDimensions() is called, which in turn calls setPosition(), if enabled.
- * Lastly, focus() is called is the focus option is true.
- */
- $.fullmodal.update = function (height, width) {
- $.fullmodal.impl.update(height, width);
- };
-
- /*
- * Chained function to create a modal dialog.
- *
- * @param {object} [options] An optional object containing options overrides
- */
- $.fn.fullmodal = function (options) {
- return $.fullmodal.impl.init(this, options);
- };
-
- /*
- * SimpleModal default options
- *
- * appendTo: (String:'body') The jQuery selector to append the elements to. For .NET, use 'form'.
- * focus: (Boolean:true) Focus in the first visible, enabled element?
- * opacity: (Number:50) The opacity value for the overlay div, from 0 - 100
- * overlayId: (String:'fullmodal-overlay') The DOM element id for the overlay div
- * overlayCss: (Object:{}) The CSS styling for the overlay div
- * containerId: (String:'fullmodal-container') The DOM element id for the container div
- * containerCss: (Object:{}) The CSS styling for the container div
- * dataId: (String:'fullmodal-data') The DOM element id for the data div
- * dataCss: (Object:{}) The CSS styling for the data div
- * minHeight: (Number:null) The minimum height for the container
- * minWidth: (Number:null) The minimum width for the container
- * maxHeight: (Number:null) The maximum height for the container. If not specified, the window height is used.
- * maxWidth: (Number:null) The maximum width for the container. If not specified, the window width is used.
- * autoResize: (Boolean:false) Automatically resize the container if it exceeds the browser window dimensions?
- * autoPosition: (Boolean:true) Automatically position the container upon creation and on window resize?
- * zIndex: (Number: 1000) Starting z-index value
- * close: (Boolean:true) If true, closeHTML, escClose and overClose will be used if set.
- If false, none of them will be used.
- * closeHTML: (String:' ') The HTML for the default close link.
- SimpleModal will automatically add the closeClass to this element.
- * closeClass: (String:'fullmodal-close') The CSS class used to bind to the close event
- * escClose: (Boolean:true) Allow Esc keypress to close the dialog?
- * overlayClose: (Boolean:false) Allow click on overlay to close the dialog?
- * position: (Array:null) Position of container [top, left]. Can be number of pixels or percentage
- * persist: (Boolean:false) Persist the data across modal calls? Only used for existing
- DOM elements. If true, the data will be maintained across modal calls, if false,
- the data will be reverted to its original state.
- * modal: (Boolean:true) User will be unable to interact with the page below the modal or tab away from the dialog.
- If false, the overlay, iframe, and certain events will be disabled allowing the user to interact
- with the page below the dialog.
- * onOpen: (Function:null) The callback function used in place of SimpleModal's open
- * onShow: (Function:null) The callback function used after the modal dialog has opened
- * onClose: (Function:null) The callback function used in place of SimpleModal's close
- */
- $.fullmodal.defaults = {
- appendTo: 'body',
- focus: true,
- opacity: 50,
- overlayId: 'fullmodal-overlay',
- overlayCss: {},
- containerId: 'fullmodal-container',
- containerCss: {},
- dataId: 'fullmodal-data',
- dataCss: {},
- minHeight: null,
- minWidth: null,
- maxHeight: null,
- maxWidth: null,
- autoResize: false,
- autoPosition: true,
- zIndex: 1000,
- close: true,
- closeHTML: ' ',
- closeClass: 'fullmodal-close',
- escClose: true,
- overlayClose: false,
- position: null,
- persist: false,
- modal: true,
- onOpen: null,
- onShow: null,
- onClose: null
- };
-
- /*
- * Main modal object
- * o = options
- */
- $.fullmodal.impl = {
- /*
- * Contains the modal dialog elements and is the object passed
- * back to the callback (onOpen, onShow, onClose) functions
- */
- d: {},
- /*
- * Initialize the modal dialog
- */
- init: function (data, options) {
- var s = this;
-
- // don't allow multiple calls
- if (s.d.data) {
- return false;
- }
-
- // $.boxModel is undefined if checked earlier
- ieQuirks = $.browser.msie && !$.boxModel;
-
- // merge defaults and user options
- s.o = $.extend({}, $.fullmodal.defaults, options);
-
- // keep track of z-index
- s.zIndex = s.o.zIndex;
-
- // set the onClose callback flag
- s.occb = false;
-
- // determine how to handle the data based on its type
- if (typeof data === 'object') {
- // convert DOM object to a jQuery object
- data = data instanceof jQuery ? data : $(data);
- s.d.placeholder = false;
-
- // if the object came from the DOM, keep track of its parent
- if (data.parent().parent().size() > 0) {
- data.before($(' ')
- .attr('id', 'fullmodal-placeholder')
- .css({ display: 'none' }));
-
- s.d.placeholder = true;
- s.display = data.css('display');
-
- // persist changes? if not, make a clone of the element
- if (!s.o.persist) {
- s.d.orig = data.clone(true);
- }
- }
- }
- else if (typeof data === 'string' || typeof data === 'number') {
- // just insert the data as innerHTML
- data = $('
').html(data);
- }
- else {
- // unsupported data type!
- alert('SimpleModal Error: Unsupported data type: ' + typeof data);
- return s;
- }
-
- // create the modal overlay, container and, if necessary, iframe
- s.create(data);
- data = null;
-
- // display the modal dialog
- s.open();
-
- // useful for adding events/manipulating data in the modal dialog
- if ($.isFunction(s.o.onShow)) {
- s.o.onShow.apply(s, [s.d]);
- }
-
- // don't break the chain =)
- return s;
- },
- /*
- * Create and add the modal overlay and container to the page
- */
- create: function (data) {
- var s = this;
-
- // get the window properties
- w = s.getDimensions();
-
- // add an iframe to prevent select options from bleeding through
- if (s.o.modal && ie6) {
- s.d.iframe = $('')
- .css($.extend(s.o.iframeCss, {
- display: 'none',
- opacity: 0,
- position: 'fixed',
- height: w[0],
- width: w[1],
- zIndex: s.o.zIndex,
- top: 0,
- left: 0
- }))
- .appendTo(s.o.appendTo);
- }
-
- // create the overlay
- s.d.overlay = $('
')
- .attr('id', s.o.overlayId)
- .addClass('fullmodal-overlay')
- .css($.extend(s.o.overlayCss, {
- display: 'none',
- opacity: s.o.opacity / 100,
- height: s.o.modal ? w[0] : 0,
- width: s.o.modal ? w[1] : 0,
- position: 'fixed',
- left: 0,
- top: 0,
- zIndex: s.o.zIndex + 1
- }))
- .appendTo(s.o.appendTo);
-
- // create the container
- s.d.container = $('
')
- .attr('id', s.o.containerId)
- .addClass('fullmodal-container')
- .css($.extend(s.o.containerCss, {
- display: 'none',
- position: 'fixed',
- zIndex: s.o.zIndex + 2
- }))
- .append(s.o.close && s.o.closeHTML
- ? $(s.o.closeHTML).addClass(s.o.closeClass)
- : '')
- .appendTo(s.o.appendTo);
-
- s.d.wrap = $('
')
- .attr('tabIndex', -1)
- .addClass('fullmodal-wrap')
- .css({ height: '100%', outline: 0, width: '100%' })
- .appendTo(s.d.container);
-
- // add styling and attributes to the data
- // append to body to get correct dimensions, then move to wrap
- s.d.data = data
- .attr('id', data.attr('id') || s.o.dataId)
- .addClass('fullmodal-data')
- .css($.extend(s.o.dataCss, {
- display: 'none'
- }))
- .appendTo('body');
- data = null;
-
- s.setContainerDimensions();
- s.d.data.appendTo(s.d.wrap);
-
- // fix issues with IE
- if (ie6 || ieQuirks) {
- s.fixIE();
- }
- },
- /*
- * Bind events
- */
- bindEvents: function () {
- var s = this;
-
- // bind the close event to any element with the closeClass class
- $('.' + s.o.closeClass).bind('click.fullmodal', function (e) {
- e.preventDefault();
- s.close();
- });
-
- // bind the overlay click to the close function, if enabled
- if (s.o.modal && s.o.close && s.o.overlayClose) {
- s.d.overlay.bind('click.fullmodal', function (e) {
- e.preventDefault();
- s.close();
- });
- }
-
- // bind keydown events
- $(document).bind('keydown.fullmodal', function (e) {
- if (s.o.modal && e.keyCode === 9) { // TAB
- s.watchTab(e);
- }
- else if ((s.o.close && s.o.escClose) && e.keyCode === 27) { // ESC
- e.preventDefault();
- s.close();
- }
- });
-
- // update window size
- $(window).bind('resize.fullmodal', function () {
- // redetermine the window width/height
- w = s.getDimensions();
-
- // reposition the dialog
- s.o.autoResize ? s.setContainerDimensions() : s.o.autoPosition && s.setPosition();
-
- if (ie6 || ieQuirks) {
- s.fixIE();
- }
- else if (s.o.modal) {
- // update the iframe & overlay
- s.d.iframe && s.d.iframe.css({ height: w[0], width: w[1] });
- s.d.overlay.css({ height: w[0], width: w[1] });
- }
- });
- },
- /*
- * Unbind events
- */
- unbindEvents: function () {
- $('.' + this.o.closeClass).unbind('click.fullmodal');
- $(document).unbind('keydown.fullmodal');
- $(window).unbind('resize.fullmodal');
- this.d.overlay.unbind('click.fullmodal');
- },
- /*
- * Fix issues in IE6 and IE7 in quirks mode
- */
- fixIE: function () {
- var s = this, p = s.o.position;
-
- // simulate fixed position - adapted from BlockUI
- $.each([s.d.iframe || null, !s.o.modal ? null : s.d.overlay, s.d.container], function (i, el) {
- if (el) {
- var bch = 'document.body.clientHeight', bcw = 'document.body.clientWidth',
- bsh = 'document.body.scrollHeight', bsl = 'document.body.scrollLeft',
- bst = 'document.body.scrollTop', bsw = 'document.body.scrollWidth',
- ch = 'document.documentElement.clientHeight', cw = 'document.documentElement.clientWidth',
- sl = 'document.documentElement.scrollLeft', st = 'document.documentElement.scrollTop',
- s = el[0].style;
-
- s.position = 'absolute';
- if (i < 2) {
- s.removeExpression('height');
- s.removeExpression('width');
- s.setExpression('height', '' + bsh + ' > ' + bch + ' ? ' + bsh + ' : ' + bch + ' + "px"');
- s.setExpression('width', '' + bsw + ' > ' + bcw + ' ? ' + bsw + ' : ' + bcw + ' + "px"');
- }
- else {
- var te, le;
- if (p && p.constructor === Array) {
- var top = p[0]
- ? typeof p[0] === 'number' ? p[0].toString() : p[0].replace(/px/, '')
- : el.css('top').replace(/px/, '');
- te = top.indexOf('%') === -1
- ? top + ' + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'
- : parseInt(top.replace(/%/, '')) + ' * ((' + ch + ' || ' + bch + ') / 100) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"';
-
- if (p[1]) {
- var left = typeof p[1] === 'number' ? p[1].toString() : p[1].replace(/px/, '');
- le = left.indexOf('%') === -1
- ? left + ' + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'
- : parseInt(left.replace(/%/, '')) + ' * ((' + cw + ' || ' + bcw + ') / 100) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"';
- }
- }
- else {
- te = '(' + ch + ' || ' + bch + ') / 2 - (this.offsetHeight / 2) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"';
- le = '(' + cw + ' || ' + bcw + ') / 2 - (this.offsetWidth / 2) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"';
- }
- s.removeExpression('top');
- s.removeExpression('left');
- s.setExpression('top', te);
- s.setExpression('left', le);
- }
- }
- });
- },
- /*
- * Place focus on the first or last visible input
- */
- focus: function (pos) {
- var s = this, p = pos && $.inArray(pos, ['first', 'last']) !== -1 ? pos : 'first';
-
- // focus on dialog or the first visible/enabled input element
- var input = $(':input:enabled:visible:' + p, s.d.wrap);
- setTimeout(function () {
- input.length > 0 ? input.focus() : s.d.wrap.focus();
- }, 10);
- },
- getDimensions: function () {
- var el = $(window);
-
- // fix a jQuery/Opera bug with determining the window height
- var h = $.browser && $.browser.opera && $.browser.version > '9.5' && $.fn.jquery < '1.3'
- || $.browser && $.browser.opera && $.browser.version < '9.5' && $.fn.jquery > '1.2.6'
- ? el[0].innerHeight : el.height();
-
- return [h, el.width()];
- },
- getVal: function (v, d) {
- return v ? (typeof v === 'number' ? v
- : v === 'auto' ? 0
- : v.indexOf('%') > 0 ? ((parseInt(v.replace(/%/, '')) / 100) * (d === 'h' ? w[0] : w[1]))
- : parseInt(v.replace(/px/, '')))
- : null;
- },
- /*
- * Update the container. Set new dimensions, if provided.
- * Focus, if enabled. Re-bind events.
- */
- update: function (height, width) {
- var s = this;
-
- // prevent update if dialog does not exist
- if (!s.d.data) {
- return false;
- }
-
- // reset orig values
- s.d.origHeight = s.getVal(height, 'h');
- s.d.origWidth = s.getVal(width, 'w');
-
- // hide data to prevent screen flicker
- s.d.data.hide();
- height && s.d.container.css('height', height);
- width && s.d.container.css('width', width);
- s.setContainerDimensions();
- s.d.data.show();
- s.o.focus && s.focus();
-
- // rebind events
- s.unbindEvents();
- s.bindEvents();
- },
- setContainerDimensions: function () {
- var s = this,
- badIE = ie6 || ie7;
-
- // get the dimensions for the container and data
- var ch = s.d.origHeight ? s.d.origHeight : $.browser.opera ? s.d.container.height() : s.getVal(badIE ? s.d.container[0].currentStyle['height'] : s.d.container.css('height'), 'h'),
- cw = s.d.origWidth ? s.d.origWidth : $.browser.opera ? s.d.container.width() : s.getVal(badIE ? s.d.container[0].currentStyle['width'] : s.d.container.css('width'), 'w'),
- dh = s.d.data.outerHeight(true), dw = s.d.data.outerWidth(true);
-
- s.d.origHeight = s.d.origHeight || ch;
- s.d.origWidth = s.d.origWidth || cw;
-
- // mxoh = max option height, mxow = max option width
- var mxoh = s.o.maxHeight ? s.getVal(s.o.maxHeight, 'h') : null,
- mxow = s.o.maxWidth ? s.getVal(s.o.maxWidth, 'w') : null,
- mh = mxoh && mxoh < w[0] ? mxoh : w[0],
- mw = mxow && mxow < w[1] ? mxow : w[1];
-
- // moh = min option height
- var moh = s.o.minHeight ? s.getVal(s.o.minHeight, 'h') : 'auto';
- if (!ch) {
- if (!dh) { ch = moh; }
- else {
- if (dh > mh) { ch = mh; }
- else if (s.o.minHeight && moh !== 'auto' && dh < moh) { ch = moh; }
- else { ch = dh; }
- }
- }
- else {
- ch = s.o.autoResize && ch > mh ? mh : ch < moh ? moh : ch;
- }
-
- // mow = min option width
- var mow = s.o.minWidth ? s.getVal(s.o.minWidth, 'w') : 'auto';
- if (!cw) {
- if (!dw) { cw = mow; }
- else {
- if (dw > mw) { cw = mw; }
- else if (s.o.minWidth && mow !== 'auto' && dw < mow) { cw = mow; }
- else { cw = dw; }
- }
- }
- else {
- cw = s.o.autoResize && cw > mw ? mw : cw < mow ? mow : cw;
- }
-
- s.d.container.css({ height: ch, width: cw });
- s.d.wrap.css({ overflow: (dh > ch || dw > cw) ? 'auto' : 'visible' });
- s.o.autoPosition && s.setPosition();
- },
- setPosition: function () {
- var s = this, top, left,
- hc = (w[0] / 2) - (s.d.container.outerHeight(true) / 2),
- vc = (w[1] / 2) - (s.d.container.outerWidth(true) / 2);
-
- if (s.o.position && Object.prototype.toString.call(s.o.position) === '[object Array]') {
- top = s.o.position[0] || hc;
- left = s.o.position[1] || vc;
- } else {
- top = hc;
- left = vc;
- }
- s.d.container.css({ left: left, top: top });
- },
- watchTab: function (e) {
- var s = this;
-
- if ($(e.target).parents('.fullmodal-container').length > 0) {
- // save the list of inputs
- s.inputs = $(':input:enabled:visible:first, :input:enabled:visible:last', s.d.data[0]);
-
- // if it's the first or last tabbable element, refocus
- if ((!e.shiftKey && e.target === s.inputs[s.inputs.length - 1]) ||
- (e.shiftKey && e.target === s.inputs[0]) ||
- s.inputs.length === 0) {
- e.preventDefault();
- var pos = e.shiftKey ? 'last' : 'first';
- s.focus(pos);
- }
- }
- else {
- // might be necessary when custom onShow callback is used
- e.preventDefault();
- s.focus();
- }
- },
- /*
- * Open the modal dialog elements
- * - Note: If you use the onOpen callback, you must "show" the
- * overlay and container elements manually
- * (the iframe will be handled by SimpleModal)
- */
- open: function () {
- var s = this;
- // display the iframe
- s.d.iframe && s.d.iframe.show();
-
- if ($.isFunction(s.o.onOpen)) {
- // execute the onOpen callback
- s.o.onOpen.apply(s, [s.d]);
- }
- else {
- // display the remaining elements
- s.d.overlay.show();
- s.d.container.show();
- s.d.data.show();
- }
-
- s.o.focus && s.focus();
-
- // bind default events
- s.bindEvents();
- },
- /*
- * Close the modal dialog
- * - Note: If you use an onClose callback, you must remove the
- * overlay, container and iframe elements manually
- *
- * @param {boolean} external Indicates whether the call to this
- * function was internal or external. If it was external, the
- * onClose callback will be ignored
- */
- close: function () {
- var s = this;
-
- // prevent close when dialog does not exist
- if (!s.d.data) {
- return false;
- }
-
- // remove the default events
- s.unbindEvents();
-
- if ($.isFunction(s.o.onClose) && !s.occb) {
- // set the onClose callback flag
- s.occb = true;
-
- // execute the onClose callback
- s.o.onClose.apply(s, [s.d]);
- }
- else {
- // if the data came from the DOM, put it back
- if (s.d.placeholder) {
- var ph = $('#fullmodal-placeholder');
- // save changes to the data?
- if (s.o.persist) {
- // insert the (possibly) modified data back into the DOM
- ph.replaceWith(s.d.data.removeClass('fullmodal-data').css('display', s.display));
- }
- else {
- // remove the current and insert the original,
- // unmodified data back into the DOM
- s.d.data.hide().remove();
- ph.replaceWith(s.d.orig);
- }
- }
- else {
- // otherwise, remove it
- s.d.data.hide().remove();
- }
-
- // remove the remaining elements
- s.d.container.hide().remove();
- s.d.overlay.hide();
- s.d.iframe && s.d.iframe.hide().remove();
- setTimeout(function () {
- // opera work-around
- s.d.overlay.remove();
-
- // reset the dialog object
- s.d = {};
- }, 10);
- }
- }
- };
-})(jQuery);
diff --git a/src/Umbraco.Web.UI/umbraco_client/modal/modal.js b/src/Umbraco.Web.UI/umbraco_client/modal/modal.js
deleted file mode 100644
index ba6c4d96fb..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/modal/modal.js
+++ /dev/null
@@ -1,402 +0,0 @@
-///
-
-Umbraco.Sys.registerNamespace("Umbraco.Controls");
-
-(function($) {
-
- $.fn.ModalWindowAPI = function() {
- /// jQuery plugin exposes the modal window api for the selected object
- //if there's more than item in the selector, throw exception
- if ($(this).length != 1) {
- throw "ModalWindowAPI selector requires that there be exactly one control selected";
- };
- return $(this).data("ModalWindowAPI") == null ? null : $(this).data("ModalWindowAPI");
- };
-
- $.fn.ModalWindowShow = function (name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- /// Shows a modal window based on existing content in the DOM
- return $(this).each(function () {
- //check if the modal exists already
- if ($(this).closest(".umbModalBox").length > 0) {
- Umbraco.Controls.ModalWindow.cntr++;
- var api = $(this).closest(".umbModalBox").ModalWindowAPI();
- api._obj.jqmShow(); //since it exist, just re-show it
- }
- else {
- var modal = Umbraco.Controls.ModalWindow();
- modal.show(this, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback);
- }
- });
- };
-
- $.fn.ModalWindowShowWithoutBackground = function(name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- /// Shows a modal window based on existing content in the DOM
- return $(this).each(function() {
- //check if the modal exists already
- if ($(this).closest(".umbModalBox").length > 0) {
- Umbraco.Controls.ModalWindow.cntr++;
- var api = $(this).closest(".umbModalBox").ModalWindowAPI();
- api._hideOverlay = true;
- api._obj.jqmShow(); //since it exist, just re-show it
- }
- else {
- var modal = Umbraco.Controls.ModalWindow();
- modal._hideOverlay = true;
- modal.show(this, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback);
- }
- });
- };
-
- Umbraco.Controls.ModalWindow = function () {
- ///
- /// Modal window class, when open is called, it will create a temporary html element to attach the window to.
- /// The modal will attempt to be created in the top most frame if all of the libraries are found there, if not,
- /// it uses the current frame's document/jquery objects.
- ///
-
- var m = {
- _wId: Umbraco.Utils.generateRandom().toString().replace(".", ""), //the modal window ID that will be assigned
- _obj: null, //the jquery element for the modal window
- _rVal: null, //a return value specified when closing that gets passed to the onCloseCallback method
- _cntr: Umbraco.Controls.ModalWindow.cntr++, //counts instances
- _hideOverlay: false, // hides the overlay between the modal and the backgground
- //get a reference to the topmost jquery object if there is a modal framework there, otherwise use current
- _$: (window.top.jQuery && window.top.jQuery.jqm) ? window.top.jQuery : $,
- //get a reference to the topmost document if we're selecting the topmost jquery, otherwise use the current
- _document: (window.top.jQuery && window.top.jQuery.jqm) ? window.top.document : document,
-
- show: function(selector, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- /// Shows a modal window based on existing content in the DOM
- //check if the modal elems exist
- if (!this._modalElemsExist()) {
- this._createModalElems(false, selector);
- }
-
- var _this = this;
- this._open(name, showHeader,
- width, height, top, leftOffset,
- closeTriggers, onCloseCallback,
- function(h) {
- //insert the content
- var umbModal = _this._$(h.w);
- var umbModalContent = _this._$(".umbModalBoxContent", umbModal);
- umbModalContent.append(_this._$(selector));
- _this._$(selector).show();
- });
- },
- open: function(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) {
- /// Shows a modal window with content specified in the url in an iframe
- //check if the modal elems exist
- if (!this._modalElemsExist()) {
- this._createModalElems(true);
- }
- var _this = this;
- this._open(name, showHeader,
- width, height, top, leftOffset,
- closeTriggers, onCloseCallback,
- function(h) {
- //get the iframe, and set the url
- var umbModal = _this._$(h.w);
- var iframe = _this._$("iframe", umbModal);
- iframe.attr('src', _this._getUniqueUrl(url));
- iframe.width(width);
- iframe.height(showHeader ? height - 30 : height);
- iframe.show();
- });
- },
- _open: function(name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback, onCreate) {
- /// Opens a modal window
- /// Optional
- /// Optional
- ///
- /// Optional: An array of jQuery selectors that will trigger the modal window to close
- ///
- ///
- /// A method that is called when the window is closing. the callback method will receive an instance
- /// of the jQuery object for the popup window/iframe so that you can query against the contents of the window
- /// to extract any information.
- /// The callback will receive one parameter with 2 properties:
- /// modalContent = the jQuery object for the popup window to query against
- /// outVal = the value passed to the close window method that was used to close the window (if it was specified)
- ///
- /// The generated jquery object bound to the modal window
-
-
-
- var _this = this;
-
- this._obj.jqm({
-
- onShow: function(h) {
- var umbModal = _this._$(h.w);
-
- //remove the header if it shouldn't be shown
- if (!showHeader) {
- _this._obj.find(".umbModalBoxHeader").remove();
- _this._obj.find(".umbracModalBoxClose").remove();
- }
- else {
- //set the title
- _this._obj.find(".umbModalBoxHeader").html(name);
- }
-
- //if the height is set, then set it
- if (height > 0) {
- umbModal.height(height);
- }
-
- //if the width is set, then set it in the center
- if (width > 0) {
- umbModal.width(width);
- umbModal.css("left", ((_this._$(_this._document).width() - width) / 2) + "px");
- }
-
- //if the top is set
- if (top > 0) {
- umbModal.css("top", top + "px");
- }
-
- //if the leftOffset is set
- if (leftOffset > 0) {
- var newLeft = parseInt(umbModal.css("left").replace("px", "")) + leftOffset;
- umbModal.css("left", newLeft);
- }
-
- umbModal.fadeIn(250);
-
- if (_this._hideOverlay)
- jQuery('.jqmOverlay').attr('class','');
-
- if (typeof onCreate == "function") {
- onCreate.call(_this, h)
- }
-
- _this._$(_this._document).keyup(function(event) {
- if (event.keyCode == 27 && umbModal.css("display") == "block") {
- _this.close();
- }
- });
-
- if (closeTriggers) {
- for (var x in closeTriggers) {
- //Ok, this is a bit weird, but it makes sense. Since the selector passed in might be a selector
- //that exists in the root jquery obj, the current jquery object, or an item in the iframe if there is one
- //we'll try to find them all.
- var trigger = closeTriggers[x];
- //first check if the object passed in is already a jquery object
- if (!trigger.jquery) {
- trigger = _this._$(closeTriggers[x]); //find object in the doc that owns the modal container
- if (trigger.length == 0) {
- trigger = $(closeTriggers[x]); //find object in the doc that owns the curr jquery object
- }
- if (trigger.length == 0) {
- try {
- trigger = h.w.find("iframe").contents().find(closeTriggers[x]);
- }
- catch (err) { } //IE throws an exception when navigating iframes, but it stil works...
- }
- }
- _this._obj.jqmAddClose(trigger);
- }
- }
-
- },
- onHide: function(h) {
- var umbModal = _this._$(h.w);
- var umbModalContent = _this._$(".umbModalBoxContent", umbModal);
- var iframe = umbModalContent.find("iframe");
- if (typeof onCloseCallback == "function") {
- //call the callback if specified, pass the jquery content object as a param and the output value array
- //pass the iframe if there is one
- var e = { modalContent: iframe.length > 0 ? iframe : umbModalContent, outVal: _this._rVal };
- onCloseCallback.call(_this, e);
- }
-
- h.w.fadeOut(300, function() {
- //remove the modal objects and iframes if it's an iframe modal box
- if (iframe.length > 0) {
- iframe.attr('src', 'javascript:false;document.write(\'\');');
- _this._obj.remove();
- }
- h.o.remove();
- _this._close();
- });
- }
- });
-
- this._obj.jqmShow();
- //store the api in this objects data store
- this._obj.data("ModalWindowAPI", this);
- return this._obj;
- },
- close: function(rVal) {
- /// Closes the modal window
- /// if specified, will add this parameter to the onCloseCallback method's outVal parameter so it may be used in the closing callback method
- this._rVal = rVal;
- top.focus();
- this._obj.jqmHide(); //do the hiding, this will call the onHide handler
- },
- _close: function() {
- /// Finalizes the objects counter and instance manager
-
- //remove the instance from the instance manager
- Umbraco.Controls.ModalWindow.inst[this._cntr] = null;
- Umbraco.Controls.ModalWindow.inst[this._wId] = null;
- Umbraco.Controls.ModalWindow.cntr--; //reduce the counter
- },
- _createModalElems: function(withIFrame, selector) {
- /// This will create the html elements required for the modal overlay if they do not already exist in the DOM
-
- var overlayHtml = this._getOverlayHtml(withIFrame);
-
- if (!selector) {
- this._obj = this._$(overlayHtml).appendTo(this._$("body"));
- }
- else {
- this._obj = this._$(overlayHtml).appendTo(this._$(selector).parent());
- }
- //update the z-index so it stacks
- this._obj.css("z-index", 10000 + (this._cntr * 10));
-
- var _this = this;
- if (this._$.fn.draggable) {
- this._obj.draggable({
- cursor: 'move',
- distance: 5,
- iframeFix: withIFrame,
- helper: function(event) {
- var o = _this._$(this).clone();
- o.children().remove();
- o.css("border-width", "1px");
- return o;
- },
- start: function(event, ui) {
- ui.helper.css("z-index", 20000);
- },
- stop: function(event, ui) {
- _this._obj.css("top", ui.position.top);
- _this._obj.css("left", ui.position.left);
- }
- });
- }
- else {
- this._obj.find(".umbModalBoxHeader").css("cursor", "default"); //remove the move cursor if we can't move
- }
- },
- _getOverlayHtml: function(withIFrame) {
- var overlayHtml = "" +
- "
× " +
- "
";
- if (withIFrame) {
- overlayHtml += "";
- }
- overlayHtml += "
";
- return overlayHtml;
- },
- _modalElemsExist: function() {
- return (this._$("#" + this._wId + "_modal").length > 0);
- },
- _getUniqueUrl: function(url) {
- var r = Umbraco.Utils.generateRandom();
- if (url.indexOf("?") > -1)
- return url += "&rndo=" + r;
- else
- return url += "?rndo=" + r;
- }
- };
-
- //store a reference to this api by the id and the counter
- Umbraco.Controls.ModalWindow.inst[m._cntr] = m;
- Umbraco.Controls.ModalWindow.inst[m._wId] = Umbraco.Controls.ModalWindow.inst[m._cntr];
-
- return m;
- };
-
- // instance manager
- Umbraco.Controls.ModalWindow.cntr = 0;
- Umbraco.Controls.ModalWindow.inst = {};
-
-})(jQuery);
-
-
-//
-// jqModal - Minimalist Modaling with jQuery
-// (http://dev.iceburg.net/jquery/jqModal/)
-//
-// Copyright (c) 2007,2008 Brice Burgess
-// Dual licensed under the MIT and GPL licenses:
-// http://www.opensource.org/licenses/mit-license.php
-// http://www.gnu.org/licenses/gpl.html
-//
-// $Version: 07/06/2008 +r13
-//
-(function($) {
- $.fn.jqm = function(o) {
- var p = {
- overlay: 50,
- overlayClass: 'jqmOverlay',
- closeClass: 'jqmClose',
- trigger: '.jqModal',
- ajax: F,
- ajaxText: '',
- target: F,
- modal: true,
- toTop: F,
- onShow: F,
- onHide: F,
- onLoad: F
- };
- return this.each(function() {
- if (this._jqm) return H[this._jqm].c = $.extend({}, H[this._jqm].c, o); s++; this._jqm = s;
- H[s] = { c: $.extend(p, $.jqm.params, o), a: F, w: $(this).addClass('jqmID' + s), s: s };
- if (p.trigger) $(this).jqmAddTrigger(p.trigger);
- });
- };
-
- $.fn.jqmAddClose = function(e) { return hs(this, e, 'jqmHide'); };
- $.fn.jqmAddTrigger = function(e) { return hs(this, e, 'jqmShow'); };
- $.fn.jqmShow = function(t) { return this.each(function() { $.jqm.open(this._jqm, t); }); };
- $.fn.jqmHide = function(t) { return this.each(function() { $.jqm.close(this._jqm, t); }); };
-
- $.jqm = {
- hash: {},
- open: function(s, t) {
- var h = H[s], c = h.c, cc = '.' + c.closeClass, z = (parseInt(h.w.css('z-index'))), z = (z > 0) ? z : 3000, o = $('
').css({ height: '100%', width: '100%', position: 'fixed', left: 0, top: 0, 'z-index': z - 1 }); if (h.a) return F; h.t = t; h.a = true; h.w.css('z-index', z);
- if (c.modal) { if (!A[0]) L('bind'); A.push(s); }
- else if (c.overlay > 0) h.w.jqmAddClose(o);
- else o = F;
-
- h.o = (o) ? o.addClass(c.overlayClass).prependTo('body') : F;
- if (ie6) { $('html,body').css({ height: '100%', width: '100%' }); if (o) { o = o.css({ position: 'absolute' })[0]; for (var y in { Top: 1, Left: 1 }) o.style.setExpression(y.toLowerCase(), "(_=(document.documentElement.scroll" + y + " || document.body.scroll" + y + "))+'px'"); } }
-
- if (c.ajax) {
- var r = c.target || h.w, u = c.ajax, r = (typeof r == 'string') ? $(r, h.w) : $(r), u = (u.substr(0, 1) == '@') ? $(t).attr(u.substring(1)) : u;
- r.html(c.ajaxText).load(u, function() { if (c.onLoad) c.onLoad.call(this, h); if (cc) h.w.jqmAddClose($(cc, h.w)); e(h); });
- }
- else if (cc) h.w.jqmAddClose($(cc, h.w));
-
- if (c.toTop && h.o) h.w.before(' ').insertAfter(h.o);
- (c.onShow) ? c.onShow(h) : h.w.show(); e(h); return F;
- },
- close: function(s) {
- var h = H[s]; if (!h.a) return F; h.a = F;
- if (A[0]) { A.pop(); if (!A[0]) L('unbind'); }
- if (h.c.toTop && h.o) $('#jqmP' + h.w[0]._jqm).after(h.w).remove();
- if (h.c.onHide) h.c.onHide(h); else { h.w.hide(); if (h.o) h.o.remove(); } return F;
- },
- params: {}
- };
- var s = 0, H = $.jqm.hash, A = [], ie6 = $.browser && $.browser.msie && ($.browser.version == "6.0"), F = false,
-i = $('').css({ opacity: 0 }),
-e = function(h) { if (ie6) if (h.o) h.o.html('
').prepend(i); else if (!$('iframe.jqm', h.w)[0]) h.w.prepend(i); },
- //f = function(h) { try { $(':input:visible', h.w)[0].focus(); } catch (_) { } },
-L = function(t) { $()[t]("keypress", m)[t]("keydown", m)[t]("mousedown", m); },
-m = function(e) { var h = H[A[A.length - 1]], r = (!$(e.target).parents('.jqmID' + h.s)[0]); if (r) f(h); return !r; },
-hs = function(w, t, c) {
- return w.each(function() {
- var s = this._jqm; $(t).each(function() {
- if (!this[c]) { this[c] = []; $(this).click(function() { for (var i in { jqmShow: 1, jqmHide: 1 }) for (var s in this[i]) if (H[this[i][s]]) H[this[i][s]].w[i](this); return F; }); } this[c].push(s);
- });
- });
-};
-})(jQuery);
diff --git a/src/Umbraco.Web.UI/umbraco_client/modal/modalBackground.gif b/src/Umbraco.Web.UI/umbraco_client/modal/modalBackground.gif
deleted file mode 100644
index b41ee631c2..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/modal/modalBackground.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/modal/modalGradiant.gif b/src/Umbraco.Web.UI/umbraco_client/modal/modalGradiant.gif
deleted file mode 100644
index b46e9f00c0..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/modal/modalGradiant.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/modal/style.css b/src/Umbraco.Web.UI/umbraco_client/modal/style.css
deleted file mode 100644
index 7a4c2a1728..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/modal/style.css
+++ /dev/null
@@ -1,66 +0,0 @@
-/* TODO: Change these to classes to support many modal boxes */
-div#umbModalBox,
-div.umbModalBox {
- position: absolute;
- top: 0;
- border: 5px #a3a3a3 solid;
- /*border-top: none;*/
- text-align: left;
- z-index: 10000;
- display: none;
- background: #fff ! important;
- font: bold 100% "Lucida Grande", Arial, sans-serif;
-}
-
-div#umbModalBox.loaded,
-div.umbModalBox.loaded
-{
- background-image: none;
-}
-
-.jqmOverlay {background: url(modalBackground.gif)}
-
-div#umbModalBoxHeader,
-div.umbModalBoxHeader {
- margin: 0;
- text-shadow: #FFF 0 1px 0;
- padding: .5em 2em .5em .75em;
- margin: 0;
- text-align: left;
-}
-
-div#umbModalBoxContent,
-div.umbModalBoxContent {
- padding: 0px;
- overflow: hidden;
- /*height: 100%;*/
- background: #fff ! important;
-}
-
-a#umbracModalBoxClose,
-a.umbracModalBoxClose {
- display: block;
- position: absolute;
- right: 5px; top: 2px;
- padding: 2px 3px;
- font-weight: bold;
- text-decoration: none;
- font-size: 13px;
-}
-
-div#umbModalBoxContent,
-div.umbModalBoxContent {border-top: 1px solid #F9F9F9; }
-
-div#umbModalBoxHeader,
-div.umbModalBoxHeader {
- background: url(modalGradiant.gif) repeat-x bottom #fff ! important;
- border-bottom: 1px solid #CCC;
- color: #378080;
- cursor:move;
-}
-
-div#umbracModalBoxClose,
-div.umbracModalBoxClose { color: #777 }
-
-div#umbracModalBoxClose:hover,
-div.umbracModalBoxClose:hover { color: #000 }
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js b/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js
deleted file mode 100644
index bc00f97ac2..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js
+++ /dev/null
@@ -1,105 +0,0 @@
- var doScroll = false;
-
- var el = null;
- var FromLeftMax = 0;
-
- // Added NH 2.1
- var scrollIcons = new Array(0);
-
- function RegisterScrollingMenuButtons(elId, Buttons) {
- var icons = Buttons.split(",");
-
- scrollIcons.push(new scrollingContent(elId, icons));
- }
-
- function scrollingContent(Name, Buttons) {
- this.name = Name;
- this.buttons = new Array(Buttons.length);
- for(var i=0;i FromLeftMax) && doScroll) {
- el.style.left = slFromLeft +"px";
- window.setTimeout("scrollHorisontal(" + direction + ");", 4);
- }
- }
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css b/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css
deleted file mode 100644
index f5ab5fd269..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css
+++ /dev/null
@@ -1,20 +0,0 @@
-.slh {
- position:relative;
- z-index:105;
- overflow:hidden;
- }
-
-.sl {
- position:absolute;
- left:0px; top:0px;
- z-index:1;
- }
-
-.editorArrowOver {
- cursor: pointer;
- _cursor: hand;
- background-color: #DEDFFD;
-}
-
-.editorArrow {
- }
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/splitbutton/InsertMacroSplitButton.js b/src/Umbraco.Web.UI/umbraco_client/splitbutton/InsertMacroSplitButton.js
deleted file mode 100644
index a99286a205..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/splitbutton/InsertMacroSplitButton.js
+++ /dev/null
@@ -1,57 +0,0 @@
-Umbraco.Sys.registerNamespace("Umbraco.Controls");
-
-(function ($) {
-
- Umbraco.Controls.InsertMacroSplitButton = base2.Base.extend({
-
- //private methods/variables
- _opts: null,
-
- // Constructor
- constructor: function (opts) {
- // Merge options with default
- this._opts = $.extend({
- // Default options go here
- }, opts);
- },
-
- //public methods/variables
-
- init: function () {
- var self = this;
-
- //the container is the 'scope' of which to find .sbPlaceHolder's, by default it is null so the scope is the whole page
- var container = this._opts.container != null ? this._opts.container : null;
-
- //setup the split buttons, find all .sbPlaceHolder's and assign the menu to it which should always
- //be the previous element with the class .sbMenu
- var splitButtons = $('.sbPlaceHolder', container);
- splitButtons.each(function() {
- var menu = $(this).prev(".sbMenu");
- $(this).find("a.sbLink").splitbutton({ menu: menu });
- });
-
- //assign the click handler to each macro item drop down
- $(".sbMenu .macro-item").click(function () {
- var alias = $(this).attr("rel");
- if ($(this).attr("data-has-params") == "true") {
- self._opts.openMacroModel.apply(self, [alias]);
- }
- else {
- self._opts.insertMacroMarkup.apply(self, [alias]);
- }
- });
-
- //assign the callback for the regular insert macro button (not the drop down)
- $(".sbPlaceHolder a.sbLink").click(function() {
- self._opts.openMacroModel.apply(self, []); //call the callback with no alias
- });
-
- //a fix for scroll issues TODO: put this code in this class and make it flexible (i.e. NOT with ids)
- //applySplitButtonOverflow('mcontainer', 'innerc', 'macroMenu', '.macro-item', 'showMoreMacros');
-
- }
-
- });
-
-})(jQuery);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_downarrow.png b/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_downarrow.png
deleted file mode 100644
index 3f31f8bc97..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_downarrow.png and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_hover.png b/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_hover.png
deleted file mode 100644
index 757b81da27..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/splitbutton/images/splitbutton_hover.png and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/splitbutton/jquery.splitbutton.js b/src/Umbraco.Web.UI/umbraco_client/splitbutton/jquery.splitbutton.js
deleted file mode 100644
index 5cab5f6596..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/splitbutton/jquery.splitbutton.js
+++ /dev/null
@@ -1,530 +0,0 @@
-(function ($) {
- function _1(_2) {
- $(_2).appendTo("body");
- $(_2).addClass("menu-top");
- var _3 = [];
- _4($(_2));
- var _5 = null;
- for (var i = 0; i < _3.length; i++) {
- var _6 = _3[i];
- _7(_6);
- _6.children("div.menu-item").each(function () {
- _10(_2, $(this));
- });
- _6.bind("mouseenter", function () {
- if (_5) {
- clearTimeout(_5);
- _5 = null;
- }
- }).bind("mouseleave", function () {
- _5 = setTimeout(function () {
- _18(_2);
- }, 100);
- });
- }
- function _4(_8) {
- _3.push(_8);
- _8.find(">div").each(function () {
- var _9 = $(this);
- var _a = _9.find(">div");
- if (_a.length) {
- _a.insertAfter(_2);
- _9[0].submenu = _a;
- _4(_a);
- }
- });
- };
- function _7(_b) {
- _b.addClass("menu").find(">div").each(function () {
- var _c = $(this);
- if (_c.hasClass("menu-sep")) {
- _c.html(" ");
- } else {
- var _d = _c.addClass("menu-item").html();
- _c.empty().append($("").html(_d));
- var _e = _c.attr("iconCls") || _c.attr("icon");
- if (_e) {
- $("").addClass(_e).appendTo(_c);
- }
- if (_c[0].submenu) {
- $("").appendTo(_c);
- }
- if ($.boxModel == true) {
- var _f = _c.height();
- _c.height(_f - (_c.outerHeight() - _c.height()));
- }
- }
- });
- _b.hide();
- };
- };
- function _10(_11, _12) {
- _12.click(function () {
- if (!this.submenu) {
- _18(_11);
- var _13 = $(this).attr("href");
- if (_13) {
- location.href = _13;
- }
- }
- var _14 = $(_11).menu("getItem", this);
- $.data(_11, "menu").options.onClick.call(_11, _14);
- });
- _12.hover(function () {
- _12.siblings().each(function () {
- if (this.submenu) {
- _1b(this.submenu);
- }
- $(this).removeClass("menu-active");
- });
- _12.addClass("menu-active");
- var _15 = _12[0].submenu;
- if (_15) {
- var _16 = _12.offset().left + _12.outerWidth() - 2;
- if (_16 + _15.outerWidth() > $(window).width()) {
- _16 = _12.offset().left - _15.outerWidth() + 2;
- }
- _1f(_15, { left: _16, top: _12.offset().top - 3 });
- }
- }, function (e) {
- _12.removeClass("menu-active");
- var _17 = _12[0].submenu;
- if (_17) {
- if (e.pageX >= parseInt(_17.css("left"))) {
- _12.addClass("menu-active");
- } else {
- _1b(_17);
- }
- } else {
- _12.removeClass("menu-active");
- }
- });
- _12.unbind(".menu").bind("mousedown.menu", function () {
- return false;
- });
- };
- function _18(_19) {
- var _1a = $.data(_19, "menu").options;
- _1b($(_19));
- $(document).unbind(".menu");
- _1a.onHide.call(_19);
- return false;
- };
- function _1c(_1d, pos) {
- var _1e = $.data(_1d, "menu").options;
- if (pos) {
- _1e.left = pos.left;
- _1e.top = pos.top;
- }
- _1f($(_1d), { left: _1e.left, top: _1e.top }, function () {
- $(document).unbind(".menu").bind("mousedown.menu", function () {
- _18(_1d);
- $(document).unbind(".menu");
- return false;
- });
- _1e.onShow.call(_1d);
- });
- };
- function _1f(_20, pos, _21) {
- if (!_20) {
- return;
- }
- if (pos) {
- _20.css(pos);
- }
- _20.show(0, function () {
- if (!_20[0].shadow) {
- _20[0].shadow = $("
").insertAfter(_20);
- }
- _20[0].shadow.css({ display: "block", zIndex: $.fn.menu.defaults.zIndex++, left: _20.css("left"), top: _20.css("top"), width: _20.outerWidth(), height: _20.outerHeight() });
- _20.css("z-index", $.fn.menu.defaults.zIndex++);
- if (_21) {
- _21();
- }
- });
- };
- function _1b(_22) {
- if (!_22) {
- return;
- }
- _23(_22);
- _22.find("div.menu-item").each(function () {
- if (this.submenu) {
- _1b(this.submenu);
- }
- $(this).removeClass("menu-active");
- });
- function _23(m) {
- m.stop(true, true);
- if (m[0].shadow) {
- m[0].shadow.hide();
- }
- m.hide();
- };
- };
- function _24(_25, _26) {
- var _27 = null;
- var tmp = $("
");
- function _28(_29) {
- _29.children("div.menu-item").each(function () {
- var _2a = $(_25).menu("getItem", this);
- var s = tmp.empty().html(_2a.text).text();
- if (_26 == $.trim(s)) {
- _27 = _2a;
- } else {
- if (this.submenu && !_27) {
- _28(this.submenu);
- }
- }
- });
- };
- _28($(_25));
- tmp.remove();
- return _27;
- };
- function _2b(_2c, _2d) {
- var _2e = $(_2c);
- if (_2d.parent) {
- _2e = _2d.parent.submenu;
- }
- var _2f = $("").appendTo(_2e);
- $("").html(_2d.text).appendTo(_2f);
- if (_2d.iconCls) {
- $("").addClass(_2d.iconCls).appendTo(_2f);
- }
- if (_2d.id) {
- _2f.attr("id", _2d.id);
- }
- if (_2d.href) {
- _2f.attr("href", _2d.href);
- }
- if (_2d.onclick) {
- _2f.attr("onclick", _2d.onclick);
- }
- _10(_2c, _2f);
- };
- function _30(_31, _32) {
- function _33(el) {
- if (el.submenu) {
- el.submenu.children("div.menu-item").each(function () {
- _33(this);
- });
- var _34 = el.submenu[0].shadow;
- if (_34) {
- _34.remove();
- }
- el.submenu.remove();
- }
- $(el).remove();
- };
- _33(_32);
- };
- function _35(_36) {
- $(_36).children("div.menu-item").each(function () {
- _30(_36, this);
- });
- if (_36.shadow) {
- _36.shadow.remove();
- }
- $(_36).remove();
- };
- $.fn.menu = function (_37, _38) {
- if (typeof _37 == "string") {
- return $.fn.menu.methods[_37](this, _38);
- }
- _37 = _37 || {};
- return this.each(function () {
- var _39 = $.data(this, "menu");
- if (_39) {
- $.extend(_39.options, _37);
- } else {
- _39 = $.data(this, "menu", { options: $.extend({}, $.fn.menu.defaults, _37) });
- _1(this);
- }
- $(this).css({ left: _39.options.left, top: _39.options.top });
- });
- };
- $.fn.menu.methods = { show: function (jq, pos) {
- return jq.each(function () {
- _1c(this, pos);
- });
- }, hide: function (jq) {
- return jq.each(function () {
- _18(this);
- });
- }, destroy: function (jq) {
- return jq.each(function () {
- _35(this);
- });
- }, setText: function (jq, _3a) {
- return jq.each(function () {
- $(_3a.target).children("div.menu-text").html(_3a.text);
- });
- }, setIcon: function (jq, _3b) {
- return jq.each(function () {
- var _3c = $(this).menu("getItem", _3b.target);
- if (_3c.iconCls) {
- $(_3c.target).children("div.menu-icon").removeClass(_3c.iconCls).addClass(_3b.iconCls);
- } else {
- $("").addClass(_3b.iconCls).appendTo(_3b.target);
- }
- });
- }, getItem: function (jq, _3d) {
- var _3e = { target: _3d, id: $(_3d).attr("id"), text: $.trim($(_3d).children("div.menu-text").html()), href: $(_3d).attr("href"), onclick: $(_3d).attr("onclick") };
- var _3f = $(_3d).children("div.menu-icon");
- if (_3f.length) {
- var cc = [];
- var aa = _3f.attr("class").split(" ");
- for (var i = 0; i < aa.length; i++) {
- if (aa[i] != "menu-icon") {
- cc.push(aa[i]);
- }
- }
- _3e.iconCls = cc.join(" ");
- }
- return _3e;
- }, findItem: function (jq, _40) {
- return _24(jq[0], _40);
- }, appendItem: function (jq, _41) {
- return jq.each(function () {
- _2b(this, _41);
- });
- }, removeItem: function (jq, _42) {
- return jq.each(function () {
- _30(this, _42);
- });
- }
- };
- $.fn.menu.defaults = { zIndex: 110000, left: 0, top: 0, onShow: function () {
- }, onHide: function () {
- }, onClick: function (_43) {
- }
- };
-})(jQuery);
-
-(function ($) {
- function _1(_2) {
- var _3 = $.data(_2, "linkbutton").options;
- $(_2).empty();
- $(_2).addClass("l-btn");
- if (_3.id) {
- $(_2).attr("id", _3.id);
- } else {
- $(_2).removeAttr("id");
- }
- if (_3.plain) {
- $(_2).addClass("l-btn-plain");
- } else {
- $(_2).removeClass("l-btn-plain");
- }
- if (_3.text) {
- $(_2).html(_3.text).wrapInner("" + "" + " " + " ");
- if (_3.iconCls) {
- $(_2).find(".l-btn-text").addClass(_3.iconCls).css("padding-left", "20px");
- }
- } else {
- $(_2).html(" ").wrapInner("" + "" + " " + " " + " ");
- if (_3.iconCls) {
- $(_2).find(".l-btn-empty").addClass(_3.iconCls);
- }
- }
- _4(_2, _3.disabled);
- };
- function _4(_5, _6) {
- var _7 = $.data(_5, "linkbutton");
- if (_6) {
- _7.options.disabled = true;
- var _8 = $(_5).attr("href");
- if (_8) {
- _7.href = _8;
- $(_5).attr("href", "javascript:void(0)");
- }
- var _9 = $(_5).attr("onclick");
- if (_9) {
- _7.onclick = _9;
- $(_5).attr("onclick", "");
- }
- $(_5).addClass("l-btn-disabled");
- } else {
- _7.options.disabled = false;
- if (_7.href) {
- $(_5).attr("href", _7.href);
- }
- if (_7.onclick) {
- _5.onclick = _7.onclick;
- }
- $(_5).removeClass("l-btn-disabled");
- }
- };
- $.fn.linkbutton = function (_a, _b) {
- if (typeof _a == "string") {
- return $.fn.linkbutton.methods[_a](this, _b);
- }
- _a = _a || {};
- return this.each(function () {
- var _c = $.data(this, "linkbutton");
- if (_c) {
- $.extend(_c.options, _a);
- } else {
- $.data(this, "linkbutton", { options: $.extend({}, $.fn.linkbutton.defaults, $.fn.linkbutton.parseOptions(this), _a) });
- $(this).removeAttr("disabled");
- }
- _1(this);
- });
- };
- $.fn.linkbutton.methods = { options: function (jq) {
- return $.data(jq[0], "linkbutton").options;
- }, enable: function (jq) {
- return jq.each(function () {
- _4(this, false);
- });
- }, disable: function (jq) {
- return jq.each(function () {
- _4(this, true);
- });
- }
- };
- $.fn.linkbutton.parseOptions = function (_d) {
- var t = $(_d);
- return { id: t.attr("id"), disabled: (t.attr("disabled") ? true : undefined), plain: (t.attr("plain") ? t.attr("plain") == "true" : undefined), text: $.trim(t.html()), iconCls: (t.attr("icon") || t.attr("iconCls")) };
- };
- $.fn.linkbutton.defaults = { id: null, disabled: false, plain: false, text: "", iconCls: null };
-})(jQuery);
-
-
-(function ($) {
- function _1(_2) {
- var _3 = $.data(_2, "splitbutton").options;
- var _4 = $(_2);
- _4.removeClass("s-btn-active s-btn-plain-active");
- _4.linkbutton(_3);
- if (_3.menu) {
- $(_3.menu).menu({ onShow: function () {
- _4.addClass((_3.plain == true) ? "s-btn-plain-active" : "s-btn-active");
- }, onHide: function () {
- _4.removeClass((_3.plain == true) ? "s-btn-plain-active" : "s-btn-active");
- }
- });
- }
- _5(_2, _3.disabled);
- };
- function _5(_6, _7) {
- var _8 = $.data(_6, "splitbutton").options;
- _8.disabled = _7;
- var _9 = $(_6);
- var _a = _9.find(".s-btn-downarrow");
- if (_7) {
- _9.linkbutton("disable");
- _a.unbind(".splitbutton");
- } else {
- _9.linkbutton("enable");
- _a.unbind(".splitbutton");
- _a.bind("click.splitbutton", function () {
- _b();
- return false;
- });
- var _c = null;
-// _a.bind("mouseenter.splitbutton", function () {
-// _c = setTimeout(function () {
-// _b();
-// }, _8.duration);
-// return false;
-// })
-
- _a.bind("mouseleave.splitbutton", function () {
- if (_c) {
- clearTimeout(_c);
- }
- });
- }
- function _b() {
- if (!_8.menu) {
- return;
- }
- var _d = _9.offset().left;
- if (_d + $(_8.menu).outerWidth() + 5 > $(window).width()) {
- _d = $(window).width() - $(_8.menu).outerWidth() - 5;
- }
- $("body>div.menu-top").menu("hide");
- $(_8.menu).menu("show", { left: _d, top: _9.offset().top + _9.outerHeight() });
- _9.blur();
- };
- };
- $.fn.splitbutton = function (_e, _f) {
- if (typeof _e == "string") {
- return $.fn.splitbutton.methods[_e](this, _f);
- }
- _e = _e || {};
- return this.each(function () {
- var _10 = $.data(this, "splitbutton");
- if (_10) {
- $.extend(_10.options, _e);
- } else {
- $(this).append(" ");
- $.data(this, "splitbutton", { options: $.extend({}, $.fn.splitbutton.defaults, $.fn.splitbutton.parseOptions(this), _e) });
- $(this).removeAttr("disabled");
- }
- _1(this);
- });
- };
- $.fn.splitbutton.methods = { options: function (jq) {
- return $.data(jq[0], "splitbutton").options;
- }, enable: function (jq) {
- return jq.each(function () {
- _5(this, false);
- });
- }, disable: function (jq) {
- return jq.each(function () {
- _5(this, true);
- });
- }
- };
- $.fn.splitbutton.parseOptions = function (_11) {
- var t = $(_11);
- return $.extend({}, $.fn.linkbutton.parseOptions(_11), { menu: t.attr("menu"), duration: t.attr("duration") });
- };
- $.fn.splitbutton.defaults = $.extend({}, $.fn.linkbutton.defaults, { plain: true, menu: null, duration: 100 });
-})(jQuery);
-
-function applySplitButtonOverflow(containerId, innerId, menuId, itemCssSelector, buttonId) {
- //hack for the dropdown scrill
- jQuery("").appendTo("#" + menuId);
- jQuery(itemCssSelector).each(function () {
- jQuery("#" + innerId).append(this);
- });
-
- //only needed when we need to add scroll to macro menu
- var maxHeight = 500;
- var menu = jQuery("#" + menuId);
- var container = jQuery("#" + containerId);
- var menuHeight = menu.height();
-
- if (menuHeight > maxHeight) {
- jQuery("").appendTo("#" + menuId);
- menu.css({
- height: maxHeight,
- overflow: "hidden"
- })
- container.css({
- height: maxHeight - 20,
- overflow: "hidden"
- });
- var interval;
- jQuery("#" + buttonId).hover(function (e) {
- interval = setInterval(function () {
- var offset = jQuery("#" + innerId).offset();
- var currentTop = jQuery("#" + innerId).css("top").replace("px", "");
- if (Number(currentTop) > -(menuHeight - 40)) {
- jQuery("#" + innerId).css("top", currentTop - 20);
- }
- }, 125);
- }, function () {
- clearInterval(interval);
- });
-
- jQuery("#" + buttonId).hover(function (e) {
- jQuery("#" + innerId).css("top", 0)
- });
- }
-
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/splitbutton/splitbutton.css b/src/Umbraco.Web.UI/umbraco_client/splitbutton/splitbutton.css
deleted file mode 100644
index a7163becc7..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/splitbutton/splitbutton.css
+++ /dev/null
@@ -1,157 +0,0 @@
-.sbPlaceHolder
-{
- display:inline;
- width:90px;
- height:23px;
- vertical-align:top;
-}
-
-.sbLink
-{
- vertical-align:top;
-}
-
-.menudown
-{
-
- clear:both;
- text-align: center;
- cursor:pointer;
-
-}
-
-.menudown span
-{
- background:url('images/splitbutton_downarrow.png') no-repeat 0px 0px;
-
-}
-.menudown:hover
-{
- background-color:#DDD;
-}
-a.l-btn{
- color:#444;
- font-size:12px;
- text-decoration:none;
- display:inline-block;
- zoom:1;
- height:24px;
- padding-right:18px;
- cursor:pointer;
- outline:none;
-}
-a.l-btn-plain{
- background:transparent;
- padding-right:5px;
- border:1px solid transparent;
- _border:0px solid #efefef;
- _padding:1px 6px 1px 1px;
-}
-
-
-a.l-btn span.l-btn-left{
- display:block;
- padding:4px 0px 4px 18px;
- line-height:16px;
-}
-a.l-btn-plain span.l-btn-left{
- background:transparent;
- padding-left:5px;
-}
-
-a.l-btn span span.l-btn-text{
- display:inline-block;
- height:16px;
- line-height:16px;
- padding:0px;
-}
-a.l-btn span span span.l-btn-empty{
- display:inline-block;
- padding:0px;
- width:16px;
-}
-a:hover.l-btn{
- background-position: bottom right;
- outline:none;
-}
-
-a:hover.l-btn-plain{
- border:1px solid #4b4b6f;
- background:url('images/splitbutton_hover.png') repeat-x left bottom;
- _padding:0px 5px 0px 0px;
-}
-a:hover.l-btn-disabled{
- background-position:top right;
-}
-a:hover.l-btn-disabled span.l-btn-left{
- background-position:top left;
-}
-
-.menu{
- position:absolute;
- background-color:#f0f0f0;
- margin:0;
- padding:2px;
- border: 1px solid #979797;
- overflow:hidden;
-}
-.menu-item{
- position:relative;
- margin:0;
- padding:0;
- height:22px;
- line-height:20px;
- overflow:hidden;
- font-size:12px;
- cursor:pointer;
- border:1px solid transparent;
- _border:1px solid #f0f0f0;
-}
-.menu-text{
- position:absolute;
- left:2px;
- top:0px;
-}
-.menu-icon{
- position:absolute;
- width:16px;
- height:16px;
- top:3px;
- left:2px;
-}
-
-
-.menu-active{
- border: 1px solid #a8d8eb;
- background: #dcecf3;
-}
-
-
-.s-btn-downarrow{
- display:inline-block;
- width:16px;
- background:url('images/splitbutton_downarrow.png') no-repeat 4px 0px;
-}
-
-a.s-btn-active{
- background-position: bottom right;
-}
-a.s-btn-active span.l-btn-left{
- background-position: bottom left;
-}
-a.s-btn-active .s-btn-downarrow{
- background:url('images/splitbutton_downarrow.png') no-repeat 4px -18px;
-}
-a:hover.l-btn .s-btn-downarrow{
- background:url('images/splitbutton_downarrow.png') no-repeat 4px -18px;
-}
-
-a.s-btn-plain-active{
- background:transparent;
- border:1px solid #8f8f8f;
- _padding:0px 5px 0px 0px;
-
-}
-a.s-btn-plain-active .s-btn-downarrow{
- background:url('images/splitbutton_downarrow.png') no-repeat 4px -18px;
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/asc.gif b/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/asc.gif
deleted file mode 100644
index 67a2a4c669..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/asc.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/bg.gif b/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/bg.gif
deleted file mode 100644
index 98792ee38e..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/bg.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/desc.gif b/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/desc.gif
deleted file mode 100644
index 34db47c3b1..0000000000
Binary files a/src/Umbraco.Web.UI/umbraco_client/tablesorting/img/desc.gif and /dev/null differ
diff --git a/src/Umbraco.Web.UI/umbraco_client/tablesorting/jquery.tablesorter.min.js b/src/Umbraco.Web.UI/umbraco_client/tablesorting/jquery.tablesorter.min.js
deleted file mode 100644
index b8605df1e7..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/tablesorting/jquery.tablesorter.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-
-(function($){$.extend({tablesorter:new
-function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($(' ').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j 0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i
-// Licensed like jQuery, see http://docs.jquery.com/License.
-//
-// Configuration options:
-//
-// onDragStyle
-// This is the style that is assigned to the row during drag. There are limitations to the styles that can be
-// associated with a row (such as you can't assign a border--well you can, but it won't be
-// displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
-// a map (as used in the jQuery css(...) function).
-// onDropStyle
-// This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
-// to what you can do. Also this replaces the original style, so again consider using onDragClass which
-// is simply added and then removed on drop.
-// onDragClass
-// This class is added for the duration of the drag and then removed when the row is dropped. It is more
-// flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
-// is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
-// stylesheet.
-// onDrop
-// Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
-// and the row that was dropped. You can work out the new order of the rows by using
-// table.rows.
-// onDragStart
-// Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
-// table and the row which the user has started to drag.
-// onAllowDrop
-// Pass a function that will be called as a row is over another row. If the function returns true, allow
-// dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
-// the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
-// scrollAmount
-// This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
-// window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
-// FF3 beta
-// dragHandle
-// This is the name of a class that you assign to one or more cells in each row that is draggable. If you
-// specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
-// will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
-// the whole row is draggable.
-//
-// Other ways to control behaviour:
-//
-// Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
-// that you don't want to be draggable.
-//
-// Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
-// []=&[]= so that you can send this back to the server. The table must have
-// an ID as must all the rows.
-//
-// Other methods:
-//
-// $("...").tableDnDUpdate()
-// Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
-// This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
-// The table maintains the original configuration (so you don't have to specify it again).
-//
-// $("...").tableDnDSerialize()
-// Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
-// called from anywhere and isn't dependent on the currentTable being set up correctly before calling
-//
-// Known problems:
-// - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
-//
-// Version 0.2: 2008-02-20 First public version
-// Version 0.3: 2008-02-07 Added onDragStart option
-// Made the scroll amount configurable (default is 5 as before)
-// Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
-// Added onAllowDrop to control dropping
-// Fixed a bug which meant that you couldn't set the scroll amount in both directions
-// Added serialize method
-// Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
-// draggable
-// Improved the serialize method to use a default (and settable) regular expression.
-// Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
-//
-jQuery.tableDnD = {
- // Keep hold of the current table being dragged
- currentTable: null,
- // Keep hold of the current drag object if any
- dragObject: null,
- // The current mouse offset
- mouseOffset: null,
- // Remember the old value of Y so that we don't do too much processing
- oldY: 0,
-
- // Actually build the structure
- build: function(options) {
- // Set up the defaults if any
-
- this.each(function() {
- // This is bound to each matching table, set up the defaults and override with user options
- this.tableDnDConfig = jQuery.extend({
- onDragStyle: null,
- onDropStyle: null,
- // Add in the default class for whileDragging
- onDragClass: "tDnD_whileDrag",
- onDrop: null,
- onDragStart: null,
- scrollAmount: 5,
- serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
- serializeParamName: null, // If you want to specify another parameter name instead of the table ID
- dragHandle: null, // If you give the name of a class here, then only Cells with this class will be draggable
- containment: null
- }, options || {});
- // Now make the rows draggable
- jQuery.tableDnD.makeDraggable(this);
- });
-
- // Now we need to capture the mouse up and mouse move event
- // We can use bind so that we don't interfere with other event handlers
- jQuery(document)
- .bind('mousemove', jQuery.tableDnD.mousemove)
- .bind('mouseup', jQuery.tableDnD.mouseup);
-
- // Don't break the chain
- return this;
- },
-
- // This function makes all the rows on the table draggable apart from those marked as "NoDrag"
- makeDraggable: function(table) {
- var config = table.tableDnDConfig;
- if (table.tableDnDConfig.dragHandle) {
- // We only need to add the event to the specified cells
- var cells = jQuery("td." + table.tableDnDConfig.dragHandle, table);
- cells.each(function() {
- // The cell is bound to "this"
- jQuery(this).mousedown(function(ev) {
- jQuery.tableDnD.dragObject = this.parentNode;
- jQuery.tableDnD.currentTable = table;
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
- if (config.onDragStart) {
- // Call the onDrop method if there is one
- config.onDragStart(table, this);
- }
- return false;
- });
- })
- } else {
- // For backwards compatibility, we add the event to the whole row
- var rows = jQuery("tr", table); // get all the rows as a wrapped set
- rows.each(function() {
- // Iterate through each row, the row is bound to "this"
- var row = jQuery(this);
- if (!row.hasClass("nodrag")) {
- row.mousedown(function(ev) {
- if (ev.target.tagName == "TD") {
- jQuery.tableDnD.dragObject = this;
- jQuery.tableDnD.currentTable = table;
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
- if (config.onDragStart) {
- // Call the onDrop method if there is one
- config.onDragStart(table, this);
- }
- return false;
- }
- }).css("cursor", "move"); // Store the tableDnD object
- }
- });
- }
- },
-
- updateTables: function() {
- this.each(function() {
- // this is now bound to each matching table
- if (this.tableDnDConfig) {
- jQuery.tableDnD.makeDraggable(this);
- }
- })
- },
-
- // Get the mouse coordinates from the event (allowing for browser differences)
- mouseCoords: function(ev) {
- if (ev.pageX || ev.pageY) {
- return { x: ev.pageX, y: ev.pageY };
- }
- return {
- x: ev.clientX + document.body.scrollLeft - document.body.clientLeft,
- y: ev.clientY + document.body.scrollTop - document.body.clientTop
- };
- },
-
- // Given a target element and a mouse event, get the mouse offset from that element.
- // To do this we need the element's position and the mouse position
- getMouseOffset: function(target, ev) {
- ev = ev || window.event;
-
- var docPos = this.getPosition(target);
- var mousePos = this.mouseCoords(ev);
- return { x: mousePos.x - docPos.x, y: mousePos.y - docPos.y };
- },
-
- // Get the position of an element by going up the DOM tree and adding up all the offsets
- getPosition: function(e) {
- var left = 0;
- var top = 0;
- // Safari fix -- thanks to Luis Chato for this!
- if (e.offsetHeight == 0) {
- // Safari 2 doesn't correctly grab the offsetTop of a table row
- // this is detailed here:
- // http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
- // the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
- // note that firefox will return a text node as a first child, so designing a more thorough
- // solution may need to take that into account, for now this seems to work in firefox, safari, ie
- e = e.firstChild; // a table cell
- }
-
- while (e.offsetParent) {
- left += e.offsetLeft;
- top += e.offsetTop;
- e = e.offsetParent;
- }
-
- left += e.offsetLeft;
- top += e.offsetTop;
-
- return { x: left, y: top };
- },
-
- mousemove: function(ev) {
- if (jQuery.tableDnD.dragObject == null) {
- return;
- }
-
- var dragObj = jQuery(jQuery.tableDnD.dragObject);
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- var mousePos = jQuery.tableDnD.mouseCoords(ev);
- var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
-
- //auto scroll the window
- var yOffset = window.pageYOffset;
- if (document.all) {
- // Windows version
- //yOffset=document.body.scrollTop;
- if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
- yOffset = document.documentElement.scrollTop;
- }
- else if (typeof document.body != 'undefined') {
- yOffset = document.body.scrollTop;
- }
- }
-
- //if our dragable items is inside a parent with overflow on...
- if (config.containment) {
-
- var endofContainer = config.containment.offset().top + config.containment.height();
- var currentScrollTop = config.containment.scrollTop();
-
- if (endofContainer - mousePos.y < config.scrollAmount) {
- config.containment.scrollTop(currentScrollTop + config.scrollAmount);
-
- } else if ( mousePos.y - config.scrollAmount < config.containment.offset().top) {
- config.containment.scrollTop(currentScrollTop - config.scrollAmount);
- }
-
- } else {
- if (mousePos.y - yOffset < config.scrollAmount) {
- window.scrollBy(0, -config.scrollAmount);
- } else {
- var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
- if (windowHeight - (mousePos.y - yOffset) < config.scrollAmount) {
- window.scrollBy(0, config.scrollAmount);
- }
- }
- }
-
-
- if (y != jQuery.tableDnD.oldY) {
- // work out if we're going up or down...
- var movingDown = y > jQuery.tableDnD.oldY;
- // update the old value
- jQuery.tableDnD.oldY = y;
- // update the style to show we're dragging
- if (config.onDragClass) {
- dragObj.addClass(config.onDragClass);
- } else {
- dragObj.css(config.onDragStyle);
- }
- // If we're over a row then move the dragged row to there so that the user sees the
- // effect dynamically
- var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
- if (currentRow) {
- // TODO worry about what happens when there are multiple TBODIES
- if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
- } else if (!movingDown && jQuery.tableDnD.dragObject != currentRow) {
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
- }
- }
- }
-
- return false;
- },
-
- // We're only worried about the y position really, because we can only move rows up and down
- findDropTargetRow: function(draggedRow, y) {
- var rows = jQuery.tableDnD.currentTable.rows;
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- var rowY = this.getPosition(row).y;
- var rowHeight = parseInt(row.offsetHeight) / 2;
- if (row.offsetHeight == 0) {
- rowY = this.getPosition(row.firstChild).y;
- rowHeight = parseInt(row.firstChild.offsetHeight) / 2;
- }
- // Because we always have to insert before, we need to offset the height a bit
- if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
- // that's the row we're over
- // If it's the same as the current row, ignore it
- if (row == draggedRow) { return null; }
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- if (config.onAllowDrop) {
- if (config.onAllowDrop(draggedRow, row)) {
- return row;
- } else {
- return null;
- }
- } else {
- // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
- var nodrop = jQuery(row).hasClass("nodrop");
- if (!nodrop) {
- return row;
- } else {
- return null;
- }
- }
- }
- }
- return null;
- },
-
- mouseup: function(e) {
- if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
- var droppedRow = jQuery.tableDnD.dragObject;
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
- // If we have a dragObject, then we need to release it,
- // The row will already have been moved to the right place so we just reset stuff
- if (config.onDragClass) {
- jQuery(droppedRow).removeClass(config.onDragClass);
- } else {
- jQuery(droppedRow).css(config.onDropStyle);
- }
- jQuery.tableDnD.dragObject = null;
- if (config.onDrop) {
- // Call the onDrop method if there is one
- config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
- }
- jQuery.tableDnD.currentTable = null; // let go of the table too
- }
- },
-
- serialize: function() {
- if (jQuery.tableDnD.currentTable) {
- return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
- } else {
- return "Error: No Table id set, you need to set an id on your table and every row";
- }
- },
-
- serializeTable: function(table) {
- var result = "";
- var tableId = table.id;
- var rows = table.rows;
- for (var i = 0; i < rows.length; i++) {
- if (result.length > 0) result += "&";
- var rowId = rows[i].id;
- if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
- rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
- }
-
- result += tableId + '[]=' + rowId;
- }
- return result;
- },
-
- serializeTables: function() {
- var result = "";
- this.each(function() {
- // this is now bound to each matching table
- result += jQuery.tableDnD.serializeTable(this);
- });
- return result;
- }
-
-}
-
-jQuery.fn.extend(
- {
- tableDnD: jQuery.tableDnD.build,
- tableDnDUpdate: jQuery.tableDnD.updateTables,
- tableDnDSerialize: jQuery.tableDnD.serializeTables
- }
-);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/ui/base2.js b/src/Umbraco.Web.UI/umbraco_client/ui/base2.js
deleted file mode 100644
index 80ae31de03..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/ui/base2.js
+++ /dev/null
@@ -1,1675 +0,0 @@
-/*
- base2 - copyright 2007-2011, Dean Edwards
- http://code.google.com/p/base2/
- http://www.opensource.org/licenses/mit-license.php
-
- Contributors:
- Doeke Zanstra
-*/
-
-var base2 = {
- name: "base2",
- version: "1.0.2",
- exports:
- "Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp," +
- "Undefined,Null,This,True,False,assignID,detect,global",
- namespace: ""
-};
-
-new function(_no_shrink_) { /////////////// BEGIN: CLOSURE ///////////////
-
-// =========================================================================
-// base2/header.js
-// =========================================================================
-
-var Undefined = K(), Null = K(null), True = K(true), False = K(false), This = function(){return this};
-
-var global = This();
-var base2 = global.base2;
-
-// private
-var _FORMAT = /%([1-9])/g;
-var _LTRIM = /^\s\s*/;
-var _RTRIM = /\s\s*$/;
-var _RESCAPE = /([\/()[\]{}|*+-.,^$?\\])/g; // safe regular expressions
-var _BASE = /try/.test(detect) ? /\bbase\b/ : /.*/; // some platforms don't allow decompilation
-var _HIDDEN = ["constructor", "toString", "valueOf"]; // only override these when prototyping
-var _MSIE_NATIVE_FUNCTION = detect("(jscript)") ?
- new RegExp("^" + rescape(isNaN).replace(/isNaN/, "\\w+") + "$") : {test: False};
-
-var _counter = 1;
-var _slice = Array.prototype.slice;
-
-_Function_forEach(); // make sure this is initialised
-
-function assignID(object) {
- // Assign a unique ID to an object.
- if (!object.base2ID) object.base2ID = "b2_" + _counter++;
- return object.base2ID;
-};
-
-// =========================================================================
-// base2/Base.js
-// =========================================================================
-
-// http://dean.edwards.name/weblog/2006/03/base/
-
-var _subclass = function(_instance, _static) {
- // Build the prototype.
- base2.__prototyping = this.prototype;
- var _prototype = new this;
- if (_instance) extend(_prototype, _instance);
- delete base2.__prototyping;
-
- // Create the wrapper for the constructor function.
- var _constructor = _prototype.constructor;
- function _class() {
- // Don't call the constructor function when prototyping.
- if (!base2.__prototyping) {
- if (this.constructor == arguments.callee || this.__constructing) {
- // Instantiation.
- this.__constructing = true;
- _constructor.apply(this, arguments);
- delete this.__constructing;
- } else {
- // Casting.
- return extend(arguments[0], _prototype);
- }
- }
- return this;
- };
- _prototype.constructor = _class;
-
- // Build the static interface.
- for (var i in Base) _class[i] = this[i];
- _class.ancestor = this;
- _class.base = Undefined;
- //_class.init = Undefined;
- if (_static) extend(_class, _static);
- _class.prototype = _prototype;
- if (_class.init) _class.init();
-
- // introspection (removed when packed)
- ;;; _class["#implements"] = [];
- ;;; _class["#implemented_by"] = [];
-
- return _class;
-};
-
-var Base = _subclass.call(Object, {
- constructor: function() {
- if (arguments.length > 0) {
- this.extend(arguments[0]);
- }
- },
-
- base: function() {
- // Call this method from any other method to invoke the current method's ancestor (super).
- },
-
- extend: delegate(extend)
-}, Base = {
- ancestorOf: function(klass) {
- return _ancestorOf(this, klass);
- },
-
- extend: _subclass,
-
- forEach: function(object, block, context) {
- _Function_forEach(this, object, block, context);
- },
-
- implement: function(source) {
- if (typeof source == "function") {
- ;;; if (_ancestorOf(Base, source)) {
- // introspection (removed when packed)
- ;;; this["#implements"].push(source);
- ;;; source["#implemented_by"].push(this);
- ;;; }
- source = source.prototype;
- }
- // Add the interface using the extend() function.
- extend(this.prototype, source);
- return this;
- }
-});
-
-// =========================================================================
-// base2/Package.js
-// =========================================================================
-
-var Package = Base.extend({
- constructor: function(_private, _public) {
- this.extend(_public);
- if (this.init) this.init();
-
- if (this.name && this.name != "base2") {
- if (!this.parent) this.parent = base2;
- this.parent.addName(this.name, this);
- this.namespace = format("var %1=%2;", this.name, String2.slice(this, 1, -1));
- }
-
- if (_private) {
- // This next line gets round a bug in old Mozilla browsers
- var JSNamespace = base2.JavaScript ? base2.JavaScript.namespace : "";
- // This string should be evaluated immediately after creating a Package object.
- _private.imports = Array2.reduce(csv(this.imports), function(namespace, name) {
- var ns = lookup(name) || lookup("JavaScript." + name);
- ;;; assert(ns, format("Object not found: '%1'.", name), ReferenceError);
- return namespace += ns.namespace;
- }, "var base2=(function(){return this.base2})();" + base2.namespace + JSNamespace) + lang.namespace;
-
- // This string should be evaluated after you have created all of the objects
- // that are being exported.
- _private.exports = Array2.reduce(csv(this.exports), function(namespace, name) {
- var fullName = this.name + "." + name;
- this.namespace += "var " + name + "=" + fullName + ";";
- return namespace += "if(!" + fullName + ")" + fullName + "=" + name + ";";
- }, "", this) + "this._label_" + this.name + "();";
-
- var pkg = this;
- var packageName = String2.slice(this, 1, -1);
- _private["_label_" + this.name] = function() {
- Package.forEach (pkg, function(object, name) {
- if (object && object.ancestorOf == Base.ancestorOf) {
- object.toString = K(format("[%1.%2]", packageName, name));
- if (object.prototype.toString == Base.prototype.toString) {
- object.prototype.toString = K(format("[object %1.%2]", packageName, name));
- }
- }
- });
- };
- }
-
- function lookup(names) {
- names = names.split(".");
- var value = base2, i = 0;
- while (value && names[i] != null) {
- value = value[names[i++]];
- }
- return value;
- };
- },
-
- exports: "",
- imports: "",
- name: "",
- namespace: "",
- parent: null,
-
- addName: function(name, value) {
- if (!this[name]) {
- this[name] = value;
- this.exports += "," + name;
- this.namespace += format("var %1=%2.%1;", name, this.name);
- }
- },
-
- addPackage: function(name) {
- this.addName(name, new Package(null, {name: name, parent: this}));
- },
-
- toString: function() {
- return format("[%1]", this.parent ? String2.slice(this.parent, 1, -1) + "." + this.name : this.name);
- }
-});
-
-// =========================================================================
-// base2/Abstract.js
-// =========================================================================
-
-var Abstract = Base.extend({
- constructor: function() {
- throw new TypeError("Abstract class cannot be instantiated.");
- }
-});
-
-// =========================================================================
-// base2/Module.js
-// =========================================================================
-
-var _moduleCount = 0;
-
-var Module = Abstract.extend(null, {
- namespace: "",
-
- extend: function(_interface, _static) {
- // Extend a module to create a new module.
- var module = this.base();
- var index = _moduleCount++;
- module.namespace = "";
- module.partial = this.partial;
- module.toString = K("[base2.Module[" + index + "]]");
- Module[index] = module;
- // Inherit class methods.
- module.implement(this);
- // Implement module (instance AND static) methods.
- if (_interface) module.implement(_interface);
- // Implement static properties and methods.
- if (_static) {
- extend(module, _static);
- if (module.init) module.init();
- }
- return module;
- },
-
- forEach: function(block, context) {
- _Function_forEach (Module, this.prototype, function(method, name) {
- if (typeOf(method) == "function") {
- block.call(context, this[name], name, this);
- }
- }, this);
- },
-
- implement: function(_interface) {
- var module = this;
- var id = module.toString().slice(1, -1);
- if (typeof _interface == "function") {
- if (!_ancestorOf(_interface, module)) {
- this.base(_interface);
- }
- if (_ancestorOf(Module, _interface)) {
- // Implement static methods.
- for (var name in _interface) {
- if (module[name] === undefined) {
- var property = _interface[name];
- if (typeof property == "function" && property.call && _interface.prototype[name]) {
- property = _staticModuleMethod(_interface, name);
- }
- module[name] = property;
- }
- }
- module.namespace += _interface.namespace.replace(/base2\.Module\[\d+\]/g, id);
- }
- } else {
- // Add static interface.
- extend(module, _interface);
- // Add instance interface.
- _extendModule(module, _interface);
- }
- return module;
- },
-
- partial: function() {
- var module = Module.extend();
- var id = module.toString().slice(1, -1);
- // partial methods are already bound so remove the binding to speed things up
- module.namespace = this.namespace.replace(/(\w+)=b[^\)]+\)/g, "$1=" + id + ".$1");
- this.forEach(function(method, name) {
- module[name] = partial(bind(method, module));
- });
- return module;
- }
-});
-
-function _extendModule(module, _interface) {
- var proto = module.prototype;
- var id = module.toString().slice(1, -1);
- for (var name in _interface) {
- var property = _interface[name], namespace = "";
- if (name.charAt(0) == "@") { // object detection
- if (detect(name.slice(1))) _extendModule(module, property);
- } else if (!proto[name]) {
- if (name == name.toUpperCase()) {
- namespace = "var " + name + "=" + id + "." + name + ";";
- } else if (typeof property == "function" && property.call) {
- namespace = "var " + name + "=base2.lang.bind('" + name + "'," + id + ");";
- proto[name] = _moduleMethod(module, name);
- ;;; proto[name]._module = module; // introspection
- }
- if (module.namespace.indexOf(namespace) == -1) {
- module.namespace += namespace;
- }
- }
- }
-};
-
-function _staticModuleMethod(module, name) {
- return function() {
- return module[name].apply(module, arguments);
- };
-};
-
-function _moduleMethod(module, name) {
- return function() {
- var args = _slice.call(arguments);
- args.unshift(this);
- return module[name].apply(module, args);
- };
-};
-
-// =========================================================================
-// base2/Enumerable.js
-// =========================================================================
-
-var Enumerable = Module.extend({
- every: function(object, test, context) {
- var result = true;
- try {
- forEach (object, function(value, key) {
- result = test.call(context, value, key, object);
- if (!result) throw StopIteration;
- });
- } catch (error) {
- if (error != StopIteration) throw error;
- }
- return !!result; // cast to boolean
- },
-
- filter: function(object, test, context) {
- var i = 0;
- return this.reduce(object, function(result, value, key) {
- if (test.call(context, value, key, object)) {
- result[i++] = value;
- }
- return result;
- }, []);
- },
-
- invoke: function(object, method) {
- // Apply a method to each item in the enumerated object.
- var args = _slice.call(arguments, 2);
- return this.map(object, (typeof method == "function") ? function(item) {
- return item == null ? undefined : method.apply(item, args);
- } : function(item) {
- return item == null ? undefined : item[method].apply(item, args);
- });
- },
-
- map: function(object, block, context) {
- var result = [], i = 0;
- forEach (object, function(value, key) {
- result[i++] = block.call(context, value, key, object);
- });
- return result;
- },
-
- pluck: function(object, key) {
- return this.map(object, function(item) {
- return item == null ? undefined : item[key];
- });
- },
-
- reduce: function(object, block, result, context) {
- var initialised = arguments.length > 2;
- forEach (object, function(value, key) {
- if (initialised) {
- result = block.call(context, result, value, key, object);
- } else {
- result = value;
- initialised = true;
- }
- });
- return result;
- },
-
- some: function(object, test, context) {
- return !this.every(object, not(test), context);
- }
-});
-
-// =========================================================================
-// base2/Map.js
-// =========================================================================
-
-// http://wiki.ecmascript.org/doku.php?id=proposals:dictionary
-
-var _HASH = "#";
-
-var Map = Base.extend({
- constructor: function(values) {
- if (values) this.merge(values);
- },
-
- clear: function() {
- for (var key in this) if (key.indexOf(_HASH) == 0) {
- delete this[key];
- }
- },
-
- copy: function() {
- base2.__prototyping = true; // not really prototyping but it stops [[construct]] being called
- var copy = new this.constructor;
- delete base2.__prototyping;
- for (var i in this) if (this[i] !== copy[i]) {
- copy[i] = this[i];
- }
- return copy;
- },
-
- forEach: function(block, context) {
- for (var key in this) if (key.indexOf(_HASH) == 0) {
- block.call(context, this[key], key.slice(1), this);
- }
- },
-
- get: function(key) {
- return this[_HASH + key];
- },
-
- getKeys: function() {
- return this.map(II);
- },
-
- getValues: function() {
- return this.map(I);
- },
-
- // Ancient browsers throw an error if we use "in" as an operator.
- has: function(key) {
- /*@cc_on @*/
- /*@if (@_jscript_version < 5.5)
- return $Legacy.has(this, _HASH + key);
- @else @*/
- return _HASH + key in this;
- /*@end @*/
- },
-
- merge: function(values) {
- var put = flip(this.put);
- forEach (arguments, function(values) {
- forEach (values, put, this);
- }, this);
- return this;
- },
-
- put: function(key, value) {
- // create the new entry (or overwrite the old entry).
- this[_HASH + key] = value;
- },
-
- remove: function(key) {
- delete this[_HASH + key];
- },
-
- size: function() {
- // this is expensive because we are not storing the keys
- var size = 0;
- for (var key in this) if (key.indexOf(_HASH) == 0) size++;
- return size;
- },
-
- union: function(values) {
- return this.merge.apply(this.copy(), arguments);
- }
-});
-
-Map.implement(Enumerable);
-
-Map.prototype.filter = function(test, context) {
- return this.reduce(function(result, value, key) {
- if (!test.call(context, value, key, this)) {
- result.remove(key);
- }
- return result;
- }, this.copy(), this);
-};
-
-// =========================================================================
-// base2/Collection.js
-// =========================================================================
-
-// A Map that is more array-like (accessible by index).
-
-// Collection classes have a special (optional) property: Item
-// The Item property points to a constructor function.
-// Members of the collection must be an instance of Item.
-
-// The static create() method is responsible for all construction of collection items.
-// Instance methods that add new items (add, put, insertAt, putAt) pass *all* of their arguments
-// to the static create() method. If you want to modify the way collection items are
-// created then you only need to override this method for custom collections.
-
-var _KEYS = "~";
-
-var Collection = Map.extend({
- constructor: function(values) {
- this[_KEYS] = new Array2;
- this.base(values);
- },
-
- add: function(key, item) {
- // Duplicates not allowed using add().
- // But you can still overwrite entries using put().
- assert(!this.has(key), "Duplicate key '" + key + "'.");
- this.put.apply(this, arguments);
- },
-
- clear: function() {
- this.base();
- this[_KEYS].length = 0;
- },
-
- copy: function() {
- var copy = this.base();
- copy[_KEYS] = this[_KEYS].copy();
- return copy;
- },
-
- forEach: function(block, context) {
- var keys = this[_KEYS];
- var length = keys.length;
- for (var i = 0; i < length; i++) {
- block.call(context, this[_HASH + keys[i]], keys[i], this);
- }
- },
-
- getAt: function(index) {
- var key = this[_KEYS].item(index);
- return (key === undefined) ? undefined : this[_HASH + key];
- },
-
- getKeys: function() {
- return this[_KEYS].copy();
- },
-
- indexOf: function(key) {
- return this[_KEYS].indexOf(String(key));
- },
-
- insertAt: function(index, key, item) {
- assert(this[_KEYS].item(index) !== undefined, "Index out of bounds.");
- assert(!this.has(key), "Duplicate key '" + key + "'.");
- this[_KEYS].insertAt(index, String(key));
- this[_HASH + key] = null; // placeholder
- this.put.apply(this, _slice.call(arguments, 1));
- },
-
- item: function(keyOrIndex) {
- return this[typeof keyOrIndex == "number" ? "getAt" : "get"](keyOrIndex);
- },
-
- put: function(key, item) {
- if (!this.has(key)) {
- this[_KEYS].push(String(key));
- }
- var klass = this.constructor;
- if (klass.Item && !instanceOf(item, klass.Item)) {
- item = klass.create.apply(klass, arguments);
- }
- this[_HASH + key] = item;
- },
-
- putAt: function(index, item) {
- arguments[0] = this[_KEYS].item(index);
- assert(arguments[0] !== undefined, "Index out of bounds.");
- this.put.apply(this, arguments);
- },
-
- remove: function(key) {
- // The remove() method of the Array object can be slow so check if the key exists first.
- if (this.has(key)) {
- this[_KEYS].remove(String(key));
- delete this[_HASH + key];
- }
- },
-
- removeAt: function(index) {
- var key = this[_KEYS].item(index);
- if (key !== undefined) {
- this[_KEYS].removeAt(index);
- delete this[_HASH + key];
- }
- },
-
- reverse: function() {
- this[_KEYS].reverse();
- return this;
- },
-
- size: function() {
- return this[_KEYS].length;
- },
-
- slice: function(start, end) {
- var sliced = this.copy();
- if (arguments.length > 0) {
- var keys = this[_KEYS], removed = keys;
- sliced[_KEYS] = Array2(_slice.apply(keys, arguments));
- if (sliced[_KEYS].length) {
- removed = removed.slice(0, start);
- if (arguments.length > 1) {
- removed = removed.concat(keys.slice(end));
- }
- }
- for (var i = 0; i < removed.length; i++) {
- delete sliced[_HASH + removed[i]];
- }
- }
- return sliced;
- },
-
- sort: function(compare) { // optimised (refers to _HASH)
- if (compare) {
- this[_KEYS].sort(bind(function(key1, key2) {
- return compare(this[_HASH + key1], this[_HASH + key2], key1, key2);
- }, this));
- } else this[_KEYS].sort();
- return this;
- },
-
- toString: function() {
- return "(" + (this[_KEYS] || "") + ")";
- }
-}, {
- Item: null, // If specified, all members of the collection must be instances of Item.
-
- create: function(key, item) {
- return this.Item ? new this.Item(key, item) : item;
- },
-
- extend: function(_instance, _static) {
- var klass = this.base(_instance);
- klass.create = this.create;
- if (_static) extend(klass, _static);
- if (!klass.Item) {
- klass.Item = this.Item;
- } else if (typeof klass.Item != "function") {
- klass.Item = (this.Item || Base).extend(klass.Item);
- }
- if (klass.init) klass.init();
- return klass;
- }
-});
-
-// =========================================================================
-// base2/RegGrp.js
-// =========================================================================
-
-// A collection of regular expressions and their associated replacement values.
-// A Base class for creating parsers.
-
-var _RG_BACK_REF = /\\(\d+)/g,
- _RG_ESCAPE_CHARS = /\\./g,
- _RG_ESCAPE_BRACKETS = /\(\?[:=!]|\[[^\]]+\]/g,
- _RG_BRACKETS = /\(/g,
- _RG_LOOKUP = /\$(\d+)/,
- _RG_LOOKUP_SIMPLE = /^\$\d+$/;
-
-var RegGrp = Collection.extend({
- constructor: function(values, ignoreCase) {
- this.base(values);
- this.ignoreCase = !!ignoreCase;
- },
-
- ignoreCase: false,
-
- exec: function(string, override) { // optimised (refers to _HASH/_KEYS)
- string += ""; // type-safe
- var items = this, keys = this[_KEYS];
- if (!keys.length) return string;
- if (override == RegGrp.IGNORE) override = 0;
- return string.replace(new RegExp(this, this.ignoreCase ? "gi" : "g"), function(match) {
- var item, offset = 1, i = 0;
- // Loop through the RegGrp items.
- while ((item = items[_HASH + keys[i++]])) {
- var next = offset + item.length + 1;
- if (arguments[offset]) { // do we have a result?
- var replacement = override == null ? item.replacement : override;
- switch (typeof replacement) {
- case "function":
- return replacement.apply(items, _slice.call(arguments, offset, next));
- case "number":
- return arguments[offset + replacement];
- default:
- return replacement;
- }
- }
- offset = next;
- }
- return match;
- });
- },
-
- insertAt: function(index, expression, replacement) {
- if (instanceOf(expression, RegExp)) {
- arguments[1] = expression.source;
- }
- return base(this, arguments);
- },
-
- test: function(string) {
- // The slow way to do it. Hopefully, this isn't called too often. :-)
- return this.exec(string) != string;
- },
-
- toString: function() {
- var offset = 1;
- return "(" + this.map(function(item) {
- // Fix back references.
- var expression = (item + "").replace(_RG_BACK_REF, function(match, index) {
- return "\\" + (offset + Number(index));
- });
- offset += item.length + 1;
- return expression;
- }).join(")|(") + ")";
- }
-}, {
- IGNORE: "$0",
-
- init: function() {
- forEach ("add,get,has,put,remove".split(","), function(name) {
- _override(this, name, function(expression) {
- if (instanceOf(expression, RegExp)) {
- arguments[0] = expression.source;
- }
- return base(this, arguments);
- });
- }, this.prototype);
- },
-
- Item: {
- constructor: function(expression, replacement) {
- if (replacement == null) replacement = RegGrp.IGNORE;
- else if (replacement.replacement != null) replacement = replacement.replacement;
- else if (typeof replacement != "function") replacement = String(replacement);
-
- // does the pattern use sub-expressions?
- if (typeof replacement == "string" && _RG_LOOKUP.test(replacement)) {
- // a simple lookup? (e.g. "$2")
- if (_RG_LOOKUP_SIMPLE.test(replacement)) {
- // store the index (used for fast retrieval of matched strings)
- replacement = parseInt(replacement.slice(1));
- } else { // a complicated lookup (e.g. "Hello $2 $1")
- // build a function to do the lookup
- // Improved version by Alexei Gorkov:
- var Q = '"';
- replacement = replacement
- .replace(/\\/g, "\\\\")
- .replace(/"/g, "\\x22")
- .replace(/\n/g, "\\n")
- .replace(/\r/g, "\\r")
- .replace(/\$(\d+)/g, Q + "+(arguments[$1]||" + Q+Q + ")+" + Q)
- .replace(/(['"])\1\+(.*)\+\1\1$/, "$1");
- replacement = new Function("return " + Q + replacement + Q);
- }
- }
-
- this.length = RegGrp.count(expression);
- this.replacement = replacement;
- this.toString = K(expression + "");
- },
-
- length: 0,
- replacement: ""
- },
-
- count: function(expression) {
- // Count the number of sub-expressions in a RegExp/RegGrp.Item.
- expression = (expression + "").replace(_RG_ESCAPE_CHARS, "").replace(_RG_ESCAPE_BRACKETS, "");
- return match(expression, _RG_BRACKETS).length;
- }
-});
-
-// =========================================================================
-// lang/package.js
-// =========================================================================
-
-var lang = {
- name: "lang",
- version: base2.version,
- exports: "assert,assertArity,assertType,base,bind,copy,extend,forEach,format,instanceOf,match,pcopy,rescape,trim,typeOf",
- namespace: "" // fixed later
-};
-
-// =========================================================================
-// lang/assert.js
-// =========================================================================
-
-function assert(condition, message, ErrorClass) {
- if (!condition) {
- throw new (ErrorClass || Error)(message || "Assertion failed.");
- }
-};
-
-function assertArity(args, arity, message) {
- if (arity == null) arity = args.callee.length;
- if (args.length < arity) {
- throw new SyntaxError(message || "Not enough arguments.");
- }
-};
-
-function assertType(object, type, message) {
- if (type && (typeof type == "function" ? !instanceOf(object, type) : typeOf(object) != type)) {
- throw new TypeError(message || "Invalid type.");
- }
-};
-
-// =========================================================================
-// lang/copy.js
-// =========================================================================
-
-function copy(object) {
- // a quick copy
- var copy = {};
- for (var i in object) {
- copy[i] = object[i];
- }
- return copy;
-};
-
-function pcopy(object) {
- // Doug Crockford / Richard Cornford
- _dummy.prototype = object;
- return new _dummy;
-};
-
-function _dummy(){};
-
-// =========================================================================
-// lang/extend.js
-// =========================================================================
-
-function base(object, args) {
- return object.base.apply(object, args);
-};
-
-function extend(object, source) { // or extend(object, key, value)
- if (object && source) {
- if (arguments.length > 2) { // Extending with a key/value pair.
- var key = source;
- source = {};
- source[key] = arguments[2];
- }
- var proto = global[(typeof source == "function" ? "Function" : "Object")].prototype;
- // Add constructor, toString etc
- if (base2.__prototyping) {
- var i = _HIDDEN.length, key;
- while ((key = _HIDDEN[--i])) {
- var value = source[key];
- if (value != proto[key]) {
- if (_BASE.test(value)) {
- _override(object, key, value)
- } else {
- object[key] = value;
- }
- }
- }
- }
- // Copy each of the source object's properties to the target object.
- for (key in source) {
- if (proto[key] === undefined) {
- var value = source[key];
- // Object detection.
- if (key.charAt(0) == "@") {
- if (detect(key.slice(1))) extend(object, value);
- } else {
- // Check for method overriding.
- var ancestor = object[key];
- if (ancestor && typeof value == "function") {
- if (value != ancestor) {
- if (_BASE.test(value)) {
- _override(object, key, value);
- } else {
- value.ancestor = ancestor;
- object[key] = value;
- }
- }
- } else {
- object[key] = value;
- }
- }
- }
- }
- }
- return object;
-};
-
-function _ancestorOf(ancestor, fn) {
- // Check if a function is in another function's inheritance chain.
- while (fn) {
- if (!fn.ancestor) return false;
- fn = fn.ancestor;
- if (fn == ancestor) return true;
- }
- return false;
-};
-
-function _override(object, name, method) {
- // Override an existing method.
- var ancestor = object[name];
- var superObject = base2.__prototyping; // late binding for prototypes
- if (superObject && ancestor != superObject[name]) superObject = null;
- function _base() {
- var previous = this.base;
- this.base = superObject ? superObject[name] : ancestor;
- var returnValue = method.apply(this, arguments);
- this.base = previous;
- return returnValue;
- };
- _base.method = method;
- _base.ancestor = ancestor;
- object[name] = _base;
- // introspection (removed when packed)
- ;;; _base.toString = K(method + "");
-};
-
-// =========================================================================
-// lang/forEach.js
-// =========================================================================
-
-// http://dean.edwards.name/weblog/2006/07/enum/
-
-if (typeof StopIteration == "undefined") {
- StopIteration = new Error("StopIteration");
-}
-
-function forEach(object, block, context, fn) {
- if (object == null) return;
- if (!fn) {
- if (typeof object == "function" && object.call) {
- // Functions are a special case.
- fn = Function;
- } else if (typeof object.forEach == "function" && object.forEach != arguments.callee) {
- // The object implements a custom forEach method.
- object.forEach(block, context);
- return;
- } else if (typeof object.length == "number") {
- // The object is array-like.
- _Array_forEach(object, block, context);
- return;
- }
- }
- _Function_forEach(fn || Object, object, block, context);
-};
-
-forEach.csv = function(string, block, context) {
- forEach (csv(string), block, context);
-};
-
-forEach.detect = function(object, block, context) {
- forEach (object, function(value, key) {
- if (key.charAt(0) == "@") { // object detection
- if (detect(key.slice(1))) forEach (value, arguments.callee);
- } else block.call(context, value, key, object);
- });
-};
-
-// These are the two core enumeration methods. All other forEach methods
-// eventually call one of these two.
-
-function _Array_forEach(array, block, context) {
- if (array == null) array = global;
- var length = array.length || 0, i; // preserve length
- if (typeof array == "string") {
- for (i = 0; i < length; i++) {
- block.call(context, array.charAt(i), i, array);
- }
- } else { // Cater for sparse arrays.
- for (i = 0; i < length; i++) {
- /*@cc_on @*/
- /*@if (@_jscript_version < 5.2)
- if ($Legacy.has(array, i))
- @else @*/
- if (i in array)
- /*@end @*/
- block.call(context, array[i], i, array);
- }
- }
-};
-
-function _Function_forEach(fn, object, block, context) {
- // http://code.google.com/p/base2/issues/detail?id=10
-
- // Run the test for Safari's buggy enumeration.
- var Temp = function(){this.i=1};
- Temp.prototype = {i:1};
- var count = 0;
- for (var i in new Temp) count++;
-
- // Overwrite the main function the first time it is called.
- _Function_forEach = (count > 1) ? function(fn, object, block, context) {
- // Safari fix (pre version 3)
- var processed = {};
- for (var key in object) {
- if (!processed[key] && fn.prototype[key] === undefined) {
- processed[key] = true;
- block.call(context, object[key], key, object);
- }
- }
- } : function(fn, object, block, context) {
- // Enumerate an object and compare its keys with fn's prototype.
- for (var key in object) {
- if (fn.prototype[key] === undefined) {
- block.call(context, object[key], key, object);
- }
- }
- };
-
- _Function_forEach(fn, object, block, context);
-};
-
-// =========================================================================
-// lang/instanceOf.js
-// =========================================================================
-
-function instanceOf(object, klass) {
- // Handle exceptions where the target object originates from another frame.
- // This is handy for JSON parsing (amongst other things).
-
- if (typeof klass != "function") {
- throw new TypeError("Invalid 'instanceOf' operand.");
- }
-
- if (object == null) return false;
-
- /*@cc_on
- // COM objects don't have a constructor
- if (typeof object.constructor != "function") {
- return typeOf(object) == typeof klass.prototype.valueOf();
- }
- @*/
- if (object.constructor == klass) return true;
- if (klass.ancestorOf) return klass.ancestorOf(object.constructor);
- /*@if (@_jscript_version < 5.1)
- // do nothing
- @else @*/
- if (object instanceof klass) return true;
- /*@end @*/
-
- // If the class is a base2 class then it would have passed the test above.
- if (Base.ancestorOf == klass.ancestorOf) return false;
-
- // base2 objects can only be instances of Object.
- if (Base.ancestorOf == object.constructor.ancestorOf) return klass == Object;
-
- switch (klass) {
- case Array: // This is the only troublesome one.
- return !!(typeof object == "object" && object.join && object.splice);
- case Function:
- return typeOf(object) == "function";
- case RegExp:
- return typeof object.constructor.$1 == "string";
- case Date:
- return !!object.getTimezoneOffset;
- case String:
- case Number:
- case Boolean:
- return typeOf(object) == typeof klass.prototype.valueOf();
- case Object:
- return true;
- }
-
- return false;
-};
-
-// =========================================================================
-// lang/typeOf.js
-// =========================================================================
-
-// http://wiki.ecmascript.org/doku.php?id=proposals:typeof
-
-function typeOf(object) {
- var type = typeof object;
- switch (type) {
- case "object":
- return object == null
- ? "null"
- : typeof object.constructor == "undefined" // COM object
- ? _MSIE_NATIVE_FUNCTION.test(object)
- ? "function"
- : type
- : typeof object.constructor.prototype.valueOf(); // underlying type
- case "function":
- return typeof object.call == "function" ? type : "object";
- default:
- return type;
- }
-};
-
-// =========================================================================
-// JavaScript/package.js
-// =========================================================================
-
-var JavaScript = {
- name: "JavaScript",
- version: base2.version,
- exports: "Array2,Date2,Function2,String2",
- namespace: "", // fixed later
-
- bind: function(host) {
- var top = global;
- global = host;
- forEach.csv(this.exports, function(name2) {
- var name = name2.slice(0, -1);
- extend(host[name], this[name2]);
- this[name2](host[name].prototype); // cast
- }, this);
- global = top;
- return host;
- }
-};
-
-function _createObject2(Native, constructor, generics, extensions) {
- // Clone native objects and extend them.
-
- // Create a Module that will contain all the new methods.
- var INative = Module.extend();
- var id = INative.toString().slice(1, -1);
- // http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6#Array_and_String_generics
- forEach.csv(generics, function(name) {
- INative[name] = unbind(Native.prototype[name]);
- INative.namespace += format("var %1=%2.%1;", name, id);
- });
- forEach (_slice.call(arguments, 3), INative.implement, INative);
-
- // create a faux constructor that augments the native object
- var Native2 = function() {
- return INative(this.constructor == INative ? constructor.apply(null, arguments) : arguments[0]);
- };
- Native2.prototype = INative.prototype;
-
- // Remove methods that are already implemented.
- for (var name in INative) {
- if (name != "prototype" && Native[name]) {
- delete INative.prototype[name];
- }
- Native2[name] = INative[name];
- }
- Native2.ancestor = Object;
- delete Native2.extend;
-
- // remove "lang.bind.."
- Native2.namespace = Native2.namespace.replace(/(var (\w+)=)[^,;]+,([^\)]+)\)/g, "$1$3.$2");
-
- return Native2;
-};
-
-// =========================================================================
-// JavaScript/~/Date.js
-// =========================================================================
-
-// Fix Date.get/setYear() (IE5-7)
-
-if ((new Date).getYear() > 1900) {
- Date.prototype.getYear = function() {
- return this.getFullYear() - 1900;
- };
- Date.prototype.setYear = function(year) {
- return this.setFullYear(year + 1900);
- };
-}
-
-// https://bugs.webkit.org/show_bug.cgi?id=9532
-
-var _testDate = new Date(Date.UTC(2006, 1, 20));
-_testDate.setUTCDate(15);
-if (_testDate.getUTCHours() != 0) {
- forEach.csv("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds", function(type) {
- extend(Date.prototype, "setUTC" + type, function() {
- var value = base(this, arguments);
- if (value >= 57722401000) {
- value -= 3600000;
- this.setTime(value);
- }
- return value;
- });
- });
-}
-
-// =========================================================================
-// JavaScript/~/Function.js
-// =========================================================================
-
-// Some browsers don't define this.
-
-Function.prototype.prototype = {};
-
-// =========================================================================
-// JavaScript/~/String.js
-// =========================================================================
-
-// A KHTML bug.
-
-if ("".replace(/^/, K("$$")) == "$") {
- extend(String.prototype, "replace", function(expression, replacement) {
- if (typeof replacement == "function") {
- var fn = replacement;
- replacement = function() {
- return String(fn.apply(null, arguments)).split("$").join("$$");
- };
- }
- return this.base(expression, replacement);
- });
-}
-
-// =========================================================================
-// JavaScript/Array2.js
-// =========================================================================
-
-var Array2 = _createObject2(
- Array,
- Array,
- "concat,join,pop,push,reverse,shift,slice,sort,splice,unshift", // generics
- Enumerable, {
- combine: function(keys, values) {
- // Combine two arrays to make a hash.
- if (!values) values = keys;
- return Array2.reduce(keys, function(hash, key, index) {
- hash[key] = values[index];
- return hash;
- }, {});
- },
-
- contains: function(array, item) {
- return Array2.indexOf(array, item) != -1;
- },
-
- copy: function(array) {
- var copy = _slice.call(array);
- if (!copy.swap) Array2(copy); // cast to Array2
- return copy;
- },
-
- flatten: function(array) {
- var i = 0;
- return Array2.reduce(array, function(result, item) {
- if (Array2.like(item)) {
- Array2.reduce(item, arguments.callee, result);
- } else {
- result[i++] = item;
- }
- return result;
- }, []);
- },
-
- forEach: _Array_forEach,
-
- indexOf: function(array, item, fromIndex) {
- var length = array.length;
- if (fromIndex == null) {
- fromIndex = 0;
- } else if (fromIndex < 0) {
- fromIndex = Math.max(0, length + fromIndex);
- }
- for (var i = fromIndex; i < length; i++) {
- if (array[i] === item) return i;
- }
- return -1;
- },
-
- insertAt: function(array, index, item) {
- Array2.splice(array, index, 0, item);
- return item;
- },
-
- item: function(array, index) {
- if (index < 0) index += array.length; // starting from the end
- return array[index];
- },
-
- lastIndexOf: function(array, item, fromIndex) {
- var length = array.length;
- if (fromIndex == null) {
- fromIndex = length - 1;
- } else if (fromIndex < 0) {
- fromIndex = Math.max(0, length + fromIndex);
- }
- for (var i = fromIndex; i >= 0; i--) {
- if (array[i] === item) return i;
- }
- return -1;
- },
-
- map: function(array, block, context) {
- var result = [];
- Array2.forEach (array, function(item, index) {
- result[index] = block.call(context, item, index, array);
- });
- return result;
- },
-
- remove: function(array, item) {
- var index = Array2.indexOf(array, item);
- if (index != -1) Array2.removeAt(array, index);
- },
-
- removeAt: function(array, index) {
- Array2.splice(array, index, 1);
- },
-
- swap: function(array, index1, index2) {
- if (index1 < 0) index1 += array.length; // starting from the end
- if (index2 < 0) index2 += array.length;
- var temp = array[index1];
- array[index1] = array[index2];
- array[index2] = temp;
- return array;
- }
- }
-);
-
-Array2.reduce = Enumerable.reduce; // Mozilla does not implement the thisObj argument
-
-Array2.like = function(object) {
- // is the object like an array?
- return typeOf(object) == "object" && typeof object.length == "number";
-};
-
-// introspection (removed when packed)
-;;; Enumerable["#implemented_by"].pop();
-;;; Enumerable["#implemented_by"].push(Array2);
-
-// =========================================================================
-// JavaScript/Date2.js
-// =========================================================================
-
-// http://developer.mozilla.org/es4/proposals/date_and_time.html
-
-// big, ugly, regular expression
-var _DATE_PATTERN = /^((-\d+|\d{4,})(-(\d{2})(-(\d{2}))?)?)?T((\d{2})(:(\d{2})(:(\d{2})(\.(\d{1,3})(\d)?\d*)?)?)?)?(([+-])(\d{2})(:(\d{2}))?|Z)?$/;
-var _DATE_PARTS = { // indexes to the sub-expressions of the RegExp above
- FullYear: 2,
- Month: 4,
- Date: 6,
- Hours: 8,
- Minutes: 10,
- Seconds: 12,
- Milliseconds: 14
-};
-var _TIMEZONE_PARTS = { // idem, but without the getter/setter usage on Date object
- Hectomicroseconds: 15, // :-P
- UTC: 16,
- Sign: 17,
- Hours: 18,
- Minutes: 20
-};
-
-var _TRIM_ZEROES = /(((00)?:0+)?:0+)?\.0+$/;
-var _TRIM_TIMEZONE = /(T[0-9:.]+)$/;
-
-var Date2 = _createObject2(
- Date,
- function(yy, mm, dd, h, m, s, ms) {
- switch (arguments.length) {
- case 0: return new Date;
- case 1: return typeof yy == "number" ? new Date(yy) : Date2.parse(yy);
- default: return new Date(yy, mm, arguments.length == 2 ? 1 : dd, h || 0, m || 0, s || 0, ms || 0);
- }
- }, "", {
- toISOString: function(date) {
- var string = "####-##-##T##:##:##.###";
- for (var part in _DATE_PARTS) {
- string = string.replace(/#+/, function(digits) {
- var value = date["getUTC" + part]();
- if (part == "Month") value++; // js month starts at zero
- return ("000" + value).slice(-digits.length); // pad
- });
- }
- // remove trailing zeroes, and remove UTC timezone, when time's absent
- return string.replace(_TRIM_ZEROES, "").replace(_TRIM_TIMEZONE, "$1Z");
- }
- }
-);
-
-delete Date2.forEach;
-
-Date2.now = function() {
- return (new Date).valueOf(); // milliseconds since the epoch
-};
-
-Date2.parse = function(string, defaultDate) {
- if (arguments.length > 1) {
- assertType(defaultDate, "number", "default date should be of type 'number'.")
- }
- // parse ISO date
- var parts = match(string, _DATE_PATTERN);
- if (parts.length) {
- if (parts[_DATE_PARTS.Month]) parts[_DATE_PARTS.Month]--; // js months start at zero
- // round milliseconds on 3 digits
- if (parts[_TIMEZONE_PARTS.Hectomicroseconds] >= 5) parts[_DATE_PARTS.Milliseconds]++;
- var date = new Date(defaultDate || 0);
- var prefix = parts[_TIMEZONE_PARTS.UTC] || parts[_TIMEZONE_PARTS.Hours] ? "UTC" : "";
- for (var part in _DATE_PARTS) {
- var value = parts[_DATE_PARTS[part]];
- if (!value) continue; // empty value
- // set a date part
- date["set" + prefix + part](value);
- // make sure that this setting does not overflow
- if (date["get" + prefix + part]() != parts[_DATE_PARTS[part]]) {
- return NaN;
- }
- }
- // timezone can be set, without time being available
- // without a timezone, local timezone is respected
- if (parts[_TIMEZONE_PARTS.Hours]) {
- var hours = Number(parts[_TIMEZONE_PARTS.Sign] + parts[_TIMEZONE_PARTS.Hours]);
- var minutes = Number(parts[_TIMEZONE_PARTS.Sign] + (parts[_TIMEZONE_PARTS.Minutes] || 0));
- date.setUTCMinutes(date.getUTCMinutes() + (hours * 60) + minutes);
- }
- return date.valueOf();
- } else {
- return Date.parse(string);
- }
-};
-
-// =========================================================================
-// JavaScript/String2.js
-// =========================================================================
-
-var String2 = _createObject2(
- String,
- function(string) {
- return new String(arguments.length == 0 ? "" : string);
- },
- "charAt,charCodeAt,concat,indexOf,lastIndexOf,match,replace,search,slice,split,substr,substring,toLowerCase,toUpperCase",
- {
- csv: csv,
- format: format,
- rescape: rescape,
- trim: trim
- }
-);
-
-delete String2.forEach;
-
-// http://blog.stevenlevithan.com/archives/faster-trim-javascript
-function trim(string) {
- return String(string).replace(_LTRIM, "").replace(_RTRIM, "");
-};
-
-function csv(string) {
- return string ? (string + "").split(/\s*,\s*/) : [];
-};
-
-function format(string) {
- // Replace %n with arguments[n].
- // e.g. format("%1 %2%3 %2a %1%3", "she", "se", "lls");
- // ==> "she sells sea shells"
- // Only %1 - %9 supported.
- var args = arguments;
- var pattern = new RegExp("%([1-" + (arguments.length - 1) + "])", "g");
- return (string + "").replace(pattern, function(match, index) {
- return args[index];
- });
-};
-
-function match(string, expression) {
- // Same as String.match() except that this function will return an empty
- // array if there is no match.
- return (string + "").match(expression) || [];
-};
-
-function rescape(string) {
- // Make a string safe for creating a RegExp.
- return (string + "").replace(_RESCAPE, "\\$1");
-};
-
-// =========================================================================
-// JavaScript/Function2.js
-// =========================================================================
-
-var Function2 = _createObject2(
- Function,
- Function,
- "", {
- I: I,
- II: II,
- K: K,
- bind: bind,
- compose: compose,
- delegate: delegate,
- flip: flip,
- not: not,
- partial: partial,
- unbind: unbind
- }
-);
-
-function I(i) { // return first argument
- return i;
-};
-
-function II(i, ii) { // return second argument
- return ii;
-};
-
-function K(k) {
- return function() {
- return k;
- };
-};
-
-function bind(fn, context) {
- var lateBound = typeof fn != "function";
- if (arguments.length > 2) {
- var args = _slice.call(arguments, 2);
- return function() {
- return (lateBound ? context[fn] : fn).apply(context, args.concat.apply(args, arguments));
- };
- } else { // faster if there are no additional arguments
- return function() {
- return (lateBound ? context[fn] : fn).apply(context, arguments);
- };
- }
-};
-
-function compose() {
- var fns = _slice.call(arguments);
- return function() {
- var i = fns.length, result = fns[--i].apply(this, arguments);
- while (i--) result = fns[i].call(this, result);
- return result;
- };
-};
-
-function delegate(fn, context) {
- return function() {
- var args = _slice.call(arguments);
- args.unshift(this);
- return fn.apply(context, args);
- };
-};
-
-function flip(fn) {
- return function() {
- return fn.apply(this, Array2.swap(arguments, 0, 1));
- };
-};
-
-function not(fn) {
- return function() {
- return !fn.apply(this, arguments);
- };
-};
-
-function partial(fn) {
- var args = _slice.call(arguments, 1);
- // based on Oliver Steele's version
- return function() {
- var specialised = args.concat(), i = 0, j = 0;
- while (i < args.length && j < arguments.length) {
- if (specialised[i] === undefined) specialised[i] = arguments[j++];
- i++;
- }
- while (j < arguments.length) {
- specialised[i++] = arguments[j++];
- }
- if (Array2.contains(specialised, undefined)) {
- specialised.unshift(fn);
- return partial.apply(null, specialised);
- }
- return fn.apply(this, specialised);
- };
-};
-
-function unbind(fn) {
- return function(context) {
- return fn.apply(context, _slice.call(arguments, 1));
- };
-};
-
-// =========================================================================
-// base2/detect.js
-// =========================================================================
-
-function detect() {
- // Two types of detection:
- // 1. Object detection
- // e.g. detect("(java)");
- // e.g. detect("!(document.addEventListener)");
- // 2. Platform detection (browser sniffing)
- // e.g. detect("MSIE");
- // e.g. detect("MSIE|opera");
-
- var jscript = NaN/*@cc_on||@_jscript_version@*/; // http://dean.edwards.name/weblog/2007/03/sniff/#comment85164
- var javaEnabled = global.java ? true : false;
- if (global.navigator) { // browser
- var MSIE = /MSIE[\d.]+/g;
- var element = document.createElement("span");
- // Close up the space between name and version number.
- // e.g. MSIE 6 -> MSIE6
- var userAgent = navigator.userAgent.replace(/([a-z])[\s\/](\d)/gi, "$1$2");
- // Fix opera's (and others) user agent string.
- if (!jscript) userAgent = userAgent.replace(MSIE, "");
- if (MSIE.test(userAgent)) userAgent = userAgent.match(MSIE)[0] + " " + userAgent.replace(MSIE, "");
- base2.userAgent = navigator.platform + " " + userAgent.replace(/like \w+/gi, "");
- javaEnabled &= navigator.javaEnabled();
-//} else if (java) { // rhino
-// var System = java.lang.System;
-// base2.userAgent = "Rhino " + System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version");
-//} else if (jscript) { // Windows Scripting Host
-// base2.userAgent = "WSH";
- }
-
- var _cache = {};
- detect = function(expression) {
- if (_cache[expression] == null) {
- var returnValue = false, test = expression;
- var not = test.charAt(0) == "!";
- if (not) test = test.slice(1);
- if (test.charAt(0) == "(") {
- try {
- returnValue = new Function("element,jscript,java,global", "return !!" + test)(element, jscript, javaEnabled, global);
- } catch (ex) {
- // the test failed
- }
- } else {
- // Browser sniffing.
- returnValue = new RegExp("(" + test + ")", "i").test(base2.userAgent);
- }
- _cache[expression] = !!(not ^ returnValue);
- }
- return _cache[expression];
- };
-
- return detect(arguments[0]);
-};
-
-// =========================================================================
-// base2/init.js
-// =========================================================================
-
-base2 = global.base2 = new Package(this, base2);
-var exports = this.exports;
-
-lang = new Package(this, lang);
-exports += this.exports;
-
-JavaScript = new Package(this, JavaScript);
-eval(exports + this.exports);
-
-lang.base = base;
-lang.extend = extend;
-
-}; //////////////////// END: CLOSURE /////////////////////////////////////
diff --git a/src/Umbraco.Web.UI/umbraco_client/ui/default.css b/src/Umbraco.Web.UI/umbraco_client/ui/default.css
deleted file mode 100644
index 1b691c732a..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/ui/default.css
+++ /dev/null
@@ -1,763 +0,0 @@
-body {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: normal;
- background-color: #fff}
-
-body *{outline: none;}
-
-
-/* STYLES FOR Legacy iframe content */
-
-html > body > form > div.panel{
- width:100%;
- height:100%;
-}
-
-
-/*CREATE DIALOG */
-.createDescription
-{
- padding: 25px 0 0 0;
- height: 170px;
-}
-
-.createDescription img
-{
- height: 128px;
- float: left;
- margin: 0 10px 10px 0;
-}
-
-.bigInput
-{
- font-size: 1.8em;
- width: 560px;
-}
-
-
-a
-{
- color: #1541a9;
-}
-
-a:hover
-{
- text-decoration: underline;
-}
-
-img
-{
- border: none;
-}
-
-
-.feedbackCreate
-{
- margin: 5px;
- padding: 5px 5px 3px 36px;
- background: url(../images/okLayerBackground.gif);
- display: block;
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: bold;
- color: White;
-}
-
-.feedbackDelete
-{
- margin: 5px;
- padding: 5px 5px 3px 36px;
- background: url(../images/errorLayerBackground.gif);
- display: block;
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: bold;
- color: White;
-}
-
-.loginHeader
-{
- width: 242px;
- height: 24px;
- background-image: url(../images/loginHeader.gif);
- font-family: Trebuchet MS, Arial, Helvetica,Lucida Grande;
- font-size: medium;
- font-weight: bold;
- color: #666;
-}
-
-.nolink
-{
- text-decoration: none;
- color: Black;
-}
-
-.clickImg
-{
- border: none;
-}
-
-h3
-{
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- padding: 0px;
- margin-left: 0px;
- margin-bottom: -5px;
- margin-top: 10px;
-}
-
-/* deprecated down */
-.propertyuicontrols .Pane, .propertyPane
-{
- border: 1px solid #BABABA;
- background-image: url(../propertyPane/images/propertyBackground.gif);
- margin: 10px;
- display: block;
-}
-
-tr.propertyHeader td, td.propertyHeader
-{
- font-weight: bold;
- vertical-align: top;
- padding: 7px;
- /* border-bottom: 1px solid #DBDBDF; */
-}
-
-tr.propertyContent td, td.propertyContent
-{
- vertical-align: top;
- padding: 7px;
- /* border-bottom: 1px solid #DBDBDF; */
-}
-/* deprecated up */
-
-div.propertyDiv
-{
- border: 1px solid #BABABA;
- background-image: url(../propertyPane/images/propertyBackground.gif);
- display: block;
- padding: 7px;
- margin-bottom: 10px;
-}
-
-
-.guiDialogHeader {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 18px;
- font-weight: bold;
-}
-
-.guiDialogMedium {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 14px;
- font-weight: bold;
- padding: 10px;
-}
-
-td, .guiDialogNormal {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: none;
-}
-
-th
-{
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: bold;
- text-align: left;
- vertical-align: top;
-}
-
-.guiDialogDisabled {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: none;
- color: #CCCCCC;
-}
-
-.guiDialogForm {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- font-weight: bold;
-}
-
-.guiDialogTiny {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 10px !Important;
- color: #A8A8A3;
-}
-
-.guiDialogTinyMark {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 10px !Important;
- color: #606057;
-}
-
-.guiDialogTinyTop {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 10px;
- font-weight: bold;
- color: #378080;
-}
-
-.guiInputCode, .codepress {
- font-family: Consolas, courier;
- line-height:1.6em; font-size: 1em; background:#F6F6F9; border:1px solid #CCCCCC;
- margin: 0px !Important;
-}
-
-.umbEditorTextField {
- width: 400px;
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
-}
-
-.umbEditorTextFieldMultiple {
- width: 400px;
- height: 150px;
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
-}
-
-.guiDialogBox {
- background-color: #e0eced;
- border: 1px dotted #3399CC;
-}
-
-.guiInputText {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- color: #333333;
- padding: 2px 2px 2px 2px;
-}
-
-.guiInputTextStandard {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- width: 70%;
- color: #333333;
- padding: 2px 2px 2px 2px;
-}
-
-.guiInputMediumSize{
- width: 70%;
-}
-
-.guiInputLargeSize{
- width: 90%;
-}
-
-.guiInputStandardSize{
- width: 250px;
-}
-
-
-.guiInputDisabled {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 12px;
- color: #999999;
- border: 0px solid;
- padding: 4px 4px 4px 4px;
-}
-
-.guiInputTextTiny, input, select {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 11px;
- color: #333333;
-}
-
-
-.guiInputButton {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- font-size: 10px;
- color: #333333;
- font-weight: bolder;
-}
-
-.umbracoEditorBagground {
- background-color: white;
-}
-
-/*
-.editorIcon
-{
- width: 20px;
- height: 20px;
-}
-*/
-
-.editorArrowOver {
- cursor: hand;
- background-color: #DEDFFD;
-}
-
-.editorIconOver {
- cursor: hand;
- background-image: url("../menuicon/images/buttonbg.gif");
-}
-
-.editorIconDown {
- cursor: hand;
- background-image: url("../menuicon/images/buttonbgdown.gif");
-}
-
-.editorIconOn {
- cursor: hand;
- background-image: url("../menuicon/images/buttonbgdown.gif");
-}
-
-.editorIconDisabled {
- Filter: Alpha(Opacity=30);
-}
-
-.editorDropDown {
- font-family: verdana, arial;
- font-size: 10px;
- width: 80px;
- color: #666699;
-}
-
-.tinymceMenuBar
-{
-}
-
-.mceToolbarExternal
-{
- position: absolute;
- z-index: 100;
- top: -2px;
- left: 90px;
-}
-
-.guiTab {
- font-family: Trebuchet MS, Lucida Grande, verdana, arial;
- padding: 3px 0px 0px 0px;
- font-size: 10px;
-}
-
-.guiLine {
- background-color: #A2A2A0;
-}
-
-.guiLineSelected {
- background-color: #F5F5F5;
-}
-
-guiEditor {
- background-color: #FFFFFF;
- width: 100%;
- height: 100%;
-}
-
-
-
-.datePicker {
- border: 1px solid WindowText;
- background: Window;
- width: 170px;
- padding: 0px;
- cursor: default;
- -moz-user-focus: normal;
-}
-
-
-.datePicker td {
- font: smallcaption;
- font: small-caption;
- text-align: center;
- color: WindowText;
- cursor: default;
- font-weight: normal !important;
- -moz-user-select: none;
- padding: 0;
-}
-
-.datePicker td.red {
- color: red;
-}
-
-.datePicker .header {
- background: ActiveCaption;
- padding: 3px;
- border-bottom: 1px solid WindowText;
-}
-
-.datePicker .headerTable {
- width: 100%;
-}
-
-.datePicker .footer {
- padding: 3px;
-}
-
-.datePicker .footerTable {
- width: 100%;
-}
-
-.datePicker .grid {
- padding: 3px;
-}
-.datePicker .gridTable {
- width: 100%;
-}
-
-.datePicker .gridTable td {
- width: 14.3%;
-}
-
-.datePicker .gridTable .daysRow td {
- font-weight: bold !important;
- border-bottom: 1px solid ThreeDDarkShadow;
-}
-
-.datePicker .grid .gridTable .upperLine {
- width: 100%;
- height: 2px;
- overflow: hidden;
- background: transparent;
-}
-
-.datePicker td.today {
- font-weight: bold !important;
-}
-
-.datePicker td.selected {
- background: Highlight;
- color: HighlightText !important;
-}
-
-.datePicker td.labelContainer {
- width: 100%;
-}
-
-.datePicker td .topLabel {
- color: CaptionText;
- display: block;
- font-weight: bold !important;
- width: 100%;
- text-decoration: none;
-
-}
-
-.datePicker td.filler {
- width: 100%;
-}
-
-.datePicker button {
- border-width: 1px;
- font: Caption;
- font-weight: normal !important;
- display: block;
-}
-
-.datePicker .previousButton {
- background: buttonface url("../images/arrow.left.png") no-repeat center center;
-}
-
-.datePicker .nextButton {
- background: buttonface url("../images/arrow.right.png") no-repeat center center;
-}
-.datePicker .previousButton,
-.datePicker .nextButton {
- width: 14px;
- height: 14px;
-}
-
-.datePicker .todayButton,
-.datePicker .noneButton {
- width: 50px;
-}
-
-
-.datePicker .labelPopup {
- position: absolute;
- min-width: 130px;
- background: Window;
- border: 1px solid WindowText;
- padding: 1px;
-}
-
-.datePicker .labelPopup a {
- width: 100%;
- display: block;
- color: WindowText;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.datePicker .labelPopup a:hover {
- background: Highlight;
- color: HighlightText;
-}
-
-.datePicker .labelPopup a.selected {
- font-weight: bold;
-}
-
-.treePickerTitle {
- border-bottom: 1px dotted #333;
-}
-
-.umbMacroHolder
-{
- margin: 5px;
- padding: 5px;
- border: 2px dotted orange;
- display: inline;
-}
-
-.umbTagElement
-{
- float: left;
- margin-left: 10px;
- padding: 0;
-}
-
-.umbTagDelete
-{
- color: Red;
-}
-
-.umbTagContainer
-{
- width: 300px;
- margin: 5px 0;
- display: block;
-}
-
-.umbIconDropdownList option.spriteBackground
-{
- background-repeat:no-repeat;
- padding: 1px;
- padding-left:25px;
- margin-left:2px;
- display:block ! important;
-}
-.umbIconDropdownList option.deprecatedImage{
- background-repeat:no-repeat;
- background-position:4px 1px;
- padding: 1px;
- padding-left:25px;
-}
-
-.umbThumbnailDropdownList .ddChild img {
- width: 90px;
-}
-
-#auditTrailList span
-{
- margin-left: 22px;
-}
-
-.umbNitroList{}
-.umbNitroList input{float: left; display: block;}
-.umbNitroList tr td{border-bottom: 1px solid #ccc; padding: 10px;}
-
-.umbNitroList div{float: left; padding-left: 15px; display: block; width: 550px;}
-.umbNitroList div h3{margin: 0px;}
-
-/* Generel error / success / notice classes, as seen in the umbraco installer. */
-.error, .notice, .success {padding:0 .6em;margin-bottom:.5em;border:2px solid #ddd;}
-.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
-.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
-.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
-
-.error a {color:#8a1f11;}
-.notice a {color:#514721;}
-.success a {color:#264409;}
-
-.error p, .notice p, .success p {margin: 0.6em 0 !important;}
-
-.sprTree {
- /*background-color: #fff;*/
- background-image: url(../../umbraco/images/umbraco/sprites.png);
- display: inline;
- padding-bottom: 2px;
-}
-.sprTree img{width: 16px; height: 18px; padding-right: 7px;}
-
-.treeContainer
-{
- padding:5px;
- background-color:White;
-}
-
-/* DASHBOARD */
-
-.dashboardWrapper
-{
- padding:5px 5px 5px 5px;
- overflow:hidden;
- color:#333;
-}
-
-.dashboardWrapper p
-{
- font-size:1.1em;
- margin-top:0;
-}
-
-.dashboardWrapper h2
-{
- margin-top:0;
- padding-bottom:10px;
- border-bottom:1px solid #ccc;
- padding-left:37px;
- line-height:32px;
-}
-
-.dashboardWrapper h3
-{
- margin-bottom:10px;
-}
-
-.dashboardWrapper h4
-{
-
-}
-
-.dashboardIcon
-{
- position:absolute;
- top:10px;
- left:10px;
-}
-
-.dashboardColWrapper
-{
- position:relative;
- overflow:hidden;
-}
-
-.dashboardColWrapper h3
-{
- margin-bottom:0;
-}
-
-.dashboardColWrapper ul
-{
- margin-left:1.5em;
- margin-right:1.5em;
- padding:0;
- list-style-image:url(/umbraco/images/listitemorange.gif);
-}
-
-.dashboardColWrapper li
-{
- line-height:1.2em;
- font-size:1.1em;
- padding-bottom:.5em;
-}
-
-
-.dashboardCols
-{
-
-}
-
-.dashboardCol
-{
- position:relative;
- padding:10px 1%;
- background: url(/umbraco_client/propertypane/images/propertyBackground.gif) repeat-x scroll center top #FFFFFF;
-}
-
-
-
-.third
-{
- width:30.33%;
- float:left;
- margin-right:1%;
-}
-
-.dashboardCols .last
-{
- margin-right:0;
-}
-
-.dashboardCols h3
-{
- margin-top:0;
- padding-bottom:5px;
- border-bottom:1px solid #ccc;
-}
-
-
-
-.dashboardHideLink
-{
- /*float: right;
- color: #aaa;
- text-decoration: none;*/
-
- position:absolute;
- right:10px;
- top:10px;
- text-decoration:none;
- color:#666;
- border:none;
- font-size:.9em;
- font-weight:bold;
- padding:5px;
- margin:0;
- border-radius:3px;
- border:1px solid #ccc;
- -moz-border-radius:3px;
- -webkit-border-radius:3px;
- background-color:#ddd;
- background: -moz-linear-gradient(100% 100% 90deg, #ddd, #fefefe);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fefefe), to(#ddd));
-
-}
-
-.dashboardHideLink:hover
-{
- text-decoration:none;
- background-color:#fefefe;
- background: -moz-linear-gradient(100% 100% 90deg, #fefefe, #ddd);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ddd), to(#fefefe));
- cursor:pointer;
-}
-
-.treePickerTooltip {
- display: none;
- position: absolute;
- border: 1px solid #333;
- background-color: #fff8cb;
- padding: 3px;
- color: #000;
-}
-
-/* SORTABLE DOCUMENT TYPE LISTS */
-table.tabs-table {width: 100%;}
-table.tabs-table tbody {float: left; width: 100%; }
-table.tabs-table tr.propertyContent
-{
- float: left;
- clear: both;
- cursor: move;
- width: 100%;
- border: solid 1px #CCC;
- background: url(../tabView/images/background.gif) #EEE repeat-x bottom;
- margin-bottom: 4px;
-}
-table.tabs-table tr.propertyContent td
-{
- padding-right: 40px;
- width: 100%;
-}
-table.tabs-table input[type=text] { width: 200px; }
-table.tabs-table input[type=submit] { text-align: right; }
-
-table.tabs-table tr.propertyContent input.sort-order {
- width: 20px;
- background-color: lightgray;
- padding: 0px 5px 0px 5px;
-}
-
-li.no-properties-on-tab {background: none; background-color: #fff; cursor: default; }
-
-.doc-type-property-drop-zone { border: dashed 1px #ccc; padding: 4px; }
diff --git a/src/Umbraco.Web.UI/umbraco_client/ui/default.js b/src/Umbraco.Web.UI/umbraco_client/ui/default.js
deleted file mode 100644
index bcda0f469b..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/ui/default.js
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// This File contains all standard javascript helpers for normal umbraco pages,
-// for resizing, event handling etc.
-// All UI controls should expect this js file to be present.
-// included in umbracoPage.master
-//
-
-function addEvent(obj, evType, fn) {
- if (obj.addEventListener) {
- obj.addEventListener(evType, fn, false);
- return true;
- } else if (obj.attachEvent) {
- var r = obj.attachEvent("on" + evType, fn);
- return r;
- } else {
- return false;
- }
-}
-
-function removeEvent(obj, evType, fn, useCapture) {
- if (obj.removeEventListener) {
- obj.removeEventListener(evType, fn, useCapture);
- return true;
- } else if (obj.detachEvent) {
- var r = obj.detachEvent("on" + evType, fn);
- return r;
- } else {
- alert("Handler could not be removed");
- }
-}
-
-
-
-//
-// Code below taken from - http://www.evolt.org/article/document_body_doctype_switching_and_more/17/30655/
-// Modified 4/22/04 to work with Opera/Moz (by webmaster at subimage dot com)
-// Gets the full width/height because it's different for most browsers.
-//
-function getViewportHeight() {
- if (window.innerHeight != window.undefined) return window.innerHeight;
- if (document.compatMode == 'CSS1Compat') return document.documentElement.clientHeight;
- if (document.body) return document.body.clientHeight;
- return window.undefined;
-}
-
-function getViewportWidth() {
- if (window.innerWidth != window.undefined) return window.innerWidth;
- if (document.compatMode == 'CSS1Compat') return document.documentElement.clientWidth;
- if (document.body) return document.body.clientWidth;
- return window.undefined;
-}
-
-function getY(obj) {
- var curtop = 0;
- if (obj.offsetParent)
- while (1) {
- curtop += obj.offsetTop;
- if (!obj.offsetParent)
- break;
- obj = obj.offsetParent;
- }
- else if (obj.y)
- curtop += obj.y;
- return curtop;
-}
-
-function getX(obj) {
- var curleft = 0;
- if (obj.offsetParent)
- while (1) {
- curleft += obj.offsetLeft;
- if (!obj.offsetParent)
- break;
- obj = obj.offsetParent;
- }
- else if (obj.x)
- curleft += obj.x;
- return curleft;
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco_client/ui/jquery.js b/src/Umbraco.Web.UI/umbraco_client/ui/jquery.js
deleted file mode 100644
index 4024b6622b..0000000000
--- a/src/Umbraco.Web.UI/umbraco_client/ui/jquery.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML=" ",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML=" ","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML=" ",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
-}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/
-
-
-
-
-
-
-
-
-
-
-
- '">
-
-
-
-
-
-
-
-
-
-
-
- <%=Services.TextService.Localize("assignDomain/domainHelp") %>
- <%=Services.TextService.Localize("assignDomain/addNew") %>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.cs
deleted file mode 100644
index db04f26bcf..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System;
-using System.Text;
-using System.Linq;
-using Umbraco.Core;
-using Umbraco.Core.Models;
-using Umbraco.Core.Services;
-using Umbraco.Web.UI.Pages;
-using Umbraco.Web;
-using Umbraco.Web.Composing;
-using Umbraco.Web.Editors;
-using Umbraco.Web.WebServices;
-using Umbraco.Web._Legacy.Actions;
-
-
-namespace umbraco.dialogs
-{
- public partial class AssignDomain2 : UmbracoEnsuredPage
- {
- protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
-
- var nodeId = GetNodeId();
- CheckPathAndPermissions(nodeId, UmbracoObjectTypes.Document, ActionAssignDomain.Instance);
- }
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
-
- var nodeId = GetNodeId();
- var node = Services.ContentService.GetById(nodeId);
-
- if (node == null)
- {
- feedback.Text = Services.TextService.Localize("assignDomain/invalidNode");
- pane_language.Visible = false;
- pane_domains.Visible = false;
- p_buttons.Visible = false;
- return;
- }
-
- pane_language.Title = Services.TextService.Localize("assignDomain/setLanguage");
- pane_domains.Title = Services.TextService.Localize("assignDomain/setDomains");
- prop_language.Text = Services.TextService.Localize("assignDomain/language");
-
- var nodeDomains = Services.DomainService.GetAssignedDomains(nodeId, true).ToArray();
- var wildcard = nodeDomains.FirstOrDefault(d => d.IsWildcard);
-
- var sb = new StringBuilder();
- sb.Append("languages: [");
- var i = 0;
- foreach (var language in Current.Services.LocalizationService.GetAllLanguages())
- sb.AppendFormat("{0}{{ \"Id\": {1}, \"Code\": \"{2}\" }}", (i++ == 0 ? "" : ","), language.Id, language.IsoCode);
- sb.Append("]\r\n");
-
- sb.AppendFormat(",language: {0}", wildcard == null ? "undefined" : wildcard.LanguageId.ToString());
-
- sb.Append(",domains: [");
- i = 0;
- foreach (var domain in nodeDomains.Where(d => d.IsWildcard == false))
- sb.AppendFormat("{0}{{ \"Name\": \"{1}\", \"Lang\": \"{2}\" }}", (i++ == 0 ? "" :","), domain.DomainName, domain.LanguageId);
- sb.Append("]\r\n");
-
- data.Text = sb.ToString();
- }
-
- protected int GetNodeId()
- {
- int nodeId;
- if (int.TryParse(Request.QueryString["id"], out nodeId) == false)
- nodeId = -1;
- return nodeId;
- }
-
- protected string GetRestServicePath()
- {
- const string action = "ListDomains";
- var path = Url.GetUmbracoApiService(action);
- return path.TrimEnd(action).EnsureEndsWith('/');
- }
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.designer.cs
deleted file mode 100644
index af45317d12..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain2.aspx.designer.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.dialogs {
-
-
- public partial class AssignDomain2 {
-
- ///
- /// data control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal data;
-
- ///
- /// feedback control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.Feedback feedback;
-
- ///
- /// pane_language control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.Pane pane_language;
-
- ///
- /// prop_language control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.PropertyPanel prop_language;
-
- ///
- /// pane_domains control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.Pane pane_domains;
-
- ///
- /// p_buttons control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlGenericControl p_buttons;
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs
deleted file mode 100644
index f85114aaec..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs
+++ /dev/null
@@ -1,265 +0,0 @@
-using System;
-using System.Linq;
-using Umbraco.Core;
-using Umbraco.Core.Services;
-using Umbraco.Web;
-using System.Web.UI;
-using System.Collections.Generic;
-using Umbraco.Web.Composing;
-using Umbraco.Web.UI.Pages;
-using Umbraco.Core.Exceptions;
-using Umbraco.Core.Models;
-using Umbraco.Web._Legacy.Actions;
-
-namespace umbraco.cms.presentation
-{
- ///
- /// Summary description for sort.
- ///
- public partial class sort : UmbracoEnsuredPage
- {
- ///
- /// The Parent Id being sorted
- ///
- protected int? ParentIdAsInt { get; private set; }
- protected string ParentIdAsString { get; private set; }
-
- private readonly List _nodes = new List();
-
- protected bool HideDateColumn
- {
- set { ViewState["HideDateColumn"] = value; }
- get { return ViewState["HideDateColumn"] == null ? false : (bool) ViewState["HideDateColumn"]; }
- }
-
- protected override void OnInit(EventArgs e)
- {
- CurrentApp = Request.GetItemAsString("app");
-
- ParentIdAsString = Request.GetItemAsString("ID");
- int parentId;
- if (int.TryParse(ParentIdAsString, out parentId))
- {
- ParentIdAsInt = parentId;
-
- if (CurrentApp == Constants.Applications.Content || CurrentApp == Constants.Applications.Media)
- {
- CheckPathAndPermissions(
- ParentIdAsInt.Value,
- CurrentApp == Constants.Applications.Content ? UmbracoObjectTypes.Document : UmbracoObjectTypes.Media,
- ActionSort.Instance);
- }
- }
-
- base.OnInit(e);
- }
-
- protected void Page_Load(object sender, EventArgs e)
- {
- sortDone.Text = Services.TextService.Localize("sort/sortDone");
- }
- protected override void OnPreRender(EventArgs e)
- {
- base.OnPreRender(e);
-
- ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/nodesorter.asmx"));
- ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx"));
-
- var app = Request.GetItemAsString("app");
-
- var icon = "../images/umbraco/doc.gif";
-
- if (ParentIdAsInt.HasValue)
- {
- if (app == Constants.Applications.Media)
- {
- icon = "../images/umbraco/mediaPhoto.gif";
- var mediaService = Current.Services.MediaService;
-
- if (ParentIdAsInt.Value == -1)
- {
- foreach (var child in mediaService.GetRootMedia().ToList().OrderBy(x => x.SortOrder))
- _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon));
- }
- else
- {
- var children = mediaService.GetChildren(ParentIdAsInt.Value);
- foreach (var child in children.OrderBy(x => x.SortOrder))
- _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon));
- }
- }
-
- if (app == Constants.Applications.Content)
- {
- var contentService = Current.Services.ContentService;
-
- if (ParentIdAsInt.Value == -1)
- {
- foreach (var child in contentService.GetRootContent().ToList().OrderBy(x => x.SortOrder))
- _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon));
- }
- else
- {
- var children = contentService.GetChildren(ParentIdAsInt.Value);
- foreach (var child in children)
- _nodes.Add(CreateNode(child.Id.ToInvariantString(), child.SortOrder, child.Name, child.CreateDate, icon));
- }
- }
-
- bindNodesToList(string.Empty);
- }
- else
- {
- // hack for stylesheet, used to sort stylesheet properties
- if (app == Constants.Applications.Settings)
- {
- icon = "../images/umbraco/settingCss.gif";
-
- HideDateColumn = true;
-
- var stylesheetName = ParentIdAsString;
- if (stylesheetName.IsNullOrWhiteSpace())throw new NullReferenceException("No Id passed in to editor");
- var stylesheet = Services.FileService.GetStylesheetByName(stylesheetName.EnsureEndsWith(".css"));
- if (stylesheet == null) throw new InvalidOperationException("No stylesheet found by name " + stylesheetName);
-
- var sort = 0;
- foreach (var child in stylesheet.Properties)
- {
- _nodes.Add(CreateNode(child.Name, sort, child.Name, DateTime.Now, icon));
- sort++;
- }
-
- bindNodesToList(string.Empty);
- }
- }
- }
-
- public void bindNodesToList(string sortBy)
- {
- if (string.IsNullOrEmpty(sortBy) == false)
- {
- switch (sortBy)
- {
- case "nodeName":
- _nodes.Sort(new nodeNameCompare());
- break;
- case "createDate":
- _nodes.Sort(new createDateCompare());
- break;
- }
- }
-
- foreach (var n in _nodes)
- lt_nodes.Text += string.Format(
- "{1} {2} {3} {4} ",
- n.id, n.Name, n.createDate.ToShortDateString(), n.createDate.ToShortTimeString(), n.sortOrder, HideDateColumn ? "none" : "table-cell");
- }
-
- private static SortableNode CreateNode(string id, int sortOrder, string name, DateTime createDateTime, string icon)
- {
- var node = new SortableNode
- {
- id = id,
- sortOrder = sortOrder,
- Name = name,
- icon = icon,
- createDate = createDateTime
- };
- return node;
- }
-
- public class SortableNode
- {
- public string id;
- public int sortOrder;
- public string Name;
- public string icon;
- public DateTime createDate;
- }
-
- ///
- /// JsInclude1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
-
- ///
- /// JsInclude2 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude2;
-
- ///
- /// prog1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.ProgressBar prog1;
-
- ///
- /// sortDone control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal sortDone;
-
- ///
- /// sortPane control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.Pane sortPane;
-
- ///
- /// lt_nodes control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal lt_nodes;
-
- }
-
- public class nodeNameCompare : IComparer
- {
-
- #region IComparer Members
-
- public int Compare(sort.SortableNode x, sort.SortableNode y)
- {
- var returnValue = String.Compare(x.Name, y.Name, StringComparison.Ordinal);
-
- return returnValue;
- }
-
- #endregion
- }
-
- public class createDateCompare : IComparer
- {
-
- #region IComparer Members
-
- public int Compare(sort.SortableNode x, sort.SortableNode y)
- {
- var returnValue = x.createDate.CompareTo(y.createDate);
-
- return returnValue;
- }
-
- #endregion
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx
deleted file mode 100644
index 740b069006..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx
+++ /dev/null
@@ -1,72 +0,0 @@
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master"Codebehind="viewAuditTrail.aspx.cs" AutoEventWireup="True"
- Inherits="umbraco.presentation.umbraco.dialogs.viewAuditTrail" %>
-<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%=Services.TextService.Localize("action")%>
-
-
-
- <%# FormatAction(DataBinder.Eval(Container.DataItem, "LogType", "{0}")) %>
-
-
-
-
-
- <%=Services.TextService.Localize("user")%>
-
-
-
- <%--TODO: N+1 !!!! and no null checks--%>
- <%# Services.UserService.GetUserById(int.Parse(DataBinder.Eval(Container.DataItem, "UserId", "{0}"))).Name%>
-
-
-
-
-
- <%=Services.TextService.Localize("date")%>
-
-
-
- <%# DataBinder.Eval(Container.DataItem, "Timestamp", "{0:D} {0:T}") %>
-
-
-
-
-
- <%=Services.TextService.Localize("comment")%>
-
-
-
- <%# DataBinder.Eval(Container.DataItem, "Comment", "{0}") %>
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs
deleted file mode 100644
index f80fa5d064..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Web;
-using System.Web.SessionState;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Web.UI.HtmlControls;
-using Umbraco.Core;
-using Umbraco.Core.Services;
-using Umbraco.Web;
-using Umbraco.Web.Composing;
-using Umbraco.Web._Legacy.Actions;
-using Action = Umbraco.Web._Legacy.Actions.Action;
-
-namespace umbraco.presentation.umbraco.dialogs
-{
- ///
- /// Summary description for viewAuditTrail.
- ///
- public partial class viewAuditTrail : Umbraco.Web.UI.Pages.UmbracoEnsuredPage
- {
- public viewAuditTrail()
- {
- CurrentApp = Constants.Applications.Content.ToString();
-
- }
-
- protected void Page_Load(object sender, System.EventArgs e)
- {
- // Put user code to initialize the page here
- //nodeName.Text = new cms.businesslogic.CMSNode(int.Parse(helper.Request("nodeID"))).Text;
- auditLog.DataSource = Services.AuditService.GetLogs(int.Parse(Request["nodeID"]));
- auditLog.DataBind();
- auditLog.BorderWidth = 0;
- auditLog.BorderStyle = BorderStyle.None;
- }
-
- public string FormatAction(string action)
- {
- action = action.ToLower();
- if (action == "new")
- action = "create";
- var actions = Current.Actions;
- foreach (var a in actions)
- {
- return Services.TextService.Localize(action);
- }
- return action;
- }
-
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
-
- }
- #endregion
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs
deleted file mode 100644
index fa69f92d4e..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/viewAuditTrail.aspx.designer.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.presentation.umbraco.dialogs {
-
-
- public partial class viewAuditTrail {
-
- ///
- /// auditLog control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.DataGrid auditLog;
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx
deleted file mode 100644
index 0c98313e1e..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DictionaryItemList.aspx.cs"
- Inherits="umbraco.presentation.settings.DictionaryItemList" MasterPageFile="../masterpages/umbracoPage.Master" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %>
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs
deleted file mode 100644
index a80e25840f..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Umbraco.Core;
-using Umbraco.Core.Models;
-using Umbraco.Web.Composing;
-
-namespace umbraco.presentation.settings {
-
- [WebformsPageTreeAuthorize(Constants.Trees.Dictionary)]
- public partial class DictionaryItemList : Umbraco.Web.UI.Pages.UmbracoEnsuredPage {
-
-
- private readonly ILanguage[] _languages = Current.Services.LocalizationService.GetAllLanguages().ToArray();
-
-
- protected void Page_Load(object sender, EventArgs e) {
-
-
- string header = "Key ";
- foreach (var lang in _languages) {
- header += "" + lang.CultureName + " ";
- }
- header += " ";
-
- lt_table.Text = header;
-
- lt_table.Text += "";
-
- ProcessKeys(Services.LocalizationService.GetRootDictionaryItems(), 0);
-
- lt_table.Text += " ";
-
- }
-
- private void ProcessKeys(IEnumerable dictionaryItems, int level) {
-
- string style = "style='padding-left: " + level * 10 + "px;'";
-
- foreach (var di in dictionaryItems) {
- lt_table.Text += "" + di.ItemKey + " ";
-
- foreach (var lang in _languages) {
- lt_table.Text += "";
-
- var trans = di.Translations.FirstOrDefault(x => x.LanguageId == lang.Id);
-
- if (trans == null || string.IsNullOrEmpty(trans.Value))
- lt_table.Text += " ";
- else
- lt_table.Text += " ";
-
- lt_table.Text += " ";
- }
- lt_table.Text += " ";
-
- var children = Services.LocalizationService.GetDictionaryItemChildren(di.Key);
- if (children.Any())
- ProcessKeys(children, (level+1));
- }
-
- }
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs
deleted file mode 100644
index 638daa75b9..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.presentation.settings {
-
-
- public partial class DictionaryItemList {
-
- ///
- /// Panel1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
-
- ///
- /// pane1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.Pane pane1;
-
- ///
- /// lt_table control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal lt_table;
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx
deleted file mode 100644
index 320a9dcd18..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx
+++ /dev/null
@@ -1,15 +0,0 @@
-<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="Umbraco.Web" %>
-<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
-
-<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
- CodeBehind="EditDictionaryItem.aspx.cs" AutoEventWireup="True" Inherits="umbraco.settings.EditDictionaryItem" %>
-
-
-
-
-
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
deleted file mode 100644
index 76ee437bb3..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-using System;
-using System.Linq;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using umbraco.cms.presentation.Trees;
-using Umbraco.Core;
-using Umbraco.Core.Models;
-using Umbraco.Core.Models.Membership;
-using Umbraco.Core.Services;
-using Umbraco.Web;
-using Umbraco.Web.Composing;
-using Umbraco.Web.UI;
-
-namespace umbraco.settings
-{
- ///
- /// Summary description for EditDictionaryItem.
- ///
- [WebformsPageTreeAuthorize(Constants.Trees.Dictionary)]
- public partial class EditDictionaryItem : Umbraco.Web.UI.Pages.UmbracoEnsuredPage
- {
- protected LiteralControl keyTxt = new LiteralControl();
- protected Umbraco.Web._Legacy.Controls.TabView tbv = new Umbraco.Web._Legacy.Controls.TabView();
- private System.Collections.ArrayList languageFields = new System.Collections.ArrayList();
- private IDictionaryItem currentItem;
- protected TextBox boxChangeKey;
- protected Label labelChangeKey;
- protected Literal txt;
-
- protected void Page_Load(object sender, System.EventArgs e)
- {
- currentItem = Services.LocalizationService.GetDictionaryItemById(int.Parse(Request.QueryString["id"]));
-
- // Put user code to initialize the page here
- Panel1.hasMenu = true;
- Panel1.Text = Services.TextService.Localize("editdictionary") + ": " + currentItem.ItemKey;
-
- var save = Panel1.Menu.NewButton();
- save.Text = Services.TextService.Localize("save");
- save.Click += save_Click;
- save.ToolTip = Services.TextService.Localize("save");
- save.ID = "save";
- save.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
-
- var p = new Umbraco.Web._Legacy.Controls.Pane();
-
- boxChangeKey = new TextBox
- {
- ID = "changeKey-" + currentItem.Id,
- CssClass = "umbEditorTextField",
- Text = currentItem.ItemKey
- };
-
- labelChangeKey = new Label
- {
- ID = "changeKeyLabel",
- CssClass = "text-error"
- };
-
- p.addProperty(new Literal
- {
- Text = "" + Services.TextService.Localize("dictionaryItem/changeKey") + "
"
- });
- p.addProperty(boxChangeKey);
- p.addProperty(labelChangeKey);
-
-
- txt = new Literal();
- txt.Text = "" + Services.TextService.Localize("dictionaryItem/description", new[] { currentItem.ItemKey }) + "
";
- p.addProperty(txt);
-
- foreach (var l in Current.Services.LocalizationService.GetAllLanguages())
- {
-
- TextBox languageBox = new TextBox();
- languageBox.TextMode = TextBoxMode.MultiLine;
- languageBox.ID = l.Id.ToString();
- languageBox.CssClass = "umbEditorTextFieldMultiple";
-
- if (!IsPostBack)
- {
- languageBox.Text = currentItem.GetTranslatedValue(l.Id);
- }
-
- languageFields.Add(languageBox);
- p.addProperty(l.CultureName, languageBox);
-
- }
-
-
- if (!IsPostBack)
- {
- var path = BuildPath(currentItem);
- ClientTools
- .SyncTree(path, false);
- }
-
- Panel1.Controls.Add(p);
- }
-
- private string BuildPath(IDictionaryItem current)
- {
- var parentPath = current.ParentId.HasValue == false ? "" : BuildPath(current) + ",";
- return parentPath + current.Id;
- }
-
- void save_Click(object sender, EventArgs e)
- {
- labelChangeKey.Text = ""; // reset error text
- var newKey = boxChangeKey.Text;
- var save = true;
- if (string.IsNullOrWhiteSpace(newKey) == false && newKey != currentItem.ItemKey)
- {
- if (Services.LocalizationService.DictionaryItemExists(newKey))
- {
- // reject
- labelChangeKey.Text = Services.TextService.Localize("dictionaryItem/changeKeyError", newKey);
- boxChangeKey.Text = currentItem.ItemKey; // reset key
- save = false;
- }
- else
- {
- // update key
- currentItem.ItemKey = newKey;
-
- // update title
- Panel1.title.InnerHtml = Services.TextService.Localize("editdictionary") + ": " + newKey;
-
- // sync the content tree
- var path = BuildPath(currentItem);
- ClientTools.SyncTree(path, true);
- }
- }
-
- if (save)
- {
- foreach (TextBox t in languageFields)
- {
- //check for null but allow empty string!
- // http://issues.umbraco.org/issue/U4-1931
- if (t.Text != null)
- {
- Services.LocalizationService.AddOrUpdateDictionaryValue(
- currentItem,
- Services.LocalizationService.GetLanguageById(int.Parse(t.ID)),
- t.Text);
- }
- }
-
- Services.LocalizationService.Save(currentItem);
- ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, Services.TextService.Localize("speechBubbles/dictionaryItemSaved"), "");
- }
-
- txt.Text = "" + Services.TextService.Localize("dictionaryItem/description", currentItem.ItemKey) + "
";
- }
-
- #region Web Form Designer generated code
-
- override protected void OnInit(EventArgs e)
- {
- InitializeComponent();
- base.OnInit(e);
- }
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- }
-
- #endregion
- }
-}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs
deleted file mode 100644
index db9c54c1d0..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.settings {
-
-
- public partial class EditDictionaryItem {
-
- ///
- /// Panel1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
- }
-}