ts-glitter 22.4.7 → 22.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/glitterBundle/Glitter.css +74 -62
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +49 -32
- package/lowcode/backend-manager/bg-product.ts +57 -39
- package/lowcode/backend-manager/bg-widget.js +17 -0
- package/lowcode/backend-manager/bg-widget.ts +18 -0
- package/lowcode/cms-plugin/information/information-module.js +5 -5
- package/lowcode/cms-plugin/information/information-module.ts +9 -5
- package/lowcode/cms-plugin/menus-setting.js +69 -55
- package/lowcode/cms-plugin/menus-setting.ts +77 -61
- package/lowcode/cms-plugin/module/form-module.js +109 -89
- package/lowcode/cms-plugin/module/form-module.ts +680 -650
- package/lowcode/cms-plugin/module/product-excel.js +1 -0
- package/lowcode/cms-plugin/module/product-excel.ts +2 -0
- package/lowcode/cms-plugin/pos-pages/payment-page.js +28 -10
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +29 -10
- package/lowcode/cms-plugin/shopping-allowance-manager.js +0 -1
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +0 -1
- package/lowcode/cms-plugin/shopping-collections.js +367 -193
- package/lowcode/cms-plugin/shopping-collections.ts +664 -243
- package/lowcode/cms-plugin/shopping-information.js +392 -38
- package/lowcode/cms-plugin/shopping-information.ts +479 -87
- package/lowcode/cms-plugin/shopping-product-setting.js +2 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +2 -2
- package/lowcode/cms-plugin/shopping-setting-advance.js +906 -766
- package/lowcode/cms-plugin/shopping-setting-advance.ts +977 -841
- package/lowcode/cms-plugin/shopping-setting-basic.js +1547 -1285
- package/lowcode/cms-plugin/shopping-setting-basic.ts +1742 -1466
- package/lowcode/cms-plugin/stock-stores.js +1 -0
- package/lowcode/cms-plugin/stock-stores.ts +1 -0
- package/lowcode/cms-plugin/user-list.js +47 -12
- package/lowcode/cms-plugin/user-list.ts +52 -14
- package/lowcode/css/editor.css +6 -0
- package/lowcode/glitterBundle/Glitter.css +74 -62
- package/lowcode/jslib/nestable/index.html +317 -0
- package/lowcode/jslib/nestable/jquery.nestable.js +484 -0
- package/lowcode/official_view_component/form-widget/input-custom.js +98 -6
- package/lowcode/official_view_component/form-widget/input-custom.ts +121 -16
- package/lowcode/public-components/headers/header-class.js +63 -0
- package/lowcode/public-components/headers/header-class.ts +65 -0
- package/lowcode/public-components/headers/sy-02.js +386 -400
- package/lowcode/public-components/headers/sy-02.ts +482 -492
- package/lowcode/public-components/headers/sy-03.js +42 -43
- package/lowcode/public-components/headers/sy-03.ts +46 -43
- package/lowcode/public-components/headers/sy-04.js +43 -41
- package/lowcode/public-components/headers/sy-04.ts +48 -41
- package/lowcode/public-components/headers/sy-05.js +30 -27
- package/lowcode/public-components/headers/sy-05.ts +33 -27
- package/lowcode/public-components/product/product-list.js +160 -148
- package/lowcode/public-components/product/product-list.ts +186 -165
- package/lowcode/public-models/product.ts +26 -1
- package/lowcode/src/glitterBundle/Glitter.css +74 -62
- package/package.json +1 -1
- package/rxmnt81tnk.json +1 -0
- package/src/api-public/controllers/shop.js +10 -4
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +14 -9
- package/src/api-public/services/ezpay/tool.d.ts +1 -0
- package/src/api-public/services/mail.js +1 -1
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/mail.ts +1 -1
- package/src/api-public/services/schedule.d.ts +0 -1
- package/src/api-public/services/schedule.js +12 -35
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +15 -39
- package/src/api-public/services/shopee.js +7 -17
- package/src/api-public/services/shopping.d.ts +27 -6
- package/src/api-public/services/shopping.js +364 -85
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +510 -101
- package/src/api-public/services/updated-table-checked.js +58 -1
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/updated-table-checked.ts +62 -1
- package/src/api-public/services/user-update.js +14 -0
- package/src/api-public/services/user-update.js.map +1 -1
- package/src/api-public/services/user-update.ts +15 -0
- package/src/api-public/services/user.js +1 -1
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/index.js +7 -5
- package/src/index.js.map +1 -1
- package/src/index.ts +45 -38
- package/src/modules/firebase.js +1 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +1 -0
- package/src/seo-config.d.ts +1 -1
- package/src/seo-config.js +1 -2
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -2
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/ses.js +4 -3
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/src/services/system-schedule.ts +1 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!--[if lt IE 7]> <html lang="en" class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
|
3
|
+
<!--[if IE 7]> <html lang="en" class="lt-ie9 lt-ie8"> <![endif]-->
|
|
4
|
+
<!--[if IE 8]> <html lang="en" class="lt-ie9"> <![endif]-->
|
|
5
|
+
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
|
|
6
|
+
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
|
|
7
|
+
<head>
|
|
8
|
+
<meta charset="utf-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
|
10
|
+
<title>Nestable</title>
|
|
11
|
+
<style type="text/css">
|
|
12
|
+
|
|
13
|
+
.cf:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
|
|
14
|
+
* html .cf { zoom: 1; }
|
|
15
|
+
*:first-child+html .cf { zoom: 1; }
|
|
16
|
+
|
|
17
|
+
html { margin: 0; padding: 0; }
|
|
18
|
+
body { font-size: 100%; margin: 0; padding: 1.75em; font-family: 'Helvetica Neue', Arial, sans-serif; }
|
|
19
|
+
|
|
20
|
+
h1 { font-size: 1.75em; margin: 0 0 0.6em 0; }
|
|
21
|
+
|
|
22
|
+
a { color: #2996cc; }
|
|
23
|
+
a:hover { text-decoration: none; }
|
|
24
|
+
|
|
25
|
+
p { line-height: 1.5em; }
|
|
26
|
+
.small { color: #666; font-size: 0.875em; }
|
|
27
|
+
.large { font-size: 1.25em; }
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Nestable
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
.dd { position: relative; display: block; margin: 0; padding: 0; max-width: 600px; list-style: none; font-size: 13px; line-height: 20px; }
|
|
34
|
+
|
|
35
|
+
.dd-list { display: block; position: relative; margin: 0; padding: 0; list-style: none; }
|
|
36
|
+
.dd-list .dd-list { padding-left: 30px; }
|
|
37
|
+
.dd-collapsed .dd-list { display: none; }
|
|
38
|
+
|
|
39
|
+
.dd-item,
|
|
40
|
+
.dd-empty,
|
|
41
|
+
.dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; }
|
|
42
|
+
|
|
43
|
+
.dd-handle { display: block; height: 30px; margin: 5px 0; padding: 5px 10px; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc;
|
|
44
|
+
background: #fafafa;
|
|
45
|
+
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
46
|
+
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
47
|
+
background: linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
48
|
+
-webkit-border-radius: 3px;
|
|
49
|
+
border-radius: 3px;
|
|
50
|
+
box-sizing: border-box; -moz-box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
.dd-handle:hover { color: #2ea8e5; background: #fff; }
|
|
53
|
+
|
|
54
|
+
.dd-item > button { display: block; position: relative; cursor: pointer; float: left; width: 25px; height: 20px; margin: 5px 0; padding: 0; text-indent: 100%; white-space: nowrap; overflow: hidden; border: 0; background: transparent; font-size: 12px; line-height: 1; text-align: center; font-weight: bold; }
|
|
55
|
+
.dd-item > button:before { content: '+'; display: block; position: absolute; width: 100%; text-align: center; text-indent: 0; }
|
|
56
|
+
.dd-item > button[data-action="collapse"]:before { content: '-'; }
|
|
57
|
+
|
|
58
|
+
.dd-placeholder,
|
|
59
|
+
.dd-empty { margin: 5px 0; padding: 0; min-height: 30px; background: #f2fbff; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; }
|
|
60
|
+
.dd-empty { border: 1px dashed #bbb; min-height: 100px; background-color: #e5e5e5;
|
|
61
|
+
background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
|
62
|
+
-webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
|
63
|
+
background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
|
64
|
+
-moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
|
65
|
+
background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
|
66
|
+
linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
|
67
|
+
background-size: 60px 60px;
|
|
68
|
+
background-position: 0 0, 30px 30px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dd-dragel { position: absolute; pointer-events: none; z-index: 9999; }
|
|
72
|
+
.dd-dragel > .dd-item .dd-handle { margin-top: 0; }
|
|
73
|
+
.dd-dragel .dd-handle {
|
|
74
|
+
-webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
|
|
75
|
+
box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Nestable Extras
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
.nestable-lists { display: block; clear: both; padding: 30px 0; width: 100%; border: 0; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; }
|
|
83
|
+
|
|
84
|
+
#nestable-menu { padding: 0; margin: 20px 0; }
|
|
85
|
+
|
|
86
|
+
#nestable-output,
|
|
87
|
+
#nestable2-output { width: 100%; height: 7em; font-size: 0.75em; line-height: 1.333333em; font-family: Consolas, monospace; padding: 5px; box-sizing: border-box; -moz-box-sizing: border-box; }
|
|
88
|
+
|
|
89
|
+
#nestable2 .dd-handle {
|
|
90
|
+
color: #fff;
|
|
91
|
+
border: 1px solid #999;
|
|
92
|
+
background: #bbb;
|
|
93
|
+
background: -webkit-linear-gradient(top, #bbb 0%, #999 100%);
|
|
94
|
+
background: -moz-linear-gradient(top, #bbb 0%, #999 100%);
|
|
95
|
+
background: linear-gradient(top, #bbb 0%, #999 100%);
|
|
96
|
+
}
|
|
97
|
+
#nestable2 .dd-handle:hover { background: #bbb; }
|
|
98
|
+
#nestable2 .dd-item > button:before { color: #fff; }
|
|
99
|
+
|
|
100
|
+
@media only screen and (min-width: 700px) {
|
|
101
|
+
|
|
102
|
+
.dd { float: left; width: 48%; }
|
|
103
|
+
.dd + .dd { margin-left: 2%; }
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dd-hover > .dd-handle { background: #2ea8e5 !important; }
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Nestable Draggable Handles
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
.dd3-content { display: block; height: 30px; margin: 5px 0; padding: 5px 10px 5px 40px; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc;
|
|
114
|
+
background: #fafafa;
|
|
115
|
+
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
116
|
+
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
117
|
+
background: linear-gradient(top, #fafafa 0%, #eee 100%);
|
|
118
|
+
-webkit-border-radius: 3px;
|
|
119
|
+
border-radius: 3px;
|
|
120
|
+
box-sizing: border-box; -moz-box-sizing: border-box;
|
|
121
|
+
}
|
|
122
|
+
.dd3-content:hover { color: #2ea8e5; background: #fff; }
|
|
123
|
+
|
|
124
|
+
.dd-dragel > .dd3-item > .dd3-content { margin: 0; }
|
|
125
|
+
|
|
126
|
+
.dd3-item > button { margin-left: 30px; }
|
|
127
|
+
|
|
128
|
+
.dd3-handle { position: absolute; margin: 0; left: 0; top: 0; cursor: pointer; width: 30px; text-indent: 100%; white-space: nowrap; overflow: hidden;
|
|
129
|
+
border: 1px solid #aaa;
|
|
130
|
+
background: #ddd;
|
|
131
|
+
background: -webkit-linear-gradient(top, #ddd 0%, #bbb 100%);
|
|
132
|
+
background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);
|
|
133
|
+
background: linear-gradient(top, #ddd 0%, #bbb 100%);
|
|
134
|
+
border-top-right-radius: 0;
|
|
135
|
+
border-bottom-right-radius: 0;
|
|
136
|
+
}
|
|
137
|
+
.dd3-handle:before { content: '≡'; display: block; position: absolute; left: 0; top: 3px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-size: 20px; font-weight: normal; }
|
|
138
|
+
.dd3-handle:hover { background: #ddd; }
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Socialite
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
.socialite { display: block; float: left; height: 35px; }
|
|
145
|
+
|
|
146
|
+
</style>
|
|
147
|
+
</head>
|
|
148
|
+
<body>
|
|
149
|
+
|
|
150
|
+
<h1>Nestable</h1>
|
|
151
|
+
|
|
152
|
+
<p>Drag & drop hierarchical list with mouse and touch compatibility (jQuery plugin)</p>
|
|
153
|
+
|
|
154
|
+
<p><strong><a href="https://github.com/dbushell/Nestable">Download on GitHub</a></strong></p>
|
|
155
|
+
|
|
156
|
+
<div class="cf">
|
|
157
|
+
<a href="http://twitter.com/share" class="socialite twitter-share" data-via="dbushell" data-text="jQuery Nestable plugin" data-url="http://dbushell.github.com/Nestable/" data-size="large" rel="nofollow" target="_blank">
|
|
158
|
+
<span class="vhidden">Share on Twitter</span>
|
|
159
|
+
</a>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<p><strong>PLEASE NOTE: I cannot provide any support or guidance beyond this README. If this code helps you that's great but I have no plans to develop Nestable beyond this demo (it's not a final product and has limited functionality). I cannot reply to any requests for help.</strong></p>
|
|
164
|
+
|
|
165
|
+
<menu id="nestable-menu">
|
|
166
|
+
<button type="button" data-action="expand-all">Expand All</button>
|
|
167
|
+
<button type="button" data-action="collapse-all">Collapse All</button>
|
|
168
|
+
</menu>
|
|
169
|
+
|
|
170
|
+
<div class="cf nestable-lists">
|
|
171
|
+
|
|
172
|
+
<div class="dd" id="nestable">
|
|
173
|
+
<ol class="dd-list">
|
|
174
|
+
<li class="dd-item" data-id="1">
|
|
175
|
+
<div class="dd-handle">Item 1</div>
|
|
176
|
+
</li>
|
|
177
|
+
<li class="dd-item" data-id="2">
|
|
178
|
+
<div class="dd-handle">Item 2</div>
|
|
179
|
+
<ol class="dd-list">
|
|
180
|
+
<li class="dd-item" data-id="3"><div class="dd-handle">Item 3</div></li>
|
|
181
|
+
<li class="dd-item" data-id="4"><div class="dd-handle">Item 4</div></li>
|
|
182
|
+
<li class="dd-item" data-id="5">
|
|
183
|
+
<div class="dd-handle">Item 5</div>
|
|
184
|
+
<ol class="dd-list">
|
|
185
|
+
<li class="dd-item" data-id="6"><div class="dd-handle">Item 6</div></li>
|
|
186
|
+
<li class="dd-item" data-id="7"><div class="dd-handle">Item 7</div></li>
|
|
187
|
+
<li class="dd-item" data-id="8"><div class="dd-handle">Item 8</div></li>
|
|
188
|
+
</ol>
|
|
189
|
+
</li>
|
|
190
|
+
<li class="dd-item" data-id="9"><div class="dd-handle">Item 9</div></li>
|
|
191
|
+
<li class="dd-item" data-id="10"><div class="dd-handle">Item 10</div></li>
|
|
192
|
+
</ol>
|
|
193
|
+
</li>
|
|
194
|
+
<li class="dd-item" data-id="11">
|
|
195
|
+
<div class="dd-handle">Item 11</div>
|
|
196
|
+
</li>
|
|
197
|
+
<li class="dd-item" data-id="12">
|
|
198
|
+
<div class="dd-handle">Item 12</div>
|
|
199
|
+
</li>
|
|
200
|
+
</ol>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<div class="dd" id="nestable2">
|
|
204
|
+
<ol class="dd-list">
|
|
205
|
+
<li class="dd-item" data-id="13">
|
|
206
|
+
<div class="dd-handle">Item 13</div>
|
|
207
|
+
</li>
|
|
208
|
+
<li class="dd-item" data-id="14">
|
|
209
|
+
<div class="dd-handle">Item 14</div>
|
|
210
|
+
</li>
|
|
211
|
+
<li class="dd-item" data-id="15">
|
|
212
|
+
<div class="dd-handle">Item 15</div>
|
|
213
|
+
<ol class="dd-list">
|
|
214
|
+
<li class="dd-item" data-id="16"><div class="dd-handle">Item 16</div></li>
|
|
215
|
+
<li class="dd-item" data-id="17"><div class="dd-handle">Item 17</div></li>
|
|
216
|
+
<li class="dd-item" data-id="18"><div class="dd-handle">Item 18</div></li>
|
|
217
|
+
</ol>
|
|
218
|
+
</li>
|
|
219
|
+
</ol>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<p><strong>Serialised Output (per list)</strong></p>
|
|
225
|
+
|
|
226
|
+
<textarea id="nestable-output"></textarea>
|
|
227
|
+
<textarea id="nestable2-output"></textarea>
|
|
228
|
+
|
|
229
|
+
<p> </p>
|
|
230
|
+
|
|
231
|
+
<div class="cf nestable-lists">
|
|
232
|
+
|
|
233
|
+
<p><strong>Draggable Handles</strong></p>
|
|
234
|
+
|
|
235
|
+
<p>If you're clever with your CSS and markup this can be achieved without any JavaScript changes.</p>
|
|
236
|
+
|
|
237
|
+
<div class="dd" id="nestable3">
|
|
238
|
+
<ol class="dd-list">
|
|
239
|
+
<li class="dd-item dd3-item" data-id="13">
|
|
240
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 13</div>
|
|
241
|
+
</li>
|
|
242
|
+
<li class="dd-item dd3-item" data-id="14">
|
|
243
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 14</div>
|
|
244
|
+
</li>
|
|
245
|
+
<li class="dd-item dd3-item" data-id="15">
|
|
246
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 15</div>
|
|
247
|
+
<ol class="dd-list">
|
|
248
|
+
<li class="dd-item dd3-item" data-id="16">
|
|
249
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 16</div>
|
|
250
|
+
</li>
|
|
251
|
+
<li class="dd-item dd3-item" data-id="17">
|
|
252
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 17</div>
|
|
253
|
+
</li>
|
|
254
|
+
<li class="dd-item dd3-item" data-id="18">
|
|
255
|
+
<div class="dd-handle dd3-handle">Drag</div><div class="dd3-content">Item 18</div>
|
|
256
|
+
</li>
|
|
257
|
+
</ol>
|
|
258
|
+
</li>
|
|
259
|
+
</ol>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<p class="small">Copyright © <a href="https://dbushell.com/">David Bushell</a> | Made for <a href="http://www.browserlondon.com/">Browser</a></p>
|
|
265
|
+
|
|
266
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
|
267
|
+
<script src="jquery.nestable.js"></script>
|
|
268
|
+
<script>
|
|
269
|
+
|
|
270
|
+
$(document).ready(function()
|
|
271
|
+
{
|
|
272
|
+
|
|
273
|
+
var updateOutput = function(e)
|
|
274
|
+
{
|
|
275
|
+
var list = e.length ? e : $(e.target),
|
|
276
|
+
output = list.data('output');
|
|
277
|
+
if (window.JSON) {
|
|
278
|
+
output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
|
279
|
+
} else {
|
|
280
|
+
output.val('JSON browser support required for this demo.');
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
// activate Nestable for list 1
|
|
285
|
+
$('#nestable').nestable({
|
|
286
|
+
group: 1
|
|
287
|
+
})
|
|
288
|
+
.on('change', updateOutput);
|
|
289
|
+
|
|
290
|
+
// activate Nestable for list 2
|
|
291
|
+
$('#nestable2').nestable({
|
|
292
|
+
group: 1
|
|
293
|
+
})
|
|
294
|
+
.on('change', updateOutput);
|
|
295
|
+
|
|
296
|
+
// output initial serialised data
|
|
297
|
+
updateOutput($('#nestable').data('output', $('#nestable-output')));
|
|
298
|
+
updateOutput($('#nestable2').data('output', $('#nestable2-output')));
|
|
299
|
+
|
|
300
|
+
$('#nestable-menu').on('click', function(e)
|
|
301
|
+
{
|
|
302
|
+
var target = $(e.target),
|
|
303
|
+
action = target.data('action');
|
|
304
|
+
if (action === 'expand-all') {
|
|
305
|
+
$('.dd').nestable('expandAll');
|
|
306
|
+
}
|
|
307
|
+
if (action === 'collapse-all') {
|
|
308
|
+
$('.dd').nestable('collapseAll');
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
$('#nestable3').nestable();
|
|
313
|
+
|
|
314
|
+
});
|
|
315
|
+
</script>
|
|
316
|
+
</body>
|
|
317
|
+
</html>
|