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

Forums / Sitefinity SDK / Customize BrowseAndEditToolbar?

Customize BrowseAndEditToolbar?

13 posts, 0 answered
  1. Saad
    Saad avatar
    98 posts
    Registered:
    10 Oct 2008
    27 Jan 2011
    Link to this post
    Hello,

    I have some how managed to have functionality just like Image Control (in toolbox) have. 

    Can I override its functionality that is, can I change its uploading path to file system and selection may also be given along file system items?

    I am working over this

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    27 Jan 2011
    Link to this post
    Hello saadi,

    You need to implement a custom selector for the file system. The Image Control generally works with items from Images module.

    1. You need a custom control designer where you have to add RadUpload control
    2. You have to implement FileExplorer in the control designer

    Regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Saad
    Saad avatar
    98 posts
    Registered:
    10 Oct 2008
    28 Jan 2011
    Link to this post
    Thanks for the guidance Ivan. Cant I have same look n feel as Image control have and just changing its upload/browsing path to file system?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    31 Jan 2011
    Link to this post
    Hi Saad,

    We use simple LinkButton and TextBox to visualize the designer of the Image control

    <asp:TextBox ID="fileNameTextBox" runat="server" CssClass="sfTxt" />
       <asp:LinkButton runat="server" id="selectFileButton" OnClientClick="return false" CssClass="sfLinkBtn sfChange">
           <strong class="sfLinkBtnIn"><asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Labels, SelectDotDotDot %>" /></strong>
       </asp:LinkButton>

    Here is the controls declaration of the control in the based designer for Images control

    <sitefinity:ResourceLinks ID="resourcesLinks" runat="server">
        <sitefinity:ResourceFile JavaScriptLibrary="JQuery"></sitefinity:ResourceFile>
        <sitefinity:ResourceFile Name="Styles/Tabstrip.css" />
    </sitefinity:ResourceLinks>        
     
    <sfFields:FormManager id="formManager" runat="server"/>
     
     
    <asp:RadioButtonList ID="rbImageSettingsViews" runat="server" RepeatLayout="Flow">
        <asp:ListItem Value="0" Selected="True" Text="<%$Resources:LibrariesResources, FromYourComputer %>"></asp:ListItem>
        <asp:ListItem Value="1" Text="<%$Resources:LibrariesResources, FromAlreadyUploadedItems %>"></asp:ListItem>
    </asp:RadioButtonList>
             
    <sitefinity:Message ID="message" runat="server"
                ElementTag="div"
                CssClass="sfMessage sfDesignerMessage"
                RemoveAfter="50000"
                FadeDuration="10"  />
                 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"
                         Skin="Sitefinity"
                         MultiPageID="designerTabsMultiPage"
                         SelectedIndex="0"
                         OnClientTabSelected="OnClientTabSelected"
                         CssClass="sfSwitchControlViews">
    </telerik:RadTabStrip>
     
    <telerik:RadMultiPage ID="designerTabsMultiPage" runat="server"
                          SelectedIndex="0"
                          CssClass="sfContentViews">
    </telerik:RadMultiPage>
     
    <script type="text/javascript">
        function OnClientTabSelected(sender, eventArgs)
        {
            dialogBase.resizeToContent();
        }
    </script>


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Saad
    Saad avatar
    98 posts
    Registered:
    10 Oct 2008
    31 Jan 2011
    Link to this post
    Hello,

    I tried doing what you suggested but nothing renders except the textbox and linkbutton (first code block). Is there something else I need to do or what?

    Let suppose if I manage to get the same UI, so will I be able to upload images because we plays at client-side (JQuery getters/setters)?
    Or
    Can I have my own Image Library Provider in which I override upload logic etc (as mentioned in 3.x post)?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    02 Feb 2011
    Link to this post
    Hello Saad,

    RadUpload has a client side API that you can use to upload files. At this stage Sitefinity has only provider for uploading files to Images /Files and Documents module.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Saad
    Saad avatar
    98 posts
    Registered:
    10 Oct 2008
    13 Feb 2011
    Link to this post
    Thanks Ivan for telling the controls that are used to make the designer of image control. Can you please tell me the controls structure for the second tab "From Already Uploaded Items" as well?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    15 Feb 2011
    Link to this post
    Hello Saad,

    You can to use media content selector.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  9. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    31 Mar 2011
    Link to this post
    Hi Ivan,

    I want to have the file upload control on the Insert backend view of my custom module (developed based on the products sample). Also I want to post the file from the client machine to server before doing anything else. How do I achieve this? Let say my field has a textbox for the file path. A button called Browse which will open the file browser. Then another button called "Upload To Server", which will copy the file from the client machine to the server.

    Thanks!
    Duneel
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    31 Mar 2011
    Link to this post
    Hello Duneel,

    You can use RadUpload or RadFileExplorer control. The Media API will help you to create the content as a Sitefinity object.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
  11. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    01 Apr 2011
    Link to this post
    Hi Ivan, Thanks for the info. Now the clellenge is that putting it all together into a custom module. In my case I want to upload the video to Brightcove and in sitefinity I'm keeping only the video id generated after uploded to brightcove. So I need to handle this in the serverside code upon clicking on a button on the module backend view. Would be great if you can refer me to something to get me going. Thanks! Duneel
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    01 Apr 2011
    Link to this post
    Hello Duneel,

    For our modules we use only WCF services  and there is no servers side logic, but you should be able to subscribe for the click event of the button you have.



    Regards,
    Ivan Dimitrov
    the Telerik team
  13. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    01 Apr 2011
    Link to this post
    Hi Ivan,

    Yeah, I can perform my serverside logic by subscribing to a client event. The client event will then calls a webservice that wraps the serverside logic. But the problem i have is saving the file on the server. Can I do that from the client-side? Becoz in order for my serverside logic to work I need the posted filed copied over to srever first.

    Thanks,
    Duneel
13 posts, 0 answered