efront 4.22.6 → 4.22.7
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/home/welcome.js +0 -1
- package/coms/frame/route.js +6 -3
- package/coms/layer/glance.js +1 -1
- package/coms/zimoli/zimoli.js +15 -6
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/frame/route.js
CHANGED
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
return [];
|
|
121
121
|
};
|
|
122
|
+
var first_opened = false;
|
|
122
123
|
result.update = function (items) {
|
|
123
124
|
delete result.loading_promise;
|
|
124
125
|
delete result.then;
|
|
@@ -157,6 +158,7 @@
|
|
|
157
158
|
};
|
|
158
159
|
}
|
|
159
160
|
}
|
|
161
|
+
first_opened = false;
|
|
160
162
|
return result;
|
|
161
163
|
};
|
|
162
164
|
var setActive = function (p, active) {
|
|
@@ -190,14 +192,15 @@
|
|
|
190
192
|
});
|
|
191
193
|
result.open = function (menu) {
|
|
192
194
|
if (!menu) {
|
|
193
|
-
if (result.active) return;
|
|
194
|
-
menu = result[0];
|
|
195
|
+
if (first_opened && result.active) return;
|
|
196
|
+
menu = result.active || result[0];
|
|
195
197
|
}
|
|
196
198
|
if (!menu.path) {
|
|
197
199
|
menu.closed = !menu.closed;
|
|
198
200
|
return;
|
|
199
201
|
}
|
|
200
|
-
if (menu === result.active) return;
|
|
202
|
+
if (first_opened && menu === result.active) return;
|
|
203
|
+
first_opened = true;
|
|
201
204
|
var opened = result.opened || [];
|
|
202
205
|
if (!~opened.indexOf(menu) && !getChild(menu).id) {
|
|
203
206
|
opened.push(menu);
|
package/coms/layer/glance.js
CHANGED
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -424,7 +424,6 @@ function zimoli(pagepath, args, history_name, oldpagepath) {
|
|
|
424
424
|
if (pagepath === popupHashlessPath) {
|
|
425
425
|
preventNextHashChange = true;
|
|
426
426
|
window_history.go(-1);
|
|
427
|
-
preventNextHashChange = true;
|
|
428
427
|
pagepath = pathFromHash(location.hash);
|
|
429
428
|
}
|
|
430
429
|
if (_history.index === 0) pagepath = '';
|
|
@@ -513,26 +512,36 @@ var getCurrentHash = function () {
|
|
|
513
512
|
};
|
|
514
513
|
|
|
515
514
|
var fixurl = function (historyDelta) {
|
|
516
|
-
preventNextHashChange = false;
|
|
517
515
|
var hash = getCurrentHash();
|
|
516
|
+
preventNextHashChange = true;
|
|
518
517
|
if (pagehash_reg.test(hash)) {
|
|
519
518
|
hash = location.href.replace(/\#[\s\S]*$/, '') + hash;
|
|
520
519
|
if (!pagehash_reg.test(location.href)) location.href = hash;
|
|
521
520
|
else if (location.href !== hash) {
|
|
522
521
|
if (historyDelta) {
|
|
523
|
-
preventNextHashChange = true;
|
|
524
522
|
window_history.go(historyDelta);
|
|
525
|
-
preventNextHashChange = false;
|
|
526
523
|
if (location.href !== hash) {
|
|
527
524
|
location.href = hash;
|
|
528
525
|
}
|
|
526
|
+
else {
|
|
527
|
+
preventNextHashChange = false;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
else if (location.href !== hash) {
|
|
531
|
+
location.href = hash;
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
preventNextHashChange = false;
|
|
529
535
|
}
|
|
530
|
-
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
preventNextHashChange = false;
|
|
531
539
|
}
|
|
532
540
|
}
|
|
533
541
|
else if (pagehash_reg.test(location.hash)) {
|
|
534
|
-
preventNextHashChange = true;
|
|
535
542
|
window_history.go(-1);
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
536
545
|
preventNextHashChange = false;
|
|
537
546
|
}
|
|
538
547
|
};
|