From 8ac0e2fa54ecf3069872f017abe5eb57e07b58b8 Mon Sep 17 00:00:00 2001 From: Shandem Date: Mon, 8 Feb 2010 02:22:42 +0000 Subject: [PATCH] WORK IN PROGRESS, GET THE STABLE SOURCE FROM THE THE DOWNLOADS TABS Mega Commit: New controls: tree control, pickers of all sorts, image viewer, media uploader. Removed a zillion iframes. New modal window standard framework. Fixes some bugs. ClientDependency & Examine DLL updates. Lots of JS enhancements, libs and more methods added to ClientTools. [TFS Changeset #63838] --- UpgradeReadme.txt | 15 +- .../editorControls/BaseTreePickerEditor.cs | 80 + .../editorControls/macrocontainer/Editor.cs | 20 +- .../macrocontainer/MacroControlFactory.cs | 39 +- .../MediaChooserScripts.Designer.cs | 83 + .../mediapicker/MediaChooserScripts.resx | 124 + .../editorControls/mediapicker/MediaPicker.js | 52 + .../mediapicker/mediaChooser.cs | 328 ++- .../editorControls/pagepicker/pagePicker.cs | 117 +- .../umbraco.editorControls.csproj | 17 +- components/macroRenderings/content.cs | 112 +- components/macroRenderings/media.cs | 117 +- .../umbraco.macroRenderings.csproj | 4 + components/umbraco.controls/CodeArea.cs | 2 + .../TreePicker/BaseTreePicker.cs | 223 ++ .../TreePicker/BaseTreePicker.js | 70 + .../BaseTreePickerScripts.Designer.cs | 83 + .../TreePicker/BaseTreePickerScripts.resx | 124 + .../TreePicker/SimpleContentPicker.cs | 26 + .../TreePicker/SimpleMediaPicker.cs | 26 + .../umbraco.controls/TreeUrlGenerator.cs | 202 ++ components/umbraco.controls/feedback.cs | 2 +- .../umbraco.controls/umbraco.controls.csproj | 30 +- foreign dlls/ClientDependency.Core.dll | Bin 56320 -> 54784 bytes foreign dlls/UmbracoExamine.Core.dll | Bin 27648 -> 30208 bytes foreign dlls/UmbracoExamine.Providers.dll | Bin 27136 -> 41472 bytes umbraco/businesslogic/Application.cs | 2 +- .../businesslogic/BasePages/ClientTools.cs | 47 +- umbraco/businesslogic/Utils/TypeFinder.cs | 43 +- umbraco/cms/Actions/Action.cs | 4 +- .../PackageInstance/PackageActions.cs | 2 +- umbraco/cms/businesslogic/datatype/factory.cs | 2 +- umbraco/cms/umbraco.cms.csproj | 4 - umbraco/interfaces/IDataEditor.cs | 12 - .../interfaces/IDataEditorAjaxAlternative.cs | 16 + umbraco/interfaces/umbraco.interfaces.csproj | 1 + .../presentation/config/ExamineIndex.config | 5 +- .../config/ExamineSettings.config | 8 +- umbraco/presentation/install/default.aspx | 7 +- .../install/default.aspx.designer.cs | 9 + .../presentation/umbraco.presentation.csproj | 63 +- .../Controls/LiveEditingManager.cs | 14 +- .../Modules/CreateModule/CreateModule.cs | 20 +- .../Modules/ItemEditing/ItemEditor.cs | 5 +- .../umbraco/Trees/BaseContentTree.cs | 36 +- .../umbraco/Trees/BaseMediaTree.cs | 28 +- .../presentation/umbraco/Trees/BaseTree.cs | 1 + .../umbraco/Trees/ContentRecycleBin.cs | 6 + .../umbraco/Trees/ITreeService.cs | 44 + .../umbraco/Trees/MediaRecycleBin.cs | 6 + .../umbraco/Trees/TreeDefinitionCollection.cs | 2 +- .../umbraco/Trees/TreeRequestParams.cs | 153 ++ .../presentation/umbraco/Trees/TreeService.cs | 291 +-- .../presentation/umbraco/Trees/loadMedia.cs | 2 +- umbraco/presentation/umbraco/cache/factory.cs | 2 +- .../umbraco/controls/ContentPicker.cs | 159 +- .../controls/ContentTypeControlNew.ascx.cs | 2 +- .../GenericProperties/GenericProperty.ascx | 4 - .../GenericProperties/GenericProperty.ascx.cs | 2 +- .../GenericProperty.ascx.designer.cs | 2 +- .../umbraco/controls/Images/ImageViewer.ascx | 48 + .../controls/Images/ImageViewer.ascx.cs | 116 + .../Images/ImageViewer.ascx.designer.cs | 25 + .../umbraco/controls/Images/ImageViewer.js | 133 + .../controls/Images/ImageViewerUpdater.asmx | 1 + .../Images/ImageViewerUpdater.asmx.cs | 68 + .../controls/Images/UploadMediaImage.ascx | 28 + .../controls/Images/UploadMediaImage.ascx.cs | 117 + .../Images/UploadMediaImage.ascx.designer.cs | 109 + .../controls/Images/UploadMediaImage.js | 33 + .../umbraco/controls/Tree/JTreeContextMenu.cs | 44 + .../controls/Tree/JTreeContextMenuItem.cs | 93 + .../controls/{ => Tree}/TreeControl.ascx | 53 +- .../umbraco/controls/Tree/TreeControl.ascx.cs | 390 +++ .../{ => Tree}/TreeControl.ascx.designer.cs | 13 +- .../umbraco/controls/TreeControl.ascx.cs | 383 --- .../presentation/umbraco/create/content.ascx | 2 +- .../umbraco/create/content.ascx.designer.cs | 2 +- .../presentation/umbraco/create/language.ascx | 2 +- .../umbraco/create/language.ascx.designer.cs | 2 +- .../presentation/umbraco/create/media.ascx | 2 +- .../umbraco/create/media.ascx.designer.cs | 2 +- .../presentation/umbraco/create/member.ascx | 2 +- .../umbraco/create/member.ascx.designer.cs | 2 +- .../presentation/umbraco/create/nodeType.ascx | 2 +- .../umbraco/create/nodeType.ascx.designer.cs | 2 +- .../presentation/umbraco/create/script.ascx | 2 +- .../umbraco/create/script.ascx.designer.cs | 2 +- .../presentation/umbraco/create/simple.ascx | 2 +- .../umbraco/create/simple.ascx.designer.cs | 2 +- umbraco/presentation/umbraco/create/xslt.ascx | 2 +- .../umbraco/create/xslt.ascx.designer.cs | 2 +- .../umbraco/css/permissionsEditor.css | 12 + .../developer/Macros/assemblyBrowser.aspx | 4 +- .../Macros/assemblyBrowser.aspx.designer.cs | 2 +- .../developer/Macros/editMacro.aspx.cs | 16 +- .../umbraco/developer/Packages/Boost.aspx | 2 +- .../developer/Packages/Boost.aspx.designer.cs | 2 +- .../developer/Packages/directoryBrowser.aspx | 2 +- .../directoryBrowser.aspx.designer.cs | 2 +- .../developer/Packages/editPackage.aspx | 6 +- .../Packages/editPackage.aspx.designer.cs | 2 +- .../developer/Packages/installedPackage.aspx | 2 +- .../installedPackage.aspx.designer.cs | 2 +- .../umbraco/developer/Xslt/editXslt.aspx | 2 +- .../umbraco/developer/Xslt/editXslt.aspx.cs | 6 +- .../developer/Xslt/editXslt.aspx.designer.cs | 2 +- .../developer/Xslt/xsltInsertValueOf.aspx | 4 +- .../Xslt/xsltInsertValueOf.aspx.designer.cs | 2 +- .../umbraco/developer/Xslt/xsltVisualize.aspx | 10 +- .../developer/Xslt/xsltVisualize.aspx.cs | 15 +- .../Xslt/xsltVisualize.aspx.designer.cs | 2 +- .../umbraco/dialogs/AssignDomain.aspx | 2 +- .../dialogs/AssignDomain.aspx.designer.cs | 2 +- .../umbraco/dialogs/ExportCode.aspx | 2 +- .../dialogs/ExportCode.aspx.designer.cs | 2 +- .../presentation/umbraco/dialogs/RegexWs.aspx | 2 +- .../umbraco/dialogs/RegexWs.aspx.designer.cs | 2 +- .../umbraco/dialogs/SendPublish.aspx | 2 +- .../dialogs/SendPublish.aspx.designer.cs | 2 +- .../presentation/umbraco/dialogs/create.aspx | 143 +- .../umbraco/dialogs/create.aspx.cs | 73 +- .../umbraco/dialogs/create.aspx.designer.cs | 29 +- .../presentation/umbraco/dialogs/cruds.aspx | 2 +- .../umbraco/dialogs/cruds.aspx.designer.cs | 2 +- .../umbraco/dialogs/editMacro.aspx | 6 +- .../dialogs/editMacro.aspx.designer.cs | 2 +- .../umbraco/dialogs/emptyTrashcan.aspx | 4 +- .../dialogs/emptyTrashcan.aspx.designer.cs | 2 +- .../umbraco/dialogs/imageViewer.aspx.cs | 23 +- .../dialogs/imageViewer.aspx.designer.cs | 2 +- .../umbraco/dialogs/importDocumenttype.aspx | 2 +- .../umbraco/dialogs/insertMacro.aspx | 10 +- .../dialogs/insertMacro.aspx.designer.cs | 2 +- .../dialogs/insertMasterpageContent.aspx | 4 +- .../insertMasterpageContent.aspx.designer.cs | 2 +- .../dialogs/insertMasterpagePlaceholder.aspx | 4 +- ...sertMasterpagePlaceholder.aspx.designer.cs | 2 +- .../umbraco/dialogs/mediaPicker.aspx | 148 +- .../umbraco/dialogs/mediaPicker.aspx.cs | 7 +- .../dialogs/mediaPicker.aspx.designer.cs | 101 +- .../umbraco/dialogs/moveOrCopy.aspx | 19 +- .../umbraco/dialogs/moveOrCopy.aspx.cs | 6 +- .../dialogs/moveOrCopy.aspx.designer.cs | 11 +- .../umbraco/dialogs/notifications.aspx | 2 +- .../umbraco/dialogs/notifications.aspx.cs | 2 +- .../dialogs/notifications.aspx.designer.cs | 2 +- .../umbraco/dialogs/protectPage.aspx | 4 +- .../umbraco/dialogs/protectPage.aspx.cs | 4 +- .../dialogs/protectPage.aspx.designer.cs | 2 +- .../presentation/umbraco/dialogs/publish.aspx | 2 +- .../umbraco/dialogs/publish.aspx.cs | 6 +- .../umbraco/dialogs/publish.aspx.designer.cs | 2 +- .../umbraco/dialogs/republish.aspx | 4 +- .../dialogs/republish.aspx.designer.cs | 2 +- .../umbraco/dialogs/rollBack.aspx | 2 +- .../umbraco/dialogs/rollBack.aspx.cs | 2 +- .../umbraco/dialogs/rollBack.aspx.designer.cs | 2 +- .../presentation/umbraco/dialogs/search.aspx | 4 +- .../umbraco/dialogs/search.aspx.designer.cs | 2 +- .../umbraco/dialogs/sendToTranslation.aspx | 2 +- .../umbraco/dialogs/sendToTranslation.aspx.cs | 2 +- .../sendToTranslation.aspx.designer.cs | 2 +- .../presentation/umbraco/dialogs/sort.aspx | 4 +- .../umbraco/dialogs/sort.aspx.designer.cs | 2 +- .../umbraco/dialogs/treePicker.aspx | 100 +- .../umbraco/dialogs/treePicker.aspx.cs | 33 +- .../dialogs/treePicker.aspx.designer.cs | 15 +- .../umbraco/dialogs/umbracoField.aspx | 4 +- .../dialogs/umbracoField.aspx.designer.cs | 2 +- .../umbraco/dialogs/uploadImage.aspx | 80 +- .../umbraco/dialogs/uploadImage.aspx.cs | 90 +- .../dialogs/uploadImage.aspx.designer.cs | 87 +- .../presentation/umbraco/images/throbber.gif | Bin 0 -> 1844 bytes .../umbraco/masterpages/umbracoPage.Master | 5 +- .../umbracoPage.Master.designer.cs | 29 +- .../umbraco/plugins/tinymce3/insertImage.aspx | 490 +--- .../plugins/tinymce3/insertImage.aspx.cs | 6 +- .../tinymce3/insertImage.aspx.designer.cs | 60 +- .../umbraco/plugins/tinymce3/insertLink.aspx | 12 +- .../plugins/tinymce3/insertLink.aspx.cs | 5 +- .../tinymce3/insertLink.aspx.designer.cs | 20 +- .../umbraco/plugins/tinymce3/insertMacro.aspx | 5 +- .../plugins/tinymce3/insertMacro.aspx.cs | 16 +- .../tinymce3/insertMacro.aspx.designer.cs | 2 +- .../umbraco/settings/editTemplate.aspx.cs | 18 +- .../settings/modals/ShowUmbracoTags.aspx | 110 +- umbraco/presentation/umbraco/test.aspx.cs | 3 +- umbraco/presentation/umbraco/treeInit.aspx | 8 +- umbraco/presentation/umbraco/treeInit.aspx.cs | 18 +- .../umbraco/treeInit.aspx.designer.cs | 4 +- umbraco/presentation/umbraco/umbraco.aspx | 181 +- umbraco/presentation/umbraco/umbraco.aspx.cs | 18 +- .../umbraco/umbraco.aspx.designer.cs | 4 +- .../umbraco/users/PermissionEditor.aspx | 7 +- .../umbraco/users/PermissionEditor.aspx.cs | 9 +- .../users/PermissionEditor.aspx.designer.cs | 4 +- .../umbraco/users/PermissionsEditor.js | 3 +- .../webservices/TreeClientService.asmx.cs | 26 +- .../Application/JQuery/VerticalAlign.js | 8 + .../Application/JQuery/jquery.autocomplete.js | 2 +- .../JQuery/jquery.noconflict-invoke.js | 3 + .../Application/UmbracoApplicationActions.js | 42 +- .../Application/UmbracoClientManager.js | 34 +- .../umbraco_client/Application/UrlEncoder.js | 73 + .../Tree/Themes/umbraco/style.css | 2 +- .../umbraco_client/Tree/UmbracoTree.js | 254 +- .../umbraco_client/Tree/tree_component.js | 2315 ----------------- .../umbraco_client/Tree/tree_component.min.js | 14 - .../umbraco_client/modal/modal.js | 214 +- .../umbraco_client/modal/style.css | 38 +- .../umbraco_client/ui/default.css | 20 +- umbraco/presentation/web.config.BOMBER.xslt | 21 - .../presentation/web.config.SHANDEMVAIO.xslt | 9 +- umbraco/presentation/web.config.SHOCKING.xslt | 8 +- umbraco/umbraco.Legacy/umbraco.Legacy.csproj | 4 + .../umbraco/js/submodal/common.js | 0 .../umbraco/js/submodal/maskBG.png | Bin .../umbraco/js/submodal/subModal.css | 0 .../umbraco/js/submodal/subModal.js | 0 220 files changed, 4460 insertions(+), 5436 deletions(-) create mode 100644 components/editorControls/BaseTreePickerEditor.cs create mode 100644 components/editorControls/mediapicker/MediaChooserScripts.Designer.cs create mode 100644 components/editorControls/mediapicker/MediaChooserScripts.resx create mode 100644 components/editorControls/mediapicker/MediaPicker.js create mode 100644 components/umbraco.controls/TreePicker/BaseTreePicker.cs create mode 100644 components/umbraco.controls/TreePicker/BaseTreePicker.js create mode 100644 components/umbraco.controls/TreePicker/BaseTreePickerScripts.Designer.cs create mode 100644 components/umbraco.controls/TreePicker/BaseTreePickerScripts.resx create mode 100644 components/umbraco.controls/TreePicker/SimpleContentPicker.cs create mode 100644 components/umbraco.controls/TreePicker/SimpleMediaPicker.cs create mode 100644 components/umbraco.controls/TreeUrlGenerator.cs create mode 100644 umbraco/interfaces/IDataEditorAjaxAlternative.cs create mode 100644 umbraco/presentation/umbraco/Trees/ITreeService.cs create mode 100644 umbraco/presentation/umbraco/Trees/TreeRequestParams.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.designer.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewer.js create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx create mode 100644 umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx create mode 100644 umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs create mode 100644 umbraco/presentation/umbraco/controls/Images/UploadMediaImage.js create mode 100644 umbraco/presentation/umbraco/controls/Tree/JTreeContextMenu.cs create mode 100644 umbraco/presentation/umbraco/controls/Tree/JTreeContextMenuItem.cs rename umbraco/presentation/umbraco/controls/{ => Tree}/TreeControl.ascx (60%) create mode 100644 umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.cs rename umbraco/presentation/umbraco/controls/{ => Tree}/TreeControl.ascx.designer.cs (89%) delete mode 100644 umbraco/presentation/umbraco/controls/TreeControl.ascx.cs create mode 100644 umbraco/presentation/umbraco/images/throbber.gif create mode 100644 umbraco/presentation/umbraco_client/Application/JQuery/VerticalAlign.js create mode 100644 umbraco/presentation/umbraco_client/Application/JQuery/jquery.noconflict-invoke.js create mode 100644 umbraco/presentation/umbraco_client/Application/UrlEncoder.js delete mode 100644 umbraco/presentation/umbraco_client/Tree/tree_component.js delete mode 100644 umbraco/presentation/umbraco_client/Tree/tree_component.min.js delete mode 100644 umbraco/presentation/web.config.BOMBER.xslt rename umbraco/{presentation => umbraco.Legacy}/umbraco/js/submodal/common.js (100%) rename umbraco/{presentation => umbraco.Legacy}/umbraco/js/submodal/maskBG.png (100%) rename umbraco/{presentation => umbraco.Legacy}/umbraco/js/submodal/subModal.css (100%) rename umbraco/{presentation => umbraco.Legacy}/umbraco/js/submodal/subModal.js (100%) diff --git a/UpgradeReadme.txt b/UpgradeReadme.txt index fff889ef2e..189b5184f9 100644 --- a/UpgradeReadme.txt +++ b/UpgradeReadme.txt @@ -49,4 +49,17 @@ FireBeforeAddToIndex, AfterAddToIndex, FireAfterAddToIndex, Document.Index * Removed /umbraco/webservices/Search.asmx as the SearchItem object has been removed * Removed /umbraco/reindex.aspx -* Removed /umbraco/dialogs/editImage.aspx since it didn't do anything at all \ No newline at end of file +* Removed /umbraco/dialogs/editImage.aspx since it didn't do anything at all + +* MediaPicker has been completely overhauled in regards to the JavaScript implementation and should now work in live editing mode + +* /umbraco/plugins/tinymce3/insertImage.aspx has been overhauled to use the tree control, image viewer control and upload media image control + +* /umbraco/treeInit.aspx has been marked obsolete +** All pages that used to use TreeInit now use TreeControl (except for Legacy project) +* /umbraco/dialog/treePicker.aspx has been marked obsolete +* /umbraco/dialog/uploadImage.aspx has been marked obsolete +* /umbraco/dialog/imageViewer.aspx has been marked obsolete + +* subModal library moved to legacy and no longer used +* JavaScript Modal window framework overhauled and replaced \ No newline at end of file diff --git a/components/editorControls/BaseTreePickerEditor.cs b/components/editorControls/BaseTreePickerEditor.cs new file mode 100644 index 0000000000..5be3ac5499 --- /dev/null +++ b/components/editorControls/BaseTreePickerEditor.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using umbraco.uicontrols.TreePicker; +using umbraco.interfaces; + +namespace umbraco.editorControls +{ + /// + /// A base tree picker class that has all of the functionality built in for an IDataEditor + /// + public abstract class BaseTreePickerEditor : BaseTreePicker, IDataEditor + { + + interfaces.IData _data; + protected int StoredItemId = -1; + + public BaseTreePickerEditor() + : base() { } + + public BaseTreePickerEditor(IData Data) + : base() + { + _data = Data; + } + + private void StoreItemId(IData Data) + { + if (_data != null && _data.Value != null && !String.IsNullOrEmpty(_data.Value.ToString())) + { + int.TryParse(_data.Value.ToString(), out StoredItemId); + } + } + + protected override void OnInit(EventArgs e) + { + StoreItemId(_data); + + base.OnInit(e); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + if (!Page.IsPostBack) + { + ItemIdValue.Value = StoredItemId != -1 ? StoredItemId.ToString() : ""; + } + } + + #region IDataField Members + + public System.Web.UI.Control Editor { get { return this; } } + + public virtual bool TreatAsRichTextEditor + { + get { return false; } + } + public bool ShowLabel + { + get + { + return true; + } + } + + public void Save() + { + //_text = helper.Request(this.ClientID); + if (ItemIdValue.Value.Trim() != "") + _data.Value = ItemIdValue.Value.Trim(); + else + _data.Value = null; + } + + #endregion + } +} diff --git a/components/editorControls/macrocontainer/Editor.cs b/components/editorControls/macrocontainer/Editor.cs index f106d1a2c3..72c5108cb1 100644 --- a/components/editorControls/macrocontainer/Editor.cs +++ b/components/editorControls/macrocontainer/Editor.cs @@ -43,18 +43,22 @@ namespace umbraco.editorControls.macrocontainer protected override void OnInit(EventArgs e) { base.OnInit(e); - - - base.Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "subModal", ""); - + + //SD: This is useless as it won't work in live editing anyways whilst using MS Ajax/ScriptManager for ajax calls if (!UmbracoContext.Current.LiveEditingContext.Enabled) + { presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page); + ScriptManager sm = ScriptManager.GetCurrent(base.Page); + ServiceReference webservicePath = new ServiceReference(umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/webservices/MacroContainerService.asmx"); + + if (!sm.Services.Contains(webservicePath)) + sm.Services.Add(webservicePath); + } else + { ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); - - - - + ClientDependencyLoader.Instance.RegisterDependency("webservices/MacroContainerService.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); + } _addMacro = new LinkButton(); _addMacro.ID = ID + "_btnaddmacro"; diff --git a/components/editorControls/macrocontainer/MacroControlFactory.cs b/components/editorControls/macrocontainer/MacroControlFactory.cs index e533293793..0915dfa403 100644 --- a/components/editorControls/macrocontainer/MacroControlFactory.cs +++ b/components/editorControls/macrocontainer/MacroControlFactory.cs @@ -27,26 +27,15 @@ namespace umbraco.editorControls.macrocontainer internal static Control GetMacroRenderControlByType(PersistableMacroProperty prop, string uniqueID) { Control macroControl; - //Determine the property type - switch (prop.TypeName.ToLower()) + + Type m = MacroControlTypes.FindLast(delegate(Type macroGuiCcontrol) { return macroGuiCcontrol.ToString() == string.Format("{0}.{1}", prop.AssemblyName, prop.TypeName); }); + IMacroGuiRendering typeInstance; + typeInstance = Activator.CreateInstance(m) as IMacroGuiRendering; + if (!string.IsNullOrEmpty(prop.Value)) { - //Use a pagepicker instead of a IMacroGuiRendering control - case "content": - macroControl = new pagePicker(null); - ((pagePicker)macroControl).Value = prop.Value; - break; - ///Default behaviour - default: - Type m = MacroControlTypes.FindLast(delegate(Type macroGuiCcontrol) { return macroGuiCcontrol.ToString() == string.Format("{0}.{1}", prop.AssemblyName, prop.TypeName); }); - IMacroGuiRendering typeInstance; - typeInstance = Activator.CreateInstance(m) as IMacroGuiRendering; - if (!string.IsNullOrEmpty(prop.Value)) - { - ((IMacroGuiRendering)typeInstance).Value = prop.Value; - } - macroControl = (Control)typeInstance; - break; + ((IMacroGuiRendering)typeInstance).Value = prop.Value; } + macroControl = (Control)typeInstance; macroControl.ID = uniqueID; return macroControl; @@ -59,17 +48,7 @@ namespace umbraco.editorControls.macrocontainer /// internal static string GetValueFromMacroControl(Control macroControl) { - if (macroControl is pagePicker) - { - //pagePicker Control - return ((pagePicker)macroControl).Value; - } - else - { - ///Macro control - return ((IMacroGuiRendering)macroControl).Value; - } - + return ((IMacroGuiRendering)macroControl).Value; } #endregion @@ -85,7 +64,7 @@ namespace umbraco.editorControls.macrocontainer { //Populate the list with all the types of IMacroGuiRendering _macroControlTypes = new List(); - _macroControlTypes = TypeFinder.FindClassesOfType(true); + _macroControlTypes = TypeFinder.FindClassesOfType(); } return _macroControlTypes; diff --git a/components/editorControls/mediapicker/MediaChooserScripts.Designer.cs b/components/editorControls/mediapicker/MediaChooserScripts.Designer.cs new file mode 100644 index 0000000000..dd92d4f662 --- /dev/null +++ b/components/editorControls/mediapicker/MediaChooserScripts.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace umbraco.editorControls.mediapicker { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class MediaChooserScripts { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal MediaChooserScripts() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("umbraco.editorControls.mediapicker.MediaChooserScripts", typeof(MediaChooserScripts).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to /// <reference path="/umbraco_client/Application/NamespaceManager.js" /> + /// + ///Umbraco.Sys.registerNamespace("Umbraco.Controls"); + /// + ///(function($) { + /// + /// Umbraco.Controls.MediaChooser = function(label, hasPreview, mediaIdValueClientID, previewContainerClientID, imgViewerClientID, mediaTitleClientID) { + /// return { + /// _mediaPickerUrl: '/umbraco/dialogs/mediaPicker.aspx', + /// _webServiceUrl: "/umbraco/webservices/legacyAjaxCalls.asmx/GetNodeName", + /// _label: label, + /// [rest of string was truncated]";. + /// + internal static string MediaPicker { + get { + return ResourceManager.GetString("MediaPicker", resourceCulture); + } + } + } +} diff --git a/components/editorControls/mediapicker/MediaChooserScripts.resx b/components/editorControls/mediapicker/MediaChooserScripts.resx new file mode 100644 index 0000000000..7f939d3d99 --- /dev/null +++ b/components/editorControls/mediapicker/MediaChooserScripts.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + MediaPicker.js;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + \ No newline at end of file diff --git a/components/editorControls/mediapicker/MediaPicker.js b/components/editorControls/mediapicker/MediaPicker.js new file mode 100644 index 0000000000..2f87565fc3 --- /dev/null +++ b/components/editorControls/mediapicker/MediaPicker.js @@ -0,0 +1,52 @@ +/// + +Umbraco.Sys.registerNamespace("Umbraco.Controls"); + +(function($) { + Umbraco.Controls.MediaChooser = function(label, mediaIdValueClientID, previewContainerClientID, imgViewerClientID, mediaTitleClientID, mediaPickerUrl, width, height, umbracoPath) { + return { + _mediaPickerUrl: mediaPickerUrl, + _webServiceUrl: umbracoPath + "/webservices/legacyAjaxCalls.asmx/GetNodeName", + _label: label, + _width: width, + _height: height, + _mediaIdValueClientID: mediaIdValueClientID, + _previewContainerClientID: previewContainerClientID, + _imgViewerClientID: imgViewerClientID, + _mediaTitleClientID: mediaTitleClientID, + + LaunchPicker: function() { + var _this = this; + UmbClientMgr.openModalWindow(this._mediaPickerUrl, this._label, true, this._width, this._height, 30, 0, ['#cancelbutton'], function(e) { _this.SaveSelection(e); }); + }, + + SaveSelection: function(e) { + if (!e.outVal) { + return; + } + $("#" + this._mediaIdValueClientID).val(e.outVal); + $("#" + this._previewContainerClientID).show(); + $("#" + this._imgViewerClientID).UmbracoImageViewerAPI().updateImage(e.outVal); + var _this = this; + $.ajax({ + type: "POST", + url: _this._webServiceUrl, + data: '{ "nodeId": ' + e.outVal + ' }', + contentType: "application/json; charset=utf-8", + dataType: "json", + success: function(msg) { + $("#" + _this._mediaTitleClientID).html(msg.d); + $("#" + _this._mediaTitleClientID).parent().show(); + } + }); + }, + + ClearSelection: function() { + $("#" + this._mediaTitleClientID).parent().hide(); + $("#" + this._mediaIdValueClientID).val(''); + $("#" + this._previewContainerClientID).hide(); + } + }; + } + +})(jQuery); \ No newline at end of file diff --git a/components/editorControls/mediapicker/mediaChooser.cs b/components/editorControls/mediapicker/mediaChooser.cs index 109385dc70..4ce4a3beb5 100644 --- a/components/editorControls/mediapicker/mediaChooser.cs +++ b/components/editorControls/mediapicker/mediaChooser.cs @@ -7,201 +7,173 @@ using umbraco.presentation; using ClientDependency.Core.Controls; using umbraco.interfaces; using umbraco.IO; +using umbraco.BasePages; +using umbraco.controls.Images; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; +using System.Resources; +using umbraco.editorControls.mediapicker; +using umbraco.uicontrols.TreePicker; namespace umbraco.editorControls { - /// - /// Summary description for mediaChooser. - /// - [ClientDependency(100, ClientDependencyType.Css, "js/submodal/submodal.css", "UmbracoRoot")] - [ClientDependency(101, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")] - //TODO: Work out how to include this: , InvokeJavascriptMethodOnLoad = "initPopUp" - [ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot")] + /// + /// Summary description for mediaChooser. + /// [ValidationProperty("Value")] - public class mediaChooser : System.Web.UI.WebControls.HiddenField, IDataEditor - { - interfaces.IData _data; - bool _showpreview; - bool _showadvanced; + public class mediaChooser : BaseTreePickerEditor + { + bool _showpreview; + bool _showadvanced; + protected ImageViewer ImgViewer; + protected HtmlGenericControl PreviewContainer; - public mediaChooser(interfaces.IData Data) + public mediaChooser(IData data) + : base(data) { } + + + public mediaChooser(IData data, bool showPreview, bool showAdvanced) + : base(data) { - _data = Data; + _showpreview = showPreview; + _showadvanced = showAdvanced; + } + + public override string ModalWindowTitle + { + get + { + return ui.GetText("general", "choose") + " " + ui.GetText("sections", "media"); + } + } + + public override string TreePickerUrl + { + get + { + return _showadvanced ? umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/dialogs/mediaPicker.aspx" : TreeService.GetPickerUrl("media", "media"); + } + } + + protected override string GetJSScript() + { + if (!_showpreview) + { + return base.GetJSScript(); + } + else + { + /* 0 = this control's client id + * 1 = label + * 2 = mediaIdValueClientID + * 3 = previewContainerClientID + * 4 = imgViewerClientID + * 5 = mediaTitleClientID + * 6 = mediaPickerUrl + * 7 = popup width + * 8 = popup height + * 9 = umbraco path + */ + return string.Format(@" + var mc_{0} = new Umbraco.Controls.MediaChooser('{1}','{2}','{3}','{4}','{5}','{6}',{7},{8},'{9}');", + new string[] + { + this.ClientID, + ModalWindowTitle, + ItemIdValue.ClientID, + _showpreview ? PreviewContainer.ClientID : "__NOTSET", + _showpreview ? ImgViewer.ClientID : "_NOTSET", + ItemTitle.ClientID, + TreePickerUrl, + ModalWidth.ToString(), + ModalHeight.ToString(), + umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco).TrimEnd('/') + }); + } + } + + /// + /// Renders the required media picker javascript + /// + protected override void RenderJSComponents() + { + + if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) + { + ScriptManager.RegisterStartupScript(this, this.GetType(), "MediaChooser", MediaChooserScripts.MediaPicker, true); + } + else + { + Page.ClientScript.RegisterClientScriptBlock(typeof(mediaChooser), "MediaChooser", MediaChooserScripts.MediaPicker, true); + } + } + + protected override void CreateChildControls() + { + base.CreateChildControls(); + + //if preview is enabled, add it to the wrapper + if (_showpreview) + { + //create the preview wrapper + PreviewContainer = new HtmlGenericControl("div"); + PreviewContainer.ID = "preview"; + this.Controls.Add(PreviewContainer); + + ImgViewer = (ImageViewer)Page.LoadControl(umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/controls/Images/ImageViewer.ascx"); + ImgViewer.ID = "ImgViewer"; + ImgViewer.ViewerStyle = ImageViewer.Style.ImageLink; + + PreviewContainer.Style.Add(HtmlTextWriterStyle.MarginTop, "5px"); + PreviewContainer.Controls.Add(ImgViewer); + } + } + + /// + /// sets the modal width/height based on properties + /// + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + ModalWidth = _showadvanced ? 530 : 320; + ModalHeight = _showadvanced ? 565 : 400; } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); - Page.ClientScript.RegisterStartupScript(typeof(IDataEditor), "initPopUp", "jQuery(document).ready(function() { initPopUp(); } );", true); - } - public mediaChooser(interfaces.IData Data, bool ShowPreview, bool ShowAdvanced) - { - _data = Data; - _showpreview = ShowPreview; - _showadvanced = ShowAdvanced; - } - public System.Web.UI.Control Editor { get { return this; } } - #region IDataField Members - - //private string _text; - - public virtual bool TreatAsRichTextEditor - { - get { return false; } - } - - public bool ShowLabel - { - get - { - return true; - } - } - - public void Save() - { - if (base.Value.Trim() != "") - _data.Value = base.Value; - else - _data.Value = null; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - if (_data != null && _data.Value != null && !String.IsNullOrEmpty(_data.Value.ToString())) - { - base.Value = _data.Value.ToString(); - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - // We need to make sure we have a reference to the legacy ajax calls in the scriptmanager - if (!UmbracoContext.Current.LiveEditingContext.Enabled) - presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page); - else - ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); - - // And a reference to the media picker calls - if (!UmbracoContext.Current.LiveEditingContext.Enabled) - { - ScriptManager sm = ScriptManager.GetCurrent(base.Page); - ServiceReference webservicePath = new ServiceReference(SystemDirectories.Webservices + "/MediaPickerService.asmx"); - - if (!sm.Services.Contains(webservicePath)) - sm.Services.Add(webservicePath); - } - else - { - ClientDependencyLoader.Instance.RegisterDependency("webservices/MediaPickerService.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); - } - } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - - string tempTitle = ""; - int mediaId = -1; - string deleteLink = "   " + ui.Text("delete") + "   "; - try - { - if (base.Value != "") - { - mediaId = int.Parse(base.Value); - tempTitle = new cms.businesslogic.CMSNode(int.Parse(base.Value)).Text; - } - } - catch { } - - string dialog = "\nshowPopWin('" + TreeService.GetPickerUrl(true, "media", "media") + "', 300, 400, " + ClientID + "_saveId)"; - if (_showadvanced) - dialog = "\nshowPopWin('" + SystemDirectories.Umbraco + "/dialogs/mediaPicker.aspx" + "', 500, 530, " + ClientID + "_saveId)"; - - string preview = string.Empty; if (_showpreview) - preview = "\numbraco.presentation.webservices.MediaPickerService.GetThumbNail(treePicker, " + this.ClientID + "_UpdateThumbNail);" + - "\numbraco.presentation.webservices.MediaPickerService.GetFile(treePicker, " + this.ClientID + "_UpdateLink);"; - - - string strScript = "function " + this.ClientID + "_chooseId() {" + - //"\nshowPopWin('" + TreeService.GetPickerUrl(true, "media", "media") + "', 300, 400, " + ClientID + "_saveId)" + - //"\nshowPopWin('" + umbraco.IO.SystemDirectories.Umbraco + "/dialogs/mediaPicker.aspx" + "', 500, 530, " + ClientID + "_saveId)" + - // "\nvar treePicker = window.showModalDialog(, 'treePicker', 'dialogWidth=350px;dialogHeight=300px;scrollbars=no;center=yes;border=thin;help=no;status=no') " + - dialog + - "\n}" + - "\nfunction " + ClientID + "_saveId(treePicker) {" + - "\nsetTimeout('" + ClientID + "_saveIdDo(' + treePicker + ')', 200);" + - "\n}" + - "\nfunction " + ClientID + "_saveIdDo(treePicker) {" + - "\nif (treePicker != undefined) {" + - "\ndocument.getElementById(\"" + this.ClientID + "\").value = treePicker;" + - "\nif (treePicker > 0) {" + - "\numbraco.presentation.webservices.legacyAjaxCalls.GetNodeName(treePicker, " + this.ClientID + "_updateContentTitle" + ");" + - preview+ - "\n} " + - "\n}" + - "\n} " + - "\nfunction " + this.ClientID + "_updateContentTitle(retVal) {" + - "\ndocument.getElementById(\"" + this.ClientID + "_title\").innerHTML = \"\" + retVal + \"" + deleteLink.Replace("\"", "\\\"") + "\";" + - "\n}" + - "\nfunction " + this.ClientID + "_clear() {" + - "\ndocument.getElementById(\"" + this.ClientID + "_title\").innerHTML = \"\";" + - "\ndocument.getElementById(\"" + this.ClientID + "\").value = \"\";" + - "\ndocument.getElementById(\"" + this.ClientID + "_preview\").style.display = 'none';" + - "\n}" + - "\nfunction " + this.ClientID + "_UpdateThumbNail(retVal){" + - "\nif(retVal != \"\"){" + - "\ndocument.getElementById(\"" + this.ClientID + "_thumbnail\").src = retVal;" + - "\ndocument.getElementById(\"" + this.ClientID + "_preview\").style.display = 'block';}" + - "\nelse{document.getElementById(\"" + this.ClientID + "_preview\").style.display = 'none';}" + - "\n}"+ - "\nfunction " + this.ClientID + "_UpdateLink(retVal){" + - "\ndocument.getElementById(\"" + this.ClientID + "_thumbnaillink\").href = retVal;" + - "\n}"; - - try { - if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) - ScriptManager.RegisterClientScriptBlock(this, this.GetType(), this.ClientID + "_chooseId", strScript, true); + if (string.IsNullOrEmpty(ItemIdValue.Value)) + { + PreviewContainer.Style.Add(HtmlTextWriterStyle.Display, "none"); + ImgViewer.MediaId = -1; + } else - Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "_chooseId", strScript, true); - } - catch - { - Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "_chooseId", strScript, true); - } - // Clear remove link if text if empty - if (base.Value == "") - deleteLink = ""; - writer.WriteLine("" + tempTitle + "" + deleteLink + "" + ui.Text("choose") + "...   ");//   "); - - - - //Thumbnail preview - if (_showpreview) - { - string thumb = string.Empty; - string link = string.Empty; - string style = "display:none;"; - if (mediaId != -1) { - style = string.Empty; - thumb = string.Format(" src=\"{0}\" ", presentation.webservices.MediaPickerServiceHelpers.GetThumbNail(mediaId)); - link = string.Format(" href=\"{0}\" ", presentation.webservices.MediaPickerServiceHelpers.GetFile(mediaId)); + ImgViewer.MediaId = int.Parse(ItemIdValue.Value); } - - writer.WriteLine("
"); } - - - - - base.Render(writer); + + //if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) + //{ + // //renders the media picker JS class + // ScriptManager.RegisterStartupScript(this, this.GetType(), "MediaChooser", MediaChooserScripts.MediaPicker, true); + // ScriptManager.RegisterStartupScript(this, this.GetType(), this.ClientID + "MediaPicker", strScript, true); + + //} + //else + //{ + // //renders the media picker JS class + // Page.ClientScript.RegisterClientScriptBlock(typeof(mediaChooser), "MediaChooser", MediaChooserScripts.MediaPicker, true); + // Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "MediaPicker", strScript, true); + + //} + } - #endregion - } + + } } diff --git a/components/editorControls/pagepicker/pagePicker.cs b/components/editorControls/pagepicker/pagePicker.cs index 26c40dd49a..127575c27f 100644 --- a/components/editorControls/pagepicker/pagePicker.cs +++ b/components/editorControls/pagepicker/pagePicker.cs @@ -6,126 +6,37 @@ using ClientDependency.Core; using umbraco.presentation; using ClientDependency.Core.Controls; using umbraco.interfaces; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; +using umbraco.editorControls.pagepicker; +using umbraco.uicontrols.TreePicker; namespace umbraco.editorControls { /// /// Summary description for pagePicker. /// - [ClientDependency(100, ClientDependencyType.Css, "js/submodal/submodal.css", "UmbracoRoot")] - [ClientDependency(101, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")] - //TODO: Work out how to include this: , InvokeJavascriptMethodOnLoad = "initPopUp" - [ClientDependency(102, ClientDependencyType.Javascript, "js/submodal/submodal.js", "UmbracoRoot")] [ValidationProperty("Value")] - public class pagePicker : System.Web.UI.WebControls.HiddenField, IDataEditor + public class pagePicker : BaseTreePickerEditor { - interfaces.IData _data; - public pagePicker(interfaces.IData Data) - { - _data = Data; - } - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - Page.ClientScript.RegisterStartupScript(typeof(IDataEditor), "initPopUp", "jQuery(document).ready(function() { initPopUp(); } );", true); - } - #region IDataField Members - - //private string _text; - - - public System.Web.UI.Control Editor { get { return this; } } - - public virtual bool TreatAsRichTextEditor - { - get { return false; } - } - public bool ShowLabel + public pagePicker() : base() { } + public pagePicker(interfaces.IData data) : base(data) { } + + public override string TreePickerUrl { get { - return true; + return TreeService.GetPickerUrl("content", "content"); } } - public void Save() + public override string ModalWindowTitle { - //_text = helper.Request(this.ClientID); - if (base.Value.Trim() != "") - _data.Value = base.Value.Trim(); - else - _data.Value = null; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - // We need to make sure we have a reference to the legacy ajax calls in the scriptmanager - if (!UmbracoContext.Current.LiveEditingContext.Enabled) - presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page); - else - ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); - - if (_data != null && _data.Value != null) - base.Value = _data.Value.ToString(); - } - - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - - string tempTitle = ""; - string deleteLink = "   " + ui.Text("delete") + "   "; - try + get { - if (base.Value.Trim() != "") - { - tempTitle = new cms.businesslogic.CMSNode(int.Parse(base.Value.Trim())).Text; - } + return ui.GetText("general", "choose") + " " + ui.GetText("sections", "content"); } - catch { } - - string strScript = "function " + this.ClientID + "_chooseId() {" + - "\nshowPopWin('" + TreeService.GetPickerUrl(true, "content", "content") + "', 300, 400, " + ClientID + "_saveId);" + - //"\nvar treePicker = window.showModalDialog(, 'treePicker', 'dialogWidth=350px;dialogHeight=300px;scrollbars=no;center=yes;border=thin;help=no;status=no') " + - "\n}" + - "\nfunction " + ClientID + "_saveId(treePicker) {" + - "\nsetTimeout('" + ClientID + "_saveIdDo(' + treePicker + ')', 200);" + - "\n}" + - "\nfunction " + ClientID + "_saveIdDo(treePicker) {" + - "\nif (treePicker != undefined) {" + - "\ndocument.getElementById(\"" + this.ClientID + "\").value = treePicker;" + - "\nif (treePicker > 0) {" + - "\numbraco.presentation.webservices.legacyAjaxCalls.GetNodeName(treePicker, " + this.ClientID + "_updateContentTitle" + ");" + - "\n} " + - "\n}" + - "\n} " + - "\nfunction " + this.ClientID + "_updateContentTitle(retVal) {" + - "\ndocument.getElementById(\"" + this.ClientID + "_title\").innerHTML = \"\" + retVal + \"" + deleteLink.Replace("\"", "\\\"") + "\";" + - "\n}" + - "\nfunction " + this.ClientID + "_clear() {" + - "\ndocument.getElementById(\"" + this.ClientID + "_title\").innerHTML = \"\";" + - "\ndocument.getElementById(\"" + this.ClientID + "\").value = \"\";" + - "\n}"; - - try - { - if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) - ScriptManager.RegisterClientScriptBlock(this, this.GetType(), this.ClientID + "_chooseId", strScript, true); - else - Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "_chooseId", strScript, true); - } - catch - { - Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "_chooseId", strScript, true); - } - // Clear remove link if text if empty - if (base.Value.Trim() == "") - deleteLink = ""; - writer.WriteLine("" + tempTitle + "" + deleteLink + "" + ui.Text("choose") + "...   ");//"); - base.Render(writer); } - #endregion + } } diff --git a/components/editorControls/umbraco.editorControls.csproj b/components/editorControls/umbraco.editorControls.csproj index 9d8a873412..6b6147d6c2 100644 --- a/components/editorControls/umbraco.editorControls.csproj +++ b/components/editorControls/umbraco.editorControls.csproj @@ -152,9 +152,8 @@ {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - umbraco.presentation {651E1350-91B6-44B7-BD60-7207006D7003} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + umbraco.presentation {6EDD2061-82F2-461B-BB6E-879245A832DE} @@ -168,6 +167,7 @@ Code + Code @@ -256,6 +256,11 @@ Code + + MediaChooserScripts.resx + True + True + Code @@ -350,6 +355,11 @@ Designer + + Designer + ResXFileCodeGenerator + MediaChooserScripts.Designer.cs + textFieldDataEditor.cs Designer @@ -372,6 +382,9 @@ false + + + diff --git a/components/macroRenderings/content.cs b/components/macroRenderings/content.cs index 6131d8353b..6f2833b02f 100644 --- a/components/macroRenderings/content.cs +++ b/components/macroRenderings/content.cs @@ -5,111 +5,35 @@ using System.Data.SqlClient; using System.Web.UI; using ClientDependency.Core; using umbraco.IO; +using umbraco.interfaces; +using umbraco.uicontrols.TreePicker; namespace umbraco.macroRenderings { - /// - /// Summary description for content. - /// - [ClientDependency(103, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")] - [ClientDependency(104, ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")] - public class content : System.Web.UI.WebControls.WebControl, interfaces.IMacroGuiRendering + + public class content : SimpleContentPicker, IMacroGuiRendering { - private string m_value = ""; - public bool ShowCaption - { - get {return true;} - } + #region IMacroGuiRendering Members - public string Value - { - get { - if (Page.IsPostBack && !String.IsNullOrEmpty(System.Web.HttpContext.Current.Request[this.ClientID])) { - m_value = System.Web.HttpContext.Current.Request[this.ClientID]; - } - return m_value; + string IMacroGuiRendering.Value + { + get + { + return Value; + } + set + { + Value = value; } - set { m_value = value; } - } - - protected override void OnInit(EventArgs e) { - base.OnInit(e); - - // We need to make sure we have a reference to the legacy ajax calls in the scriptmanager - ScriptManager sm = ScriptManager.GetCurrent(Page); - ServiceReference legacyPath = new ServiceReference(SystemDirectories.Webservices + "/legacyAjaxCalls.asmx"); - if (!sm.Services.Contains(legacyPath)) - sm.Services.Add(legacyPath); } - public content() - { - // - // TODO: Add constructor logic here - // - } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) { - - string tempTitle = ""; - string deleteLink = "   " + ui.Text("delete") + "   "; - try { - if (this.Value != "") { - tempTitle = new cms.businesslogic.CMSNode(int.Parse(this.Value)).Text; - } - } catch { } - - writer.WriteLine(""); - - // Clear remove link if text if empty - if (this.Value == "") - deleteLink = ""; - writer.WriteLine("" + tempTitle + "" + deleteLink + "" + ui.Text("choose") + "...   "); - base.Render(writer); + bool IMacroGuiRendering.ShowCaption + { + get { return true; } } - - /* - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - string label = ""; - if (this.Value != "") - { - SqlDataReader pageName = SqlHelper.ExecuteReader(umbraco.GlobalSettings.DbDSN, - CommandType.Text, "select text as nodeName from umbracoNode where id = " + this.Value); - if (pageName.Read()) - label = pageName.GetString(pageName.GetOrdinal("nodeName")) + "
"; - pageName.Close(); - } - writer.WriteLine("" + label + ""); - - writer.WriteLine("Choose item"); - writer.WriteLine(""); - }*/ + #endregion } } diff --git a/components/macroRenderings/media.cs b/components/macroRenderings/media.cs index 33e2a94b96..71755121ff 100644 --- a/components/macroRenderings/media.cs +++ b/components/macroRenderings/media.cs @@ -6,112 +6,33 @@ using System.Data.SqlClient; using System.Web.UI; using ClientDependency.Core; using umbraco.IO; +using umbraco.interfaces; +using umbraco.uicontrols.TreePicker; namespace umbraco.macroRenderings { - /// - /// Summary description for media. - /// - [ClientDependency(103, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")] - [ClientDependency(104, ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")] - public class media : System.Web.UI.WebControls.WebControl, interfaces.IMacroGuiRendering + + public class media : SimpleMediaPicker, IMacroGuiRendering { - private string m_value = ""; + #region IMacroGuiRendering Members - public bool ShowCaption - { - get {return true;} - } - - public string Value { - get { - if (Page.IsPostBack && !String.IsNullOrEmpty(System.Web.HttpContext.Current.Request[this.ClientID])) { - m_value = System.Web.HttpContext.Current.Request[this.ClientID]; - } - return m_value; + string IMacroGuiRendering.Value + { + get + { + return Value; + } + set + { + Value = value; } - set { m_value = value; } } - public media() - { - // - // TODO: Add constructor logic here - // - } - - protected override void OnInit(EventArgs e) { - base.OnInit(e); - - - // We need to make sure we have a reference to the legacy ajax calls in the scriptmanager - ScriptManager sm = ScriptManager.GetCurrent(Page); - ServiceReference legacyPath = new ServiceReference(SystemDirectories.Webservices + "/legacyAjaxCalls.asmx"); - if (!sm.Services.Contains(legacyPath)) - sm.Services.Add(legacyPath); + bool IMacroGuiRendering.ShowCaption + { + get { return true; } } - - protected override void Render(System.Web.UI.HtmlTextWriter writer) { - - string tempTitle = ""; - string deleteLink = "   " + ui.Text("delete") + "   "; - try { - if (this.Value != "") { - tempTitle = new cms.businesslogic.CMSNode(int.Parse(this.Value)).Text; - } - } catch { } - - writer.WriteLine(""); - - // Clear remove link if text if empty - if (this.Value == "") - deleteLink = ""; - writer.WriteLine("" + tempTitle + "" + deleteLink + "" + ui.Text("choose") + "...   "); - base.Render(writer); - } - - /* - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - string label = ""; - if (this.Value != "") - { - SqlDataReader pageName = SqlHelper.ExecuteReader(umbraco.GlobalSettings.DbDSN, - CommandType.Text, "select text as nodeName from umbracoNode where id = " + this.Value); - if (pageName.Read()) - label = pageName.GetString(pageName.GetOrdinal("nodeName")) + "
"; - pageName.Close(); - } - writer.WriteLine("" + label + ""); - - writer.WriteLine("Choose item"); - writer.WriteLine(""); - } - */ - - } + #endregion + } } diff --git a/components/macroRenderings/umbraco.macroRenderings.csproj b/components/macroRenderings/umbraco.macroRenderings.csproj index dfb6c914aa..5000b9e60b 100644 --- a/components/macroRenderings/umbraco.macroRenderings.csproj +++ b/components/macroRenderings/umbraco.macroRenderings.csproj @@ -124,6 +124,10 @@ {511F6D8D-7717-440A-9A57-A507E9A8B27F} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ + {6EDD2061-82F2-461B-BB6E-879245A832DE} + umbraco.controls + diff --git a/components/umbraco.controls/CodeArea.cs b/components/umbraco.controls/CodeArea.cs index e517b6d836..d25121c83f 100644 --- a/components/umbraco.controls/CodeArea.cs +++ b/components/umbraco.controls/CodeArea.cs @@ -36,10 +36,12 @@ namespace umbraco.uicontrols { { get { + EnsureChildControls(); return CodeTextBox.Text; } set { + EnsureChildControls(); CodeTextBox.Text = value; } } diff --git a/components/umbraco.controls/TreePicker/BaseTreePicker.cs b/components/umbraco.controls/TreePicker/BaseTreePicker.cs new file mode 100644 index 0000000000..b1718d952a --- /dev/null +++ b/components/umbraco.controls/TreePicker/BaseTreePicker.cs @@ -0,0 +1,223 @@ +using System; +using System.Web.UI; +using ClientDependency.Core; +using ClientDependency.Core.Controls; +using umbraco.interfaces; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; +using umbraco.cms.businesslogic; +namespace umbraco.uicontrols.TreePicker +{ + + [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 + { + + protected HiddenField ItemIdValue; + protected HtmlAnchor DeleteLink; + protected HtmlAnchor ChooseLink; + protected HtmlGenericControl ItemTitle; + protected HtmlGenericControl ButtonContainer; + + public BaseTreePicker() + { + ShowDelete = true; + ModalHeight = 400; + ModalWidth = 300; + ShowHeader = true; + } + + /// + /// Wraps the hidden vield value + /// + public string Value + { + get + { + EnsureChildControls(); + return ItemIdValue.Value; + } + set + { + EnsureChildControls(); + ItemIdValue.Value = value; + } + } + + public int ModalWidth { get; set; } + public int ModalHeight { get; set; } + public bool ShowDelete { get; set; } + public bool ShowHeader { get; set; } + + /// + /// Need to specify the tree picker url (iframe) + /// + public abstract string TreePickerUrl { get; } + + /// + /// The title to specify for the picker window + /// + public abstract string ModalWindowTitle { get; } + + /// + /// If item has been selected or stored, this will query the db for it's title + /// + /// + protected virtual string GetItemTitle() + { + if (!string.IsNullOrEmpty(ItemIdValue.Value)) + { + try + { + return new CMSNode(int.Parse(ItemIdValue.Value)).Text; + } + catch (ArgumentException ex) { /*the node does not exist! we will ignore*/ } + } + return ""; + } + + /// + /// Outputs the JavaScript instances used to make this control work + /// + protected virtual string GetJSScript() + { + /* 0 = this control's client id + * 1 = label + * 2 = itemIdValueClientID + * 3 = itemTitleClientID + * 4 = itemPickerUrl + * 5 = popup width + * 6 = popup height + * 7 = show header + * 8 = umbraco path + */ + return string.Format(@" + var mc_{0} = new Umbraco.Controls.TreePicker('{0}','{1}','{2}','{3}','{4}',{5},{6},{7},'{8}');", + new string[] + { + this.ClientID, + ModalWindowTitle, + ItemIdValue.ClientID, + ItemTitle.ClientID, + TreePickerUrl, + ModalWidth.ToString(), + ModalHeight.ToString(), + ShowHeader.ToString().ToLower(), + umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco).TrimEnd('/') + }); + } + + /// + /// Registers the required JS classes required to make this control work + /// + protected virtual void RenderJSComponents() + { + if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) + { + ScriptManager.RegisterStartupScript(this, this.GetType(), this.GetType().ToString(), BaseTreePickerScripts.BaseTreePicker, true); + } + else + { + Page.ClientScript.RegisterClientScriptBlock(typeof(BaseTreePicker), this.GetType().ToString(), BaseTreePickerScripts.BaseTreePicker, true); + } + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + EnsureChildControls(); + + //disable view state for this control + this.EnableViewState = false; + } + + /// + /// Create the native .net child controls for this control + /// + protected override void CreateChildControls() + { + base.CreateChildControls(); + + //create the hidden field + ItemIdValue = new HiddenField(); + ItemIdValue.ID = "ContentIdValue"; + this.Controls.Add(ItemIdValue); + + ButtonContainer = new HtmlGenericControl("span"); + ButtonContainer.ID = "btns"; + + //add item title with padding + ItemTitle = new HtmlGenericControl("span"); + ItemTitle.ID = "title"; + ItemTitle.Style.Add(HtmlTextWriterStyle.FontWeight, "bold"); + ButtonContainer.Controls.Add(ItemTitle); + ButtonContainer.Controls.Add(new LiteralControl(" ")); + ButtonContainer.Controls.Add(new LiteralControl(" ")); + + //add the delete link with padding + DeleteLink = new HtmlAnchor(); + DeleteLink.HRef = "#"; //set on pre-render + DeleteLink.Style.Add(HtmlTextWriterStyle.Color, "red"); + DeleteLink.Title = ui.GetText("delete"); + DeleteLink.InnerText = ui.GetText("delete"); + ButtonContainer.Controls.Add(DeleteLink); + ButtonContainer.Controls.Add(new LiteralControl(" ")); + ButtonContainer.Controls.Add(new LiteralControl(" ")); + if (!ShowDelete) + { + DeleteLink.Style.Add(HtmlTextWriterStyle.Display, "none"); + } + + this.Controls.Add(ButtonContainer); + + //add choose link with padding + ChooseLink = new HtmlAnchor(); + ChooseLink.HRef = "#"; //filled in on pre-render + ChooseLink.InnerText = ui.GetText("choose") + "..."; + this.Controls.Add(ChooseLink); + + } + + /// + /// Registers the JavaScript required for the control to function and hides/shows controls depending on it's properties + /// + /// + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + //hide the buttons if no item, otherwise get the item title + if (string.IsNullOrEmpty(ItemIdValue.Value)) + { + ButtonContainer.Style.Add(HtmlTextWriterStyle.Display, "none"); + } + else + { + ItemTitle.InnerText = GetItemTitle(); + } + + ChooseLink.HRef = string.Format("javascript:mc_{0}.LaunchPicker();", this.ClientID); + DeleteLink.HRef = string.Format("javascript:mc_{0}.ClearSelection();", this.ClientID); + + RenderJSComponents(); + + if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack) + { + ScriptManager.RegisterStartupScript(this, this.GetType(), this.ClientID + "TreePicker", GetJSScript(), true); + } + else + { + Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID + "TreePicker", GetJSScript(), true); + } + + } + + + } +} diff --git a/components/umbraco.controls/TreePicker/BaseTreePicker.js b/components/umbraco.controls/TreePicker/BaseTreePicker.js new file mode 100644 index 0000000000..2992bfe471 --- /dev/null +++ b/components/umbraco.controls/TreePicker/BaseTreePicker.js @@ -0,0 +1,70 @@ +/// + +Umbraco.Sys.registerNamespace("Umbraco.Controls"); + +(function($) { + Umbraco.Controls.TreePicker = function(clientId, label, itemIdValueClientID, itemTitleClientID, itemPickerUrl, width, height, showHeader, umbracoPath) { + var obj = { + _itemPickerUrl: itemPickerUrl, + _webServiceUrl: umbracoPath + "/webservices/legacyAjaxCalls.asmx/GetNodeName", + _label: label, + _width: width, + _height: height, + _itemIdValueClientID: itemIdValueClientID, + _itemTitleClientID: itemTitleClientID, + _showHeader: showHeader, + _clientId: clientId, + + GetValue: function() { + return $("#" + this._itemIdValueClientID).val(); + }, + + LaunchPicker: function() { + var _this = this; + UmbClientMgr.openModalWindow(this._itemPickerUrl, this._label, this._showHeader, this._width, this._height, 30, 0, ['#cancelbutton'], function(e) { _this.SaveSelection(e); }); + }, + + SaveSelection: function(e) { + if (!e.outVal) { + return; + } + $("#" + this._itemIdValueClientID).val(e.outVal); + var _this = this; + $.ajax({ + type: "POST", + url: _this._webServiceUrl, + data: '{ "nodeId": ' + e.outVal + ' }', + contentType: "application/json; charset=utf-8", + dataType: "json", + success: function(msg) { + $("#" + _this._itemTitleClientID).html(msg.d); + $("#" + _this._itemTitleClientID).parent().show(); + } + }); + }, + + ClearSelection: function() { + $("#" + this._itemTitleClientID).parent().hide(); + $("#" + this._itemIdValueClientID).val(''); + } + }; + + //store this instance (by counter and id) so we can retrieve it later if needed + Umbraco.Controls.TreePicker.inst[++Umbraco.Controls.TreePicker.cntr] = obj; + Umbraco.Controls.TreePicker.inst[clientId] = obj; + + return obj; + } + + // Static methods + + //return the existing picker object based on client id of the control + Umbraco.Controls.TreePicker.GetPickerById = function(id) { + return Umbraco.Controls.TreePicker.inst[id] || null; + }; + + // instance manager + Umbraco.Controls.TreePicker.cntr = 0; + Umbraco.Controls.TreePicker.inst = {}; + +})(jQuery); diff --git a/components/umbraco.controls/TreePicker/BaseTreePickerScripts.Designer.cs b/components/umbraco.controls/TreePicker/BaseTreePickerScripts.Designer.cs new file mode 100644 index 0000000000..75d186dfbc --- /dev/null +++ b/components/umbraco.controls/TreePicker/BaseTreePickerScripts.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace umbraco.uicontrols.TreePicker { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class BaseTreePickerScripts { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal BaseTreePickerScripts() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("umbraco.uicontrols.TreePicker.BaseTreePickerScripts", typeof(BaseTreePickerScripts).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to /// <reference path="/umbraco_client/Application/NamespaceManager.js" /> + /// + ///Umbraco.Sys.registerNamespace("Umbraco.Controls"); + /// + ///(function($) { + /// Umbraco.Controls.TreePicker = function(label, itemIdValueClientID, itemTitleClientID, itemPickerUrl, width, height, showHeader, umbracoPath) { + /// return { + /// _itemPickerUrl: itemPickerUrl, + /// _webServiceUrl: umbracoPath + "/webservices/legacyAjaxCalls.asmx/GetNodeName", + /// _label: label, + /// _width: width, + /// [rest of string was truncated]";. + /// + internal static string BaseTreePicker { + get { + return ResourceManager.GetString("BaseTreePicker", resourceCulture); + } + } + } +} diff --git a/components/umbraco.controls/TreePicker/BaseTreePickerScripts.resx b/components/umbraco.controls/TreePicker/BaseTreePickerScripts.resx new file mode 100644 index 0000000000..628b40df7b --- /dev/null +++ b/components/umbraco.controls/TreePicker/BaseTreePickerScripts.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + BaseTreePicker.js;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + \ No newline at end of file diff --git a/components/umbraco.controls/TreePicker/SimpleContentPicker.cs b/components/umbraco.controls/TreePicker/SimpleContentPicker.cs new file mode 100644 index 0000000000..9866048294 --- /dev/null +++ b/components/umbraco.controls/TreePicker/SimpleContentPicker.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace umbraco.uicontrols.TreePicker +{ + public class SimpleContentPicker : BaseTreePicker + { + public override string TreePickerUrl + { + get + { + return TreeUrlGenerator.GetPickerUrl("content", "content"); + } + } + + public override string ModalWindowTitle + { + get + { + return ui.GetText("general", "choose") + " " + ui.GetText("sections", "content"); + } + } + } +} diff --git a/components/umbraco.controls/TreePicker/SimpleMediaPicker.cs b/components/umbraco.controls/TreePicker/SimpleMediaPicker.cs new file mode 100644 index 0000000000..d91ca6cbba --- /dev/null +++ b/components/umbraco.controls/TreePicker/SimpleMediaPicker.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace umbraco.uicontrols.TreePicker +{ + public class SimpleMediaPicker : BaseTreePicker + { + public override string TreePickerUrl + { + get + { + return TreeUrlGenerator.GetPickerUrl("media", "media"); + } + } + + public override string ModalWindowTitle + { + get + { + return ui.GetText("general", "choose") + " " + ui.GetText("sections", "media"); + } + } + } +} diff --git a/components/umbraco.controls/TreeUrlGenerator.cs b/components/umbraco.controls/TreeUrlGenerator.cs new file mode 100644 index 0000000000..a136772028 --- /dev/null +++ b/components/umbraco.controls/TreeUrlGenerator.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace umbraco.uicontrols +{ + /// + /// This class will generate the URLs for iframe tree pages. + /// Generally used to get the a tree picker url. + /// + /// + /// This was created in 4.1 so that this helper class can be exposed to other assemblies since + /// it only existed in the presentation assembly in previous versions + /// + public class TreeUrlGenerator + { + + public const string TREE_URL = "tree.aspx"; + public const string INIT_URL = "treeinit.aspx"; + public const string PICKER_URL = "treepicker.aspx"; + + private int? m_startNodeID; + private string m_treeType; + private bool? m_showContextMenu; + private bool? m_isDialog; + private string m_app; + private string m_nodeKey; + private string m_functionToCall; + + #region Public Properties + + public string FunctionToCall + { + get { return m_functionToCall; } + set { m_functionToCall = value; } + } + + public string NodeKey + { + get { return m_nodeKey; } + set { m_nodeKey = value; } + } + + public int StartNodeID + { + get { return m_startNodeID ?? -1; } + set { m_startNodeID = value; } + } + + public string TreeType + { + get { return m_treeType; } + set { m_treeType = value; } + } + + public bool ShowContextMenu + { + get { return m_showContextMenu ?? true; } + set { m_showContextMenu = value; } + } + + public bool IsDialog + { + get { return m_isDialog ?? false; } + set { m_isDialog = value; } + } + + public string App + { + get { return m_app; } + set { m_app = value; } + } + #endregion + + /// + /// Returns the url for servicing the xml tree request based on the parameters specified on this class. + /// + /// Tree service url as a string + public string GetServiceUrl() + { + return umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/" + GetUrl(TREE_URL); + } + + /// + /// Static method to return the tree service url with the specified parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static string GetServiceUrl(int? startNodeID, string treeType, bool? showContextMenu, + bool? isDialog, string app, string nodeKey, string functionToCall) + { + TreeUrlGenerator treeSvc = new TreeUrlGenerator() + { + StartNodeID = startNodeID ?? -1, + TreeType = treeType, + ShowContextMenu = showContextMenu ?? true, + IsDialog = isDialog ?? false, + App = app, + NodeKey = nodeKey, + FunctionToCall = functionToCall + }; + return treeSvc.GetServiceUrl(); + } + + /// + /// Returns the url for initializing the tree based on the parameters specified on this class + /// + /// + public string GetInitUrl() + { + return umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/" + GetUrl(INIT_URL); + } + + /// + /// static method to return the tree init url with the specified parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static string GetInitUrl(int? startNodeID, string treeType, bool? showContextMenu, + bool? isDialog, string app, string nodeKey, string functionToCall) + { + TreeUrlGenerator treeSvc = new TreeUrlGenerator() + { + StartNodeID = startNodeID ?? -1, + TreeType = treeType, + ShowContextMenu = showContextMenu ?? true, + IsDialog = isDialog ?? false, + App = app, + NodeKey = nodeKey, + FunctionToCall = functionToCall + }; + return treeSvc.GetInitUrl(); + } + + /// + /// Returns the url for the tree picker (used on modal windows) based on the parameters specified on this class + /// + public static string GetPickerUrl(string app, string treeType) + { + TreeUrlGenerator treeSvc = new TreeUrlGenerator(); + treeSvc.App = app; + treeSvc.TreeType = treeType; + return treeSvc.GetPickerUrl(); + } + + /// + /// Returns the url for the tree picker (used on modal windows) based on the parameters specified on this class + /// + public string GetPickerUrl() + { + return umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/dialogs/" + GetUrl(PICKER_URL); + } + + [Obsolete("No longer used as useSubModal no longer has any relavence")] + public static string GetPickerUrl(bool useSubModal, string app, string treeType) + { + return GetPickerUrl(app, treeType); + } + [Obsolete("No longer used as useSubModal no longer has any relavence")] + public string GetPickerUrl(bool useSubModal) + { + return GetPickerUrl(); + } + + /// + /// Generates the URL parameters for the tree service. + /// + /// the base url (i.e. tree.aspx) + /// + protected virtual string GetUrl(string pageUrl) + { + StringBuilder sb = new StringBuilder(); + + sb.Append(pageUrl); + //insert random + sb.Append(string.Format("?rnd={0}", Guid.NewGuid().ToString("N"))); + + sb.Append(string.Format("&id={0}", this.StartNodeID.ToString())); + if (!string.IsNullOrEmpty(this.TreeType)) sb.Append(string.Format("&treeType={0}", this.TreeType)); + if (!string.IsNullOrEmpty(this.NodeKey)) sb.Append(string.Format("&nodeKey={0}", this.NodeKey)); + sb.Append(string.Format("&contextMenu={0}", this.ShowContextMenu.ToString().ToLower())); + sb.Append(string.Format("&isDialog={0}", this.IsDialog.ToString().ToLower())); + if (!string.IsNullOrEmpty(this.App)) sb.Append(string.Format("&app={0}", this.App)); + + return sb.ToString(); + } + + } +} diff --git a/components/umbraco.controls/feedback.cs b/components/umbraco.controls/feedback.cs index eb38cd9914..9e3c1b2c24 100644 --- a/components/umbraco.controls/feedback.cs +++ b/components/umbraco.controls/feedback.cs @@ -45,7 +45,7 @@ namespace umbraco.uicontrols { styleString += key + ":" + this.Style[key] + ";"; } - writer.WriteLine("

"); + writer.WriteLine("

"); writer.WriteLine(_text); writer.WriteLine("

"); } diff --git a/components/umbraco.controls/umbraco.controls.csproj b/components/umbraco.controls/umbraco.controls.csproj index 775f15db1b..6aa427313d 100644 --- a/components/umbraco.controls/umbraco.controls.csproj +++ b/components/umbraco.controls/umbraco.controls.csproj @@ -7,7 +7,7 @@ {6EDD2061-82F2-461B-BB6E-879245A832DE} Library Properties - umbraco.controls + umbraco.uicontrols controls SAK SAK @@ -64,6 +64,15 @@ + + + True + True + BaseTreePickerScripts.resx + + + + @@ -86,6 +95,23 @@ {E469A9CE-1BEC-423F-AC44-713CD72457EA} umbraco.businesslogic + + {CCD75EC3-63DB-4184-B49D-51C1DD337230} + umbraco.cms + + + {511F6D8D-7717-440A-9A57-A507E9A8B27F} + umbraco.interfaces + + + + + + + + ResXFileCodeGenerator + BaseTreePickerScripts.Designer.cs + - \ No newline at end of file + diff --git a/foreign dlls/ClientDependency.Core.dll b/foreign dlls/ClientDependency.Core.dll index eae13120f3c3e97b492d75e717b7516eab39a0da..d02843e2cc5abc16c17db19967360fbf782eac36 100644 GIT binary patch literal 54784 zcmdSC34EMY)jxio=b3qCPcqHcQb;Cgn@qN8)6&unXu1cw(FMxdPLpXnG|3a@nY0b1 zH5Di#i`E52b_5Z@1w{n`0Ywx+1z+$5)Y8hLyn>42E2!ZAd(M5HS(21if1m&V_xTU> z%suCxd+xdCo_p@{+~P6*T0DF!#98C3H)F%gzS>q@08HJfuGdfr!D(Q z-P)~bJJz4Ewq%mMv94rapOuYmO2sk*eX(?3Y~ji^v0ke?m54-w6CKg377;De3|d`% z{;6(l2T89BX?~)gf?_Ia-<$Z3aazN_c`B_dy_w4T%V!?)LFbP_^DZSSlmGMI4yst_ zSjb%|X^p6yn-m0jX+K_D3v)%8&hT|iV+7r$obPp#zT(Blx*5{F_fK|L^KLWQ_OyDzsp{1)mQ7$`=o7WLo0^;t6J-450h1Dfo(y zg(RyTDbJPYdtDKy0x$RIQBNFhWd@v(B+Z1R*`I5Mj>(MWAKM~uHvoa&BFh-jJM(DgX{#4Kd8PJ&>I znN-I_p=fK3%U;MS<`+(l63J1}T4JP2ch>R_}4{z*px=ePmG%eYoG zmZQct-Doz9+LPnx!j?8)=5jQ-#hbZ`?ZHk}rWu+2jEM7a2}FbVJmiSEkj;JE0layW z5$B$0^<}O@fijIl4V;OceEbv--GaI?&ueH(&d)ux26T+3Xl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D8|ioTbt>$mO`LD8s}u8`c&|yB2~eEV$fvCJyTR-`#|6k+(J_h~+B@Qd6 diff --git a/foreign dlls/UmbracoExamine.Core.dll b/foreign dlls/UmbracoExamine.Core.dll index 5daf59a208cef4ac6543ee81fcefe468a1151ed9..a76d093f7512858bd5d8181101bc38a1fc393214 100644 GIT binary patch literal 30208 zcmeHw33yx8mH&B9($lkS%a&q0@sdQ@KsbrX9uiEjvw@p9n?n-TM79)1M7A7B4lyBM z0}W81kd{&?(1vZwHigiZt)&e#%?xds(t!@8Gi^g@nX;6n1D!(K@c*52@6%#Al=PmzejwaYefZ{mS`d(?R4kE%BKt}Q@nu_FLEfi@XmK7XXo%yA z5Bp}4hgQykjg3TxaR2KdWrjx)`Ak zVh92ToKy@!z(5Zwh9Jw$6rAYe8hn{@#HbM*RI54jnKMsuT;VZLf*avlzK&ROu2b^v zh1yoUkmHozkd5g?ZlgPl!6Qv9aoiIG{`wq-AfsluX$QIxP6u4mW|>JOu;I4cFv!fYi0@VH2~>Do1c4NN$aKjF#4B6B!-g617G8)83rK* zc(?}4@JV3lpyn)db|5^y#=Wl8-PzI$zzHKEeCF5_33Mw~65+e)@U8IwpJw{c;1_#**j z+?S%wGKmWEC7$(=uRJj#_jrOp67i&q+>xmfeJ16wIH+=hV7@4K7=nP|cNl_zfk{>s z5d>opanwr&nc+`ygV(@%avg)Q0Mm`e@paWHq-0-s1;pr1gx5;1WYu=XK=`fnDrT%! z420WC!;UY!RxuD$&46LHfw)^~EY!a6dc|mA#u?1m0D!TS{5m*|t{GlJVflpNsO72& zPr)U*5n46EN$vxEaU~iyJy3PjLeE+0O^^;UOZZ`A{M00-9FCe}*CKd1vfVth0mtm} ztXXDV%s`p_BAY$0$hYK|nBS@RqjNrwPTs@<%w62RnxjS|`rs3`G3YphOw?^;*2N6+ z+E{4&leH78t_mNrTbpLq#SHS=c^0y87BrBWNCr+#q=4k&Xede!3xZ4=<1hrl1ac<# z>xR^s1~Ta^;Qh!+bFhxp>MoW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y9|+qcecD<9+xQ zpxXhLsQ>E<{m}WZpQtyj)mT+Hzay_hg?-jO=V(D_xnSpkzf3vZRLJaVi3Rqs_ zZviaqqWYwc0knwsR8cYC0gK(RYoTrnULhgC8~&RJ+gsj2rbH(O3%S01+JcDxcFuy` zD9O(jz!%(cGd9@pYxP#XZC|*zsdZ zMf*SN^K$72wOj4MDML5B%3X`w!}Z**2rEM*$4Bb44($@?wt4KaYQVH(VX9V eBg;up{yV@R{{|!eUP(3SzoUl#vHAaS1pYT@0k@n0 diff --git a/foreign dlls/UmbracoExamine.Providers.dll b/foreign dlls/UmbracoExamine.Providers.dll index e48efd8f90399f7b13cf043f339c5457cafcff49..48877c8ab7d33fa65caf6e3feb04bd6113ba02d9 100644 GIT binary patch literal 41472 zcmeIbdwi7DwKu+==b3q)XJ(Q~W|B-2NMJ$$huk1s1Qd_}5u!l2gqt@Qk^x4OJYgn5 zB0>|iR$H*8-rH)uwzY3BdhBVn(h5CjtF`B7Puruda%}BIPp_QgIc=>+-|t%cnM)Gz za87@}_mB7UMzfy1)?Rz0V zq_6nCSM#{G@_RKMyOQZ>U&`5;iuXi2Xtd7sW$YdZQ%z^OHyuI+qMu z{6V5(`9Jq`QD(qTALL5M$B15FLyZ1;ji>;$AAF6dYINQE;ZY)tAp2tjUy;R#n)(xa z`+=Xh699EGR*WbACrY%fDV0ujf+)HjLxCsiQ~1sMSqy_Tr4ro^7+F_(4ZkewUi{|$ zEGAl#hf48YcfwgWoxHSbHBom`tT>wWtndr<6egfA79#TZFM^!933@CH1WyMw<{6)u zuNfBo!0knME&+4wW`F}|=4lL-zH54crOO~}h)F_^p;RBkVC!{fOST1Y)dJq*wqVi$ z2Kg;EWm{nCRSPTIf=LG$1uC6$p1&kS9+Lj$}PJ0Yf zN%mzWGwA>Wk(_TFj8HNAv&>97z(A>iA=L9MjAI>E7iqEaDCqmAXnd?FrFv>*Q0Pv8(CjD3ZKJxZoETm*}8A)X`Yn*FpkG9V*Psb zSPWEMf7fhe!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JX#$e%W*dB}56l|}F1zNFaLAE9~JsFZHE1O{4daTyP0$)2RRM|Qc zV^bqB60fPYO=-FYtDZE6nGs)uIM8GG(@prrhfRj&p6@8XT+2>CC|)bEHC+}V*nF*8 zjmFN`5gG9T5IAeQV+VP;9lI$ev+EE_Jj3H-hoCp6n&2#efaXQqiKoN10c{9xmXD9! zCac}pZ4Ndn2G(sXd!R$Xr)S!c_y7vGVVNAe7VgKCRvqSEJ5gpwknz&V!wX$^I;@*b zL*(cPR-=rcm&dU$z=n7x#?Hxv?NCgYIEI~ zA{~YL6$PY%hc2j4-5g+c{BaN-K6mVC%tAnX_Zfk-4S|HMLl|i%{95AbTn ze~&i2CfnKS-MjgJB{8_QaPynnito7KGyP&dyT<6X22x5w-I zGy5ixi(iw-ZS{KIw-w($$>5{X<1)1j_4UxkF&GuR2DzLpVB?=V%J_)3FZ2B6{rzk3 znV$MabtWTUZ)cfz=2Eg_yzu{3jQ9yWoV6$;M~SY>EMg{HPFb%Vh?S5unO}K*LwVSMha~#hs8PJ$wEWn zBAHG5OILL*xLO;3eT~aUyjn2@OS&(R!+-Gt0`+aUL~Jd-*_IjLXOF3ihe7nA?4bWw z+t7m3bwB>`Yb$=yqv1jx9}Rsmg!L{*5wD%FlhcFzkiJ#Y+v?{(mw)3uS!9>zp`B6US(g$aEq~ k_)?IsZ`I}F|4xp_;IDd(%Acj8(YC)z>i;wUKjMM^1vtv^YXATM diff --git a/umbraco/businesslogic/Application.cs b/umbraco/businesslogic/Application.cs index c60b75efa8..82817ee774 100644 --- a/umbraco/businesslogic/Application.cs +++ b/umbraco/businesslogic/Application.cs @@ -211,7 +211,7 @@ namespace umbraco.BusinessLogic { if (GlobalSettings.Configured) { - List types = TypeFinder.FindClassesOfType(false); + List types = TypeFinder.FindClassesOfType(); foreach (Type t in types) { try diff --git a/umbraco/businesslogic/BasePages/ClientTools.cs b/umbraco/businesslogic/BasePages/ClientTools.cs index 9ba543ae8c..ca36941b77 100644 --- a/umbraco/businesslogic/BasePages/ClientTools.cs +++ b/umbraco/businesslogic/BasePages/ClientTools.cs @@ -54,11 +54,23 @@ namespace umbraco.BasePages public static string MoveNode { get { return GetMainTree + ".moveNode('{0}', '{1}');"; } } public static string ReloadActionNode { get { return GetMainTree + ".reloadActionNode({0}, {1}, null);"; } } public static string SetActiveTreeType { get { return GetMainTree + ".setActiveTreeType('{0}');"; } } - public static string CloseModalWindow { get { return GetMainWindow + ".closeModal();"; } } - public static string OpenModalWindow(string url, string name, int height, int width) - { - return string.Format(GetMainWindow + ".openModal('{0}','{1}',{2},{3});", url, name, height, width); - } + public static string CloseModalWindow() + { + return string.Format("{0}.closeModalWindow();", ClientMgrScript); + } + public static string CloseModalWindow(string rVal) + { + return string.Format("{0}.closeModalWindow('{1}');", ClientMgrScript, rVal); + } + public static string OpenModalWindow(string url, string name, int width, int height) + { + return OpenModalWindow(url, name, true, width, height, 0, 0, "", ""); + } + public static string OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback) + { + return string.Format("{0}.openModalWindow('{1}', '{2}', {3}, {4}, {5}, {6}, {7}, '{8}', '{9}');", + new object[] { ClientMgrScript, url, name, showHeader.ToString().ToLower(), width, height, top, leftOffset, closeTriggers, onCloseCallback }); + } } private Page m_page; @@ -238,14 +250,25 @@ namespace umbraco.BasePages } ///

- /// Closes the Umbraco dialog window if it is open + /// Closes the Umbraco dialog window if it is open /// - public ClientTools CloseModalWindow() + /// specify a value to return to add to the onCloseCallback method if one was specified in the OpenModalWindow method + /// + public ClientTools CloseModalWindow(string returnVal) { - RegisterClientScript(Scripts.CloseModalWindow); + RegisterClientScript(Scripts.CloseModalWindow(returnVal)); return this; } - + /// + /// Closes the umbraco dialog window if it is open + /// + /// + public ClientTools CloseModalWindow() + { + return CloseModalWindow(""); + } + + /// /// Opens a modal window /// @@ -254,13 +277,11 @@ namespace umbraco.BasePages /// /// /// - public ClientTools OpenModalWindow(string url, string name, int height, int width) + public ClientTools OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback) { - RegisterClientScript(Scripts.OpenModalWindow(url, name, height, width)); + RegisterClientScript(Scripts.OpenModalWindow(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback)); return this; } - - private Page GetCurrentPage() { diff --git a/umbraco/businesslogic/Utils/TypeFinder.cs b/umbraco/businesslogic/Utils/TypeFinder.cs index 68987c63cf..935ffc9577 100644 --- a/umbraco/businesslogic/Utils/TypeFinder.cs +++ b/umbraco/businesslogic/Utils/TypeFinder.cs @@ -14,13 +14,37 @@ namespace umbraco.BusinessLogic.Utils public static class TypeFinder { - /// + + + /// + /// Searches all loaded assemblies for classes of the type passed in. + /// + /// The type of object to search for + /// A list of found types + public static List FindClassesOfType() + { + return FindClassesOfType(true); + } + + /// + /// Searches all loaded assemblies for classes of the type passed in. + /// + /// The type of object to search for + /// true if a seperate app domain should be used to query the types. This is safer as it is able to clear memory after loading the types. + /// A list of found types + public static List FindClassesOfType(bool useSeperateAppDomain) + { + return FindClassesOfType(useSeperateAppDomain, true); + } + + /// /// Searches all loaded assemblies for classes of the type passed in. /// /// The type of object to search for /// true if a seperate app domain should be used to query the types. This is safer as it is able to clear memory after loading the types. + /// True to only return classes that can be constructed /// A list of found types - public static List FindClassesOfType(bool useSeperateAppDomain) + public static List FindClassesOfType(bool useSeperateAppDomain, bool onlyConcreteClasses) { if (useSeperateAppDomain) { @@ -32,10 +56,10 @@ namespace umbraco.BusinessLogic.Utils foreach (string type in strTypes) types.Add(Type.GetType(type)); - return types; + return types.FindAll(OnlyConcreteClasses(typeof(T), onlyConcreteClasses)); } else - return FindClassesOfType(typeof(T)); + return FindClassesOfType(typeof(T), onlyConcreteClasses); } /// @@ -43,7 +67,7 @@ namespace umbraco.BusinessLogic.Utils /// /// The type. /// A list of found classes - private static List FindClassesOfType(Type type) + private static List FindClassesOfType(Type type, bool onlyConcreteClasses) { bool searchGAC = false; @@ -65,9 +89,7 @@ namespace umbraco.BusinessLogic.Utils List listOfTypes = new List(); listOfTypes.AddRange(publicTypes); - List foundTypes = listOfTypes.FindAll( - delegate(Type t) { return (type.IsAssignableFrom(t) && t.IsClass && !t.IsAbstract); } - ); + List foundTypes = listOfTypes.FindAll(OnlyConcreteClasses(type, onlyConcreteClasses)); Type[] outputTypes = new Type[foundTypes.Count]; foundTypes.CopyTo(outputTypes); classesOfType.AddRange(outputTypes); @@ -76,5 +98,10 @@ namespace umbraco.BusinessLogic.Utils return classesOfType; } + private static Predicate OnlyConcreteClasses(Type type, bool onlyConcreteClasses) + { + return t => (type.IsAssignableFrom(t) && (onlyConcreteClasses ? (t.IsClass && !t.IsAbstract) : true)); + } + } } diff --git a/umbraco/cms/Actions/Action.cs b/umbraco/cms/Actions/Action.cs index 55a8e77068..8e558159ca 100644 --- a/umbraco/cms/Actions/Action.cs +++ b/umbraco/cms/Actions/Action.cs @@ -45,7 +45,7 @@ namespace umbraco.BusinessLogic.Actions if (_actionHandlers.Count > 0) return; - List foundIActionHandlers = TypeFinder.FindClassesOfType(true); + List foundIActionHandlers = TypeFinder.FindClassesOfType(); foreach (Type type in foundIActionHandlers) { IActionHandler typeInstance; @@ -63,7 +63,7 @@ namespace umbraco.BusinessLogic.Actions if (_actions.Count > 0) return; - List foundIActions = TypeFinder.FindClassesOfType(true); + List foundIActions = TypeFinder.FindClassesOfType(); foreach (Type type in foundIActions) { IAction typeInstance; diff --git a/umbraco/cms/businesslogic/Packager/PackageInstance/PackageActions.cs b/umbraco/cms/businesslogic/Packager/PackageInstance/PackageActions.cs index 1b93dae4be..3e7963a290 100644 --- a/umbraco/cms/businesslogic/Packager/PackageInstance/PackageActions.cs +++ b/umbraco/cms/businesslogic/Packager/PackageInstance/PackageActions.cs @@ -28,7 +28,7 @@ namespace umbraco.cms.businesslogic.packager { private static void RegisterPackageActions() { - List types = TypeFinder.FindClassesOfType(true); + List types = TypeFinder.FindClassesOfType(); foreach (Type t in types) { IPackageAction typeInstance = Activator.CreateInstance(t) as IPackageAction; diff --git a/umbraco/cms/businesslogic/datatype/factory.cs b/umbraco/cms/businesslogic/datatype/factory.cs index b3e5b3dc0f..9637b2d40a 100644 --- a/umbraco/cms/businesslogic/datatype/factory.cs +++ b/umbraco/cms/businesslogic/datatype/factory.cs @@ -72,7 +72,7 @@ namespace umbraco.cms.businesslogic.datatype.controls private static void Initialize() { // Get all datatypes from interface - List types = TypeFinder.FindClassesOfType(true); + List types = TypeFinder.FindClassesOfType(); getDataTypes(types); } diff --git a/umbraco/cms/umbraco.cms.csproj b/umbraco/cms/umbraco.cms.csproj index 44d6cff307..28957121cd 100644 --- a/umbraco/cms/umbraco.cms.csproj +++ b/umbraco/cms/umbraco.cms.csproj @@ -118,10 +118,6 @@ False ..\..\foreign dlls\TidyNet.dll - - {6EDD2061-82F2-461B-BB6E-879245A832DE} - umbraco.controls - umbraco.businesslogic {E469A9CE-1BEC-423F-AC44-713CD72457EA} diff --git a/umbraco/interfaces/IDataEditor.cs b/umbraco/interfaces/IDataEditor.cs index caa44acbe0..abb4273cf6 100644 --- a/umbraco/interfaces/IDataEditor.cs +++ b/umbraco/interfaces/IDataEditor.cs @@ -31,16 +31,4 @@ namespace umbraco.interfaces /// The editor. System.Web.UI.Control Editor{get;} } - - /// - /// The alternative Data Editor which supports AJAX - /// - public interface IDataEditorAjaxAlternative - { - /// - /// Gets the ajax editor. - /// - /// The ajax editor. - System.Web.UI.Control AjaxEditor { get;} - } } diff --git a/umbraco/interfaces/IDataEditorAjaxAlternative.cs b/umbraco/interfaces/IDataEditorAjaxAlternative.cs new file mode 100644 index 0000000000..c96e5478a2 --- /dev/null +++ b/umbraco/interfaces/IDataEditorAjaxAlternative.cs @@ -0,0 +1,16 @@ +using System; + +namespace umbraco.interfaces +{ + /// + /// The alternative Data Editor which supports AJAX + /// + public interface IDataEditorAjaxAlternative + { + /// + /// Gets the ajax editor. + /// + /// The ajax editor. + System.Web.UI.Control AjaxEditor { get; } + } +} diff --git a/umbraco/interfaces/umbraco.interfaces.csproj b/umbraco/interfaces/umbraco.interfaces.csproj index 4c58994525..71d1192026 100644 --- a/umbraco/interfaces/umbraco.interfaces.csproj +++ b/umbraco/interfaces/umbraco.interfaces.csproj @@ -112,6 +112,7 @@ Code + Code diff --git a/umbraco/presentation/config/ExamineIndex.config b/umbraco/presentation/config/ExamineIndex.config index b29e5f812a..03ae727340 100644 --- a/umbraco/presentation/config/ExamineIndex.config +++ b/umbraco/presentation/config/ExamineIndex.config @@ -23,8 +23,8 @@ More information and documentation can be found on CodePlex: http://umbracoexami - \ No newline at end of file diff --git a/umbraco/presentation/config/ExamineSettings.config b/umbraco/presentation/config/ExamineSettings.config index 5fe6e6756a..5831d191d6 100644 --- a/umbraco/presentation/config/ExamineSettings.config +++ b/umbraco/presentation/config/ExamineSettings.config @@ -5,7 +5,7 @@ This configuration file can be extended to add your own search/index providers. Index sets can be defined in the ExamineIndex.config if you're using the standard provider model. More information and documentation can be found on CodePlex: http://umbracoexamine.codeplex.com ---> +--> @@ -14,6 +14,12 @@ More information and documentation can be found on CodePlex: http://umbracoexami enabled="true" debug="false" supportUnpublished="true"/> + diff --git a/umbraco/presentation/install/default.aspx b/umbraco/presentation/install/default.aspx index b6fc96430d..0e195d932c 100644 --- a/umbraco/presentation/install/default.aspx +++ b/umbraco/presentation/install/default.aspx @@ -48,7 +48,7 @@ } function openDemoModal(id, name) { - openModal("http://packages.umbraco.org/viewPackageData.aspx?id=" + id, name, 550, 750) + UmbClientMgr.openModalWindow("http://packages.umbraco.org/viewPackageData.aspx?id=" + id, name, true, 750, 550) return false; } @@ -62,8 +62,9 @@ - - + + +
diff --git a/umbraco/presentation/install/default.aspx.designer.cs b/umbraco/presentation/install/default.aspx.designer.cs index 8be2aefc2a..c4422e301f 100644 --- a/umbraco/presentation/install/default.aspx.designer.cs +++ b/umbraco/presentation/install/default.aspx.designer.cs @@ -49,6 +49,15 @@ namespace umbraco.presentation.install { /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; + /// + /// JsInclude3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; + /// /// JsInclude1 control. /// diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj index dd6adbafa9..d22dc84458 100644 --- a/umbraco/presentation/umbraco.presentation.csproj +++ b/umbraco/presentation/umbraco.presentation.csproj @@ -140,7 +140,7 @@ 3.5 - + System.Web.Services @@ -425,6 +425,24 @@ + + ImageViewer.ascx + ASPXCodeBehind + + + ImageViewer.ascx + + + ImageViewerUpdater.asmx + Component + + + UploadMediaImage.ascx + ASPXCodeBehind + + + UploadMediaImage.ascx + ContentTypeControlNew.ascx ASPXCodeBehind @@ -457,17 +475,19 @@ passwordChanger.ascx - ProgressBar.ascx ASPXCodeBehind + ProgressBar.ascx ProgressBar.ascx - + + + TreeControl.ascx ASPXCodeBehind - + TreeControl.ascx @@ -1187,16 +1207,15 @@ + + Code + + MacroContainerService.asmx Component - - MediaPickerService.asmx - Component - - TreeClientService.asmx Component @@ -1442,24 +1461,35 @@ + + + - - - - + + + + + + + + + + + + @@ -1531,7 +1561,6 @@ - @@ -1933,10 +1962,6 @@ - - - - @@ -2686,7 +2711,6 @@ - @@ -2752,7 +2776,6 @@ umbraco.xsd - diff --git a/umbraco/presentation/umbraco/LiveEditing/Controls/LiveEditingManager.cs b/umbraco/presentation/umbraco/LiveEditing/Controls/LiveEditingManager.cs index 05764a1069..6a639bc15b 100644 --- a/umbraco/presentation/umbraco/LiveEditing/Controls/LiveEditingManager.cs +++ b/umbraco/presentation/umbraco/LiveEditing/Controls/LiveEditingManager.cs @@ -17,14 +17,14 @@ namespace umbraco.presentation.LiveEditing.Controls /// Provides public properties, events and methods for Live Editing controls. /// Add this control to a (master) page to enable Live Editing. ///
- - //[ClientDependency(2, ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient")] - //[ClientDependency(3, ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient")] - //[ClientDependency(3, ClientDependencyType.Javascript, "js/language.aspx", "UmbracoRoot")] - + [ClientDependency(0, ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient")] [ClientDependency(1, ClientDependencyType.Css, "LiveEditing/CSS/LiveEditing.css", "UmbracoRoot")] - [ClientDependency(1, ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient", InvokeJavascriptMethodOnLoad = "jQuery.noConflict")] - [ClientDependency(2, ClientDependencyType.Javascript, "js/UmbracoSpeechBubble.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "InitUmbracoSpeechBubble")] + [ClientDependency(1, ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient")] + [ClientDependency(2, ClientDependencyType.Javascript, "Application/JQuery/jquery.noconflict-invoke.js", "UmbracoClient")] + [ClientDependency(3, ClientDependencyType.Javascript, "js/UmbracoSpeechBubble.js", "UmbracoRoot")] + [ClientDependency(4, ClientDependencyType.Javascript, "js/UmbracoSpeechBubbleInit.js", "UmbracoRoot")] + [ClientDependency(10, ClientDependencyType.Javascript, "Application/UmbracoUtils.js", "UmbracoClient")] + [ClientDependency(20, ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient")] public class LiveEditingManager : Control { diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs index 56335a66a6..9cfa7ee286 100644 --- a/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs +++ b/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs @@ -1,7 +1,7 @@ using System; using System.Web.UI; using System.Web.UI.WebControls; -using AjaxControlToolkit; +//using AjaxControlToolkit; using umbraco.cms.businesslogic.web; using umbraco.presentation.LiveEditing.Controls; using Content = umbraco.cms.businesslogic.Content; @@ -18,7 +18,7 @@ namespace umbraco.presentation.LiveEditing.Modules.CreateModule protected ImageButton m_CreateButton = new ImageButton(); protected Panel m_CreateModal = new Panel(); - protected ModalPopupExtender m_CreateModalExtender = new ModalPopupExtender(); + //protected ModalPopupExtender m_CreateModalExtender = new ModalPopupExtender(); protected TextBox m_NameTextBox = new TextBox(); protected DropDownList m_AllowedDocTypesDropdown = new DropDownList(); @@ -75,14 +75,14 @@ namespace umbraco.presentation.LiveEditing.Modules.CreateModule m_CancelCreateButton.Text = "Cancel"; m_CancelCreateButton.CssClass = "modalbuton"; - Controls.Add(m_CreateModalExtender); - m_CreateModalExtender.ID = "ModalCreate"; - m_CreateModalExtender.TargetControlID = m_CreateButton.ID; - m_CreateModalExtender.PopupControlID = m_CreateModal.ID; - m_CreateModalExtender.BackgroundCssClass = "modalBackground"; - m_CreateModalExtender.OkControlID = m_ConfirmCreateButton.ID; - m_CreateModalExtender.CancelControlID = m_CancelCreateButton.ID; - m_CreateModalExtender.OnOkScript = string.Format("CreateModuleOk()"); + //Controls.Add(m_CreateModalExtender); + //m_CreateModalExtender.ID = "ModalCreate"; + //m_CreateModalExtender.TargetControlID = m_CreateButton.ID; + //m_CreateModalExtender.PopupControlID = m_CreateModal.ID; + //m_CreateModalExtender.BackgroundCssClass = "modalBackground"; + //m_CreateModalExtender.OkControlID = m_ConfirmCreateButton.ID; + //m_CreateModalExtender.CancelControlID = m_CancelCreateButton.ID; + //m_CreateModalExtender.OnOkScript = string.Format("CreateModuleOk()"); m_CreateModal.Controls.Add(new LiteralControl("
")); diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemEditor.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemEditor.cs index 9f0d2ab965..3ab539ed5b 100644 --- a/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemEditor.cs +++ b/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemEditor.cs @@ -21,8 +21,9 @@ namespace umbraco.presentation.LiveEditing.Modules.ItemEditing /// Control that wraps the editor control to edit a field in Live Editing mode. /// [ClientDependency(1, ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient")] - [ClientDependency(21, ClientDependencyType.Javascript, "LiveEditing/Modules/ItemEditing/ItemEditing.js", "UmbracoRoot", InvokeJavascriptMethodOnLoad = "initializeGlobalItemEditing")] - [ClientDependency(21, ClientDependencyType.Javascript, "tinymce3/tiny_mce_src.js", "UmbracoClient")] //For TinyMCE to work in LiveEdit, we need to ensure that this script is run before it loads... + [ClientDependency(21, ClientDependencyType.Javascript, "LiveEditing/Modules/ItemEditing/ItemEditing.js", "UmbracoRoot")] + [ClientDependency(22, ClientDependencyType.Javascript, "LiveEditing/Modules/ItemEditing/ItemEditingInvoke.js", "UmbracoRoot")] + [ClientDependency(23, ClientDependencyType.Javascript, "tinymce3/tiny_mce_src.js", "UmbracoClient")] //For TinyMCE to work in LiveEdit, we need to ensure that this script is run before it loads... public class ItemEditor : UpdatePanel { #region Protected Constants diff --git a/umbraco/presentation/umbraco/Trees/BaseContentTree.cs b/umbraco/presentation/umbraco/Trees/BaseContentTree.cs index 43b696eff0..7c31331c32 100644 --- a/umbraco/presentation/umbraco/Trees/BaseContentTree.cs +++ b/umbraco/presentation/umbraco/Trees/BaseContentTree.cs @@ -58,7 +58,7 @@ namespace umbraco.cms.presentation.Trees if (!String.IsNullOrEmpty(this.FunctionToCall)) { Javascript.Append("function openContent(id) {\n"); - Javascript.Append(this.FunctionToCall + "(id)\n"); + Javascript.Append(this.FunctionToCall + "(id);\n"); Javascript.Append("}\n"); } else if (!this.IsDialog) @@ -70,20 +70,20 @@ function openContent(id) { } "); } - else - { - //TODO: SD: Find out how what this does...? - Javascript.Append( - @" -function openContent(id) { - if (parent.opener) - parent.opener.dialogHandler(id); - else - parent.dialogHandler(id); -} - -"); - } + //TODO: SD: UPDATE ALL TREE CODE SO THAT THE FUNCTIONTOCALL IS EXPLICITLY SET WHEN DIALOGHANDLER IS REQUIRED! + // else +// { +// Javascript.Append( +// @" +//function openContent(id) { +// if (parent.opener) +// parent.opener.dialogHandler(id); +// else +// parent.dialogHandler(id); +//} +// +//"); +// } } @@ -214,14 +214,14 @@ function openContent(id) { } protected void SetActionAttribute(ref XmlTreeNode treeElement, Document dd) { - //TODO: Work out why the DialogMode isn't working + // Check for dialog behaviour - if (this.DialogMode == TreeDialogModes.fulllink && !this.IsDialog) + if (this.DialogMode == TreeDialogModes.fulllink ) { string nodeLink = CreateNodeLink(dd); treeElement.Action = String.Format("javascript:openContent('{0}');", nodeLink); } - else if (this.IsDialog) //(this.DialogMode == TreeDialogModes.locallink) + else if (this.DialogMode == TreeDialogModes.locallink) { string nodeLink = string.Format("{{localLink:{0}}}", dd.Id); // try to make a niceurl too diff --git a/umbraco/presentation/umbraco/Trees/BaseMediaTree.cs b/umbraco/presentation/umbraco/Trees/BaseMediaTree.cs index e6f8833384..fac401638d 100644 --- a/umbraco/presentation/umbraco/Trees/BaseMediaTree.cs +++ b/umbraco/presentation/umbraco/Trees/BaseMediaTree.cs @@ -57,7 +57,7 @@ namespace umbraco.cms.presentation.Trees if (!string.IsNullOrEmpty(this.FunctionToCall)) { Javascript.Append("function openMedia(id) {\n"); - Javascript.Append(this.FunctionToCall + "(id)\n"); + Javascript.Append(this.FunctionToCall + "(id);\n"); Javascript.Append("}\n"); } else if (!this.IsDialog) @@ -69,19 +69,19 @@ function openMedia(id) { } "); } - else - { - //TODO: SD: Find out how what this does...? - Javascript.Append( - @" -function openMedia(id) { - if (parent.opener) - parent.opener.dialogHandler(id); - else - parent.dialogHandler(id); -} -"); - } + //TODO: SD: UPDATE ALL TREE CODE SO THAT THE FUNCTIONTOCALL IS EXPLICITLY SET WHEN DIALOGHANDLER IS REQUIRED! + // else +// { +// Javascript.Append( +// @" +//function openMedia(id) { +// if (parent.opener) +// parent.opener.dialogHandler(id); +// else +// parent.dialogHandler(id); +//} +//"); +// } } public override void Render(ref XmlTree tree) diff --git a/umbraco/presentation/umbraco/Trees/BaseTree.cs b/umbraco/presentation/umbraco/Trees/BaseTree.cs index 372b4734e5..a143bd69d2 100644 --- a/umbraco/presentation/umbraco/Trees/BaseTree.cs +++ b/umbraco/presentation/umbraco/Trees/BaseTree.cs @@ -291,6 +291,7 @@ namespace umbraco.cms.presentation.Trees this.IsDialog = treeParams.IsDialog; this.ShowContextMenu = treeParams.ShowContextMenu; this.id = treeParams.StartNodeID; + if (!treeParams.ShowContextMenu) this.RootNode.Menu = null; } diff --git a/umbraco/presentation/umbraco/Trees/ContentRecycleBin.cs b/umbraco/presentation/umbraco/Trees/ContentRecycleBin.cs index ae7dd12947..a85274d803 100644 --- a/umbraco/presentation/umbraco/Trees/ContentRecycleBin.cs +++ b/umbraco/presentation/umbraco/Trees/ContentRecycleBin.cs @@ -97,6 +97,12 @@ namespace umbraco.cms.presentation.Trees } } + /// + /// Override the render js so no duplicate js is rendered. + /// + /// + public override void RenderJS(ref StringBuilder Javascript) { } + ///// ///// Returns the tree service url to render the tree. Ensures that IsRecycleBin is flagged. ///// diff --git a/umbraco/presentation/umbraco/Trees/ITreeService.cs b/umbraco/presentation/umbraco/Trees/ITreeService.cs new file mode 100644 index 0000000000..afc96b25dd --- /dev/null +++ b/umbraco/presentation/umbraco/Trees/ITreeService.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Text; +using System.Web; +using System.Xml; +using System.Configuration; +using umbraco.BasePages; +using umbraco.BusinessLogic; +using umbraco.cms.businesslogic; +using umbraco.cms.businesslogic.cache; +using umbraco.cms.businesslogic.contentitem; +using umbraco.cms.businesslogic.datatype; +using umbraco.cms.businesslogic.language; +using umbraco.cms.businesslogic.media; +using umbraco.cms.businesslogic.member; +using umbraco.cms.businesslogic.property; +using umbraco.cms.businesslogic.web; +using umbraco.interfaces; +using umbraco.DataLayer; +using System.Collections.Specialized; + +namespace umbraco.cms.presentation.Trees +{ + /// + /// All Trees rely on the properties of an ITreeService interface. This has been created to avoid having trees + /// dependant on the HttpContext + /// + public interface ITreeService + { + /// + /// The NodeKey is a string representation of the nodeID. Generally this is used for tree's whos node's unique key value is a string in instead + /// of an integer such as folder names. + /// + string NodeKey { get; } + int StartNodeID { get; } + bool ShowContextMenu { get; } + bool IsDialog { get; } + TreeDialogModes DialogMode { get; } + string FunctionToCall { get; } + } +} diff --git a/umbraco/presentation/umbraco/Trees/MediaRecycleBin.cs b/umbraco/presentation/umbraco/Trees/MediaRecycleBin.cs index 9fde4231f4..e0be6c9313 100644 --- a/umbraco/presentation/umbraco/Trees/MediaRecycleBin.cs +++ b/umbraco/presentation/umbraco/Trees/MediaRecycleBin.cs @@ -81,6 +81,12 @@ namespace umbraco.cms.presentation.Trees } } + /// + /// Override the render js so no duplicate js is rendered. + /// + /// + public override void RenderJS(ref StringBuilder Javascript) { } + protected override void CreateRootNode(ref XmlTreeNode rootNode) { rootNode.Icon = "bin_empty.png"; diff --git a/umbraco/presentation/umbraco/Trees/TreeDefinitionCollection.cs b/umbraco/presentation/umbraco/Trees/TreeDefinitionCollection.cs index d399d8d2c8..093608bf36 100644 --- a/umbraco/presentation/umbraco/Trees/TreeDefinitionCollection.cs +++ b/umbraco/presentation/umbraco/Trees/TreeDefinitionCollection.cs @@ -141,7 +141,7 @@ namespace umbraco.cms.presentation.Trees if (this.Count > 0) return; - List foundITrees = TypeFinder.FindClassesOfType(true); + List foundITrees = TypeFinder.FindClassesOfType(); ApplicationTree[] objTrees = ApplicationTree.getAll(); List appTrees = new List(); diff --git a/umbraco/presentation/umbraco/Trees/TreeRequestParams.cs b/umbraco/presentation/umbraco/Trees/TreeRequestParams.cs new file mode 100644 index 0000000000..8e76651b57 --- /dev/null +++ b/umbraco/presentation/umbraco/Trees/TreeRequestParams.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Text; +using System.Web; +using System.Xml; +using System.Configuration; +using umbraco.BasePages; +using umbraco.BusinessLogic; +using umbraco.cms.businesslogic; +using umbraco.cms.businesslogic.cache; +using umbraco.cms.businesslogic.contentitem; +using umbraco.cms.businesslogic.datatype; +using umbraco.cms.businesslogic.language; +using umbraco.cms.businesslogic.media; +using umbraco.cms.businesslogic.member; +using umbraco.cms.businesslogic.property; +using umbraco.cms.businesslogic.web; +using umbraco.interfaces; +using umbraco.DataLayer; +using System.Collections.Specialized; + +namespace umbraco.cms.presentation.Trees +{ + /// + /// An ITreeService class that returns the values found in the Query String or any dictionary + /// + internal class TreeRequestParams : ITreeService + { + private TreeRequestParams() { } + + private Dictionary m_params; + + public static TreeRequestParams FromQueryStrings() + { + Dictionary p = new Dictionary(); + foreach (string key in HttpContext.Current.Request.QueryString.Keys) + { + p.Add(key, HttpContext.Current.Request.QueryString[key]); + //p.Add(item.Key.ToString(), item.Value.ToString()); + } + return FromDictionary(p); + } + + public static TreeRequestParams FromDictionary(Dictionary items) + { + TreeRequestParams treeParams = new TreeRequestParams(); + treeParams.m_params = items; + return treeParams; + } + + /// + /// Converts the tree parameters to a tree service object + /// + /// + public TreeService CreateTreeService() + { + return new TreeService() + { + ShowContextMenu = this.ShowContextMenu, + IsDialog = this.IsDialog, + DialogMode = this.DialogMode, + App = this.Application, + TreeType = this.TreeType, + NodeKey = this.NodeKey, + StartNodeID = this.StartNodeID, + FunctionToCall = this.FunctionToCall + }; + } + + public string NodeKey + { + get + { + return (m_params.ContainsKey("nodeKey") ? m_params["nodeKey"] : ""); + } + } + public string Application + { + get + { + return (m_params.ContainsKey("app") ? m_params["app"] : m_params.ContainsKey("appAlias") ? m_params["appAlias"] : ""); + } + } + public int StartNodeID + { + get + { + string val = (m_params.ContainsKey("id") ? m_params["id"] : ""); + int sNodeID; + if (int.TryParse(HttpContext.Current.Request.QueryString["id"], out sNodeID)) + return sNodeID; + return -1; + } + } + public string FunctionToCall + { + get + { + return (m_params.ContainsKey("functionToCall") ? m_params["functionToCall"] : ""); + } + } + public bool IsDialog + { + get + { + bool value; + if (m_params.ContainsKey("isDialog")) + if (bool.TryParse(m_params["isDialog"], out value)) + return value; + return false; + } + } + public TreeDialogModes DialogMode + { + get + { + if (m_params.ContainsKey("dialogMode") && IsDialog) + { + try + { + return (TreeDialogModes)Enum.Parse(typeof(TreeDialogModes), m_params["dialogMode"]); + } + catch + { + return TreeDialogModes.none; + } + } + return TreeDialogModes.none; + } + } + public bool ShowContextMenu + { + get + { + bool value; + if (m_params.ContainsKey("contextMenu")) + if (bool.TryParse(m_params["contextMenu"], out value)) + return value; + return true; + } + } + public string TreeType + { + get + { + return (m_params.ContainsKey("treeType") ? m_params["treeType"] : ""); + } + } + } +} diff --git a/umbraco/presentation/umbraco/Trees/TreeService.cs b/umbraco/presentation/umbraco/Trees/TreeService.cs index 2fed4d50a6..458798dd38 100644 --- a/umbraco/presentation/umbraco/Trees/TreeService.cs +++ b/umbraco/presentation/umbraco/Trees/TreeService.cs @@ -22,39 +22,22 @@ using umbraco.interfaces; using umbraco.DataLayer; using System.Collections.Specialized; using umbraco.IO; +using umbraco.uicontrols; namespace umbraco.cms.presentation.Trees { - /// - /// All Trees rely on the properties of an ITreeService interface. This has been created to avoid having trees - /// dependant on the HttpContext - /// - public interface ITreeService - { - /// - /// The NodeKey is a string representation of the nodeID. Generally this is used for tree's whos node's unique key value is a string in instead - /// of an integer such as folder names. - /// - string NodeKey { get; } - int StartNodeID { get; } - bool ShowContextMenu { get; } - bool IsDialog { get; } - TreeDialogModes DialogMode { get; } - string FunctionToCall { get; } - } - /// /// A utility class to aid in creating the URL for returning XML for a tree structure and /// for reading the parameters from the URL when a request is made. /// - public class TreeService : ITreeService + public class TreeService : TreeUrlGenerator, ITreeService { /// /// Default empty constructor /// - public TreeService() { } + public TreeService() : base() { } /// /// Constructor to assign all TreeService properties except nodeKey in one call @@ -68,12 +51,12 @@ namespace umbraco.cms.presentation.Trees public TreeService(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app) { - m_startNodeID = startNodeID; - m_treeType = treeType; - m_showContextMenu = showContextMenu; - m_isDialog = isDialog; + StartNodeID = startNodeID ?? -1; + TreeType = treeType; + ShowContextMenu = showContextMenu ?? true; + IsDialog = isDialog ?? false; m_dialogMode = dialogMode; - m_app = app; + App = app; } /// @@ -89,78 +72,32 @@ namespace umbraco.cms.presentation.Trees public TreeService(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app, string nodeKey) { - m_startNodeID = startNodeID; - m_treeType = treeType; - m_showContextMenu = showContextMenu; - m_isDialog = isDialog; + StartNodeID = startNodeID ?? -1; + TreeType = treeType; + ShowContextMenu = showContextMenu ?? true; + IsDialog = isDialog ?? false; m_dialogMode = dialogMode; - m_app = app; - m_nodeKey = nodeKey; + App = app; + NodeKey = nodeKey; } public TreeService(int? startNodeID, string treeType, bool? showContextMenu, bool? isDialog, TreeDialogModes dialogMode, string app, string nodeKey, string functionToCall) { - m_startNodeID = startNodeID; - m_treeType = treeType; - m_showContextMenu = showContextMenu; - m_isDialog = isDialog; + StartNodeID = startNodeID ?? -1; + TreeType = treeType; + ShowContextMenu = showContextMenu ?? true; + IsDialog = isDialog ?? false; m_dialogMode = dialogMode; - m_app = app; - m_nodeKey = nodeKey; - m_functionToCall = functionToCall; + App = app; + NodeKey = nodeKey; + FunctionToCall = functionToCall; } - public const string TREE_URL = "tree.aspx"; - public const string INIT_URL = "treeinit.aspx"; - public const string PICKER_URL = "treepicker.aspx"; - - private int? m_startNodeID; - private string m_treeType; - private bool? m_showContextMenu; - private bool? m_isDialog; - private TreeDialogModes m_dialogMode; - private string m_app; - private string m_nodeKey; - private string m_functionToCall; + private TreeDialogModes m_dialogMode; #region Public Properties - public string FunctionToCall - { - get { return m_functionToCall; } - set { m_functionToCall = value; } - } - - public string NodeKey - { - get { return m_nodeKey; } - set { m_nodeKey = value; } - } - - public int StartNodeID - { - get { return m_startNodeID ?? -1; } - set { m_startNodeID = value; } - } - - public string TreeType - { - get { return m_treeType; } - set { m_treeType = value; } - } - - public bool ShowContextMenu - { - get { return m_showContextMenu ?? true; } - set { m_showContextMenu = value; } - } - - public bool IsDialog - { - get { return m_isDialog ?? false; } - set { m_isDialog = value; } - } public TreeDialogModes DialogMode { @@ -168,22 +105,8 @@ namespace umbraco.cms.presentation.Trees set { m_dialogMode = value; } } - public string App - { - get { return m_app; } - set { m_app = value; } - } #endregion - /// - /// Returns the url for servicing the xml tree request based on the parameters specified on this class. - /// - /// Tree service url as a string - public string GetServiceUrl() - { - return SystemDirectories.Umbraco + "/" + GetUrl(TREE_URL); - } - /// /// Static method to return the tree service url with the specified parameters /// @@ -203,15 +126,6 @@ namespace umbraco.cms.presentation.Trees return treeSvc.GetServiceUrl(); } - /// - /// Returns the url for initializing the tree based on the parameters specified on this class - /// - /// - public string GetInitUrl() - { - return IOHelper.ResolveUrl( SystemDirectories.Umbraco + "/" + GetUrl(INIT_URL) ); - } - /// /// static method to return the tree init url with the specified parameters /// @@ -231,161 +145,12 @@ namespace umbraco.cms.presentation.Trees return treeSvc.GetInitUrl(); } - /// - /// Returns the url for the tree picker (used on modal windows) based on the parameters specified on this class - /// - /// - /// - public static string GetPickerUrl(bool useSubModal, string app, string treeType) - { - TreeService treeSvc = new TreeService(); - treeSvc.App = app; - treeSvc.TreeType = treeType; - return treeSvc.GetPickerUrl(useSubModal); - } + protected override string GetUrl(string pageUrl) + { + StringBuilder sb = new StringBuilder(base.GetUrl(pageUrl)); + if (this.DialogMode != TreeDialogModes.none) sb.Append(string.Format("&dialogMode={0}", this.DialogMode.ToString())); + return sb.ToString(); + } - /// - /// Returns the url for the tree picker (used on modal windows) based on the parameters specified on this class - /// - /// - /// - public string GetPickerUrl(bool useSubModal) - { - string url = IOHelper.ResolveUrl( SystemDirectories.Umbraco + "/dialogs/" + GetUrl(PICKER_URL) ); - return url + (useSubModal ? "&useSubModal=true" : ""); - } - - /// - /// Generates the URL parameters for the tree service. - /// - /// the base url (i.e. tree.aspx) - /// - private string GetUrl(string pageUrl) - { - StringBuilder sb = new StringBuilder(); - - sb.Append(pageUrl); - //insert random - sb.Append(string.Format("?rnd={0}", Guid.NewGuid())); - - sb.Append(string.Format("&id={0}", this.StartNodeID.ToString())); - if (!string.IsNullOrEmpty(this.TreeType)) sb.Append(string.Format("&treeType={0}", this.TreeType)); - if (!string.IsNullOrEmpty(this.NodeKey)) sb.Append(string.Format("&nodeKey={0}", this.NodeKey)); - sb.Append(string.Format("&contextMenu={0}", this.ShowContextMenu.ToString().ToLower())); - sb.Append(string.Format("&isDialog={0}", this.IsDialog.ToString().ToLower())); - if (this.DialogMode != TreeDialogModes.none) sb.Append(string.Format("&dialogMode={0}", this.DialogMode.ToString())); - if (!string.IsNullOrEmpty(this.App)) sb.Append(string.Format("&app={0}", this.App)); - - return sb.ToString(); - } - - } - - /// - /// An ITreeService class that returns the values found in the Query String or any dictionary - /// - internal class TreeRequestParams : ITreeService - { - private TreeRequestParams() { } - - private Dictionary m_params; - - public static TreeRequestParams FromQueryStrings() - { - Dictionary p = new Dictionary(); - foreach (string key in HttpContext.Current.Request.QueryString.Keys) - { - p.Add(key, HttpContext.Current.Request.QueryString[key]); - //p.Add(item.Key.ToString(), item.Value.ToString()); - } - return FromDictionary(p); - } - - public static TreeRequestParams FromDictionary(Dictionary items) - { - TreeRequestParams treeParams = new TreeRequestParams(); - treeParams.m_params = items; - return treeParams; - } - - public string NodeKey - { - get - { - return (m_params.ContainsKey("nodeKey") ? m_params["nodeKey"] : ""); - } - } - public string Application - { - get - { - return (m_params.ContainsKey("app") ? m_params["app"] : m_params.ContainsKey("appAlias") ? m_params["appAlias"] : ""); - } - } - public int StartNodeID - { - get - { - string val = (m_params.ContainsKey("id") ? m_params["id"] : ""); - int sNodeID; - if (int.TryParse(HttpContext.Current.Request.QueryString["id"], out sNodeID)) - return sNodeID; - return -1; - } - } - public string FunctionToCall - { - get - { - return (m_params.ContainsKey("functionToCall") ? m_params["functionToCall"] : ""); - } - } - public bool IsDialog - { - get - { - bool value; - if (m_params.ContainsKey("isDialog")) - if (bool.TryParse(m_params["isDialog"], out value)) - return value; - return false; - } - } - public TreeDialogModes DialogMode - { - get - { - if (m_params.ContainsKey("dialogMode") && IsDialog) - { - try - { - return (TreeDialogModes)Enum.Parse(typeof(TreeDialogModes), m_params["dialogMode"]); - } - catch - { - return TreeDialogModes.none; - } - } - return TreeDialogModes.none; - } - } - public bool ShowContextMenu - { - get - { - bool value; - if (m_params.ContainsKey("contextMenu")) - if (bool.TryParse(m_params["contextMenu"], out value)) - return value; - return true; - } - } - public string TreeType - { - get - { - return (m_params.ContainsKey("treeType") ? m_params["treeType"] : ""); - } - } } } diff --git a/umbraco/presentation/umbraco/Trees/loadMedia.cs b/umbraco/presentation/umbraco/Trees/loadMedia.cs index b070308066..b85b63fae0 100644 --- a/umbraco/presentation/umbraco/Trees/loadMedia.cs +++ b/umbraco/presentation/umbraco/Trees/loadMedia.cs @@ -54,7 +54,7 @@ namespace umbraco protected override void CreateRootNode(ref XmlTreeNode rootNode) { - //TODO: SD: Find out what openMedia does!? + if (this.IsDialog) rootNode.Action = "javascript:openMedia(-1);"; else diff --git a/umbraco/presentation/umbraco/cache/factory.cs b/umbraco/presentation/umbraco/cache/factory.cs index a29a035a82..9136e446b9 100644 --- a/umbraco/presentation/umbraco/cache/factory.cs +++ b/umbraco/presentation/umbraco/cache/factory.cs @@ -34,7 +34,7 @@ namespace umbraco.presentation.cache private static void Initialize() { - List types = TypeFinder.FindClassesOfType(true); + List types = TypeFinder.FindClassesOfType(); foreach (Type t in types) { ICacheRefresher typeInstance = Activator.CreateInstance(t) as ICacheRefresher; diff --git a/umbraco/presentation/umbraco/controls/ContentPicker.cs b/umbraco/presentation/umbraco/controls/ContentPicker.cs index 95cffaa2d9..6edbe3f3ae 100644 --- a/umbraco/presentation/umbraco/controls/ContentPicker.cs +++ b/umbraco/presentation/umbraco/controls/ContentPicker.cs @@ -8,135 +8,70 @@ using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using umbraco.cms.presentation.Trees; -using ClientDependency.Core; using umbraco.presentation; -using ClientDependency.Core.Controls; +using umbraco.uicontrols.TreePicker; namespace umbraco.controls { - [ClientDependency(ClientDependencyType.Javascript, "js/xmlextras.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Javascript, "js/xmlRequest.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Javascript, "webservices/ajax.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")] - [ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")] - public class ContentPicker : System.Web.UI.WebControls.WebControl + + public class ContentPicker : BaseTreePicker { - public System.Web.UI.Control Editor { get { return this; } } + public ContentPicker() + { + AppAlias = "content"; + TreeAlias = "content"; + } - private string _text = ""; + [Obsolete("Use Value property instead, this simply wraps it.")] public string Text { get { - if (Page.IsPostBack && !String.IsNullOrEmpty(helper.Request(this.ClientID))) - { - _text = helper.Request(this.ClientID); - } - return _text; + return this.Value; } - set { _text = value; } + set + { + this.Value = value; + } } - private string _appAlias = "content"; - public string AppAlias - { - get { return _appAlias; } - set { _appAlias = value; } - } + public string AppAlias { get; set; } + public string TreeAlias { get; set; } + public override string TreePickerUrl + { + get + { + return TreeService.GetPickerUrl(AppAlias, TreeAlias); + } + } - private string _treeAlias = "content"; - public string TreeAlias - { - get { return _treeAlias; } - set { _treeAlias = value; } - } + public override string ModalWindowTitle + { + get + { + return ui.GetText("general", "choose") + " " + ui.GetText("sections", TreeAlias.ToLower()); + } + } - private bool _showDelete = true; - public bool ShowDelete - { - get { return _showDelete; } - set { _showDelete = value; } - } - - private int m_modalWidth = 300; - public int ModalWidth - { - get { return m_modalWidth; } - set { m_modalWidth = value; } - } - - private int m_modalHeight = 400; - public int ModalHeight - { - get { return m_modalHeight; } - set { m_modalHeight = value; } - } - - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - // We need to make sure we have a reference to the legacy ajax calls in the scriptmanager - if (!UmbracoContext.Current.LiveEditingContext.Enabled) - presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page); - else - ClientDependencyLoader.Instance.RegisterDependency("webservices/legacyAjaxCalls.asmx/js", "UmbracoRoot", ClientDependencyType.Javascript); - } - - - protected override void Render(System.Web.UI.HtmlTextWriter writer) - { - - string tempTitle = ""; - string deleteLink = "   " + ui.Text("delete") + "   "; - try - { - if (this.Text != "" && this.Text != "-1") - { - tempTitle = new cms.businesslogic.CMSNode(int.Parse(this.Text)).Text; - } - else - { - tempTitle = (!string.IsNullOrEmpty(_treeAlias) ? ui.Text(_treeAlias) : ui.Text(_appAlias)); - - } - } - catch { } - - writer.WriteLine(""); - - // Clear remove link if text if empty - if (this.Text == "" || !_showDelete) - deleteLink = ""; - writer.WriteLine("" + tempTitle + "" + deleteLink + " " + ui.Text("choose") + "...   "); - base.Render(writer); - } + protected override string GetItemTitle() + { + string tempTitle = ""; + try + { + if (this.Text != "" && this.Text != "-1") + { + tempTitle = new cms.businesslogic.CMSNode(int.Parse(this.Text)).Text; + } + else + { + tempTitle = (!string.IsNullOrEmpty(TreeAlias) ? ui.Text(TreeAlias) : ui.Text(AppAlias)); + } + } + catch { } + return tempTitle; + } } } diff --git a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs index 2d0ac21a7f..a2dc0fed6e 100644 --- a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs +++ b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs @@ -15,7 +15,7 @@ namespace umbraco.controls [ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient")] [ClientDependency(ClientDependencyType.Css, "Tree/treeIcons.css", "UmbracoClient")] - [ClientDependency(ClientDependencyType.Css, "Tree/Themes/umbraco/styles.css", "UmbracoClient")] + [ClientDependency(ClientDependencyType.Css, "Tree/Themes/umbraco/style.css", "UmbracoClient")] public partial class ContentTypeControlNew : System.Web.UI.UserControl { public uicontrols.TabPage InfoTabPage; diff --git a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx index a3042a6876..79b4077607 100644 --- a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx +++ b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx @@ -13,10 +13,6 @@ - - diff --git a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs index 9e2ec192d3..e9cba9dd4a 100644 --- a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs +++ b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.cs @@ -168,7 +168,7 @@ namespace umbraco.controls.GenericProperties DeleteButton2.Visible = false; } validationLink.NavigateUrl = "#"; - validationLink.Attributes["onclick"] = ClientTools.Scripts.OpenModalWindow("dialogs/regexWs.aspx?target=" + tbValidation.ClientID , "Search for regular expression", 500, 600) + ";return false;"; + validationLink.Attributes["onclick"] = ClientTools.Scripts.OpenModalWindow("dialogs/regexWs.aspx?target=" + tbValidation.ClientID, "Search for regular expression", 600, 500) + ";return false;"; // Data type definitions if (_dataTypeDefinitions != null) diff --git a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.designer.cs b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.designer.cs index db7127ceb9..b953baaa55 100644 --- a/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.designer.cs +++ b/umbraco/presentation/umbraco/controls/GenericProperties/GenericProperty.ascx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx new file mode 100644 index 0000000000..0ceb3cd09a --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx @@ -0,0 +1,48 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ImageViewer.ascx.cs" Inherits="umbraco.controls.Images.ImageViewer" %> +<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> + +
+ + + + + <%#AltText%> + + + + <%#AltText%> + + +
');"> +
+
+
+ + + <%--Register the javascript callback method if any.--%> + + +
+<%--Ensure that the client API is registered for the image.--%> + + + diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.cs b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.cs new file mode 100644 index 0000000000..0d54d11289 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using umbraco.cms.businesslogic.media; + +namespace umbraco.controls.Images +{ + public partial class ImageViewer : System.Web.UI.UserControl + { + + public ImageViewer() + { + MediaItemPath = "#"; + MediaItemThumbnailPath = umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/images/blank.png"; + AltText = "No Image"; + ImageFound = false; + ViewerStyle = Style.Basic; + LinkTarget = "_blank"; + } + + + /// + /// A JS method to invoke when the image is loaded. The method should accept the media ID. + /// + public string ClientCallbackMethod { get; set; } + + public int MediaId { get; set; } + + /// + /// The style to render the image viewer in + /// + public enum Style + { + Basic = 0, + ImageLink = 1, + ThumbnailPreview = 2 + } + + public Style ViewerStyle { get; set; } + + public string LinkTarget { get; set; } + + public string MediaItemPath { get; private set; } + public string MediaItemThumbnailPath { get; private set; } + public string AltText { get; private set; } + public int FileWidth { get { return m_FileWidth; } } + public int FileHeight { get { return m_FileHeight; } } + + protected bool ImageFound { get; private set; } + + + private int m_FileWidth = 0; + private int m_FileHeight = 0; + private bool m_IsBound = false; + + /// + /// automatically bind if it's not explicitly called. + /// + /// + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + if (!m_IsBound) + { + DataBind(); + } + } + + public override void DataBind() + { + LookupData(); + base.DataBind(); + this.m_IsBound = true; + } + + private void LookupData() + { + if (MediaId > 0) + { + Media m = new Media(MediaId); + + // TODO: Remove "Magic strings" from code. + var pFile = m.getProperty("fileName"); + if (pFile == null) pFile = m.getProperty("umbracoFile"); + if (pFile == null) pFile = m.getProperty("file"); + if (pFile == null) + { + //the media requested does not correspond with the standard umbraco properties + return; + } + + MediaItemPath = pFile.Value != null && !string.IsNullOrEmpty(pFile.Value.ToString()) + ? umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/.." + pFile.Value.ToString() + : "#"; + AltText = MediaItemPath != "#" ? m.Text : ui.GetText("no") + " " + ui.GetText("media"); + + var pWidth = m.getProperty("umbracoWidth"); + var pHeight = m.getProperty("umbracoHeight"); + + if (pWidth != null && pWidth.Value != null && pHeight != null && pHeight.Value != null) + { + int.TryParse(pHeight.Value.ToString(), out m_FileWidth); + int.TryParse(pHeight.Value.ToString(), out m_FileHeight); + } + + string ext = MediaItemPath.Substring(MediaItemPath.LastIndexOf(".") + 1, MediaItemPath.Length - MediaItemPath.LastIndexOf(".") - 1); + MediaItemThumbnailPath = MediaItemPath.Replace("." + ext, "_thumb.jpg"); + + ImageFound = true; + } + } + } +} \ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.designer.cs b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.designer.cs new file mode 100644 index 0000000000..c5e0edd1b1 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewer.ascx.designer.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace umbraco.controls.Images { + + + public partial class ImageViewer { + + /// + /// JsInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + } +} diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewer.js b/umbraco/presentation/umbraco/controls/Images/ImageViewer.js new file mode 100644 index 0000000000..2924c4f81e --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewer.js @@ -0,0 +1,133 @@ +/// +/// + +Umbraco.Sys.registerNamespace("Umbraco.Controls"); + +(function($) { + //jQuery plugin for Umbraco image viewer control + $.fn.UmbracoImageViewer = function(opts) { + //all options must be specified + var conf = $.extend({ + style: false, + linkTarget: "_blank", + umbPath: "" + }, opts); + return this.each(function() { + new Umbraco.Controls.ImageViewer().init($(this), conf); + }); + } + $.fn.UmbracoImageViewerAPI = function() { + /// exposes the Umbraco Image Viewer api for the selected object + //if there's more than item in the selector, throw exception + if ($(this).length != 1) { + throw "UmbracoImageViewerAPI selector requires that there be exactly one control selected"; + }; + return Umbraco.Controls.ImageViewer.inst[$(this).attr("id")] || null; + }; + Umbraco.Controls.ImageViewer = function() { + return { + _cntr: ++Umbraco.Controls.ImageViewer.cntr, + _containerId: null, + _context: null, + _serviceUrl: "", + _umbPath: "", + _style: false, + _linkTarget: "", + + init: function(jItem, opts) { + //this is stored so that we search the current document/iframe for this object + //when calling _getContainer. Before this was not required but for some reason inside the + //TinyMCE popup, when doing an ajax call, the context is lost to the jquery item! + this._context = jItem.get(0).ownerDocument; + + //store a reference to this api by the id and the counter + Umbraco.Controls.ImageViewer.inst[this._cntr] = this; + if (!jItem.attr("id")) jItem.attr("id", "UmbImageViewer_" + this._cntr); + Umbraco.Controls.ImageViewer.inst[jItem.attr("id")] = Umbraco.Controls.ImageViewer.inst[this._cntr]; + + this._containerId = jItem.attr("id"); + + this._umbPath = opts.umbPath; + this._serviceUrl = this._umbPath + "/controls/Images/ImageViewerUpdater.asmx"; + this._style = opts.style; + this._linkTarget = opts.linkTarget; + + }, + + updateImage: function(mediaId, callback) { + /// Updates the image to show the mediaId parameter using AJAX + + this._showThrobber(); + + var _this = this; + $.ajax({ + type: "POST", + url: _this._serviceUrl + "/UpdateImage", + data: '{ "mediaId": ' + parseInt(mediaId) + ', "style": "' + _this._style + '", "linkTarget": "' + _this._linkTarget + '"}', + contentType: "application/json; charset=utf-8", + dataType: "json", + success: function(msg) { + var rHtml = $("
").append(msg.d.html); //get the full html response wrapped in temp div + _this._updateImageFromAjax(rHtml); + if (typeof callback == "function") { + //build the parameters to pass back to the callback method + var params = { + hasImage: _this._getContainer().find("img.noimage").length == 0, + mediaId: msg.d.mediaId, + width: msg.d.width, + height: msg.d.height, + url: msg.d.url, + alt: msg.d.alt + }; + //call the callback method + callback.call(_this, params); + } + } + }); + }, + + showImage: function(path) { + /// This will force the image to show the path passed in + if (this._style != "ThumbnailPreview") { + this._getContainer().find("img").attr("src", path); + } + else { + c = this._getContainer().find(".bgImage"); + c.css("background-image", "url('" + path + "')"); + } + }, + + _getContainer: function() { + return $("#" + this._containerId, this._context); + }, + + _updateImageFromAjax: function(rHtml) { + this._getContainer().html(rHtml.find(".imageViewer").html()); //replace the html with the inner html of the image viewer response + }, + + _showThrobber: function() { + var c = null; + if (this._style != "ThumbnailPreview") { + c = this._getContainer().find("img"); + c.attr("src", this._umbPath + "/images/throbber.gif"); + c.css("margin-top", ((c.height() - 15) / 2) + "px"); + c.css("margin-left", ((c.width() - 15) / 2) + "px"); + } + else { + c = this._getContainer().find(".bgImage"); + c.css("background-image", ""); + c.html(""); + var img = c.find("img"); + img.attr("src", this._umbPath + "/images/throbber.gif"); + img.css("margin-top", "45px"); + img.css("margin-left", "45px"); + } + } + } + } + + // instance manager + Umbraco.Controls.ImageViewer.cntr = 0; + Umbraco.Controls.ImageViewer.inst = {}; + +})(jQuery); \ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx new file mode 100644 index 0000000000..e5ab3a9652 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="ImageViewerUpdater.asmx.cs" Class="umbraco.controls.Images.ImageViewerUpdater" %> diff --git a/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs new file mode 100644 index 0000000000..b3491211a7 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/ImageViewerUpdater.asmx.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Services; +using System.ComponentModel; +using System.Web.Script.Services; +using System.Web.UI; +using umbraco.controls.Images; +using System.IO; +using System.Web.Script.Serialization; +using umbraco.businesslogic.Utils; + +namespace umbraco.controls.Images +{ + /// + /// An ajax service to return the html for an image based on a media id + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [ToolboxItem(false)] + [ScriptService] + public class ImageViewerUpdater : System.Web.Services.WebService + { + + /// + /// return the a json object with the properties + /// html = the html returned for rendering the image viewer + /// mediaId = the media id loaded + /// width = the width of the media (0) if not found + /// height = the height of the media (0) if not found + /// url = the url of the image + /// alt = the alt text for the image + /// + /// + [WebMethod] + public Dictionary UpdateImage(int mediaId, string style, string linkTarget) + { + //load the control with the specified properties and render the output as a string and return it + Page page = new Page(); + string path = umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) + "/controls/Images/ImageViewer.ascx"; + + ImageViewer imageViewer = page.LoadControl(path) as ImageViewer; + imageViewer.MediaId = mediaId; + ImageViewer.Style _style = (ImageViewer.Style)Enum.Parse(typeof(ImageViewer.Style), style); + imageViewer.ViewerStyle = _style; + imageViewer.LinkTarget = linkTarget; + + //this adds only the anchor with image to be rendered, not the whole control! + page.Controls.Add(imageViewer); + + imageViewer.DataBind(); + + StringWriter sw = new StringWriter(); + HttpContext.Current.Server.Execute(page, sw, false); + + Dictionary rVal = new Dictionary(); + rVal.Add("html", sw.ToString()); + rVal.Add("mediaId", imageViewer.MediaId.ToString()); + rVal.Add("width", imageViewer.FileWidth.ToString()); + rVal.Add("height", imageViewer.FileHeight.ToString()); + rVal.Add("url", imageViewer.MediaItemPath); + rVal.Add("alt", imageViewer.AltText); + + return rVal; + } + } +} diff --git a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx new file mode 100644 index 0000000000..5c8cfd3257 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx @@ -0,0 +1,28 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UploadMediaImage.ascx.cs" + Inherits="umbraco.controls.Images.UploadMediaImage" %> +<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> +<%@ Register TagPrefix="ctl" Namespace="umbraco.controls" Assembly="umbraco" %> + + + + + + + + + + + + + + + + + + + + diff --git a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs new file mode 100644 index 0000000000..767351fa84 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Web; +using System.Web.SessionState; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.HtmlControls; +using System.Linq; +using System.Xml; +using umbraco.BasePages; +using umbraco.uicontrols; +using umbraco.interfaces; +using umbraco.cms.businesslogic.media; + +namespace umbraco.controls.Images +{ + + /// + /// A control to render out the controls to upload a new image to media. + /// Includes ability to select where in the media you would like it to upload and also supports client + /// callback methods once complete. + /// + public partial class UploadMediaImage : System.Web.UI.UserControl + { + + public UploadMediaImage() + { + OnClientUpload = ""; + } + + /// + /// The JavaScript method to be invoked once the image is uploaded, the page is rendered and the document is ready. + /// The method will receive a JSON object with the following parameters: + /// - imagePath + /// - thumbnailPath + /// - width + /// - height + /// - id + /// + public string OnClientUpload { get; set; } + + protected IDataType UploadField = new cms.businesslogic.datatype.controls.Factory().GetNewObject(new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c")); + + protected override void OnInit(EventArgs e) + { + + base.OnInit(e); + // Get upload field from datafield factory + UploadControl.Controls.Add((Control)UploadField.DataEditor); + } + + protected void Page_Load(object sender, EventArgs e) + { + + ((HtmlInputFile)UploadField.DataEditor).ID = "uploadFile"; + if (!IsPostBack) + { + DataBind(); + } + + + } + + protected void SubmitButton_Click(object sender, EventArgs e) + { + Media m = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Text)); + var props = m.getProperties; + foreach (cms.businesslogic.property.Property p in props) + { + if (p.PropertyType.DataTypeDefinition.DataType.Id == UploadField.Id) + { + UploadField.DataTypeDefinitionId = p.PropertyType.DataTypeDefinition.Id; + UploadField.Data.PropertyId = p.Id; + } + } + UploadField.DataEditor.Save(); + + // Generate xml on image + m.XmlGenerate(new XmlDocument()); + pane_upload.Visible = false; + + //this seems real ugly since we apparently already have the properties above (props)... but this data layer is insane and undecipherable:) + string mainImage = m.getProperty("umbracoFile").Value.ToString(); + string extension = mainImage.Substring(mainImage.LastIndexOf(".") + 1, mainImage.Length - mainImage.LastIndexOf(".") - 1); + var thumbnail = mainImage.Remove(mainImage.Length - extension.Length - 1, extension.Length + 1) + "_thumb.jpg"; + string width = m.getProperty("umbracoWidth").Value.ToString(); + string height = m.getProperty("umbracoHeight").Value.ToString(); + int id = m.Id; + + feedback.Style.Add("margin-top", "8px"); + feedback.type = uicontrols.Feedback.feedbacktype.success; + feedback.Text += ""; + + if (!string.IsNullOrEmpty(OnClientUpload)) + { + feedback.Text += @" + "; + } + + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + ((HtmlInputFile)UploadField.DataEditor).Attributes.Add("onChange", "uploader_" + this.ClientID + ".validateImage();"); + } + } +} \ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs new file mode 100644 index 0000000000..0ecc358f57 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.designer.cs @@ -0,0 +1,109 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace umbraco.controls.Images +{ + + + public partial class UploadMediaImage { + + /// + /// JsInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + + /// + /// pane_upload control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.Pane pane_upload; + + /// + /// pp_name control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.PropertyPanel pp_name; + + /// + /// TextBoxTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextBoxTitle; + + /// + /// pp_file control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.PropertyPanel pp_file; + + /// + /// UploadControl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder UploadControl; + + /// + /// pp_target control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.PropertyPanel pp_target; + + /// + /// pp_button control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.PropertyPanel pp_button; + + /// + /// SubmitButton control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button SubmitButton; + + /// + /// feedback control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.Feedback feedback; + + protected global::umbraco.controls.ContentPicker MediaPickerControl; + } +} diff --git a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.js b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.js new file mode 100644 index 0000000000..fb9f8bcea2 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.js @@ -0,0 +1,33 @@ +/// + +Umbraco.Sys.registerNamespace("Umbraco.Controls"); + +(function($) { + Umbraco.Controls.UploadMediaImage = function(txtBoxTitleID, btnID, uploadFileID) { + return { + _txtBoxTitleID: txtBoxTitleID, + _btnID: btnID, + _uplaodFileID: uploadFileID, + + validateImage: function() { + // Disable save button + var imageTypes = ",jpeg,jpg,gif,bmp,png,tiff,tif,"; + var tb_title = document.getElementById(this._txtBoxTitleID); + var bt_submit = $("#" + this._btnID); + var tb_image = document.getElementById(this._uplaodFileID); + + bt_submit.attr("disabled","disabled").css("color", "gray"); + + var imageName = tb_image.value; + if (imageName.length > 0) { + var extension = imageName.substring(imageName.lastIndexOf(".") + 1, imageName.length); + if (imageTypes.indexOf(',' + extension.toLowerCase() + ',') > -1) { + bt_submit.removeAttr("disabled").css("color", "#000"); + if (tb_title.value == "") + tb_title.value = imageName.substring(imageName.lastIndexOf("\\") + 1, imageName.length).replace("." + extension, ""); + } + } + } + }; + } +})(jQuery); \ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenu.cs b/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenu.cs new file mode 100644 index 0000000000..d2b362fa8b --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenu.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.Script.Serialization; +using umbraco.interfaces; +using System.Text.RegularExpressions; +using umbraco.BusinessLogic.Actions; +using umbraco.businesslogic.Utils; +using System.Text; +using umbraco.cms.presentation.Trees; +using umbraco.BasePages; +using System.Web.Services; + +namespace umbraco.controls.Tree +{ + internal class JTreeContextMenu + { + public string RenderJSONMenu() + { + + JSONSerializer jSSerializer = new JSONSerializer(); + + jSSerializer.RegisterConverters(new List() + { + new JTreeContextMenuItem() + }); + + List allActions = new List(); + foreach (IAction a in global::umbraco.BusinessLogic.Actions.Action.GetAll()) + { + if (!string.IsNullOrEmpty(a.Alias) && (!string.IsNullOrEmpty(a.JsFunctionName) || !string.IsNullOrEmpty(a.JsSource))) + { + allActions.Add(a); + } + + } + + + return jSSerializer.Serialize(allActions); + } + } +} diff --git a/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenuItem.cs b/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenuItem.cs new file mode 100644 index 0000000000..8b33f22670 --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Tree/JTreeContextMenuItem.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.Script.Serialization; +using umbraco.interfaces; +using System.Text.RegularExpressions; +using umbraco.BusinessLogic.Actions; +using umbraco.businesslogic.Utils; +using System.Text; +using umbraco.cms.presentation.Trees; +using umbraco.BasePages; +using System.Web.Services; + +namespace umbraco.controls.Tree +{ + internal class JTreeContextMenuItem : JavaScriptConverter + { + + /// + /// Not implemented as we never need to Deserialize + /// + /// + /// + /// + /// + public override object Deserialize(IDictionary dictionary, Type type, JavaScriptSerializer serializer) + { + throw new NotImplementedException(); + } + + public override IDictionary Serialize(object obj, JavaScriptSerializer serializer) + { + //{ + // "id": "L", + // "label": "Create", + // "icon": "create.png", + // "visible": function(NODE, TREE_OBJ) { if (NODE.length != 1) return false; return TREE_OBJ.check("creatable", NODE); }, + // "action": function(NODE, TREE_OBJ) { TREE_OBJ.create(false, NODE); }, + //} + + + IAction a = (IAction)obj; + Dictionary data = new Dictionary(); + + data.Add("id", a.Letter); + data.Add("label", ui.Text(a.Alias)); + + if (a.Icon.StartsWith(".")) + { + StringBuilder sb = new StringBuilder(); + sb.Append(string.Format(""); + sb.Append(""); + data["label"] = sb.ToString(); + } + else + { + data.Add("icon", a.Icon); + } + + //required by jsTree + data.Add("visible", JSONSerializer.ToJSONObject("function() {return true;}")); + //The action handler is what is assigned to the IAction, but for flexibility, we'll call our onContextMenuSelect method which will need to return true if the function is to execute. + //TODO: Check if there is a JSSource + data.Add("action", JSONSerializer.ToJSONObject("function(N,T){" + a.JsFunctionName + ";}")); + + return data; + + } + + /// + /// TODO: Find out why we can't just return IAction as one type (JavaScriptSerializer doesn't seem to pick up on it) + /// + public override IEnumerable SupportedTypes + { + get + { + List types = new List(); + foreach (IAction a in global::umbraco.BusinessLogic.Actions.Action.GetAll()) + { + types.Add(a.GetType()); + } + return types; + } + + + } + } +} diff --git a/umbraco/presentation/umbraco/controls/TreeControl.ascx b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx similarity index 60% rename from umbraco/presentation/umbraco/controls/TreeControl.ascx rename to umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx index c7e13eba79..ec45eefdb8 100644 --- a/umbraco/presentation/umbraco/controls/TreeControl.ascx +++ b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TreeControl.ascx.cs" Inherits="umbraco.presentation.umbraco.controls.TreeControl" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TreeControl.ascx.cs" Inherits="umbraco.controls.Tree.TreeControl" %> <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> @@ -17,38 +17,49 @@ + -
"> + +
+
+
\ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.cs b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.cs new file mode 100644 index 0000000000..ec82fbc5cc --- /dev/null +++ b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.cs @@ -0,0 +1,390 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.Script.Serialization; +using umbraco.interfaces; +using System.Text.RegularExpressions; +using umbraco.BusinessLogic.Actions; +using umbraco.businesslogic.Utils; +using System.Text; +using umbraco.cms.presentation.Trees; +using umbraco.BasePages; +using System.Web.Services; +using System.Drawing; + +namespace umbraco.controls.Tree +{ + + /// + /// The Umbraco tree control. + /// If this control doesn't exist on an UmbracoEnsuredPage it will not work. + /// + public partial class TreeControl : System.Web.UI.UserControl, ITreeService + { + + /// + /// Set the defaults + /// + public TreeControl() + { + Width = Unit.Empty; + Height = Unit.Empty; + BackColor = Color.Empty; + CssClass = ""; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + EnableViewState = false; + } + + public enum TreeMode + { + Standard, Checkbox, InheritedCheckBox + } + + /// + /// If there is not application or tree specified in a query string then this is the application to load. + /// + private const string DEFAULT_APP = "content"; + + private List m_ActiveTrees = new List(); + private List m_AllAppTrees = new List(); + private List m_ActiveTreeDefs = null; + private TreeMode m_TreeType = TreeMode.Standard; + private bool m_IsInit = false; + private TreeService m_TreeService = new TreeService(); + + #region Public Properties + + #region Style Properties + public string CssClass { get; set; } + public Unit Height { get; set; } + public Unit Width { get; set; } + public Color BackColor { get; set; } + #endregion + + #region TreeService parameters. + public string FunctionToCall + { + get { return m_TreeService.FunctionToCall; } + set + { + m_TreeService.FunctionToCall = value; + } + } + + public string NodeKey + { + get { return m_TreeService.NodeKey; } + set + { + m_TreeService.NodeKey = value; + } + } + + public int StartNodeID + { + get { return m_TreeService.StartNodeID; } + set + { + m_TreeService.StartNodeID = value; + } + } + + public string TreeType + { + get { return m_TreeService.TreeType; } + set + { + m_TreeService.TreeType = value; + } + } + + public bool ShowContextMenu + { + get { return m_TreeService.ShowContextMenu; } + set + { + m_TreeService.ShowContextMenu = value; + } + } + + public bool IsDialog + { + get { return m_TreeService.IsDialog; } + set + { + m_TreeService.IsDialog = value; + } + } + + public TreeDialogModes DialogMode + { + get { return m_TreeService.DialogMode; } + set + { + m_TreeService.DialogMode = value; + } + } + + + public string App + { + get + { + return GetCurrentApp(); + } + set + { + m_TreeService.App = value; + } + } + #endregion + + /// + /// Allows for checkboxes to be used with the tree. Default is standard. + /// + public TreeMode Mode + { + get + { + return m_TreeType; + } + set + { + m_TreeType = value; + } + } + + + /// + /// Returns the requires JavaScript as a string for the current application + /// + public string JSCurrApp + { + get + { + StringBuilder javascript = new StringBuilder(); + foreach (BaseTree bTree in m_AllAppTrees) + bTree.RenderJS(ref javascript); + return javascript.ToString(); + } + } + #endregion + + /// + /// Can be set explicitly which will override what is in query strings or what has been set by properties. + /// Useful for rendering out a tree dynamically with an instance of anoterh TreeService. + /// By using this method, it will undo any of the tree service public properties that may be set + /// on this object. + /// + public void SetTreeService(TreeService srv) + { + m_TreeService = srv; + Initialize(); + } + + /// + /// Initializes the control and looks up the tree structures that are required to be rendered. + /// Properties of the control (or SetTreeService) need to be set before pre render or calling + /// GetJSONContextMenu or GetJSONNode + /// + protected void Initialize() + { + //use the query strings if the TreeParams isn't explicitly set + if (m_TreeService == null) + { + m_TreeService = TreeRequestParams.FromQueryStrings().CreateTreeService(); + } + m_TreeService.App = GetCurrentApp(); + + // Validate permissions + if (!BasePages.BasePage.ValidateUserContextID(BasePages.BasePage.umbracoUserContextID)) + return; + UmbracoEnsuredPage page = new UmbracoEnsuredPage(); + if (!page.ValidateUserApp(GetCurrentApp())) + throw new ArgumentException("The current user doesn't have access to this application. Please contact the system administrator."); + + //find all tree definitions that have the current application alias that are ACTIVE + m_ActiveTreeDefs = TreeDefinitionCollection.Instance.FindActiveTrees(GetCurrentApp()); + //find all tree defs that exists for the current application regardless of if they are active + List appTreeDefs = TreeDefinitionCollection.Instance.FindTrees(GetCurrentApp()); + + //Create the BaseTree's based on the tree definitions found + foreach (TreeDefinition treeDef in appTreeDefs) + { + //create the tree and initialize it + BaseTree bTree = treeDef.CreateInstance(); + bTree.SetTreeParameters(m_TreeService); + + //store the created tree + m_AllAppTrees.Add(bTree); + if (treeDef.Tree.Initialize) + m_ActiveTrees.Add(bTree); + } + + m_IsInit = true; + } + + /// + /// This calls the databind method to bind the data binding syntax on the front-end. + /// + /// Databinding was used instead of inline tags in case the tree properties needed to be set + /// by other classes at runtime + /// + /// + /// + /// + /// This will initialize the control so all TreeService properties need to be set before hand + /// + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + if (!m_IsInit) + Initialize(); + + //Render out the JavaScript associated with all of the trees for the application + RenderTreeJS(); + + //apply the styles + if (Width != Unit.Empty) + TreeContainer.Style.Add( HtmlTextWriterStyle.Width, Width.ToString()); + if (Height != Unit.Empty) + TreeContainer.Style.Add(HtmlTextWriterStyle.Height, Height.ToString()); + if (BackColor != Color.Empty) + TreeContainer.Style.Add(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(BackColor)); + if (CssClass != "") + { + TreeContainer.Attributes.Add("class", CssClass); + } + else + { + //add the default class + TreeContainer.Attributes.Add("class", "treeContainer"); + } + + + DataBind(); + } + + /// + /// Returns the JSON markup for the full context menu + /// + public string GetJSONContextMenu() + { + if (ShowContextMenu) + { + JTreeContextMenu menu = new JTreeContextMenu(); + return menu.RenderJSONMenu(); + } + else + { + return "{}"; + } + + } + + /// + /// Returns the JSON markup for one node + /// + /// + /// + /// + /// + /// This will initialize the control so all TreeService properties need to be set before hand + /// + public string GetJSONNode(string nodeId) + { + if (!m_IsInit) + Initialize(); + + if (string.IsNullOrEmpty(m_TreeService.TreeType)) + { + throw new ArgumentException("The TreeType is not set on the tree service"); + } + + BaseTree tree = m_ActiveTrees.Find( + delegate(BaseTree t) + { + return (t.TreeAlias == m_TreeService.TreeType); + } + ); + return tree.GetSerializedNodeData(nodeId); + } + + /// + /// Returns the JSON markup for the first node in the tree + /// + + public string GetJSONInitNode() + { + if (!m_IsInit) + Initialize(); + + //if there is only one tree to render, we don't want to have a node to hold sub trees, we just want the + //stand alone tree, so we'll just add a TreeType to the TreeService and ensure that the right method gets loaded in tree.aspx + if (m_ActiveTrees.Count == 1) + { + m_TreeService.TreeType = m_ActiveTreeDefs[0].Tree.Alias; + + //convert the menu to a string + //string initActions = (TreeSvc.ShowContextMenu ? Action.ToString(m_ActiveTrees[0].RootNodeActions) : ""); + + //Since there's only 1 tree, render out the tree's RootNode properties + XmlTree xTree = new XmlTree(); + xTree.Add(m_ActiveTrees[0].RootNode); + return xTree.ToString(); + } + else + { + + //If there is more than 1 tree for the application than render out a + //container node labelled with the current application. + XmlTree xTree = new XmlTree(); + XmlTreeNode xNode = XmlTreeNode.CreateRoot(new NullTree(GetCurrentApp())); + xNode.Text = ui.Text("sections", GetCurrentApp(), UmbracoEnsuredPage.CurrentUser); + xNode.Source = m_TreeService.GetServiceUrl(); + xNode.Action = ClientTools.Scripts.OpenDashboard(GetCurrentApp()); + xNode.NodeType = m_TreeService.App.ToLower(); + xNode.NodeID = "-1"; + xNode.Icon = ".sprTreeFolder"; + xTree.Add(xNode); + return xTree.ToString(); + } + } + + + + private void RenderTreeJS() + { + Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Trees_" + GetCurrentApp(), JSCurrApp, true); + } + + /// + /// Return the current application alias. If neither the TreeType of Application is specified + /// than return the default application. If the Application is null but there is a TreeType then + /// find the application that the tree type is associated with. + /// + private string GetCurrentApp() + { + //if theres an treetype specified but no application + if (string.IsNullOrEmpty(m_TreeService.App) && + !string.IsNullOrEmpty(m_TreeService.TreeType)) + { + TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(m_TreeService.TreeType); + if (treeDef != null) + return treeDef.App.alias; + } + else if (!string.IsNullOrEmpty(m_TreeService.App)) + return m_TreeService.App; + + //if everything is null then return the default app + return DEFAULT_APP; + } + } +} \ No newline at end of file diff --git a/umbraco/presentation/umbraco/controls/TreeControl.ascx.designer.cs b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.designer.cs similarity index 89% rename from umbraco/presentation/umbraco/controls/TreeControl.ascx.designer.cs rename to umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.designer.cs index 9c42afc877..c27bd96968 100644 --- a/umbraco/presentation/umbraco/controls/TreeControl.ascx.designer.cs +++ b/umbraco/presentation/umbraco/controls/Tree/TreeControl.ascx.designer.cs @@ -1,14 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3603 +// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace umbraco.presentation.umbraco.controls { +namespace umbraco.controls.Tree { public partial class TreeControl { @@ -138,5 +138,14 @@ namespace umbraco.presentation.umbraco.controls { /// To modify move field declaration from designer file to code-behind file. /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude10; + + /// + /// TreeContainer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl TreeContainer; } } diff --git a/umbraco/presentation/umbraco/controls/TreeControl.ascx.cs b/umbraco/presentation/umbraco/controls/TreeControl.ascx.cs deleted file mode 100644 index ce291ac1d5..0000000000 --- a/umbraco/presentation/umbraco/controls/TreeControl.ascx.cs +++ /dev/null @@ -1,383 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.Script.Serialization; -using umbraco.interfaces; -using System.Text.RegularExpressions; -using umbraco.BusinessLogic.Actions; -using umbraco.businesslogic.Utils; -using System.Text; -using umbraco.cms.presentation.Trees; -using umbraco.BasePages; -using System.Web.Services; - -namespace umbraco.presentation.umbraco.controls -{ - - /// - /// The Umbraco tree control. - /// If this control doesn't exist on an UmbracoEnsuredPage it will not work. - /// - public partial class TreeControl : System.Web.UI.UserControl - { - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - EnableViewState = false; - } - - public enum TreeMode - { - Standard, Checkbox, InheritedCheckBox - } - - /// - /// If there is not application or tree specified in a query string then this is the application to load. - /// - private const string DEFAULT_APP = "content"; - - private List m_ActiveTrees = new List(); - private List m_AllAppTrees = new List(); - private List m_ActiveTreeDefs = null; - private TreeMode m_TreeType = TreeMode.Standard; - private bool m_IsInit = false; - private TreeService m_TreeService = null; - - /// - /// returns the current tree service being used to render the tree - /// - public TreeService TreeSvc - { - get - { - return m_TreeService; - } - } - - /// - /// Can be set explicitly which will override what is in query strings. - /// Useful for rendering out a tree dynamically. - /// - public void SetTreeService(TreeService srv) - { - m_TreeService = srv; - Initialize(); - } - - /// - /// Allows for checkboxes to be used with the tree. Default is standard. - /// - public TreeMode TreeType - { - get - { - return m_TreeType; - } - set - { - m_TreeType = value; - } - } - - /// - /// Used to create a different container id for the tree control. This is done so that - /// there is a way to differentiate between multiple trees if required. This is currently used - /// to distinguish which tree is the main umbraco tree as opposed to dialog trees. - /// - public string CustomContainerId { get; set; } - - protected void Initialize() - { - //use the query strings if the TreeParams isn't explicitly set - if (m_TreeService == null) - { - TreeRequestParams treeParams = TreeRequestParams.FromQueryStrings(); - m_TreeService = new TreeService() - { - ShowContextMenu = treeParams.ShowContextMenu, - IsDialog = treeParams.IsDialog, - DialogMode = treeParams.DialogMode, - App = treeParams.Application, - TreeType = treeParams.TreeType - }; - } - - //ensure that the application is setup correctly - m_TreeService.App = CurrentApp; - - // Validate permissions - if (!BasePages.BasePage.ValidateUserContextID(BasePages.BasePage.umbracoUserContextID)) - return; - UmbracoEnsuredPage page = new UmbracoEnsuredPage(); - if (!page.ValidateUserApp(TreeSvc.App)) - throw new ArgumentException("The current user doesn't have access to this application. Please contact the system administrator."); - - //find all tree definitions that have the current application alias that are ACTIVE - m_ActiveTreeDefs = TreeDefinitionCollection.Instance.FindActiveTrees(TreeSvc.App); - //find all tree defs that exists for the current application regardless of if they are active - List appTreeDefs = TreeDefinitionCollection.Instance.FindTrees(TreeSvc.App); - - //Create the BaseTree's based on the tree definitions found - foreach (TreeDefinition treeDef in appTreeDefs) - { - //create the tree and initialize it - BaseTree bTree = treeDef.CreateInstance(); - bTree.SetTreeParameters(TreeSvc); - - //store the created tree - m_AllAppTrees.Add(bTree); - if (treeDef.Tree.Initialize) - m_ActiveTrees.Add(bTree); - } - - m_IsInit = true; - } - - /// - /// This calls the databind method to bind the data binding syntax on the front-end. - /// - /// Databinding was used instead of inline tags in case the tree properties needed to be set - /// by other classes at runtime - /// - /// - /// - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - if (!m_IsInit) - Initialize(); - - //Render out the JavaScript associated with all of the trees for the application - RenderTreeJS(); - - DataBind(); - } - - /// - /// Returns the JSON markup for the full context menu - /// - public string GetJSONContextMenu() - { - JTreeContextMenu menu = new JTreeContextMenu(); - return menu.RenderJSONMenu(); - } - - /// - /// Returns the JSON markup for one node - /// - /// - /// - /// - public string GetJSONNode(string nodeId) - { - if (!m_IsInit) - Initialize(); - - if (string.IsNullOrEmpty(TreeSvc.TreeType)) - { - throw new ArgumentException("The TreeType is not set on the tree service"); - } - - BaseTree tree = m_ActiveTrees.Find( - delegate(BaseTree t) - { - return (t.TreeAlias == TreeSvc.TreeType); - } - ); - return tree.GetSerializedNodeData(nodeId); - } - - /// - /// Returns the JSON markup for the first node in the tree - /// - public string GetJSONInitNode() - { - if (!m_IsInit) - Initialize(); - - //if there is only one tree to render, we don't want to have a node to hold sub trees, we just want the - //stand alone tree, so we'll just add a TreeType to the TreeService and ensure that the right method gets loaded in tree.aspx - if (m_ActiveTrees.Count == 1) - { - TreeSvc.TreeType = m_ActiveTreeDefs[0].Tree.Alias; - - //convert the menu to a string - //string initActions = (TreeSvc.ShowContextMenu ? Action.ToString(m_ActiveTrees[0].RootNodeActions) : ""); - - //Since there's only 1 tree, render out the tree's RootNode properties - XmlTree xTree = new XmlTree(); - xTree.Add(m_ActiveTrees[0].RootNode); - return xTree.ToString(); - } - else - { - - //If there is more than 1 tree for the application than render out a - //container node labelled with the current application. - XmlTree xTree = new XmlTree(); - XmlTreeNode xNode = XmlTreeNode.CreateRoot(new NullTree(CurrentApp)); - xNode.Text = ui.Text("sections", TreeSvc.App, UmbracoEnsuredPage.CurrentUser); - xNode.Source = TreeSvc.GetServiceUrl(); - xNode.Action = ClientTools.Scripts.OpenDashboard(TreeSvc.App); - xNode.NodeType = TreeSvc.App.ToLower(); - xNode.NodeID = "-1"; - xNode.Icon = ".sprTreeFolder"; - xTree.Add(xNode); - return xTree.ToString(); - } - } - - /// - /// Returns the requires JavaScript as a string for the current application - /// - public string JSCurrApp - { - get - { - StringBuilder javascript = new StringBuilder(); - foreach (BaseTree bTree in m_AllAppTrees) - bTree.RenderJS(ref javascript); - return javascript.ToString(); - } - } - - /// - /// Return the current application alias. If neither the TreeType of Application is specified - /// than return the default application. If the Application is null but there is a TreeType then - /// find the application that the tree type is associated with. - /// - protected string CurrentApp - { - get - { - //if theres an treetype specified but no application - if (string.IsNullOrEmpty(TreeSvc.App) && - !string.IsNullOrEmpty(TreeSvc.TreeType)) - { - TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(TreeSvc.TreeType); - if (treeDef != null) - return treeDef.App.alias; - } - else if (!string.IsNullOrEmpty(TreeSvc.App)) - return TreeSvc.App; - - //if everything is null then return the default app - return DEFAULT_APP; - } - } - - private void RenderTreeJS() - { - Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Trees", JSCurrApp, true); - } - - - } - - internal class JTreeContextMenu - { - public string RenderJSONMenu() - { - - JSONSerializer jSSerializer = new JSONSerializer(); - - jSSerializer.RegisterConverters(new List() - { - new JTreeContextMenuItem() - }); - - List allActions = new List(); - foreach (IAction a in global::umbraco.BusinessLogic.Actions.Action.GetAll()) - { - if (!string.IsNullOrEmpty(a.Alias) && (!string.IsNullOrEmpty(a.JsFunctionName) || !string.IsNullOrEmpty(a.JsSource))) - { - allActions.Add(a); - } - - } - - - return jSSerializer.Serialize(allActions); - } - } - - internal class JTreeContextMenuItem : JavaScriptConverter - { - - /// - /// Not implemented as we never need to Deserialize - /// - /// - /// - /// - /// - public override object Deserialize(IDictionary dictionary, Type type, JavaScriptSerializer serializer) - { - throw new NotImplementedException(); - } - - public override IDictionary Serialize(object obj, JavaScriptSerializer serializer) - { - //{ - // "id": "L", - // "label": "Create", - // "icon": "create.png", - // "visible": function(NODE, TREE_OBJ) { if (NODE.length != 1) return false; return TREE_OBJ.check("creatable", NODE); }, - // "action": function(NODE, TREE_OBJ) { TREE_OBJ.create(false, NODE); }, - //} - - - IAction a = (IAction)obj; - Dictionary data = new Dictionary(); - - data.Add("id", a.Letter); - data.Add("label", ui.Text(a.Alias)); - - if (a.Icon.StartsWith(".")) - { - StringBuilder sb = new StringBuilder(); - sb.Append(string.Format(""); - sb.Append(""); - data["label"] = sb.ToString(); - } - else - { - data.Add("icon", a.Icon); - } - - //required by jsTree - data.Add("visible", JSONSerializer.ToJSONObject("function() {return true;}")); - //The action handler is what is assigned to the IAction, but for flexibility, we'll call our onContextMenuSelect method which will need to return true if the function is to execute. - //TODO: Check if there is a JSSource - data.Add("action", JSONSerializer.ToJSONObject("function(N,T){" + a.JsFunctionName + ";}")); - - return data; - - } - - /// - /// TODO: Find out why we can't just return IAction as one type (JavaScriptSerializer doesn't seem to pick up on it) - /// - public override IEnumerable SupportedTypes - { - get - { - List types = new List(); - foreach (IAction a in global::umbraco.BusinessLogic.Actions.Action.GetAll()) - { - types.Add(a.GetType()); - } - return types; - } - - - } - } -} \ No newline at end of file diff --git a/umbraco/presentation/umbraco/create/content.ascx b/umbraco/presentation/umbraco/create/content.ascx index 49ae2745b7..da1a385f02 100644 --- a/umbraco/presentation/umbraco/create/content.ascx +++ b/umbraco/presentation/umbraco/create/content.ascx @@ -19,7 +19,7 @@
or - <%=umbraco.ui.Text("cancel")%> + <%=umbraco.ui.Text("cancel")%> - - - - - - - - - + + - - + + - - -
-
- -
-
-
- - -
- - -
+ <%--when a node is selected, the id will be stored in this field--%> + + + + +
+ + + - + -
-

- or - {#cancel} -

- - - - - - +

+ " style="width: 60px; + color: gray" disabled="disabled" id="submitbutton" /> + + <%# umbraco.ui.Text("or") %> + <%#umbraco.ui.Text("cancel") %> +

+
diff --git a/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.cs b/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.cs index 2e70346438..0b30058780 100644 --- a/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.cs @@ -4,15 +4,16 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using umbraco.BasePages; namespace umbraco.presentation.umbraco.dialogs { - public partial class mediaPicker : System.Web.UI.Page + public partial class mediaPicker : UmbracoEnsuredPage { protected void Page_Load(object sender, EventArgs e) { - - + if (!IsPostBack) + DataBind(); } diff --git a/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs index 411be9c340..82c08429dd 100644 --- a/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/mediaPicker.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -13,78 +13,6 @@ namespace umbraco.presentation.umbraco.dialogs { public partial class mediaPicker { - /// - /// Head1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsInclude4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude4; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - /// /// pane_src control. /// @@ -94,6 +22,15 @@ namespace umbraco.presentation.umbraco.dialogs { /// protected global::umbraco.uicontrols.Pane pane_src; + /// + /// ImageViewer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Images.ImageViewer ImageViewer; + /// /// tv_options control. /// @@ -112,6 +49,15 @@ namespace umbraco.presentation.umbraco.dialogs { /// protected global::umbraco.uicontrols.Pane pane_select; + /// + /// DialogTree control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Tree.TreeControl DialogTree; + /// /// pane_upload control. /// @@ -120,5 +66,14 @@ namespace umbraco.presentation.umbraco.dialogs { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pane_upload; + + /// + /// MediaUploader control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; } } diff --git a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx index 79988c6adc..9fc2e74da6 100644 --- a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx +++ b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx @@ -1,6 +1,8 @@ <%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.dialogs.moveOrCopy" %> <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> + @@ -51,8 +44,10 @@ function doSubmit() {document.Form1["ok"].click()} - - + + @@ -76,7 +71,7 @@ function doSubmit() {document.Form1["ok"].click()}

  - <%=umbraco.ui.Text("general", "or", this.getUser())%>   + <%=umbraco.ui.Text("general", "or", this.getUser())%>   <%=umbraco.ui.Text("general", "cancel", this.getUser())%>

diff --git a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs index efe7acde80..9658147453 100644 --- a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs @@ -24,6 +24,8 @@ namespace umbraco.dialogs protected void Page_Load(object sender, System.EventArgs e) { + JTree.DataBind(); + // Put user code to initialize the page here if (!IsPostBack) { //Document Type copy Hack... @@ -259,7 +261,7 @@ namespace umbraco.dialogs m.Move(int.Parse(UmbracoContext.Current.Request["copyTo"])); } - feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, base.getUser()) + "

" + ui.Text("closeThisWindow") + ""; + feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, base.getUser()) + "

" + ui.Text("closeThisWindow") + ""; feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success; // refresh tree @@ -270,7 +272,7 @@ namespace umbraco.dialogs { cms.businesslogic.web.Document d = new cms.businesslogic.web.Document(int.Parse(helper.Request("id"))); d.Copy(int.Parse(helper.Request("copyTo")), this.getUser(), RelateDocuments.Checked); - feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, base.getUser()) + "

" + ui.Text("closeThisWindow") + ""; + feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, base.getUser()) + "

" + ui.Text("closeThisWindow") + ""; feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success; ClientTools.CopyNode(currentNode.Id.ToString(), newNode.Path); } diff --git a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs index c08ac1b7ef..334f79a404 100644 --- a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -40,6 +40,15 @@ namespace umbraco.dialogs { /// protected global::umbraco.uicontrols.Pane pane_form; + ///

+ /// JTree control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Tree.TreeControl JTree; + /// /// pp_relate control. /// diff --git a/umbraco/presentation/umbraco/dialogs/notifications.aspx b/umbraco/presentation/umbraco/dialogs/notifications.aspx index 26ed4f2c40..34e586dcac 100644 --- a/umbraco/presentation/umbraco/dialogs/notifications.aspx +++ b/umbraco/presentation/umbraco/dialogs/notifications.aspx @@ -18,7 +18,7 @@
<%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%><%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%>
\ No newline at end of file diff --git a/umbraco/presentation/umbraco/dialogs/notifications.aspx.cs b/umbraco/presentation/umbraco/dialogs/notifications.aspx.cs index cf14caff27..7e7b18bdc1 100644 --- a/umbraco/presentation/umbraco/dialogs/notifications.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/notifications.aspx.cs @@ -88,7 +88,7 @@ namespace umbraco.dialogs base.getUser().initNotifications(); - feedback.Text = ui.Text("notifications") + " " + ui.Text("ok") + "

" + ui.Text("closeThisWindow") + ""; + feedback.Text = ui.Text("notifications") + " " + ui.Text("ok") + "

" + ui.Text("closeThisWindow") + ""; feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success; pane_form.Visible = false; diff --git a/umbraco/presentation/umbraco/dialogs/notifications.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/notifications.aspx.designer.cs index a7e5247068..15ce3d33b1 100644 --- a/umbraco/presentation/umbraco/dialogs/notifications.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/notifications.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/dialogs/protectPage.aspx b/umbraco/presentation/umbraco/dialogs/protectPage.aspx index c2fce75921..19edd39dfc 100644 --- a/umbraco/presentation/umbraco/dialogs/protectPage.aspx +++ b/umbraco/presentation/umbraco/dialogs/protectPage.aspx @@ -103,7 +103,7 @@

-   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> +   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%>

@@ -153,7 +153,7 @@

-   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> +   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%>

diff --git a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs index 49ef5bb351..104936d3a7 100644 --- a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs @@ -229,7 +229,7 @@ namespace umbraco.presentation.umbraco.dialogs cms.businesslogic.web.Access.RemoveMembershipRoleFromDocument(pageId, li.Value); } - feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text, null) + "

" + ui.Text("closeThisWindow") + ""; + feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text, null) + "

" + ui.Text("closeThisWindow") + ""; ClientTools.ReloadActionNode(true, false); @@ -247,7 +247,7 @@ namespace umbraco.presentation.umbraco.dialogs Access.RemoveProtection(pageId); - feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text, null) + "

" + ui.Text("closeThisWindow") + ""; + feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text, null) + "

" + ui.Text("closeThisWindow") + ""; ClientTools.ReloadActionNode(true, false); diff --git a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.designer.cs index 7e04e5fa26..6ed66eea24 100644 --- a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/dialogs/publish.aspx b/umbraco/presentation/umbraco/dialogs/publish.aspx index 2246da7ace..acd3e6e856 100644 --- a/umbraco/presentation/umbraco/dialogs/publish.aspx +++ b/umbraco/presentation/umbraco/dialogs/publish.aspx @@ -85,7 +85,7 @@

- <%= umbraco.ui.Text("general","or") %> <%=umbraco.ui.Text("general", "cancel", this.getUser())%> + <%= umbraco.ui.Text("general","or") %> <%=umbraco.ui.Text("general", "cancel", this.getUser())%>
diff --git a/umbraco/presentation/umbraco/dialogs/sort.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/sort.aspx.designer.cs index 496c4cbe4e..3287cd1289 100644 --- a/umbraco/presentation/umbraco/dialogs/sort.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/sort.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3603 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/dialogs/treePicker.aspx b/umbraco/presentation/umbraco/dialogs/treePicker.aspx index c55dd1a64b..b782dc3412 100644 --- a/umbraco/presentation/umbraco/dialogs/treePicker.aspx +++ b/umbraco/presentation/umbraco/dialogs/treePicker.aspx @@ -1,89 +1,23 @@ -<%@ Page Language="c#" Codebehind="treePicker.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.treePicker" %> +<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="treePicker.aspx.cs" + AutoEventWireup="True" Inherits="umbraco.dialogs.treePicker" %> + <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Register TagPrefix="umb2" TagName="Tree" Src="../controls/Tree/TreeControl.ascx" %> + + + + - - - - - umbraco - - - - - + - - - - - -
- -
- -
-
- - + + +
diff --git a/umbraco/presentation/umbraco/dialogs/treePicker.aspx.cs b/umbraco/presentation/umbraco/dialogs/treePicker.aspx.cs index 12bdf6ab47..c1f29d9c0e 100644 --- a/umbraco/presentation/umbraco/dialogs/treePicker.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/treePicker.aspx.cs @@ -12,42 +12,17 @@ using umbraco.cms.presentation.Trees; namespace umbraco.dialogs { - /// - /// Summary description for treePicker. - /// + [Obsolete("Use the TreeControl instead. This does however get used by the TreeService when requesting the tree init url.")] public partial class treePicker : BasePages.UmbracoEnsuredPage { protected override void OnLoad(EventArgs e) { base.OnLoad(e); - ClientLoader.DataBind(); + TreeParams = TreeRequestParams.FromQueryStrings().CreateTreeService(); + DataBind(); } - protected string TreeInitUrl - { - get - { - TreeRequestParams treeParams = TreeRequestParams.FromQueryStrings(); + protected TreeService TreeParams { get; private set; } - return TreeService.GetInitUrl(null, treeParams.TreeType, false, true, TreeDialogModes.id, treeParams.Application, "", ""); - } - } - - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - } - #endregion } } diff --git a/umbraco/presentation/umbraco/dialogs/treePicker.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/treePicker.aspx.designer.cs index 69875cb8f7..547394a509 100644 --- a/umbraco/presentation/umbraco/dialogs/treePicker.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/treePicker.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3603 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -14,21 +14,12 @@ namespace umbraco.dialogs { public partial class treePicker { /// - /// ClientLoader control. + /// DialogTree control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + protected global::umbraco.controls.Tree.TreeControl DialogTree; } } diff --git a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx index 53b7fb5e44..0d9f7c529d 100644 --- a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx +++ b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx @@ -67,7 +67,7 @@ UmbClientMgr.contentFrame().UmbEditor.Insert(tagString, '', '<%=umbraco.helper.Request("objectId")%>'); - UmbClientMgr.mainWindow().closeModal(); + UmbClientMgr.closeModalWindow(); } var functionsFrame = this; @@ -169,6 +169,6 @@
" onclick="doSubmit()">   or   - <%=umbraco.ui.Text("general", "cancel", this.getUser())%> + <%=umbraco.ui.Text("general", "cancel", this.getUser())%> \ No newline at end of file diff --git a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.designer.cs index 558b59f883..fc13b548da 100644 --- a/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/umbracoField.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx index 08354e4202..f72dba32d0 100644 --- a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx +++ b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx @@ -1,66 +1,28 @@ -<%@ Page language="c#"MasterPageFile="../masterpages/umbracoDialog.Master" Codebehind="uploadImage.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.uploadImage" %> +<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoDialog.Master" CodeBehind="uploadImage.aspx.cs" + AutoEventWireup="True" Inherits="umbraco.dialogs.uploadImage" %> + <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - +<%@ Register TagName="MediaUpload" TagPrefix="umb" Src="../controls/Images/UploadMediaImage.ascx" %> + - - var imageName = tb_image.value; - if (imageName.length > 0) { - var extension = imageName.substring(imageName.lastIndexOf(".") + 1, imageName.length); - if (imageTypes.indexOf(',' + extension.toLowerCase() + ',') > -1) { - bt_submit.disabled = false; - if(tb_title.value == "") - tb_title.value = imageName.substring(imageName.lastIndexOf("\\") + 1, imageName.length).replace("." + extension, ""); - } - } - } - - function chooseId() { - var treePicker = window.showModalDialog('<%=umbraco.cms.presentation.Trees.TreeService.GetPickerUrl(true,"media","media")%>', 'treePicker', 'dialogWidth=350px;dialogHeight=300px;scrollbars=no;center=yes;border=thin;help=no;status=no') - if (treePicker != undefined) { - document.getElementById("ctl00_body_folderid").value = treePicker; - if (treePicker > 0) { - umbraco.presentation.webservices.CMSNode.GetNodeName('<%=umbraco.BasePages.BasePage.umbracoUserContextID%>', treePicker, updateContentTitle); - } - } - } - function updateContentTitle(result) { - document.getElementById("mediaTitle").innerHTML = "" + result + ""; - } - - - - - - - - - - - - - - - - - - - - - + - \ No newline at end of file diff --git a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.cs b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.cs index b729ba93d6..8c3defc8a0 100644 --- a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.cs @@ -14,95 +14,9 @@ using umbraco.IO; namespace umbraco.dialogs { - /// - /// Summary description for uploadImage. - /// + [Obsolete("Use the UploadMediaImage control instead")] public partial class uploadImage : BasePages.UmbracoEnsuredPage { - protected controls.ContentPicker mediaPickerControl = new umbraco.controls.ContentPicker(); - - protected interfaces.IDataType uploadField = new cms.businesslogic.datatype.controls.Factory().GetNewObject(new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c")); - - protected void Page_Load(object sender, System.EventArgs e) - { - //uploadField.Alias = "umbracoFile"; - ((HtmlInputFile) uploadField.DataEditor).Attributes.Add("onChange", "validateImage()"); - ((HtmlInputFile) uploadField.DataEditor).ID = "uploadFile"; - - mediaPickerControl.ID = "mediaPickerControl"; - mediaPickerControl.AppAlias = "media"; - mediaPickerControl.TreeAlias = "media"; - mediaPickerControl.ModalHeight = 200; - mediaPickerControl.ShowDelete = false; - mediaPickerControl.Text = this.getUser().StartMediaId.ToString(); - mediaPicker.Controls.Add(mediaPickerControl); - - if (!IsPostBack) - { - Button1.Text = ui.Text("save"); - //LiteralTitle.Text = ui.Text("name"); - //LiteralUpload.Text = ui.Text("choose"); - } - else - { - - cms.businesslogic.media.Media m = cms.businesslogic.media.Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), this.getUser(), int.Parse(mediaPickerControl.Text)); - var props = m.getProperties; - foreach (cms.businesslogic.property.Property p in props) { - if (p.PropertyType.DataTypeDefinition.DataType.Id == uploadField.Id) - { - uploadField.DataTypeDefinitionId = p.PropertyType.DataTypeDefinition.Id; - uploadField.Data.PropertyId = p.Id; - } - } - uploadField.DataEditor.Save(); - - // Generate xml on image - m.XmlGenerate(new XmlDocument()); - pane_upload.Visible = false; - - string imagename = m.getProperty("umbracoFile").Value.ToString(); - string extension = imagename.Substring(imagename.LastIndexOf(".") + 1, imagename.Length - imagename.LastIndexOf(".") -1); - - imagename = imagename.Remove(imagename.Length-extension.Length-1,extension.Length+1) + "_thumb.jpg"; - - feedback.Style.Add("margin-top", "8px"); - feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success; - feedback.Text += ""; - - feedback.Text += ""; - - } - // Put user code to initialize the page here - } - - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - - // Get upload field from datafield factory - PlaceHolder1.Controls.Add((Control) uploadField.DataEditor); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion - - protected void Button1_Click(object sender, System.EventArgs e) - { - - } + } } diff --git a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.designer.cs b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.designer.cs index 7075f582af..b34a3851bf 100644 --- a/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.designer.cs +++ b/umbraco/presentation/umbraco/dialogs/uploadImage.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -14,93 +14,12 @@ namespace umbraco.dialogs { public partial class uploadImage { /// - /// pane_upload control. + /// MediaUploader control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::umbraco.uicontrols.Pane pane_upload; - - /// - /// pp_name control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_name; - - /// - /// TextBoxTitle control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBoxTitle; - - /// - /// pp_file control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_file; - - /// - /// PlaceHolder1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; - - /// - /// pp_target control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_target; - - /// - /// mediaPicker control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder mediaPicker; - - /// - /// pp_button control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.PropertyPanel pp_button; - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - - /// - /// feedback control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback; + protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; } } diff --git a/umbraco/presentation/umbraco/images/throbber.gif b/umbraco/presentation/umbraco/images/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..95ff649d4162b61d8107adb91ded5940c55e5e4c GIT binary patch literal 1844 zcmb8wYfw{X8VB&hIq%6iIhW)mA`M8L5P~KlG2s@XSob7=AW#Zaq2*E%FqBZJfr`); zkz5dhT$O6^QnjT8MO#30dIMu*M%#|A%sTD#HlrO{wY4p*+gY9IuA49mlMnl4pO4Rn z_x;WPd7pXHw`|t0H$wy>|3Hw(j~{a!_u#>U;o;#sckb-mx%0@8BfgH^ZZ9e-@_0Pg zuV2r}$(fv-G#ZUnRaM>H-N^q_k^f%#w0XNlQvRyMP;G9?-eKOp&iZoY4kYpsKq%iy zk&o$|w5`vk7;@9%)@iXIUrXh`!0$uwMu`MP`H?@4ps7akilJ{bBf@>_s`rfO+$HlE z_Fk&P3xDDyFI)&Q+D0D-t5Ep7fgL^^iyWBJy&O)R%{5h*T2g>V_})by$5BvGMU@al2va{GSn|) zut3aWE?+13Fs?{4V?p|bQq;SOzLD3f;hf_gY5^446Ivm_FQ2l(1VLAR%s)R>i-_ZQ z&)d$DSBFirx$=WL(s}#DvGDnAnm;9cl2)pKO93!>jHXmt^Gus&uhQ^R|DFS#bk;yu zXQ`n@r#qor$^`^cY8FQ%_U9rcuPm(gQQBA0%+xf3slU`~Gl0l3-uhHd@=4~#=fPWD zY4>lysnGXV{#LgVhTk3fb=>k6^YgYHS#f2BMSuUktH3=OTm51ouy8vYGBlb-(_h-$ zl`T>G-3N682cnh$cp#v~5BNys1309lb0K_2N$pK$Z29M+QP)_MmN#_RbW-98UwgS? zP(Boj4P9v56UqUqayN2-d{sv%3*41~dbPL50LqF%%JdK+R7xC!#fqWeXW-SxiQ8bZ+FW zwT7cvr}lqv>zi)X+ZX;N00-P@CGr~Q(Nk-Z6D8fZV4^71JrmZdy}SBcyu*A(s}}8B z*>_$YA((ygq(?jedM-O{83`c}FW|#y)`}6BP)ON|^QFyvv{Weq4FU6?`ljcAY4=EKQf?Yl7+^t|3)Zc4cK^3ZD9J7O$H9Oa)hMNH$W z@k=*@!>0RBjDHb2eQm|uteh_*u1<|TDFHOei>5YV1WV#HL&YfpAw)Y-p3thK`5GMG z00(1a7`AI!Lj`IY{I6y)o0{U&vfI=|Caf!d$6Lq551R6d9|{sz*dJ~P6Lh{Y54JoP zsrA$wQuSgcW!GrmXCe4^8M&3#;ORLlk~aW)orYY_whE^3*yvP*&E-KL%uCQQxDUfx zE37CabE>tCtV^-HQgonXc}nY;y6F*0m5$QyXF{Z2{y{`$pPnJxQ|9NC!JX}UjgzXu z@Se7x*N8V#ZT7CoZ^J}Y<4j?T8h+YunpN?c_Je;6iB;EeXQPV7+Th06 dtwLDJL#a0_K>wk&Y~4#Tit}rd{U6a{{Rfg56CMBn literal 0 HcmV?d00001 diff --git a/umbraco/presentation/umbraco/masterpages/umbracoPage.Master b/umbraco/presentation/umbraco/masterpages/umbracoPage.Master index 228c94ba3e..d4c5768a77 100644 --- a/umbraco/presentation/umbraco/masterpages/umbracoPage.Master +++ b/umbraco/presentation/umbraco/masterpages/umbracoPage.Master @@ -13,14 +13,15 @@ + - + - +
diff --git a/umbraco/presentation/umbraco/masterpages/umbracoPage.Master.designer.cs b/umbraco/presentation/umbraco/masterpages/umbracoPage.Master.designer.cs index e6fc35e47b..eac20e90a5 100644 --- a/umbraco/presentation/umbraco/masterpages/umbracoPage.Master.designer.cs +++ b/umbraco/presentation/umbraco/masterpages/umbracoPage.Master.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -40,6 +40,15 @@ namespace umbraco.presentation.umbraco.masterpages { /// protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; + /// + /// CssInclude2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.CssInclude CssInclude2; + /// /// JsInclude1 control. /// @@ -58,6 +67,15 @@ namespace umbraco.presentation.umbraco.masterpages { /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; + /// + /// JsInclude8 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude8; + /// /// JsInclude4 control. /// @@ -85,6 +103,15 @@ namespace umbraco.presentation.umbraco.masterpages { /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude6; + /// + /// JsInclude7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude7; + /// /// JsInclude3 control. /// diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx index 3b95c2afef..70f0808de4 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx @@ -1,37 +1,58 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertImage.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertImage" %> <%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> +<%@ Register TagPrefix="umb2" TagName="Tree" Src="../../controls/Tree/TreeControl.ascx" %> +<%@ Register TagPrefix="umb3" TagName="Image" Src="../../controls/Images/ImageViewer.ascx" %> +<%@ Register TagName="MediaUpload" TagPrefix="umb4" Src="../../controls/Images/UploadMediaImage.ascx" %> {#advimage_dlg.dialog_title} - - + <%----%> + + + + + + - - - - + + @@ -111,14 +136,15 @@ - - + + + + + -
-   -
+ @@ -137,382 +163,24 @@ +
- - + +
- +

- or {#cancel} + or {#cancel}

- - - - - - diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs index 258a1cbc13..e81484bf3d 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.cs @@ -29,14 +29,10 @@ namespace umbraco.presentation.plugins.tinymce3 uicontrols.TabPage tp = tv_options.NewTabPage(ui.Text("choose")); tp.HasMenu = false; tp.Controls.Add(pane_select); - - //tp.Controls.Add(new LiteralControl("
 
")); - + uicontrols.TabPage tp2 = tv_options.NewTabPage(ui.Text("create") + " " + ui.Text("new")); tp2.HasMenu = false; tp2.Controls.Add(pane_upload); - - //tp2.Controls.Add(new LiteralControl("")); } #region Web Form Designer generated code diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs index 4a3e711922..6a882ba0b4 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertImage.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -31,6 +31,15 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; + /// + /// JsInclude9 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude9; + /// /// JsInclude8 control. /// @@ -94,6 +103,24 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + + /// + /// ScriptManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.ScriptManager ScriptManager1; + /// /// pane_src control. /// @@ -103,6 +130,15 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::umbraco.uicontrols.Pane pane_src; + /// + /// ImageViewer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Images.ImageViewer ImageViewer; + /// /// pp_src control. /// @@ -175,6 +211,15 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::umbraco.uicontrols.Pane pane_select; + /// + /// DialogTree control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Tree.TreeControl DialogTree; + /// /// pane_upload control. /// @@ -185,21 +230,12 @@ namespace umbraco.presentation.plugins.tinymce3 { protected global::System.Web.UI.WebControls.Panel pane_upload; /// - /// Table1 control. + /// MediaUploader control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTable Table1; - - /// - /// PlaceHolder1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; + protected global::umbraco.controls.Images.UploadMediaImage MediaUploader; } } diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx index a75bc97408..dee74da7fa 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx @@ -1,6 +1,8 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertLink.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertLink" %> <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> <%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Register Src="../../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> + @@ -108,13 +110,17 @@
- +
- -
+ +

diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs index a20670b476..8928f02994 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.cs @@ -18,15 +18,14 @@ namespace umbraco.presentation.plugins.tinymce3 tp.HasMenu = false; tp.Controls.Add(pane_content); - //tp.Controls.Add(new LiteralControl("")); + uicontrols.TabPage tp2 = tv_options.NewTabPage(ui.Text("media")); tp2.HasMenu = false; tp2.Controls.Add(pane_media); - //tp2.Controls.Add(new LiteralControl("")); - //umbracoLink.Controls.Add(tbv); + } protected override void Render(HtmlTextWriter writer) diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs index f5b6e963e3..4f43e2a47c 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertLink.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -121,6 +121,15 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::umbraco.uicontrols.Pane pane_content; + /// + /// TreeControl2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Tree.TreeControl TreeControl2; + /// /// pane_media control. /// @@ -130,6 +139,15 @@ namespace umbraco.presentation.plugins.tinymce3 { /// protected global::umbraco.uicontrols.Pane pane_media; + /// + /// TreeControl1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.controls.Tree.TreeControl TreeControl1; + /// /// umbracoLink control. /// diff --git a/umbraco/presentation/umbraco/plugins/tinymce3/insertMacro.aspx b/umbraco/presentation/umbraco/plugins/tinymce3/insertMacro.aspx index a93e2c6fb4..9f063ef1a2 100644 --- a/umbraco/presentation/umbraco/plugins/tinymce3/insertMacro.aspx +++ b/umbraco/presentation/umbraco/plugins/tinymce3/insertMacro.aspx @@ -7,14 +7,13 @@ {#advlink_dlg.title} - - - -
-
-
-
-
- × -
- -
-
+ +
+
+ +
+
× +
+
+ + "); + this._getContainer().after(""); } return eval(msg.json); } @@ -540,8 +635,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); }, onBeforeRequest: function(NODE, TREE_OBJ) { + this._ensureContext(); + if (TREE_OBJ.settings.data.opts.method == "POST") { - var parameters = "{'app':'" + this._app + "','showContextMenu':'" + this._showContext + "', 'isDialog':'" + this._isDialog + "'}" + var parameters = "{'app':'" + this._app + "','showContextMenu':'" + this._showContext + "', 'isDialog':'" + this._isDialog + "', 'dialogMode':'" + this._dialogMode + "', 'treeType':'" + this._treeType + "', 'functionToCall':'" + this._functionToCall + "', 'nodeKey':'" + this._nodeKey + "'}" return parameters; } else { @@ -571,11 +668,11 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); this._debug("onLoad"); - this._container.show(); + this._getContainer().show(); //ensure the static data is gone this._tree.settings.data.opts.static = null; var _this = this; - _this._loadChildNodes($(_this._container).find("li"), null); + _this._loadChildNodes($(_this._getContainer()).find("li"), null); }, onBeforeMove: function(NODE, REF_NODE, TYPE, TREE_OBJ) { @@ -622,12 +719,18 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); onParse: function(STR, TREE_OBJ) { this._debug("onParse"); + this._ensureContext(); + var obj = $(STR); this._configureNodes(obj); //this will return the full html of the configured node return $('
').append($(obj).clone()).remove().html(); }, + onError: function(ERR, TREE_OBJ) { + this._debug("ERROR!!!!! " + ERR); + }, + _debug: function(strMsg) { if (this._isDebug) { Sys.Debug.trace("UmbracoTree: " + strMsg); @@ -653,7 +756,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); var rxInput = new RegExp("\\boverlay-\\w+\\b", "gi"); nodes.each(function() { //if it is checkbox tree (not standard), don't worry about overlays and remove the default icon. - if (_this._treeType != "standard") { + if (_this._treeMode != "standard") { $(this).children("a:first").css("background", ""); return; } @@ -709,7 +812,14 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); }); } }, - + _ensureContext: function() { + /// + /// ensure that the tree object always has the correct context. + /// this is a fix for the TinyMCE dialog window, as it tends to lose object context for some wacky reason + /// when ajax calls are made. Works fine in all other instances. + /// + this._tree.container = this._getContainer(); + }, _loadChildNodes: function(liNode, callback) { /// jsTree won't allow you to open a node that doesn't explitly have childen, this will force it to try /// a jquery object for the current li node @@ -785,59 +895,6 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); } }, - _init: function(jFullMenu, jInitNode, treeContainer, appActions, uiKeys, app, showContext, isDialog, treeType, serviceUrl, dataUrl, umbClientFolder, recycleBinId) { - /// initialization method, must be called on page ready. - /// JSON markup for the full context menu in accordance with the jsTree context menu object standard - /// JSON markup for the initial node to show - /// the jQuery element to be tree enabled - /// A reference to a MenuActions object - /// A reference to a uiKeys object - /// boolean indicating whether or not to show a context menu - /// boolean indicating whether or not the tree is in dialog mode - /// determines the type of tree: false/null = normal, 'checkbox' = checkboxes enabled, 'inheritedcheckbox' = parent nodes have checks inherited from children - /// Url path for the tree client service - /// Url path for the tree data service - /// Should be set externally!... the root to the umbraco_client folder - /// the id of the recycle bin for the current tree - - this._debug("_init: creating new tree with class/id: " + treeContainer.attr("class") + " / " + treeContainer.attr("id")); - - this._fullMenu = jFullMenu; - this._initNode = jInitNode; - this._appActions = appActions; - this._uiKeys = uiKeys; - this._app = app; - this._showContext = showContext; - this._isDialog = isDialog; - this._treeType = treeType; - this._serviceUrl = serviceUrl; - this._dataUrl = dataUrl; - this._umb_clientFolderRoot = umbClientFolder; - this._recycleBinId = recycleBinId; - - //wire up event handlers - if (this._appActions != null) { - var _this = this; - //wrapped functions maintain scope - this._appActions.addEventHandler("nodeDeleting", function(E) { _this.onNodeDeleting(E) }); - this._appActions.addEventHandler("nodeDeleted", function(E) { _this.onNodeDeleted(E) }); - this._appActions.addEventHandler("nodeRefresh", function(E) { _this.onNodeRefresh(E) }); - } - - //initializes the jsTree - this._container = treeContainer; - this._tree = $.tree.create(); - this._tree.init(this._container, this._getInitOptions()); - //this._tree.rename = this._umbracoRename; //replaces the jsTree rename method - - //add this app to the loaded apps array - //if ($.inArray(app, this._loadedApps) == -1) { - // this._loadedApps.push(app); - //} - - //load child nodes of the init node - //this._loadChildNodes(this._container.find("li:first"), null); - }, // _umbracoRename : function (obj) { // /// A modified version of the original jsTree rename method. We need to use our own since @@ -912,7 +969,9 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); var params = nodeSource.split("?")[1]; return this._dataUrl + "?" + params + "&rnd2=" + Umbraco.Utils.generateRandom(); }, - + _getContainer: function() { + return $("#" + this._containerId, this._context); + }, _getInitOptions: function(initData) { /// return the initialization objects for the tree @@ -937,7 +996,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); rtl: false, animation: false, hover_mode: true, - theme_path: this._umb_clientFolderRoot + "/Tree/Themes/", + theme_path: this._umbClientFolderRoot + "/Tree/Themes/", theme_name: "umbraco" }, langs: { @@ -954,7 +1013,8 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); onchange: function(N, T) { _this.onChange(N, T); }, ondata: function(D, T) { return _this.onJSONData(D, T); }, onload: function(T) { if (initData == null) _this.onLoad(T); }, - onparse: function(S, T) { return _this.onParse(S, T); } + onparse: function(S, T) { return _this.onParse(S, T); }, + error: function(E, T) { _this.onError(E, T); } }, plugins: { //UmbracoContext comes before context menu so that the events fire first @@ -965,7 +1025,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); contextmenu: {} } }; - if (this._treeType != "standard") { + if (this._treeMode != "standard") { options.plugins.checkbox = { three_state: false } } @@ -980,4 +1040,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); }; } + + // instance manager + Umbraco.Controls.UmbracoTree.cntr = 0; + Umbraco.Controls.UmbracoTree.inst = {}; + + })(jQuery); diff --git a/umbraco/presentation/umbraco_client/Tree/tree_component.js b/umbraco/presentation/umbraco_client/Tree/tree_component.js deleted file mode 100644 index 0d201cd213..0000000000 --- a/umbraco/presentation/umbraco_client/Tree/tree_component.js +++ /dev/null @@ -1,2315 +0,0 @@ -/* - * jsTree 0.9.8 - * http://jstree.com/ - * - * Copyright (c) 2009 Ivan Bozhanov (vakata.com) - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Date: 2009-05-15 - * - */ - -(function($) { - // jQuery plugin - $.fn.tree = function (opts) { - return this.each(function() { - var conf = $.extend({},opts); - if(tree_component.inst && tree_component.inst[$(this).attr('id')]) tree_component.inst[$(this).attr('id')].destroy(); - if(conf !== false) new tree_component().init(this, conf); - }); - }; - $.tree_create = function() { - return new tree_component(); - }; - $.tree_focused = function() { - return tree_component.inst[tree_component.focused]; - }; - $.tree_reference = function(id) { - return tree_component.inst[id] || null; - }; - - // rollback - $.tree_rollback = function(data) { - for(var i in data) { - if(typeof data[i] == "function") continue; - var tmp = tree_component.inst[i]; - var lock = !tmp.locked; - - // if not locked - lock the tree - if(lock) tmp.lock(true); - // Cancel ongoing rename - if(tmp.inp) tmp.inp.val("").blur(); - tmp.context.append = false; - tmp.container.html(data[i].html).find(".dragged").removeClass("dragged").end().find("div.context").remove(); - - if(data[i].selected) { - tmp.selected = $("#" + data[i].selected); - tmp.selected_arr = []; - tmp.container - .find("a.clicked").each( function () { - tmp.selected_arr.push(tmp.get_node(this)); - }); - } - // if this function set the lock - unlock - if(lock) tmp.lock(false); - - delete lock; - delete tmp; - } - }; - - // core - function tree_component () { - // instance manager - if(typeof tree_component.inst == "undefined") { - tree_component.cntr = 0; - tree_component.inst = {}; - - // DRAG'N'DROP STUFF - tree_component.drag_drop = { - isdown : false, // Is there a drag - drag_node : false, // The actual node - drag_help : false, // The helper - - init_x : false, - init_y : false, - moving : false, - - origin_tree : false, - marker : false, - - move_type : false, // before, after or inside - ref_node : false, // reference node - appended : false, // is helper appended - - foreign : false, // Is the dragged node a foreign one - droppable : [], // Array of classes that can be dropped onto the tree - - open_time : false, // Timeout for opening nodes - scroll_time : false // Timeout for scrolling - }; - // listening for clicks on foreign nodes - tree_component.mousedown = function(event) { - var tmp = $(event.target); - if(tree_component.drag_drop.droppable.length && tmp.is("." + tree_component.drag_drop.droppable.join(", .")) ) { - tree_component.drag_drop.drag_help = $(""); - tree_component.drag_drop.drag_node = tree_component.drag_drop.drag_help.find("li:eq(0)"); - tree_component.drag_drop.isdown = true; - tree_component.drag_drop.foreign = tmp; - tmp.blur(); - event.preventDefault(); - event.stopPropagation(); - return false; - } - event.stopPropagation(); - return true; - }; - tree_component.mouseup = function(event) { - var tmp = tree_component.drag_drop; - if(tmp.open_time) clearTimeout(tmp.open_time); - if(tmp.scroll_time) clearTimeout(tmp.scroll_time); - if(tmp.foreign === false && tmp.drag_node && tmp.drag_node.size()) { - tmp.drag_help.remove(); - if(tmp.move_type) { - var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")]; - if(tree1) tree1.moved(tmp.origin_tree.container.find("li.dragged"), tmp.ref_node, tmp.move_type, false, (tmp.origin_tree.settings.rules.drag_copy == "on" || (tmp.origin_tree.settings.rules.drag_copy == "ctrl" && event.ctrlKey) ) ); - } - tmp.move_type = false; - tmp.ref_node = false; - } - if(tmp.drag_node && tmp.foreign !== false) { - tmp.drag_help.remove(); - if(tmp.move_type) { - var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")]; - if(tree1) tree1.settings.callback.ondrop.call(null, tmp.foreign.get(0), tree1.get_node(tmp.ref_node).get(0), tmp.move_type, tree1); - } - tmp.foreign = false; - tmp.move_type = false; - tmp.ref_node = false; - } - // RESET EVERYTHING - tree_component.drag_drop.marker.hide(); - tmp.drag_help = false; - tmp.drag_node = false; - tmp.isdown = false; - tmp.init_x = false; - tmp.init_y = false; - tmp.moving = false; - tmp.appended = false; - $("li.dragged").removeClass("dragged"); - tmp.origin_tree = false; - event.preventDefault(); - event.stopPropagation(); - return false; - }; - tree_component.mousemove = function(event) { - var tmp = tree_component.drag_drop; - - if(tmp.isdown) { - if(!tmp.moving && Math.abs(tmp.init_x - event.pageX) < 5 && Math.abs(tmp.init_y - event.pageY) < 5) { - event.preventDefault(); - event.stopPropagation(); - return false; - } - else tree_component.drag_drop.moving = true; - - if(tmp.open_time) clearTimeout(tmp.open_time); - if(!tmp.appended) { - if(tmp.foreign !== false) tmp.origin_tree = $.tree_focused(); - $("body").append(tmp.drag_help); - tmp.w = tmp.drag_help.width(); - tmp.appended = true; - } - tmp.drag_help.css({ "left" : (event.pageX - (tmp.origin_tree.settings.ui.rtl ? tmp.w : -5 ) ), "top" : (event.pageY + 15) }); - - if(event.target.tagName == "IMG" && event.target.id == "marker") return false; - - var et = $(event.target); - var cnt = et.is(".tree") ? et : et.parents(".tree:eq(0)"); - - // if not moving over a tree - if(cnt.size() == 0 || !tree_component.inst[cnt.attr("id")]) { - if(tmp.scroll_time) clearTimeout(tmp.scroll_time); - if(tmp.drag_help.find("IMG").size() == 0) { - tmp.drag_help.find("li:eq(0)").append(""); - } - tmp.move_type = false; - tmp.ref_node = false; - tree_component.drag_drop.marker.hide(); - return false; - } - - var tree2 = tree_component.inst[cnt.attr("id")]; - tree2.off_height(); - - // if moving over another tree and multitree is false - if( tmp.foreign === false && tmp.origin_tree.container.get(0) != tree2.container.get(0) && (!tmp.origin_tree.settings.rules.multitree || !tree2.settings.rules.multitree) ) { - if(tmp.drag_help.find("IMG").size() == 0) { - tmp.drag_help.find("li:eq(0)").append(""); - } - tmp.move_type = false; - tmp.ref_node = false; - tree_component.drag_drop.marker.hide(); - return false; - } - - if(tmp.scroll_time) clearTimeout(tmp.scroll_time); - tmp.scroll_time = setTimeout( function() { tree2.scrollCheck(event.pageX,event.pageY); }, 50); - - var mov = false; - var st = cnt.scrollTop(); - - if(event.target.tagName == "A" ) { - // just in case if hover is over the draggable - if(et.is("#jstree-dragged")) return false; - if(tree2.get_node(event.target).hasClass("closed")) { - tmp.open_time = setTimeout( function () { tree2.open_branch(et); }, 500); - } - - var et_off = et.offset(); - var goTo = { - x : (et_off.left - 1), - y : (event.pageY - et_off.top) - }; - - if(cnt.children("ul:eq(0)").hasClass("rtl")) goTo.x += et.width() - 8; - var arr = []; - - if(goTo.y < tree2.li_height/3 + 1 ) arr = ["before","inside","after"]; - else if(goTo.y > tree2.li_height*2/3 - 1 ) arr = ["after","inside","before"]; - else { - if(goTo.y < tree2.li_height/2) arr = ["inside","before","after"]; - else arr = ["inside","after","before"]; - } - var ok = false; - $.each(arr, function(i, val) { - if(tree2.checkMove(tmp.origin_tree.container.find("li.dragged"), et, val)) { - mov = val; - ok = true; - return false; - } - }); - if(ok) { - switch(mov) { - case "before": - goTo.y = et_off.top - 2; - if(cnt.children("ul:eq(0)").hasClass("rtl")) { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker_rtl.gif").width(40); } - else { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker.gif").width(40); } - break; - case "after": - goTo.y = et_off.top - 2 + tree2.li_height; - if(cnt.children("ul:eq(0)").hasClass("rtl")) { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker_rtl.gif").width(40); } - else { tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "marker.gif").width(40); } - break; - case "inside": - goTo.x -= 2; - if(cnt.children("ul:eq(0)").hasClass("rtl")) { - goTo.x += 36; - } - goTo.y = et_off.top - 2 + tree2.li_height/2; - tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "plus.gif").width(11); - break; - } - tmp.move_type = mov; - tmp.ref_node = $(event.target); - tmp.drag_help.find("IMG").remove(); - tree_component.drag_drop.marker.css({ "left" : goTo.x , "top" : goTo.y }).show(); - } - } - - if( (et.is(".tree") || et.is("ul") ) && et.find("li:eq(0)").size() == 0) { - var et_off = et.offset(); - tmp.move_type = "inside"; - tmp.ref_node = cnt.children("ul:eq(0)"); - tmp.drag_help.find("IMG").remove(); - tree_component.drag_drop.marker.attr("src", tree2.settings.ui.theme_path + "plus.gif").width(11); - tree_component.drag_drop.marker.css({ "left" : et_off.left + ( cnt.children("ul:eq(0)").hasClass("rtl") ? (cnt.width() - 10) : 10 ) , "top" : et_off.top + 15 }).show(); - } - else if(event.target.tagName != "A" || !ok) { - if(tmp.drag_help.find("IMG").size() == 0) { - tmp.drag_help.find("li:eq(0)").append(""); - } - tmp.move_type = false; - tmp.ref_node = false; - tree_component.drag_drop.marker.hide(); - } - event.preventDefault(); - event.stopPropagation(); - return false; - } - return true; - }; - }; - return { - cntr : ++tree_component.cntr, - settings : { - data : { - type : "predefined", // ENUM [json, xml_flat, xml_nested, predefined] - method : "GET", // HOW TO REQUEST FILES - async : false, // BOOL - async loading onopen - async_data : function (NODE, TREE_OBJ) { return { id : $(NODE).attr("id") || 0 } }, // PARAMETERS PASSED TO SERVER - url : false, // FALSE or STRING - url to document to be used (async or not) - json : false, // FALSE or OBJECT if type is JSON and async is false - the tree dump as json - xml : false // FALSE or STRING if type is XML_FLAT or XML_NESTED and async is false - a string to generate the tree from - }, - selected : false, // FALSE or STRING or ARRAY - opened : [], // ARRAY OF INITIALLY OPENED NODES - languages : [], // ARRAY of string values (which will be used as CSS classes - so they must be valid) - path : false, // FALSE or STRING (if false - will be autodetected) - cookies : false, // FALSE or OBJECT (prefix, open, selected, opts - from jqCookie - expires, path, domain, secure) - ui : { - dots : true, // BOOL - dots or no dots - rtl : false, // BOOL - is the tree right-to-left - animation : 0, // INT - duration of open/close animations in miliseconds - hover_mode : true, // SHOULD get_* functions chage focus or change hovered item - scroll_spd : 4, - theme_path : false, // Path to themes - theme_name : "default",// Name of theme - context : [ - { - id : "create", - label : "Create", - icon : "create.png", - visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check("creatable", NODE); }, - action : function (NODE, TREE_OBJ) { TREE_OBJ.create(false, TREE_OBJ.get_node(NODE[0])); } - }, - "separator", - { - id : "rename", - label : "Rename", - icon : "rename.png", - visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check("renameable", NODE); }, - action : function (NODE, TREE_OBJ) { TREE_OBJ.rename(NODE); } - }, - { - id : "delete", - label : "Delete", - icon : "remove.png", - visible : function (NODE, TREE_OBJ) { var ok = true; $.each(NODE, function () { if(TREE_OBJ.check("deletable", this) == false) ok = false; return false; }); return ok; }, - action : function (NODE, TREE_OBJ) { $.each(NODE, function () { TREE_OBJ.remove(this); }); } - } - ] - }, - rules : { - multiple : false, // FALSE | CTRL | ON - multiple selection off/ with or without holding Ctrl - metadata : false, // FALSE or STRING - attribute name (use metadata plugin) - type_attr : "rel", // STRING attribute name (where is the type stored if no metadata) - multitree : false, // BOOL - is drag n drop between trees allowed - createat : "bottom", // STRING (top or bottom) new nodes get inserted at top or bottom - use_inline : false, // CHECK FOR INLINE RULES - REQUIRES METADATA - clickable : "all", // which node types can the user select | default - all - renameable : "all", // which node types can the user select | default - all - deletable : "all", // which node types can the user delete | default - all - creatable : "all", // which node types can the user create in | default - all - draggable : "none", // which node types can the user move | default - none | "all" - dragrules : "all", // what move operations between nodes are allowed | default - none | "all" - drag_copy : false, // FALSE | CTRL | ON - drag to copy off/ with or without holding Ctrl - droppable : [], - drag_button : "left" // left, right or both - }, - lang : { - new_node : "New folder", - loading : "Loading ..." - }, - callback : { // various callbacks to attach custom logic to - // before focus - should return true | false - beforechange: function(NODE,TREE_OBJ) { return true }, - beforeopen : function(NODE,TREE_OBJ) { return true }, - beforeclose : function(NODE,TREE_OBJ) { return true }, - // before move - should return true | false - beforemove : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true }, - // before create - should return true | false - beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true }, - // before rename - should return true | false - beforerename: function(NODE,LANG,TREE_OBJ) { return true }, - // before delete - should return true | false - beforedelete: function(NODE,TREE_OBJ) { return true }, - - onJSONdata : function(DATA,TREE_OBJ) { return DATA; }, - onselect : function(NODE,TREE_OBJ) { }, // node selected - ondeselect : function(NODE,TREE_OBJ) { }, // node deselected - onchange : function(NODE,TREE_OBJ) { }, // focus changed - onrename : function(NODE,LANG,TREE_OBJ,RB) { }, // node renamed ISNEW - TRUE|FALSE, current language - onmove : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // move completed (TYPE is BELOW|ABOVE|INSIDE) - oncopy : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // copy completed (TYPE is BELOW|ABOVE|INSIDE) - oncreate : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB) { }, // node created, parent node (TYPE is createat) - ondelete : function(NODE,TREE_OBJ,RB) { }, // node deleted - onopen : function(NODE,TREE_OBJ) { }, // node opened - onopen_all : function(TREE_OBJ) { }, // all nodes opened - onclose : function(NODE,TREE_OBJ) { }, // node closed - error : function(TEXT,TREE_OBJ) { }, // error occured - // double click on node - defaults to open/close & select - ondblclk : function(NODE,TREE_OBJ) { TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE); }, - // right click - to prevent use: EV.preventDefault(); EV.stopPropagation(); return false - onrgtclk : function(NODE,TREE_OBJ,EV) { }, - onload : function(TREE_OBJ) { }, - onfocus : function(TREE_OBJ) { }, - ondrop : function(NODE,REF_NODE,TYPE,TREE_OBJ) {} - } - }, - // INITIALIZATION - init : function(elem, conf) { - var _this = this; - this.container = $(elem); - if(this.container.size == 0) { alert("Invalid container node!"); return } - - tree_component.inst[this.cntr] = this; - if(!this.container.attr("id")) this.container.attr("id","jstree_" + this.cntr); - tree_component.inst[this.container.attr("id")] = tree_component.inst[this.cntr]; - tree_component.focused = this.cntr; - - var opts = $.extend({},conf); - - // MERGE OPTIONS WITH DEFAULTS - if(opts && opts.cookies) { - this.settings.cookies = $.extend({},this.settings.cookies,opts.cookies); - delete opts.cookies; - if(!this.settings.cookies.opts) this.settings.cookies.opts = {}; - } - if(opts && opts.callback) { - this.settings.callback = $.extend({},this.settings.callback,opts.callback); - delete opts.callback; - } - if(opts && opts.data) { - this.settings.data = $.extend({},this.settings.data,opts.data); - delete opts.data; - } - if(opts && opts.ui) { - this.settings.ui = $.extend({},this.settings.ui,opts.ui); - delete opts.ui; - } - if(opts && opts.rules) { - this.settings.rules = $.extend({},this.settings.rules,opts.rules); - delete opts.rules; - } - if(opts && opts.lang) { - this.settings.lang = $.extend({},this.settings.lang,opts.lang); - delete opts.lang; - } - this.settings = $.extend({},this.settings,opts); - - // PATH TO IMAGES AND XSL - if(this.settings.path == false) { - this.path = ""; - $("script").each( function () { - if(this.src.toString().match(/tree_component.*?js$/)) { - _this.path = this.src.toString().replace(/tree_component.*?js$/, ""); - } - }); - } - else this.path = this.settings.path; - - // DEAL WITH LANGUAGE VERSIONS - this.current_lang = this.settings.languages && this.settings.languages.length ? this.settings.languages[0] : false; - if(this.settings.languages && this.settings.languages.length) { - this.sn = get_sheet_num("tree_component.css"); - if(this.sn === false && document.styleSheets.length) this.sn = document.styleSheets.length; - var st = false; - var id = this.container.attr("id") ? "#" + this.container.attr("id") : ".tree"; - for(var ln = 0; ln < this.settings.languages.length; ln++) { - st = add_css(id + " ." + this.settings.languages[ln], this.sn); - if(st !== false) { - if(this.settings.languages[ln] == this.current_lang) st.style.display = ""; - else st.style.display = "none"; - } - } - } - - // DROPPABLES - if(this.settings.rules.droppable.length) { - for(var i in this.settings.rules.droppable) { - if(typeof this.settings.rules.droppable[i] == "function") continue; - tree_component.drag_drop.droppable.push(this.settings.rules.droppable[i]); - } - tree_component.drag_drop.droppable = $.unique(tree_component.drag_drop.droppable); - } - - // THEMES - if(this.settings.ui.theme_path === false) this.settings.ui.theme_path = this.path + "themes/"; - this.theme = this.settings.ui.theme_path; - if(_this.settings.ui.theme_name) { - this.theme += _this.settings.ui.theme_name + "/"; - if(_this.settings.ui.theme_name != "themeroller" && !tree_component.def_style) { add_sheet(_this.settings.ui.theme_path + "default/style.css"); tree_component.def_style = true; } - add_sheet(_this.theme + "style.css"); - } - - this.container.addClass("tree"); - if(_this.settings.ui.theme_name != "themeroller") this.container.addClass("tree-default"); - if(this.settings.ui.theme_name && this.settings.ui.theme_name != "default") this.container.addClass("tree-" + _this.settings.ui.theme_name); - if(this.settings.ui.theme_name == "themeroller") this.container.addClass("ui-widget ui-widget-content"); - if(this.settings.rules.multiple) this.selected_arr = []; - this.offset = false; - - // CONTEXT MENU - this.context_menu(); - - this.hovered = false; - this.locked = false; - - // CREATE DUMMY FOR MOVING - if(this.settings.rules.draggable != "none" && tree_component.drag_drop.marker === false) { - var _this = this; - tree_component.drag_drop.marker = $("") - .attr({ - id : "marker", - src : _this.settings.ui.theme_path + "marker.gif" - }) - .css({ - height : "5px", - width : "40px", - display : "block", - position : "absolute", - left : "30px", - top : "30px", - zIndex : "1000" - }).hide().appendTo("body"); - } - this.refresh(); - this.attachEvents(); - this.focus(); - }, - off_height : function () { - if(this.offset === false) { - this.container.css({ position : "relative" }); - this.offset = this.container.offset(); - var tmp = 0; - tmp = parseInt($.curCSS(this.container.get(0), "paddingTop", true),10); - if(tmp) this.offset.top += tmp; - tmp = parseInt($.curCSS(this.container.get(0), "borderTopWidth", true),10); - if(tmp) this.offset.top += tmp; - this.container.css({ position : "" }); - } - if(!this.li_height) { - var tmp = this.container.find("ul li.closed, ul li.leaf").eq(0); - this.li_height = tmp.height(); - if(tmp.children("ul:eq(0)").size()) this.li_height -= tmp.children("ul:eq(0)").height(); - if(!this.li_height) this.li_height = 18; - } - }, - context_menu : function () { - this.context = false; - if(this.settings.ui.context != false) { - var str = '
'; - for(var i in this.settings.ui.context) { - if(typeof this.settings.ui.context[i] == "function") continue; - if(this.settings.ui.context[i] == "separator") { - str += " "; - continue; - } - var icn = ""; - if(this.settings.ui.context[i].icon) icn = 'background-image:url(\'' + ( this.settings.ui.context[i].icon.indexOf("/") == -1 ? this.theme + this.settings.ui.context[i].icon : this.settings.ui.context[i].icon ) + '\');'; - str += '' + this.settings.ui.context[i].label + ''; - } - str += '
'; - this.context = $(str); - this.context.hide(); - this.context.append = false; - } - }, - // REPAINT TREE - refresh : function (obj) { - if(this.locked) return this.error("LOCKED"); - var _this = this; - - this.is_partial_refresh = obj ? true : false; - - // SAVE OPENED - this.opened = Array(); - if(this.settings.cookies && $.cookie(this.settings.cookies.prefix + '_open')) { - var str = $.cookie(this.settings.cookies.prefix + '_open'); - var tmp = str.split(","); - $.each(tmp, function () { - if(this.replace(/^#/,"").length > 0) { _this.opened.push("#" + this.replace(/^#/,"")); } - }); - this.settings.opened = false; - } - else if(this.settings.opened != false) { - $.each(this.settings.opened, function (i, item) { - if(this.replace(/^#/,"").length > 0) { _this.opened.push("#" + this.replace(/^#/,"")); } - }); - this.settings.opened = false; - } - else { - this.container.find("li.open").each(function (i) { if(this.id) { _this.opened.push("#" + this.id); } }); - } - - // SAVE SELECTED - if(this.selected) { - this.settings.selected = Array(); - if(obj) { - $(obj).find("li:has(a.clicked)").each(function () { - $this = $(this); - if($this.attr("id")) _this.settings.selected.push("#" + $this.attr("id")); - }); - } - else { - if(this.selected_arr) { - $.each(this.selected_arr, function () { - if(this.attr("id")) _this.settings.selected.push("#" + this.attr("id")); - }); - } - else { - if(this.selected.attr("id")) this.settings.selected.push("#" + this.selected.attr("id")); - } - } - } - else if(this.settings.cookies && $.cookie(this.settings.cookies.prefix + '_selected')) { - this.settings.selected = Array(); - var str = $.cookie(this.settings.cookies.prefix + '_selected'); - var tmp = str.split(","); - $.each(tmp, function () { - if(this.replace(/^#/,"").length > 0) { _this.settings.selected.push("#" + this.replace(/^#/,"")); } - }); - } - else if(this.settings.selected !== false) { - var tmp = Array(); - if((typeof this.settings.selected).toLowerCase() == "object") { - $.each(this.settings.selected, function () { - if(this.replace(/^#/,"").length > 0) tmp.push("#" + this.replace(/^#/,"")); - }); - } - else { - if(this.settings.selected.replace(/^#/,"").length > 0) tmp.push("#" + this.settings.selected.replace(/^#/,"")); - } - this.settings.selected = tmp; - } - - if(obj && this.settings.data.async) { - this.opened = Array(); - obj = this.get_node(obj); - obj.find("li.open").each(function (i) { _this.opened.push("#" + this.id); }); - if(obj.hasClass("open")) obj.removeClass("open").addClass("closed"); - if(obj.hasClass("leaf")) obj.removeClass("leaf"); - obj.children("ul:eq(0)").html(""); - return this.open_branch(obj, true, function () { _this.reselect.apply(_this); }); - } - - if(this.settings.data.type == "xml_flat" || this.settings.data.type == "xml_nested") { - this.scrtop = this.container.get(0).scrollTop; - var xsl = (this.settings.data.type == "xml_flat") ? "flat.xsl" : "nested.xsl"; - if(this.settings.data.xml) this.container.getTransform(this.path + xsl, this.settings.data.xml, { params : { theme_name : _this.settings.ui.theme_name, theme_path : _this.theme }, meth : _this.settings.data.method, dat : _this.settings.data.async_data.apply(_this,[obj, _this]), callback: function () { _this.context_menu.apply(_this); _this.reselect.apply(_this); } }); - else this.container.getTransform(this.path + xsl, this.settings.data.url, { params : { theme_name : _this.settings.ui.theme_name, theme_path : _this.theme }, meth : _this.settings.data.method, dat : _this.settings.data.async_data.apply(_this,[obj, _this]), callback: function () { _this.context_menu.apply(_this); _this.reselect.apply(_this); } }); - return; - } - else if(this.settings.data.type == "json") { - if(this.settings.data.json) { - var str = ""; - if(this.settings.data.json.length) { - for(var i = 0; i < this.settings.data.json.length; i++) { - str += this.parseJSON(this.settings.data.json[i]); - } - } else str = this.parseJSON(this.settings.data.json); - this.container.html("
    " + str + "
"); - this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed"); - this.container.find("li").not(".open").not(".closed").addClass("leaf"); - this.context_menu(); - this.reselect(); - } - else { - var _this = this; - $.ajax({ - type : this.settings.data.method, - url : this.settings.data.url, - data : this.settings.data.async_data(false, this), - dataType : "json", - success : function (data) { - data = _this.settings.callback.onJSONdata.call(null, data, _this); - var str = ""; - if(data.length) { - for(var i = 0; i < data.length; i++) { - str += _this.parseJSON(data[i]); - } - } else str = _this.parseJSON(data); - _this.container.html("
    " + str + "
"); - _this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed"); - _this.container.find("li").not(".open").not(".closed").addClass("leaf"); - _this.context_menu.apply(_this); - _this.reselect.apply(_this); - }, - error : function (xhttp, textStatus, errorThrown) { _this.error(errorThrown + " " + textStatus); } - }); - } - } - else { - this.container.children("ul:eq(0)"); - this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed"); - this.container.find("li").not(".open").not(".closed").addClass("leaf"); - this.reselect(); - } - }, - // CONVERT JSON TO HTML - parseJSON : function (data) { - if(!data || !data.data) return ""; - var str = ""; - str += "
  •  "; - } - str += ( (typeof data.data[this.settings.languages[i]].title).toLowerCase() != "undefined" ? data.data[this.settings.languages[i]].title : data.data[this.settings.languages[i]] ) + ""; - } - } - else { - var attr = {}; - attr["href"] = "#"; - attr["style"] = ""; - attr["class"] = ""; - if((typeof data.data.attributes).toLowerCase() != "undefined") { - for(var i in data.data.attributes) { - if(typeof data.data.attributes[i] == "function") continue; - if(i == "style" || i == "class") attr[i] += " " + data.data.attributes[i]; - else attr[i] = data.data.attributes[i]; - } - } - if(data.data.icon && this.settings.ui.theme_name != "themeroller") { - var icn = data.data.icon.indexOf("/") == -1 ? this.theme + data.data.icon : data.data.icon; - attr["style"] += " ; background-image:url('" + icn + "');"; - } - str += " "; - } - str += ( (typeof data.data.title).toLowerCase() != "undefined" ? data.data.title : data.data ) + ""; - } - if(data.children && data.children.length) { - str += '
      '; - for(var i = 0; i < data.children.length; i++) { - str += this.parseJSON(data.children[i]); - } - str += '
    '; - } - str += "
  • "; - return str; - }, - // getJSON from HTML - getJSON : function (nod, outer_attrib, inner_attrib, force) { - var _this = this; - if(!nod || $(nod).size() == 0) { - nod = this.container.children("ul").children("li"); - } - else nod = $(nod); - - if(nod.size() > 1) { - var arr = []; - nod.each(function () { - arr.push(_this.getJSON(this, outer_attrib, inner_attrib, force)); - }); - return arr; - } - - if(!outer_attrib) outer_attrib = [ "id", "rel", "class" ]; - if(!inner_attrib) inner_attrib = [ ]; - var obj = { attributes : {}, data : false }; - for(var i in outer_attrib) { - if(typeof outer_attrib[i] == "function") continue; - var val = (outer_attrib[i] == "class") ? nod.attr(outer_attrib[i]).replace("last","").replace("leaf","").replace("closed","").replace("open","") : nod.attr(outer_attrib[i]); - if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.attributes[outer_attrib[i]] = val; - delete val; - } - if(this.settings.languages.length) { - obj.data = {}; - for(var i in this.settings.languages) { - if(typeof this.settings.languages[i] == "function") continue; - var a = nod.children("a." + this.settings.languages[i]); - if(force || inner_attrib.length || a.get(0).style.backgroundImage.toString().length) { - obj.data[this.settings.languages[i]] = {}; - obj.data[this.settings.languages[i]].title = a.text(); - if(a.get(0).style.backgroundImage.length) { - obj.data[this.settings.languages[i]].icon = a.get(0).style.backgroundImage.replace("url(","").replace(")",""); - } - if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) { - var tmp = a.children("ins").attr("class"); - var cls = false; - $.each(tmp.split(" "), function (i, val) { - if(val.indexOf("ui-icon-") == 0) { - cls = val; - return false; - } - }); - if(cls) obj.data[this.settings.languages[i]].icon = cls; - } - if(inner_attrib.length) { - obj.data[this.settings.languages[i]].attributes = {}; - for(var j in inner_attrib) { - if(typeof inner_attrib[j] == "function") continue; - var val = a.attr(inner_attrib[j]); - if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.data[this.settings.languages[i]].attributes[inner_attrib[j]] = val; - delete val; - } - } - } - else { - obj.data[this.settings.languages[i]] = a.text(); - } - } - } - else { - var a = nod.children("a"); - if(force || inner_attrib.length || a.get(0).style.backgroundImage.toString().length) { - obj.data = {}; - obj.data.title = a.text(); - if(a.get(0).style.backgroundImage.length) { - obj.data.icon = a.get(0).style.backgroundImage.replace("url(","").replace(")",""); - } - if(this.settings.ui.theme_name == "themeroller" && a.children("ins").size()) { - var tmp = a.children("ins").attr("class"); - var cls = false; - $.each(tmp.split(" "), function (i, val) { - if(val.indexOf("ui-icon-") == 0) { - cls = val; - return false; - } - }); - if(cls) obj.data[this.settings.languages[i]].icon = cls; - } - if(inner_attrib.length) { - obj.data.attributes = {}; - for(var j in inner_attrib) { - if(typeof inner_attrib[j] == "function") continue; - var val = a.attr(inner_attrib[j]); - if(typeof val != "undefined" && val.replace(" ","").length > 0) obj.data.attributes[inner_attrib[j]] = val; - delete val; - } - } - } - else { - obj.data = a.text(); - } - } - - if(nod.children("ul").size() > 0) { - obj.children = []; - nod.children("ul").children("li").each(function () { - obj.children.push(_this.getJSON(this, outer_attrib, inner_attrib, force)); - }); - } - return obj; - }, - // getXML from HTML - getXML : function (tp, nod, outer_attrib, inner_attrib, cb) { - var _this = this; - if(tp != "flat") tp = "nested"; - if(!nod || $(nod).size() == 0) { - nod = this.container.children("ul").children("li"); - } - else nod = $(nod); - - if(nod.size() > 1) { - var obj = ''; - nod.each(function () { - obj += _this.getXML(tp, this, outer_attrib, inner_attrib, true); - }); - obj += ''; - return obj; - } - - if(!outer_attrib) outer_attrib = [ "id", "rel", "class" ]; - if(!inner_attrib) inner_attrib = [ ]; - var obj = ''; - - if(!cb) obj = ''; - - obj += ' 0) obj += ' ' + outer_attrib[i] + '="' + val + '" '; - delete val; - } - obj += '>'; - - obj += ''; - if(this.settings.languages.length) { - for(var i in this.settings.languages) { - if(typeof this.settings.languages[i] == "function") continue; - var a = nod.children("a." + this.settings.languages[i]); - obj += ' 0) obj += ' ' + inner_attrib[j] + '="' + val + '" '; - delete val; - } - } - } - obj += '>'; - } - } - else { - var a = nod.children("a"); - obj += ' 0) obj += ' ' + inner_attrib[j] + '="' + val + '" '; - delete val; - } - } - } - obj += '>'; - } - obj += ''; - - if(tp == "flat") obj += ''; - - if(nod.children("ul").size() > 0) { - nod.children("ul").children("li").each(function () { - obj += _this.getXML(tp, this, outer_attrib, inner_attrib, true); - }); - } - - if(tp == "nested") obj += ''; - - if(!cb) obj += ''; - return obj; - }, - focus : function () { - if(this.locked) return false; - if(tree_component.focused != this.cntr) { - tree_component.focused = this.cntr; - this.settings.callback.onfocus.call(null, this); - } - }, - show_context : function (obj) { - this.context.show(); - var tmp = $(obj).children("a:visible").offset(); - this.context.css({ "left" : (tmp.left), "top" : (tmp.top + parseInt(obj.children("a:visible").height()) + 2) }); - }, - hide_context : function () { - if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").removeClass("clicked"); - this.context.apply_to = false; - this.context.hide(); - }, - // ALL EVENTS - attachEvents : function () { - var _this = this; - - this.container - .bind("mousedown.jstree", function (event) { - if(tree_component.drag_drop.isdown) { - tree_component.drag_drop.move_type = false; - event.preventDefault(); - event.stopPropagation(); - event.stopImmediatePropagation(); - return false; - } - }) - .bind("mouseup.jstree", function (event) { - setTimeout( function() { _this.focus.apply(_this); }, 5); - }) - .bind("click.jstree", function (event) { - //event.stopPropagation(); - return true; - }); - $("#" + this.container.attr("id") + " li") - .live("click", function(event) { // WHEN CLICK IS ON THE ARROW - if(event.target.tagName != "LI") return true; - _this.off_height(); - if(event.pageY - $(event.target).offset().top > _this.li_height) return true; - _this.toggle_branch.apply(_this, [event.target]); - event.stopPropagation(); - return false; - }); - $("#" + this.container.attr("id") + " li a") - .live("click.jstree", function (event) { // WHEN CLICK IS ON THE TEXT OR ICON - if(event.which && event.which == 3) return true; - if(_this.locked) { - event.preventDefault(); - event.target.blur(); - return _this.error("LOCKED"); - } - _this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]); - if(_this.inp) { _this.inp.blur(); } - event.preventDefault(); - event.target.blur(); - return false; - }) - .live("dblclick.jstree", function (event) { // WHEN DOUBLECLICK ON TEXT OR ICON - if(_this.locked) { - event.preventDefault(); - event.stopPropagation(); - event.target.blur(); - return _this.error("LOCKED"); - } - _this.settings.callback.ondblclk.call(null, _this.get_node(event.target).get(0), _this); - event.preventDefault(); - event.stopPropagation(); - event.target.blur(); - }) - .live("contextmenu.jstree", function (event) { - if(_this.locked) { - event.target.blur(); - return _this.error("LOCKED"); - } - var val = _this.settings.callback.onrgtclk.call(null, _this.get_node(event.target).get(0), _this, event); - if(_this.context) { - if(_this.context.append == false) { - $("body").append(_this.context); - _this.context.append = true; - for(var i in _this.settings.ui.context) { - if(typeof _this.settings.ui.context[i] == "function") continue; - if(_this.settings.ui.context[i] == "separator") continue; - (function () { - var func = _this.settings.ui.context[i].action; - _this.context.children("[rel=" + _this.settings.ui.context[i].id +"]") - .bind("click", function (event) { - if(!$(this).hasClass("disabled")) { - func.call(null, _this.context.apply_to || null, _this); - _this.hide_context(); - } - event.stopPropagation(); - event.preventDefault(); - return false; - }) - .bind("mouseup", function (event) { - this.blur(); - if($(this).hasClass("disabled")) { - event.stopPropagation(); - event.preventDefault(); - return false; - } - }) - .bind("mousedown", function (event) { - event.stopPropagation(); - event.preventDefault(); - }); - })(); - } - } - var obj = _this.get_node(event.target); - if(_this.inp) { _this.inp.blur(); } - if(obj) { - if(!obj.children("a:eq(0)").hasClass("clicked")) { - // _this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]); - _this.context.apply_to = obj; - _this.context.to_remove = true; - _this.context.apply_to.children("a").addClass("clicked"); - event.target.blur(); - } - else { - _this.context.to_remove = false; - _this.context.apply_to = (_this.selected_arr && _this.selected_arr.length > 1) ? _this.selected_arr : _this.selected; - } - - _this.context.children("a").removeClass("disabled").show(); - var go = false; - for(var i in _this.settings.ui.context) { - if(typeof _this.settings.ui.context[i] == "function") continue; - if(_this.settings.ui.context[i] == "separator") continue; - var state = _this.settings.ui.context[i].visible.call(null, _this.context.apply_to, _this); - if(state === false) _this.context.children("[rel=" + _this.settings.ui.context[i].id +"]").addClass("disabled"); - if(state === -1) _this.context.children("[rel=" + _this.settings.ui.context[i].id +"]").hide(); - else go = true; - } - if(go == true) _this.show_context(obj); - event.preventDefault(); - event.stopPropagation(); - return false; - } - } - return val; - }) - .live("mouseover.jstree", function (event) { - if(_this.locked) { - event.preventDefault(); - event.stopPropagation(); - return _this.error("LOCKED"); - } - if( (_this.settings.ui.hover_mode || _this.settings.ui.theme_name == "themeroller" ) && _this.hovered !== false && event.target.tagName == "A") { - _this.hovered.children("a").removeClass("hover ui-state-hover"); - _this.hovered = false; - } - if(_this.settings.ui.theme_name == "themeroller") { - _this.hover_branch.apply(_this, [event.target]); - } - }); - if(_this.settings.ui.theme_name == "themeroller") { - $("#" + this.container.attr("id") + " li a").live("mouseout", function (event) { - if(_this.hovered) _this.hovered.children("a").removeClass("hover ui-state-hover"); - }); - } - - // ATTACH DRAG & DROP ONLY IF NEEDED - if(this.settings.rules.draggable != "none") { - $("#" + this.container.attr("id") + " li a") - .live("mousedown.jstree", function (event) { - if(_this.settings.rules.drag_button == "left" && event.which && event.which != 1) return true; - if(_this.settings.rules.drag_button == "right" && event.which && event.which != 3) return true; - _this.focus.apply(_this); - if(_this.locked) return _this.error("LOCKED"); - // SELECT LIST ITEM NODE - var obj = _this.get_node(event.target); - // IF ITEM IS DRAGGABLE - if(_this.settings.rules.multiple != false && _this.selected_arr.length > 1 && obj.children("a:eq(0)").hasClass("clicked")) { - var counter = 0; - for(var i in _this.selected_arr) { - if(typeof _this.selected_arr[i] == "function") continue; - if(_this.check("draggable", _this.selected_arr[i])) { - _this.selected_arr[i].addClass("dragged"); - tree_component.drag_drop.origin_tree = _this; - counter ++; - } - } - if(counter > 0) { - if(_this.check("draggable", obj)) tree_component.drag_drop.drag_node = obj; - else tree_component.drag_drop.drag_node = _this.container.find("li.dragged:eq(0)"); - tree_component.drag_drop.isdown = true; - tree_component.drag_drop.drag_help = $("
    ").append("
      "); - var tmp = $(tree_component.drag_drop.drag_node.get(0).cloneNode(true)); - if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide(); - tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp); - tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last").children("a").html("Multiple selection").end().children("ul").remove(); - } - } - else { - if(_this.check("draggable", obj)) { - tree_component.drag_drop.drag_node = obj; - tree_component.drag_drop.drag_help = $("
      ").append("
        "); - var tmp = $(obj.get(0).cloneNode(true)); - if(_this.settings.languages.length > 0) tmp.find("a").not("." + _this.current_lang).hide(); - tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp); - tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last"); - tree_component.drag_drop.isdown = true; - tree_component.drag_drop.foreign = false; - tree_component.drag_drop.origin_tree = _this; - obj.addClass("dragged"); - } - } - tree_component.drag_drop.init_x = event.pageX; - tree_component.drag_drop.init_y = event.pageY; - obj.blur(); - event.preventDefault(); - event.stopPropagation(); - return false; - }); - $(document) - .bind("mousedown.jstree", tree_component.mousedown) - .bind("mouseup.jstree", tree_component.mouseup) - .bind("mousemove.jstree", tree_component.mousemove); - } - // ENDIF OF DRAG & DROP FUNCTIONS - if(_this.context) $(document).bind("mousedown", function() { _this.hide_context(); }); - }, - checkMove : function (NODES, REF_NODE, TYPE) { - if(this.locked) return this.error("LOCKED"); - var _this = this; - - // OVER SELF OR CHILDREN - if(REF_NODE.parents("li.dragged").size() > 0 || REF_NODE.is(".dragged")) return this.error("MOVE: NODE OVER SELF"); - // CHECK AGAINST DRAG_RULES - if(NODES.size() == 1) { - var NODE = NODES.eq(0); - if(tree_component.drag_drop.foreign) { - if(this.settings.rules.droppable.length == 0) return false; - if(!NODE.is("." + this.settings.rules.droppable.join(", ."))) return false; - var ok = false; - for(var i in this.settings.rules.droppable) { - if(typeof this.settings.rules.droppable[i] == "function") continue; - if(NODE.is("." + this.settings.rules.droppable[i])) { - if(this.settings.rules.metadata) { - $.metadata.setType("attr", this.settings.rules.metadata); - NODE.attr(this.settings.rules.metadata, "type: '" + this.settings.rules.droppable[i] + "'"); - } - else { - NODE.attr(this.settings.rules.type_attr, this.settings.rules.droppable[i]); - } - ok = true; - break; - } - } - if(!ok) return false; - } - if(!this.check("dragrules", [NODE, TYPE, REF_NODE.parents("li:eq(0)")])) return this.error("MOVE: AGAINST DRAG RULES"); - } - else { - var ok = true; - NODES.each(function (i) { - if(ok == false) return false; - //if(i > 0) { - // var ref = NODES.eq( (i - 1) ); - // var mv = "after"; - //} - //else { - var ref = REF_NODE; - var mv = TYPE; - //} - if(!_this.check.apply(_this,["dragrules", [$(this), mv, ref]])) ok = false; - }); - if(ok == false) return this.error("MOVE: AGAINST DRAG RULES"); - } - // CHECK AGAINST METADATA - if(this.settings.rules.use_inline && this.settings.rules.metadata) { - var nd = false; - if(TYPE == "inside") nd = REF_NODE.parents("li:eq(0)"); - else nd = REF_NODE.parents("li:eq(1)"); - if(nd.size()) { - // VALID CHILDREN CHECK - if(typeof nd.metadata()["valid_children"] != "undefined") { - var tmp = nd.metadata()["valid_children"]; - var ok = true; - NODES.each(function (i) { - if(ok == false) return false; - if($.inArray(_this.get_type(this), tmp) == -1) ok = false; - }); - if(ok == false) return this.error("MOVE: NOT A VALID CHILD"); - } - // CHECK IF PARENT HAS FREE SLOTS FOR CHILDREN - if(typeof nd.metadata()["max_children"] != "undefined") { - if((nd.children("ul:eq(0)").children("li").not(".dragged").size() + NODES.size()) > nd.metadata().max_children) return this.error("MOVE: MAX CHILDREN REACHED"); - } - // CHECK FOR MAXDEPTH UP THE CHAIN - var incr = 0; - NODES.each(function (j) { - var i = 1; - var t = $(this); - while(i < 100) { - t = t.children("ul").children("li"); - if(t.size() == 0) break; - i ++ - } - incr = Math.max(i,incr); - }); - var ok = true; - - if((typeof $(nd).metadata().max_depth).toLowerCase() != "undefined" && $(nd).metadata().max_depth < incr) ok = false; - else { - nd.parents("li").each(function(i) { - if(ok == false) return false; - if((typeof $(this).metadata().max_depth).toLowerCase() != "undefined") { - if( (i + incr) >= $(this).metadata().max_depth) ok = false; - } - }); - } - if(ok == false) return this.error("MOVE: MAX_DEPTH REACHED"); - } - } - return true; - }, - // USED AFTER REFRESH - reselect : function (is_callback) { - var _this = this; - - if(!is_callback) this.cl_count = 0; - else this.cl_count --; - // REOPEN BRANCHES - if(this.opened && this.opened.length) { - var opn = false; - for(var j = 0; this.opened && j < this.opened.length; j++) { - if(this.settings.data.async) { - if(this.get_node(this.opened[j]).size() > 0) { - opn = true; - var tmp = this.opened[j]; - delete this.opened[j]; - this.open_branch(tmp, true, function () { _this.reselect.apply(_this, [true]); } ); - this.cl_count ++; - } - } - else this.open_branch(this.opened[j], true); - } - if(this.settings.data.async && opn) return; - delete this.opened; - } - if(this.cl_count > 0) return; - - // DOTS and RIGHT TO LEFT - if(this.settings.ui.rtl) this.container.css("direction","rtl").children("ul:eq(0)").addClass("rtl"); - else this.container.css("direction","ltr").children("ul:eq(0)").addClass("ltr"); - if(this.settings.ui.dots == false) this.container.children("ul:eq(0)").addClass("no_dots"); - - // REPOSITION SCROLL - if(this.scrtop) { - this.container.scrollTop(_this.scrtop); - delete this.scrtop; - } - // RESELECT PREVIOUSLY SELECTED - if(this.settings.selected !== false) { - $.each(this.settings.selected, function (i) { - if(_this.is_partial_refresh) _this.select_branch($(_this.settings.selected[i], _this.container), (_this.settings.rules.multiple !== false) ); - else _this.select_branch($(_this.settings.selected[i], _this.container), (_this.settings.rules.multiple !== false && i > 0) ); - }); - this.settings.selected = false; - } - if(this.settings.ui.theme_name == "themeroller") this.container.find("a").addClass("ui-state-default"); - this.settings.callback.onload.call(null, _this); - }, - // GET THE EXTENDED LI ELEMENT - get_node : function (obj) { - var obj = $(obj); - return obj.is("li") ? obj : obj.parents("li:eq(0)"); - }, - // GET THE TYPE OF THE NODE - get_type : function (obj) { - obj = !obj ? this.selected : this.get_node(obj); - if(!obj) return; - if(this.settings.rules.metadata) { - $.metadata.setType("attr", this.settings.rules.metadata); - var tmp = obj.metadata().type; - if(tmp) return tmp; - } - return obj.attr(this.settings.rules.type_attr); - }, - // SCROLL CONTAINER WHILE DRAGGING - scrollCheck : function (x,y) { - var _this = this; - var cnt = _this.container; - var off = _this.container.offset(); - - var st = cnt.scrollTop(); - var sl = cnt.scrollLeft(); - // DETECT HORIZONTAL SCROLL - var h_cor = (cnt.get(0).scrollWidth > cnt.width()) ? 40 : 20; - - if(y - off.top < 20) cnt.scrollTop(Math.max( (st - _this.settings.ui.scroll_spd) ,0)); // NEAR TOP - if(cnt.height() - (y - off.top) < h_cor) cnt.scrollTop(st + _this.settings.ui.scroll_spd); // NEAR BOTTOM - if(x - off.left < 20) cnt.scrollLeft(Math.max( (sl - _this.settings.ui.scroll_spd),0)); // NEAR LEFT - if(cnt.width() - (x - off.left) < 40) cnt.scrollLeft(sl + _this.settings.ui.scroll_spd); // NEAR RIGHT - - if(cnt.scrollLeft() != sl || cnt.scrollTop() != st) { - _this.moveType = false; - _this.moveRef = false; - tree_component.drag_drop.marker.hide(); - } - tree_component.drag_drop.scroll_time = setTimeout( function() { _this.scrollCheck(x,y); }, 50); - }, - check : function (rule, nodes) { - if(this.locked) return this.error("LOCKED"); - // CHECK LOCAL RULES IF METADATA - if(rule != "dragrules" && this.settings.rules.use_inline && this.settings.rules.metadata) { - $.metadata.setType("attr", this.settings.rules.metadata); - if(typeof this.get_node(nodes).metadata()[rule] != "undefined") return this.get_node(nodes).metadata()[rule]; - } - if(!this.settings.rules[rule]) return false; - if(this.settings.rules[rule] == "none") return false; - if(this.settings.rules[rule] == "all") return true; - - if(rule == "dragrules") { - var nds = new Array(); - nds[0] = this.get_type(nodes[0]); - nds[1] = nodes[1]; - nds[2] = this.get_type(nodes[2]); - for(var i = 0; i < this.settings.rules.dragrules.length; i++) { - var r = this.settings.rules.dragrules[i]; - var n = (r.indexOf("!") === 0) ? false : true; - if(!n) r = r.replace("!",""); - var tmp = r.split(" "); - for(var j = 0; j < 3; j++) { - if(tmp[j] == nds[j] || tmp[j] == "*") tmp[j] = true; - } - if(tmp[0] === true && tmp[1] === true && tmp[2] === true) return n; - } - return false; - } - else - return ($.inArray(this.get_type(nodes),this.settings.rules[rule]) != -1) ? true : false; - }, - hover_branch : function (obj) { - if(this.locked) return this.error("LOCKED"); - if(this.settings.ui.hover_mode == false && this.settings.ui.theme_name != "themeroller") return this.select_branch(obj); - var _this = this; - var obj = _this.get_node(obj); - if(!obj.size()) return this.error("HOVER: NOT A VALID NODE"); - // CHECK AGAINST RULES FOR SELECTABLE NODES - if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE"); - if(this.hovered) this.hovered.children("A").removeClass("hover ui-state-hover"); - - // SAVE NEWLY SELECTED - this.hovered = obj; - - // FOCUS NEW NODE AND OPEN ALL PARENT NODES IF CLOSED - this.hovered.children("a").removeClass("hover ui-state-hover").addClass( this.settings.ui.theme_name == "themeroller" ? "hover ui-state-hover" : "hover"); - - // SCROLL SELECTED NODE INTO VIEW - var off_t = this.hovered.offset().top; - var beg_t = this.container.offset().top; - var end_t = beg_t + this.container.height(); - var h_cor = (this.container.get(0).scrollWidth > this.container.width()) ? 40 : 20; - if(off_t + 5 < beg_t) this.container.scrollTop(this.container.scrollTop() - (beg_t - off_t + 5) ); - if(off_t + h_cor > end_t) this.container.scrollTop(this.container.scrollTop() + (off_t + h_cor - end_t) ); - }, - select_branch : function (obj, multiple) { - if(this.locked) return this.error("LOCKED"); - if(!obj && this.hovered !== false) obj = this.hovered; - var _this = this; - obj = _this.get_node(obj); - if(!obj.size()) return this.error("SELECT: NOT A VALID NODE"); - obj.children("a").removeClass("hover ui-state-hover"); - // CHECK AGAINST RULES FOR SELECTABLE NODES - if(!_this.check("clickable", obj)) return this.error("SELECT: NODE NOT SELECTABLE"); - if(_this.settings.callback.beforechange.call(null,obj.get(0),_this) === false) return this.error("SELECT: STOPPED BY USER"); - // IF multiple AND obj IS ALREADY SELECTED - DESELECT IT - if(this.settings.rules.multiple != false && multiple && obj.children("a.clicked").size() > 0) { - return this.deselect_branch(obj); - } - if(this.settings.rules.multiple != false && multiple) { - this.selected_arr.push(obj); - } - if(this.settings.rules.multiple != false && !multiple) { - for(var i in this.selected_arr) { - if(typeof this.selected_arr[i] == "function") continue; - this.selected_arr[i].children("A").removeClass("clicked ui-state-active"); - this.settings.callback.ondeselect.call(null, this.selected_arr[i].get(0), _this); - } - this.selected_arr = []; - this.selected_arr.push(obj); - if(this.selected && this.selected.children("A").hasClass("clicked")) { - this.selected.children("A").removeClass("clicked ui-state-active"); - this.settings.callback.ondeselect.call(null, this.selected.get(0), _this); - } - } - if(!this.settings.rules.multiple) { - if(this.selected) { - this.selected.children("A").removeClass("clicked ui-state-active"); - this.settings.callback.ondeselect.call(null, this.selected.get(0), _this); - } - } - // SAVE NEWLY SELECTED - this.selected = obj; - if( (this.settings.ui.hover_mode || this.settings.ui.theme_name == "themeroller") && this.hovered !== false) { - this.hovered.children("A").removeClass("hover ui-state-hover"); - this.hovered = obj; - } - - // FOCUS NEW NODE AND OPEN ALL PARENT NODES IF CLOSED - this.selected.children("a").removeClass("clicked ui-state-active").addClass( this.settings.ui.theme_name == "themeroller" ? "clicked ui-state-active" : "clicked").end().parents("li.closed").each( function () { _this.open_branch(this, true); }); - - // SCROLL SELECTED NODE INTO VIEW - var off_t = this.selected.offset().top; - var beg_t = this.container.offset().top; - var end_t = beg_t + this.container.height(); - var h_cor = (this.container.get(0).scrollWidth > this.container.width()) ? 40 : 20; - if(off_t + 5 < beg_t) this.container.scrollTop(this.container.scrollTop() - (beg_t - off_t + 5) ); - if(off_t + h_cor > end_t) this.container.scrollTop(this.container.scrollTop() + (off_t + h_cor - end_t) ); - - this.set_cookie("selected"); - this.settings.callback.onselect.call(null, this.selected.get(0), _this); - this.settings.callback.onchange.call(null, this.selected.get(0), _this); - }, - deselect_branch : function (obj) { - if(this.locked) return this.error("LOCKED"); - var _this = this; - var obj = this.get_node(obj); - obj.children("a").removeClass("clicked ui-state-active"); - this.settings.callback.ondeselect.call(null, obj.get(0), _this); - if(this.settings.rules.multiple != false && this.selected_arr.length > 1) { - this.selected_arr = []; - this.container.find("a.clicked").filter(":first-child").parent().each(function () { - _this.selected_arr.push($(this)); - }); - if(obj.get(0) == this.selected.get(0)) { - this.selected = this.selected_arr[0]; - this.set_cookie("selected"); - } - } - else { - if(this.settings.rules.multiple != false) this.selected_arr = []; - this.selected = false; - this.set_cookie("selected"); - } - if(this.selected) this.settings.callback.onchange.call(null, this.selected.get(0), _this); - else this.settings.callback.onchange.call(null, false, _this); - }, - toggle_branch : function (obj) { - if(this.locked) return this.error("LOCKED"); - var obj = this.get_node(obj); - if(obj.hasClass("closed")) return this.open_branch(obj); - if(obj.hasClass("open")) return this.close_branch(obj); - }, - open_branch : function (obj, disable_animation, callback) { - if(this.locked) return this.error("LOCKED"); - var obj = this.get_node(obj); - if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); - if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); - - if(this.settings.data.async && obj.find("li").size() == 0) { - if(this.settings.callback.beforeopen.call(null,obj.get(0),this) === false) return this.error("OPEN: STOPPED BY USER"); - var _this = this; - obj.children("ul:eq(0)").remove().end().append(""); - obj.removeClass("closed").addClass("open"); - if(this.settings.data.type == "xml_flat" || this.settings.data.type == "xml_nested") { - var xsl = (this.settings.data.type == "xml_flat") ? "flat.xsl" : "nested.xsl"; - obj.children("ul:eq(0)").getTransform(this.path + xsl, this.settings.data.url, { params : { theme_path : _this.theme }, meth : this.settings.data.method, dat : this.settings.data.async_data(obj, this), repl : true, - callback: function (str, json) { - if(str.length < 15) { - obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove(); - if(callback) callback.call(); - return; - } - _this.open_branch.apply(_this, [obj]); - if(callback) callback.call(); - }, - error : function () { obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove(); } - }); - } - else { - $.ajax({ - type : this.settings.data.method, - url : this.settings.data.url, - data : this.settings.data.async_data(obj, this), - dataType : "json", - success : function (data, textStatus) { - data = _this.settings.callback.onJSONdata.call(null, data, _this); - if(!data || data.length == 0) { - obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove(); - if(callback) callback.call(); - return; - } - var str = ""; - if(data.length) { - for(var i = 0; i < data.length; i++) { - str += _this.parseJSON(data[i]); - } - } - else str = _this.parseJSON(data); - if(str.length > 0) { - obj.children("ul:eq(0)").replaceWith("
          " + str + "
        "); - obj.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed"); - obj.find("li").not(".open").not(".closed").addClass("leaf"); - _this.open_branch.apply(_this, [obj]); - } - else obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove(); - if(callback) callback.call(); - }, - error : function (xhttp, textStatus, errorThrown) { obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove(); _this.error(errorThrown + " " + textStatus); } - }); - } - return true; - } - else { - if(!this.settings.data.async) { - if(this.settings.callback.beforeopen.call(null,obj.get(0),this) === false) return this.error("OPEN: STOPPED BY USER"); - } - if(this.settings.ui.theme_name == "themeroller") obj.find("a").not(".ui-state-default").addClass("ui-state-default"); - if(parseInt(this.settings.ui.animation) > 0 && !disable_animation ) { - obj.children("ul:eq(0)").css("display","none"); - obj.removeClass("closed").addClass("open"); - obj.children("ul:eq(0)").slideDown(parseInt(this.settings.ui.animation), function() { - $(this).css("display",""); - if(callback) callback.call(); - }); - } else { - obj.removeClass("closed").addClass("open"); - if(callback) callback.call(); - } - this.set_cookie("open"); - this.settings.callback.onopen.call(null, obj.get(0), this); - return true; - } - }, - close_branch : function (obj, disable_animation) { - if(this.locked) return this.error("LOCKED"); - var _this = this; - var obj = this.get_node(obj); - if(!obj.size()) return this.error("CLOSE: NO SUCH NODE"); - if(_this.settings.callback.beforeclose.call(null,obj.get(0),_this) === false) return this.error("CLOSE: STOPPED BY USER"); - if(parseInt(this.settings.ui.animation) > 0 && !disable_animation && obj.children("ul:eq(0)").size() == 1) { - obj.children("ul:eq(0)").slideUp(parseInt(this.settings.ui.animation), function() { - if(obj.hasClass("open")) obj.removeClass("open").addClass("closed"); - _this.set_cookie("open"); - $(this).css("display",""); - }); - } - else { - if(obj.hasClass("open")) obj.removeClass("open").addClass("closed"); - this.set_cookie("open"); - } - if(this.selected && obj.children("ul:eq(0)").find("a.clicked").size() > 0) { - obj.find("li:has(a.clicked)").each(function() { - _this.deselect_branch(this); - }); - if(obj.children("a.clicked").size() == 0) this.select_branch(obj, (this.settings.rules.multiple != false && this.selected_arr.length > 0) ); - } - this.settings.callback.onclose.call(null, obj.get(0), this); - }, - open_all : function (obj, callback) { - if(this.locked) return this.error("LOCKED"); - var _this = this; - obj = obj ? this.get_node(obj).parent() : this.container; - - var s = obj.find("li.closed").size(); - if(!callback) this.cl_count = 0; - else this.cl_count --; - if(s > 0) { - this.cl_count += s; - obj.find("li.closed").each( function () { var __this = this; _this.open_branch.apply(_this, [this, true, function() { _this.open_all.apply(_this, [__this, true]); } ]); }); - } - else if(this.cl_count == 0) this.settings.callback.onopen_all.call(null,this); - }, - close_all : function () { - if(this.locked) return this.error("LOCKED"); - var _this = this; - this.container.find("li.open").each( function () { _this.close_branch(this, true); }); - }, - show_lang : function (i) { - if(this.locked) return this.error("LOCKED"); - if(this.settings.languages[i] == this.current_lang) return true; - var st = false; - var id = this.container.attr("id") ? "#" + this.container.attr("id") : ".tree"; - st = get_css(id + " ." + this.current_lang, this.sn); - if(st !== false) st.style.display = "none"; - st = get_css(id + " ." + this.settings.languages[i], this.sn); - if(st !== false) st.style.display = ""; - this.current_lang = this.settings.languages[i]; - return true; - }, - cycle_lang : function() { - if(this.locked) return this.error("LOCKED"); - var i = $.inArray(this.current_lang, this.settings.languages); - i ++; - if(i > this.settings.languages.length - 1) i = 0; - this.show_lang(i); - }, - create : function (obj, ref_node, position) { - if(this.locked) return this.error("LOCKED"); - - var root = false; - if(ref_node == -1) { root = true; ref_node = this.container; } - else ref_node = ref_node ? this.get_node(ref_node) : this.selected; - - if(!root && (!ref_node || !ref_node.size())) return this.error("CREATE: NO NODE SELECTED"); - - var pos = position; - - var tmp = ref_node; // for type calculation - if(position == "before") { - position = ref_node.parent().children().index(ref_node); - ref_node = ref_node.parents("li:eq(0)"); - } - if(position == "after") { - position = ref_node.parent().children().index(ref_node) + 1; - ref_node = ref_node.parents("li:eq(0)"); - } - if(!root && ref_node.size() == 0) { root = true; ref_node = this.container; } - - if(!root) { - if(!this.check("creatable", ref_node)) return this.error("CREATE: CANNOT CREATE IN NODE"); - if(ref_node.hasClass("closed")) { - if(this.settings.data.async && ref_node.children("ul").size() == 0) { - var _this = this; - return this.open_branch(ref_node, true, function () { _this.create.apply(_this, [obj, ref_node, position]); } ); - } - else this.open_branch(ref_node, true); - } - } - - // creating new object to pass to parseJSON - var torename = false; - if(!obj) obj = {}; - else obj = $.extend(true, {}, obj); - if(!obj.attributes) obj.attributes = {}; - if(this.settings.rules.metadata) { - if(!obj.attributes[this.settings.rules.metadata]) obj.attributes[this.settings.rules.metadata] = '{ "type" : "' + (this.get_type(tmp) || "") + '" }'; - } - else { - if(!obj.attributes[this.settings.rules.type_attr]) obj.attributes[this.settings.rules.type_attr] = this.get_type(tmp) || ""; - } - if(this.settings.languages.length) { - if(!obj.data) { obj.data = {}; torename = true; } - for(var i = 0; i < this.settings.languages.length; i++) { - if(!obj.data[this.settings.languages[i]]) obj.data[this.settings.languages[i]] = ((typeof this.settings.lang.new_node).toLowerCase() != "string" && this.settings.lang.new_node[i]) ? this.settings.lang.new_node[i] : this.settings.lang.new_node; - } - } - else { - if(!obj.data) { obj.data = this.settings.lang.new_node; torename = true; } - } - - var $li = $(this.parseJSON(obj)); - if($li.children("ul").size()) { - if(!$li.is(".open")) $li.addClass("closed"); - } - else $li.addClass("leaf"); - $li.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed"); - $li.find("li").not(".open").not(".closed").addClass("leaf"); - - if(!root && this.settings.rules.use_inline && this.settings.rules.metadata) { - var t = this.get_type($li) || ""; - $.metadata.setType("attr", this.settings.rules.metadata); - if(typeof ref_node.metadata()["valid_children"] != "undefined") { - if($.inArray(t, ref_node.metadata()["valid_children"]) == -1) return this.error("CREATE: NODE NOT A VALID CHILD"); - } - if(typeof ref_node.metadata()["max_children"] != "undefined") { - if( (ref_node.children("ul:eq(0)").children("li").size() + 1) > ref_node.metadata().max_children) return this.error("CREATE: MAX_CHILDREN REACHED"); - } - var ok = true; - if((typeof $(ref_node).metadata().max_depth).toLowerCase() != "undefined" && $(ref_node).metadata().max_depth === 0) ok = false; - else { - ref_node.parents("li").each(function(i) { - if($(this).metadata().max_depth) { - if( (i + 1) >= $(this).metadata().max_depth) { - ok = false; - return false; - } - } - }); - } - if(!ok) return this.error("CREATE: MAX_DEPTH REACHED"); - } - - if((typeof position).toLowerCase() == "undefined" || position == "inside") - position = (this.settings.rules.createat == "top") ? 0 : ref_node.children("ul:eq(0)").children("li").size(); - if(ref_node.children("ul").size() == 0 || (root == true && ref_node.children("ul").children("li").size() == 0) ) { - if(!root) var a = this.moved($li,ref_node.children("a:eq(0)"),"inside", true); - else var a = this.moved($li,this.container.children("ul:eq(0)"),"inside", true); - } - else if(pos == "before" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true); - else if(pos == "after" && ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size()) - var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", true); - else if(ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true); - else - var a = this.moved($li,ref_node.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after",true); - - if(a === false) return this.error("CREATE: ABORTED"); - - if(torename) { - this.select_branch($li.children("a:eq(0)")); - this.rename(); - } - return $li; - }, - rename : function (obj) { - if(this.locked) return this.error("LOCKED"); - obj = obj ? this.get_node(obj) : this.selected; - var _this = this; - if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED"); - if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE"); - if(!this.settings.callback.beforerename.call(null,obj.get(0), _this.current_lang, _this)) return this.error("RENAME: STOPPED BY USER"); - - obj.parents("li.closed").each(function () { _this.open_branch(this) }); - if(this.current_lang) obj = obj.find("a." + this.current_lang).get(0); - else obj = obj.find("a:first").get(0); - last_value = obj.innerHTML; - _this.inp = $(""); - _this.inp - .val(last_value.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")) - .bind("mousedown", function (event) { event.stopPropagation(); }) - .bind("mouseup", function (event) { event.stopPropagation(); }) - .bind("click", function (event) { event.stopPropagation(); }) - .bind("keyup", function (event) { - var key = event.keyCode || event.which; - if(key == 27) { this.value = last_value; this.blur(); return } - if(key == 13) { this.blur(); return } - }); - - // Rollback - var rb = {}; - rb[this.container.attr("id")] = this.get_rollback(); - - _this.inp.blur(function(event) { - if(this.value == "") this.value = last_value; - $(obj).text( $(obj).parent().find("input").eq(0).attr("value") ).get(0).style.display = ""; - $(obj).prevAll("span").remove(); - _this.settings.callback.onrename.call(null, _this.get_node(obj).get(0), _this.current_lang, _this, rb); - _this.inp = false; - }); - var spn = $("").addClass(obj.className).append(_this.inp); - spn.attr("style", $(obj).attr("style")); - obj.style.display = "none"; - $(obj).parent().prepend(spn); - _this.inp.get(0).focus(); - _this.inp.get(0).select(); - }, - // REMOVE NODES - remove : function(obj) { - if(this.locked) return this.error("LOCKED"); - - // Rollback - var rb = {}; - rb[this.container.attr("id")] = this.get_rollback(); - - if(obj && (!this.selected || this.get_node(obj).get(0) != this.selected.get(0) )) { - obj = this.get_node(obj); - if(obj.size()) { - if(!this.check("deletable", obj)) return this.error("DELETE: NODE NOT DELETABLE"); - if(!this.settings.callback.beforedelete.call(null,obj.get(0), _this)) return this.error("DELETE: STOPPED BY USER"); - $parent = obj.parent(); - obj = obj.remove(); - $parent.children("li:last").addClass("last"); - if($parent.children("li").size() == 0) { - $li = $parent.parents("li:eq(0)"); - $li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove(); - this.set_cookie("open"); - } - this.settings.callback.ondelete.call(null, obj.get(0), this, rb); - } - } - else if(this.selected) { - if(!this.check("deletable", this.selected)) return this.error("DELETE: NODE NOT DELETABLE"); - if(!this.settings.callback.beforedelete.call(null,this.selected.get(0), _this)) return this.error("DELETE: STOPPED BY USER"); - $parent = this.selected.parent(); - var obj = this.selected; - if(this.settings.rules.multiple == false || this.selected_arr.length == 1) { - var stop = true; - var tmp = (this.selected.prev("li:eq(0)").size()) ? this.selected.prev("li:eq(0)") : this.selected.parents("li:eq(0)"); - // this.get_prev(true); - } - obj = obj.remove(); - $parent.children("li:last").addClass("last"); - if($parent.children("li").size() == 0) { - $li = $parent.parents("li:eq(0)"); - $li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove(); - this.set_cookie("open"); - } - //this.selected = false; - this.settings.callback.ondelete.call(null, obj.get(0), this, rb); - if(stop && tmp) this.select_branch(tmp); - if(this.settings.rules.multiple != false && !stop) { - var _this = this; - this.selected_arr = []; - this.container.find("a.clicked").filter(":first-child").parent().each(function () { - _this.selected_arr.push($(this)); - }); - if(this.selected_arr.length > 0) { - this.selected = this.selected_arr[0]; - this.remove(); - } - } - } - else return this.error("DELETE: NO NODE SELECTED"); - }, - - next : function (obj, strict) { - obj = this.get_node(obj); - if(!obj.size()) return false; - if(strict) return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; - - if(obj.hasClass("open")) return obj.find("li:eq(0)"); - else if(obj.nextAll("li").size() > 0) return obj.nextAll("li:eq(0)"); - else return obj.parents("li").next("li").eq(0); - }, - prev : function(obj, strict) { - obj = this.get_node(obj); - if(!obj.size()) return false; - if(strict) return (obj.prevAll("li").size() > 0) ? obj.prevAll("li:eq(0)") : false; - - if(obj.prev("li").size()) { - var obj = obj.prev("li").eq(0); - while(obj.hasClass("open")) obj = obj.children("ul:eq(0)").children("li:last"); - return obj; - } - else return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : false; - }, - parent : function(obj) { - obj = this.get_node(obj); - if(!obj.size()) return false; - return obj.parents("li:eq(0)").size() ? obj.parents("li:eq(0)") : false; - }, - children : function(obj) { - obj = this.get_node(obj); - if(!obj.size()) return false; - return obj.children("ul:eq(0)").children("li"); - }, - - // FOR EXPLORER-LIKE KEYBOARD SHORTCUTS - get_next : function(force) { - var obj = this.hovered || this.selected; - return force ? this.select_branch(this.next(obj)) : this.hover_branch(this.next(obj)); - }, - get_prev : function(force) { - var obj = this.hovered || this.selected; - return force ? this.select_branch(this.prev(obj)) : this.hover_branch(this.prev(obj)); - }, - get_left : function(force, rtl) { - if(this.settings.ui.rtl && !rtl) return this.get_right(force, true); - var obj = this.hovered || this.selected; - if(obj) { - if(obj.hasClass("open")) this.close_branch(obj); - else { - return force ? this.select_branch(this.parent(obj)) : this.hover_branch(this.parent(obj)); - } - } - }, - get_right : function(force, rtl) { - if(this.settings.ui.rtl && !rtl) return this.get_left(force, true); - var obj = this.hovered || this.selected; - if(obj) { - if(obj.hasClass("closed")) this.open_branch(obj); - else { - return force ? this.select_branch(obj.find("li:eq(0)")) : this.hover_branch(obj.find("li:eq(0)")); - } - } - }, - toggleDots : function () { - if(this.settings.ui.dots) { - this.settings.ui.dots = false; - this.container.children("ul:eq(0)").addClass("no_dots"); - } - else { - this.settings.ui.dots = true; - this.container.children("ul:eq(0)").removeClass("no_dots"); - } - }, - toggleRTL : function () { - if(this.settings.ui.rtl) { - this.settings.ui.rtl = false; - this.container.css("direction","ltr").children("ul:eq(0)").removeClass("rtl").addClass("ltr"); - } - else { - this.settings.ui.rtl = true; - this.container.css("direction","rtl").children("ul:eq(0)").removeClass("ltr").addClass("rtl"); - } - }, - set_cookie : function (type) { - if(this.settings.cookies === false) return false; - if(this.settings.cookies[type] === false) return false; - switch(type) { - case "selected": - if(this.settings.rules.multiple != false && this.selected_arr.length > 1) { - var val = Array(); - $.each(this.selected_arr, function () { - if(this.attr("id")) { val.push(this.attr("id")); } - }); - val = val.join(","); - } - else var val = this.selected ? this.selected.attr("id") : false; - $.cookie(this.settings.cookies.prefix + '_selected',val,this.settings.cookies.opts); - break; - case "open": - var str = ""; - this.container.find("li.open").each(function (i) { if(this.id) { str += this.id + ","; } }); - $.cookie(this.settings.cookies.prefix + '_open',str.replace(/,$/ig,""),this.settings.cookies.opts); - break; - } - }, - get_rollback : function () { - var rb = {}; - if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").removeClass("clicked"); - rb.html = this.container.html(); - if(this.context.to_remove && this.context.apply_to) this.context.apply_to.children("a").addClass("clicked"); - rb.selected = this.selected ? this.selected.attr("id") : false; - return rb; - }, - moved : function (what, where, how, is_new, is_copy, rb) { - var what = $(what); - var $parent = $(what).parents("ul:eq(0)"); - var $where = $(where); - - // Rollback - if(!rb) { - var rb = {}; - rb[this.container.attr("id")] = this.get_rollback(); - if(!is_new) { - var tmp = what.size() > 1 ? what.eq(0).parents(".tree:eq(0)") : what.parents(".tree:eq(0)"); - if(tmp.get(0) != this.container.get(0)) { - tmp = tree_component.inst[tmp.attr("id")]; - rb[tmp.container.attr("id")] = tmp.get_rollback(); - } - delete tmp; - } - } - - if(how == "inside" && this.settings.data.async && this.get_node($where).hasClass("closed")) { - var _this = this; - return this.open_branch(this.get_node($where), true, function () { _this.moved.apply(_this, [what, where, how, is_new, is_copy, rb]); }); - } - - // IF MULTIPLE - if(what.size() > 1) { - var _this = this; - var tmp = this.moved(what.eq(0), where, how, false, is_copy, rb); - what.each(function (i) { - if(i == 0) return; - if(tmp) { // if tmp is false - the previous move was a no-go - tmp = _this.moved(this, tmp.children("a:eq(0)"), "after", false, is_copy, rb); - } - }); - return; - } - - if(is_copy) { - _what = what.clone(); - _what.each(function (i) { - this.id = this.id + "_copy"; - $(this).find("li").each(function () { - this.id = this.id + "_copy"; - }); - $(this).removeClass("dragged").find("a.clicked").removeClass("clicked ui-state-active").end().find("li.dragged").removeClass("dragged"); - }); - } - else _what = what; - if(is_new) { - if(!this.settings.callback.beforecreate.call(null,this.get_node(what).get(0), this.get_node(where).get(0),how,this)) return false; - } - else { - if(!this.settings.callback.beforemove.call(null,this.get_node(what).get(0), this.get_node(where).get(0),how,this)) return false; - } - - if(!is_new) { - var tmp = what.parents(".tree:eq(0)"); - // if different trees - if(tmp.get(0) != this.container.get(0)) { - tmp = tree_component.inst[tmp.attr("id")]; - - // if there are languages - otherwise - no cleanup needed - if(tmp.settings.languages.length) { - var res = []; - // if new tree has no languages - use current visible - if(this.settings.languages.length == 0) res.push("." + tmp.current_lang); - else { - for(var i in this.settings.languages) { - if(typeof this.settings.languages[i] == "function") continue; - for(var j in tmp.settings.languages) { - if(typeof tmp.settings.languages[j] == "function") continue; - if(this.settings.languages[i] == tmp.settings.languages[j]) res.push("." + this.settings.languages[i]); - } - } - } - if(res.length == 0) return this.error("MOVE: NO COMMON LANGUAGES"); - what.find("a").not(res.join(",")).remove(); - } - what.find("a.clicked").removeClass("clicked ui-state-active"); - } - } - what = _what; - - // ADD NODE TO NEW PLACE - switch(how) { - case "before": - $where.parents("ul:eq(0)").children("li.last").removeClass("last"); - $where.parent().before(what.removeClass("last")); - $where.parents("ul:eq(0)").children("li:last").addClass("last"); - break; - case "after": - $where.parents("ul:eq(0)").children("li.last").removeClass("last"); - $where.parent().after(what.removeClass("last")); - $where.parents("ul:eq(0)").children("li:last").addClass("last"); - break; - case "inside": - if($where.parent().children("ul:first").size()) { - if(this.settings.rules.createat == "top") $where.parent().children("ul:first").prepend(what.removeClass("last")).children("li:last").addClass("last"); - else $where.parent().children("ul:first").children(".last").removeClass("last").end().append(what.removeClass("last")).children("li:last").addClass("last"); - } - else { - what.addClass("last"); - $where.parent().append("
          ").removeClass("leaf").addClass("closed"); - $where.parent().children("ul:first").prepend(what); - } - if($where.parent().hasClass("closed")) { this.open_branch($where); } - break; - default: - break; - } - // CLEANUP OLD PARENT - if($parent.find("li").size() == 0) { - var $li = $parent.parent(); - $li.removeClass("open").removeClass("closed").addClass("leaf"); - if(!$li.is(".tree")) $li.children("ul").remove(); - $li.parents("ul:eq(0)").children("li.last").removeClass("last").end().children("li:last").addClass("last"); - this.set_cookie("open"); - } - else { - $parent.children("li.last").removeClass("last"); - $parent.children("li:last").addClass("last"); - } - - // NO LONGER CORRECT WITH position PARAM - if(is_new && how != "inside") where = this.get_node(where).parents("li:eq(0)"); - if(is_copy) this.settings.callback.oncopy.call(null, this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb); - else if(is_new) this.settings.callback.oncreate.call(null, this.get_node(what).get(0), ($where.is("ul") ? -1 : this.get_node(where).get(0) ), how, this, rb); - else this.settings.callback.onmove.call(null, this.get_node(what).get(0), this.get_node(where).get(0), how, this, rb); - return what; - }, - error : function (code) { - this.settings.callback.error.call(null,code,this); - return false; - }, - lock : function (state) { - this.locked = state; - if(this.locked) this.container.children("ul:eq(0)").addClass("locked"); - else this.container.children("ul:eq(0)").removeClass("locked"); - }, - cut : function (obj) { - if(this.locked) return this.error("LOCKED"); - obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent(); - if(!obj || !obj.size()) return this.error("CUT: NO NODE SELECTED"); - this.copy_nodes = false; - this.cut_nodes = obj; - }, - copy : function (obj) { - if(this.locked) return this.error("LOCKED"); - obj = obj ? this.get_node(obj) : this.container.find("a.clicked").filter(":first-child").parent(); - if(!obj || !obj.size()) return this.error("COPY: NO NODE SELECTED"); - this.copy_nodes = obj; - this.cut_nodes = false; - }, - paste : function (obj, position) { - if(this.locked) return this.error("LOCKED"); - - var root = false; - if(obj == -1) { root = true; obj = this.container; } - else obj = obj ? this.get_node(obj) : this.selected; - - if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED"); - if(!this.copy_nodes && !this.cut_nodes) return this.error("PASTE: NOTHING TO DO"); - - var _this = this; - - var pos = position; - - if(position == "before") { - position = obj.parent().children().index(obj); - obj = obj.parents("li:eq(0)"); - } - else if(position == "after") { - position = obj.parent().children().index(obj) + 1; - obj = obj.parents("li:eq(0)"); - } - else if((typeof position).toLowerCase() == "undefined" || position == "inside") { - position = (this.settings.rules.createat == "top") ? 0 : obj.children("ul:eq(0)").children("li").size(); - } - if(!root && obj.size() == 0) { root = true; obj = this.container; } - - if(this.copy_nodes && this.copy_nodes.size()) { - var ok = true; - // This is copy - why forbid this? - //obj.parents().andSelf().each(function () { - // if(_this.copy_nodes.index(this) != -1) { - // ok = false; - // return false; - // } - //}); - if(!ok) return this.error("Invalid paste"); - if(!root && !this.checkMove(this.copy_nodes, obj.children("a:eq(0)"), "inside")) return false; - - if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) { - if(!root) var a = this.moved(this.copy_nodes,obj.children("a:eq(0)"),"inside", false, true); - else var a = this.moved(this.copy_nodes,this.container.children("ul:eq(0)"),"inside", false, true); - } - else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true); - else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size()) - var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", false, true); - else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true); - else - var a = this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after", false, true); - this.copy_nodes = false; - } - if(this.cut_nodes && this.cut_nodes.size()) { - var ok = true; - obj.parents().andSelf().each(function () { - if(_this.cut_nodes.index(this) != -1) { - ok = false; - return false; - } - }); - if(!ok) return this.error("Invalid paste"); - if(!root && !this.checkMove(this.cut_nodes, obj.children("a:eq(0)"), "inside")) return false; - - if(obj.children("ul").size() == 0 || (root == true && obj.children("ul").children("li").size() == 0) ) { - if(!root) var a = this.moved(this.cut_nodes,obj.children("a:eq(0)"),"inside"); - else var a = this.moved(this.cut_nodes,this.container.children("ul:eq(0)"),"inside"); - } - else if(pos == "before" && obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before"); - else if(pos == "after" && obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").size()) - var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after"); - else if(obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").size()) - var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before"); - else - var a = this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after"); - this.cut_nodes = false; - } - }, - search : function(str) { - var _this = this; - if(!str || (this.srch && str != this.srch) ) { - this.srch = ""; - this.srch_opn = false; - this.container.find("a.search").removeClass("search ui-state-highlight"); - } - this.srch = str; - if(!str) return; - if(this.settings.data.async) { - if(!this.srch_opn) { - var dd = $.extend( { "search" : str } , this.settings.data.async_data(false, this) ); - $.ajax({ - type : this.settings.data.method, - url : this.settings.data.url, - data : dd, - dataType : "text", - success : function (data) { - _this.srch_opn = $.unique(data.split(",")); - _this.search.apply(_this,[str]); - } - }); - } - else if(this.srch_opn.length) { - if(this.srch_opn && this.srch_opn.length) { - var opn = false; - for(var j = 0; j < this.srch_opn.length; j++) { - if(this.get_node("#" + this.srch_opn[j]).size() > 0) { - opn = true; - var tmp = "#" + this.srch_opn[j]; - delete this.srch_opn[j]; - this.open_branch(tmp, true, function () { _this.search.apply(_this,[str]); } ); - } - } - if(!opn) { - this.srch_opn = []; - _this.search.apply(_this,[str]); - } - } - } - else { - var selector = "a"; - // IF LANGUAGE VERSIONS - if(this.settings.languages.length) selector += "." + this.current_lang; - this.container.find(selector + ":contains('" + str + "')").addClass( this.settings.ui.theme_name == "themeroller" ? "search ui-state-highlight" : "search"); - this.srch_opn = false; - } - } - else { - var selector = "a"; - // IF LANGUAGE VERSIONS - if(this.settings.languages.length) selector += "." + this.current_lang; - this.container.find(selector + ":contains('" + str + "')").addClass( this.settings.ui.theme_name == "themeroller" ? "search ui-state-highlight" : "search").parents("li.closed").each( function () { _this.open_branch(this, true); }); - } - }, - - destroy : function() { - this.hide_context(); - this.container.unbind(".jstree"); - $("#" + this.container.attr("id")).die("click.jstree").die("dblclick.jstree").die("contextmenu.jstree").die("mouseover.jstree").die("mouseout.jstree").die("mousedown.jstree"); - this.container.removeClass("tree ui-widget ui-widget-content tree-default tree-" + this.settings.ui.theme_name).children("ul").removeClass("no_dots rtl ltr locked").find("li").removeClass("leaf").removeClass("open").removeClass("closed").removeClass("last").children("a").removeClass("clicked hover search ui-state-active ui-state-hover ui-state-highlight ui-state-default"); - - if(this.cntr == tree_component.focused) { - for(var i in tree_component.inst) { - if(i != this.cntr && i != this.container.attr("id")) { - tree_component.inst[i].focus(); - break; - } - } - } - - tree_component.inst[this.cntr] = false; - tree_component.inst[this.container.attr("id")] = false; - delete tree_component.inst[this.cntr]; - delete tree_component.inst[this.container.attr("id")]; - tree_component.cntr --; - } - } - }; -})(jQuery); \ No newline at end of file diff --git a/umbraco/presentation/umbraco_client/Tree/tree_component.min.js b/umbraco/presentation/umbraco_client/Tree/tree_component.min.js deleted file mode 100644 index 682704401a..0000000000 --- a/umbraco/presentation/umbraco_client/Tree/tree_component.min.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * jsTree 0.9.8 - * http://jstree.com/ - * - * Copyright (c) 2009 Ivan Bozhanov (vakata.com) - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Date: 2009-05-15 - * - */ -(function($){$.fn.tree=function(opts){return this.each(function(){var conf=$.extend({},opts);if(tree_component.inst&&tree_component.inst[$(this).attr('id')])tree_component.inst[$(this).attr('id')].destroy();if(conf!==false)new tree_component().init(this,conf)})};$.tree_create=function(){return new tree_component()};$.tree_focused=function(){return tree_component.inst[tree_component.focused]};$.tree_reference=function(id){return tree_component.inst[id]||null};$.tree_rollback=function(data){for(var i in data){if(typeof data[i]=="function")continue;var tmp=tree_component.inst[i];var lock=!tmp.locked;if(lock)tmp.lock(true);if(tmp.inp)tmp.inp.val("").blur();tmp.context.append=false;tmp.container.html(data[i].html).find(".dragged").removeClass("dragged").end().find("div.context").remove();if(data[i].selected){tmp.selected=$("#"+data[i].selected);tmp.selected_arr=[];tmp.container.find("a.clicked").each(function(){tmp.selected_arr.push(tmp.get_node(this))})}if(lock)tmp.lock(false);delete lock;delete tmp}};function tree_component(){if(typeof tree_component.inst=="undefined"){tree_component.cntr=0;tree_component.inst={};tree_component.drag_drop={isdown:false,drag_node:false,drag_help:false,init_x:false,init_y:false,moving:false,origin_tree:false,marker:false,move_type:false,ref_node:false,appended:false,foreign:false,droppable:[],open_time:false,scroll_time:false};tree_component.mousedown=function(event){var tmp=$(event.target);if(tree_component.drag_drop.droppable.length&&tmp.is("."+tree_component.drag_drop.droppable.join(", ."))){tree_component.drag_drop.drag_help=$("");tree_component.drag_drop.drag_node=tree_component.drag_drop.drag_help.find("li:eq(0)");tree_component.drag_drop.isdown=true;tree_component.drag_drop.foreign=tmp;tmp.blur();event.preventDefault();event.stopPropagation();return false}event.stopPropagation();return true};tree_component.mouseup=function(event){var tmp=tree_component.drag_drop;if(tmp.open_time)clearTimeout(tmp.open_time);if(tmp.scroll_time)clearTimeout(tmp.scroll_time);if(tmp.foreign===false&&tmp.drag_node&&tmp.drag_node.size()){tmp.drag_help.remove();if(tmp.move_type){var tree1=tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];if(tree1)tree1.moved(tmp.origin_tree.container.find("li.dragged"),tmp.ref_node,tmp.move_type,false,(tmp.origin_tree.settings.rules.drag_copy=="on"||(tmp.origin_tree.settings.rules.drag_copy=="ctrl"&&event.ctrlKey)))}tmp.move_type=false;tmp.ref_node=false}if(tmp.drag_node&&tmp.foreign!==false){tmp.drag_help.remove();if(tmp.move_type){var tree1=tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")];if(tree1)tree1.settings.callback.ondrop.call(null,tmp.foreign.get(0),tree1.get_node(tmp.ref_node).get(0),tmp.move_type,tree1)}tmp.foreign=false;tmp.move_type=false;tmp.ref_node=false}tree_component.drag_drop.marker.hide();tmp.drag_help=false;tmp.drag_node=false;tmp.isdown=false;tmp.init_x=false;tmp.init_y=false;tmp.moving=false;tmp.appended=false;$("li.dragged").removeClass("dragged");tmp.origin_tree=false;event.preventDefault();event.stopPropagation();return false};tree_component.mousemove=function(event){var tmp=tree_component.drag_drop;if(tmp.isdown){if(!tmp.moving&&Math.abs(tmp.init_x-event.pageX)<5&&Math.abs(tmp.init_y-event.pageY)<5){event.preventDefault();event.stopPropagation();return false}else tree_component.drag_drop.moving=true;if(tmp.open_time)clearTimeout(tmp.open_time);if(!tmp.appended){if(tmp.foreign!==false)tmp.origin_tree=$.tree_focused();$("body").append(tmp.drag_help);tmp.w=tmp.drag_help.width();tmp.appended=true}tmp.drag_help.css({"left":(event.pageX-(tmp.origin_tree.settings.ui.rtl?tmp.w:-5)),"top":(event.pageY+15)});if(event.target.tagName=="IMG"&&event.target.id=="marker")return false;var et=$(event.target);var cnt=et.is(".tree")?et:et.parents(".tree:eq(0)");if(cnt.size()==0||!tree_component.inst[cnt.attr("id")]){if(tmp.scroll_time)clearTimeout(tmp.scroll_time);if(tmp.drag_help.find("IMG").size()==0){tmp.drag_help.find("li:eq(0)").append("")}tmp.move_type=false;tmp.ref_node=false;tree_component.drag_drop.marker.hide();return false}var tree2=tree_component.inst[cnt.attr("id")];tree2.off_height();if(tmp.foreign===false&&tmp.origin_tree.container.get(0)!=tree2.container.get(0)&&(!tmp.origin_tree.settings.rules.multitree||!tree2.settings.rules.multitree)){if(tmp.drag_help.find("IMG").size()==0){tmp.drag_help.find("li:eq(0)").append("")}tmp.move_type=false;tmp.ref_node=false;tree_component.drag_drop.marker.hide();return false}if(tmp.scroll_time)clearTimeout(tmp.scroll_time);tmp.scroll_time=setTimeout(function(){tree2.scrollCheck(event.pageX,event.pageY)},50);var mov=false;var st=cnt.scrollTop();if(event.target.tagName=="A"){if(et.is("#jstree-dragged"))return false;if(tree2.get_node(event.target).hasClass("closed")){tmp.open_time=setTimeout(function(){tree2.open_branch(et)},500)}var et_off=et.offset();var goTo={x:(et_off.left-1),y:(event.pageY-et_off.top)};if(cnt.children("ul:eq(0)").hasClass("rtl"))goTo.x+=et.width()-8;var arr=[];if(goTo.ytree2.li_height*2/3-1)arr=["after","inside","before"];else{if(goTo.y")}tmp.move_type=false;tmp.ref_node=false;tree_component.drag_drop.marker.hide()}event.preventDefault();event.stopPropagation();return false}return true}};return{cntr:++tree_component.cntr,settings:{data:{type:"predefined",method:"GET",async:false,async_data:function(NODE,TREE_OBJ){return{id:$(NODE).attr("id")||0}},url:false,json:false,xml:false},selected:false,opened:[],languages:[],path:false,cookies:false,ui:{dots:true,rtl:false,animation:0,hover_mode:true,scroll_spd:4,theme_path:false,theme_name:"default",context:[{id:"create",label:"Create",icon:"create.png",visible:function(NODE,TREE_OBJ){if(NODE.length!=1)return false;return TREE_OBJ.check("creatable",NODE)},action:function(NODE,TREE_OBJ){TREE_OBJ.create(false,TREE_OBJ.get_node(NODE[0]))}},"separator",{id:"rename",label:"Rename",icon:"rename.png",visible:function(NODE,TREE_OBJ){if(NODE.length!=1)return false;return TREE_OBJ.check("renameable",NODE)},action:function(NODE,TREE_OBJ){TREE_OBJ.rename(NODE)}},{id:"delete",label:"Delete",icon:"remove.png",visible:function(NODE,TREE_OBJ){var ok=true;$.each(NODE,function(){if(TREE_OBJ.check("deletable",this)==false)ok=false;return false});return ok},action:function(NODE,TREE_OBJ){$.each(NODE,function(){TREE_OBJ.remove(this)})}}]},rules:{multiple:false,metadata:false,type_attr:"rel",multitree:false,createat:"bottom",use_inline:false,clickable:"all",renameable:"all",deletable:"all",creatable:"all",draggable:"none",dragrules:"all",drag_copy:false,droppable:[],drag_button:"left"},lang:{new_node:"New folder",loading:"Loading ..."},callback:{beforechange:function(NODE,TREE_OBJ){return true},beforeopen:function(NODE,TREE_OBJ){return true},beforeclose:function(NODE,TREE_OBJ){return true},beforemove:function(NODE,REF_NODE,TYPE,TREE_OBJ){return true},beforecreate:function(NODE,REF_NODE,TYPE,TREE_OBJ){return true},beforerename:function(NODE,LANG,TREE_OBJ){return true},beforedelete:function(NODE,TREE_OBJ){return true},onJSONdata:function(DATA,TREE_OBJ){return DATA},onselect:function(NODE,TREE_OBJ){},ondeselect:function(NODE,TREE_OBJ){},onchange:function(NODE,TREE_OBJ){},onrename:function(NODE,LANG,TREE_OBJ,RB){},onmove:function(NODE,REF_NODE,TYPE,TREE_OBJ,RB){},oncopy:function(NODE,REF_NODE,TYPE,TREE_OBJ,RB){},oncreate:function(NODE,REF_NODE,TYPE,TREE_OBJ,RB){},ondelete:function(NODE,TREE_OBJ,RB){},onopen:function(NODE,TREE_OBJ){},onopen_all:function(TREE_OBJ){},onclose:function(NODE,TREE_OBJ){},error:function(TEXT,TREE_OBJ){},ondblclk:function(NODE,TREE_OBJ){TREE_OBJ.toggle_branch.call(TREE_OBJ,NODE);TREE_OBJ.select_branch.call(TREE_OBJ,NODE)},onrgtclk:function(NODE,TREE_OBJ,EV){},onload:function(TREE_OBJ){},onfocus:function(TREE_OBJ){},ondrop:function(NODE,REF_NODE,TYPE,TREE_OBJ){}}},init:function(elem,conf){var _this=this;this.container=$(elem);if(this.container.size==0){alert("Invalid container node!");return}tree_component.inst[this.cntr]=this;if(!this.container.attr("id"))this.container.attr("id","jstree_"+this.cntr);tree_component.inst[this.container.attr("id")]=tree_component.inst[this.cntr];tree_component.focused=this.cntr;var opts=$.extend({},conf);if(opts&&opts.cookies){this.settings.cookies=$.extend({},this.settings.cookies,opts.cookies);delete opts.cookies;if(!this.settings.cookies.opts)this.settings.cookies.opts={}}if(opts&&opts.callback){this.settings.callback=$.extend({},this.settings.callback,opts.callback);delete opts.callback}if(opts&&opts.data){this.settings.data=$.extend({},this.settings.data,opts.data);delete opts.data}if(opts&&opts.ui){this.settings.ui=$.extend({},this.settings.ui,opts.ui);delete opts.ui}if(opts&&opts.rules){this.settings.rules=$.extend({},this.settings.rules,opts.rules);delete opts.rules}if(opts&&opts.lang){this.settings.lang=$.extend({},this.settings.lang,opts.lang);delete opts.lang}this.settings=$.extend({},this.settings,opts);if(this.settings.path==false){this.path="";$("script").each(function(){if(this.src.toString().match(/tree_component.*?js$/)){_this.path=this.src.toString().replace(/tree_component.*?js$/,"")}})}else this.path=this.settings.path;this.current_lang=this.settings.languages&&this.settings.languages.length?this.settings.languages[0]:false;if(this.settings.languages&&this.settings.languages.length){this.sn=get_sheet_num("tree_component.css");if(this.sn===false&&document.styleSheets.length)this.sn=document.styleSheets.length;var st=false;var id=this.container.attr("id")?"#"+this.container.attr("id"):".tree";for(var ln=0;ln").attr({id:"marker",src:_this.settings.ui.theme_path+"marker.gif"}).css({height:"5px",width:"40px",display:"block",position:"absolute",left:"30px",top:"30px",zIndex:"1000"}).hide().appendTo("body")}this.refresh();this.attachEvents();this.focus()},off_height:function(){if(this.offset===false){this.container.css({position:"relative"});this.offset=this.container.offset();var tmp=0;tmp=parseInt($.curCSS(this.container.get(0),"paddingTop",true),10);if(tmp)this.offset.top+=tmp;tmp=parseInt($.curCSS(this.container.get(0),"borderTopWidth",true),10);if(tmp)this.offset.top+=tmp;this.container.css({position:""})}if(!this.li_height){var tmp=this.container.find("ul li.closed, ul li.leaf").eq(0);this.li_height=tmp.height();if(tmp.children("ul:eq(0)").size())this.li_height-=tmp.children("ul:eq(0)").height();if(!this.li_height)this.li_height=18}},context_menu:function(){this.context=false;if(this.settings.ui.context!=false){var str='
          ';for(var i in this.settings.ui.context){if(typeof this.settings.ui.context[i]=="function")continue;if(this.settings.ui.context[i]=="separator"){str+=" ";continue}var icn="";if(this.settings.ui.context[i].icon)icn='background-image:url(\''+(this.settings.ui.context[i].icon.indexOf("/")==-1?this.theme+this.settings.ui.context[i].icon:this.settings.ui.context[i].icon)+'\');';str+=''+this.settings.ui.context[i].label+''}str+='
          ';this.context=$(str);this.context.hide();this.context.append=false}},refresh:function(obj){if(this.locked)return this.error("LOCKED");var _this=this;this.is_partial_refresh=obj?true:false;this.opened=Array();if(this.settings.cookies&&$.cookie(this.settings.cookies.prefix+'_open')){var str=$.cookie(this.settings.cookies.prefix+'_open');var tmp=str.split(",");$.each(tmp,function(){if(this.replace(/^#/,"").length>0){_this.opened.push("#"+this.replace(/^#/,""))}});this.settings.opened=false}else if(this.settings.opened!=false){$.each(this.settings.opened,function(i,item){if(this.replace(/^#/,"").length>0){_this.opened.push("#"+this.replace(/^#/,""))}});this.settings.opened=false}else{this.container.find("li.open").each(function(i){if(this.id){_this.opened.push("#"+this.id)}})}if(this.selected){this.settings.selected=Array();if(obj){$(obj).find("li:has(a.clicked)").each(function(){$this=$(this);if($this.attr("id"))_this.settings.selected.push("#"+$this.attr("id"))})}else{if(this.selected_arr){$.each(this.selected_arr,function(){if(this.attr("id"))_this.settings.selected.push("#"+this.attr("id"))})}else{if(this.selected.attr("id"))this.settings.selected.push("#"+this.selected.attr("id"))}}}else if(this.settings.cookies&&$.cookie(this.settings.cookies.prefix+'_selected')){this.settings.selected=Array();var str=$.cookie(this.settings.cookies.prefix+'_selected');var tmp=str.split(",");$.each(tmp,function(){if(this.replace(/^#/,"").length>0){_this.settings.selected.push("#"+this.replace(/^#/,""))}})}else if(this.settings.selected!==false){var tmp=Array();if((typeof this.settings.selected).toLowerCase()=="object"){$.each(this.settings.selected,function(){if(this.replace(/^#/,"").length>0)tmp.push("#"+this.replace(/^#/,""))})}else{if(this.settings.selected.replace(/^#/,"").length>0)tmp.push("#"+this.settings.selected.replace(/^#/,""))}this.settings.selected=tmp}if(obj&&this.settings.data.async){this.opened=Array();obj=this.get_node(obj);obj.find("li.open").each(function(i){_this.opened.push("#"+this.id)});if(obj.hasClass("open"))obj.removeClass("open").addClass("closed");if(obj.hasClass("leaf"))obj.removeClass("leaf");obj.children("ul:eq(0)").html("");return this.open_branch(obj,true,function(){_this.reselect.apply(_this)})}if(this.settings.data.type=="xml_flat"||this.settings.data.type=="xml_nested"){this.scrtop=this.container.get(0).scrollTop;var xsl=(this.settings.data.type=="xml_flat")?"flat.xsl":"nested.xsl";if(this.settings.data.xml)this.container.getTransform(this.path+xsl,this.settings.data.xml,{params:{theme_name:_this.settings.ui.theme_name,theme_path:_this.theme},meth:_this.settings.data.method,dat:_this.settings.data.async_data.apply(_this,[obj,_this]),callback:function(){_this.context_menu.apply(_this);_this.reselect.apply(_this)}});else this.container.getTransform(this.path+xsl,this.settings.data.url,{params:{theme_name:_this.settings.ui.theme_name,theme_path:_this.theme},meth:_this.settings.data.method,dat:_this.settings.data.async_data.apply(_this,[obj,_this]),callback:function(){_this.context_menu.apply(_this);_this.reselect.apply(_this)}});return}else if(this.settings.data.type=="json"){if(this.settings.data.json){var str="";if(this.settings.data.json.length){for(var i=0;i"+str+"
        ");this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");this.container.find("li").not(".open").not(".closed").addClass("leaf");this.context_menu();this.reselect()}else{var _this=this;$.ajax({type:this.settings.data.method,url:this.settings.data.url,data:this.settings.data.async_data(false,this),dataType:"json",success:function(data){data=_this.settings.callback.onJSONdata.call(null,data,_this);var str="";if(data.length){for(var i=0;i"+str+"
      ");_this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");_this.container.find("li").not(".open").not(".closed").addClass("leaf");_this.context_menu.apply(_this);_this.reselect.apply(_this)},error:function(xhttp,textStatus,errorThrown){_this.error(errorThrown+" "+textStatus)}})}}else{this.container.children("ul:eq(0)");this.container.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");this.container.find("li").not(".open").not(".closed").addClass("leaf");this.reselect()}},parseJSON:function(data){if(!data||!data.data)return"";var str="";str+="
    •  "}str+=((typeof data.data[this.settings.languages[i]].title).toLowerCase()!="undefined"?data.data[this.settings.languages[i]].title:data.data[this.settings.languages[i]])+""}}else{var attr={};attr["href"]="#";attr["style"]="";attr["class"]="";if((typeof data.data.attributes).toLowerCase()!="undefined"){for(var i in data.data.attributes){if(typeof data.data.attributes[i]=="function")continue;if(i=="style"||i=="class")attr[i]+=" "+data.data.attributes[i];else attr[i]=data.data.attributes[i]}}if(data.data.icon&&this.settings.ui.theme_name!="themeroller"){var icn=data.data.icon.indexOf("/")==-1?this.theme+data.data.icon:data.data.icon;attr["style"]+=" ; background-image:url('"+icn+"');"}str+=" "}str+=((typeof data.data.title).toLowerCase()!="undefined"?data.data.title:data.data)+""}if(data.children&&data.children.length){str+='
        ';for(var i=0;i'}str+="";return str},getJSON:function(nod,outer_attrib,inner_attrib,force){var _this=this;if(!nod||$(nod).size()==0){nod=this.container.children("ul").children("li")}else nod=$(nod);if(nod.size()>1){var arr=[];nod.each(function(){arr.push(_this.getJSON(this,outer_attrib,inner_attrib,force))});return arr}if(!outer_attrib)outer_attrib=["id","rel","class"];if(!inner_attrib)inner_attrib=[];var obj={attributes:{},data:false};for(var i in outer_attrib){if(typeof outer_attrib[i]=="function")continue;var val=(outer_attrib[i]=="class")?nod.attr(outer_attrib[i]).replace("last","").replace("leaf","").replace("closed","").replace("open",""):nod.attr(outer_attrib[i]);if(typeof val!="undefined"&&val.replace(" ","").length>0)obj.attributes[outer_attrib[i]]=val;delete val}if(this.settings.languages.length){obj.data={};for(var i in this.settings.languages){if(typeof this.settings.languages[i]=="function")continue;var a=nod.children("a."+this.settings.languages[i]);if(force||inner_attrib.length||a.get(0).style.backgroundImage.toString().length){obj.data[this.settings.languages[i]]={};obj.data[this.settings.languages[i]].title=a.text();if(a.get(0).style.backgroundImage.length){obj.data[this.settings.languages[i]].icon=a.get(0).style.backgroundImage.replace("url(","").replace(")","")}if(this.settings.ui.theme_name=="themeroller"&&a.children("ins").size()){var tmp=a.children("ins").attr("class");var cls=false;$.each(tmp.split(" "),function(i,val){if(val.indexOf("ui-icon-")==0){cls=val;return false}});if(cls)obj.data[this.settings.languages[i]].icon=cls}if(inner_attrib.length){obj.data[this.settings.languages[i]].attributes={};for(var j in inner_attrib){if(typeof inner_attrib[j]=="function")continue;var val=a.attr(inner_attrib[j]);if(typeof val!="undefined"&&val.replace(" ","").length>0)obj.data[this.settings.languages[i]].attributes[inner_attrib[j]]=val;delete val}}}else{obj.data[this.settings.languages[i]]=a.text()}}}else{var a=nod.children("a");if(force||inner_attrib.length||a.get(0).style.backgroundImage.toString().length){obj.data={};obj.data.title=a.text();if(a.get(0).style.backgroundImage.length){obj.data.icon=a.get(0).style.backgroundImage.replace("url(","").replace(")","")}if(this.settings.ui.theme_name=="themeroller"&&a.children("ins").size()){var tmp=a.children("ins").attr("class");var cls=false;$.each(tmp.split(" "),function(i,val){if(val.indexOf("ui-icon-")==0){cls=val;return false}});if(cls)obj.data[this.settings.languages[i]].icon=cls}if(inner_attrib.length){obj.data.attributes={};for(var j in inner_attrib){if(typeof inner_attrib[j]=="function")continue;var val=a.attr(inner_attrib[j]);if(typeof val!="undefined"&&val.replace(" ","").length>0)obj.data.attributes[inner_attrib[j]]=val;delete val}}}else{obj.data=a.text()}}if(nod.children("ul").size()>0){obj.children=[];nod.children("ul").children("li").each(function(){obj.children.push(_this.getJSON(this,outer_attrib,inner_attrib,force))})}return obj},getXML:function(tp,nod,outer_attrib,inner_attrib,cb){var _this=this;if(tp!="flat")tp="nested";if(!nod||$(nod).size()==0){nod=this.container.children("ul").children("li")}else nod=$(nod);if(nod.size()>1){var obj='';nod.each(function(){obj+=_this.getXML(tp,this,outer_attrib,inner_attrib,true)});obj+='';return obj}if(!outer_attrib)outer_attrib=["id","rel","class"];if(!inner_attrib)inner_attrib=[];var obj='';if(!cb)obj='';obj+='0)obj+=' '+outer_attrib[i]+'="'+val+'" ';delete val}obj+='>';obj+='';if(this.settings.languages.length){for(var i in this.settings.languages){if(typeof this.settings.languages[i]=="function")continue;var a=nod.children("a."+this.settings.languages[i]);obj+='0)obj+=' '+inner_attrib[j]+'="'+val+'" ';delete val}}}obj+='>'}}else{var a=nod.children("a");obj+='0)obj+=' '+inner_attrib[j]+'="'+val+'" ';delete val}}}obj+='>'}obj+='';if(tp=="flat")obj+='';if(nod.children("ul").size()>0){nod.children("ul").children("li").each(function(){obj+=_this.getXML(tp,this,outer_attrib,inner_attrib,true)})}if(tp=="nested")obj+='';if(!cb)obj+='';return obj},focus:function(){if(this.locked)return false;if(tree_component.focused!=this.cntr){tree_component.focused=this.cntr;this.settings.callback.onfocus.call(null,this)}},show_context:function(obj){this.context.show();var tmp=$(obj).children("a:visible").offset();this.context.css({"left":(tmp.left),"top":(tmp.top+parseInt(obj.children("a:visible").height())+2)})},hide_context:function(){if(this.context.to_remove&&this.context.apply_to)this.context.apply_to.children("a").removeClass("clicked");this.context.apply_to=false;this.context.hide()},attachEvents:function(){var _this=this;this.container.bind("mousedown.jstree",function(event){if(tree_component.drag_drop.isdown){tree_component.drag_drop.move_type=false;event.preventDefault();event.stopPropagation();event.stopImmediatePropagation();return false}}).bind("mouseup.jstree",function(event){setTimeout(function(){_this.focus.apply(_this)},5)}).bind("click.jstree",function(event){return true});$("#"+this.container.attr("id")+" li").live("click",function(event){if(event.target.tagName!="LI")return true;_this.off_height();if(event.pageY-$(event.target).offset().top>_this.li_height)return true;_this.toggle_branch.apply(_this,[event.target]);event.stopPropagation();return false});$("#"+this.container.attr("id")+" li a").live("click.jstree",function(event){if(event.which&&event.which==3)return true;if(_this.locked){event.preventDefault();event.target.blur();return _this.error("LOCKED")}_this.select_branch.apply(_this,[event.target,event.ctrlKey||_this.settings.rules.multiple=="on"]);if(_this.inp){_this.inp.blur()}event.preventDefault();event.target.blur();return false}).live("dblclick.jstree",function(event){if(_this.locked){event.preventDefault();event.stopPropagation();event.target.blur();return _this.error("LOCKED")}_this.settings.callback.ondblclk.call(null,_this.get_node(event.target).get(0),_this);event.preventDefault();event.stopPropagation();event.target.blur()}).live("contextmenu.jstree",function(event){if(_this.locked){event.target.blur();return _this.error("LOCKED")}var val=_this.settings.callback.onrgtclk.call(null,_this.get_node(event.target).get(0),_this,event);if(_this.context){if(_this.context.append==false){$("body").append(_this.context);_this.context.append=true;for(var i in _this.settings.ui.context){if(typeof _this.settings.ui.context[i]=="function")continue;if(_this.settings.ui.context[i]=="separator")continue;(function(){var func=_this.settings.ui.context[i].action;_this.context.children("[rel="+_this.settings.ui.context[i].id+"]").bind("click",function(event){if(!$(this).hasClass("disabled")){func.call(null,_this.context.apply_to||null,_this);_this.hide_context()}event.stopPropagation();event.preventDefault();return false}).bind("mouseup",function(event){this.blur();if($(this).hasClass("disabled")){event.stopPropagation();event.preventDefault();return false}}).bind("mousedown",function(event){event.stopPropagation();event.preventDefault()})})()}}var obj=_this.get_node(event.target);if(_this.inp){_this.inp.blur()}if(obj){if(!obj.children("a:eq(0)").hasClass("clicked")){_this.context.apply_to=obj;_this.context.to_remove=true;_this.context.apply_to.children("a").addClass("clicked");event.target.blur()}else{_this.context.to_remove=false;_this.context.apply_to=(_this.selected_arr&&_this.selected_arr.length>1)?_this.selected_arr:_this.selected}_this.context.children("a").removeClass("disabled").show();var go=false;for(var i in _this.settings.ui.context){if(typeof _this.settings.ui.context[i]=="function")continue;if(_this.settings.ui.context[i]=="separator")continue;var state=_this.settings.ui.context[i].visible.call(null,_this.context.apply_to,_this);if(state===false)_this.context.children("[rel="+_this.settings.ui.context[i].id+"]").addClass("disabled");if(state===-1)_this.context.children("[rel="+_this.settings.ui.context[i].id+"]").hide();else go=true}if(go==true)_this.show_context(obj);event.preventDefault();event.stopPropagation();return false}}return val}).live("mouseover.jstree",function(event){if(_this.locked){event.preventDefault();event.stopPropagation();return _this.error("LOCKED")}if((_this.settings.ui.hover_mode||_this.settings.ui.theme_name=="themeroller")&&_this.hovered!==false&&event.target.tagName=="A"){_this.hovered.children("a").removeClass("hover ui-state-hover");_this.hovered=false}if(_this.settings.ui.theme_name=="themeroller"){_this.hover_branch.apply(_this,[event.target])}});if(_this.settings.ui.theme_name=="themeroller"){$("#"+this.container.attr("id")+" li a").live("mouseout",function(event){if(_this.hovered)_this.hovered.children("a").removeClass("hover ui-state-hover")})}if(this.settings.rules.draggable!="none"){$("#"+this.container.attr("id")+" li a").live("mousedown.jstree",function(event){if(_this.settings.rules.drag_button=="left"&&event.which&&event.which!=1)return true;if(_this.settings.rules.drag_button=="right"&&event.which&&event.which!=3)return true;_this.focus.apply(_this);if(_this.locked)return _this.error("LOCKED");var obj=_this.get_node(event.target);if(_this.settings.rules.multiple!=false&&_this.selected_arr.length>1&&obj.children("a:eq(0)").hasClass("clicked")){var counter=0;for(var i in _this.selected_arr){if(typeof _this.selected_arr[i]=="function")continue;if(_this.check("draggable",_this.selected_arr[i])){_this.selected_arr[i].addClass("dragged");tree_component.drag_drop.origin_tree=_this;counter++}}if(counter>0){if(_this.check("draggable",obj))tree_component.drag_drop.drag_node=obj;else tree_component.drag_drop.drag_node=_this.container.find("li.dragged:eq(0)");tree_component.drag_drop.isdown=true;tree_component.drag_drop.drag_help=$("
        ").append("
          ");var tmp=$(tree_component.drag_drop.drag_node.get(0).cloneNode(true));if(_this.settings.languages.length>0)tmp.find("a").not("."+_this.current_lang).hide();tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last").children("a").html("Multiple selection").end().children("ul").remove()}}else{if(_this.check("draggable",obj)){tree_component.drag_drop.drag_node=obj;tree_component.drag_drop.drag_help=$("
          ").append("
            ");var tmp=$(obj.get(0).cloneNode(true));if(_this.settings.languages.length>0)tmp.find("a").not("."+_this.current_lang).hide();tree_component.drag_drop.drag_help.children("ul:eq(0)").append(tmp);tree_component.drag_drop.drag_help.find("li:eq(0)").removeClass("last").addClass("last");tree_component.drag_drop.isdown=true;tree_component.drag_drop.foreign=false;tree_component.drag_drop.origin_tree=_this;obj.addClass("dragged")}}tree_component.drag_drop.init_x=event.pageX;tree_component.drag_drop.init_y=event.pageY;obj.blur();event.preventDefault();event.stopPropagation();return false});$(document).bind("mousedown.jstree",tree_component.mousedown).bind("mouseup.jstree",tree_component.mouseup).bind("mousemove.jstree",tree_component.mousemove)}if(_this.context)$(document).bind("mousedown",function(){_this.hide_context()})},checkMove:function(NODES,REF_NODE,TYPE){if(this.locked)return this.error("LOCKED");var _this=this;if(REF_NODE.parents("li.dragged").size()>0||REF_NODE.is(".dragged"))return this.error("MOVE: NODE OVER SELF");if(NODES.size()==1){var NODE=NODES.eq(0);if(tree_component.drag_drop.foreign){if(this.settings.rules.droppable.length==0)return false;if(!NODE.is("."+this.settings.rules.droppable.join(", .")))return false;var ok=false;for(var i in this.settings.rules.droppable){if(typeof this.settings.rules.droppable[i]=="function")continue;if(NODE.is("."+this.settings.rules.droppable[i])){if(this.settings.rules.metadata){$.metadata.setType("attr",this.settings.rules.metadata);NODE.attr(this.settings.rules.metadata,"type: '"+this.settings.rules.droppable[i]+"'")}else{NODE.attr(this.settings.rules.type_attr,this.settings.rules.droppable[i])}ok=true;break}}if(!ok)return false}if(!this.check("dragrules",[NODE,TYPE,REF_NODE.parents("li:eq(0)")]))return this.error("MOVE: AGAINST DRAG RULES")}else{var ok=true;NODES.each(function(i){if(ok==false)return false;var ref=REF_NODE;var mv=TYPE;if(!_this.check.apply(_this,["dragrules",[$(this),mv,ref]]))ok=false});if(ok==false)return this.error("MOVE: AGAINST DRAG RULES")}if(this.settings.rules.use_inline&&this.settings.rules.metadata){var nd=false;if(TYPE=="inside")nd=REF_NODE.parents("li:eq(0)");else nd=REF_NODE.parents("li:eq(1)");if(nd.size()){if(typeof nd.metadata()["valid_children"]!="undefined"){var tmp=nd.metadata()["valid_children"];var ok=true;NODES.each(function(i){if(ok==false)return false;if($.inArray(_this.get_type(this),tmp)==-1)ok=false});if(ok==false)return this.error("MOVE: NOT A VALID CHILD")}if(typeof nd.metadata()["max_children"]!="undefined"){if((nd.children("ul:eq(0)").children("li").not(".dragged").size()+NODES.size())>nd.metadata().max_children)return this.error("MOVE: MAX CHILDREN REACHED")}var incr=0;NODES.each(function(j){var i=1;var t=$(this);while(i<100){t=t.children("ul").children("li");if(t.size()==0)break;i++}incr=Math.max(i,incr)});var ok=true;if((typeof $(nd).metadata().max_depth).toLowerCase()!="undefined"&&$(nd).metadata().max_depth=$(this).metadata().max_depth)ok=false}})}if(ok==false)return this.error("MOVE: MAX_DEPTH REACHED")}}return true},reselect:function(is_callback){var _this=this;if(!is_callback)this.cl_count=0;else this.cl_count--;if(this.opened&&this.opened.length){var opn=false;for(var j=0;this.opened&&j0){opn=true;var tmp=this.opened[j];delete this.opened[j];this.open_branch(tmp,true,function(){_this.reselect.apply(_this,[true])});this.cl_count++}}else this.open_branch(this.opened[j],true)}if(this.settings.data.async&&opn)return;delete this.opened}if(this.cl_count>0)return;if(this.settings.ui.rtl)this.container.css("direction","rtl").children("ul:eq(0)").addClass("rtl");else this.container.css("direction","ltr").children("ul:eq(0)").addClass("ltr");if(this.settings.ui.dots==false)this.container.children("ul:eq(0)").addClass("no_dots");if(this.scrtop){this.container.scrollTop(_this.scrtop);delete this.scrtop}if(this.settings.selected!==false){$.each(this.settings.selected,function(i){if(_this.is_partial_refresh)_this.select_branch($(_this.settings.selected[i],_this.container),(_this.settings.rules.multiple!==false));else _this.select_branch($(_this.settings.selected[i],_this.container),(_this.settings.rules.multiple!==false&&i>0))});this.settings.selected=false}if(this.settings.ui.theme_name=="themeroller")this.container.find("a").addClass("ui-state-default");this.settings.callback.onload.call(null,_this)},get_node:function(obj){var obj=$(obj);return obj.is("li")?obj:obj.parents("li:eq(0)")},get_type:function(obj){obj=!obj?this.selected:this.get_node(obj);if(!obj)return;if(this.settings.rules.metadata){$.metadata.setType("attr",this.settings.rules.metadata);var tmp=obj.metadata().type;if(tmp)return tmp}return obj.attr(this.settings.rules.type_attr)},scrollCheck:function(x,y){var _this=this;var cnt=_this.container;var off=_this.container.offset();var st=cnt.scrollTop();var sl=cnt.scrollLeft();var h_cor=(cnt.get(0).scrollWidth>cnt.width())?40:20;if(y-off.top<20)cnt.scrollTop(Math.max((st-_this.settings.ui.scroll_spd),0));if(cnt.height()-(y-off.top)this.container.width())?40:20;if(off_t+5end_t)this.container.scrollTop(this.container.scrollTop()+(off_t+h_cor-end_t))},select_branch:function(obj,multiple){if(this.locked)return this.error("LOCKED");if(!obj&&this.hovered!==false)obj=this.hovered;var _this=this;obj=_this.get_node(obj);if(!obj.size())return this.error("SELECT: NOT A VALID NODE");obj.children("a").removeClass("hover ui-state-hover");if(!_this.check("clickable",obj))return this.error("SELECT: NODE NOT SELECTABLE");if(_this.settings.callback.beforechange.call(null,obj.get(0),_this)===false)return this.error("SELECT: STOPPED BY USER");if(this.settings.rules.multiple!=false&&multiple&&obj.children("a.clicked").size()>0){return this.deselect_branch(obj)}if(this.settings.rules.multiple!=false&&multiple){this.selected_arr.push(obj)}if(this.settings.rules.multiple!=false&&!multiple){for(var i in this.selected_arr){if(typeof this.selected_arr[i]=="function")continue;this.selected_arr[i].children("A").removeClass("clicked ui-state-active");this.settings.callback.ondeselect.call(null,this.selected_arr[i].get(0),_this)}this.selected_arr=[];this.selected_arr.push(obj);if(this.selected&&this.selected.children("A").hasClass("clicked")){this.selected.children("A").removeClass("clicked ui-state-active");this.settings.callback.ondeselect.call(null,this.selected.get(0),_this)}}if(!this.settings.rules.multiple){if(this.selected){this.selected.children("A").removeClass("clicked ui-state-active");this.settings.callback.ondeselect.call(null,this.selected.get(0),_this)}}this.selected=obj;if((this.settings.ui.hover_mode||this.settings.ui.theme_name=="themeroller")&&this.hovered!==false){this.hovered.children("A").removeClass("hover ui-state-hover");this.hovered=obj}this.selected.children("a").removeClass("clicked ui-state-active").addClass(this.settings.ui.theme_name=="themeroller"?"clicked ui-state-active":"clicked").end().parents("li.closed").each(function(){_this.open_branch(this,true)});var off_t=this.selected.offset().top;var beg_t=this.container.offset().top;var end_t=beg_t+this.container.height();var h_cor=(this.container.get(0).scrollWidth>this.container.width())?40:20;if(off_t+5end_t)this.container.scrollTop(this.container.scrollTop()+(off_t+h_cor-end_t));this.set_cookie("selected");this.settings.callback.onselect.call(null,this.selected.get(0),_this);this.settings.callback.onchange.call(null,this.selected.get(0),_this)},deselect_branch:function(obj){if(this.locked)return this.error("LOCKED");var _this=this;var obj=this.get_node(obj);obj.children("a").removeClass("clicked ui-state-active");this.settings.callback.ondeselect.call(null,obj.get(0),_this);if(this.settings.rules.multiple!=false&&this.selected_arr.length>1){this.selected_arr=[];this.container.find("a.clicked").filter(":first-child").parent().each(function(){_this.selected_arr.push($(this))});if(obj.get(0)==this.selected.get(0)){this.selected=this.selected_arr[0];this.set_cookie("selected")}}else{if(this.settings.rules.multiple!=false)this.selected_arr=[];this.selected=false;this.set_cookie("selected")}if(this.selected)this.settings.callback.onchange.call(null,this.selected.get(0),_this);else this.settings.callback.onchange.call(null,false,_this)},toggle_branch:function(obj){if(this.locked)return this.error("LOCKED");var obj=this.get_node(obj);if(obj.hasClass("closed"))return this.open_branch(obj);if(obj.hasClass("open"))return this.close_branch(obj)},open_branch:function(obj,disable_animation,callback){if(this.locked)return this.error("LOCKED");var obj=this.get_node(obj);if(!obj.size())return this.error("OPEN: NO SUCH NODE");if(obj.hasClass("leaf"))return this.error("OPEN: OPENING LEAF NODE");if(this.settings.data.async&&obj.find("li").size()==0){if(this.settings.callback.beforeopen.call(null,obj.get(0),this)===false)return this.error("OPEN: STOPPED BY USER");var _this=this;obj.children("ul:eq(0)").remove().end().append("");obj.removeClass("closed").addClass("open");if(this.settings.data.type=="xml_flat"||this.settings.data.type=="xml_nested"){var xsl=(this.settings.data.type=="xml_flat")?"flat.xsl":"nested.xsl";obj.children("ul:eq(0)").getTransform(this.path+xsl,this.settings.data.url,{params:{theme_path:_this.theme},meth:this.settings.data.method,dat:this.settings.data.async_data(obj,this),repl:true,callback:function(str,json){if(str.length<15){obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();if(callback)callback.call();return}_this.open_branch.apply(_this,[obj]);if(callback)callback.call()},error:function(){obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove()}})}else{$.ajax({type:this.settings.data.method,url:this.settings.data.url,data:this.settings.data.async_data(obj,this),dataType:"json",success:function(data,textStatus){data=_this.settings.callback.onJSONdata.call(null,data,_this);if(!data||data.length==0){obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();if(callback)callback.call();return}var str="";if(data.length){for(var i=0;i0){obj.children("ul:eq(0)").replaceWith("
              "+str+"
            ");obj.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");obj.find("li").not(".open").not(".closed").addClass("leaf");_this.open_branch.apply(_this,[obj])}else obj.removeClass("closed").removeClass("open").addClass("leaf").children("ul").remove();if(callback)callback.call()},error:function(xhttp,textStatus,errorThrown){obj.removeClass("open").addClass("closed").children("ul:eq(0)").remove();_this.error(errorThrown+" "+textStatus)}})}return true}else{if(!this.settings.data.async){if(this.settings.callback.beforeopen.call(null,obj.get(0),this)===false)return this.error("OPEN: STOPPED BY USER")}if(this.settings.ui.theme_name=="themeroller")obj.find("a").not(".ui-state-default").addClass("ui-state-default");if(parseInt(this.settings.ui.animation)>0&&!disable_animation){obj.children("ul:eq(0)").css("display","none");obj.removeClass("closed").addClass("open");obj.children("ul:eq(0)").slideDown(parseInt(this.settings.ui.animation),function(){$(this).css("display","");if(callback)callback.call()})}else{obj.removeClass("closed").addClass("open");if(callback)callback.call()}this.set_cookie("open");this.settings.callback.onopen.call(null,obj.get(0),this);return true}},close_branch:function(obj,disable_animation){if(this.locked)return this.error("LOCKED");var _this=this;var obj=this.get_node(obj);if(!obj.size())return this.error("CLOSE: NO SUCH NODE");if(_this.settings.callback.beforeclose.call(null,obj.get(0),_this)===false)return this.error("CLOSE: STOPPED BY USER");if(parseInt(this.settings.ui.animation)>0&&!disable_animation&&obj.children("ul:eq(0)").size()==1){obj.children("ul:eq(0)").slideUp(parseInt(this.settings.ui.animation),function(){if(obj.hasClass("open"))obj.removeClass("open").addClass("closed");_this.set_cookie("open");$(this).css("display","")})}else{if(obj.hasClass("open"))obj.removeClass("open").addClass("closed");this.set_cookie("open")}if(this.selected&&obj.children("ul:eq(0)").find("a.clicked").size()>0){obj.find("li:has(a.clicked)").each(function(){_this.deselect_branch(this)});if(obj.children("a.clicked").size()==0)this.select_branch(obj,(this.settings.rules.multiple!=false&&this.selected_arr.length>0))}this.settings.callback.onclose.call(null,obj.get(0),this)},open_all:function(obj,callback){if(this.locked)return this.error("LOCKED");var _this=this;obj=obj?this.get_node(obj).parent():this.container;var s=obj.find("li.closed").size();if(!callback)this.cl_count=0;else this.cl_count--;if(s>0){this.cl_count+=s;obj.find("li.closed").each(function(){var __this=this;_this.open_branch.apply(_this,[this,true,function(){_this.open_all.apply(_this,[__this,true])}])})}else if(this.cl_count==0)this.settings.callback.onopen_all.call(null,this)},close_all:function(){if(this.locked)return this.error("LOCKED");var _this=this;this.container.find("li.open").each(function(){_this.close_branch(this,true)})},show_lang:function(i){if(this.locked)return this.error("LOCKED");if(this.settings.languages[i]==this.current_lang)return true;var st=false;var id=this.container.attr("id")?"#"+this.container.attr("id"):".tree";st=get_css(id+" ."+this.current_lang,this.sn);if(st!==false)st.style.display="none";st=get_css(id+" ."+this.settings.languages[i],this.sn);if(st!==false)st.style.display="";this.current_lang=this.settings.languages[i];return true},cycle_lang:function(){if(this.locked)return this.error("LOCKED");var i=$.inArray(this.current_lang,this.settings.languages);i++;if(i>this.settings.languages.length-1)i=0;this.show_lang(i)},create:function(obj,ref_node,position){if(this.locked)return this.error("LOCKED");var root=false;if(ref_node==-1){root=true;ref_node=this.container}else ref_node=ref_node?this.get_node(ref_node):this.selected;if(!root&&(!ref_node||!ref_node.size()))return this.error("CREATE: NO NODE SELECTED");var pos=position;var tmp=ref_node;if(position=="before"){position=ref_node.parent().children().index(ref_node);ref_node=ref_node.parents("li:eq(0)")}if(position=="after"){position=ref_node.parent().children().index(ref_node)+1;ref_node=ref_node.parents("li:eq(0)")}if(!root&&ref_node.size()==0){root=true;ref_node=this.container}if(!root){if(!this.check("creatable",ref_node))return this.error("CREATE: CANNOT CREATE IN NODE");if(ref_node.hasClass("closed")){if(this.settings.data.async&&ref_node.children("ul").size()==0){var _this=this;return this.open_branch(ref_node,true,function(){_this.create.apply(_this,[obj,ref_node,position])})}else this.open_branch(ref_node,true)}}var torename=false;if(!obj)obj={};else obj=$.extend(true,{},obj);if(!obj.attributes)obj.attributes={};if(this.settings.rules.metadata){if(!obj.attributes[this.settings.rules.metadata])obj.attributes[this.settings.rules.metadata]='{ "type" : "'+(this.get_type(tmp)||"")+'" }'}else{if(!obj.attributes[this.settings.rules.type_attr])obj.attributes[this.settings.rules.type_attr]=this.get_type(tmp)||""}if(this.settings.languages.length){if(!obj.data){obj.data={};torename=true}for(var i=0;iref_node.metadata().max_children)return this.error("CREATE: MAX_CHILDREN REACHED")}var ok=true;if((typeof $(ref_node).metadata().max_depth).toLowerCase()!="undefined"&&$(ref_node).metadata().max_depth===0)ok=false;else{ref_node.parents("li").each(function(i){if($(this).metadata().max_depth){if((i+1)>=$(this).metadata().max_depth){ok=false;return false}}})}if(!ok)return this.error("CREATE: MAX_DEPTH REACHED")}if((typeof position).toLowerCase()=="undefined"||position=="inside")position=(this.settings.rules.createat=="top")?0:ref_node.children("ul:eq(0)").children("li").size();if(ref_node.children("ul").size()==0||(root==true&&ref_node.children("ul").children("li").size()==0)){if(!root)var a=this.moved($li,ref_node.children("a:eq(0)"),"inside",true);else var a=this.moved($li,this.container.children("ul:eq(0)"),"inside",true)}else if(pos=="before"&&ref_node.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before",true);else if(pos=="after"&&ref_node.children("ul:eq(0)").children("li:nth-child("+(position)+")").size())var a=this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child("+(position)+")").children("a:eq(0)"),"after",true);else if(ref_node.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved($li,ref_node.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before",true);else var a=this.moved($li,ref_node.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after",true);if(a===false)return this.error("CREATE: ABORTED");if(torename){this.select_branch($li.children("a:eq(0)"));this.rename()}return $li},rename:function(obj){if(this.locked)return this.error("LOCKED");obj=obj?this.get_node(obj):this.selected;var _this=this;if(!obj||!obj.size())return this.error("RENAME: NO NODE SELECTED");if(!this.check("renameable",obj))return this.error("RENAME: NODE NOT RENAMABLE");if(!this.settings.callback.beforerename.call(null,obj.get(0),_this.current_lang,_this))return this.error("RENAME: STOPPED BY USER");obj.parents("li.closed").each(function(){_this.open_branch(this)});if(this.current_lang)obj=obj.find("a."+this.current_lang).get(0);else obj=obj.find("a:first").get(0);last_value=obj.innerHTML;_this.inp=$("");_this.inp.val(last_value.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")).bind("mousedown",function(event){event.stopPropagation()}).bind("mouseup",function(event){event.stopPropagation()}).bind("click",function(event){event.stopPropagation()}).bind("keyup",function(event){var key=event.keyCode||event.which;if(key==27){this.value=last_value;this.blur();return}if(key==13){this.blur();return}});var rb={};rb[this.container.attr("id")]=this.get_rollback();_this.inp.blur(function(event){if(this.value=="")this.value=last_value;$(obj).text($(obj).parent().find("input").eq(0).attr("value")).get(0).style.display="";$(obj).prevAll("span").remove();_this.settings.callback.onrename.call(null,_this.get_node(obj).get(0),_this.current_lang,_this,rb);_this.inp=false});var spn=$("").addClass(obj.className).append(_this.inp);spn.attr("style",$(obj).attr("style"));obj.style.display="none";$(obj).parent().prepend(spn);_this.inp.get(0).focus();_this.inp.get(0).select()},remove:function(obj){if(this.locked)return this.error("LOCKED");var rb={};rb[this.container.attr("id")]=this.get_rollback();if(obj&&(!this.selected||this.get_node(obj).get(0)!=this.selected.get(0))){obj=this.get_node(obj);if(obj.size()){if(!this.check("deletable",obj))return this.error("DELETE: NODE NOT DELETABLE");if(!this.settings.callback.beforedelete.call(null,obj.get(0),_this))return this.error("DELETE: STOPPED BY USER");$parent=obj.parent();obj=obj.remove();$parent.children("li:last").addClass("last");if($parent.children("li").size()==0){$li=$parent.parents("li:eq(0)");$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();this.set_cookie("open")}this.settings.callback.ondelete.call(null,obj.get(0),this,rb)}}else if(this.selected){if(!this.check("deletable",this.selected))return this.error("DELETE: NODE NOT DELETABLE");if(!this.settings.callback.beforedelete.call(null,this.selected.get(0),_this))return this.error("DELETE: STOPPED BY USER");$parent=this.selected.parent();var obj=this.selected;if(this.settings.rules.multiple==false||this.selected_arr.length==1){var stop=true;var tmp=(this.selected.prev("li:eq(0)").size())?this.selected.prev("li:eq(0)"):this.selected.parents("li:eq(0)")}obj=obj.remove();$parent.children("li:last").addClass("last");if($parent.children("li").size()==0){$li=$parent.parents("li:eq(0)");$li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();this.set_cookie("open")}this.settings.callback.ondelete.call(null,obj.get(0),this,rb);if(stop&&tmp)this.select_branch(tmp);if(this.settings.rules.multiple!=false&&!stop){var _this=this;this.selected_arr=[];this.container.find("a.clicked").filter(":first-child").parent().each(function(){_this.selected_arr.push($(this))});if(this.selected_arr.length>0){this.selected=this.selected_arr[0];this.remove()}}}else return this.error("DELETE: NO NODE SELECTED")},next:function(obj,strict){obj=this.get_node(obj);if(!obj.size())return false;if(strict)return(obj.nextAll("li").size()>0)?obj.nextAll("li:eq(0)"):false;if(obj.hasClass("open"))return obj.find("li:eq(0)");else if(obj.nextAll("li").size()>0)return obj.nextAll("li:eq(0)");else return obj.parents("li").next("li").eq(0)},prev:function(obj,strict){obj=this.get_node(obj);if(!obj.size())return false;if(strict)return(obj.prevAll("li").size()>0)?obj.prevAll("li:eq(0)"):false;if(obj.prev("li").size()){var obj=obj.prev("li").eq(0);while(obj.hasClass("open"))obj=obj.children("ul:eq(0)").children("li:last");return obj}else return obj.parents("li:eq(0)").size()?obj.parents("li:eq(0)"):false},parent:function(obj){obj=this.get_node(obj);if(!obj.size())return false;return obj.parents("li:eq(0)").size()?obj.parents("li:eq(0)"):false},children:function(obj){obj=this.get_node(obj);if(!obj.size())return false;return obj.children("ul:eq(0)").children("li")},get_next:function(force){var obj=this.hovered||this.selected;return force?this.select_branch(this.next(obj)):this.hover_branch(this.next(obj))},get_prev:function(force){var obj=this.hovered||this.selected;return force?this.select_branch(this.prev(obj)):this.hover_branch(this.prev(obj))},get_left:function(force,rtl){if(this.settings.ui.rtl&&!rtl)return this.get_right(force,true);var obj=this.hovered||this.selected;if(obj){if(obj.hasClass("open"))this.close_branch(obj);else{return force?this.select_branch(this.parent(obj)):this.hover_branch(this.parent(obj))}}},get_right:function(force,rtl){if(this.settings.ui.rtl&&!rtl)return this.get_left(force,true);var obj=this.hovered||this.selected;if(obj){if(obj.hasClass("closed"))this.open_branch(obj);else{return force?this.select_branch(obj.find("li:eq(0)")):this.hover_branch(obj.find("li:eq(0)"))}}},toggleDots:function(){if(this.settings.ui.dots){this.settings.ui.dots=false;this.container.children("ul:eq(0)").addClass("no_dots")}else{this.settings.ui.dots=true;this.container.children("ul:eq(0)").removeClass("no_dots")}},toggleRTL:function(){if(this.settings.ui.rtl){this.settings.ui.rtl=false;this.container.css("direction","ltr").children("ul:eq(0)").removeClass("rtl").addClass("ltr")}else{this.settings.ui.rtl=true;this.container.css("direction","rtl").children("ul:eq(0)").removeClass("ltr").addClass("rtl")}},set_cookie:function(type){if(this.settings.cookies===false)return false;if(this.settings.cookies[type]===false)return false;switch(type){case"selected":if(this.settings.rules.multiple!=false&&this.selected_arr.length>1){var val=Array();$.each(this.selected_arr,function(){if(this.attr("id")){val.push(this.attr("id"))}});val=val.join(",")}else var val=this.selected?this.selected.attr("id"):false;$.cookie(this.settings.cookies.prefix+'_selected',val,this.settings.cookies.opts);break;case"open":var str="";this.container.find("li.open").each(function(i){if(this.id){str+=this.id+","}});$.cookie(this.settings.cookies.prefix+'_open',str.replace(/,$/ig,""),this.settings.cookies.opts);break}},get_rollback:function(){var rb={};if(this.context.to_remove&&this.context.apply_to)this.context.apply_to.children("a").removeClass("clicked");rb.html=this.container.html();if(this.context.to_remove&&this.context.apply_to)this.context.apply_to.children("a").addClass("clicked");rb.selected=this.selected?this.selected.attr("id"):false;return rb},moved:function(what,where,how,is_new,is_copy,rb){var what=$(what);var $parent=$(what).parents("ul:eq(0)");var $where=$(where);if(!rb){var rb={};rb[this.container.attr("id")]=this.get_rollback();if(!is_new){var tmp=what.size()>1?what.eq(0).parents(".tree:eq(0)"):what.parents(".tree:eq(0)");if(tmp.get(0)!=this.container.get(0)){tmp=tree_component.inst[tmp.attr("id")];rb[tmp.container.attr("id")]=tmp.get_rollback()}delete tmp}}if(how=="inside"&&this.settings.data.async&&this.get_node($where).hasClass("closed")){var _this=this;return this.open_branch(this.get_node($where),true,function(){_this.moved.apply(_this,[what,where,how,is_new,is_copy,rb])})}if(what.size()>1){var _this=this;var tmp=this.moved(what.eq(0),where,how,false,is_copy,rb);what.each(function(i){if(i==0)return;if(tmp){tmp=_this.moved(this,tmp.children("a:eq(0)"),"after",false,is_copy,rb)}});return}if(is_copy){_what=what.clone();_what.each(function(i){this.id=this.id+"_copy";$(this).find("li").each(function(){this.id=this.id+"_copy"});$(this).removeClass("dragged").find("a.clicked").removeClass("clicked ui-state-active").end().find("li.dragged").removeClass("dragged")})}else _what=what;if(is_new){if(!this.settings.callback.beforecreate.call(null,this.get_node(what).get(0),this.get_node(where).get(0),how,this))return false}else{if(!this.settings.callback.beforemove.call(null,this.get_node(what).get(0),this.get_node(where).get(0),how,this))return false}if(!is_new){var tmp=what.parents(".tree:eq(0)");if(tmp.get(0)!=this.container.get(0)){tmp=tree_component.inst[tmp.attr("id")];if(tmp.settings.languages.length){var res=[];if(this.settings.languages.length==0)res.push("."+tmp.current_lang);else{for(var i in this.settings.languages){if(typeof this.settings.languages[i]=="function")continue;for(var j in tmp.settings.languages){if(typeof tmp.settings.languages[j]=="function")continue;if(this.settings.languages[i]==tmp.settings.languages[j])res.push("."+this.settings.languages[i])}}}if(res.length==0)return this.error("MOVE: NO COMMON LANGUAGES");what.find("a").not(res.join(",")).remove()}what.find("a.clicked").removeClass("clicked ui-state-active")}}what=_what;switch(how){case"before":$where.parents("ul:eq(0)").children("li.last").removeClass("last");$where.parent().before(what.removeClass("last"));$where.parents("ul:eq(0)").children("li:last").addClass("last");break;case"after":$where.parents("ul:eq(0)").children("li.last").removeClass("last");$where.parent().after(what.removeClass("last"));$where.parents("ul:eq(0)").children("li:last").addClass("last");break;case"inside":if($where.parent().children("ul:first").size()){if(this.settings.rules.createat=="top")$where.parent().children("ul:first").prepend(what.removeClass("last")).children("li:last").addClass("last");else $where.parent().children("ul:first").children(".last").removeClass("last").end().append(what.removeClass("last")).children("li:last").addClass("last")}else{what.addClass("last");$where.parent().append("
              ").removeClass("leaf").addClass("closed");$where.parent().children("ul:first").prepend(what)}if($where.parent().hasClass("closed")){this.open_branch($where)}break;default:break}if($parent.find("li").size()==0){var $li=$parent.parent();$li.removeClass("open").removeClass("closed").addClass("leaf");if(!$li.is(".tree"))$li.children("ul").remove();$li.parents("ul:eq(0)").children("li.last").removeClass("last").end().children("li:last").addClass("last");this.set_cookie("open")}else{$parent.children("li.last").removeClass("last");$parent.children("li:last").addClass("last")}if(is_copy)this.settings.callback.oncopy.call(null,this.get_node(what).get(0),this.get_node(where).get(0),how,this,rb);else if(is_new)this.settings.callback.oncreate.call(null,this.get_node(what).get(0),($where.is("ul")?-1:this.get_node(where).get(0)),how,this,rb);else this.settings.callback.onmove.call(null,this.get_node(what).get(0),this.get_node(where).get(0),how,this,rb);return what},error:function(code){this.settings.callback.error.call(null,code,this);return false},lock:function(state){this.locked=state;if(this.locked)this.container.children("ul:eq(0)").addClass("locked");else this.container.children("ul:eq(0)").removeClass("locked")},cut:function(obj){if(this.locked)return this.error("LOCKED");obj=obj?this.get_node(obj):this.container.find("a.clicked").filter(":first-child").parent();if(!obj||!obj.size())return this.error("CUT: NO NODE SELECTED");this.copy_nodes=false;this.cut_nodes=obj},copy:function(obj){if(this.locked)return this.error("LOCKED");obj=obj?this.get_node(obj):this.container.find("a.clicked").filter(":first-child").parent();if(!obj||!obj.size())return this.error("COPY: NO NODE SELECTED");this.copy_nodes=obj;this.cut_nodes=false},paste:function(obj,position){if(this.locked)return this.error("LOCKED");var root=false;if(obj==-1){root=true;obj=this.container}else obj=obj?this.get_node(obj):this.selected;if(!root&&(!obj||!obj.size()))return this.error("PASTE: NO NODE SELECTED");if(!this.copy_nodes&&!this.cut_nodes)return this.error("PASTE: NOTHING TO DO");var _this=this;var pos=position;if(position=="before"){position=obj.parent().children().index(obj);obj=obj.parents("li:eq(0)")}else if(position=="after"){position=obj.parent().children().index(obj)+1;obj=obj.parents("li:eq(0)")}else if((typeof position).toLowerCase()=="undefined"||position=="inside"){position=(this.settings.rules.createat=="top")?0:obj.children("ul:eq(0)").children("li").size()}if(!root&&obj.size()==0){root=true;obj=this.container}if(this.copy_nodes&&this.copy_nodes.size()){var ok=true;if(!ok)return this.error("Invalid paste");if(!root&&!this.checkMove(this.copy_nodes,obj.children("a:eq(0)"),"inside"))return false;if(obj.children("ul").size()==0||(root==true&&obj.children("ul").children("li").size()==0)){if(!root)var a=this.moved(this.copy_nodes,obj.children("a:eq(0)"),"inside",false,true);else var a=this.moved(this.copy_nodes,this.container.children("ul:eq(0)"),"inside",false,true)}else if(pos=="before"&&obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before",false,true);else if(pos=="after"&&obj.children("ul:eq(0)").children("li:nth-child("+(position)+")").size())var a=this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position)+")").children("a:eq(0)"),"after",false,true);else if(obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before",false,true);else var a=this.moved(this.copy_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after",false,true);this.copy_nodes=false}if(this.cut_nodes&&this.cut_nodes.size()){var ok=true;obj.parents().andSelf().each(function(){if(_this.cut_nodes.index(this)!=-1){ok=false;return false}});if(!ok)return this.error("Invalid paste");if(!root&&!this.checkMove(this.cut_nodes,obj.children("a:eq(0)"),"inside"))return false;if(obj.children("ul").size()==0||(root==true&&obj.children("ul").children("li").size()==0)){if(!root)var a=this.moved(this.cut_nodes,obj.children("a:eq(0)"),"inside");else var a=this.moved(this.cut_nodes,this.container.children("ul:eq(0)"),"inside")}else if(pos=="before"&&obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before");else if(pos=="after"&&obj.children("ul:eq(0)").children("li:nth-child("+(position)+")").size())var a=this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position)+")").children("a:eq(0)"),"after");else if(obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").size())var a=this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:nth-child("+(position+1)+")").children("a:eq(0)"),"before");else var a=this.moved(this.cut_nodes,obj.children("ul:eq(0)").children("li:last").children("a:eq(0)"),"after");this.cut_nodes=false}},search:function(str){var _this=this;if(!str||(this.srch&&str!=this.srch)){this.srch="";this.srch_opn=false;this.container.find("a.search").removeClass("search ui-state-highlight")}this.srch=str;if(!str)return;if(this.settings.data.async){if(!this.srch_opn){var dd=$.extend({"search":str},this.settings.data.async_data(false,this));$.ajax({type:this.settings.data.method,url:this.settings.data.url,data:dd,dataType:"text",success:function(data){_this.srch_opn=$.unique(data.split(","));_this.search.apply(_this,[str])}})}else if(this.srch_opn.length){if(this.srch_opn&&this.srch_opn.length){var opn=false;for(var j=0;j0){opn=true;var tmp="#"+this.srch_opn[j];delete this.srch_opn[j];this.open_branch(tmp,true,function(){_this.search.apply(_this,[str])})}}if(!opn){this.srch_opn=[];_this.search.apply(_this,[str])}}}else{var selector="a";if(this.settings.languages.length)selector+="."+this.current_lang;this.container.find(selector+":contains('"+str+"')").addClass(this.settings.ui.theme_name=="themeroller"?"search ui-state-highlight":"search");this.srch_opn=false}}else{var selector="a";if(this.settings.languages.length)selector+="."+this.current_lang;this.container.find(selector+":contains('"+str+"')").addClass(this.settings.ui.theme_name=="themeroller"?"search ui-state-highlight":"search").parents("li.closed").each(function(){_this.open_branch(this,true)})}},destroy:function(){this.hide_context();this.container.unbind(".jstree");$("#"+this.container.attr("id")).die("click.jstree").die("dblclick.jstree").die("contextmenu.jstree").die("mouseover.jstree").die("mouseout.jstree").die("mousedown.jstree");this.container.removeClass("tree ui-widget ui-widget-content tree-default tree-"+this.settings.ui.theme_name).children("ul").removeClass("no_dots rtl ltr locked").find("li").removeClass("leaf").removeClass("open").removeClass("closed").removeClass("last").children("a").removeClass("clicked hover search ui-state-active ui-state-hover ui-state-highlight ui-state-default");if(this.cntr==tree_component.focused){for(var i in tree_component.inst){if(i!=this.cntr&&i!=this.container.attr("id")){tree_component.inst[i].focus();break}}}tree_component.inst[this.cntr]=false;tree_component.inst[this.container.attr("id")]=false;delete tree_component.inst[this.cntr];delete tree_component.inst[this.container.attr("id")];tree_component.cntr--}}}})(jQuery); diff --git a/umbraco/presentation/umbraco_client/modal/modal.js b/umbraco/presentation/umbraco_client/modal/modal.js index c4f2650b6d..05ce597712 100644 --- a/umbraco/presentation/umbraco_client/modal/modal.js +++ b/umbraco/presentation/umbraco_client/modal/modal.js @@ -1,66 +1,176 @@ -// HELPERS -function openModal(url, name, height, width) { - var dialog = jQuery('#umbModalBox').jqm({ - onShow: function(h) { - var umbModal = jQuery(h.w); - var umbModalContent = jQuery("iframe", umbModal); +/// - umbModalContent.width(width); - umbModalContent.height(height - 30); +Umbraco.Sys.registerNamespace("Umbraco.Controls"); - jQuery("#umbModalBoxHeader").html(name); +(function($) { - if (height > 0) umbModal.height(height); + $.fn.ModalWindowAPI = function() { + /// jQuery plugin exposes the modal window api for the selected object + //if there's more than item in the selector, throw exception + if ($(this).length != 1) { + throw "ModalWindowAPI selector requires that there be exactly one control selected"; + }; + return $(this).data("ModalWindowAPI") == null ? null : $(this).data("ModalWindowAPI"); + }; - if (width > 0) { - umbModal.width(width); - umbModal.css("left", ((jQuery(document).width() - width) / 2) + "px"); - } + Umbraco.Controls.ModalWindow = function() { + /// Modal window class, when open is called, it will create a temporary html element to attach the window to + return { + _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 + open: function(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback) { + /// Opens a modal window + /// Optional + /// Optional + /// + /// Optional: An array of jQuery selectors that will trigger the modal window to close + /// + /// + /// A method that is called when the window is closing. the callback method will receive an instance + /// of the jQuery object for the popup window/iframe so that you can query against the contents of the window + /// to extract any information. + /// The callback will receive one parameter with 2 properties: + /// modalContent = the jQuery object for the popup window to query against + /// outVal = the value passed to the close window method that was used to close the window (if it was specified) + /// The generated jquery object bound to the modal window - umbModalContent.html('').attr('src', createUniqueUrl(url)); - - h.w.show(); - umbModalContent.show(); - - jQuery(document).keyup(function(event) { - if (event.keyCode == 27 && umbModal.css("display") == "block") { - closeModal(); + //check if the modal elems exist + if (!this._modalElemsExist()) { + this._createModalElems(); } - }); - }, - onHide: function(h) { - var umbModal = jQuery(h.w); - var umbModalContent = jQuery("iframe", umbModal); - h.w.hide(); - h.o.remove(); - umbModalContent.hide(); - umbModalContent.html('').attr('src', ''); - } - }).jqmShow(); -} + var _this = this; -function createUniqueUrl(url) { - var z = new Date().getTime(); - var rnd = (z - (parseInt(z / 1000, 10) * 1000)) / 10 + this._obj.jqm({ - if (url.indexOf("?") > -1) - return url += "&rndo=" + rnd; - else - return url += "?rndo=" + rnd; -} + onShow: function(h) { + var umbModal = $(h.w); + var umbModalContent = $("iframe", umbModal); + umbModalContent.width(width); + umbModalContent.height(showHeader ? height - 30 : height); -function closeModal() { - top.focus(); - $('#umbModalBox').jqmHide(); + //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); + } - return false; -} + //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", (($(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); + } -function fitModalToPageSize(modalHeight, width) { + umbModalContent.html('').attr('src', _this._getUniqueUrl(url)); -} + umbModal.show(); + umbModalContent.show(); + + $(document).keyup(function(event) { + if (event.keyCode == 27 && umbModal.css("display") == "block") { + _this.close(); + } + }); + if (closeTriggers) { + for (var x in closeTriggers) { + _this._obj.jqmAddClose(closeTriggers[x]); + } + } + + }, + onHide: function(h) { + var umbModal = $(h.w); + var umbModalContent = $("iframe", umbModal); + if (typeof onCloseCallback == "function") { + //call the callback if specified, pass the jquery content object as a param and the output value array + var e = { modalContent: umbModalContent, outVal: _this._rVal }; + onCloseCallback.call(_this, e); + } + h.w.hide(); + h.o.remove(); + umbModalContent.hide(); + umbModalContent.html('').attr('src', ''); + _this.close(); + } + }); + + this._obj.jqmShow(); + //store the api in this objects data store + this._obj.data("ModalWindowAPI", this); + return this._obj; + }, + close: function(rVal) { + /// Closes the modal window, Removes the object from the DOM + /// 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(); + this._obj.remove(); + return false; + }, + _createModalElems: function() { + /// This will create the html elements required for the modal overlay if they do not already exist in the DOM + + var overlayHtml = "
              " + + "
              ×" + + "
              " + + "
              "; + + this._obj = $(overlayHtml).appendTo("body"); + + var _this = this; + if ($.fn.draggable) this._obj.draggable({ + cursor: 'move', + distance: 5, + iframeFix: true, + helper: function(event) { + var o = $(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.absolutePosition.top); + _this._obj.css("left", ui.absolutePosition.left); + } + }); + }, + _modalElemsExist: function() { + return ($("#" + 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; + } + }; + }; + +})(jQuery); // @@ -105,7 +215,7 @@ function fitModalToPageSize(modalHeight, width) { $.jqm = { hash: {}, open: function(s, t) { - var h = H[s], c = h.c, cc = '.' + c.closeClass, z = (parseInt(h.w.css('z-index'))), z = (z > 0) ? z : 3000, o = $('
              ').css({ height: '100%', width: '100%', position: 'fixed', left: 0, top: 0, 'z-index': z - 1}); if (h.a) return F; h.t = t; h.a = true; h.w.css('z-index', z); + var h = H[s], c = h.c, cc = '.' + c.closeClass, z = (parseInt(h.w.css('z-index'))), z = (z > 0) ? z : 3000, o = $('
              ').css({ height: '100%', width: '100%', position: 'fixed', left: 0, top: 0, 'z-index': z - 1 }); if (h.a) return F; h.t = t; h.a = true; h.w.css('z-index', z); if (c.modal) { if (!A[0]) L('bind'); A.push(s); } else if (c.overlay > 0) h.w.jqmAddClose(o); else o = F; @@ -132,8 +242,8 @@ function fitModalToPageSize(modalHeight, width) { }; var s = 0, H = $.jqm.hash, A = [], ie6 = $.browser.msie && ($.browser.version == "6.0"), F = false, i = $('').css({ opacity: 0 }), -e = function(h) { if (ie6) if (h.o) h.o.html('

              ').prepend(i); else if (!$('iframe.jqm', h.w)[0]) h.w.prepend(i);}, -//f = function(h) { try { $(':input:visible', h.w)[0].focus(); } catch (_) { } }, +e = function(h) { if (ie6) if (h.o) h.o.html('

              ').prepend(i); else if (!$('iframe.jqm', h.w)[0]) h.w.prepend(i); }, + //f = function(h) { try { $(':input:visible', h.w)[0].focus(); } catch (_) { } }, L = function(t) { $()[t]("keypress", m)[t]("keydown", m)[t]("mousedown", m); }, m = function(e) { var h = H[A[A.length - 1]], r = (!$(e.target).parents('.jqmID' + h.s)[0]); if (r) f(h); return !r; }, hs = function(w, t, c) { diff --git a/umbraco/presentation/umbraco_client/modal/style.css b/umbraco/presentation/umbraco_client/modal/style.css index 9c93bbe9c7..465a2556cf 100644 --- a/umbraco/presentation/umbraco_client/modal/style.css +++ b/umbraco/presentation/umbraco_client/modal/style.css @@ -1,8 +1,11 @@ -#umbModalBox { +/* TODO: Change these to classes to support many modal boxes */ + +#umbModalBox, +.umbModalBox { position: absolute; top: 0; border: 5px #a3a3a3 solid; - border-top: none; + /*border-top: none;*/ text-align: left; z-index: 10000; display: none; @@ -10,11 +13,16 @@ font: bold 100% "Lucida Grande", Arial, sans-serif; } -#umbModalBox.loaded{background-image: none;} +#umbModalBox.loaded, +.umbModalBox.loaded +{ + background-image: none; +} .jqmOverlay {background: url(modalBackground.gif)} -#umbModalBoxHeader { +#umbModalBoxHeader, +.umbModalBoxHeader { margin: 0; text-shadow: #FFF 0 1px 0; padding: .5em 2em .5em .75em; @@ -22,13 +30,15 @@ text-align: left; } -#umbModalBoxContent { +#umbModalBoxContent, +.umbModalBoxContent { padding: 0px; overflow: hidden; height: 100%; } -#umbracModalBoxClose { +#umbracModalBoxClose, +.umbracModalBoxClose { display: block; position: absolute; right: 5px; top: 2px; @@ -38,13 +48,19 @@ font-size: 13px; } -#umbModalBoxContent {border-top: 1px solid #F9F9F9; } +#umbModalBoxContent, +.umbModalBoxContent {border-top: 1px solid #F9F9F9; } -#umbModalBoxHeader { +#umbModalBoxHeader, +.umbModalBoxHeader { background: url(modalGradiant.gif) repeat-x bottom #fff; border-bottom: 1px solid #CCC; - color: #378080 + color: #378080; + cursor:move; } -#umbracModalBoxClose { color: #777 } -#umbracModalBoxClose:hover { color: #000 } \ No newline at end of file +#umbracModalBoxClose, +.umbracModalBoxClose { color: #777 } + +#umbracModalBoxClose:hover, +.umbracModalBoxClose:hover { color: #000 } \ No newline at end of file diff --git a/umbraco/presentation/umbraco_client/ui/default.css b/umbraco/presentation/umbraco_client/ui/default.css index 9d29055ea6..3a012ab093 100644 --- a/umbraco/presentation/umbraco_client/ui/default.css +++ b/umbraco/presentation/umbraco_client/ui/default.css @@ -550,10 +550,16 @@ guiEditor { .success a {color:#264409;} -.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;} \ No newline at end of file +.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; +} \ No newline at end of file diff --git a/umbraco/presentation/web.config.BOMBER.xslt b/umbraco/presentation/web.config.BOMBER.xslt deleted file mode 100644 index ac97e696f3..0000000000 --- a/umbraco/presentation/web.config.BOMBER.xslt +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - server=.\sqlexpress;database=umbraco4.1;Integrated Security=true - - - - - - - - - - - - - - diff --git a/umbraco/presentation/web.config.SHANDEMVAIO.xslt b/umbraco/presentation/web.config.SHANDEMVAIO.xslt index 622a45798b..27c5fed580 100644 --- a/umbraco/presentation/web.config.SHANDEMVAIO.xslt +++ b/umbraco/presentation/web.config.SHANDEMVAIO.xslt @@ -4,12 +4,13 @@ - datalayer="VistaDB,VistaDB For Umbraco" + server=.\sqlexpress;database=UmbracoTest;user id=sa;password=test + - 4.1.0.alpha + 4.1.0.beta - + @@ -20,5 +21,5 @@ - + diff --git a/umbraco/presentation/web.config.SHOCKING.xslt b/umbraco/presentation/web.config.SHOCKING.xslt index 5715898ec6..d1a14ecfa7 100644 --- a/umbraco/presentation/web.config.SHOCKING.xslt +++ b/umbraco/presentation/web.config.SHOCKING.xslt @@ -4,11 +4,17 @@ - datalayer="VistaDB,VistaDB For Umbraco" + server=SHOCKING\SQLEXPRESS;database=UmbracoTest2;user id=sa;password=test 4.1.0.beta + + /App_Data/umbraco.config + + + /umbraco + diff --git a/umbraco/umbraco.Legacy/umbraco.Legacy.csproj b/umbraco/umbraco.Legacy/umbraco.Legacy.csproj index 2c58256343..e68b966caf 100644 --- a/umbraco/umbraco.Legacy/umbraco.Legacy.csproj +++ b/umbraco/umbraco.Legacy/umbraco.Legacy.csproj @@ -325,6 +325,10 @@ + + + + diff --git a/umbraco/presentation/umbraco/js/submodal/common.js b/umbraco/umbraco.Legacy/umbraco/js/submodal/common.js similarity index 100% rename from umbraco/presentation/umbraco/js/submodal/common.js rename to umbraco/umbraco.Legacy/umbraco/js/submodal/common.js diff --git a/umbraco/presentation/umbraco/js/submodal/maskBG.png b/umbraco/umbraco.Legacy/umbraco/js/submodal/maskBG.png similarity index 100% rename from umbraco/presentation/umbraco/js/submodal/maskBG.png rename to umbraco/umbraco.Legacy/umbraco/js/submodal/maskBG.png diff --git a/umbraco/presentation/umbraco/js/submodal/subModal.css b/umbraco/umbraco.Legacy/umbraco/js/submodal/subModal.css similarity index 100% rename from umbraco/presentation/umbraco/js/submodal/subModal.css rename to umbraco/umbraco.Legacy/umbraco/js/submodal/subModal.css diff --git a/umbraco/presentation/umbraco/js/submodal/subModal.js b/umbraco/umbraco.Legacy/umbraco/js/submodal/subModal.js similarity index 100% rename from umbraco/presentation/umbraco/js/submodal/subModal.js rename to umbraco/umbraco.Legacy/umbraco/js/submodal/subModal.js