This is a migrated thread and some comments may be shown as answers.

Why not make Image Browser in Editor as separate controle ?

13 Answers 540 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wahid
Top achievements
Rank 2
Wahid asked on 03 Dec 2012, 03:25 PM
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 ??

13 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Dec 2012, 02:46 PM
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!
0
Nihat
Top achievements
Rank 1
answered on 03 Jan 2013, 03:36 PM
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
0
Dimo
Telerik team
answered on 07 Jan 2013, 09:21 AM
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!
0
Michael
Top achievements
Rank 1
answered on 24 Apr 2013, 08:55 PM
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

0
Dimo
Telerik team
answered on 25 Apr 2013, 07:50 AM
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!
0
Michael
Top achievements
Rank 1
answered on 25 Apr 2013, 11:06 AM
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
0
Dimo
Telerik team
answered on 26 Apr 2013, 07:25 AM
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!
0
Michael
Top achievements
Rank 1
answered on 29 Apr 2013, 11:44 AM
Hi Dimo,

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

Michael
0
Dimo
Telerik team
answered on 29 Apr 2013, 12:26 PM
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!
0
Dekel
Top achievements
Rank 1
answered on 26 Apr 2015, 05:10 PM

Hi,

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

It will help me very much

0
Dimo
Telerik team
answered on 28 Apr 2015, 08:52 AM
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!
0
Tenen
Top achievements
Rank 1
answered on 28 Apr 2015, 09:42 AM

Hi,

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

0
Dimo
Telerik team
answered on 29 Apr 2015, 11:25 AM
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!
 
Tags
General Discussions
Asked by
Wahid
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Nihat
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Dekel
Top achievements
Rank 1
Tenen
Top achievements
Rank 1
Share this question
or