New Module: GWT Organise

talmdal

Joined: 2006-12-06
Posts: 358
Posted: Sun, 2010-01-17 17:33

@lancemorton: my previous fix was wrong. Anyhow, pls give it a try again, as i just pushed what i think is the right fix :-). While I was in there I also removed the reference to user::active_user().

http://www.timalmdal.com

 
lancemorton
lancemorton's picture

Joined: 2007-09-24
Posts: 20
Posted: Sun, 2010-01-17 20:06

@talmdal --- That did it! Everything is working as expected with the latest git pull. THANK YOU!! THANK YOU!!! THANK YOU!!!

 
edbeeny

Joined: 2009-11-26
Posts: 14
Posted: Fri, 2010-01-22 19:05

Ben

If I was to add the resize part I would probably set the size globally, but have the album override the setting if you specify a different size under the album. Also if I edit the image then have the ability to resize again!

I think that would cover everybody's need, looks the same way you are thinking.

Ed

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Sat, 2010-01-23 09:18

Good morning,

I tried it again with latest Gallery3 code, latest gwtorganize and a fresh test-install.
I tried it with IE6 (I know it's old) with latest GEARS installed (as I wasn't sure whether gears works correctly in my FF 3.6).

When I click on gwtorganize nothing happens.
Do I need to do anything special?

Thanks for your help,
David

 
edbeeny

Joined: 2009-11-26
Posts: 14
Posted: Sat, 2010-01-23 10:06

I had the same issue! It looks like the latest version has a file missing.
check there is a g3viewer folder there. location gwtorganise/war/

If not copy from an earlier copy.

It worked for me i've got the latest experimental version installed.

Good luck

Ed

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Sat, 2010-01-23 11:14

Hi,

Thx edbeeny for the hint.
I checked in recent commits but haven't found such a folder.
Would you mind sending me zipped you gwtorganize folder (d.steinberger at gmx.at; or maybe just upload the same).

Thanks,
David

 
edbeeny

Joined: 2009-11-26
Posts: 14
Posted: Mon, 2010-01-25 12:13

David,

This is my working version.

Good luck!

Ed

AttachmentSize
gwtorganise.zip360.37 KB
 
Bryan76
Bryan76's picture

Joined: 2009-04-24
Posts: 10
Posted: Mon, 2010-01-25 15:14

edbeeny,
your version works for me, with one minor change. I was getting a 403 error on war.php in the iframe. However, if I used urlencode() for the url parameter, then it worked. I also removed the leading '/' before modules/gwtorganise because on my system url::base(false, "http") returned a trailing slash. So having one in this line made a double.

gwtorganise_view.html.php

<? $base = url::base(false, "http");
   $url = $base . "modules/gwtorganise/war/index.php?url=" . urlencode($base);
 ?>
<iframe src="<?=$url?>" style="width:100%; height:500px; border:8px solid #d2e1f6; margin:0; padding:0;">
</iframe>
 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:24

Just checked in a new version and I've attached it here. It should all work fine with the latest version of G3 experimental.

I've added resizing before upload. It is a global option rather than a per album option.
Also added thumbnails when uploading and you can now drag and drop directly from a desktop folder into a an album.
Should also be a tad faster as it's now using the latest GWT which had better optimization.

Let me know if you have any problems

Cheers
Ben

Benjamin Albert Smith - Photography

 
Bryan76
Bryan76's picture

Joined: 2009-04-24
Posts: 10
Posted: Tue, 2010-01-26 05:02

Glooper, your most recent version doesn't contain the fix I listed above. According to RFC 1738 the '/' character is a reserved character. And when a reserved character is used in a url in a fashion that does not meet it's reserved status, it needs to be % encoded.

Quote:
2.2
Reserved:

Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded. The characters ";",
"/", "?", ":", "@", "=" and "&" are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.

Read more: http://www.faqs.org/rfcs/rfc1738.html#ixzz0dgrppI50

Quote:
3.3. HTTP

The HTTP URL scheme is used to designate Internet resources
accessible using HTTP (HyperText Transfer Protocol).

The HTTP protocol is specified elsewhere. This specification only
describes the syntax of HTTP URLs.

An HTTP URL takes the form:

http://<host>:<port>/<path>?<searchpart>

