Re: [drupal-devel] [bug] form_weight should use dleta:15 in book outline admin
On Wed, 19 Jan 2005 16:17:33 +0100, Bèr Kessels <drupal-devel@drupal.org> wrote:
This is a useability improvement *with code* ;)
In book-pages node forms we use a delta of fifteen (-15 to +15) but in the book-outline admin we dont dewfine this, resulting in a default delta of ten. This should be consistent and thus both 15. Bèr Kessels
Actually, the delta should be infinite, weight should only be used internally, and we should have +/-, up/down arrows :P (And a javascript, drag-and-drop version from Chris Messina) But thanks, Ber. -- Boris Mann http://www.bryght.com
Op woensdag 19 januari 2005 18:32, schreef Boris Mann:
Actually, the delta should be infinite, weight should only be used internally, and we should have +/-, up/down arrows :P
(And a javascript, drag-and-drop version from Chris Messina)
of course. But first things first, hey! ;) -- Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
Boris Mann wrote:
In book-pages node forms we use a delta of fifteen (-15 to +15) but in the book-outline admin we dont dewfine this, resulting in a default delta of ten. This should be consistent and thus both 15. Bèr Kessels
Actually, the delta should be infinite, weight should only be used internally, and we should have +/-, up/down arrows :P
(And a javascript, drag-and-drop version from Chris Messina)
When I saw the post I thought the same thing :) One advantage of seeing the numbers though is that those items with the same number get sorted alpha-numerically, so even if the interface is a bit geeky it works like a breeze. I started thinking and got even more carried away! (warning to stop reading :) ) If the default weight is 0, we could then have a default sort (alpha-numeric asc or desc) as a main option, then for each item the option to 'send to top' (or something) and 'send to bottom'. The 'send to top' could use the negative weights, while the 'send to bottom' could use the positive weights. Multiple items at the top or bottom could then be sorted with up/down arrows etc. This arrangement would allow mixing fixed sorting and automatic sorting. Well, just an idea.
Boris Mann wrote:
On Wed, 19 Jan 2005 16:17:33 +0100, Bèr Kessels <drupal-devel@drupal.org> wrote:
This is a useability improvement *with code* ;)
In book-pages node forms we use a delta of fifteen (-15 to +15) but in the book-outline admin we dont dewfine this, resulting in a default delta of ten. This should be consistent and thus both 15. Bèr Kessels
Actually, the delta should be infinite, weight should only be used internally, and we should have +/-, up/down arrows :P
(And a javascript, drag-and-drop version from Chris Messina)
I've done a lot of experiments with draggable stuff lately. My conclusions so far: - DOM manipulations with rows containing form data (other than the weights) is a no-no, as this will corrupt when using the back button in several browsers. This means practically every instance of weights in Drupal. A solution is to do the dragging through JS, but do a refresh/submit after every operation. But of course, this is not so elegant. - JS mouse events are completely different between browser flavours, hence the code for this would be ugly and hard to maintain. Although I do think there is a script out there which brings the broken browsers up to DOM Event Model specs, but it would mean being dependant on yet another external author. Look at what happened with xmlrpc.inc... - Drag-and-drop is hard to do with tables, as you cannot simply set a table row to position: relative (well you can, but it won't work). All the DOM-drag examples I've seen so far use ul's. I'm not sure if this is only if border-collapse: collapse is set, but it is what we use everywhere, so a lot of stuff is ruled out. Basically, all those elegant and short examples tend to work nicely as simple prototypes, but as soon as you try something like that in a flexible environment like Drupal, the excrement will hit the proverbial ventilation device. Steven Wittens
participants (4)
-
Boris Mann -
Bèr Kessels -
Ross Kendall -
Steven Wittens