Sha256: 40a0071e40c9f1502d3d9d2efaf464ab77d1361b90b677c7b55b23ab8dd07575

Contents?: true

Size: 1.93 KB

Versions: 1

Compression:

Stored size: 1.93 KB

Contents

/*
* Kendo UI Beta v2013.2.716 (http://kendoui.com)
* Copyright 2013 Telerik AD. All rights reserved.
*
* Kendo UI Beta license terms available at
* http://www.kendoui.com/purchase/license-agreement/kendo-ui-beta.aspx
*/

("function"==typeof define&&define.amd?define:function(e,r){return r()})(["./kendo.core.min","./kendo.draganddrop.min"],function(){!function(e){function r(r,d){r=e(r),d?r.find(".k-drag-status").removeClass("k-add").addClass("k-denied"):r.find(".k-drag-status").removeClass("k-denied").addClass("k-add")}var d=window.kendo,n=d.ui.Widget,a="change",i="k-reorderable",o=n.extend({init:function(o,t){var g,l=this,s=d.guid()+"-reorderable";n.fn.init.call(l,o,t),o=l.element.addClass(i),t=l.options,l.draggable=g=t.draggable||new d.ui.Draggable(o,{group:s,filter:t.filter,hint:t.hint}),l.reorderDropCue=e('<div class="k-reorder-cue"><div class="k-icon k-i-arrow-s"></div><div class="k-icon k-i-arrow-n"></div></div>'),o.find(g.options.filter).kendoDropTarget({group:g.options.group,dragenter:function(e){if(l._draggable){var n,a=this.element,i=a[0]===l._draggable[0];r(e.draggable.hint,i),i||(n=d.getOffset(a),l.reorderDropCue.css({height:a.outerHeight(),top:n.top,left:n.left+(a.index()>l._draggable.index()?a.outerWidth():0)}).appendTo(document.body))}},dragleave:function(e){r(e.draggable.hint,!0),l.reorderDropCue.remove()},drop:function(){if(l._draggable){var e,r=l._draggable[0],d=this.element[0];r!==d&&(e=o.find(g.options.filter),l.trigger(a,{element:l._draggable,oldIndex:e.index(r),newIndex:e.index(d)}))}}}),g.bind(["dragcancel","dragend","dragstart"],{dragcancel:function(){l.reorderDropCue.remove(),l._draggable=null},dragend:function(){l.reorderDropCue.remove(),l._draggable=null},dragstart:function(e){l._draggable=e.currentTarget}})},options:{name:"Reorderable",filter:"*"},events:[a],destroy:function(){var e=this;n.fn.destroy.call(e),e.draggable&&e.draggable.destroy(),d.destroy(e.element)}});d.ui.plugin(o)}(window.kendo.jQuery)});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kendoui-rails-0.1.1 vendor/assets/javascripts/kendo/kendo.reorderable.min.js