where <host> and <port> are as described in Section 3.1. If :<port>
is omitted, the port defaults to 80. No user name or password is
allowed. <path> is an HTTP selector, and <searchpart> is a query
string. The <path> is optional, as is the <searchpart> and its
preceding "?". If neither <path> nor <searchpart> is present, the "/"
may also be omitted.

Within the <path> and <searchpart> components, "/", ";", "?" are
reserved. The "/" character may be used within HTTP to designate a
hierarchical structure.

Read more: http://www.faqs.org/rfcs/rfc1738.html#ixzz0dgs8vYLN

Also see RFC 3696 Section 4.2
http://www.rfc-archive.org/getrfc.php?rfc=3696

In this sense, the contents of $base (http://www.yourserver.com/path/to/gallery3/) Is not part of the url's hierarchical structure. It is a variable being passed to PHP. I realize it may work in some environments, but I know it doesn't work in all (including mine). Given that the standard states that it should be encoded, can we get this rolled into git? If you need a patch of some type I'll try to figure out git enough to make one. :)

Of course this is mainly to keep me from having to manually apply this patch with every new release. :-D

Also, is anyone else seeing the double "//" in this url? I realize that it works, but why have it at all? From looking at the Kohana documentation, it appears that url::base(FALSE) will leave a trailing slash, so we shouldn't add one of our own in the path. Can anyone else confirm?

Thanks! :-D

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Tue, 2010-01-26 05:42

No probs
will sort out a fix tomorrow (I'm away from my development machine now) :)

Any other feedback, comments or missing features whilst I'm working on this?

Ben

Benjamin Albert Smith - Photography

 
Bryan76
Bryan76's picture

Joined: 2009-04-24
Posts: 10
Posted: Tue, 2010-01-26 05:49

Tx, Glooper, you rock.

Not yet, I just got it working today, but was pulled away. I'll do some testing tomorrow and see how things go.

B

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:29

Fixed and pushed to the repository... I've attach the new version too.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Wed, 2010-01-27 01:50

Glooper,
Thanks for your continued work on this!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Thu, 2010-01-28 17:56

Glooper, you rock.
Just tried the last version and ... 'Wow'. Really impressive!
The idea of quickly uploading some pics per drag & drop is genious.

Thanks for this module!

Thanks,
David

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Thu, 2010-01-28 17:59

+1
Should we decommission Organize module as it is and make GWTOrganize part of default setup?

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Thu, 2010-01-28 21:54

Won't happen, as we on the core team aren't willing to maintain stuff developed using the GWT toolkit. Had it been developed in a technology or toolkit that we are supporting (flash, jquery, php) it would have been an alternative.

http://www.timalmdal.com

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Thu, 2010-01-28 23:01

@talmdal: Ok, fair statement.

I am disabling Organize support in my theme in favour of GWT Organize for my sites. It is just to combersome to support.

a) Could you consider moving it out of front page into standalone page, frame, or admin instead?

or

b) Abstract all CSS/JS to the module itself, so it does not interfiere with the theme and does not require wind theme or default CSS/JS.

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Fri, 2010-01-29 00:29

I'm a Java developer at heart :).. I can write better code in Java than the other languages ;)

This modules also uses Goggle gears... which I can imagine some people might not be happy with installing. You can't do the drag and drop from the desktop stuff in anything else at the moment (except, I think, on the latest firefox?)

I think as well that if this was to go into the core it would need changing to fit in with the gallery theme fully (the dialog boxes etc).. which isn't the direction I want to take it, or something I'm willing to spend time doing.

Basically, I'd rather keep it as a separate module as well.. :)

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Fri, 2010-01-29 20:04

@glooper: Oh, no dialog boxes, please :)
as is it may require some polishing (ex: for IE at least), but it work just fine for my personal gallery.
Also being part of admin module it is not accessable to non-admin gallery users, but it is not a concern in my case.
I like it! Great work! thank you.

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Sun, 2010-01-31 10:58

I'm getting an error on the upload (2038).
The normal uploads via gallery3 standard work fine.

Anyone else having this issue with latest gallery3-code?

Thanks,
David

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Mon, 2010-02-01 23:16

Not seen this dave... though my gallery3 code is of a week or two ago... do you get an error dialog box appearing?

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Mon, 2010-02-01 23:24

Sry Glooper,

Seems something else was wrong. Also the normal upload didn't work any more.
After i modified my .htaccess slightly everything is working as expected again.

