Prob with images selector in widget designer. Can anyone help me? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

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

  • Prob with images selector in widget designer. Can anyone help me?
  • 2bce541e-37c1-6deb-a958-ff0000446526_imageselector.png

    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!

  • Hi, Dinh. You can check the source code of default Image widget. github.com/.../Telerik.Sitefinity.Frontend.Media

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

  • 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

  • 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?