55 * gridstack.js may be freely distributed under the MIT license.
66 * @preserve
77*/
8- ! function ( a ) { if ( "function" == typeof define && define . amd ) define ( [ "jquery" , "lodash" , "gridstack" , "jquery-ui/data" , "jquery-ui/disable-selection" , "jquery-ui/focusable" , "jquery-ui/form" , "jquery-ui/ie" , "jquery-ui/keycode" , "jquery-ui/labels" , "jquery-ui/jquery-1-7" , "jquery-ui/plugin" , "jquery-ui/safe-active-element" , "jquery-ui/safe-blur" , "jquery-ui/scroll-parent" , "jquery-ui/tabbable" , "jquery-ui/unique-id" , "jquery-ui/version" , "jquery-ui/widget" , "jquery-ui/widgets/mouse" , "jquery-ui/widgets/draggable" , "jquery-ui/widgets/droppable" , "jquery-ui/widgets/resizable" ] , a ) ; else if ( "undefined" != typeof exports ) { try { jQuery = require ( "jquery" ) } catch ( a ) { } try { _ = require ( "lodash" ) } catch ( a ) { } try { GridStackUI = require ( "gridstack" ) } catch ( a ) { } a ( jQuery , _ , GridStackUI ) } else a ( jQuery , _ , GridStackUI ) } ( function ( a , b , c ) { /**
8+ ( function ( factory ) {
9+ if ( typeof define === 'function' && define . amd ) {
10+ define ( [ 'jquery' , 'lodash' , 'gridstack' , 'jquery-ui/data' , 'jquery-ui/disable-selection' , 'jquery-ui/focusable' ,
11+ 'jquery-ui/form' , 'jquery-ui/ie' , 'jquery-ui/keycode' , 'jquery-ui/labels' , 'jquery-ui/jquery-1-7' ,
12+ 'jquery-ui/plugin' , 'jquery-ui/safe-active-element' , 'jquery-ui/safe-blur' , 'jquery-ui/scroll-parent' ,
13+ 'jquery-ui/tabbable' , 'jquery-ui/unique-id' , 'jquery-ui/version' , 'jquery-ui/widget' ,
14+ 'jquery-ui/widgets/mouse' , 'jquery-ui/widgets/draggable' , 'jquery-ui/widgets/droppable' ,
15+ 'jquery-ui/widgets/resizable' ] , factory ) ;
16+ } else if ( typeof exports !== 'undefined' ) {
17+ try { jQuery = require ( 'jquery' ) ; } catch ( e ) { }
18+ try { _ = require ( 'lodash' ) ; } catch ( e ) { }
19+ try { GridStackUI = require ( 'gridstack' ) ; } catch ( e ) { }
20+ factory ( jQuery , _ , GridStackUI ) ;
21+ } else {
22+ factory ( jQuery , _ , GridStackUI ) ;
23+ }
24+ } ) ( function ( $ , _ , GridStackUI ) {
25+
26+ var scope = window ;
27+
28+ /**
929 * @class JQueryUIGridStackDragDropPlugin
1030 * jQuery UI implementation of drag'n'drop gridstack plugin.
1131 */
12- function d ( a ) { c . GridStackDragDropPlugin . call ( this , a ) } window ; return c . GridStackDragDropPlugin . registerPlugin ( d ) , d . prototype = Object . create ( c . GridStackDragDropPlugin . prototype ) , d . prototype . constructor = d , d . prototype . resizable = function ( c , d ) { if ( c = a ( c ) , "disable" === d || "enable" === d ) c . resizable ( d ) ; else if ( "option" === d ) { var e = arguments [ 2 ] , f = arguments [ 3 ] ; c . resizable ( d , e , f ) } else c . resizable ( b . extend ( { } , this . grid . opts . resizable , { start :d . start || function ( ) { } , stop :d . stop || function ( ) { } , resize :d . resize || function ( ) { } } ) ) ; return this } , d . prototype . draggable = function ( c , d ) { return c = a ( c ) , "disable" === d || "enable" === d ?c . draggable ( d ) :c . draggable ( b . extend ( { } , this . grid . opts . draggable , { containment :this . grid . opts . isNested ?this . grid . container . parent ( ) :null , start :d . start || function ( ) { } , stop :d . stop || function ( ) { } , drag :d . drag || function ( ) { } } ) ) , this } , d . prototype . droppable = function ( b , c ) { return b = a ( b ) , "disable" === c || "enable" === c ?b . droppable ( c ) :b . droppable ( { accept :c . accept } ) , this } , d . prototype . isDroppable = function ( b , c ) { return b = a ( b ) , Boolean ( b . data ( "droppable" ) ) } , d . prototype . on = function ( b , c , d ) { return a ( b ) . on ( c , d ) , this } , d } ) ;
13- //# sourceMappingURL=gridstack.min.map
32+ function JQueryUIGridStackDragDropPlugin ( grid ) {
33+ GridStackUI . GridStackDragDropPlugin . call ( this , grid ) ;
34+ }
35+
36+ GridStackUI . GridStackDragDropPlugin . registerPlugin ( JQueryUIGridStackDragDropPlugin ) ;
37+
38+ JQueryUIGridStackDragDropPlugin . prototype = Object . create ( GridStackUI . GridStackDragDropPlugin . prototype ) ;
39+ JQueryUIGridStackDragDropPlugin . prototype . constructor = JQueryUIGridStackDragDropPlugin ;
40+
41+ JQueryUIGridStackDragDropPlugin . prototype . resizable = function ( el , opts ) {
42+ el = $ ( el ) ;
43+ if ( opts === 'disable' || opts === 'enable' ) {
44+ el . resizable ( opts ) ;
45+ } else if ( opts === 'option' ) {
46+ var key = arguments [ 2 ] ;
47+ var value = arguments [ 3 ] ;
48+ el . resizable ( opts , key , value ) ;
49+ } else {
50+ el . resizable ( _ . extend ( { } , this . grid . opts . resizable , {
51+ start : opts . start || function ( ) { } ,
52+ stop : opts . stop || function ( ) { } ,
53+ resize : opts . resize || function ( ) { }
54+ } ) ) ;
55+ }
56+ return this ;
57+ } ;
58+
59+ JQueryUIGridStackDragDropPlugin . prototype . draggable = function ( el , opts ) {
60+ el = $ ( el ) ;
61+ if ( opts === 'disable' || opts === 'enable' ) {
62+ el . draggable ( opts ) ;
63+ } else {
64+ el . draggable ( _ . extend ( { } , this . grid . opts . draggable , {
65+ containment : this . grid . opts . isNested ? this . grid . container . parent ( ) : null ,
66+ start : opts . start || function ( ) { } ,
67+ stop : opts . stop || function ( ) { } ,
68+ drag : opts . drag || function ( ) { }
69+ } ) ) ;
70+ }
71+ return this ;
72+ } ;
73+
74+ JQueryUIGridStackDragDropPlugin . prototype . droppable = function ( el , opts ) {
75+ el = $ ( el ) ;
76+ if ( opts === 'disable' || opts === 'enable' ) {
77+ el . droppable ( opts ) ;
78+ } else {
79+ el . droppable ( {
80+ accept : opts . accept
81+ } ) ;
82+ }
83+ return this ;
84+ } ;
85+
86+ JQueryUIGridStackDragDropPlugin . prototype . isDroppable = function ( el , opts ) {
87+ el = $ ( el ) ;
88+ return Boolean ( el . data ( 'droppable' ) ) ;
89+ } ;
90+
91+ JQueryUIGridStackDragDropPlugin . prototype . on = function ( el , eventName , callback ) {
92+ $ ( el ) . on ( eventName , callback ) ;
93+ return this ;
94+ } ;
95+
96+ return JQueryUIGridStackDragDropPlugin ;
97+ } ) ;
0 commit comments