Sry, my fault.

BR,
David

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:30

Attached is a new version. this includes the following changes.

- Dialog Forms will now show validation failures. For instance if you try to add an album with an empty name then you will be asked again.

- Dialog Forms can now have embeded javascript in... for instance the add album dialog will now correctly auto-fill the internet and directory name

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Mon, 2010-02-22 18:20

Just noticed that in my last version I seem to have broken the upload. Will try and fix today. Also noticed a problem with uploading large numbers of photos, which I'll try and sort out.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:41

Fixed issues with upload.

Attached the fixed version.. will update GIT tomorrow :)

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:45

Just downloaded RC1 and tested this module with it. It all seemed to work ok.
I've repackaged the module for RC1 (removed a few unused files).

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
MtnBiker

Joined: 2008-02-11
Posts: 171
Posted: Sat, 2010-03-13 18:24

Glooper

Looks like a great module. Organize is a bit difficult for me to use.

Firefox is a downside. Nothing wrong with Firefox, I just prefer the simplicity of Safari. But I understand you point of view. Maybe someone will write a similar module using G3 core technologies.

Thanks.

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Sat, 2010-03-13 18:38

@MtnBiker: I'm currently working on a flash version to replace the current javascript version. Hopefully, I can get that done and integrated for the final release.

Tim
http://www.timalmdal.com

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Sat, 2010-03-13 21:42

@talmdal: since it is Flash, can we make sure it is ubstracted from default JS and CSS (fully REST enabled perhaps?) and with ability to skin it from the theme's CSS?

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Tue, 2010-03-16 19:47

@MTNBiker

it should work fine on safari? It worked fine on safari for windows last time I checked anyway. Ii's IE that has a few problems, and they are only layout issues.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Wed, 2010-03-17 00:37

ah.. I see the problem!... gears isn't allowed on safari.

I will do a new version of this module such that if gears is not available then everything will work except the upload. Will look at after doing some fixes to the basket module.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
MtnBiker

Joined: 2008-02-11
Posts: 171
Posted: Wed, 2010-03-17 01:23

Glooper: Thanks for the great support.

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:46

Ok... here's a version that doesn't require Google Gears.

When Gears is not available upload and desktop Drag and drop is disabled. (a link the bottom corner is shown to encourage you to download gears if you can).
when Gears is available it's fully functional.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
MtnBiker

Joined: 2008-02-11
Posts: 171
Posted: Wed, 2010-03-17 16:33

2010-03-16 version shows blank blue framed box in Safari and Firefox on Mac OS X. Maybe I need to clear a cache or something but that's what I see. Worked before with Firefox.

Edit the next morning: On my laptop GWTO works in Safari. Firefox shows the blue framed box. Firefox put up a message about reauthorizing or updating or something like that.

I think the delay may be that my host 1and1 takes a while for files to be updated. I think I've seen other instances of it. I mainly notice it when I rename something or delete and upload something with the same name. Don't ask me to explain it because I know next to nothing about UNIX, but if it were on a Mac I might say the directory structure is out of date.

 
tieguy

Joined: 2007-01-30
Posts: 32
Posted: Wed, 2010-03-17 06:18

Glooper: at least here your newest version tells me that I need Gears installed to do reordering of pictures, not just upload. :/

 
tieguy

Joined: 2007-01-30
Posts: 32
Posted: Wed, 2010-03-17 06:23

Weird, it is actually working on my machine (firefox nightly build, mac, without gears), but not my wife's (firefox 3.5.8, linux, gears uninstalled a few minutes ago.) Anyone have any idea what might be caching the gears 'requirement'?

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Wed, 2010-03-17 08:55

You need to make sure that the file ending with .nocache.js is not cached. You might need to change your .htaccess file? I'll check everything again tomorrow though to make sure it's all working fine.. and I'll check if there's a problem with the standard .htaccess that is in rc1.

I'll check reordering tomorrow too. I think it should be working without gears.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Wed, 2010-03-17 09:22

try adding the following to your .htaccess

<Files *.nocache.*>
  ExpiresDefault "access"
</Files>

<Files *.cache.*>
        ExpiresDefault "now plus 1 year"
</Files>

I think that should stop it from caching. I can't try any of this out at the moment as i'm on my laptop! But I'll try it all out tomorrow. :).

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:43

