PDA

View Full Version : Ext.ux.DataView.LightBox



digitalkaoz
11 Dec 2008, 3:43 AM
he folks,

i proudly present my first extension (if it can be called a plugin)

its a simple Ext.DataView Plugin which lets you cycle through the records and show the current image... i realized the plugin with the default ext components, nothing more, nothin less...

simply doubleclick the item

it only makes sense if u have images in your dataview like the official example http://extjs.com/deploy/dev/examples/view/data-view.html

here you can view the source http://extjs-ux.org/repo/authors/caziel/trunk/Ext/ux/DataView/LightBox/

here is an online demo http://extjs-ux.org/repo/authors/caziel/trunk/Ext/ux/DataView/LightBox/examples/index.html


here you can download the extension http://extjs-ux.org/repo/authors/caziel/trunk/Ext/ux/DataView/LightBox/deploy/ext.ux.dataview.lightbox.tar.gz


it was a 30minutes adhoc plugin...but i think it can get some enhancements...

what do you think? whats missing?

any feedback is welcome :)

usage:


new Ext.DataView({
...
plugins: [
new Ext.ux.DataView.LightBox({
nextImage : '../arrow_right.png',
prevImage : '../arrow_left.png',
event : 'click'
})
],
...
});


works in all browser, except lynx ;)

moegal
11 Dec 2008, 3:47 AM
great idea, doesn't work for me. nothing in IE7 and the large version of the image doesn't show in FF2.
Marty

digitalkaoz
11 Dec 2008, 3:50 AM
only tested it in ff3 on linux, so then i have to boot bei windows virtual machine :(

galdaka
11 Dec 2008, 5:05 AM
only tested it in ff3 on linux, so then i have to boot bei windows virtual machine :(

Also does not work in IE6.

Greetings,

digitalkaoz
11 Dec 2008, 6:03 AM
ok fixed the problems...(goddamn autowidth problems)

ive tested it in ff3,safari,ie8,ie6,opera,epiphany...

but its still in a very early stage...

hope somebody except me got a use for that plugin ^^

jay@moduscreate.com
11 Dec 2008, 7:57 AM
I would suggest using single click instead of double.

galdaka
11 Dec 2008, 1:39 PM
Excellent work!!

Thanks for share!

zhw511006
11 Dec 2008, 7:19 PM
Thanks for share!
Work Well In IE7

digitalkaoz
12 Dec 2008, 2:05 AM
ok i think i fixed most of the initial bugs... feel free to do whoteva you want to do with it ;)

netasibas
23 Jan 2009, 5:09 AM
thanks

Scorpie
23 Jan 2009, 5:37 AM
Nice, but the window with the image changes size, can you make it dynamic, so you can choose wether or not to autosize to the image or keep a fixed width&height, e.g a sort of image view?

fangzhouxing
17 Jul 2009, 1:34 AM
I changed following code:


f (Ext.isGecko) {
win.body.dom.src = rec.data.url;
win.setSize(win.body.dom.width, win.body.dom.height);
win.center();
}else{
if (win) {
win.destroy();
}
showWindow();
}


to :


win.body.dom.src = rec.data.url;
win.setSize(win.body.dom.width, win.body.dom.height);
win.center();


and it works in IE7 and IE6!

rishi89
31 May 2010, 2:45 AM
How do I integrate this with the rest of my PHP code ?