You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
811 B

define(["jquery","core/sortable_list","core/ajax","core/notification"],function(a,b,c,d){return{init:function(e,f){var g=new b("#"+e+" tbody");g.getElementName=function(b){return a.Deferred().resolve(b.attr("data-name"))};var h;a("#"+e+" tbody tr").on(b.EVENTS.DRAGSTART,function(b,c){h=c.sourceList.children().index(c.element),setTimeout(function(){a(".sortable-list-is-dragged").width(c.element.width())},501)}).on(b.EVENTS.DROP,function(a,b){var e=b.targetList.children().index(b.element),g=b.element.find("[data-action="+f+"]");if(b.positionChanged&&g.length){var i={methodname:"tool_xmldb_invoke_move_action",args:{action:f,dir:g.attr("data-dir"),table:g.attr("data-table"),field:g.attr("data-field"),key:g.attr("data-key"),index:g.attr("data-index"),position:e-h}};c.call([i])[0].fail(d.exception)}})}}});