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

Forums / Project Feather / Prob with images selector in widget designer. Can anyone help me?

Prob with images selector in widget designer. Can anyone help me?

4 posts, 0 answered
  1. Dinh
    Dinh avatar
    0 posts
    Registered:
    06 Jul 2016
    26 Aug
    Link to this post

    Hi guys, I'm from VietNam. I have a problem with projectfeather and need to be helped.

    I've tried to create a images selector (Not image field) so many times and searched for tutorials and sample projects then follow it. So I got a image selector displayed well in the widget designer (see the attached file), but the problem is it's unabled to save images which are selected by user. The selector event do not have a button to save.

    This is my project : My Project

    Can anyone share me the sample project for images selector? Or show me how to save it?

    Sorry for my bad English!

    Thanks guys for considering my thread!

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    26 Aug in reply to Dinh
    Link to this post

    Hi, Dinh. You can check the source code of default Image widget. https://github.com/Sitefinity/feather-widgets/tree/cebd2a27bb94596bdc2f716ab7c6e8af84f839c4/Telerik.Sitefinity.Frontend.Media

    And I tried to check your project, but you need to give me access to your folder in GDrive

  3. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    26 Aug in reply to Dinh
    Link to this post

    I tried to quick look. And I found the problem.

    Your angular code is a bit wrong.

    Leave only this watches:

    $scope.$watch('properties.SelectedItems.PropertyValue', function (newValue, oldValue) {
       if (newValue) {
         $scope.selectedItems = JSON.parse(newValue);
       }
    });
    $scope.$watch('selectedItems', function (newValue, oldValue) {
       if (newValue) {
         $scope.properties.SelectedItems.PropertyValue = JSON.stringify(newValue);
       }
    });

    P.S. I didn't run your code in Sitefinity, just went quickly through your code. If you still have problem, email me and i'll help you: victor.leontev(at)gmail.com

  4. Dinh
    Dinh avatar
    0 posts
    Registered:
    06 Jul 2016
    29 Aug in reply to Victor Leontyev
    Link to this post
    Thanks for helping, but the problem wasn't solved. I leave angular code as your code above but it didn't work.  Do you have a sample project has a image selector in the widget designer?
4 posts, 0 answered