Files
galaxy/static/scripts/jquery.fx.drop.js
T
James Taylor d31c43ef31 1) Workflow changes
- Workflows have a simple database representation (StoredWorkflow)
   - Workflow step parameters can be manipulated
   - Workflows can be saved and loaded
   - Many improvements to workflow editing interface

2) General interface cleanup

   - Styles for the overall layout have been moved from the index page to
     CSS files, colors for layout backgrounds and borders and such can now
     be configured in the colors.ini file
   - Styles and javascript code for dialogs and popupmenus (code is currently
     in the workflow editor but will be moved out after more testing)
2007-10-30 05:44:08 +00:00

34 lines
1.3 KiB
JavaScript

(function($) {
$.fx.drop = function(type, set, speed, callback) {
this.each(function() {
if(!set.direction) set.direction = "left"; //Default direction
var s = $.fx.findSides($(this)), dir = { left: s[0], right: s[0], up: s[1], down: s[1] };
var cur = $(this); $.fx.relativize(cur);
if(type == "show") {
var animation = { }, after = {};
var prefix = { left: (s[0] == 'left' ? '+=' : '-='), right: (s[0] == 'left' ? '-=' : '+='), up: (s[1] == 'top' ? '+=' : '-='), down: (s[1] == 'top' ? '-=' : '+=')};
animation[dir[set.direction]] = prefix[set.direction]+200;
cur.show().css(dir[set.direction], parseInt(cur.css(dir[set.direction])) + (prefix[set.direction] == "+=" ? -200 : 200));
} else {
var animation = {}, after = { display: 'none' };
var prefix = { left: (s[0] == 'left' ? '-=' : '+='), right: (s[0] == 'left' ? '+=' : '-='), up: (s[1] == 'top' ? '-=' : '+='), down: (s[1] == 'top' ? '+=' : '-=')};
animation[dir[set.direction]] = prefix[set.direction]+200;
after[dir[set.direction]] = $(this).css(dir[set.direction]);
}
cur.animate(animation, speed, set.easing, function() { //Animate
cur.css(after);
if(callback) callback.apply(this, arguments);
});
});
}
})(jQuery);