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

Forums / Project Feather / Document selector with button

Document selector with button

8 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    04 Sep 2015
    Link to this post

    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 

     

  2. Mariush
    Mariush avatar
    43 posts
    Registered:
    08 Aug 2014
    04 Sep 2015 in reply to Daniel Plomp
    Link to this post

    Hi Daniel,

    Please give the media field a try.  

    Mariush

  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    07 Sep 2015 in reply to Mariush
    Link to this post

    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

     

     

  4. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    28 Dec 2015 in reply to Daniel Plomp
    Link to this post

    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

  5. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    31 Dec 2015
    Link to this post
    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
     
  6. Randy
    Randy avatar
    2 posts
    Registered:
    25 Jan 2016
    23 Mar in reply to Nikola Zagorchev
    Link to this post

    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

  7. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    24 Mar
    Link to this post
    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
     
  8. Randy
    Randy avatar
    2 posts
    Registered:
    25 Jan 2016
    24 Mar in reply to Nikola Zagorchev
    Link to this post

    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

8 posts, 0 answered