Customize BrowseAndEditToolbar?
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
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
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?
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
>
<
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
>
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)?
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
Hello Saad,
You can to use media content selector.
Greetings,
Ivan Dimitrov
the Telerik team
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
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
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
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.
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