Merged changes
This commit is contained in:
commit
5e06c68e98
14 changed files with 2954 additions and 259 deletions
983
src/gridstack-extra.css
Normal file
983
src/gridstack-extra.css
Normal file
|
|
@ -0,0 +1,983 @@
|
|||
.grid-stack.grid-stack-1 > .grid-stack-item {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item {
|
||||
min-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item {
|
||||
min-width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item {
|
||||
min-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item {
|
||||
min-width: 14.28571429%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 14.28571429%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 14.28571429%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 14.28571429%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 14.28571429%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 28.57142857%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 28.57142857%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 28.57142857%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 28.57142857%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 42.85714286%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 42.85714286%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 42.85714286%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 42.85714286%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 57.14285714%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 57.14285714%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 57.14285714%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 57.14285714%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 71.42857143%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 71.42857143%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 71.42857143%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 71.42857143%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 85.71428571%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 85.71428571%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 85.71428571%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 85.71428571%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item {
|
||||
min-width: 12.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 12.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 12.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 12.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 12.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 37.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 37.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 37.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 37.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 62.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 62.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 62.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 62.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 87.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 87.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 87.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 87.5%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item {
|
||||
min-width: 11.11111111%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 11.11111111%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 11.11111111%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 11.11111111%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 11.11111111%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 22.22222222%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 22.22222222%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 22.22222222%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 22.22222222%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 44.44444444%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 44.44444444%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 44.44444444%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 44.44444444%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 55.55555556%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 55.55555556%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 55.55555556%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 55.55555556%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 77.77777778%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 77.77777778%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 77.77777778%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 77.77777778%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 88.88888889%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 88.88888889%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 88.88888889%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 88.88888889%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item {
|
||||
min-width: 10%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 10%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 10%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 10%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 10%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 20%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 30%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 30%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 30%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 30%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 40%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 60%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 70%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 70%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 70%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 70%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 80%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 90%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 90%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 90%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 90%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item {
|
||||
min-width: 9.09090909%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 9.09090909%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 9.09090909%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 9.09090909%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 9.09090909%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 18.18181818%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 18.18181818%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 18.18181818%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 18.18181818%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 27.27272727%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 27.27272727%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 27.27272727%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 27.27272727%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 36.36363636%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 36.36363636%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 36.36363636%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 36.36363636%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 45.45454545%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 45.45454545%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 45.45454545%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 45.45454545%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 54.54545455%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 54.54545455%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 54.54545455%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 54.54545455%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 63.63636364%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 63.63636364%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 63.63636364%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 63.63636364%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 72.72727273%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 72.72727273%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 72.72727273%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 72.72727273%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 81.81818182%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 81.81818182%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 81.81818182%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 81.81818182%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 90.90909091%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 90.90909091%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 90.90909091%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 90.90909091%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='11'] {
|
||||
width: 100.0%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='11'] {
|
||||
left: 100.0%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='11'] {
|
||||
min-width: 100.0%;
|
||||
}
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='11'] {
|
||||
max-width: 100.0%;
|
||||
}
|
||||
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item {
|
||||
min-width: 8.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 8.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 8.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 8.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 8.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 25%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 41.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 41.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 41.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 41.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 58.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 58.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 58.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 58.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 75%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='11'] {
|
||||
width: 91.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='11'] {
|
||||
left: 91.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='11'] {
|
||||
min-width: 91.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='11'] {
|
||||
max-width: 91.66666667%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='12'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='12'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='12'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='12'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
21
src/gridstack-extra.scss
Normal file
21
src/gridstack-extra.scss
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
$gridstack-columns: 12;
|
||||
|
||||
@mixin grid-stack-items($gridstack-columns) {
|
||||
.grid-stack.grid-stack-#{$gridstack-columns} {
|
||||
|
||||
> .grid-stack-item {
|
||||
min-width: 100% / $gridstack-columns;
|
||||
|
||||
@for $i from 1 through $gridstack-columns {
|
||||
&[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
|
||||
&[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
|
||||
&[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
|
||||
&[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@for $j from 1 through $gridstack-columns {
|
||||
@include grid-stack-items($j)
|
||||
}
|
||||
318
src/gridstack.css
Normal file
318
src/gridstack.css
Normal file
|
|
@ -0,0 +1,318 @@
|
|||
:root .grid-stack-item > .ui-resizable-handle {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.grid-stack {
|
||||
position: relative;
|
||||
}
|
||||
.grid-stack .grid-stack-placeholder > .placeholder-content {
|
||||
border: 1px dashed lightgray;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.grid-stack > .grid-stack-item {
|
||||
min-width: 8.33333333%;
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .grid-stack-item-content {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
z-index: 0 !important;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-handle {
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.grid-stack > .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle, .grid-stack > .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
|
||||
display: none;
|
||||
}
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging, .grid-stack > .grid-stack-item.ui-resizable-resizing {
|
||||
z-index: 100;
|
||||
}
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content,
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content, .grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content,
|
||||
.grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
|
||||
box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se,
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
||||
text-align: right;
|
||||
color: gray;
|
||||
padding: 2px 3px 0 0;
|
||||
margin: 0;
|
||||
font: normal normal normal 10px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se::before,
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw::before {
|
||||
content: "\f065";
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
||||
display: inline-block;
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
left: 10px;
|
||||
top: 0;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-n {
|
||||
cursor: n-resize;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
left: 25px;
|
||||
right: 25px;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 10px;
|
||||
right: 10px;
|
||||
top: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-s {
|
||||
cursor: s-resize;
|
||||
height: 10px;
|
||||
left: 25px;
|
||||
bottom: 0;
|
||||
right: 25px;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
left: 10px;
|
||||
bottom: 0;
|
||||
}
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 10px;
|
||||
left: 10px;
|
||||
top: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 8.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 8.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 8.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 8.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 16.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 16.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 16.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 25%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 25%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 25%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 25%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 33.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 33.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 41.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 41.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 41.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 41.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 50%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 50%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 50%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 50%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 58.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 58.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 58.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 58.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 66.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 66.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 75%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 75%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 75%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 75%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 83.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 83.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 83.33333333%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='11'] {
|
||||
width: 91.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='11'] {
|
||||
left: 91.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='11'] {
|
||||
min-width: 91.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='11'] {
|
||||
max-width: 91.66666667%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-width='12'] {
|
||||
width: 100%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-x='12'] {
|
||||
left: 100%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='12'] {
|
||||
min-width: 100%;
|
||||
}
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='12'] {
|
||||
max-width: 100%;
|
||||
}
|
||||
.grid-stack.grid-stack-animate, .grid-stack.grid-stack-animate .grid-stack-item {
|
||||
-webkit-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-moz-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-ms-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-o-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
}
|
||||
.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging, .grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing, .grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder {
|
||||
-webkit-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-moz-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-ms-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-o-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
transition: left 0s, top 0s, height 0s, width 0s;
|
||||
}
|
||||
|
||||
/** Uncomment this to show bottom-left resize handle **/
|
||||
/*
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
||||
display: inline-block;
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
@include vendor(transform, rotate(180deg));
|
||||
}
|
||||
*/
|
||||
@media (max-width: 768px) {
|
||||
.grid-stack-item {
|
||||
position: relative !important;
|
||||
width: auto !important;
|
||||
left: 0 !important;
|
||||
top: auto !important;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.grid-stack-item .ui-resizable-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.grid-stack {
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
349
src/gridstack.js
349
src/gridstack.js
|
|
@ -1,54 +1,57 @@
|
|||
// gridstack.js 0.2.3-dev
|
||||
// gridstack.js 0.2.4-dev
|
||||
// http://troolee.github.io/gridstack.js/
|
||||
// (c) 2014-2015 Pavel Reznikov
|
||||
// gridstack.js may be freely distributed under the MIT license.
|
||||
|
||||
(function (factory) {
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', 'jquery-ui/resizable'], factory);
|
||||
define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable',
|
||||
'jquery-ui/resizable'], factory);
|
||||
}
|
||||
else {
|
||||
factory(jQuery, _);
|
||||
}
|
||||
})(function ($, _) {
|
||||
})(function($, _) {
|
||||
|
||||
var scope = window;
|
||||
|
||||
var Utils = {
|
||||
is_intercepted: function (a, b) {
|
||||
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);
|
||||
},
|
||||
|
||||
sort: function (nodes, dir, width) {
|
||||
width = width || _.chain(nodes).map(function (node) { return node.x + node.width; }).max().value();
|
||||
sort: function(nodes, dir, width) {
|
||||
width = width || _.chain(nodes).map(function(node) { return node.x + node.width; }).max().value();
|
||||
dir = dir != -1 ? 1 : -1;
|
||||
return _.sortBy(nodes, function (n) { return dir * (n.x + n.y * width); });
|
||||
return _.sortBy(nodes, function(n) { return dir * (n.x + n.y * width); });
|
||||
},
|
||||
|
||||
create_stylesheet: function (id) {
|
||||
var style = document.createElement("style");
|
||||
style.setAttribute("type", "text/css");
|
||||
style.setAttribute("data-gs-id", id);
|
||||
create_stylesheet: function(id) {
|
||||
var style = document.createElement('style');
|
||||
style.setAttribute('type', 'text/css');
|
||||
style.setAttribute('data-gs-id', id);
|
||||
if (style.styleSheet) {
|
||||
style.styleSheet.cssText = "";
|
||||
style.styleSheet.cssText = '';
|
||||
}
|
||||
else {
|
||||
style.appendChild(document.createTextNode(""));
|
||||
style.appendChild(document.createTextNode(''));
|
||||
}
|
||||
document.getElementsByTagName('head')[0].appendChild(style);
|
||||
return style.sheet;
|
||||
},
|
||||
|
||||
insert_css_rule: function (sheet, selector, rules, index) {
|
||||
if(typeof sheet.insertRule === 'function') {
|
||||
sheet.insertRule(selector + "{" + rules + "}", index);
|
||||
remove_stylesheet: function(id) {
|
||||
$("STYLE[data-gs-id=" + id +"]").remove();
|
||||
},
|
||||
insert_css_rule: function(sheet, selector, rules, index) {
|
||||
if (typeof sheet.insertRule === 'function') {
|
||||
sheet.insertRule(selector + '{' + rules + '}', index);
|
||||
}
|
||||
else if(typeof sheet.addRule === 'function') {
|
||||
else if (typeof sheet.addRule === 'function') {
|
||||
sheet.addRule(selector, rules, index);
|
||||
}
|
||||
},
|
||||
|
||||
toBool: function (v) {
|
||||
toBool: function(v) {
|
||||
if (typeof v == 'boolean')
|
||||
return v;
|
||||
if (typeof v == 'string') {
|
||||
|
|
@ -61,24 +64,24 @@
|
|||
|
||||
var id_seq = 0;
|
||||
|
||||
var GridStackEngine = function (width, onchange, float, height, items) {
|
||||
var GridStackEngine = function(width, onchange, float_mode, height, items) {
|
||||
this.width = width;
|
||||
this.float = float || false;
|
||||
this['float'] = float_mode || false;
|
||||
this.height = height || 0;
|
||||
|
||||
this.nodes = items || [];
|
||||
this.onchange = onchange || function () {};
|
||||
this.onchange = onchange || function() {};
|
||||
|
||||
this._update_counter = 0;
|
||||
this._float = this.float;
|
||||
this._float = this['float'];
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.batch_update = function () {
|
||||
GridStackEngine.prototype.batch_update = function() {
|
||||
this._update_counter = 1;
|
||||
this.float = true;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.commit = function () {
|
||||
GridStackEngine.prototype.commit = function() {
|
||||
this._update_counter = 0;
|
||||
if (this._update_counter == 0) {
|
||||
this.float = this._float;
|
||||
|
|
@ -87,16 +90,16 @@
|
|||
}
|
||||
};
|
||||
|
||||
GridStackEngine.prototype._fix_collisions = function (node) {
|
||||
GridStackEngine.prototype._fix_collisions = function(node) {
|
||||
this._sort_nodes(-1);
|
||||
|
||||
var nn = node, has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked }));
|
||||
var nn = node, has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked }));
|
||||
if (!this.float && !has_locked) {
|
||||
nn = {x: 0, y: node.y, width: this.width, height: node.height};
|
||||
}
|
||||
|
||||
while (true) {
|
||||
var collision_node = _.find(this.nodes, function (n) {
|
||||
var collision_node = _.find(this.nodes, function(n) {
|
||||
return n != node && Utils.is_intercepted(n, nn);
|
||||
}, this);
|
||||
if (typeof collision_node == 'undefined') {
|
||||
|
|
@ -107,31 +110,32 @@
|
|||
}
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.is_area_empty = function (x, y, width, height) {
|
||||
GridStackEngine.prototype.is_area_empty = function(x, y, width, height) {
|
||||
var nn = {x: x || 0, y: y || 0, width: width || 1, height: height || 1};
|
||||
var collision_node = _.find(this.nodes, function (n) {
|
||||
var collision_node = _.find(this.nodes, function(n) {
|
||||
return Utils.is_intercepted(n, nn);
|
||||
}, this);
|
||||
return collision_node == null;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype._sort_nodes = function (dir) {
|
||||
GridStackEngine.prototype._sort_nodes = function(dir) {
|
||||
this.nodes = Utils.sort(this.nodes, dir, this.width);
|
||||
};
|
||||
|
||||
GridStackEngine.prototype._pack_nodes = function () {
|
||||
GridStackEngine.prototype._pack_nodes = function() {
|
||||
this._sort_nodes();
|
||||
|
||||
if (this.float) {
|
||||
_.each(this.nodes, function (n, i) {
|
||||
_.each(this.nodes, function(n, i) {
|
||||
if (n._updating || typeof n._orig_y == 'undefined' || n.y == n._orig_y)
|
||||
return;
|
||||
|
||||
var new_y = n.y;
|
||||
while (new_y >= n._orig_y) {
|
||||
var collision_node = _.chain(this.nodes)
|
||||
.find(function (bn) {
|
||||
return n != bn && Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn);
|
||||
.find(function(bn) {
|
||||
return n != bn &&
|
||||
Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn);
|
||||
})
|
||||
.value();
|
||||
|
||||
|
|
@ -144,7 +148,7 @@
|
|||
}, this);
|
||||
}
|
||||
else {
|
||||
_.each(this.nodes, function (n, i) {
|
||||
_.each(this.nodes, function(n, i) {
|
||||
if (n.locked)
|
||||
return;
|
||||
while (n.y > 0) {
|
||||
|
|
@ -154,7 +158,7 @@
|
|||
if (i > 0) {
|
||||
var collision_node = _.chain(this.nodes)
|
||||
.take(i)
|
||||
.find(function (bn) {
|
||||
.find(function(bn) {
|
||||
return Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn);
|
||||
})
|
||||
.value();
|
||||
|
|
@ -171,7 +175,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
GridStackEngine.prototype._prepare_node = function (node, resizing) {
|
||||
GridStackEngine.prototype._prepare_node = function(node, resizing) {
|
||||
node = _.defaults(node || {}, {width: 1, height: 1, x: 0, y: 0 });
|
||||
|
||||
node.x = parseInt('' + node.x);
|
||||
|
|
@ -213,7 +217,7 @@
|
|||
return node;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype._notify = function () {
|
||||
GridStackEngine.prototype._notify = function() {
|
||||
if (this._update_counter) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -222,12 +226,12 @@
|
|||
this.onchange(deleted_nodes);
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.clean_nodes = function () {
|
||||
_.each(this.nodes, function (n) {n._dirty = false });
|
||||
GridStackEngine.prototype.clean_nodes = function() {
|
||||
_.each(this.nodes, function(n) {n._dirty = false });
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.get_dirty_nodes = function () {
|
||||
return _.filter(this.nodes, function (n) { return n._dirty; });
|
||||
GridStackEngine.prototype.get_dirty_nodes = function() {
|
||||
return _.filter(this.nodes, function(n) { return n._dirty; });
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.add_node = function(node) {
|
||||
|
|
@ -244,12 +248,12 @@
|
|||
if (node.auto_position) {
|
||||
this._sort_nodes();
|
||||
|
||||
for (var i = 0; ; ++i) {
|
||||
for (var i = 0;; ++i) {
|
||||
var x = i % this.width, y = Math.floor(i / this.width);
|
||||
if (x + node.width > this.width) {
|
||||
continue;
|
||||
}
|
||||
if (!_.find(this.nodes, function (n) {
|
||||
if (!_.find(this.nodes, function(n) {
|
||||
return Utils.is_intercepted({x: x, y: y, width: node.width, height: node.height}, n);
|
||||
})) {
|
||||
node.x = x;
|
||||
|
|
@ -267,15 +271,15 @@
|
|||
return node;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.remove_node = function (node) {
|
||||
GridStackEngine.prototype.remove_node = function(node) {
|
||||
node._id = null;
|
||||
this.nodes = _.without(this.nodes, node);
|
||||
this._pack_nodes();
|
||||
this._notify(node);
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.can_move_node = function (node, x, y, width, height) {
|
||||
var has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked }));
|
||||
GridStackEngine.prototype.can_move_node = function(node, x, y, width, height) {
|
||||
var has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked }));
|
||||
|
||||
if (!this.height && !has_locked)
|
||||
return true;
|
||||
|
|
@ -286,21 +290,29 @@
|
|||
null,
|
||||
this.float,
|
||||
0,
|
||||
_.map(this.nodes, function (n) { if (n == node) { cloned_node = $.extend({}, n); return cloned_node; } return $.extend({}, n) }));
|
||||
_.map(this.nodes, function(n) {
|
||||
if (n == node) {
|
||||
cloned_node = $.extend({}, n);
|
||||
return cloned_node;
|
||||
}
|
||||
return $.extend({}, n);
|
||||
}));
|
||||
|
||||
clone.move_node(cloned_node, x, y, width, height);
|
||||
|
||||
var res = true;
|
||||
|
||||
if (has_locked)
|
||||
res &= !Boolean(_.find(clone.nodes, function (n) { return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty); }));
|
||||
res &= !Boolean(_.find(clone.nodes, function(n) {
|
||||
return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty);
|
||||
}));
|
||||
if (this.height)
|
||||
res &= clone.get_grid_height() <= this.height;
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.can_be_placed_with_respect_to_height = function (node) {
|
||||
GridStackEngine.prototype.can_be_placed_with_respect_to_height = function(node) {
|
||||
if (!this.height)
|
||||
return true;
|
||||
|
||||
|
|
@ -309,12 +321,12 @@
|
|||
null,
|
||||
this.float,
|
||||
0,
|
||||
_.map(this.nodes, function (n) { return $.extend({}, n) }));
|
||||
_.map(this.nodes, function(n) { return $.extend({}, n) }));
|
||||
clone.add_node(node);
|
||||
return clone.get_grid_height() <= this.height;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.move_node = function (node, x, y, width, height, no_pack) {
|
||||
GridStackEngine.prototype.move_node = function(node, x, y, width, height, no_pack) {
|
||||
if (typeof x != 'number') x = node.x;
|
||||
if (typeof y != 'number') y = node.y;
|
||||
if (typeof width != 'number') width = node.width;
|
||||
|
|
@ -347,28 +359,28 @@
|
|||
return node;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.get_grid_height = function () {
|
||||
return _.reduce(this.nodes, function (memo, n) { return Math.max(memo, n.y + n.height); }, 0);
|
||||
GridStackEngine.prototype.get_grid_height = function() {
|
||||
return _.reduce(this.nodes, function(memo, n) { return Math.max(memo, n.y + n.height); }, 0);
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.begin_update = function (node) {
|
||||
_.each(this.nodes, function (n) {
|
||||
GridStackEngine.prototype.begin_update = function(node) {
|
||||
_.each(this.nodes, function(n) {
|
||||
n._orig_y = n.y;
|
||||
});
|
||||
node._updating = true;
|
||||
};
|
||||
|
||||
GridStackEngine.prototype.end_update = function () {
|
||||
_.each(this.nodes, function (n) {
|
||||
GridStackEngine.prototype.end_update = function() {
|
||||
_.each(this.nodes, function(n) {
|
||||
n._orig_y = n.y;
|
||||
});
|
||||
var n = _.find(this.nodes, function (n) { return n._updating; });
|
||||
var n = _.find(this.nodes, function(n) { return n._updating; });
|
||||
if (n) {
|
||||
n._updating = false;
|
||||
}
|
||||
};
|
||||
|
||||
var GridStack = function (el, opts) {
|
||||
var GridStack = function(el, opts) {
|
||||
var self = this, one_column_mode;
|
||||
|
||||
this.container = $(el);
|
||||
|
|
@ -387,6 +399,7 @@
|
|||
auto: true,
|
||||
min_width: 768,
|
||||
float: false,
|
||||
static_grid: false,
|
||||
_class: 'grid-stack-' + (Math.random() * 10000).toFixed(0),
|
||||
animate: Boolean(this.container.attr('data-gs-animate')) || false,
|
||||
always_show_resize_handle: opts.always_show_resize_handle || false,
|
||||
|
|
@ -403,15 +416,18 @@
|
|||
this.opts.is_nested = is_nested;
|
||||
|
||||
this.container.addClass(this.opts._class);
|
||||
|
||||
this._set_static_class();
|
||||
|
||||
if (is_nested) {
|
||||
this.container.addClass('grid-stack-nested');
|
||||
}
|
||||
|
||||
this._init_styles();
|
||||
|
||||
this.grid = new GridStackEngine(this.opts.width, function (nodes) {
|
||||
this.grid = new GridStackEngine(this.opts.width, function(nodes) {
|
||||
var max_height = 0;
|
||||
_.each(nodes, function (n) {
|
||||
_.each(nodes, function(n) {
|
||||
if (n._id == null) {
|
||||
n.el.remove();
|
||||
}
|
||||
|
|
@ -430,25 +446,29 @@
|
|||
if (this.opts.auto) {
|
||||
var elements = [];
|
||||
var _this = this;
|
||||
this.container.children('.' + this.opts.item_class).each(function (index, el) {
|
||||
this.container.children('.' + this.opts.item_class).each(function(index, el) {
|
||||
el = $(el);
|
||||
elements.push({
|
||||
el: el,
|
||||
i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width // Use opts.width as weight for Y
|
||||
i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width
|
||||
});
|
||||
});
|
||||
_.chain(elements).sortBy(function (x) { return x.i; }).each(function (i) {
|
||||
_.chain(elements).sortBy(function(x) { return x.i; }).each(function(i) {
|
||||
self._prepare_element(i.el);
|
||||
}).value();
|
||||
}
|
||||
|
||||
this.set_animation(this.opts.animate);
|
||||
|
||||
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);
|
||||
this.placeholder = $(
|
||||
'<div class="' + this.opts.placeholder_class + ' ' + this.opts.item_class + '">' +
|
||||
'<div class="placeholder-content" /></div>').hide();
|
||||
|
||||
var on_resize_handler = function () {
|
||||
this.container.height(
|
||||
this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) -
|
||||
this.opts.vertical_margin);
|
||||
|
||||
this.on_resize_handler = function() {
|
||||
if (self._is_one_column_mode()) {
|
||||
if (one_column_mode)
|
||||
return;
|
||||
|
|
@ -456,9 +476,12 @@
|
|||
one_column_mode = true;
|
||||
|
||||
self.grid._sort_nodes();
|
||||
_.each(self.grid.nodes, function (node) {
|
||||
_.each(self.grid.nodes, function(node) {
|
||||
self.container.append(node.el);
|
||||
|
||||
if (self.opts.static_grid) {
|
||||
return;
|
||||
}
|
||||
if (!node.no_move) {
|
||||
node.el.draggable('disable');
|
||||
}
|
||||
|
|
@ -473,7 +496,11 @@
|
|||
|
||||
one_column_mode = false;
|
||||
|
||||
_.each(self.grid.nodes, function (node) {
|
||||
if (self.opts.static_grid) {
|
||||
return;
|
||||
}
|
||||
|
||||
_.each(self.grid.nodes, function(node) {
|
||||
if (!node.no_move) {
|
||||
node.el.draggable('enable');
|
||||
}
|
||||
|
|
@ -484,11 +511,26 @@
|
|||
}
|
||||
};
|
||||
|
||||
$(window).resize(on_resize_handler);
|
||||
on_resize_handler();
|
||||
$(window).resize(this.on_resize_handler);
|
||||
this.on_resize_handler();
|
||||
};
|
||||
|
||||
GridStack.prototype._trigger_change_event = function(forceTrigger) {
|
||||
var elements = this.grid.get_dirty_nodes();
|
||||
var hasChanges = false;
|
||||
|
||||
var eventParams = [];
|
||||
if (elements && elements.length) {
|
||||
eventParams.push(elements);
|
||||
hasChanges = true;
|
||||
}
|
||||
|
||||
if (hasChanges || forceTrigger === true) {
|
||||
this.container.trigger('change', eventParams);
|
||||
}
|
||||
};
|
||||
|
||||
GridStack.prototype._init_styles = function () {
|
||||
GridStack.prototype._init_styles = function() {
|
||||
if (this._styles_id) {
|
||||
$('[data-gs-id="' + this._styles_id + '"]').remove();
|
||||
}
|
||||
|
|
@ -498,7 +540,7 @@
|
|||
this._styles._max = 0;
|
||||
};
|
||||
|
||||
GridStack.prototype._update_styles = function (max_height) {
|
||||
GridStack.prototype._update_styles = function(max_height) {
|
||||
if (this._styles == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -542,18 +584,21 @@
|
|||
}
|
||||
};
|
||||
|
||||
GridStack.prototype._update_container_height = function () {
|
||||
GridStack.prototype._update_container_height = function() {
|
||||
if (this.grid._update_counter) {
|
||||
return;
|
||||
}
|
||||
this.container.height(this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin);
|
||||
this.container.height(
|
||||
this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) -
|
||||
this.opts.vertical_margin);
|
||||
};
|
||||
|
||||
GridStack.prototype._is_one_column_mode = function () {
|
||||
return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= this.opts.min_width;
|
||||
GridStack.prototype._is_one_column_mode = function() {
|
||||
return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <=
|
||||
this.opts.min_width;
|
||||
};
|
||||
|
||||
GridStack.prototype._prepare_element = function (el) {
|
||||
GridStack.prototype._prepare_element = function(el) {
|
||||
var self = this;
|
||||
el = $(el);
|
||||
|
||||
|
|
@ -576,9 +621,14 @@
|
|||
});
|
||||
el.data('_gridstack_node', node);
|
||||
|
||||
if (self.opts.static_grid) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cell_width, cell_height;
|
||||
|
||||
var on_start_moving = function (event, ui) {
|
||||
var on_start_moving = function(event, ui) {
|
||||
self.container.append(self.placeholder);
|
||||
var o = $(this);
|
||||
self.grid.clean_nodes();
|
||||
self.grid.begin_update(node);
|
||||
|
|
@ -596,7 +646,8 @@
|
|||
el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1));
|
||||
};
|
||||
|
||||
var on_end_moving = function (event, ui) {
|
||||
var on_end_moving = function(event, ui) {
|
||||
self.placeholder.detach();
|
||||
var o = $(this);
|
||||
node.el = o;
|
||||
self.placeholder.hide();
|
||||
|
|
@ -607,7 +658,7 @@
|
|||
.attr('data-gs-height', node.height)
|
||||
.removeAttr('style');
|
||||
self._update_container_height();
|
||||
self.container.trigger('change', [self.grid.get_dirty_nodes()]);
|
||||
self._trigger_change_event();
|
||||
|
||||
self.grid.end_update();
|
||||
};
|
||||
|
|
@ -615,9 +666,9 @@
|
|||
el.draggable(_.extend(this.opts.draggable, {
|
||||
start: on_start_moving,
|
||||
stop: on_end_moving,
|
||||
drag: function (event, ui) {
|
||||
drag: function(event, ui) {
|
||||
var x = Math.round(ui.position.left / cell_width),
|
||||
y = Math.floor((ui.position.top + cell_height/2) / cell_height);
|
||||
y = Math.floor((ui.position.top + cell_height / 2) / cell_height);
|
||||
if (!self.grid.can_move_node(node, x, y, node.width, node.height)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -628,9 +679,9 @@
|
|||
})).resizable(_.extend(this.opts.resizable, {
|
||||
start: on_start_moving,
|
||||
stop: on_end_moving,
|
||||
resize: function (event, ui) {
|
||||
resize: function(event, ui) {
|
||||
var x = Math.round(ui.position.left / cell_width),
|
||||
y = Math.floor((ui.position.top + cell_height/2) / cell_height),
|
||||
y = Math.floor((ui.position.top + cell_height / 2) / cell_height),
|
||||
width = Math.round(ui.size.width / cell_width),
|
||||
height = Math.round(ui.size.height / cell_height);
|
||||
if (!self.grid.can_move_node(node, x, y, width, height)) {
|
||||
|
|
@ -652,7 +703,7 @@
|
|||
el.attr('data-gs-locked', node.locked ? 'yes' : null);
|
||||
};
|
||||
|
||||
GridStack.prototype.set_animation = function (enable) {
|
||||
GridStack.prototype.set_animation = function(enable) {
|
||||
if (enable) {
|
||||
this.container.addClass('grid-stack-animate');
|
||||
}
|
||||
|
|
@ -661,7 +712,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
GridStack.prototype.add_widget = function (el, x, y, width, height, auto_position) {
|
||||
GridStack.prototype.add_widget = function(el, x, y, width, height, auto_position) {
|
||||
el = $(el);
|
||||
if (typeof x != 'undefined') el.attr('data-gs-x', x);
|
||||
if (typeof y != 'undefined') el.attr('data-gs-y', y);
|
||||
|
|
@ -671,16 +722,17 @@
|
|||
this.container.append(el);
|
||||
this._prepare_element(el);
|
||||
this._update_container_height();
|
||||
this._trigger_change_event(true);
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
GridStack.prototype.will_it_fit = function (x, y, width, height, auto_position) {
|
||||
GridStack.prototype.will_it_fit = function(x, y, width, height, auto_position) {
|
||||
var node = {x: x, y: y, width: width, height: height, auto_position: auto_position};
|
||||
return this.grid.can_be_placed_with_respect_to_height(node);
|
||||
};
|
||||
|
||||
GridStack.prototype.remove_widget = function (el, detach_node) {
|
||||
GridStack.prototype.remove_widget = function(el, detach_node) {
|
||||
detach_node = typeof detach_node === 'undefined' ? true : detach_node;
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
|
|
@ -689,20 +741,30 @@
|
|||
this._update_container_height();
|
||||
if (detach_node)
|
||||
el.remove();
|
||||
this._trigger_change_event(true);
|
||||
};
|
||||
|
||||
GridStack.prototype.remove_all = function (detach_node) {
|
||||
_.each(this.grid.nodes, function (node) {
|
||||
GridStack.prototype.remove_all = function(detach_node) {
|
||||
_.each(this.grid.nodes, function(node) {
|
||||
this.remove_widget(node.el, detach_node);
|
||||
}, this);
|
||||
this.grid.nodes = [];
|
||||
this._update_container_height();
|
||||
};
|
||||
|
||||
GridStack.prototype.resizable = function (el, val) {
|
||||
GridStack.prototype.destroy = function() {
|
||||
$(window).off("resize", this.on_resize_handler);
|
||||
this.disable();
|
||||
this.container.remove();
|
||||
Utils.remove_stylesheet(this._styles_id);
|
||||
if (this.grid)
|
||||
this.grid = null;
|
||||
};
|
||||
|
||||
GridStack.prototype.resizable = function(el, val) {
|
||||
var self = this;
|
||||
el = $(el);
|
||||
el.each(function (index, el) {
|
||||
el.each(function(index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
|
|
@ -720,10 +782,10 @@
|
|||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.movable = function (el, val) {
|
||||
GridStack.prototype.movable = function(el, val) {
|
||||
var self = this;
|
||||
el = $(el);
|
||||
el.each(function (index, el) {
|
||||
el.each(function(index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
|
|
@ -741,19 +803,19 @@
|
|||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.disable = function () {
|
||||
GridStack.prototype.disable = function() {
|
||||
this.movable(this.container.children('.' + this.opts.item_class), false);
|
||||
this.resizable(this.container.children('.' + this.opts.item_class), false);
|
||||
};
|
||||
|
||||
GridStack.prototype.enable = function () {
|
||||
GridStack.prototype.enable = function() {
|
||||
this.movable(this.container.children('.' + this.opts.item_class), true);
|
||||
this.resizable(this.container.children('.' + this.opts.item_class), true);
|
||||
};
|
||||
|
||||
GridStack.prototype.locked = function (el, val) {
|
||||
GridStack.prototype.locked = function(el, val) {
|
||||
el = $(el);
|
||||
el.each(function (index, el) {
|
||||
el.each(function(index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
|
|
@ -766,7 +828,41 @@
|
|||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype._update_element = function (el, callback) {
|
||||
GridStack.prototype.min_height = function (el, val) {
|
||||
el = $(el);
|
||||
el.each(function (index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isNaN(val)){
|
||||
node.min_height = (val || false);
|
||||
el.attr('data-gs-min-height', val);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.min_width = function (el, val) {
|
||||
el = $(el);
|
||||
el.each(function (index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isNaN(val)){
|
||||
node.min_width = (val || false);
|
||||
el.attr('data-gs-min-width', val);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype._update_element = function(el, callback) {
|
||||
el = $(el).first();
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
|
|
@ -781,13 +877,13 @@
|
|||
callback.call(this, el, node);
|
||||
|
||||
self._update_container_height();
|
||||
self.container.trigger('change', [self.grid.get_dirty_nodes()]);
|
||||
self._trigger_change_event();
|
||||
|
||||
self.grid.end_update();
|
||||
};
|
||||
|
||||
GridStack.prototype.resize = function (el, width, height) {
|
||||
this._update_element(el, function (el, node) {
|
||||
GridStack.prototype.resize = function(el, width, height) {
|
||||
this._update_element(el, function(el, node) {
|
||||
width = (width != null && typeof width != 'undefined') ? width : node.width;
|
||||
height = (height != null && typeof height != 'undefined') ? height : node.height;
|
||||
|
||||
|
|
@ -795,8 +891,8 @@
|
|||
});
|
||||
};
|
||||
|
||||
GridStack.prototype.move = function (el, x, y) {
|
||||
this._update_element(el, function (el, node) {
|
||||
GridStack.prototype.move = function(el, x, y) {
|
||||
this._update_element(el, function(el, node) {
|
||||
x = (x != null && typeof x != 'undefined') ? x : node.x;
|
||||
y = (y != null && typeof y != 'undefined') ? y : node.y;
|
||||
|
||||
|
|
@ -804,8 +900,8 @@
|
|||
});
|
||||
};
|
||||
|
||||
GridStack.prototype.update = function (el, x, y, width, height) {
|
||||
this._update_element(el, function (el, node) {
|
||||
GridStack.prototype.update = function(el, x, y, width, height) {
|
||||
this._update_element(el, function(el, node) {
|
||||
x = (x != null && typeof x != 'undefined') ? x : node.x;
|
||||
y = (y != null && typeof y != 'undefined') ? y : node.y;
|
||||
width = (width != null && typeof width != 'undefined') ? width : node.width;
|
||||
|
|
@ -815,7 +911,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
GridStack.prototype.cell_height = function (val) {
|
||||
GridStack.prototype.cell_height = function(val) {
|
||||
if (typeof val == 'undefined') {
|
||||
return this.opts.cell_height;
|
||||
}
|
||||
|
|
@ -826,7 +922,7 @@
|
|||
this._update_styles();
|
||||
};
|
||||
|
||||
GridStack.prototype.cell_width = function () {
|
||||
GridStack.prototype.cell_width = function() {
|
||||
var o = this.container.children('.' + this.opts.item_class).first();
|
||||
return Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
|
||||
};
|
||||
|
|
@ -842,25 +938,40 @@
|
|||
return {x: Math.floor(relativeLeft / column_width), y: Math.floor(relativeTop / row_height)};
|
||||
};
|
||||
|
||||
GridStack.prototype.batch_update = function () {
|
||||
GridStack.prototype.batch_update = function() {
|
||||
this.grid.batch_update();
|
||||
};
|
||||
|
||||
GridStack.prototype.commit = function () {
|
||||
GridStack.prototype.commit = function() {
|
||||
this.grid.commit();
|
||||
this._update_container_height()
|
||||
this._update_container_height();
|
||||
};
|
||||
|
||||
GridStack.prototype.is_area_empty = function (x, y, width, height) {
|
||||
GridStack.prototype.is_area_empty = function(x, y, width, height) {
|
||||
return this.grid.is_area_empty(x, y, width, height);
|
||||
};
|
||||
|
||||
GridStack.prototype.set_static = function(static_value) {
|
||||
this.opts.static_grid = (static_value === true);
|
||||
this._set_static_class();
|
||||
};
|
||||
|
||||
GridStack.prototype._set_static_class = function() {
|
||||
var static_class_name = 'grid-stack-static';
|
||||
|
||||
if (this.opts.static_grid === true) {
|
||||
this.container.addClass(static_class_name);
|
||||
} else {
|
||||
this.container.removeClass(static_class_name);
|
||||
}
|
||||
};
|
||||
|
||||
scope.GridStackUI = GridStack;
|
||||
|
||||
scope.GridStackUI.Utils = Utils;
|
||||
|
||||
$.fn.gridstack = function (opts) {
|
||||
return this.each(function () {
|
||||
$.fn.gridstack = function(opts) {
|
||||
return this.each(function() {
|
||||
if (!$(this).data('gridstack')) {
|
||||
$(this).data('gridstack', new GridStack(this, opts));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue