efront 3.18.3 → 3.19.2
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/apps/pivot/api.yml +2 -0
- package/apps/pivot/link/chat.js +6 -3
- package/apps/pivot/link/index.html +2 -0
- package/apps/pivot/link/index.js +13 -0
- package/apps/pivot/link/room.html +0 -0
- package/apps/pivot/link/room.js +10 -0
- package/apps/pivot/main.js +7 -1
- package/apps/pivot/menu.yml +1 -1
- package/apps/pivot/wow/edit.js +3 -0
- package/apps/pivot/wow/root.js +33 -4
- package/coms/basic/submit_.js +40 -0
- package/coms/basic/valid.js +8 -0
- package/coms/frame/chat.js +2 -1
- package/coms/random/{sfz.js → /350/272/253/344/273/275/350/257/201.js} +1 -1
- package/coms/zimoli/Item.js +32 -23
- package/coms/zimoli/contextmenu.js +5 -4
- package/coms/zimoli/drag.js +0 -1
- package/coms/zimoli/field.js +2 -0
- package/coms/zimoli/menuItem.html +1 -1
- package/coms/zimoli/menuItem.js +2 -4
- package/coms/zimoli/menuList.html +1 -1
- package/coms/zimoli/menuList.js +3 -3
- package/coms/zimoli/menuList.less +5 -0
- package/coms/zimoli/move.js +5 -23
- package/coms/zimoli/oncemount.js +1 -1
- package/coms/zimoli/render.js +36 -27
- package/coms/zimoli/resize.js +1 -4
- package/coms/zimoli/submit.js +6 -39
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/resize.js
CHANGED
|
@@ -121,11 +121,8 @@ var handle = {
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
var rect = dragging.rect;
|
|
124
|
-
move.call(rect, isFinite(style.left) ? style.left : rect.offsetLeft, isFinite(style.top) ? style.top : rect.offsetTop);
|
|
125
|
-
delete style.left;
|
|
126
|
-
delete style.top;
|
|
127
|
-
Object.keys(style).forEach(k => style[k] = fromOffset(style[k]));
|
|
128
124
|
css(dragging.rect, style);
|
|
125
|
+
move.call(rect, isFinite(style.left) ? style.left : rect.offsetLeft, isFinite(style.top) ? style.top : rect.offsetTop);
|
|
129
126
|
dispatch(dragging.rect, 'resize');
|
|
130
127
|
resizingList.forEach(a => {
|
|
131
128
|
if (getTargetIn(dragging.rect, a)) {
|
package/coms/zimoli/submit.js
CHANGED
|
@@ -1,41 +1,8 @@
|
|
|
1
|
-
function submit(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var f of fields) {
|
|
8
|
-
var error = valid(f, data);
|
|
9
|
-
if (error === "empty") {
|
|
10
|
-
if (f.options || /date|time|range|switch|swap|radio/i.test(f.type)) {
|
|
11
|
-
if (!select.id) select.id = ++id;
|
|
12
|
-
select.push(f);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
if (!inputs.id) inputs.id = ++id;
|
|
16
|
-
inputs.push(f);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else if (error) {
|
|
20
|
-
checks.push(f);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
params[f.key] = data[f.key];
|
|
24
|
-
}
|
|
1
|
+
function submit() {
|
|
2
|
+
try {
|
|
3
|
+
submit_.apply(this, arguments);
|
|
4
|
+
} catch (e) {
|
|
5
|
+
alert(String(e), 'warn');
|
|
6
|
+
throw e;
|
|
25
7
|
}
|
|
26
|
-
if (checks.length + select.length + inputs.length) {
|
|
27
|
-
var errors = [];
|
|
28
|
-
if (inputs.length) errors.push("请输入" + inputs.map(f => f.name).join("、"));
|
|
29
|
-
if (select.length) errors.push("请选择" + select.map(f => f.name).join("、"));
|
|
30
|
-
if (select.id < inputs.id) {
|
|
31
|
-
errors = errors.reverse();
|
|
32
|
-
}
|
|
33
|
-
if (checks.length) {
|
|
34
|
-
errors.push(checks.map(f => f.name).join("、") + "格式错误");
|
|
35
|
-
}
|
|
36
|
-
errors = errors.join(",") + "!";
|
|
37
|
-
alert(errors, 'error');
|
|
38
|
-
throw new Error(errors);
|
|
39
|
-
}
|
|
40
|
-
return params;
|
|
41
8
|
}
|