+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / how to change document manager path of generic content?

how to change document manager path of generic content?

2 posts, 0 answered
  1. humayoo
    humayoo avatar
    89 posts
    Registered:
    25 Oct 2010
    03 Jun 2011
    Link to this post
    Hi,

    in sitefinity 3.7 how to change document manager path of generic content? i used external template . i placed GenericContentDesigner.ascx  template  to this path ~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx and i also  edit Telerik.Sitefinity.Configuration.ControlsConfig.xml for this. i also change flash and media manager path. flash and media manager path is changed but document manager path is not changed. please see the picture also for clarity. how to change the document manager path?

    this is the template
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="GenericContentDesigner.ascx.cs" Inherits="Sitefinity_Admin_ControlTemplates_Generic_Content_GenericContentDesigner" %>
    <telerik:JsFileLink id="jsLink" runat="server" ScriptType="jQuery" />
     
    <div class="ctrlPropsGeneric">
    <telerik:RadEditor
        runat="server"
        ID="textEditor"
        ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css"
        ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"   
        Skin="WebBlue"   
        NewLineBr="False"
        Height="360px"
        Width="98%"
        ContentFilters="EncodeScripts,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent">
        <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
        <MediaManager ViewPaths="~/SlideData/CarVideos" UploadPaths="~/SlideData/CarVideos" DeletePaths="~/SlideData/CarVideos" />
        <FlashManager ViewPaths="~/SlideData/CarFlash" UploadPaths="~/SlideData/CarFlash" DeletePaths="~/SlideData/CarFlash" />
        <DocumentManager ViewPaths="~/SlideData/CarDocuments" UploadPaths="~/SlideData/CarDocuments" DeletePaths="~/SlideData/CarDocuments" />
        <CssFiles>
            <telerik:EditorCssFile Value="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorCssFile.css" />
        </CssFiles>
    </telerik:RadEditor>
         <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
    <!--
        Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args) {
            var editorArgs = editor.getSelectedElement();
            if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
                editorArgs = editor.getSelection();
     
            var myCallbackFunction = function(sender, args) {
                if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "IMG")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
            }
            var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx") %>';
            editor.showExternalDialog(
       path,
       editorArgs,
       750,
       515,
       myCallbackFunction,
       null,
       'ImageLibraryDialog',
       true,
       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
       false,
       true)
        };
     
        Telerik.Web.UI.Editor.CommandList["LibraryDocumentManager"] = function(commandName, editor, args) {
            var editorArgs = editor.getSelectedElement();
            if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
                editorArgs = editor.getSelection();
     
            var myCallbackFunction = function(sender, args) {
                if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
            }
            var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/DocumentEditorDialog.aspx") %>';
            editor.showExternalDialog(
       path,
       editorArgs,
       750,
       515,
       myCallbackFunction,
       null,
       'ImageLibraryDialog',
       false,
       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
       false,
       true)
        };
     
        Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args) {
            var editorArgs = editor.getSelectedElement();
            if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") {
                var sel = editor.getSelection();
                editorArgs = sel;
                editorArgs.Html = sel.getHtml();
                editorArgs.Text = sel.getText();
            }
     
            var myCallbackFunction = function(sender, args) {
                if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
     
            }
            var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>';
            editor.showExternalDialog(
       path,
       editorArgs,
       750,
       515,
       myCallbackFunction,
       null,
       'ImageLibraryDialog',
       false,
       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
       false,
       true)
        };
     
        Telerik.Web.UI.Editor.CommandList["SetLinkProperties"] = function(commandName, editor, args) {
            var editorArgs = editor.getSelectedElement();
            if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
                editorArgs = editor.getSelection();
     
            var myCallbackFunction = function(sender, args) {
                if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
     
            }
            var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>';
            editor.showExternalDialog(
       path,
       editorArgs,
       750,
       515,
       myCallbackFunction,
       null,
       'ImageLibraryDialog',
       false,
       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
       false,
       true)
        };
     
        RadEditorCommandList["IncreaseSize"] = function(commandName, editor, oTool) {
            var currentWidth = editor.get_element().style.width; //get the width of Telerik RadEditor
            var currentHeight = editor.get_element().style.height; //get the heigh of Telerik RadEditor
     
            editor.SetSize(currentWidth, currentHeight + 30); //set the height size of the editor to increase with 30px
        };
     
        RadEditorCommandList["DecreaseSize"] = function(commandName, editor, oTool) {
            var currentWidth = editor.get_element().style.width;
            var currentHeight = editor.get_element().style.height;
     
            editor.SetSize(currentWidth, currentHeight - 30); //set the height size of the editor to decrease with 30px
        };
        var oldFunction = Telerik.Web.UI.Editor.CommandList["ToggleScreenMode"]; //save the original Paste function
     
        Telerik.Web.UI.Editor.CommandList["ToggleScreenMode"] = function(commandName, editor, args) {
            oldFunction(commandName, editor, args);
            var bd = document.getElementsByTagName("body")[0];
     
            if (/fullScreenMode/.test(bd.className)) {
                var rep = bd.className.match(' ' + 'fullScreenMode') ? ' ' + 'fullScreenMode' : 'fullScreenMode';
                bd.className = bd.className.replace(rep, '');
     
            } else {
                bd.className += bd.className ? ' ' + 'fullScreenMode' : 'fullScreenMode';
            }
        }
    -->
            </script>
        </telerik:RadCodeBlock>
    </div>
    <div class="footLinks">
        <p id="warningConainer" runat="server">
            <asp:Literal ID="warning" runat="server"></asp:Literal>
            <asp:LinkButton ID="EditSharedContent" CommandName="shareContent" runat="server" style="float:none;border-left:0;display:inline;font-weight:bold;margin-left:5px;color:#333" />
        </p>
        <asp:LinkButton ID="ShareContent" CommandName="shareContent" runat="server" CssClass="share"></asp:LinkButton>
        <asp:LinkButton ID="SelectContent" CommandName="selectContent" runat="server" CssClass="select"></asp:LinkButton>
    </div>
     
    <script type="text/javascript">
     
         $(document).ready(function() {
         
            var windowDiffConst = 174;
            var textEditorWrapperDiffIEConst = -57;
             
            $(window).bind('load', function() {
                 
                $(".ToggleScreenMode").parent().hide();
                if($(".rwMaximizedWindow", parent.document.body).length > 0)
                {
                    var $textEditor = $("#<%= textEditor.ClientID %>");
                    var $textEditorWrapper = $textEditor.children().eq(1);
     
                    var editorDiff = $textEditor.height() - $textEditorWrapper.height();
                    var newHeight = $(window).height() - windowDiffConst;
                     
                    $(".ctrlPropsGeneric").eq(0).css("height",newHeight+"px");
                     
                    $textEditor.css("height",parseInt(newHeight-2)+"px");
                    $textEditorWrapper.css("height",parseInt(newHeight-4+editorDiff)+"px");
                }
            });
            if($.browser.msie && jQuery.browser.version == "6.0")
            {
                $(".RadWindow", parent.document.body).find(".rwMaximizeButton").hide();
            }
            else
            {
                var $textEditor = $("#<%= textEditor.ClientID %>");
                var $textEditorWrapper = $textEditor.children().eq(1);
                 
                var editorDiff = $textEditor.height() - $textEditorWrapper.height();
                 
                $(window).bind('resize', function() {
                    var newHeight = $(window).height() - windowDiffConst;
                    if($.browser.msie && (jQuery.browser.version == "7.0" || jQuery.browser.version == "8.0"))
                    {
                        editorDiff = textEditorWrapperDiffIEConst;
                    }
                    $(".ctrlPropsGeneric").eq(0).css({"height":newHeight+"px"});
                     
                    $textEditor.css({"height":parseInt(newHeight-2)+"px","min-width":"0","min-height":"0"});
                    $textEditorWrapper.css("height",parseInt(newHeight-4+editorDiff)+"px");
     
                });
            }
        });
         
    </script>
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Jun 2011
    Link to this post
    Hi humayoo,

    Please check this post.

    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/developing-with-sitefinity/customising-documenteditordialog-ascx.aspx

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered