Closed (fixed)
Project:
Transformations
Version:
6.x-1.0-alpha3
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2009 at 14:56 UTC
Updated:
14 Jul 2009 at 09:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
jpetso commentedThat's neat, but putting this functionality in the drop function still causes the elements to be dropped where they shouldn't be allowed to be dropped. (Which means the droppables will still be highlighted, and that's bad for usability.)
Instead, we could use the "accept" property of droppable that can also be a function instead of a CSS class. So the best thing to do is to have a function (I'd probably name it transformationsUiIsDroppable(), as a name like transformationsFromSameOperation() limits the scope of what it can do - also, it lacks the "Ui" part in the function name!) and let that function check the CSS class that is currently assigned to the "accept" property, *plus* a check for same operation and pipeline parameter/output combinations that are not allowed. With that function, the user cannot even drop the connector, which means the check in the drop function is unnecessary.
Also, try hard to follow coding standards. (Sorry to nitpick on this, but they are indeed important.) In particular:
Comment #2
sepgil commentedOhh... at first i tried to use the "accept" property, but with a selector. I somehow skipped the part in the documention with the functions. :D
Well, I made a new patch, were i used "accept" and also tried to follow the coding standards...
Comment #3
jpetso commentedNo testing yet, but this looks like it should work out from a UI behavior point of view.
Most coding standard issues that applied to the new function have not yet been fixed, though. I'll just reference the bullet points numbers from above, with updated line numbers:
#2: line 36 in the new patch
#4: line 31, 32, 35, 36, 37 and 39
#5: line 39
#6: line 28
#7: line 28 and 29
I could fix those by myself, but I thought you might want to do it by yourself for the learning effect :P
Comment #4
sepgil commentedok all coding style issues should be fixed(hopefully)
Comment #5
jpetso commentedNearly. There's still no space after "if", "else" and the second "==" on line 36, and the comment still says "Checks ..." instead of "Check ..." (plus a few spelling issues that I don't care about if you're not a native speaker) but other than that, it's fine now :]
Comment #6
sepgil commentedhopefully this the last patch(at least about the coding standards)...
Comment #7
jpetso commentedI did the last few adaptations by myself, and restructured the code a bit to be yet cleaner and better readable. Attached to this comment, you can find the patch that I finally used.