Why not make Image Browser in Editor as separate controle ?

14 posts, 0 answers
  1. Wahid
    Wahid avatar
    9 posts
    Member since:
    Apr 2011

    Posted 03 Dec 2012 Link to this post

    Hi all, and thank you for the awesome work in this new package.

    Actually when i saw the Image Browser first time " in Telerik ASP MVC " i said this supposed to be as separated control but didn't bother to ask why it's just embedded in the Editor control. But when i saw it again here just as embedded control in the Editor then i said it should be for some reasons. So why ??
  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 04 Dec 2012 Link to this post

    Hello Wahid,

    Actually the ImageBrowser is a standalone widget, which is currently coupled with the Editor for simplicity and ease of use.  It can be used on its own, but we do not support this officially and it is not documented. If there is a high-enough demand for and independent component, we will provide it.

    Greetings,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Nihat
    Nihat avatar
    8 posts
    Member since:
    May 2010

    Posted 03 Jan 2013 Link to this post

    Hello Dimo,

    it would be great if i could use the ImageBrowser as a standalone widget.
    If there is a way to achieve this or a way to build something similiar in an easy way, i would really appreciate it.
    Even when you could provide me with a solution which isn't officially supported.

    Kind regards
    Nihat
  5. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 07 Jan 2013 Link to this post

    Hi Nihat,

    You can initialize an image browser widget from a regular <div> element. The configuration is the same as when using the image browser inside an Editor.

    http://docs.kendoui.com/api/web/editor#imagebrowser-object

    <div id="imgBrowser"></div>

    $("#imgBrowser").kendoImageBrowser({
        transport: {
            read: "/service/ImageBrowser/Read",
            destroy: {
                url: "/service/ImageBrowser/Destroy",
                type: "POST"
            },
            create: {
                url: "/service/ImageBrowser/Create",
                type: "POST"
            },
            thumbnailUrl: "/service/ImageBrowser/Thumbnail",
            uploadUrl: "/service/ImageBrowser/Upload",
            imageUrl: "/service/ImageBrowser/Image?path={0}"
        }
    });


    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Michael
    Michael avatar
    4 posts
    Member since:
    Nov 2012

    Posted 24 Apr 2013 Link to this post

    Hi,
    I user this code do get a ImageBrowser stand alone.
    Is there any event if a image has been clicked?

    <div id="imgBrowser"></div>
    $("#imgBrowser").kendoImageBrowser({
        transport: {
            read: "/service/ImageBrowser/Read",
            destroy: {
                url: "/service/ImageBrowser/Destroy",
                type: "POST"
            },
            create: {
                url: "/service/ImageBrowser/Create",
                type: "POST"
            },
            thumbnailUrl: "/service/ImageBrowser/Thumbnail",
            uploadUrl: "/service/ImageBrowser/Upload",
            imageUrl: "/service/ImageBrowser/Image?path={0}"
        }
    });
    Thank you

  7. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 25 Apr 2013 Link to this post

    Hi Michael,

    The ImageBrowser exposes three events

    + change - when a file is clicked
    + apply - when a file is double-clicked
    + error - when a request fails


    The change and apply events do not expose the clicked file, but you can find it out by checking which .k-tile element has a k-state-selected class.

    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. Michael
    Michael avatar
    4 posts
    Member since:
    Nov 2012

    Posted 25 Apr 2013 Link to this post

    Hi Dimo,

    thank you for you replay!
    It works and the event is firing.

    How do I know which .k-tile element has a k-state-selected class?
    I use the Kendo ui with knockout...

    I  have this so far.
    self.onImageSelect = function (e) {
        alert('done!');
    }

    Thank you
  9. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 26 Apr 2013 Link to this post

    Hello Michael,

    A jQuery class selector would be a pretty standard and easy approach.

    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. Michael
    Michael avatar
    4 posts
    Member since:
    Nov 2012

    Posted 29 Apr 2013 Link to this post

    Hi Dimo,

    thanks that works.
    How do I have excess at the path if I navigate to a sub folder?

    Michael
  11. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 29 Apr 2013 Link to this post

    Hello Michael,

    The ImageBrowser does not expose an event related to folder navigation. You can get or set the current location with the widget's path() method.

    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. Dekel
    Dekel avatar
    25 posts
    Member since:
    Jan 2015

    Posted 26 Apr 2015 Link to this post

    Hi,

    Can you please post an example for this in the Kendo MVC wrapper edition of kendo?

    It will help me very much

  13. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 28 Apr 2015 Link to this post

    Hello Dekel,

    The ImageBrowser is not an official standalone widget, so it does not have an HtmlHelper for ASP.NET MVC.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  14. Tenen
    Tenen avatar
    6 posts
    Member since:
    Feb 2015

    Posted 28 Apr 2015 in reply to Dimo Link to this post

    Hi,

    Is there's a place I can vote for it to be a standalone widget? :)

  15. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 29 Apr 2015 Link to this post

    Yes -

    http://kendoui-feedback.telerik.com/forums/127393-telerik-kendo-ui-feedback?query=imagebrowser

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready