mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
Completely purge jquery-ui. Panels and workflow editor now use jquery.event.[drag/drop]
As a consequence, the workflow editor now functions again.
This commit is contained in:
@@ -1 +1 @@
|
||||
var hidden_width=7;var border_tweak=9;var jq=jQuery;function ensure_dd_helper(){if(jq("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(f,b,c){var e=false;var d=null;resize=function(g){var h=g;if(g<0){g=0}jq(f).css("width",g);jq(c).css("left",h);jq(b).css("left",g+7);if(document.recalc){document.recalc()}};toggle=function(){if(e){jq(c).removeClass("hover");jq(c).animate({left:d},"fast");jq(f).css("left",-d).show().animate({left:0},"fast",function(){resize(d);jq(c).removeClass("hidden")});e=false}else{d=jq(c).position().left;jq(b).css("left",hidden_width);if(document.recalc){document.recalc()}jq(c).removeClass("hover");jq(f).animate({left:-d},"fast");jq(c).animate({left:-1},"fast",function(){jq(this).addClass("hidden")});e=true}};jq(c).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(g,h){jq("#DD-helper").show()},stop:function(g,h){jq("#DD-helper").hide();return false},drag:function(g,h){x=h.position.left;x=Math.min(400,Math.max(100,x));if(e){jq(f).css("left",0);jq(c).removeClass("hidden");e=false}resize(x);h.position.left=x;h.position.top=$(this).data("draggable").originalPosition.top},click:function(){toggle()}}).find("div").show();var a=function(g){if((e&&g=="show")||(!e&&g=="hide")){toggle()}};return{force_panel:a}}function make_right_panel(a,e,h){var j=false;var g=false;var c=null;var d=function(k){jq(a).css("width",k);jq(e).css("right",k+9);jq(h).css("right",k).css("left","");if(document.recalc){document.recalc()}};var i=function(){if(j){jq(h).removeClass("hover");jq(h).animate({right:c},"fast");jq(a).css("right",-c).show().animate({right:0},"fast",function(){d(c);jq(h).removeClass("hidden")});j=false}else{c=jq(document).width()-jq(h).position().left-border_tweak;jq(e).css("right",hidden_width+1);if(document.recalc){document.recalc()}jq(h).removeClass("hover");jq(a).animate({right:-c},"fast");jq(h).animate({right:-1},"fast",function(){jq(this).addClass("hidden")});j=true}g=false};var b=function(k){var l=jq(e).width()-(j?c:0);if(l<k){if(!j){i();g=true}}else{if(g){i();g=false}}};jq(h).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(k,l){jq("#DD-helper").show()},stop:function(k,l){x=l.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);d(w-x-border_tweak);jq("#DD-helper").hide();return false},click:function(){i()},drag:function(k,l){x=l.position.left;w=jq(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(j){jq(a).css("right",0);jq(h).removeClass("hidden");j=false}d(w-x-border_tweak);l.position.left=x;l.position.top=$(this).data("draggable").originalPosition.top}}).find("div").show();var f=function(k){if((j&&k=="show")||(!j&&k=="hide")){i()}};return{handle_minwidth_hint:b,force_panel:f}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide()})}function show_modal(f,c,e,d){$(".dialog-box").find(".title").html(f);var a=$(".dialog-box").find(".buttons").html("");if(e){$.each(e,function(b,g){a.append($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}var a=$(".dialog-box").find(".extra_buttons").html("");if(d){$.each(d,function(b,g){a.append($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}if(c=="progress"){c=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(c);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}}function make_popupmenu(d,b){var a=$("<div class='popupmenu'><div class='popupmenu-top'><div class='popupmenu-top-inner'/></div></div>").appendTo("body");$.each(b,function(g,f){$("<div class='popupmenu-item' />").html(g).click(f).appendTo(a)});var c=function(){$(a).unbind().hide();$("#popup-helper").unbind().hide()};var e=function(){var f=$(d).offset();$("#popup-helper").mousedown(c).show();$(a).click(c).css({top:-1000}).show().css({top:f.top+$(d).height()+9,left:f.left+$(d).width()-$(a).width()})};$(d).click(e)}$(function(){$("span.tab").each(function(){var a=$(this).children("div.submenu");if(a.length>0){if($.browser.msie){a.prepend("<iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter:Alpha(Opacity='0');\"></iframe>")}$(this).hoverIntent(function(){a.show()},function(){a.hide()});a.click(function(){a.hide()})}})});function user_changed(a,b){if(a){$(".loggedin-only").show();$(".loggedout-only").hide();$("#user-email").text(a);if(b){$(".admin-only").show()}}else{$(".loggedin-only").hide();$(".loggedout-only").show();$(".admin-only").hide()}};
|
||||
function ensure_dd_helper(){if($("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(h,c,e){var g=false;var f=null;var d=function(i){var j=i;if(i<0){i=0}$(h).css("width",i);$(e).css("left",j);$(c).css("left",i+7);if(document.recalc){document.recalc()}};var a=function(){if(g){$(e).removeClass("hover");$(e).animate({left:f},"fast");$(h).css("left",-f).show().animate({left:0},"fast",function(){d(f);$(e).removeClass("hidden")});g=false}else{f=$(e).position().left;$(c).css("left",$(e).innerWidth());if(document.recalc){document.recalc()}$(e).removeClass("hover");$(h).animate({left:-f},"fast");$(e).animate({left:-1},"fast",function(){$(this).addClass("hidden")});g=true}};$(e).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(i){$("#DD-helper").show()}).bind("dragend",function(i){$("#DD-helper").hide()}).bind("drag",function(i){x=i.offsetX;x=Math.min(400,Math.max(100,x));if(g){$(h).css("left",0);$(e).removeClass("hidden");g=false}d(x)}).bind("dragclickonly",function(i){a()}).find("div").show();var b=function(i){if((g&&i=="show")||(!g&&i=="hide")){a()}};return{force_panel:b}}function make_right_panel(a,e,h){var j=false;var g=false;var c=null;var d=function(k){$(a).css("width",k);$(e).css("right",k+9);$(h).css("right",k).css("left","");if(document.recalc){document.recalc()}};var i=function(){if(j){$(h).removeClass("hover");$(h).animate({right:c},"fast");$(a).css("right",-c).show().animate({right:0},"fast",function(){d(c);$(h).removeClass("hidden")});j=false}else{c=$(document).width()-$(h).position().left-$(h).outerWidth();$(e).css("right",$(h).innerWidth()+1);if(document.recalc){document.recalc()}$(h).removeClass("hover");$(a).animate({right:-c},"fast");$(h).animate({right:-1},"fast",function(){$(this).addClass("hidden")});j=true}g=false};var b=function(k){var l=$(e).width()-(j?c:0);if(l<k){if(!j){i();g=true}}else{if(g){i();g=false}}};$(h).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(k){$("#DD-helper").show()}).bind("dragend",function(k){$("#DD-helper").hide()}).bind("drag",function(k){x=k.offsetX;w=$(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(j){$(a).css("right",0);$(h).removeClass("hidden");j=false}d(w-x-$(this).outerWidth())}).bind("dragclickonly",function(k){i()}).find("div").show();var f=function(k){if((j&&k=="show")||(!j&&k=="hide")){i()}};return{handle_minwidth_hint:b,force_panel:f}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide()})}function show_modal(f,c,e,d){$(".dialog-box").find(".title").html(f);var a=$(".dialog-box").find(".buttons").html("");if(e){$.each(e,function(b,g){a.append($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}var a=$(".dialog-box").find(".extra_buttons").html("");if(d){$.each(d,function(b,g){a.append($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}if(c=="progress"){c=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(c);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}}function make_popupmenu(d,b){var a=$("<div class='popupmenu'><div class='popupmenu-top'><div class='popupmenu-top-inner'/></div></div>").appendTo("body");$.each(b,function(g,f){$("<div class='popupmenu-item' />").html(g).click(f).appendTo(a)});var c=function(){$(a).unbind().hide();$("#popup-helper").unbind().hide()};var e=function(){var f=$(d).offset();$("#popup-helper").mousedown(c).show();$(a).click(c).css({top:-1000}).show().css({top:f.top+$(d).height()+9,left:f.left+$(d).width()-$(a).width()})};$(d).click(e)}$(function(){$("span.tab").each(function(){var a=$(this).children("div.submenu");if(a.length>0){if($.browser.msie){a.prepend("<iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter:Alpha(Opacity='0');\"></iframe>")}$(this).hover(function(){a.show()},function(){a.hide()});a.click(function(){a.hide()})}})});function user_changed(a,b){if(a){$(".loggedin-only").show();$(".loggedout-only").hide();$("#user-email").text(a);if(b){$(".admin-only").show()}}else{$(".loggedin-only").hide();$(".loggedout-only").show();$(".admin-only").hide()}};
|
||||
File diff suppressed because one or more lines are too long
@@ -2,4 +2,4 @@
|
||||
jquery.event.drag.js ~ v1.4 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
||||
Liscensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
|
||||
*/
|
||||
(function(H){H.fn.drag=function(K,J,I){if(J){this.bind("dragstart",K)}if(I){this.bind("dragend",I)}return !K?this.trigger("drag"):this.bind("drag",J?J:K)};var D=H.event,B=D.special,F=B.drag={not:":input",distance:0,which:1,setup:function(I){I=H.extend({distance:F.distance,which:F.which,not:F.not},I||{});I.distance=G(I.distance);D.add(this,"mousedown",E,I)},teardown:function(){D.remove(this,"mousedown",E);if(this===F.dragging){F.dragging=F.proxy=null}C(this,true)}};function E(K){var J=this,I,L=K.data||{};if(L.elem){J=K.dragTarget=L.elem;K.dragProxy=F.proxy||J;K.cursorOffsetX=L.pageX-L.left;K.cursorOffsetY=L.pageY-L.top;K.offsetX=K.pageX-K.cursorOffsetX;K.offsetY=K.pageY-K.cursorOffsetY}else{if(F.dragging||(L.which>0&&K.which!=L.which)||H(K.target).is(L.not)){return }}switch(K.type){case"mousedown":H.extend(L,H(J).offset(),{elem:J,target:K.target,pageX:K.pageX,pageY:K.pageY});D.add(document,"mousemove mouseup",E,L);C(J,false);return false;case !F.dragging&&"mousemove":if(G(K.pageX-L.pageX)+G(K.pageY-L.pageY)<L.distance){break}K.target=L.target;I=A(K,"dragstart",J);if(I!==false){F.dragging=J;F.proxy=K.dragProxy=H(I||J)[0]}case"mousemove":if(F.dragging){I=A(K,"drag",J);if(B.drop){B.drop.allowed=(I!==false);B.drop.handler(K)}if(I!==false){break}K.type="mouseup"}case"mouseup":D.remove(document,"mousemove mouseup",E);if(F.dragging){if(B.drop){B.drop.handler(K)}A(K,"dragend",J)}C(J,true);F.dragging=F.proxy=L.elem=null;break}}function A(L,J,K){L.type=J;var I=D.handle.call(K,L);return I===false?false:I||L.result}function G(I){return Math.pow(I,2)}function C(J,I){if(!J){return }J.unselectable=I?"off":"on";J.onselectstart=function(){return I};if(document.selection&&document.selection.empty){document.selection.empty()}if(J.style){J.style.MozUserSelect=I?"":"none"}}})(jQuery);
|
||||
(function(h){h.fn.drag=function(k,j,i){if(j){this.bind("dragstart",k)}if(i){this.bind("dragend",i)}return !k?this.trigger("drag"):this.bind("drag",j?j:k)};var d=h.event,b=d.special,f=b.drag={not:":input",distance:0,which:1,setup:function(i){i=h.extend({distance:f.distance,which:f.which,not:f.not},i||{});i.distance=g(i.distance);d.add(this,"mousedown",e,i)},teardown:function(){d.remove(this,"mousedown",e);if(this===f.dragging){f.dragging=f.proxy=null}c(this,true)}};function e(k){var j=this,i,l=k.data||{};if(l.elem){j=k.dragTarget=l.elem;k.dragProxy=f.proxy||j;k.cursorOffsetX=l.pageX-l.left;k.cursorOffsetY=l.pageY-l.top;k.offsetX=k.pageX-k.cursorOffsetX;k.offsetY=k.pageY-k.cursorOffsetY}else{if(f.dragging||(l.which>0&&k.which!=l.which)||h(k.target).is(l.not)){return}}switch(k.type){case"mousedown":h.extend(l,h(j).offset(),{elem:j,target:k.target,pageX:k.pageX,pageY:k.pageY});d.add(document,"mousemove mouseup",e,l);c(j,false);return false;case !f.dragging&&"mousemove":if(g(k.pageX-l.pageX)+g(k.pageY-l.pageY)<l.distance){break}k.target=l.target;i=a(k,"dragstart",j);if(i!==false){f.dragging=j;f.proxy=k.dragProxy=h(i||j)[0]}case"mousemove":if(f.dragging){i=a(k,"drag",j);if(b.drop){b.drop.allowed=(i!==false);b.drop.handler(k)}if(i!==false){break}k.type="mouseup"}case"mouseup":d.remove(document,"mousemove mouseup",e);if(f.dragging){if(b.drop){b.drop.handler(k)}a(k,"dragend",j)}else{a(k,"dragclickonly",j)}c(j,true);f.dragging=f.proxy=l.elem=null;break}}function a(l,j,k){l.type=j;var i=d.handle.call(k,l);return i===false?false:i||l.result}function g(i){return Math.pow(i,2)}function c(j,i){if(!j){return}j.unselectable=i?"off":"on";j.onselectstart=function(){return i};if(document.selection&&document.selection.empty){document.selection.empty()}if(j.style){j.style.MozUserSelect=i?"":"none"}}})(jQuery);
|
||||
@@ -1 +0,0 @@
|
||||
(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=a.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user