Document selector with button

Posted by Community Admin on 05-Aug-2018 14:36

Document selector with button

All Replies

Posted by Community Admin on 04-Sep-2015 00:00

I'd like to know how I can add a sf-document-selector to a widget designer like e.g. the sf-page-selector.

The sf-page-selector is showing a button (select) which opens a window to select a page. The sf-document-selector is just showing the selector at once, and conflicts with other properties on my widget designer.

Can't I do something like:

<sf-list-selector sf-document-selector />

Best,
Daniel 

 

Posted by Community Admin on 04-Sep-2015 00:00

Hi Daniel,

Please give the media field a try.  

Mariush

Posted by Community Admin on 07-Sep-2015 00:00

Hi Mariush,

Thanks, this gives me the desired functionality.

When I place multiple MediaField components on my widget designer, it is only updating the first one.

What should be done to make this work?

<tab heading="Downloads">
       <div class="form-group">
           <label>Voorwaarden</label>
           <sf-media-field sf-media-type="documents" id="voorwaarden" sf-model="properties.DownloadVoorwaardenId.PropertyValue"/>
       </div>
       <div class="form-group">
           <label>Bijlagenboekje</label>
           <sf-media-field sf-media-type="documents" id="bijlagenboekje" sf-model="properties.DownloadBijlagenBoekjeId.PropertyValue"/>
       </div>
       <div class="form-group">
           <label>Handleiding</label>
           <sf-media-field sf-media-type="documents" id="handleiding" sf-model="properties.DownloadHandleidingId.PropertyValue" />
       </div>
   </tab>

So, if I choose a file from the second or third selector, it will update the first one.

Best,
Daniel

 

 

Posted by Community Admin on 28-Dec-2015 00:00

Any ideas on how to use multiple MediaFields inside a widget designer? It seems not to work when trying to persist values to the database. If I have 3 MediaFields that are bind to 3 different properties, the first one is the one that is updated 3 times, so always gets the value of the Document that is chosen from the DocumentSelector.

Best,
Daniel

Posted by Community Admin on 31-Dec-2015 00:00

Hi Daniel,

Could you please verify you are using different ids and scope properties for each media field?
Please, check also the binding in the designer javascript file, where the database values are updated.

Regards,
Nikola Zagorchev
Telerik

 
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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 23-Mar-2016 00:00

Has anyone had success in implementing this?  I have found there are also problems if you are trying to use the kendo control and the sf-media-field in the same widget. 

 

Thanks,

Randy

Posted by Community Admin on 24-Mar-2016 00:00

Hi Randy,

What kendo control you are trying to use? What errors do you receive?
You can check this widget with multiple selectors:
https://github.com/Sitefinity/feather-samples/tree/master/AuthorWidget

Regards,
Nikola Zagorchev
Telerik

 
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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 24-Mar-2016 00:00

I looked at the author widget and tried to add these two elements.  The media field alone works perfectly.  And the html field alone works perfectly.  If you put these on the same page and try to add a document via the media field and then try to add a document through the open document selector through the kendo UI then it breaks.  

 

IE I have a page with these two fields and can't add documents through the kendo-content-block.  

<sf-media-field sf-media-type="documents" sf-model="selectedItems" />

<sf-html-field class="kendo-content-block" sf-model="properties.Text.PropertyValue"></sf-html-field>

 

When you try using kendo the document selector opens  and you can select a document you just can't save it.  The button to save is inactive because there is no selected document.

(I am new to customizing the widgets, but it certainly seems like there is a problem with the sf-media-field and trying to bind to it multiple times on the page, similar to the post that Daniel made)

Thanks,

Randy

This thread is closed