Commit 467b32b7 authored by Pavel Reznikov's avatar Pavel Reznikov
Browse files

minify files

parent a475434f
.grid-stack{position:relative}.grid-stack-item{position:absolute;padding:0}.grid-stack-item .grid-stack-item-content,.grid-stack-item .placeholder-content{margin:0;position:absolute;top:0;left:10px;right:10px;bottom:0;width:auto;z-index:0!important}.grid-stack-placeholder .placeholder-content{border:1px dashed #d3d3d3}.grid-stack-item.ui-draggable-dragging,.grid-stack-item.ui-resizable-resizing{z-index:100}.grid-stack-item.ui-draggable-dragging .box,.grid-stack-item.ui-resizable-resizing .box{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.grid-stack-item .ui-resizable-handle{padding:3px;margin:3px 0;cursor:nwse-resize;color:gray;position:absolute;bottom:0;right:15px;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);font-size:10px}.grid-stack-item .ui-resizable-handle::before{content:"\f065"}.grid-stack-item[data-gs-width="12"]{width:100%}.grid-stack-item[data-gs-width="11"]{width:91.66666667%}.grid-stack-item[data-gs-width="10"]{width:83.33333333%}.grid-stack-item[data-gs-width="9"]{width:75%}.grid-stack-item[data-gs-width="8"]{width:66.66666667%}.grid-stack-item[data-gs-width="7"]{width:58.33333333%}.grid-stack-item[data-gs-width="6"]{width:50%}.grid-stack-item[data-gs-width="5"]{width:41.66666667%}.grid-stack-item[data-gs-width="4"]{width:33.33333333%}.grid-stack-item[data-gs-width="3"]{width:25%}.grid-stack-item[data-gs-width="2"]{width:16.66666667%}.grid-stack-item[data-gs-width="1"]{width:8.33333333%}.grid-stack-item[data-gs-x="12"]{left:100%}.grid-stack-item[data-gs-x="11"]{left:91.66666667%}.grid-stack-item[data-gs-x="10"]{left:83.33333333%}.grid-stack-item[data-gs-x="9"]{left:75%}.grid-stack-item[data-gs-x="8"]{left:66.66666667%}.grid-stack-item[data-gs-x="7"]{left:58.33333333%}.grid-stack-item[data-gs-x="6"]{left:50%}.grid-stack-item[data-gs-x="5"]{left:41.66666667%}.grid-stack-item[data-gs-x="4"]{left:33.33333333%}.grid-stack-item[data-gs-x="3"]{left:25%}.grid-stack-item[data-gs-x="2"]{left:16.66666667%}.grid-stack-item[data-gs-x="1"]{left:8.33333333%}.grid-stack-item[data-gs-height="1"]{height:60px}.grid-stack-item[data-gs-height="2"]{height:140px}.grid-stack-item[data-gs-height="3"]{height:220px}.grid-stack-item[data-gs-height="4"]{height:300px}.grid-stack-item[data-gs-height="5"]{height:380px}.grid-stack-item[data-gs-height="6"]{height:460px}.grid-stack-item[data-gs-height="7"]{height:540px}.grid-stack-item[data-gs-height="8"]{height:620px}.grid-stack-item[data-gs-height="9"]{height:700px}.grid-stack-item[data-gs-height="10"]{height:780px}.grid-stack-item[data-gs-height="11"]{height:860px}.grid-stack-item[data-gs-height="12"]{height:940px}.grid-stack-item[data-gs-height="13"]{height:1020px}.grid-stack-item[data-gs-height="14"]{height:1100px}.grid-stack-item[data-gs-height="15"]{height:1180px}.grid-stack-item[data-gs-height="16"]{height:1260px}.grid-stack-item[data-gs-height="17"]{height:1340px}.grid-stack-item[data-gs-height="18"]{height:1420px}.grid-stack-item[data-gs-height="19"]{height:1500px}.grid-stack-item[data-gs-height="20"]{height:1580px}.grid-stack-item[data-gs-y="0"]{top:0}.grid-stack-item[data-gs-y="1"]{top:80px}.grid-stack-item[data-gs-y="2"]{top:160px}.grid-stack-item[data-gs-y="3"]{top:240px}.grid-stack-item[data-gs-y="4"]{top:320px}.grid-stack-item[data-gs-y="5"]{top:400px}.grid-stack-item[data-gs-y="6"]{top:480px}.grid-stack-item[data-gs-y="7"]{top:560px}.grid-stack-item[data-gs-y="8"]{top:640px}.grid-stack-item[data-gs-y="9"]{top:720px}.grid-stack-item[data-gs-y="10"]{top:800px}.grid-stack-item[data-gs-y="11"]{top:880px}.grid-stack-item[data-gs-y="12"]{top:960px}.grid-stack-item[data-gs-y="13"]{top:1040px}.grid-stack-item[data-gs-y="14"]{top:1120px}.grid-stack-item[data-gs-y="15"]{top:1200px}.grid-stack-item[data-gs-y="16"]{top:1280px}.grid-stack-item[data-gs-y="17"]{top:1360px}.grid-stack-item[data-gs-y="18"]{top:1440px}.grid-stack-item[data-gs-y="19"]{top:1520px}@media (max-width:768px){.grid-stack-item{position:relative!important;width:auto!important;left:0!important;top:auto!important;margin-bottom:20px}.grid-stack{height:auto!important}}
!function(a,b){var c={is_intercepted:function(a,b){return!(a.x+a.width<=b.x||b.x+b.width<=a.x||a.y+a.height<=b.y||b.y+b.height<=a.y)}},d=0,e=function(a,b){this.width=a,this.nodes=[],this.onchange=b||function(){}};e.prototype._fix_collisions=function(a){for(this._sort_nodes(-1);;){var d=b.find(this.nodes,function(b){return b!=a&&c.is_intercepted(b,a)},this);if("undefined"==typeof d)return;this.move_node(d,d.x,a.y+a.height,d.width,d.height,!0)}},e.prototype._sort_nodes=function(a){a=-1!=a?1:-1,this.nodes=b.sortBy(this.nodes,function(b){return a*(b.x+b.y*this.width)},this)},e.prototype._pack_nodes=function(){this._sort_nodes(),b.each(this.nodes,function(a,d){for(;a.y>0;){var e=a.y-1,f=0==d;if(d>0){var g=b.chain(this.nodes).first(d).find(function(b){return c.is_intercepted({x:a.x,y:e,width:a.width,height:a.height},b)}).value();f="undefined"==typeof g}if(!f)break;a._dirty=a.y!=e,a.y=e}},this)},e.prototype._prepare_node=function(a,c){return a=b.defaults(a||{},{width:1,height:1,x:0,y:0}),a.x=parseInt(""+a.x),a.y=parseInt(""+a.y),a.width=parseInt(""+a.width),a.height=parseInt(""+a.height),a.auto_position=a.auto_position||!1,a.width>this.width?a.width=this.width:a.width<1&&(a.width=1),a.height<1&&(a.height=1),a.x<0&&(a.x=0),a.x+a.width>this.width&&(c?a.x=this.width-a.width:a.width=this.width-a.x),a.y<0&&(a.y=0),a},e.prototype._notify=function(){var a=Array.prototype.slice.call(arguments,1).concat(this.get_dirty_nodes());a=a.concat(this.get_dirty_nodes()),this.onchange(a)},e.prototype.clean_nodes=function(){b.each(this.nodes,function(a){a._dirty=!1})},e.prototype.get_dirty_nodes=function(){return b.filter(this.nodes,function(a){return a._dirty})},e.prototype.add_node=function(a){if(a=this._prepare_node(a),"undefined"!=typeof a.max_width&&(a.width=Math.min(a.width,a.max_width)),"undefined"!=typeof a.max_height&&(a.height=Math.min(a.height,a.max_height)),"undefined"!=typeof a.min_width&&(a.width=Math.max(a.width,a.min_width)),"undefined"!=typeof a.min_height&&(a.height=Math.max(a.height,a.min_height)),a._id=++d,a._dirty=!0,a.auto_position){this._sort_nodes();for(var e=0;;++e){var f=e%this.width,g=Math.floor(e/this.width);if(!b.find(this.nodes,function(b){return c.is_intercepted({x:f,y:g,width:a.width,height:a.height},b)})){a.x=f,a.y=g;break}}}return this.nodes.push(a),this._fix_collisions(a),this._pack_nodes(),this._notify(),a},e.prototype.remove_node=function(a){a._id=null,this.nodes=b.without(this.nodes,a),this._pack_nodes(),this._notify(a)},e.prototype.move_node=function(a,b,c,d,e,f){if("undefined"==typeof b&&(b=a.x),"undefined"==typeof c&&(c=a.y),"undefined"==typeof d&&(d=a.width),"undefined"==typeof e&&(e=a.height),"undefined"!=typeof a.max_width&&(d=Math.min(d,a.max_width)),"undefined"!=typeof a.max_height&&(e=Math.min(e,a.max_height)),"undefined"!=typeof a.min_width&&(d=Math.max(d,a.min_width)),"undefined"!=typeof a.min_height&&(e=Math.max(e,a.min_height)),a.x==b&&a.y==c&&a.width==d&&a.height==e)return a;var g=a.x!=b;return a._dirty=!0,a.x=b,a.y=c,a.width=d,a.height=e,a=this._prepare_node(a,g),this._fix_collisions(a),f||(this._pack_nodes(),this._notify()),a},e.prototype.get_grid_height=function(){return b.reduce(this.nodes,function(a,b){return Math.max(a,b.y+b.height)},0)};var f=function(a,c){var f,d=this;this.container=$(a),this.opts=b.defaults(c||{},{width:12,item_class:"grid-stack-item",placeholder_class:"grid-stack-placeholder",handle:".grid-stack-item-content",cell_height:60,vertical_margin:20,auto:!0,min_width:768}),this.grid=new e(this.opts.width,function(a){b.each(a,function(a){null==a._id?a.el.remove():a.el.attr("data-gs-x",a.x).attr("data-gs-y",a.y).attr("data-gs-width",a.width).attr("data-gs-height",a.height)})}),this.opts.auto&&this.container.find("."+this.opts.item_class).each(function(a,b){d._prepare_element(b)}),this.placeholder=$('<div class="'+this.opts.placeholder_class+" "+this.opts.item_class+'"><div class="placeholder-content" /></div>').hide(),this.container.append(this.placeholder),this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin);var g=function(){if(d._is_one_column_mode()){if(f)return;f=!0,b.each(d.grid.nodes,function(a){a.el.draggable("disable"),a.el.attr("data-gs-no-resize")||a.el.resizable("disable")})}else{if(!f)return;f=!1,b.each(d.grid.nodes,function(a){a.el.draggable("enable"),a.el.attr("data-gs-no-resize")||a.el.resizable("enable")})}};$(window).resize(g),g()};f.prototype._update_container_height=function(){this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin)},f.prototype._is_one_column_mode=function(){return $(window).width()<=this.opts.min_width},f.prototype._prepare_element=function(a){var c=this;a=$(a);var d=c.grid.add_node({x:a.attr("data-gs-x"),y:a.attr("data-gs-y"),width:a.attr("data-gs-width"),height:a.attr("data-gs-height"),max_width:a.attr("data-gs-max-width"),min_width:a.attr("data-gs-min-width"),max_height:a.attr("data-gs-max-height"),min_height:a.attr("data-gs-min-height"),auto_position:a.attr("data-gs-auto-position"),el:a});a.data("_gridstack_node",d);var e,f=this.opts.cell_height+this.opts.vertical_margin/2,g=function(){var f=$(this);c.grid.clean_nodes(),e=Math.ceil(f.outerWidth()/f.attr("data-gs-width")),c.placeholder.attr("data-gs-x",f.attr("data-gs-x")).attr("data-gs-y",f.attr("data-gs-y")).attr("data-gs-width",f.attr("data-gs-width")).attr("data-gs-height",f.attr("data-gs-height")).show(),d.el=c.placeholder},h=function(){var f=$(this);d.el=f,c.placeholder.hide(),f.attr("data-gs-x",d.x).attr("data-gs-y",d.y).attr("data-gs-width",d.width).attr("data-gs-height",d.height).removeAttr("style"),c._update_container_height(),c.container.trigger("change",[c.grid.get_dirty_nodes()]),c.grid._sort_nodes(),b.each(c.grid.nodes,function(a){a.el.detach(),c.container.append(a.el)})};a.draggable({handle:this.opts.handle,scroll:!0,appendTo:"body",start:g,stop:h,drag:function(a,b){var g=Math.round(b.position.left/e),h=Math.floor(b.position.top/f);c.grid.move_node(d,g,h),c._update_container_height()}}),this._is_one_column_mode()&&a.draggable("disable"),a.attr("data-gs-no-resize")||(a.resizable({autoHide:!0,handles:"se",minHeight:this.opts.cell_height-10,minWidth:70,start:g,stop:h,resize:function(a,b){var g=Math.round(b.size.width/e),h=Math.round(b.size.height/f);c.grid.move_node(d,d.x,d.y,g,h),c._update_container_height()}}),this._is_one_column_mode()&&a.resizable("disable"))},f.prototype.add_widget=function(a,b,c,d,e,f){a=$(a),"undefined"!=typeof b&&a.attr("data-gs-x",b),"undefined"!=typeof c&&a.attr("data-gs-y",c),"undefined"!=typeof d&&a.attr("data-gs-width",d),"undefined"!=typeof e&&a.attr("data-gs-height",e),"undefined"!=typeof f&&a.attr("data-gs-auto-position",f),this.container.append(a),this._prepare_element(a),this._update_container_height()},f.prototype.remove_widget=function(a){var b=$(a).data("_gridstack_node");this.grid.remove_node(b),a.remove(),this._update_container_height()},a.GridStackUI=f,$.fn.gridstack=function(a){return this.each(function(){$(this).data("gridstack")||$(this).data("gridstack",new f(this,a))})}}(window,_);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment