Merge pull request #2838 from umbraco/temp8-bye-umbraco_client

Bye umbraco_client
This commit is contained in:
Warren Buckley
2018-08-07 10:09:36 +01:00
committed by GitHub
110 changed files with 503 additions and 8980 deletions
@@ -272,7 +272,7 @@ AnotherContentFinder
public void Resolves_Actions()
{
var actions = _typeLoader.GetActions();
Assert.AreEqual(35, actions.Count());
Assert.AreEqual(34, actions.Count());
}
[Test]
@@ -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")]
@@ -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)]
+37 -33
View File
@@ -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": {
+11 -5
View File
@@ -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;
}
@@ -0,0 +1,24 @@
<div ng-controller="Umbraco.Editors.Content.AssignDomainController as vm">
<div class="umb-dialog-body">
<umb-pane>
<p>UI magic to be done...</p>
</umb-pane>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<umb-button
label-key="general_cancel"
action="vm.closeDialog()"
type="button"
button-style="link">
</umb-button>
<umb-button
label-key="buttons_save"
type="button"
button-style="success">
</umb-button>
</div>
</div>
@@ -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);
})();
@@ -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);
})();
@@ -0,0 +1,89 @@
<div ng-controller="Umbraco.Editors.Content.SortController as vm" ng-cloak>
<div class="umb-dialog-body with-footer">
<div class="umb-pane">
<div ng-if="vm.error">
<div class="alert alert-error">
<div>{{vm.error.errorMsg}}</div>
</div>
</div>
<umb-load-indicator
ng-show="vm.loading">
</umb-load-indicator>
<div ng-if="!vm.loading">
<p class="abstract"><localize key="sort_sortHelp"></localize></p>
<table class="table table-condensed table-sortable" ng-if="vm.children">
<thead>
<tr>
<th>
<a ng-href="#" ng-click="vm.sort('name')" prevent-default>
<localize key="general_name"></localize>
<span ng-if="vm.sortOrder.column === 'name'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
<th>
<a ng-href="#" ng-click="vm.sort('createDate')" prevent-default>
<localize key="sort_sortCreationDate"></localize>
<span ng-if="vm.sortOrder.column === 'createDate'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
<th>
<a ng-href="#" ng-click="vm.sort('sortOrder')" prevent-default>
<localize key="sort_sortOrder"></localize>
<span ng-if="vm.sortOrder.column === 'sortOrder'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
</tr>
</thead>
<tbody ui-sortable="vm.sortableOptions" ng-model="vm.children">
<tr ng-repeat="child in vm.children">
<td>{{ child.name }}</td>
<td>{{ child.createDate }}</td>
<td>{{ child.sortOrder }}</td>
</tr>
</tbody>
</table>
<umb-empty-state
ng-if="!vm.children"
position="center">
<localize key="sort_sortEmptyState"></localize>
</umb-empty-state>
</div>
</div>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<umb-button
type="button"
button-style="link"
action="nav.hideDialog()"
label-key="general_close">
</umb-button>
<umb-button
ng-if="vm.children"
type="button"
action="vm.save()"
state="vm.saveButtonState"
button-style="success"
label-key="buttons_save">
</umb-button>
</div>
</div>
@@ -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);
})();
@@ -0,0 +1,88 @@
<div ng-controller="Umbraco.Editors.Media.SortController as vm" ng-cloak>
<div class="umb-dialog-body with-footer">
<div class="umb-pane">
<div ng-if="vm.error">
<div class="alert alert-error">
<div>{{vm.error.errorMsg}}</div>
</div>
</div>
<umb-load-indicator
ng-show="vm.loading">
</umb-load-indicator>
<div ng-if="!vm.loading">
<p class="abstract"><localize key="sort_sortHelp"></localize></p>
<table class="table table-condensed table-sortable" ng-if="vm.children">
<thead>
<tr>
<th>
<a ng-href="#" ng-click="vm.sort('name')" prevent-default>
<localize key="general_name"></localize>
<span ng-if="vm.sortOrder.column === 'name'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
<th>
<a ng-href="#" ng-click="vm.sort('createDate')" prevent-default>
<localize key="sort_sortCreationDate"></localize>
<span ng-if="vm.sortOrder.column === 'createDate'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
<th>
<a ng-href="#" ng-click="vm.sort('sortOrder')" prevent-default>
<localize key="sort_sortOrder"></localize>
<span ng-if="vm.sortOrder.column === 'sortOrder'">
<i ng-if="vm.sortOrder.reverse" class="icon-navigation-up"></i>
<i ng-if="!vm.sortOrder.reverse" class="icon-navigation-down"></i>
</span>
</a>
</th>
</tr>
</thead>
<tbody ui-sortable="vm.sortableOptions" ng-model="vm.children">
<tr ng-repeat="child in vm.children">
<td>{{ child.name }}</td>
<td>{{ child.createDate }}</td>
<td>{{ child.sortOrder }}</td>
</tr>
</tbody>
</table>
<umb-empty-state
ng-if="!vm.children"
position="center">
<localize key="sort_sortEmptyState"></localize>
</umb-empty-state>
</div>
</div>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<umb-button
type="button"
button-style="link"
action="nav.hideDialog()"
label-key="general_close">
</umb-button>
<umb-button
ng-if="vm.children"
type="button"
action="vm.save()"
state="vm.saveButtonState"
button-style="success"
label-key="buttons_save">
</umb-button>
</div>
</div>
-59
View File
@@ -180,14 +180,6 @@
<Compile Include="Umbraco\Dialogs\ChangeDocType.aspx.designer.cs">
<DependentUpon>ChangeDocType.aspx</DependentUpon>
</Compile>
<Compile Include="Umbraco\dialogs\Sort.aspx.cs">
<DependentUpon>sort.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\dialogs\Sort.aspx.designer.cs">
<DependentUpon>sort.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\Masterpages\Default.Master.cs">
<DependentUpon>default.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -348,31 +340,8 @@
<Content Include="Umbraco\Dialogs\ChangeDocType.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="Umbraco_Client\Application\Extensions.js" />
<Content Include="Umbraco_Client\Application\JQuery\jquery.validate.min.js" />
<Content Include="Umbraco_Client\Application\JQuery\jquery.validate.unobtrusive.min.js" />
<Content Include="Umbraco_Client\Dialogs\SortDialog.css" />
<Content Include="Umbraco_client\Dialogs\SortDialog.js" />
<Content Include="Umbraco_Client\Dialogs\AssignDomain2.js" />
<Content Include="Umbraco_Client\Dialogs\AssignDomain2.css" />
<Content Include="Umbraco_Client\Dialogs\UmbracoField.js" />
<Content Include="Umbraco_Client\PunyCode\punycode.min.js" />
<Content Include="Umbraco_Client\Splitbutton\InsertMacroSplitButton.js" />
<Content Include="Umbraco_Client\Tablesorting\img\asc.gif" />
<Content Include="Umbraco_Client\Tablesorting\img\desc.gif" />
<Content Include="Umbraco_Client\Tablesorting\jquery.tablesorter.min.js" />
<Content Include="Umbraco_Client\Splitbutton\jquery.splitbutton.js" />
<Content Include="Umbraco_Client\Application\JQuery\jquery.hotkeys.js" />
<Content Include="Umbraco_Client\Splitbutton\Images\splitbutton_hover.png" />
<Content Include="Umbraco_Client\Splitbutton\Images\splitbutton_downarrow.png" />
<Content Include="Umbraco_Client\Splitbutton\splitbutton.css" />
<Content Include="Umbraco_Client\Modal\jquery.simplemodal.1.4.1.custom.js" />
<Content Include="Umbraco\Config\Lang\ko.xml" />
<Content Include="Umbraco\Dashboard\FeedProxy.aspx" />
<Content Include="Umbraco_Client\Ui\base2.js" />
<Content Include="Umbraco_Client\Ui\json2.js" />
<Content Include="Umbraco_Client\Ui\knockout.js" />
<Content Include="Umbraco_Client\Ui\knockout.mapping.js" />
<Content Include="Umbraco\endPreview.aspx" />
<Content Include="Umbraco\Dialogs\Preview.aspx" />
<Content Include="Umbraco\Controls\Tree\TreeControl.ascx" />
@@ -385,20 +354,10 @@
<Content Include="Umbraco\Config\Lang\nl.xml" />
<Content Include="Umbraco\Config\Lang\nb.xml" />
<Content Include="Umbraco\Config\Lang\sv.xml" />
<Content Include="Umbraco_Client\Application\JQuery\jquery.cookie.js" />
<Content Include="Umbraco_Client\Tablesorting\Img\bg.gif" />
<Content Include="Umbraco\Dialogs\empty.htm" />
<Content Include="Umbraco\Dialogs\republish.aspx" />
<Content Include="Umbraco\Dialogs\SendPublish.aspx" />
<Content Include="Umbraco_Client\Application\JQuery\jquery-fieldselection.js" />
<Content Include="Umbraco_Client\Application\JQuery\jquery.metadata.min.js" />
<Content Include="Umbraco_Client\Application\UmbracoUtils.js" />
<Content Include="Umbraco_Client\Application\UmbracoApplicationActions.js" />
<Content Include="Umbraco_Client\Application\UmbracoClientManager.js" />
<Content Include="Umbraco_Client\Application\NamespaceManager.js" />
<Content Include="Umbraco\Translation\details.aspx" />
<Content Include="Umbraco_Client\Modal\modalBackground.gif" />
<Content Include="Umbraco_Client\Modal\modalGradiant.gif" />
<Content Include="Umbraco\Developer\Packages\directoryBrowser.aspx" />
<Content Include="Umbraco\Developer\Packages\editPackage.aspx" />
<Content Include="Umbraco\Dialogs\create.aspx" />
@@ -408,8 +367,6 @@
<Content Include="Umbraco\Dialogs\rollBack.aspx" />
<Content Include="Umbraco\Dialogs\sendToTranslation.aspx" />
<Content Include="Umbraco\Dialogs\treePicker.aspx" />
<Content Include="Umbraco\Dialogs\umbracoField.aspx" />
<Content Include="Umbraco\Dialogs\viewAuditTrail.aspx" />
<Content Include="Umbraco\Config\Create\UI.xml" />
<Content Include="Umbraco\Config\Lang\en.xml">
<SubType>Designer</SubType>
@@ -500,7 +457,6 @@
<Content Include="Umbraco\Masterpages\umbracoPage.Master" />
<Content Include="Umbraco\Masterpages\umbracoDialog.Master" />
<Content Include="Umbraco\Webservices\CheckForUpgrade.asmx" />
<Content Include="Umbraco\Settings\DictionaryItemList.aspx" />
<Content Include="Umbraco\Translation\default.aspx" />
<Content Include="Umbraco\Translation\preview.aspx" />
<Content Include="Umbraco\Translation\xml.aspx" />
@@ -512,27 +468,12 @@
<Content Include="Umbraco\ping.aspx">
<SubType>Form</SubType>
</Content>
<Content Include="Umbraco\Settings\EditDictionaryItem.aspx" />
<Content Include="Umbraco\Dialogs\sort.aspx" />
<Content Include="Umbraco\treeInit.aspx" />
<!--<Content Include="Umbraco\users\PermissionEditor.aspx" />-->
<Content Include="Umbraco\Webservices\ajax.js" />
<Content Include="Umbraco\Webservices\codeEditorSave.asmx" />
<Content Include="Umbraco\Webservices\legacyAjaxCalls.asmx" />
<Content Include="Umbraco\Webservices\nodeSorter.asmx" />
<Content Include="Umbraco_Client\Menuicon\Images\buttonbg.gif" />
<Content Include="Umbraco_Client\Menuicon\Images\buttonbgdown.gif" />
<Content Include="Umbraco_Client\Menuicon\Images\split.gif" />
<Content Include="Umbraco_Client\Menuicon\style.css" />
<Content Include="Umbraco_Client\Modal\modal.js" />
<Content Include="Umbraco_Client\Modal\style.css" />
<Content Include="Umbraco_Client\Scrollingmenu\javascript.js" />
<Content Include="Umbraco_Client\Scrollingmenu\style.css" />
<Content Include="Umbraco_Client\Tablesorting\tableDragAndDrop.js" />
<Content Include="Umbraco_Client\Ui\default.css" />
<Content Include="Umbraco_Client\Ui\default.js" />
<Content Include="Umbraco_Client\Ui\jquery.js" />
<Content Include="Umbraco_Client\Ui\jqueryui.js" />
<Content Include="App_Browsers\w3cvalidator.browser" />
<Content Include="App_Browsers\Form.browser" />
<Content Include="Umbraco\Masterpages\default.Master" />
@@ -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 @@
<button>Save</button>
</fieldset>
}
}
}
@@ -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 @@
<button>Login</button>
</fieldset>
}
}
@@ -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)
}
}
}
@@ -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;
}
@@ -1368,6 +1368,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="sortDone">Sorting complete.</key>
<key alias="sortHelp">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</key>
<key alias="sortPleaseWait"><![CDATA[Please wait. Items are being sorted, this can take a while.]]></key>
<key alias="sortEmptyState">This node has no child nodes to sort</key>
</area>
<area alias="speechBubbles">
<key alias="validationFailedHeader">Validation</key>
@@ -12,13 +12,7 @@
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="assets/css/umbraco.css" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Application/NamespaceManager.js" PathNameAlias="UmbracoClient" Priority="0" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="1" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="lib/jquery-migrate/jquery-migrate.min.js" PathNameAlias="UmbracoRoot" Priority="1" />
<umb:JsInclude ID="JsInclude6" runat="server" FilePath="ui/base2.js" PathNameAlias="UmbracoClient" Priority="1" />
<umb:JsInclude ID="JsInclude11" runat="server" FilePath="UI/knockout.js" PathNameAlias="UmbracoClient" Priority="3" />
<umb:JsInclude ID="JsInclude12" runat="server" FilePath="UI/knockout.mapping.js" PathNameAlias="UmbracoClient" Priority="4" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="5" />
</head>
<body style="overflow: scroll">
@@ -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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Dashboard {
public partial class UserControlProxy {
/// <summary>
/// ClientLoader control.
/// </summary>
@@ -20,7 +20,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web.UI.JavaScript.UmbracoClientDependencyLoader ClientLoader;
/// <summary>
/// CssInclude1 control.
/// </summary>
@@ -29,7 +29,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.CssInclude CssInclude1;
/// <summary>
/// JsInclude1 control.
/// </summary>
@@ -38,16 +38,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;
/// <summary>
/// JsInclude4 control.
/// </summary>
@@ -56,43 +47,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude6 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude6;
/// <summary>
/// JsInclude11 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude11;
/// <summary>
/// JsInclude12 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude12;
/// <summary>
/// JsInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude2;
/// <summary>
/// form1 control.
/// </summary>
@@ -101,7 +56,7 @@ namespace Umbraco.Web.UI.Umbraco.Dashboard {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// container control.
/// </summary>
@@ -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)
@@ -6,7 +6,7 @@
<asp:Content ContentPlaceHolderID="head" runat="server">
<umb:JsInclude runat="server" FilePath="Dialogs/AssignDomain2.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="PunyCode/punycode.min.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="Application/JQuery/jquery.validate.min.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="/Umbraco/lib/jquery-validate/jquery.validate.min.js" PathNameAlias="UmbracoClient" />
<umb:CssInclude runat="server" FilePath="Dialogs/AssignDomain2.css" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
(function ($) {
@@ -76,4 +76,4 @@
<button class="btn btn-primary" id="btnSave"><%=Services.TextService.Localize("buttons/save") %></button>
</div>
</asp:Content>
</asp:Content>
@@ -1,11 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Umbraco.Web.UI.Umbraco.Dialogs
{
public partial class Sort : global::umbraco.cms.presentation.sort
{
}
}
-33
View File
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Dialogs {
public partial class Sort {
/// <summary>
/// CssInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.CssInclude CssInclude1;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;
}
}
@@ -1,4 +1,5 @@
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.presentation.umbraco.dialogs.protectPage" %>
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
@@ -1,86 +0,0 @@
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="sort.aspx.cs" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Dialogs.Sort" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ 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" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="Dialogs/SortDialog.css" PathNameAlias="UmbracoClient"></umb:CssInclude>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="Dialogs/SortDialog.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tablesorting/jquery.tablesorter.min.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="tablesorting/tableDragAndDrop.js" PathNameAlias="UmbracoClient" />
<div class="umb-dialog-body">
<cc1:Pane runat="server">
<div id="loading" style="display: none; margin-bottom: 35px;">
<div class="notice">
<p><%= Services.TextService.Localize("sort/sortPleaseWait") %></p>
</div>
<div class="umb-loader-wrapper">
<cc1:ProgressBar ID="prog1" runat="server" Title="sorting.." />
</div>
</div>
<div id="sortingDone" style="display: none;" class="success">
<p>
<asp:Literal runat="server" ID="sortDone"></asp:Literal>
</p>
<p>
<a href="#" onclick="UmbClientMgr.closeModalWindow()"><%= Services.TextService.Localize("defaultdialogs/closeThisWindow")%></a>
</p>
</div>
<div id="sortArea">
<p class="help">
<%= Services.TextService.Localize("sort/sortHelp") %>
</p>
<div id="sortableFrame">
<table id="sortableNodes">
<thead>
<tr>
<th style="width: 100%"><%= Services.TextService.Localize("general/name") %></th>
<th class="nowrap" style="display: <%= HideDateColumn ? "none" : "table-cell" %>;"><%= Services.TextService.Localize("sort/sortCreationDate") %></th>
<th class="nowrap"><%= Services.TextService.Localize("sort/sortOrder") %></th>
</tr>
</thead>
<tbody>
<asp:Literal ID="lt_nodes" runat="server" />
</tbody>
</table>
</div>
</div>
</cc1:Pane>
</div>
<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<a id="closeWindowButton" href="#" class="btn btn-link"><%=Services.TextService.Localize("general/cancel")%></a>
<input id="submitButton" type="button" class="btn btn-primary" value="<%=Services.TextService.Localize("save") %>" />
</div>
<script type="text/javascript">
jQuery(document).ready(function () {
var sortDialog = new Umbraco.Dialogs.SortDialog({
submitButton: jQuery("#submitButton"),
closeWindowButton: jQuery("#closeWindowButton"),
dateTimeFormat: "<%=CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern%> <%=CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern%>",
currentId: "<%=Request.CleanForXss("ID")%>",
serviceUrl: "<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/WebServices/NodeSorter.asmx/UpdateSortOrder?app=<%=Request.CleanForXss("app")%>"
});
sortDialog.init();
});
</script>
</asp:Content>
@@ -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" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
(function($) {
$(document).ready(function() {
var umbracoField = new Umbraco.Dialogs.UmbracoField({
cancelButton: $("#cancelButton"),
submitButton: $("#submitButton"),
form: document.forms[0],
tagName: document.forms[0].<%= tagName.ClientID %>.value,
objectId: '<%=Request.CleanForXss("objectId")%>'
});
umbracoField.init();
});
})(jQuery);
var functionsFrame = this;
var tabFrame = this;
var isDialog = true;
var submitOnEnter = true;
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="js/umbracoCheckKeys.js" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="Dialogs/UmbracoField.js" PathNameAlias="UmbracoClient" />
<div class="umb-panel umb-modal">
<div class="umb-panel-body no-header with-footer">
<input type="hidden" name="tagName" runat="server" id="tagName" value="?UMBRACO_GETITEM" />
<cc1:Pane ID="pane_form" runat="server" Title="Choose value">
<cc1:PropertyPanel ID="pp_insertField" runat="server">
<cc1:FieldDropDownList ID="fieldPicker" Width="170px" Rows="1" runat="server"></cc1:FieldDropDownList>
<input type="text" size="25" name="field" class="guiInputTextTiny"/>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_insertAltField" runat="server">
<cc1:FieldDropDownList ID="altFieldPicker" Width="170px" Rows="1" runat="server"></cc1:FieldDropDownList>
<input type="text" size="25" name="useIfEmpty" class="guiInputTextTiny"/><br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/usedIfEmpty")%></span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_insertAltText" runat="server">
<textarea rows="1" style="width: 310px;" name="alternativeText" class="guiInputTextTiny"></textarea><br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/usedIfAllEmpty")%></span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_recursive" runat="server">
<input type="checkbox" name="recursive" value="true"/> <%=Services.TextService.Localize("templateEditor/recursive")%>
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane runat="server" Title="Format and encoding">
<cc1:PropertyPanel ID="pp_FormatAsDate" runat="server">
<input type="radio" name="formatAsDate" value="formatAsDate"/>
<%=Services.TextService.Localize("templateEditor/dateOnly")%>
&nbsp; &nbsp;
<input type="radio" name="formatAsDate" value="formatAsDateWithTime"/>
<%=Services.TextService.Localize("templateEditor/withTime")%>
<input type="text" size="6" name="formatAsDateWithTimeSeparator" style="width: 35px" class="guiInputTextTiny"/>
<br />
<span class="guiDialogTiny">Format the value as a date, or a date with time, accoring to the active culture.</span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_casing" runat="server">
<input type="radio" name="toCase" value=""/>
<%=Services.TextService.Localize("templateEditor/none")%>
<input type="radio" name="toCase" value="lower"/>
<%=Services.TextService.Localize("templateEditor/lowercase")%>
<input type="radio" name="toCase" value="upper"/>
<%=Services.TextService.Localize("templateEditor/uppercase")%>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_encode" runat="server">
<input type="radio" name="urlEncode" value=""/>
<%=Services.TextService.Localize("none")%>
<input type="radio" name="urlEncode" value="url"/>
<%=Services.TextService.Localize("templateEditor/urlEncode")%>
<input type="radio" name="urlEncode" value="html"/>
<%=Services.TextService.Localize("templateEditor/htmlEncode")%>
<br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/urlEncodeHelp")%>
</span>
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane runat="server" Title="Modify output">
<cc1:PropertyPanel ID="pp_insertBefore" runat="server">
<input type="text" size="40" name="insertTextBefore" class="guiInputTextTiny"/><br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/insertedBefore")%>
</span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_insertAfter" runat="server">
<input type="text" size="40" name="insertTextAfter" class="guiInputTextTiny"/><br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/insertedAfter")%>
</span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_convertLineBreaks" runat="server">
<input type="checkbox" name="convertLineBreaks" value="true"/> <%=Services.TextService.Localize("templateEditor/convertLineBreaks")%>
<br />
<span class="guiDialogTiny">
<%=Services.TextService.Localize("templateEditor/convertLineBreaksHelp")%>
</span>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_removePTags" runat="server">
<input type="checkbox" name="stripParagraph" value="true"/> <%=Services.TextService.Localize("templateEditor/removeParagraph")%>
<br />
<span class="guiDialogTiny"><%=Services.TextService.Localize("templateEditor/removeParagraphHelp")%>
</span>
</cc1:PropertyPanel>
</cc1:Pane>
</div>
<div class="umb-panel-footer">
<div class="btn-toolbar umb-btn-toolbar">
<a id="cancelButton" href="#" class="btn btn-link">
<%=Services.TextService.Localize("general/cancel")%></a>
<input id="submitButton" type="button" name="gem" class="btn btn-primary" value="<%=Services.TextService.Localize("insert")%>" />
</div>
</div>
</div>
</asp:Content>
@@ -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" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.gridHeader{border-bottom:2px solid #D9D7D7;}
.gridItem{border-color: #D9D7D7;}
html, body {overflow: initial;}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:Pane runat="server">
<div id="auditTrailList">
<asp:DataGrid ID="auditLog" runat="server" BorderStyle="None" HeaderStyle-CssClass="gridHeader" ItemStyle-CssClass="gridItem" GridLines="Horizontal" HeaderStyle-Font-Bold="True" AutoGenerateColumns="False"
width="100%">
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<b>
<%=Services.TextService.Localize("action")%>&nbsp;&nbsp;
</b>
</HeaderTemplate>
<ItemTemplate>
<%# FormatAction(DataBinder.Eval(Container.DataItem, "LogType", "{0}")) %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderTemplate>
<b>
<%=Services.TextService.Localize("user")%>
</b>
</HeaderTemplate>
<ItemTemplate>
<%--TODO: N+1 !!!!!!!!!!!!--%>
<%# Services.UserService.GetUserById(int.Parse(DataBinder.Eval(Container.DataItem, "UserId", "{0}"))).Name%>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderTemplate>
<b>
<%=Services.TextService.Localize("date")%>
</b>
</HeaderTemplate>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Timestamp", "{0:D} {0:T}") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderTemplate>
<b>
<%=Services.TextService.Localize("comment")%>
</b>
</HeaderTemplate>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Comment", "{0}") %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
</div>
</cc1:Pane>
</asp:Content>
@@ -20,10 +20,7 @@
<umbClient:JsApplicationLib runat="server" />
<umbClient:JsJQueryCore runat="server" />
<umbClient:JsUmbracoApplicationCore runat="server" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="5" />
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
@@ -20,9 +20,6 @@
<umbClient:JsUmbracoApplicationCore runat="server"/>
<umbClient:JsJQueryPlugins runat="server"/>
<umb:JsInclude ID="JsInclude7" runat="server" FilePath="modal/modal.js" PathNameAlias="UmbracoClient" Priority="10" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="10" />
<umb:JsInclude ID="JsIncludeHotkeys" runat="server" FilePath="Application/jQuery/jquery.hotkeys.js" PathNameAlias="UmbracoClient" Priority="10" />
<umb:JsInclude runat="server" FilePath="lib/bootstrap/js/bootstrap.2.3.2.min.js" PathNameAlias="UmbracoRoot" Priority="10" />
<umb:JsInclude runat="server" FilePath="lib/umbraco/compat.js" PathNameAlias="UmbracoRoot" Priority="10" />
@@ -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" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Dictionary overview" Width="408px" Height="264px">
<cc1:Pane ID="pane1" runat="server">
<table id="dictionaryItems" style="width: 100%;">
<asp:Literal ID="lt_table" runat="server" />
</table>
</cc1:Pane>
</cc1:UmbracoPanel>
</asp:Content>
@@ -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" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="408px" Height="264px">
</cc1:UmbracoPanel>
<script type="text/javascript">
jQuery(document).ready(function () {
UmbClientMgr.appActions().bindSaveShortCut();
});
</script>
</asp:Content>
@@ -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 () {
///<summary>generates a new Guid</summary>
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) {
///<summary>global method to send debug statements to console that is cross browser (or at least checks if its possible)</summary>
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) {
///<summary>startsWith extension method for string</summary>
return this.substr(0, str.length) === str;
};
}
if (!String.prototype.endsWith) {
String.prototype.endsWith = function (str) {
///<summary>endsWith extension method for string</summary>
return this.substr(this.length - str.length) === str;
};
}
if (!String.prototype.utf8Encode) {
String.prototype.utf8Encode = function () {
///<summary>UTF8 encoder for string</summary>
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 () {
///<summary>Base64 encoder for string</summary>
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 () {
///<summary>Base64 decoder for string</summary>
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) {
///<summary>randomRange extension for math</summary>
return Math.floor(Math.random() * (to - from + 1) + from);
};
}
if (!String.prototype.toCamelCase) {
String.prototype.toCamelCase = function () {
///<summary>toCamelCase extension method for string</summary>
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 () {
///<summary>toPascalCase extension method for string</summary>
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 () {
///<summary>///<summary>toUmbracoAlias extension method for string</summary></summary>
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("<body");
var endIndex = x.responseText.lastIndexOf("</body>");
var body = x.responseText.substring(startIndex, endIndex + 7);
var $div = $(body.replace("<body bgcolor=\"white\">", "<div style='display:none;overflow:auto;height:613px;'>").replace("</body>", "</div>"));
$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 () {
///<summary>extension method to get all attributes of a selected element</summary>
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 () {
///<summary>extension to get the 'outer html' of an element</summary>
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 () {
///<summary>extension to focus the first editable field in a form</summary>
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 () {
///<summary>Extension method to return all of the attributes for an element</summary>
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);
@@ -1,83 +0,0 @@
//
// jQuery plugin: fieldSelection - v0.1.0 - last change: 2006-12-16
// (c) 2006 Alex Brem <alex@0xab.cd> - 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; });
})();
@@ -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;
}
};
@@ -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 );
@@ -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);
File diff suppressed because one or more lines are too long
@@ -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("<li />").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);
@@ -1,17 +0,0 @@
if (typeof Umbraco == 'undefined') var Umbraco = {};
if (!Umbraco.Sys) Umbraco.Sys = {};
Umbraco.Sys.registerNamespace = function(namespace) {
/// <summary>
/// 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.
/// </summary>
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 + "={};");
}
};
@@ -1,372 +0,0 @@
Umbraco.Sys.registerNamespace("Umbraco.Application");
Umbraco.Application.Actions = function() {
/// <summary>
/// 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"
/// </summary>
return {
_utils: Umbraco.Utils, //alias to Umbraco Utils
_dialogWindow: null,
/// <field name="_dialogWindow">A reference to a dialog window to open, any action that doesn't open in an overlay, opens in a dialog</field>
_isDebug: false, //set to true to enable alert debugging
_windowTitle: " - Umbraco CMS - ",
_currApp: "",
_isSaving: "",
addEventHandler: function(fnName, fn) {
/// <summary>Adds an event listener to the event name event</summary>
if (typeof(jQuery) != "undefined") jQuery(window.top).bind(fnName, fn); //if there's no jQuery, there is no events
},
removeEventHandler: function(fnName, fn) {
/// <summary>Removes an event listener to the event name event</summary>
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() {
/// <summary>Launches the create content wizard</summary>
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) {
/// <summary>Changes the application</summary>
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) {
/// <summary>Opens the dialog window</summary>
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() {
/// <summary></summary>
UmbClientMgr.mainTree().toggleEditMode(true);
},
actionSort: function() {
/// <summary></summary>
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() {
/// <summary></summary>
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() {
/// <summary></summary>
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() {
/// <summary></summary>
UmbClientMgr.openModalWindow('dialogs/rollback.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_rollback'], true, 600, 550);
},
actionRefresh: function() {
/// <summary></summary>
//raise nodeRefresh event
jQuery(window.top).trigger("nodeRefresh", []);
},
actionNotify: function() {
/// <summary></summary>
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() {
/// <summary></summary>
},
actionPublish: function() {
/// <summary></summary>
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() {
/// <summary></summary>
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() {
/// <summary></summary>
UmbClientMgr.openModalWindow('dialogs/republish.aspx?rnd=' + this._utils.generateRandom(), uiKeys['actions_republish'], true, 450, 210);
},
actionAssignDomain: function() {
/// <summary></summary>
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() {
/// <summary>Show the create new modal overlay</summary>
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() {
/// <summary></summary>
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() {
/// <summary></summary>
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() {
/// <summary></summary>
if (UmbClientMgr.mainTree().getActionNode().nodeType != '') {
UmbClientMgr.openModalWindow("dialogs/importDocumentType.aspx?rnd=" + this._utils.generateRandom(), uiKeys['actions_importDocumentType'], true, 460, 400);
}
},
actionAudit: function() {
/// <summary></summary>
UmbClientMgr.openModalWindow('dialogs/viewAuditTrail.aspx?nodeId=' + UmbClientMgr.mainTree().getActionNode().nodeId + '&rnd=' + this._utils.generateRandom(), uiKeys['actions_auditTrail'], true, 550, 500);
},
actionPackage: function() {
/// <summary></summary>
},
actionDelete: function() {
/// <summary></summary>
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);
}
}
};
};
@@ -1,257 +0,0 @@
Umbraco.Sys.registerNamespace("Umbraco.Application");
(function($) {
Umbraco.Application.ClientManager = function() {
/// <summary>
/// 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.
/// </summary>
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) {
/// <summary>
/// sets the Umbraco root path folder
/// </summary>
this._debug("setUmbracoPath: " + strPath);
this._rootPath = strPath;
},
mainWindow: function() {
/// <summary>
/// Returns a reference to the main frame of the application
/// </summary>
return top;
},
mainTree: function() {
/// <summary>
/// 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.
/// </summary>
/// <returns type="Umbraco.Controls.UmbracoTree" />
if (this._mainTree == null) {
this._mainTree = top.UmbClientMgr.mainTree();
}
return this._mainTree;
},
appActions: function() {
/// <summary>
/// Returns a reference to the application actions object
/// </summary>
//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() {
/// <summary>
/// Returns a reference to the main windows uiKeys object for globalization
/// </summary>
//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) {
/// <summary>
/// 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.
/// </summary>
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) {
/// <summary>
/// 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.
/// </summary>
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();
@@ -1,11 +0,0 @@
/// <reference path="../Application/NamespaceManager.js" />
Umbraco.Sys.registerNamespace("Umbraco.Utils");
Umbraco.Utils.generateRandom = function() {
/// <summary>Returns a random integer for use with URLs</summary>
var day = new Date();
var z = day.getTime();
var y = (z - (parseInt(z / 1000, 10) * 1000)) / 10;
return y;
}
@@ -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;
}
@@ -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);
@@ -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;
}
@@ -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);
@@ -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, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&gt;") + "\"";
if (insertTextAfter != "")
tagString += ", insertAfter: \"" + insertTextAfter.replace(/\"/gi, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&gt;") + "\"";
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, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&gt;") + '"';
if (insertTextAfter != '')
tagString += ' insertTextAfter="' + insertTextAfter.replace(/\"/gi, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&gt;") + '"';
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);
@@ -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);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

@@ -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;
}
@@ -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:'<a class="modalCloseImg" title="Close"></a>') 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: '<a class="modalCloseImg" title="Close"></a>',
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($('<span></span>')
.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 = $('<div></div>').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 = $('<iframe src="javascript:false;"></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 = $('<div></div>')
.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 = $('<div></div>')
.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 = $('<div></div>')
.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);
@@ -1,402 +0,0 @@
/// <reference path="../Application/NamespaceManager.js" />
Umbraco.Sys.registerNamespace("Umbraco.Controls");
(function($) {
$.fn.ModalWindowAPI = function() {
/// <summary>jQuery plugin exposes the modal window api for the selected object</summary>
//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) {
/// <summary>Shows a modal window based on existing content in the DOM</summary>
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) {
/// <summary>Shows a modal window based on existing content in the DOM</summary>
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 () {
/// <summary>
/// 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.
/// </summary>
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) {
/// <summary>Shows a modal window based on existing content in the DOM</summary>
//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) {
/// <summary>Shows a modal window with content specified in the url in an iframe</summary>
//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) {
/// <summary>Opens a modal window</summary>
/// <param name="top">Optional</param>
/// <param name="leftOffset">Optional</param>
/// <param name="closeTriggers">
/// Optional: An array of jQuery selectors that will trigger the modal window to close
/// </param>
/// <param name="onCloseCallback">
/// 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)
/// </param>
/// <returns>The generated jquery object bound to the modal window</returns>
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) {
/// <summary>Closes the modal window</summary>
/// <param name="rVal">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() {
/// <summary>Finalizes the objects counter and instance manager</summary>
//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) {
/// <summary>This will create the html elements required for the modal overlay if they do not already exist in the DOM</summary>
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 = "<div id=\"" + this._wId + "_modal\" class=\"umbModalBox\">" +
"<div class=\"umbModalBoxHeader\"></div><a href=\"#\" class=\"umbracModalBoxClose jqmClose\">&times;</a>" +
"<div class=\"umbModalBoxContent\">";
if (withIFrame) {
overlayHtml += "<iframe frameborder=\"0\" class=\"umbModalBoxIframe\" src=\"javascript:false;document.write(\'\');\"></iframe>";
}
overlayHtml += "</div></div>";
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 <bhb@iceburg.net>
// 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 = $('<div></div>').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('<span id="jqmP' + h.w[0]._jqm + '"></span>').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 = $('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({ opacity: 0 }),
e = function(h) { if (ie6) if (h.o) h.o.html('<p style="width:100%;height:100%"/>').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);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

@@ -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 }
@@ -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<this.buttons.length;i++)
this.buttons[i] = new buttonDef(Buttons[i]);
}
function buttonDef(Name) {
this.name = Name;
this.down = false;
}
function markIcon(elId, Button) {
theButton = GetButton(elId, Button);
document.getElementById(theButton.name).className = 'editorIconDown';
theButton.down = true;
}
function hoverIconOut(elId, Button) {
if(elId != "" && Button != "") {
theButton = GetButton(elId, Button);
if (theButton) {
if (theButton.down)
document.getElementById(theButton.name).className = 'editorIconDown';
else
document.getElementById(theButton.name).className = 'editorIcon';
} else
document.getElementById(theButton.name).className = 'editorIcon';
} else
document.getElementById(Button).className = 'editorIcon';
}
function resetIconState(elId) {
buttons = GetScrollingMenu(elId);
for(var x=0;x<buttons.length;x++) {
buttons[x].down = false;
if (buttons[x].name != "")
document.getElementById(buttons[x].name).className = 'editorIcon';
}
}
function GetButton(elId, Button) {
buttons = GetScrollingMenu(elId);
for(var x=0;x<buttons.length;x++) {
if (buttons[x].name == Button)
return buttons[x];
}
}
function GetScrollingMenu(elId) {
for(var i=0;i<scrollIcons.length;i++) {
if (scrollIcons[i].name == elId)
return scrollIcons[i].buttons;
}
}
function scrollR(elId, elHid, InnerWidth) {
doScroll = true;
el = document.getElementById(elId);
FromLeftMax = (InnerWidth - document.getElementById(elHid).offsetWidth)*-1;
scrollHorisontal(-1);
}
function scrollL(elId, elHid, InnerWidth) {
doScroll = true;
el = document.getElementById(elId);
var hiddenEl = document.getElementById(elHid);
if (hiddenEl) {
FromLeftMax = (InnerWidth - hiddenEl.offsetWidth) * -1;
scrollHorisontal(0);
}
}
function scrollStop() {
doScroll = false;
}
function scrollHorisontal(direction) {
var mv = -4;
if (direction < 0) mv = 4;
var slFromLeft = (parseInt(el.style.left)+mv);
if ((slFromLeft <= 0 && slFromLeft > FromLeftMax) && doScroll) {
el.style.left = slFromLeft +"px";
window.setTimeout("scrollHorisontal(" + direction + ");", 4);
}
}
@@ -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 {
}
@@ -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);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

@@ -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("&nbsp;");
} else {
var _d = _c.addClass("menu-item").html();
_c.empty().append($("<div class=\"menu-text\"></div>").html(_d));
var _e = _c.attr("iconCls") || _c.attr("icon");
if (_e) {
$("<div class=\"menu-icon\"></div>").addClass(_e).appendTo(_c);
}
if (_c[0].submenu) {
$("<div class=\"menu-rightarrow\"></div>").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 = $("<div class=\"menu-shadow\"></div>").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 = $("<div></div>");
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 = $("<div class=\"menu-item\"></div>").appendTo(_2e);
$("<div class=\"menu-text\"></div>").html(_2d.text).appendTo(_2f);
if (_2d.iconCls) {
$("<div class=\"menu-icon\"></div>").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 {
$("<div class=\"menu-icon\"></div>").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("<span class=\"l-btn-left\">" + "<span class=\"l-btn-text\">" + "</span>" + "</span>");
if (_3.iconCls) {
$(_2).find(".l-btn-text").addClass(_3.iconCls).css("padding-left", "20px");
}
} else {
$(_2).html("&nbsp;").wrapInner("<span class=\"l-btn-left\">" + "<span class=\"l-btn-text\">" + "<span class=\"l-btn-empty\"></span>" + "</span>" + "</span>");
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("<span class=\"s-btn-downarrow\">&nbsp;</span>");
$.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("<div id='" + containerId + "'><div id='" + innerId + "' style='position:relative;'></div></div>").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("<div id='" + buttonId + "' class='menudown'><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></div>").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)
});
}
}
@@ -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;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

File diff suppressed because one or more lines are too long
@@ -1,395 +0,0 @@
//
// TableDnD plug-in for JQuery, allows you to drag and drop table rows
// You can set up various options to control how the system will work
// Copyright (c) Denis Howlett <denish@isocra.com>
// 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
// <tableID>[]=<rowID1>&<tableID>[]=<rowID2> 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
}
);
File diff suppressed because it is too large Load Diff
@@ -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; }
@@ -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;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
var JSON; if (!JSON) { JSON = {} } (function () { function f(n) { return n < 10 ? "0" + n : n } if (typeof Date.prototype.toJSON !== "function") { Date.prototype.toJSON = function (key) { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function (key) { return this.valueOf() } } var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; function quote(string) { escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + string + '"' } function str(key, holder) { var i, k, v, length, mind = gap, partial, value = holder[key]; if (value && typeof value === "object" && typeof value.toJSON === "function") { value = value.toJSON(key) } if (typeof rep === "function") { value = rep.call(holder, key, value) } switch (typeof value) { case "string": return quote(value); case "number": return isFinite(value) ? String(value) : "null"; case "boolean": case "null": return String(value); case "object": if (!value) { return "null" } gap += indent; partial = []; if (Object.prototype.toString.apply(value) === "[object Array]") { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || "null" } v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]"; gap = mind; return v } if (rep && typeof rep === "object") { length = rep.length; for (i = 0; i < length; i += 1) { if (typeof rep[i] === "string") { k = rep[i]; v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } else { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}"; gap = mind; return v } } if (typeof JSON.stringify !== "function") { JSON.stringify = function (value, replacer, space) { var i; gap = ""; indent = ""; if (typeof space === "number") { for (i = 0; i < space; i += 1) { indent += " " } } else { if (typeof space === "string") { indent = space } } rep = replacer; if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) { throw new Error("JSON.stringify") } return str("", { "": value }) } } if (typeof JSON.parse !== "function") { JSON.parse = function (text, reviver) { var j; function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === "object") { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v } else { delete value[k] } } } } return reviver.call(holder, key, value) } text = String(text); cx.lastIndex = 0; if (cx.test(text)) { text = text.replace(cx, function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) } if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { j = eval("(" + text + ")"); return typeof reviver === "function" ? walk({ "": j }, "") : j } throw new SyntaxError("JSON.parse") } } }());
@@ -1,86 +0,0 @@
// Knockout JavaScript library v2.1.0
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
(function(window,document,navigator,undefined){
function m(w){throw w;}var n=void 0,p=!0,s=null,t=!1;function A(w){return function(){return w}};function E(w){function B(b,c,d){d&&c!==a.k.r(b)&&a.k.S(b,c);c!==a.k.r(b)&&a.a.va(b,"change")}var a="undefined"!==typeof w?w:{};a.b=function(b,c){for(var d=b.split("."),f=a,g=0;g<d.length-1;g++)f=f[d[g]];f[d[d.length-1]]=c};a.B=function(a,c,d){a[c]=d};a.version="2.1.0";a.b("version",a.version);a.a=new function(){function b(b,c){if("input"!==a.a.o(b)||!b.type||"click"!=c.toLowerCase())return t;var e=b.type;return"checkbox"==e||"radio"==e}var c=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},f={};d[/Firefox\/2/i.test(navigator.userAgent)?
"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");for(var g in d){var e=d[g];if(e.length)for(var h=0,j=e.length;h<j;h++)f[e[h]]=g}var k={propertychange:p},i=function(){for(var a=3,b=document.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",c[0];);return 4<a?a:n}();return{Ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],
v:function(a,b){for(var c=0,e=a.length;c<e;c++)b(a[c])},j:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=0,e=a.length;c<e;c++)if(a[c]===b)return c;return-1},ab:function(a,b,c){for(var e=0,f=a.length;e<f;e++)if(b.call(c,a[e]))return a[e];return s},ba:function(b,c){var e=a.a.j(b,c);0<=e&&b.splice(e,1)},za:function(b){for(var b=b||[],c=[],e=0,f=b.length;e<f;e++)0>a.a.j(c,b[e])&&c.push(b[e]);return c},T:function(a,b){for(var a=a||[],c=[],
e=0,f=a.length;e<f;e++)c.push(b(a[e]));return c},aa:function(a,b){for(var a=a||[],c=[],e=0,f=a.length;e<f;e++)b(a[e])&&c.push(a[e]);return c},N:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,e=b.length;c<e;c++)a.push(b[c]);return a},extend:function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},ga:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Ab:function(b){for(var b=a.a.L(b),c=document.createElement("div"),e=0,f=b.length;e<f;e++)a.F(b[e]),
c.appendChild(b[e]);return c},X:function(b,c){a.a.ga(b);if(c)for(var e=0,f=c.length;e<f;e++)b.appendChild(c[e])},Na:function(b,c){var e=b.nodeType?[b]:b;if(0<e.length){for(var f=e[0],d=f.parentNode,g=0,h=c.length;g<h;g++)d.insertBefore(c[g],f);g=0;for(h=e.length;g<h;g++)a.removeNode(e[g])}},Pa:function(a,b){0<=navigator.userAgent.indexOf("MSIE 6")?a.setAttribute("selected",b):a.selected=b},w:function(a){return(a||"").replace(c,"")},Ib:function(b,c){for(var e=[],f=(b||"").split(c),g=0,d=f.length;g<
d;g++){var h=a.a.w(f[g]);""!==h&&e.push(h)}return e},Hb:function(a,b){a=a||"";return b.length>a.length?t:a.substring(0,b.length)===b},eb:function(a,b){for(var c="return ("+a+")",e=0;e<b;e++)c="with(sc["+e+"]) { "+c+" } ";return new Function("sc",c)},kb:function(a,b){if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a!=s;){if(a==b)return p;a=a.parentNode}return t},fa:function(b){return a.a.kb(b,b.ownerDocument)},o:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},
n:function(a,c,e){var f=i&&k[c];if(!f&&"undefined"!=typeof jQuery){if(b(a,c))var g=e,e=function(a,b){var c=this.checked;b&&(this.checked=b.fb!==p);g.call(this,a);this.checked=c};jQuery(a).bind(c,e)}else!f&&"function"==typeof a.addEventListener?a.addEventListener(c,e,t):"undefined"!=typeof a.attachEvent?a.attachEvent("on"+c,function(b){e.call(a,b)}):m(Error("Browser doesn't support addEventListener or attachEvent"))},va:function(a,c){(!a||!a.nodeType)&&m(Error("element must be a DOM node when calling triggerEvent"));
if("undefined"!=typeof jQuery){var e=[];b(a,c)&&e.push({fb:a.checked});jQuery(a).trigger(c,e)}else"function"==typeof document.createEvent?"function"==typeof a.dispatchEvent?(e=document.createEvent(f[c]||"HTMLEvents"),e.initEvent(c,p,p,window,0,0,0,0,0,t,t,t,t,0,a),a.dispatchEvent(e)):m(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeof a.fireEvent?(b(a,c)&&(a.checked=a.checked!==p),a.fireEvent("on"+c)):m(Error("Browser doesn't support triggering events"))},d:function(b){return a.la(b)?
b():b},Ua:function(b,c,e){var f=(b.className||"").split(/\s+/),g=0<=a.a.j(f,c);if(e&&!g)b.className+=(f[0]?" ":"")+c;else if(g&&!e){e="";for(g=0;g<f.length;g++)f[g]!=c&&(e+=f[g]+" ");b.className=a.a.w(e)}},Qa:function(b,c){var e=a.a.d(c);if(e===s||e===n)e="";"innerText"in b?b.innerText=e:b.textContent=e;9<=i&&(b.style.display=b.style.display)},lb:function(a){if(9<=i){var b=a.style.width;a.style.width=0;a.style.width=b}},Eb:function(b,e){for(var b=a.a.d(b),e=a.a.d(e),c=[],f=b;f<=e;f++)c.push(f);return c},
L:function(a){for(var b=[],e=0,c=a.length;e<c;e++)b.push(a[e]);return b},tb:6===i,ub:7===i,ja:i,Da:function(b,e){for(var c=a.a.L(b.getElementsByTagName("input")).concat(a.a.L(b.getElementsByTagName("textarea"))),f="string"==typeof e?function(a){return a.name===e}:function(a){return e.test(a.name)},g=[],d=c.length-1;0<=d;d--)f(c[d])&&g.push(c[d]);return g},Bb:function(b){return"string"==typeof b&&(b=a.a.w(b))?window.JSON&&window.JSON.parse?window.JSON.parse(b):(new Function("return "+b))():s},sa:function(b,
e,c){("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&m(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));return JSON.stringify(a.a.d(b),e,c)},Cb:function(b,e,c){var c=c||{},f=c.params||{},g=c.includeFields||this.Ca,d=b;if("object"==typeof b&&"form"===a.a.o(b))for(var d=b.action,h=g.length-1;0<=h;h--)for(var k=a.a.Da(b,g[h]),
j=k.length-1;0<=j;j--)f[k[j].name]=k[j].value;var e=a.a.d(e),i=document.createElement("form");i.style.display="none";i.action=d;i.method="post";for(var z in e)b=document.createElement("input"),b.name=z,b.value=a.a.sa(a.a.d(e[z])),i.appendChild(b);for(z in f)b=document.createElement("input"),b.name=z,b.value=f[z],i.appendChild(b);document.body.appendChild(i);c.submitter?c.submitter(i):i.submit();setTimeout(function(){i.parentNode.removeChild(i)},0)}}};a.b("utils",a.a);a.b("utils.arrayForEach",a.a.v);
a.b("utils.arrayFirst",a.a.ab);a.b("utils.arrayFilter",a.a.aa);a.b("utils.arrayGetDistinctValues",a.a.za);a.b("utils.arrayIndexOf",a.a.j);a.b("utils.arrayMap",a.a.T);a.b("utils.arrayPushAll",a.a.N);a.b("utils.arrayRemoveItem",a.a.ba);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",a.a.Ca);a.b("utils.getFormFields",a.a.Da);a.b("utils.postJson",a.a.Cb);a.b("utils.parseJson",a.a.Bb);a.b("utils.registerEventHandler",a.a.n);a.b("utils.stringifyJson",a.a.sa);a.b("utils.range",a.a.Eb);
a.b("utils.toggleDomNodeCssClass",a.a.Ua);a.b("utils.triggerEvent",a.a.va);a.b("utils.unwrapObservable",a.a.d);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this,d=Array.prototype.slice.call(arguments),a=d.shift();return function(){return c.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});a.a.f=new function(){var b=0,c="__ko__"+(new Date).getTime(),d={};return{get:function(b,c){var e=a.a.f.getAll(b,t);return e===n?n:e[c]},set:function(b,c,e){e===n&&a.a.f.getAll(b,
t)===n||(a.a.f.getAll(b,p)[c]=e)},getAll:function(a,g){var e=a[c];if(!(e&&"null"!==e)){if(!g)return;e=a[c]="ko"+b++;d[e]={}}return d[e]},clear:function(a){var b=a[c];b&&(delete d[b],a[c]=s)}}};a.b("utils.domData",a.a.f);a.b("utils.domData.clear",a.a.f.clear);a.a.G=new function(){function b(b,c){var f=a.a.f.get(b,d);f===n&&c&&(f=[],a.a.f.set(b,d,f));return f}function c(e){var f=b(e,t);if(f)for(var f=f.slice(0),d=0;d<f.length;d++)f[d](e);a.a.f.clear(e);"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&
jQuery.cleanData([e]);if(g[e.nodeType])for(f=e.firstChild;e=f;)f=e.nextSibling,8===e.nodeType&&c(e)}var d="__ko_domNodeDisposal__"+(new Date).getTime(),f={1:p,8:p,9:p},g={1:p,9:p};return{wa:function(a,c){"function"!=typeof c&&m(Error("Callback must be a function"));b(a,p).push(c)},Ma:function(c,f){var g=b(c,t);g&&(a.a.ba(g,f),0==g.length&&a.a.f.set(c,d,n))},F:function(b){if(f[b.nodeType]&&(c(b),g[b.nodeType])){var d=[];a.a.N(d,b.getElementsByTagName("*"));for(var b=0,j=d.length;b<j;b++)c(d[b])}},
removeNode:function(b){a.F(b);b.parentNode&&b.parentNode.removeChild(b)}}};a.F=a.a.G.F;a.removeNode=a.a.G.removeNode;a.b("cleanNode",a.F);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.G);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.G.wa);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.G.Ma);(function(){a.a.pa=function(b){var c;if("undefined"!=typeof jQuery){if((c=jQuery.clean([b]))&&c[0]){for(b=c[0];b.parentNode&&11!==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&
b.parentNode.removeChild(b)}}else{var d=a.a.w(b).toLowerCase();c=document.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];b="ignored<div>"+d[1]+b+d[2]+"</div>";for("function"==typeof window.innerShiv?c.appendChild(window.innerShiv(b)):c.innerHTML=b;d[0]--;)c=c.lastChild;c=a.a.L(c.lastChild.childNodes)}return c};
a.a.Y=function(b,c){a.a.ga(b);if(c!==s&&c!==n)if("string"!=typeof c&&(c=c.toString()),"undefined"!=typeof jQuery)jQuery(b).html(c);else for(var d=a.a.pa(c),f=0;f<d.length;f++)b.appendChild(d[f])}})();a.b("utils.parseHtmlFragment",a.a.pa);a.b("utils.setHtml",a.a.Y);a.s=function(){function b(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function c(b,g){if(b)if(8==b.nodeType){var e=a.s.Ja(b.nodeValue);e!=s&&g.push({jb:b,yb:e})}else if(1==b.nodeType)for(var e=0,d=b.childNodes,j=d.length;e<
j;e++)c(d[e],g)}var d={};return{na:function(a){"function"!=typeof a&&m(Error("You can only pass a function to ko.memoization.memoize()"));var c=b()+b();d[c]=a;return"<\!--[ko_memo:"+c+"]--\>"},Va:function(a,b){var c=d[a];c===n&&m(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{return c.apply(s,b||[]),p}finally{delete d[a]}},Wa:function(b,d){var e=[];c(b,e);for(var h=0,j=e.length;h<j;h++){var k=e[h].jb,i=[k];d&&a.a.N(i,d);a.s.Va(e[h].yb,i);k.nodeValue="";k.parentNode&&
k.parentNode.removeChild(k)}},Ja:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:s}}}();a.b("memoization",a.s);a.b("memoization.memoize",a.s.na);a.b("memoization.unmemoize",a.s.Va);a.b("memoization.parseMemoText",a.s.Ja);a.b("memoization.unmemoizeDomNodeAndDescendants",a.s.Wa);a.Ba={throttle:function(b,c){b.throttleEvaluation=c;var d=s;return a.h({read:b,write:function(a){clearTimeout(d);d=setTimeout(function(){b(a)},c)}})},notify:function(b,c){b.equalityComparer="always"==c?A(t):a.m.fn.equalityComparer;
return b}};a.b("extenders",a.Ba);a.Sa=function(b,c,d){this.target=b;this.ca=c;this.ib=d;a.B(this,"dispose",this.A)};a.Sa.prototype.A=function(){this.sb=p;this.ib()};a.R=function(){this.u={};a.a.extend(this,a.R.fn);a.B(this,"subscribe",this.ta);a.B(this,"extend",this.extend);a.B(this,"getSubscriptionsCount",this.ob)};a.R.fn={ta:function(b,c,d){var d=d||"change",b=c?b.bind(c):b,f=new a.Sa(this,b,function(){a.a.ba(this.u[d],f)}.bind(this));this.u[d]||(this.u[d]=[]);this.u[d].push(f);return f},notifySubscribers:function(b,
c){c=c||"change";this.u[c]&&a.a.v(this.u[c].slice(0),function(a){a&&a.sb!==p&&a.ca(b)})},ob:function(){var a=0,c;for(c in this.u)this.u.hasOwnProperty(c)&&(a+=this.u[c].length);return a},extend:function(b){var c=this;if(b)for(var d in b){var f=a.Ba[d];"function"==typeof f&&(c=f(c,b[d]))}return c}};a.Ga=function(a){return"function"==typeof a.ta&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.R);a.b("isSubscribable",a.Ga);a.U=function(){var b=[];return{bb:function(a){b.push({ca:a,Aa:[]})},
end:function(){b.pop()},La:function(c){a.Ga(c)||m(Error("Only subscribable things can act as dependencies"));if(0<b.length){var d=b[b.length-1];0<=a.a.j(d.Aa,c)||(d.Aa.push(c),d.ca(c))}}}}();var G={undefined:p,"boolean":p,number:p,string:p};a.m=function(b){function c(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.I(),d=arguments[0],c.H();return this}a.U.La(c);return d}var d=b;a.R.call(c);c.H=function(){c.notifySubscribers(d)};c.I=function(){c.notifySubscribers(d,
"beforeChange")};a.a.extend(c,a.m.fn);a.B(c,"valueHasMutated",c.H);a.B(c,"valueWillMutate",c.I);return c};a.m.fn={equalityComparer:function(a,c){return a===s||typeof a in G?a===c:t}};var x=a.m.Db="__ko_proto__";a.m.fn[x]=a.m;a.ia=function(b,c){return b===s||b===n||b[x]===n?t:b[x]===c?p:a.ia(b[x],c)};a.la=function(b){return a.ia(b,a.m)};a.Ha=function(b){return"function"==typeof b&&b[x]===a.m||"function"==typeof b&&b[x]===a.h&&b.pb?p:t};a.b("observable",a.m);a.b("isObservable",a.la);a.b("isWriteableObservable",
a.Ha);a.Q=function(b){0==arguments.length&&(b=[]);b!==s&&(b!==n&&!("length"in b))&&m(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var c=a.m(b);a.a.extend(c,a.Q.fn);return c};a.Q.fn={remove:function(a){for(var c=this(),d=[],f="function"==typeof a?a:function(c){return c===a},g=0;g<c.length;g++){var e=c[g];f(e)&&(0===d.length&&this.I(),d.push(e),c.splice(g,1),g--)}d.length&&this.H();return d},removeAll:function(b){if(b===n){var c=this(),
d=c.slice(0);this.I();c.splice(0,c.length);this.H();return d}return!b?[]:this.remove(function(c){return 0<=a.a.j(b,c)})},destroy:function(a){var c=this(),d="function"==typeof a?a:function(c){return c===a};this.I();for(var f=c.length-1;0<=f;f--)d(c[f])&&(c[f]._destroy=p);this.H()},destroyAll:function(b){return b===n?this.destroy(A(p)):!b?[]:this.destroy(function(c){return 0<=a.a.j(b,c)})},indexOf:function(b){var c=this();return a.a.j(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.I(),
this()[d]=c,this.H())}};a.a.v("pop push reverse shift sort splice unshift".split(" "),function(b){a.Q.fn[b]=function(){var a=this();this.I();a=a[b].apply(a,arguments);this.H();return a}});a.a.v(["slice"],function(b){a.Q.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.Q);a.h=function(b,c,d){function f(){a.a.v(v,function(a){a.A()});v=[]}function g(){var a=h.throttleEvaluation;a&&0<=a?(clearTimeout(x),x=setTimeout(e,a)):e()}function e(){if(!l)if(i&&w())u();else{l=
p;try{var b=a.a.T(v,function(a){return a.target});a.U.bb(function(c){var e;0<=(e=a.a.j(b,c))?b[e]=n:v.push(c.ta(g))});for(var e=q.call(c),f=b.length-1;0<=f;f--)b[f]&&v.splice(f,1)[0].A();i=p;h.notifySubscribers(k,"beforeChange");k=e}finally{a.U.end()}h.notifySubscribers(k);l=t}}function h(){if(0<arguments.length)j.apply(h,arguments);else return i||e(),a.U.La(h),k}function j(){"function"===typeof o?o.apply(c,arguments):m(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters."))}
var k,i=t,l=t,q=b;q&&"object"==typeof q?(d=q,q=d.read):(d=d||{},q||(q=d.read));"function"!=typeof q&&m(Error("Pass a function that returns the value of the ko.computed"));var o=d.write;c||(c=d.owner);var v=[],u=f,r="object"==typeof d.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:s,w=d.disposeWhen||A(t);if(r){u=function(){a.a.G.Ma(r,arguments.callee);f()};a.a.G.wa(r,u);var y=w,w=function(){return!a.a.fa(r)||y()}}var x=s;h.nb=function(){return v.length};h.pb="function"===typeof d.write;h.A=function(){u()};
a.R.call(h);a.a.extend(h,a.h.fn);d.deferEvaluation!==p&&e();a.B(h,"dispose",h.A);a.B(h,"getDependenciesCount",h.nb);return h};a.rb=function(b){return a.ia(b,a.h)};w=a.m.Db;a.h[w]=a.m;a.h.fn={};a.h.fn[w]=a.h;a.b("dependentObservable",a.h);a.b("computed",a.h);a.b("isComputed",a.rb);(function(){function b(a,g,e){e=e||new d;a=g(a);if(!("object"==typeof a&&a!==s&&a!==n&&!(a instanceof Date)))return a;var h=a instanceof Array?[]:{};e.save(a,h);c(a,function(c){var d=g(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":h[c]=
d;break;case "object":case "undefined":var i=e.get(d);h[c]=i!==n?i:b(d,g,e)}});return h}function c(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function d(){var b=[],c=[];this.save=function(e,d){var j=a.a.j(b,e);0<=j?c[j]=d:(b.push(e),c.push(d))};this.get=function(e){e=a.a.j(b,e);return 0<=e?c[e]:n}}a.Ta=function(c){0==arguments.length&&m(Error("When calling ko.toJS, pass the object you want to convert."));return b(c,function(b){for(var c=
0;a.la(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,e){b=a.Ta(b);return a.a.sa(b,c,e)}})();a.b("toJS",a.Ta);a.b("toJSON",a.toJSON);(function(){a.k={r:function(b){switch(a.a.o(b)){case "option":return b.__ko__hasDomDataOptionValue__===p?a.a.f.get(b,a.c.options.oa):b.getAttribute("value");case "select":return 0<=b.selectedIndex?a.k.r(b.options[b.selectedIndex]):n;default:return b.value}},S:function(b,c){switch(a.a.o(b)){case "option":switch(typeof c){case "string":a.a.f.set(b,a.c.options.oa,
n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.f.set(b,a.c.options.oa,c),b.__ko__hasDomDataOptionValue__=p,b.value="number"===typeof c?c:""}break;case "select":for(var d=b.options.length-1;0<=d;d--)if(a.k.r(b.options[d])==c){b.selectedIndex=d;break}break;default:if(c===s||c===n)c="";b.value=c}}}})();a.b("selectExtensions",a.k);a.b("selectExtensions.readValue",a.k.r);a.b("selectExtensions.writeValue",a.k.S);a.g=function(){function b(a,b){for(var d=
s;a!=d;)d=a,a=a.replace(c,function(a,c){return b[c]});return a}var c=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,f=["true","false"];return{D:[],W:function(c){var e=a.a.w(c);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-1));for(var c=[],d=s,f,k=0;k<e.length;k++){var i=e.charAt(k);if(d===s)switch(i){case '"':case "'":case "/":d=k,f=i}else if(i==f&&"\\"!==e.charAt(k-1)){i=e.substring(d,k+1);c.push(i);var l="@ko_token_"+(c.length-
1)+"@",e=e.substring(0,d)+l+e.substring(k+1),k=k-(i.length-l.length),d=s}}f=d=s;for(var q=0,o=s,k=0;k<e.length;k++){i=e.charAt(k);if(d===s)switch(i){case "{":d=k;o=i;f="}";break;case "(":d=k;o=i;f=")";break;case "[":d=k,o=i,f="]"}i===o?q++:i===f&&(q--,0===q&&(i=e.substring(d,k+1),c.push(i),l="@ko_token_"+(c.length-1)+"@",e=e.substring(0,d)+l+e.substring(k+1),k-=i.length-l.length,d=s))}f=[];e=e.split(",");d=0;for(k=e.length;d<k;d++)q=e[d],o=q.indexOf(":"),0<o&&o<q.length-1?(i=q.substring(o+1),f.push({key:b(q.substring(0,
o),c),value:b(i,c)})):f.push({unknown:b(q,c)});return f},ka:function(b){for(var c="string"===typeof b?a.g.W(b):b,h=[],b=[],j,k=0;j=c[k];k++)if(0<h.length&&h.push(","),j.key){var i;a:{i=j.key;var l=a.a.w(i);switch(l.length&&l.charAt(0)){case "'":case '"':break a;default:i="'"+l+"'"}}j=j.value;h.push(i);h.push(":");h.push(j);l=a.a.w(j);if(0<=a.a.j(f,a.a.w(l).toLowerCase())?0:l.match(d)!==s)0<b.length&&b.push(", "),b.push(i+" : function(__ko_value) { "+j+" = __ko_value; }")}else j.unknown&&h.push(j.unknown);
c=h.join("");0<b.length&&(c=c+", '_ko_property_writers' : { "+b.join("")+" } ");return c},wb:function(b,c){for(var d=0;d<b.length;d++)if(a.a.w(b[d].key)==c)return p;return t},$:function(b,c,d,f,k){if(!b||!a.Ha(b)){if((b=c()._ko_property_writers)&&b[d])b[d](f)}else(!k||b()!==f)&&b(f)}}}();a.b("jsonExpressionRewriting",a.g);a.b("jsonExpressionRewriting.bindingRewriteValidators",a.g.D);a.b("jsonExpressionRewriting.parseObjectLiteral",a.g.W);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",
a.g.ka);(function(){function b(a){return 8==a.nodeType&&(g?a.text:a.nodeValue).match(e)}function c(a){return 8==a.nodeType&&(g?a.text:a.nodeValue).match(h)}function d(a,e){for(var d=a,f=1,g=[];d=d.nextSibling;){if(c(d)&&(f--,0===f))return g;g.push(d);b(d)&&f++}e||m(Error("Cannot find closing comment tag to match: "+a.nodeValue));return s}function f(a,b){var c=d(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:s}var g="<\!--test--\>"===document.createComment("test").text,e=g?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
/^\s*ko\s+(.*\:.*)\s*$/,h=g?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,j={ul:p,ol:p};a.e={C:{},childNodes:function(a){return b(a)?d(a):a.childNodes},ha:function(c){if(b(c))for(var c=a.e.childNodes(c),e=0,d=c.length;e<d;e++)a.removeNode(c[e]);else a.a.ga(c)},X:function(c,e){if(b(c)){a.e.ha(c);for(var d=c.nextSibling,f=0,g=e.length;f<g;f++)d.parentNode.insertBefore(e[f],d)}else a.a.X(c,e)},Ka:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},
Fa:function(a,c,e){b(a)?a.parentNode.insertBefore(c,e.nextSibling):e.nextSibling?a.insertBefore(c,e.nextSibling):a.appendChild(c)},firstChild:function(a){return!b(a)?a.firstChild:!a.nextSibling||c(a.nextSibling)?s:a.nextSibling},nextSibling:function(a){b(a)&&(a=f(a));return a.nextSibling&&c(a.nextSibling)?s:a.nextSibling},Xa:function(a){return(a=b(a))?a[1]:s},Ia:function(e){if(j[a.a.o(e)]){var d=e.firstChild;if(d){do if(1===d.nodeType){var g;g=d.firstChild;var h=s;if(g){do if(h)h.push(g);else if(b(g)){var o=
f(g,p);o?g=o:h=[g]}else c(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h){h=d.nextSibling;for(o=0;o<g.length;o++)h?e.insertBefore(g[o],h):e.appendChild(g[o])}}while(d=d.nextSibling)}}}}})();a.b("virtualElements",a.e);a.b("virtualElements.allowedBindings",a.e.C);a.b("virtualElements.emptyNode",a.e.ha);a.b("virtualElements.insertAfter",a.e.Fa);a.b("virtualElements.prepend",a.e.Ka);a.b("virtualElements.setDomNodeChildren",a.e.X);(function(){a.J=function(){this.cb={}};a.a.extend(a.J.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind")!=
s;case 8:return a.e.Xa(b)!=s;default:return t}},getBindings:function(a,c){var d=this.getBindingsString(a,c);return d?this.parseBindingsString(d,c):s},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.e.Xa(b);default:return s}},parseBindingsString:function(b,c){try{var d=c.$data,d="object"==typeof d&&d!=s?[d,c]:[c],f=d.length,g=this.cb,e=f+"_"+b,h;if(!(h=g[e])){var j=" { "+a.g.ka(b)+" } ";h=g[e]=a.a.eb(j,f)}return h(d)}catch(k){m(Error("Unable to parse bindings.\nMessage: "+
k+";\nBindings value: "+b))}}});a.J.instance=new a.J})();a.b("bindingProvider",a.J);(function(){function b(b,d,e){for(var h=a.e.firstChild(d);d=h;)h=a.e.nextSibling(d),c(b,d,e)}function c(c,g,e){var h=p,j=1===g.nodeType;j&&a.e.Ia(g);if(j&&e||a.J.instance.nodeHasBindings(g))h=d(g,s,c,e).Gb;h&&b(c,g,!j)}function d(b,c,e,d){function j(a){return function(){return l[a]}}function k(){return l}var i=0,l,q;a.h(function(){var o=e&&e instanceof a.z?e:new a.z(a.a.d(e)),v=o.$data;d&&a.Ra(b,o);if(l=("function"==
typeof c?c():c)||a.J.instance.getBindings(b,o)){if(0===i){i=1;for(var u in l){var r=a.c[u];r&&8===b.nodeType&&!a.e.C[u]&&m(Error("The binding '"+u+"' cannot be used with virtual elements"));if(r&&"function"==typeof r.init&&(r=(0,r.init)(b,j(u),k,v,o))&&r.controlsDescendantBindings)q!==n&&m(Error("Multiple bindings ("+q+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),q=u}i=2}if(2===i)for(u in l)(r=a.c[u])&&"function"==
typeof r.update&&(0,r.update)(b,j(u),k,v,o)}},s,{disposeWhenNodeIsRemoved:b});return{Gb:q===n}}a.c={};a.z=function(b,c){c?(a.a.extend(this,c),this.$parentContext=c,this.$parent=c.$data,this.$parents=(c.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=[],this.$root=b);this.$data=b};a.z.prototype.createChildContext=function(b){return new a.z(b,this)};a.z.prototype.extend=function(b){var c=a.a.extend(new a.z,this);return a.a.extend(c,b)};a.Ra=function(b,c){if(2==arguments.length)a.a.f.set(b,
"__ko_bindingContext__",c);else return a.a.f.get(b,"__ko_bindingContext__")};a.ya=function(b,c,e){1===b.nodeType&&a.e.Ia(b);return d(b,c,e,p)};a.Ya=function(a,c){(1===c.nodeType||8===c.nodeType)&&b(a,c,p)};a.xa=function(a,b){b&&(1!==b.nodeType&&8!==b.nodeType)&&m(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||window.document.body;c(a,b,p)};a.ea=function(b){switch(b.nodeType){case 1:case 8:var c=a.Ra(b);if(c)return c;if(b.parentNode)return a.ea(b.parentNode)}};
a.hb=function(b){return(b=a.ea(b))?b.$data:n};a.b("bindingHandlers",a.c);a.b("applyBindings",a.xa);a.b("applyBindingsToDescendants",a.Ya);a.b("applyBindingsToNode",a.ya);a.b("contextFor",a.ea);a.b("dataFor",a.hb)})();a.a.v(["click"],function(b){a.c[b]={init:function(c,d,f,g){return a.c.event.init.call(this,c,function(){var a={};a[b]=d();return a},f,g)}}});a.c.event={init:function(b,c,d,f){var g=c()||{},e;for(e in g)(function(){var g=e;"string"==typeof g&&a.a.n(b,g,function(b){var e,i=c()[g];if(i){var l=
d();try{var q=a.a.L(arguments);q.unshift(f);e=i.apply(f,q)}finally{e!==p&&(b.preventDefault?b.preventDefault():b.returnValue=t)}l[g+"Bubble"]===t&&(b.cancelBubble=p,b.stopPropagation&&b.stopPropagation())}})})()}};a.c.submit={init:function(b,c,d,f){"function"!=typeof c()&&m(Error("The value for a submit binding must be a function"));a.a.n(b,"submit",function(a){var e,d=c();try{e=d.call(f,b)}finally{e!==p&&(a.preventDefault?a.preventDefault():a.returnValue=t)}})}};a.c.visible={update:function(b,c){var d=
a.a.d(c()),f="none"!=b.style.display;d&&!f?b.style.display="":!d&&f&&(b.style.display="none")}};a.c.enable={update:function(b,c){var d=a.a.d(c());d&&b.disabled?b.removeAttribute("disabled"):!d&&!b.disabled&&(b.disabled=p)}};a.c.disable={update:function(b,c){a.c.enable.update(b,function(){return!a.a.d(c())})}};a.c.value={init:function(b,c,d){function f(){var e=c(),f=a.k.r(b);a.g.$(e,d,"value",f,p)}var g=["change"],e=d().valueUpdate;e&&("string"==typeof e&&(e=[e]),a.a.N(g,e),g=a.a.za(g));if(a.a.ja&&
("input"==b.tagName.toLowerCase()&&"text"==b.type&&"off"!=b.autocomplete&&(!b.form||"off"!=b.form.autocomplete))&&-1==a.a.j(g,"propertychange")){var h=t;a.a.n(b,"propertychange",function(){h=p});a.a.n(b,"blur",function(){if(h){h=t;f()}})}a.a.v(g,function(c){var e=f;if(a.a.Hb(c,"after")){e=function(){setTimeout(f,0)};c=c.substring(5)}a.a.n(b,c,e)})},update:function(b,c){var d="select"===a.a.o(b),f=a.a.d(c()),g=a.k.r(b),e=f!=g;0===f&&(0!==g&&"0"!==g)&&(e=p);e&&(g=function(){a.k.S(b,f)},g(),d&&setTimeout(g,
0));d&&0<b.length&&B(b,f,t)}};a.c.options={update:function(b,c,d){"select"!==a.a.o(b)&&m(Error("options binding applies only to SELECT elements"));for(var f=0==b.length,g=a.a.T(a.a.aa(b.childNodes,function(b){return b.tagName&&"option"===a.a.o(b)&&b.selected}),function(b){return a.k.r(b)||b.innerText||b.textContent}),e=b.scrollTop,h=a.a.d(c());0<b.length;)a.F(b.options[0]),b.remove(0);if(h){d=d();"number"!=typeof h.length&&(h=[h]);if(d.optionsCaption){var j=document.createElement("option");a.a.Y(j,
d.optionsCaption);a.k.S(j,n);b.appendChild(j)}for(var c=0,k=h.length;c<k;c++){var j=document.createElement("option"),i="string"==typeof d.optionsValue?h[c][d.optionsValue]:h[c],i=a.a.d(i);a.k.S(j,i);var l=d.optionsText,i="function"==typeof l?l(h[c]):"string"==typeof l?h[c][l]:i;if(i===s||i===n)i="";a.a.Qa(j,i);b.appendChild(j)}h=b.getElementsByTagName("option");c=j=0;for(k=h.length;c<k;c++)0<=a.a.j(g,a.k.r(h[c]))&&(a.a.Pa(h[c],p),j++);b.scrollTop=e;f&&"value"in d&&B(b,a.a.d(d.value),p);a.a.lb(b)}}};
a.c.options.oa="__ko.optionValueDomData__";a.c.selectedOptions={Ea:function(b){for(var c=[],b=b.childNodes,d=0,f=b.length;d<f;d++){var g=b[d],e=a.a.o(g);"option"==e&&g.selected?c.push(a.k.r(g)):"optgroup"==e&&(g=a.c.selectedOptions.Ea(g),Array.prototype.splice.apply(c,[c.length,0].concat(g)))}return c},init:function(b,c,d){a.a.n(b,"change",function(){var b=c(),g=a.c.selectedOptions.Ea(this);a.g.$(b,d,"value",g)})},update:function(b,c){"select"!=a.a.o(b)&&m(Error("values binding applies only to SELECT elements"));
var d=a.a.d(c());if(d&&"number"==typeof d.length)for(var f=b.childNodes,g=0,e=f.length;g<e;g++){var h=f[g];"option"===a.a.o(h)&&a.a.Pa(h,0<=a.a.j(d,a.k.r(h)))}}};a.c.text={update:function(b,c){a.a.Qa(b,c())}};a.c.html={init:function(){return{controlsDescendantBindings:p}},update:function(b,c){var d=a.a.d(c());a.a.Y(b,d)}};a.c.css={update:function(b,c){var d=a.a.d(c()||{}),f;for(f in d)if("string"==typeof f){var g=a.a.d(d[f]);a.a.Ua(b,f,g)}}};a.c.style={update:function(b,c){var d=a.a.d(c()||{}),f;
for(f in d)if("string"==typeof f){var g=a.a.d(d[f]);b.style[f]=g||""}}};a.c.uniqueName={init:function(b,c){c()&&(b.name="ko_unique_"+ ++a.c.uniqueName.gb,(a.a.tb||a.a.ub)&&b.mergeAttributes(document.createElement("<input name='"+b.name+"'/>"),t))}};a.c.uniqueName.gb=0;a.c.checked={init:function(b,c,d){a.a.n(b,"click",function(){var f;if("checkbox"==b.type)f=b.checked;else if("radio"==b.type&&b.checked)f=b.value;else return;var g=c();"checkbox"==b.type&&a.a.d(g)instanceof Array?(f=a.a.j(a.a.d(g),b.value),
b.checked&&0>f?g.push(b.value):!b.checked&&0<=f&&g.splice(f,1)):a.g.$(g,d,"checked",f,p)});"radio"==b.type&&!b.name&&a.c.uniqueName.init(b,A(p))},update:function(b,c){var d=a.a.d(c());"checkbox"==b.type?b.checked=d instanceof Array?0<=a.a.j(d,b.value):d:"radio"==b.type&&(b.checked=b.value==d)}};var F={"class":"className","for":"htmlFor"};a.c.attr={update:function(b,c){var d=a.a.d(c())||{},f;for(f in d)if("string"==typeof f){var g=a.a.d(d[f]),e=g===t||g===s||g===n;e&&b.removeAttribute(f);8>=a.a.ja&&
f in F?(f=F[f],e?b.removeAttribute(f):b[f]=g):e||b.setAttribute(f,g.toString())}}};a.c.hasfocus={init:function(b,c,d){function f(b){var e=c();a.g.$(e,d,"hasfocus",b,p)}a.a.n(b,"focus",function(){f(p)});a.a.n(b,"focusin",function(){f(p)});a.a.n(b,"blur",function(){f(t)});a.a.n(b,"focusout",function(){f(t)})},update:function(b,c){var d=a.a.d(c());d?b.focus():b.blur();a.a.va(b,d?"focusin":"focusout")}};a.c["with"]={p:function(b){return function(){var c=b();return{"if":c,data:c,templateEngine:a.q.K}}},
init:function(b,c){return a.c.template.init(b,a.c["with"].p(c))},update:function(b,c,d,f,g){return a.c.template.update(b,a.c["with"].p(c),d,f,g)}};a.g.D["with"]=t;a.e.C["with"]=p;a.c["if"]={p:function(b){return function(){return{"if":b(),templateEngine:a.q.K}}},init:function(b,c){return a.c.template.init(b,a.c["if"].p(c))},update:function(b,c,d,f,g){return a.c.template.update(b,a.c["if"].p(c),d,f,g)}};a.g.D["if"]=t;a.e.C["if"]=p;a.c.ifnot={p:function(b){return function(){return{ifnot:b(),templateEngine:a.q.K}}},
init:function(b,c){return a.c.template.init(b,a.c.ifnot.p(c))},update:function(b,c,d,f,g){return a.c.template.update(b,a.c.ifnot.p(c),d,f,g)}};a.g.D.ifnot=t;a.e.C.ifnot=p;a.c.foreach={p:function(b){return function(){var c=a.a.d(b());return!c||"number"==typeof c.length?{foreach:c,templateEngine:a.q.K}:{foreach:c.data,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,templateEngine:a.q.K}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.p(c))},
update:function(b,c,d,f,g){return a.c.template.update(b,a.c.foreach.p(c),d,f,g)}};a.g.D.foreach=t;a.e.C.foreach=p;a.t=function(){};a.t.prototype.renderTemplateSource=function(){m(Error("Override renderTemplateSource"))};a.t.prototype.createJavaScriptEvaluatorBlock=function(){m(Error("Override createJavaScriptEvaluatorBlock"))};a.t.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){var c=c||document,d=c.getElementById(b);d||m(Error("Cannot find template with ID "+b));return new a.l.i(d)}if(1==
b.nodeType||8==b.nodeType)return new a.l.M(b);m(Error("Unknown template type: "+b))};a.t.prototype.renderTemplate=function(a,c,d,f){return this.renderTemplateSource(this.makeTemplateSource(a,f),c,d)};a.t.prototype.isTemplateRewritten=function(a,c){return this.allowTemplateRewriting===t||!(c&&c!=document)&&this.V&&this.V[a]?p:this.makeTemplateSource(a,c).data("isRewritten")};a.t.prototype.rewriteTemplate=function(a,c,d){var f=this.makeTemplateSource(a,d),c=c(f.text());f.text(c);f.data("isRewritten",
p);!(d&&d!=document)&&"string"==typeof a&&(this.V=this.V||{},this.V[a]=p)};a.b("templateEngine",a.t);a.Z=function(){function b(b,c,e){for(var b=a.g.W(b),d=a.g.D,j=0;j<b.length;j++){var k=b[j].key;if(d.hasOwnProperty(k)){var i=d[k];"function"===typeof i?(k=i(b[j].value))&&m(Error(k)):i||m(Error("This template engine does not support the '"+k+"' binding within its templates"))}}b="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+a.g.ka(b)+
" } })() })";return e.createJavaScriptEvaluatorBlock(b)+c}var c=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{mb:function(b,c,e){c.isTemplateRewritten(b,e)||c.rewriteTemplate(b,function(b){return a.Z.zb(b,c)},e)},zb:function(a,g){return a.replace(c,function(a,c,d,f,i,l,q){return b(q,c,g)}).replace(d,function(a,c){return b(c,"<\!-- ko --\>",g)})},Za:function(b){return a.s.na(function(c,
e){c.nextSibling&&a.ya(c.nextSibling,b,e)})}}}();a.b("templateRewriting",a.Z);a.b("templateRewriting.applyMemoizedBindingsToNextSibling",a.Z.Za);(function(){a.l={};a.l.i=function(a){this.i=a};a.l.i.prototype.text=function(){var b=a.a.o(this.i),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==arguments.length)return this.i[b];var c=arguments[0];"innerHTML"===b?a.a.Y(this.i,c):this.i[b]=c};a.l.i.prototype.data=function(b){if(1===arguments.length)return a.a.f.get(this.i,"templateSourceData_"+
b);a.a.f.set(this.i,"templateSourceData_"+b,arguments[1])};a.l.M=function(a){this.i=a};a.l.M.prototype=new a.l.i;a.l.M.prototype.text=function(){if(0==arguments.length){var b=a.a.f.get(this.i,"__ko_anon_template__")||{};b.ua===n&&b.da&&(b.ua=b.da.innerHTML);return b.ua}a.a.f.set(this.i,"__ko_anon_template__",{ua:arguments[0]})};a.l.i.prototype.nodes=function(){if(0==arguments.length)return(a.a.f.get(this.i,"__ko_anon_template__")||{}).da;a.a.f.set(this.i,"__ko_anon_template__",{da:arguments[0]})};
a.b("templateSources",a.l);a.b("templateSources.domElement",a.l.i);a.b("templateSources.anonymousTemplate",a.l.M)})();(function(){function b(b,c,d){for(var f,c=a.e.nextSibling(c);b&&(f=b)!==c;)b=a.e.nextSibling(f),(1===f.nodeType||8===f.nodeType)&&d(f)}function c(c,d){if(c.length){var f=c[0],g=c[c.length-1];b(f,g,function(b){a.xa(d,b)});b(f,g,function(b){a.s.Wa(b,[d])})}}function d(a){return a.nodeType?a:0<a.length?a[0]:s}function f(b,f,j,k,i){var i=i||{},l=b&&d(b),l=l&&l.ownerDocument,q=i.templateEngine||
g;a.Z.mb(j,q,l);j=q.renderTemplate(j,k,i,l);("number"!=typeof j.length||0<j.length&&"number"!=typeof j[0].nodeType)&&m(Error("Template engine must return an array of DOM nodes"));l=t;switch(f){case "replaceChildren":a.e.X(b,j);l=p;break;case "replaceNode":a.a.Na(b,j);l=p;break;case "ignoreTargetNode":break;default:m(Error("Unknown renderMode: "+f))}l&&(c(j,k),i.afterRender&&i.afterRender(j,k.$data));return j}var g;a.ra=function(b){b!=n&&!(b instanceof a.t)&&m(Error("templateEngine must inherit from ko.templateEngine"));
g=b};a.qa=function(b,c,j,k,i){j=j||{};(j.templateEngine||g)==n&&m(Error("Set a template engine before calling renderTemplate"));i=i||"replaceChildren";if(k){var l=d(k);return a.h(function(){var g=c&&c instanceof a.z?c:new a.z(a.a.d(c)),o="function"==typeof b?b(g.$data):b,g=f(k,i,o,g,j);"replaceNode"==i&&(k=g,l=d(k))},s,{disposeWhen:function(){return!l||!a.a.fa(l)},disposeWhenNodeIsRemoved:l&&"replaceNode"==i?l.parentNode:l})}return a.s.na(function(d){a.qa(b,c,j,d,"replaceNode")})};a.Fb=function(b,
d,g,k,i){function l(a,b){c(b,o);g.afterRender&&g.afterRender(b,a)}function q(c,d){var h="function"==typeof b?b(c):b;o=i.createChildContext(a.a.d(c));o.$index=d;return f(s,"ignoreTargetNode",h,o,g)}var o;return a.h(function(){var b=a.a.d(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.aa(b,function(b){return g.includeDestroyed||b===n||b===s||!a.a.d(b._destroy)});a.a.Oa(k,b,q,g,l)},s,{disposeWhenNodeIsRemoved:k})};a.c.template={init:function(b,c){var d=a.a.d(c());if("string"!=typeof d&&!d.name&&
(1==b.nodeType||8==b.nodeType))d=1==b.nodeType?b.childNodes:a.e.childNodes(b),d=a.a.Ab(d),(new a.l.M(b)).nodes(d);return{controlsDescendantBindings:p}},update:function(b,c,d,f,g){c=a.a.d(c());f=p;"string"==typeof c?d=c:(d=c.name,"if"in c&&(f=f&&a.a.d(c["if"])),"ifnot"in c&&(f=f&&!a.a.d(c.ifnot)));var l=s;"object"===typeof c&&"foreach"in c?l=a.Fb(d||b,f&&c.foreach||[],c,b,g):f?(g="object"==typeof c&&"data"in c?g.createChildContext(a.a.d(c.data)):g,l=a.qa(d||b,g,c,b)):a.e.ha(b);g=l;(c=a.a.f.get(b,"__ko__templateSubscriptionDomDataKey__"))&&
"function"==typeof c.A&&c.A();a.a.f.set(b,"__ko__templateSubscriptionDomDataKey__",g)}};a.g.D.template=function(b){b=a.g.W(b);return 1==b.length&&b[0].unknown||a.g.wb(b,"name")?s:"This template engine does not support anonymous templates nested within its templates"};a.e.C.template=p})();a.b("setTemplateEngine",a.ra);a.b("renderTemplate",a.qa);(function(){a.a.O=function(b,c,d){if(d===n)return a.a.O(b,c,1)||a.a.O(b,c,10)||a.a.O(b,c,Number.MAX_VALUE);for(var b=b||[],c=c||[],f=b,g=c,e=[],h=0;h<=g.length;h++)e[h]=
[];for(var h=0,j=Math.min(f.length,d);h<=j;h++)e[0][h]=h;h=1;for(j=Math.min(g.length,d);h<=j;h++)e[h][0]=h;for(var j=f.length,k,i=g.length,h=1;h<=j;h++){k=Math.max(1,h-d);for(var l=Math.min(i,h+d);k<=l;k++)e[k][h]=f[h-1]===g[k-1]?e[k-1][h-1]:Math.min(e[k-1][h]===n?Number.MAX_VALUE:e[k-1][h]+1,e[k][h-1]===n?Number.MAX_VALUE:e[k][h-1]+1)}d=b.length;f=c.length;g=[];h=e[f][d];if(h===n)e=s;else{for(;0<d||0<f;){j=e[f][d];i=0<f?e[f-1][d]:h+1;l=0<d?e[f][d-1]:h+1;k=0<f&&0<d?e[f-1][d-1]:h+1;if(i===n||i<j-1)i=
h+1;if(l===n||l<j-1)l=h+1;k<j-1&&(k=h+1);i<=l&&i<k?(g.push({status:"added",value:c[f-1]}),f--):(l<i&&l<k?g.push({status:"deleted",value:b[d-1]}):(g.push({status:"retained",value:b[d-1]}),f--),d--)}e=g.reverse()}return e}})();a.b("utils.compareArrays",a.a.O);(function(){function b(a){if(2<a.length){for(var b=a[0],c=a[a.length-1],e=[b];b!==c;){b=b.nextSibling;if(!b)return;e.push(b)}Array.prototype.splice.apply(a,[0,a.length].concat(e))}}function c(c,f,g,e,h){var j=[],c=a.h(function(){var c=f(g,h)||
[];0<j.length&&(b(j),a.a.Na(j,c),e&&e(g,c));j.splice(0,j.length);a.a.N(j,c)},s,{disposeWhenNodeIsRemoved:c,disposeWhen:function(){return 0==j.length||!a.a.fa(j[0])}});return{xb:j,h:c}}a.a.Oa=function(d,f,g,e,h){for(var f=f||[],e=e||{},j=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===n,k=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],i=a.a.T(k,function(a){return a.$a}),l=a.a.O(i,f),f=[],q=0,o=[],v=0,i=[],u=s,r=0,w=l.length;r<w;r++)switch(l[r].status){case "retained":var y=
k[q];y.qb(v);v=f.push(y);0<y.P.length&&(u=y.P[y.P.length-1]);q++;break;case "deleted":k[q].h.A();b(k[q].P);a.a.v(k[q].P,function(a){o.push({element:a,index:r,value:l[r].value});u=a});q++;break;case "added":for(var y=l[r].value,x=a.m(v),v=c(d,g,y,h,x),C=v.xb,v=f.push({$a:l[r].value,P:C,h:v.h,qb:x}),z=0,B=C.length;z<B;z++){var D=C[z];i.push({element:D,index:r,value:l[r].value});u==s?a.e.Ka(d,D):a.e.Fa(d,D,u);u=D}h&&h(y,C,x)}a.a.v(o,function(b){a.F(b.element)});g=t;if(!j){if(e.afterAdd)for(r=0;r<i.length;r++)e.afterAdd(i[r].element,
i[r].index,i[r].value);if(e.beforeRemove){for(r=0;r<o.length;r++)e.beforeRemove(o[r].element,o[r].index,o[r].value);g=p}}if(!g&&o.length)for(r=0;r<o.length;r++)e=o[r].element,e.parentNode&&e.parentNode.removeChild(e);a.a.f.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",f)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Oa);a.q=function(){this.allowTemplateRewriting=t};a.q.prototype=new a.t;a.q.prototype.renderTemplateSource=function(b){var c=!(9>a.a.ja)&&b.nodes?b.nodes():s;
if(c)return a.a.L(c.cloneNode(p).childNodes);b=b.text();return a.a.pa(b)};a.q.K=new a.q;a.ra(a.q.K);a.b("nativeTemplateEngine",a.q);(function(){a.ma=function(){var a=this.vb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,f,g){g=g||{};2>a&&m(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var e=b.data("precompiled");
e||(e=b.text()||"",e=jQuery.template(s,"{{ko_with $item.koBindingContext}}"+e+"{{/ko_with}}"),b.data("precompiled",e));b=[f.$data];f=jQuery.extend({koBindingContext:f},g.templateOptions);f=jQuery.tmpl(e,b,f);f.appendTo(document.createElement("div"));jQuery.fragments={};return f};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){document.write("<script type='text/html' id='"+a+"'>"+b+"<\/script>")};0<a&&(jQuery.tmpl.tag.ko_code=
{open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.ma.prototype=new a.t;var b=new a.ma;0<b.vb&&a.ra(b);a.b("jqueryTmplTemplateEngine",a.ma)})()}"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?E(module.exports||exports):"function"===typeof define&&define.amd?define(["exports"],E):E(window.ko={});p;
})(window,document,navigator);
@@ -1,20 +0,0 @@
/// Knockout Mapping plugin v2.2.4
/// (c) 2012 Steven Sanderson, Roy Jacobs - http://knockoutjs.com/
/// License: MIT (http://www.opensource.org/licenses/mit-license.php)
(function(d){"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?d(require("knockout"),exports):"function"===typeof define&&define.amd?define(["knockout","exports"],d):d(ko,ko.mapping={})})(function(d,e){function u(a,c){for(var b in c)c.hasOwnProperty(b)&&c[b]&&(b&&a[b]&&"array"!==e.getType(a[b])?u(a[b],c[b]):a[b]=c[b])}function A(a,c){var b={};u(b,a);u(b,c);return b}function H(a,c){options=A({},a);for(var b=K.length-1;0<=b;b--){var d=K[b];options[d]&&(options[""]instanceof
Object||(options[""]={}),options[""][d]=options[d],delete options[d])}c&&(options.ignore=j(c.ignore,options.ignore),options.include=j(c.include,options.include),options.copy=j(c.copy,options.copy));options.ignore=j(options.ignore,g.ignore);options.include=j(options.include,g.include);options.copy=j(options.copy,g.copy);options.mappedProperties=options.mappedProperties||{};return options}function j(a,c){"array"!==e.getType(a)&&(a="undefined"===e.getType(a)?[]:[a]);"array"!==e.getType(c)&&(c="undefined"===
e.getType(c)?[]:[c]);return d.utils.arrayGetDistinctValues(a.concat(c))}function B(a,c,b,f,h,x){var C="array"===e.getType(d.utils.unwrapObservable(c)),x=x||"";if(e.isMapped(a))var k=d.utils.unwrapObservable(a)[n],b=A(k,b);var g=function(){return b[f]&&b[f].create instanceof Function},o=function(a){var e=D,E=d.dependentObservable;d.dependentObservable=function(a,b,c){c=c||{};a&&"object"==typeof a&&(c=a);var f=c.deferEvaluation,L=!1;c.deferEvaluation=!0;a=new I(a,b,c);if(!f){var h=a,a=I({read:function(){L||
(d.utils.arrayRemoveItem(e,h),L=!0);return h.apply(h,arguments)},write:h.hasWriteFunction&&function(a){return h(a)},deferEvaluation:!0});e.push(a)}return a};d.dependentObservable.fn=I.fn;d.computed=d.dependentObservable;a=b[f].create({data:a||c,parent:h});d.dependentObservable=E;d.computed=d.dependentObservable;return a},v=function(){return b[f]&&b[f].update instanceof Function},r=function(a,e){var E={data:e||c,parent:h,target:d.utils.unwrapObservable(a)};d.isWriteableObservable(a)&&(E.observable=
a);return b[f].update(E)};if(k=F.get(c))return k;f=f||"";if(C){var C=[],p=!1,i=function(a){return a};b[f]&&b[f].key&&(i=b[f].key,p=!0);d.isObservable(a)||(a=d.observableArray([]),a.mappedRemove=function(b){var c=typeof b=="function"?b:function(a){return a===i(b)};return a.remove(function(a){return c(i(a))})},a.mappedRemoveAll=function(b){var c=y(b,i);return a.remove(function(a){return d.utils.arrayIndexOf(c,i(a))!=-1})},a.mappedDestroy=function(b){var c=typeof b=="function"?b:function(a){return a===
i(b)};return a.destroy(function(a){return c(i(a))})},a.mappedDestroyAll=function(b){var c=y(b,i);return a.destroy(function(a){return d.utils.arrayIndexOf(c,i(a))!=-1})},a.mappedIndexOf=function(b){var c=y(a(),i),b=i(b);return d.utils.arrayIndexOf(c,b)},a.mappedCreate=function(b){if(a.mappedIndexOf(b)!==-1)throw Error("There already is an object with the key that you specified.");var c=g()?o(b):b;if(v()){b=r(c,b);d.isWriteableObservable(c)?c(b):c=b}a.push(c);return c});var k=y(d.utils.unwrapObservable(a),
i).sort(),l=y(c,i);p&&l.sort();var p=d.utils.compareArrays(k,l),k={},j,w=d.utils.unwrapObservable(c),t={},u=!0,l=0;for(j=w.length;l<j;l++){var m=i(w[l]);if(void 0===m||m instanceof Object){u=!1;break}t[m]=w[l]}w=[];l=0;for(j=p.length;l<j;l++){var m=p[l],q,s=x+"["+l+"]";switch(m.status){case "added":var z=u?t[m.value]:G(d.utils.unwrapObservable(c),m.value,i);q=B(void 0,z,b,f,a,s);g()||(q=d.utils.unwrapObservable(q));s=M(d.utils.unwrapObservable(c),z,k);w[s]=q;k[s]=!0;break;case "retained":z=u?t[m.value]:
G(d.utils.unwrapObservable(c),m.value,i);q=G(a,m.value,i);B(q,z,b,f,a,s);s=M(d.utils.unwrapObservable(c),z,k);w[s]=q;k[s]=!0;break;case "deleted":q=G(a,m.value,i)}C.push({event:m.status,item:q})}a(w);b[f]&&b[f].arrayChanged&&d.utils.arrayForEach(C,function(a){b[f].arrayChanged(a.event,a.item)})}else if(N(c)){a=d.utils.unwrapObservable(a);if(!a){if(g())return p=o(),v()&&(p=r(p)),p;if(v())return r(p);a={}}v()&&(a=r(a));F.save(c,a);O(c,function(f){var e=x.length?x+"."+f:f;if(-1==d.utils.arrayIndexOf(b.ignore,
e))if(-1!=d.utils.arrayIndexOf(b.copy,e))a[f]=c[f];else{var h=F.get(c[f])||B(a[f],c[f],b,f,a,e);if(d.isWriteableObservable(a[f]))a[f](d.utils.unwrapObservable(h));else a[f]=h;b.mappedProperties[e]=!0}})}else switch(e.getType(c)){case "function":v()?d.isWriteableObservable(c)?(c(r(c)),a=c):a=r(c):a=c;break;default:d.isWriteableObservable(a)?v()?a(r(a)):a(d.utils.unwrapObservable(c)):(a=g()?o():d.observable(d.utils.unwrapObservable(c)),v()&&a(r(a)))}return a}function M(a,c,b){for(var d=0,e=a.length;d<
e;d++)if(!0!==b[d]&&a[d]===c)return d;return null}function P(a,c){var b;c&&(b=c(a));"undefined"===e.getType(b)&&(b=a);return d.utils.unwrapObservable(b)}function G(a,c,b){for(var a=d.utils.unwrapObservable(a),f=0,e=a.length;f<e;f++){var g=a[f];if(P(g,b)===c)return g}throw Error("When calling ko.update*, the key '"+c+"' was not found!");}function y(a,c){return d.utils.arrayMap(d.utils.unwrapObservable(a),function(a){return c?P(a,c):a})}function O(a,c){if("array"===e.getType(a))for(var b=0;b<a.length;b++)c(b);
else for(b in a)c(b)}function N(a){var c=e.getType(a);return("object"===c||"array"===c)&&null!==a}function R(){var a=[],c=[];this.save=function(b,f){var e=d.utils.arrayIndexOf(a,b);0<=e?c[e]=f:(a.push(b),c.push(f))};this.get=function(b){b=d.utils.arrayIndexOf(a,b);return 0<=b?c[b]:void 0}}function Q(){var a={},c=function(b){var c;try{c=JSON.stringify(b)}catch(d){c="$$$"}b=a[c];void 0===b&&(b=new R,a[c]=b);return b};this.save=function(a,d){c(a).save(a,d)};this.get=function(a){return c(a).get(a)}}var n=
"__ko_mapping__",I=d.dependentObservable,J=0,D,F,K=["create","update","key","arrayChanged"],t={include:["_destroy"],ignore:[],copy:[]},g=t;e.isMapped=function(a){return(a=d.utils.unwrapObservable(a))&&a[n]};e.fromJS=function(a){if(0==arguments.length)throw Error("When calling ko.fromJS, pass the object you want to convert.");window.setTimeout(function(){J=0},0);J++||(D=[],F=new Q);var c,b;2==arguments.length&&(arguments[1][n]?b=arguments[1]:c=arguments[1]);3==arguments.length&&(c=arguments[1],b=arguments[2]);
b&&(c=A(c,b[n]));c=H(c);var d=B(b,a,c);b&&(d=b);--J||window.setTimeout(function(){for(;D.length;){var a=D.pop();a&&a()}},0);d[n]=A(d[n],c);return d};e.fromJSON=function(a){var c=d.utils.parseJson(a);arguments[0]=c;return e.fromJS.apply(this,arguments)};e.updateFromJS=function(){throw Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!");};e.updateFromJSON=function(){throw Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!");
};e.toJS=function(a,c){g||e.resetDefaultOptions();if(0==arguments.length)throw Error("When calling ko.mapping.toJS, pass the object you want to convert.");if("array"!==e.getType(g.ignore))throw Error("ko.mapping.defaultOptions().ignore should be an array.");if("array"!==e.getType(g.include))throw Error("ko.mapping.defaultOptions().include should be an array.");if("array"!==e.getType(g.copy))throw Error("ko.mapping.defaultOptions().copy should be an array.");c=H(c,a[n]);return e.visitModel(a,function(a){return d.utils.unwrapObservable(a)},
c)};e.toJSON=function(a,c){var b=e.toJS(a,c);return d.utils.stringifyJson(b)};e.defaultOptions=function(){if(0<arguments.length)g=arguments[0];else return g};e.resetDefaultOptions=function(){g={include:t.include.slice(0),ignore:t.ignore.slice(0),copy:t.copy.slice(0)}};e.getType=function(a){if(a&&"object"===typeof a){if(a.constructor==(new Date).constructor)return"date";if("[object Array]"===Object.prototype.toString.call(a))return"array"}return typeof a};e.visitModel=function(a,c,b){b=b||{};b.visitedObjects=
b.visitedObjects||new Q;var f,h=d.utils.unwrapObservable(a);if(N(h))b=H(b,h[n]),c(a,b.parentName),f="array"===e.getType(h)?[]:{};else return c(a,b.parentName);b.visitedObjects.save(a,f);var g=b.parentName;O(h,function(a){if(!(b.ignore&&-1!=d.utils.arrayIndexOf(b.ignore,a))){var k=h[a],j=b,o=g||"";"array"===e.getType(h)?g&&(o+="["+a+"]"):(g&&(o+="."),o+=a);j.parentName=o;if(!(-1===d.utils.arrayIndexOf(b.copy,a)&&-1===d.utils.arrayIndexOf(b.include,a)&&h[n]&&h[n].mappedProperties&&!h[n].mappedProperties[a]&&
"array"!==e.getType(h)))switch(e.getType(d.utils.unwrapObservable(k))){case "object":case "array":case "undefined":j=b.visitedObjects.get(k);f[a]="undefined"!==e.getType(j)?j:e.visitModel(k,c,b);break;default:f[a]=c(k,b.parentName)}}});return f}});
@@ -986,6 +986,12 @@ namespace Umbraco.Web.Editors
Logger.Warn<ContentController>("Content sorting failed, this was probably caused by an event being cancelled");
return Request.CreateValidationErrorResponse("Content sorting failed, this was probably caused by an event being cancelled");
}
if (sorted.ParentId > 0)
{
Services.NotificationService.SendNotification(contentService.GetById(sorted.ParentId), ActionSort.Instance, UmbracoContext, Services.TextService, GlobalSettings);
}
return Request.CreateResponse(HttpStatusCode.OK);
}
catch (Exception ex)
@@ -117,7 +117,7 @@ namespace Umbraco.Web.Trees
//these two are the standard items
menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias));
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias), true).ConvertLegacyMenuItem(null, "content", "content");
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias), true);
//filter the standard items
FilterUserAllowedMenuItems(menu, nodeActions);
@@ -228,12 +228,11 @@ namespace Umbraco.Web.Trees
AddActionNode<ActionCopy>(item, menu);
AddActionNode<ActionChangeDocType>(item, menu, convert: true);
AddActionNode<ActionSort>(item, menu, true, true);
AddActionNode<ActionSort>(item, menu, true);
AddActionNode<ActionRollback>(item, menu, convert: true);
AddActionNode<ActionAudit>(item, menu, convert: true);
AddActionNode<ActionToPublish>(item, menu, convert: true);
AddActionNode<ActionAssignDomain>(item, menu, convert: true);
AddActionNode<ActionAssignDomain>(item, menu);
AddActionNode<ActionRights>(item, menu, convert: true);
AddActionNode<ActionProtect>(item, menu, true, true);
@@ -216,12 +216,6 @@ namespace Umbraco.Web.Trees
new LegacyUrlAction(
"createFolder.aspx?nodeId=" + nodeId + "&nodeType=" + nodeType + "&nodeName=" + nodeName + "&rnd=" + DateTime.UtcNow.Ticks,
Current.Services.TextService.Localize("actions/create")));
case "UmbClientMgr.appActions().actionSort()":
return Attempt.Succeed(
new LegacyUrlAction(
"dialogs/sort.aspx?id=" + nodeId + "&nodeType=" + nodeType + "&app=" + currentSection + "&rnd=" + DateTime.UtcNow.Ticks,
Current.Services.TextService.Localize("actions/sort")));
case "UmbClientMgr.appActions().actionProtect()":
return Attempt.Succeed(
new LegacyUrlAction(
@@ -257,11 +251,6 @@ namespace Umbraco.Web.Trees
new LegacyUrlAction(
"dialogs/republish.aspx?rnd=" + DateTime.UtcNow.Ticks,
Current.Services.TextService.Localize("actions/republish")));
case "UmbClientMgr.appActions().actionAssignDomain()":
return Attempt.Succeed(
new LegacyUrlAction(
"dialogs/assignDomain2.aspx?id=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks,
Current.Services.TextService.Localize("actions/assignDomain")));
case "UmbClientMgr.appActions().actionSendToTranslate()":
return Attempt.Succeed(
new LegacyUrlAction(
@@ -273,11 +262,6 @@ namespace Umbraco.Web.Trees
new LegacyUrlAction(
"dialogs/importDocumentType.aspx",
Current.Services.TextService.Localize("actions/importDocumentType")));
case "UmbClientMgr.appActions().actionAudit()":
return Attempt.Succeed(
new LegacyUrlAction(
"dialogs/viewAuditTrail.aspx?nodeId=" + nodeId + "&rnd=" + DateTime.UtcNow.Ticks,
Current.Services.TextService.Localize("actions/auditTrail")));
}
return Attempt<LegacyUrlAction>.Fail();
+2 -2
View File
@@ -96,7 +96,7 @@ namespace Umbraco.Web.Trees
// root actions
menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias));
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias), true).ConvertLegacyMenuItem(null, "media", "media");
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias), true);
menu.Items.Add<RefreshNode, ActionRefresh>(Services.TextService.Localize("actions", ActionRefresh.Instance.Alias), true);
return menu;
}
@@ -125,7 +125,7 @@ namespace Umbraco.Web.Trees
menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias));
menu.Items.Add<ActionMove>(Services.TextService.Localize("actions", ActionMove.Instance.Alias));
menu.Items.Add<ActionDelete>(Services.TextService.Localize("actions", ActionDelete.Instance.Alias));
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias)).ConvertLegacyMenuItem(item, "media", "media");
menu.Items.Add<ActionSort>(Services.TextService.Localize("actions", ActionSort.Instance.Alias));
menu.Items.Add<ActionRefresh>(Services.TextService.Localize("actions", ActionRefresh.Instance.Alias), true);
//if the media item is in the recycle bin, don't have a default menu, just show the regular menu
+2 -11
View File
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
@@ -10,12 +6,7 @@ namespace Umbraco.Web.UI.Bundles
/// <summary>
/// The core libs that have no dependencies
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient", Priority = 0, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoUtils.js", "UmbracoClient", Priority = 1, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "ui/json2.js", "UmbracoClient", Priority = 2, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "ui/base2.js", "UmbracoClient", Priority = 3, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "UI/knockout.js", "UmbracoClient", Priority = 4, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "UI/knockout.mapping.js", "UmbracoClient", Priority = 5, Group = 0)]
[ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/NamespaceManager.js", "UmbracoRoot", Priority = 0, Group = 0)]
public class JsApplicationLib : Control
{
}
+1 -2
View File
@@ -6,8 +6,7 @@ namespace Umbraco.Web.UI.Bundles
/// <summary>
/// The core Jquery libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient", Priority = 0, Group = 1)]
[ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient", Priority = 1, Group = 1)]
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery/jquery.min.js", "UmbracoRoot", Priority = 1, Group = 1)]
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery-migrate/jquery-migrate.min.js", "UmbracoRoot", Priority = 2, Group = 1)]
public class JsJQueryCore : Control
{
@@ -1,11 +1,10 @@
using System.Web.UI;
using ClientDependency.Core;
namespace Umbraco.Web.UI.Bundles
{
/// <summary>
/// The core Jquery libs
/// </summary>
/// <summary>
/// The core Jquery libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "modal/jquery.simplemodal.1.4.1.custom.js", "UmbracoClient", Priority = 2, Group = 4)]
[ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.cookie.js", "UmbracoClient", Priority = 3, Group = 4)]
[ClientDependency(ClientDependencyType.Javascript, "Application/JQuery/jquery.metadata.min.js", "UmbracoClient", Priority = 4, Group = 4)]
@@ -6,9 +6,7 @@ namespace Umbraco.Web.UI.Bundles
/// <summary>
/// The core libs that require JQuery to be loaded
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "Application/Extensions.js", "UmbracoClient", Priority = 0, Group = 2)]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoApplicationActions.js", "UmbracoClient", Priority = 1, Group = 2)]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient", Priority = 3, Group = 3)]
[ClientDependency(ClientDependencyType.Javascript, "lib/umbraco/LegacyUmbClientMgr.js", "UmbracoRoot", Priority = 1, Group = 2)]
public class JsUmbracoApplicationCore : Control
{
}
@@ -6,11 +6,8 @@ namespace Umbraco.Web.UI.Bundles
/// <summary>
/// The UI Umbraco libs
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "ui/default.js", "UmbracoClient", Priority = 0, Group = 5)]
[ClientDependency(ClientDependencyType.Javascript, "js/guiFunctions.js", "UmbracoRoot", Priority = 1, Group = 5)]
[ClientDependency(ClientDependencyType.Javascript, "modal/modal.js", "UmbracoClient", Priority = 2, Group = 5)]
[ClientDependency(ClientDependencyType.Javascript, "js/UmbracoSpeechBubbleBackend.js", "UmbracoRoot", Priority = 3, Group = 5)]
[ClientDependency(ClientDependencyType.Javascript, "modal/modal.js", "UmbracoClient", Priority = 2, Group = 5)]
public class JsUmbracoApplicationUI : Control
{
}
@@ -1,144 +0,0 @@
using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.UI;
using ClientDependency.Core;
using Umbraco.Core.IO;
using Umbraco.Web.Composing;
namespace Umbraco.Web.UI.Controls
{
/// <summary>
/// Represents the 'insert macro' button when editing a template which includes the drop down list selector
/// </summary>
/// <remarks>
/// Though this would be nicer to do in a UserControl, unfortunatley the way that the ScrollingMenu control is designed it seems that
/// we have to insert all items via code and loading a UserControl in dynamically is equally ugly.
/// </remarks>
[ClientDependency(ClientDependencyType.Css, "splitbutton/splitbutton.css", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "splitbutton/jquery.splitbutton.js", "UmbracoClient", Priority = 100)]
[ClientDependency(ClientDependencyType.Javascript, "splitbutton/InsertMacroSplitButton.js", "UmbracoClient", Priority = 101)]
internal class InsertMacroSplitButton : UmbracoControl
{
protected LiteralControl ListContainer;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
EnsureChildControls();
}
/// <summary>
/// The JS callback to display the dialog modal screen to customize the macro to be inserted into the editor if the
/// macro has parameters.
/// </summary>
public string ClientCallbackOpenMacroModel { get; set; }
/// <summary>
/// The JS callback method which accepts an 'alias' parameter that is invoked when clicking the macro button
/// to insert a macro that has no parameters.
/// </summary>
public string ClientCallbackInsertMacroMarkup { get; set; }
protected override void CreateChildControls()
{
base.CreateChildControls();
//var menuItemsId = ClientID + "menuitems";
//var placeHolderId = ClientID + "sbPlaceholder";
/*create the list, similar to this, but swap the repeater for real html:
<div id="macroMenu" style="width: 285px">
<asp:Repeater ID="rpt_macros" runat="server">
<ItemTemplate>
<div class="macro" rel="<%# DataBinder.Eval(Container, "DataItem.macroAlias")%>"
data-has-params="<%# DoesMacroHaveSettings(DataBinder.Eval(Container, "DataItem.id").ToString()) %>">
<%# DataBinder.Eval(Container, "DataItem.macroName")%>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
*/
//Create the drop down menu list first (it is hidden)
var divMacroItemContainer = new TagBuilder("div");
divMacroItemContainer.Attributes.Add("style", "width: 285px;display:none;");
divMacroItemContainer.Attributes.Add("class", "sbMenu");
var macros = Services.MacroService.GetAll().OrderBy(x => x.Name);
foreach (var macro in macros)
{
var divMacro = new TagBuilder("div");
divMacro.AddCssClass("macro-item");
divMacro.Attributes.Add("rel", macro.Alias);
divMacro.Attributes.Add("data-has-params", DoesMacroHaveParameters(macro.Id).ToString().ToLower());
divMacro.SetInnerText(macro.Name);
divMacroItemContainer.InnerHtml += divMacro.ToString();
}
/*create the button itself, similar to this:
<div id="splitButtonMacro" style="display: inline; height: 23px; vertical-align: top;">
<a href="javascript:openMacroModal();" class="sbLink">
<img alt="Insert Macro" src="../images/editor/insMacroSB.png" title="Insert Macro"
style="vertical-align: top;">
</a>
</div>
*/
var divSplitButtonWrapper = new TagBuilder("div");
divSplitButtonWrapper.AddCssClass("sbPlaceHolder");
divSplitButtonWrapper.Attributes.Add("id", ClientID + "sbPlaceholder");
var divButton = new TagBuilder("div");
divButton.Attributes.Add("style", "display: inline; height: 23px; vertical-align: top;");
var aButton = new TagBuilder("a");
aButton.Attributes.Add("href", "#"); //will be bound with jquery
aButton.AddCssClass("sbLink");
var imgButton = new TagBuilder("img");
imgButton.Attributes.Add("alt", "Insert Macro");
imgButton.Attributes.Add("src", this.ResolveUrl(SystemDirectories.Umbraco + "/images/editor/insMacroSB.png"));
imgButton.Attributes.Add("title", "Insert Macro");
imgButton.Attributes.Add("style", "vertical-align: top;");
aButton.InnerHtml = imgButton.ToString();
divButton.InnerHtml = aButton.ToString();
divSplitButtonWrapper.InnerHtml = divButton.ToString();
ListContainer = new LiteralControl(divMacroItemContainer.ToString() + divSplitButtonWrapper.ToString());
Controls.Add(ListContainer);
// Page.ClientScript.RegisterStartupScript(
// typeof(InsertMacroSplitButton),
// ClientID,
// @"jQuery(document).ready(function() {
// jQuery('#" + placeHolderId + " a.sbLink').splitbutton({menu:'#" + menuItemsId + "'}); " +
// "});",
// true);
Page.ClientScript.RegisterStartupScript(
typeof(InsertMacroSplitButton),
typeof(InsertMacroSplitButton).Name, //same key for all instancees, we should only render once
@"jQuery(document).ready(function() {
var splitButton = new Umbraco.Controls.InsertMacroSplitButton({
openMacroModel: " + ClientCallbackOpenMacroModel + @",
insertMacroMarkup: " + ClientCallbackInsertMacroMarkup + @"
});
splitButton.init();
});",
true);
}
private bool DoesMacroHaveParameters(int macroId)
{
bool hasParameters;
using (var scope = Current.ScopeProvider.CreateScope())
{
hasParameters = scope.Database.ExecuteScalar<int>("SELECT COUNT(*) from cmsMacroProperty where macro=@macroId", new { macroId }) > 0;
scope.Complete();
}
return hasParameters;
}
}
}
+6 -49
View File
@@ -441,6 +441,9 @@
<Compile Include="Trees\UserPermissionsTreeController.cs" />
<Compile Include="Trees\UserTreeController.cs" />
<Compile Include="Trees\UsersTreeController.cs" />
<Compile Include="UI\Bundles\JsApplicationLib.cs" />
<Compile Include="UI\Bundles\JsJQueryPlugins.cs" />
<Compile Include="UI\Bundles\JsUmbracoApplicationCore.cs" />
<Compile Include="umbraco.presentation\umbraco\developer\Packages\installer.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -461,7 +464,6 @@
<Compile Include="Editors\NuCacheStatusController.cs" />
<Compile Include="_Legacy\Actions\Action.cs" />
<Compile Include="_Legacy\Actions\ActionAssignDomain.cs" />
<Compile Include="_Legacy\Actions\ActionAudit.cs" />
<Compile Include="_Legacy\Actions\ActionBrowse.cs" />
<Compile Include="_Legacy\Actions\ActionChangeDocType.cs" />
<Compile Include="_Legacy\Actions\ActionCollection.cs" />
@@ -960,10 +962,7 @@
<Compile Include="UI\JavaScript\ServerVariablesParser.cs" />
<Compile Include="Migrations\RebuildXmlCachesAfterUpgrade.cs" />
<Compile Include="Components\PublicAccessComponent.cs" />
<Compile Include="UI\Bundles\JsApplicationLib.cs" />
<Compile Include="UI\Bundles\JsJQueryCore.cs" />
<Compile Include="UI\Bundles\JsJQueryPlugins.cs" />
<Compile Include="UI\Bundles\JsUmbracoApplicationCore.cs" />
<Compile Include="UI\Bundles\JsUmbracoApplicationUI.cs" />
<Compile Include="UI\Bundles\JsUmbracoTree.cs" />
<Compile Include="UI\CdfLogger.cs" />
@@ -979,13 +978,6 @@
<Compile Include="umbraco.presentation\umbraco\dialogs\create.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx.cs">
<DependentUpon>AssignDomain2.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx.designer.cs">
<DependentUpon>AssignDomain2.aspx</DependentUpon>
</Compile>
<Compile Include="Controllers\UmbLoginController.cs" />
<Compile Include="UrlHelperExtensions.cs" />
<Compile Include="Editors\MediaController.cs" />
@@ -1078,7 +1070,6 @@
<Compile Include="Templates\TemplateUtilities.cs" />
<Compile Include="Trees\PartialViewMacrosTreeController.cs" />
<Compile Include="Trees\PartialViewsTreeController.cs" />
<Compile Include="UI\Controls\InsertMacroSplitButton.cs" />
<Compile Include="UI\IAssignedApp.cs" />
<Compile Include="_Legacy\BusinessLogic\Task.cs" />
<Compile Include="_Legacy\BusinessLogic\Tasks.cs" />
@@ -1095,7 +1086,6 @@
<Compile Include="_Legacy\Controls\Panel.cs" />
<Compile Include="_Legacy\Controls\ProgressBar.cs" />
<Compile Include="_Legacy\Controls\PropertyPanel.cs" />
<Compile Include="_Legacy\Controls\ScrollingMenu.cs" />
<Compile Include="_Legacy\Controls\Splitter.cs" />
<Compile Include="_Legacy\Controls\TabPage.cs" />
<Compile Include="_Legacy\Controls\TabView.cs" />
@@ -1141,9 +1131,6 @@
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\MacroCacheContent.cs" />
<Compile Include="umbraco.presentation\umbraco\dialogs\sort.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\masterpages\default.Master.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -1320,27 +1307,6 @@
<Compile Include="umbraco.presentation\umbraco\dialogs\sendToTranslation.aspx.designer.cs">
<DependentUpon>sendToTranslation.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\viewAuditTrail.aspx.cs">
<DependentUpon>viewAuditTrail.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\viewAuditTrail.aspx.designer.cs">
<DependentUpon>viewAuditTrail.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx.cs">
<DependentUpon>DictionaryItemList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx.designer.cs">
<DependentUpon>DictionaryItemList.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx.cs">
<DependentUpon>EditDictionaryItem.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx.designer.cs">
<DependentUpon>EditDictionaryItem.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\Trees\ITreeService.cs">
<SubType>Code</SubType>
</Compile>
@@ -1444,17 +1410,11 @@
</ItemGroup>
<ItemGroup>
<Content Include="umbraco.presentation\umbraco\webservices\CheckForUpgrade.asmx" />
<Content Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\translation\default.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\translation\preview.aspx" />
<Content Include="umbraco.presentation\umbraco\translation\xml.aspx" />
<Content Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<!--<Content Include="umbraco.presentation\umbraco\users\PermissionEditor.aspx" />-->
<Content Include="umbraco.presentation\umbraco\webservices\legacyAjaxCalls.asmx" />
<Content Include="umbraco.presentation\umbraco\webservices\nodeSorter.asmx" />
@@ -1468,9 +1428,6 @@
</Content>
<Content Include="umbraco.presentation\umbraco\developer\RelationTypes\RelationTypesWebService.asmx" />
<Content Include="umbraco.presentation\umbraco\dashboard\FeedProxy.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\AssignDomain2.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\dialogs\Preview.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\empty.htm" />
<Content Include="umbraco.presentation\umbraco\dialogs\insertMasterpageContent.aspx">
@@ -1495,9 +1452,6 @@
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\dialogs\sendToTranslation.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\viewAuditTrail.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="Web References\org.umbraco.update\checkforupgrade.disco" />
@@ -1551,6 +1505,9 @@
<CachedSettingsPropName>umbraco_org_umbraco_update_CheckForUpgrade</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<ItemGroup>
<Folder Include="umbraco.presentation\umbraco\settings\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!--
copied from Microsoft.CSharp.targets
@@ -27,7 +27,7 @@ namespace Umbraco.Web._Legacy.Actions
{
get
{
return string.Format("{0}.actionAssignDomain()", ClientTools.Scripts.GetAppActions);
return null;
}
}
@@ -1,75 +0,0 @@
using System;
using Umbraco.Core;
using Umbraco.Core.CodeAnnotations;
using Umbraco.Web.UI.Pages;
namespace Umbraco.Web._Legacy.Actions
{
/// <summary>
/// This action is invoked upon viewing audittrailing on a document
/// </summary>
[ActionMetadata(Constants.Conventions.PermissionCategories.AdministrationCategory)]
public class ActionAudit : IAction
{
public static ActionAudit Instance { get; } = new ActionAudit();
#region IAction Members
public char Letter
{
get
{
return 'Z';
}
}
public string JsFunctionName
{
get
{
return string.Format("{0}.actionAudit()", ClientTools.Scripts.GetAppActions);
}
}
public string JsSource
{
get
{
return null;
}
}
public string Alias
{
get
{
return "auditTrail";
}
}
public string Icon
{
get
{
return "time";
}
}
public bool ShowInNotifier
{
get
{
return false;
}
}
public bool CanBePermissionAssigned
{
get
{
return true;
}
}
#endregion
}
}
@@ -36,7 +36,7 @@ namespace Umbraco.Web._Legacy.Actions
{
get
{
return string.Format("{0}.actionSort()", ClientTools.Scripts.GetAppActions);
return null;
}
}
@@ -1,24 +1,12 @@
using System;
using System.Web.UI;
using ClientDependency.Core;
using ClientDependency.Core.Controls;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.cms.businesslogic;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Services;
namespace Umbraco.Web._Legacy.Controls
{
/*
[ClientDependency(0, ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "modal/style.css", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "modal/modal.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoUtils.js", "UmbracoClient")]*/
[ValidationProperty("Value")]
public abstract class BaseTreePicker : Control, INamingContainer
{
@@ -6,7 +6,6 @@ namespace Umbraco.Web._Legacy.Controls
{
public class UmbracoPanel : Panel
{
private ScrollingMenu _menu = new ScrollingMenu();
private bool _hasMenu = false;
private string _StatusBarText = "";
@@ -43,10 +42,6 @@ namespace Umbraco.Web._Legacy.Controls
set { _StatusBarText = value; }
}
public ScrollingMenu Menu
{
get { return _menu; }
}
protected override void OnInit(EventArgs e)
{
@@ -88,7 +83,6 @@ namespace Umbraco.Web._Legacy.Controls
rightcol.TagName = "span";
rightcol.Attributes.Add("class", "span4");
rightcol.Controls.Add(Menu);
row.Controls.Add(rightcol);
body.TagName = "div";
@@ -1,154 +0,0 @@
using System;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Umbraco.Web._Legacy.Controls
{
[ToolboxData("<{0}:ScrollingMenu runat=server></{0}:ScrollingMenu>")]
public class ScrollingMenu : System.Web.UI.WebControls.PlaceHolder
{
public ArrayList Icons = new ArrayList();
private string iconIds;
private int extraMenuWidth = 0;
public MenuIconI NewIcon(int Index)
{
MenuIcon Icon = new MenuIcon();
Icons.Insert(Index, Icon);
return Icon;
}
public MenuIconI NewIcon()
{
MenuIcon icon = new MenuIcon();
Icons.Add(icon);
return icon;
}
public MenuButton NewButton(int index = -1)
{
MenuButton btn = new MenuButton();
if (index > -1)
Icons.Insert(index, btn);
else
Icons.Add(btn);
return btn;
}
public MenuImageButton NewImageButton()
{
MenuImageButton icon = new MenuImageButton();
Icons.Add(icon);
return icon;
}
public MenuImageButton NewImageButton(int Index)
{
MenuImageButton icon = new MenuImageButton();
Icons.Insert(Index, icon);
return icon;
}
public System.Web.UI.WebControls.DropDownList NewDropDownList()
{
DropDownList Icon = new DropDownList();
Icons.Add(Icon);
return Icon;
}
public void NewElement(string ElementName, string ElementId, string ElementClass, int ExtraWidth)
{
Icons.Add(new LiteralControl("<" + ElementName + " class=\"" + ElementClass + "\" id=\"" + ElementId + "\"></" + ElementName + ">"));
extraMenuWidth = extraMenuWidth + ExtraWidth;
}
public void InsertSplitter()
{
Splitter icon = new Splitter();
Icons.Add(icon);
}
public void InsertSplitter(int Index)
{
Splitter icon = new Splitter();
Icons.Insert(Index, icon);
}
/// <summary>
/// Inserts a new web control into the scrolling menu
/// </summary>
/// <param name="control"></param>
/// <param name="extraWidth">The additional width to extend the scrolling menu by if the control being inserted is wider than the standard</param>
public void InsertNewControl(Control control, int extraWidth = 0)
{
Icons.Add(control);
// _extraMenuWidth = _extraMenuWidth + extraWidth;
}
/// <summary>
/// Finds the index of the n-th Splitter in this Menu
/// </summary>
/// <param name="n"></param>
/// <returns>The index of the n-th Splitter, or -1 if the number of Splitters is smaller than n</returns>
public int FindSplitter(int n)
{
var count = 0;
for (var i = 0; i < Icons.Count; i++)
{
if (Icons[i].GetType() == typeof(Splitter))
{
count++;
if (count == n)
return i;
}
}
return -1;
}
private HtmlGenericControl toolbar;
private HtmlGenericControl wrap;
private HtmlGenericControl group;
protected override void CreateChildControls()
{
toolbar = new HtmlGenericControl { TagName = "div" };
toolbar.Attributes.Add("class", "btn-toolbar umb-btn-toolbar");
this.Controls.Add(toolbar);
group = new HtmlGenericControl { TagName = "div", ID = this.ClientID + "_group" };
group.Attributes.Add("class", "btn-group");
toolbar.Controls.Add(group);
}
protected override void OnLoad(EventArgs e)
{
foreach (Control item in Icons)
{
group.Controls.Add(item);
if (item.ID != "")
iconIds = iconIds + item.ID + ",";
}
base.OnLoad(e);
}
protected override void OnInit(EventArgs e)
{
EnsureChildControls();
base.OnInit(e);
}
}
}
@@ -67,10 +67,6 @@ namespace Umbraco.Web._Legacy.Controls
this.Controls.Add(_tempErr);
}
public ScrollingMenu Menu
{
get { return parent.Menu; }
}
public bool HasMenu
{
@@ -17,12 +17,6 @@ namespace umbraco.controls.Tree
/// Since we're inheriting from a UserControl and all of the ClientDependency registrations are done inline, we need
/// to re-register the ClientDependencies.
/// </remarks>
[ClientDependency(0, ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoApplicationActions.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoUtils.js", "UmbracoClient")]
[ClientDependency(0, ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient")]
[ClientDependency(10, ClientDependencyType.Javascript, "Application/JQuery/jquery.metadata.min.js", "UmbracoClient")]
[ClientDependency(11, ClientDependencyType.Javascript, "Tree/jquery.tree.js", "UmbracoClient")]
[ClientDependency(12, ClientDependencyType.Javascript, "Tree/UmbracoContext.js", "UmbracoClient")]
[ClientDependency(12, ClientDependencyType.Javascript, "Tree/jquery.tree.contextmenu.js", "UmbracoClient")]
@@ -427,18 +427,18 @@ namespace umbraco.presentation.developer.packages
packageActions = TabView1.NewTabPage("Package Actions");
packageActions.Controls.Add(Pane4);
var pubs = TabView1.Menu.NewButton();
pubs.Text = Services.TextService.Localize("publish");
pubs.CommandName = "publish";
pubs.Command += new CommandEventHandler(saveOrPublish);
pubs.ID = "saveAndPublish";
//var pubs = TabView1.Menu.NewButton();
//pubs.Text = Services.TextService.Localize("publish");
//pubs.CommandName = "publish";
//pubs.Command += new CommandEventHandler(saveOrPublish);
//pubs.ID = "saveAndPublish";
var saves = TabView1.Menu.NewButton();
saves.Text = Services.TextService.Localize("save");
saves.CommandName = "save";
saves.Command += new CommandEventHandler(saveOrPublish);
saves.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
saves.ID = "save";
//var saves = TabView1.Menu.NewButton();
//saves.Text = Services.TextService.Localize("save");
//saves.CommandName = "save";
//saves.Command += new CommandEventHandler(saveOrPublish);
//saves.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
//saves.ID = "save";
@@ -1,82 +0,0 @@
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="AssignDomain2.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.AssignDomain2" %>
<%@ Import Namespace="Umbraco.Web" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<umb:JsInclude runat="server" FilePath="Dialogs/AssignDomain2.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="PunyCode/punycode.min.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude runat="server" FilePath="Application/JQuery/jquery.validate.min.js" PathNameAlias="UmbracoClient" />
<umb:CssInclude runat="server" FilePath="Dialogs/AssignDomain2.css" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
var dialog = new Umbraco.Dialogs.AssignDomain2({
nodeId: <%=GetNodeId()%>,
restServiceLocation: '<%=GetRestServicePath() %>',
invalidDomain: '<%=Services.TextService.Localize("assignDomain/invalidDomain") %>',
duplicateDomain: '<%=Services.TextService.Localize("assignDomain/duplicateDomain") %>',
<asp:Literal runat="server" ID="data" />
});
dialog.init();
});
})(jQuery);
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
<div class="umb-dialog-body">
<cc1:Feedback ID="feedback" runat="server" />
<div id="komask"></div>
<cc1:Pane runat="server" ID="pane_language">
<cc1:PropertyPanel runat="server" ID="prop_language">
<select class="umb-editor umb-dropdown" name="language" data-bind="options: languages, optionsText: 'Code', optionsValue: 'Id', value: language, optionsCaption: '<%=Services.TextService.Localize("assignDomain/inherit") %> '"></select>
<!-- <small class="help-inline"><%=Services.TextService.Localize("assignDomain/setLanguageHelp") %></small>-->
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane runat="server" ID="pane_domains">
<cc1:PropertyPanel runat="server">
<table class="table domains" data-bind="visible: domains().length > 0">
<thead>
<tr>
<th><%=Services.TextService.Localize("assignDomain/domain") %></th>
<th><%=Services.TextService.Localize("assignDomain/language") %></th>
<th />
</tr>
</thead>
<tbody data-bind="foreach: domains">
<tr>
<td valign="top">
<input class="domain" data-bind="value: Name, uniqueName: true" /><input type="hidden" value="0" data-bind="uniqueName: true"/></td>
<td valign="top">
<select class="language" data-bind="options: $parent.languages, optionsText: 'Code', optionsValue: 'Id', value: Lang, uniqueName: true"></select></td>
<td valign="top"><a href="#" class="btn btn-danger" data-bind="click: $parent.removeDomain"><i class="icon icon-trash"></i></a></td>
</tr>
</tbody>
</table>
</cc1:PropertyPanel>
<cc1:PropertyPanel runat="server">
<small data-bind="visible: domains().length == 0" class="help-inline"><%=Services.TextService.Localize("assignDomain/domainHelp") %></small>
<button class="btn" data-bind="click: addDomain"><%=Services.TextService.Localize("assignDomain/addNew") %></button>
</cc1:PropertyPanel>
</cc1:Pane>
</div>
<div runat="server" id="p_buttons" class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
<a href="#" class="btn btn-link" onclick="UmbClientMgr.closeModalWindow()"><%=Services.TextService.Localize("general/cancel")%></a>
<button class="btn btn-primary" id="btnSave"><%=Services.TextService.Localize("buttons/save") %></button>
</div>
</asp:Content>
@@ -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<ContentController>(action);
return path.TrimEnd(action).EnsureEndsWith('/');
}
}
}
@@ -1,69 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.dialogs {
public partial class AssignDomain2 {
/// <summary>
/// data control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal data;
/// <summary>
/// feedback control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Feedback feedback;
/// <summary>
/// pane_language control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Pane pane_language;
/// <summary>
/// prop_language control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.PropertyPanel prop_language;
/// <summary>
/// pane_domains control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Umbraco.Web._Legacy.Controls.Pane pane_domains;
/// <summary>
/// p_buttons control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl p_buttons;
}
}

Some files were not shown because too many files have changed in this diff Show More