Just checked and re-ordering works fine without google gears. You need to make sure that you have enabled manual sorting on the album first (right click on the album and choose edit album to change the sort type).

Repackaged here is the same as the last version except it has a .htaccess file included. Hopefully this should sort out any problems with caching.. Let me know if it doesn't work still..

Cheers
Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Thu, 2010-03-18 03:11

Does it suppose to include all the cache files under war?

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Thu, 2010-03-18 03:29
 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Fri, 2010-03-19 15:09

* Could drag image marker be semi-transparent (ex. IE7/IE8)? right now it is not easy to see in which folder items are moved
* Could selected state be more apparent. Right now it is just thinner font and it is hard to recognize
* is there an option to rearrange items within the gallery? Coult there be one, if not
* when expanding the tree, it jumps/scrolls up to first node (IE8). Have to scroll down again

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Fri, 2010-03-19 19:07
Serge D wrote:
* Could drag image marker be semi-transparent (ex. IE7/IE8)? right now it is not easy to see in which folder items are moved
* Could selected state be more apparent. Right now it is just thinner font and it is hard to recognize

Both those work fine (and work in the way you said) in all other browsers apart from IE. I'm afraid I don't really want to spend the time getting it looking good on IE... it will probably take me a good full day to try and get it looking good without effecting the other browsers and I can't put that time in.

Serge D wrote:
* is there an option to rearrange items within the gallery? Could there be one, if not

yes.. right click... choose edit album. change to manual sort and then you can drag and drop the items around. (though again for it to be easier you might want to use another browser).

Serge D wrote:
* when expanding the tree, it jumps/scrolls up to first node (IE8). Have to scroll down again

My answers going to be the same..:).. Sorry...

My suggestion would be to download chrome or firefox.. Not only will it all looking good then.. it also runs a hell of a lot faster and smoother..

I'll make sure the code is up to date in github on monday so if anyone wants to try and spend the time getting it looking good on IE they can... I think some of the issues might be in the gwt-dnd component http://code.google.com/p/gwt-dnd/ though it might all just be css issues. In which case it should be a bit easier to fix.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Fri, 2010-03-19 19:25

@Glooper:

Quote:
I'm afraid I don't really want to spend the time getting it looking good on IE

I am using this for my theme and it seems to be working just fine. If you can try below css, I can try to see if it works

filter:alpha(opacity=85); opacity:.85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
Quote:
you might want to use another browser.
Not only will it all looking good then.. it also runs a hell of a lot faster and smoother

Nah... I like IE 8... and it still majority of the market :)

Chrome is another IE 6... and Google is another proprietary giant in a few years becomming even worse then MS :)
I run FF when needed, but do not see much of the speed difference comapare to IE 8.

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Fri, 2010-03-19 19:45

Unfortunetly, it's not that simple. The code that is doing the drag and drop is third party and it doesn't include the css. Instead I would have to re-write sections of this third party code (found at http://code.google.com/p/gwt-dnd/ ) ... currently I'm not willing to spend the time on that.

I don't really care about browser wars or company politics... I just don't want to spend the time on getting it working on IE... I spend too much time on that for my commercial websites as it is! :)... That aside.. IE9 is looking good at the moment and that it will adhere to standards a lot better, and have a javascript engine to match the speeds of chrome and safari (which have the fastest JS engines at the moment).

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Fri, 2010-03-19 20:10

No problem. Thanks

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sun, 2010-10-10 01:23

Ok.. I fixed it. Having said I wouldn't it was bugging me enough to spend a little time on and I managed to find a work around that didn't involve rewriting the third party code. (I'm going to raise a bug on that code as well as there's a blatant typo in his code).

Anyway.. attached file should now show the opacity correct for selected items in IE.

It might be caching the css file in question so you may need to clear IE's history to get it to update on the browser. It depends on your web-server setup as to whether you'll need to do this.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2436
Posted: Sat, 2010-03-20 00:05

Overlay is working as desired now.
I have a problem however.
when I move the photo between albums, I see the item listed, but no thumb for it. item also looses link to resize.
If I then edit the item (context menu) and save it, thumb would appear and link restored.
I have .htaccess rule to remove index.php
I hope it is just IE issue :)

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Sat, 2010-03-20 01:47

seems to work here.. could be something to do with the index.php removal. I'll have a look on monday.

Ben

Benjamin Albert Smith - Photography
Pikitia - New Zealand Photography