efront 3.5.7 → 3.5.11

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.
@@ -2,3 +2,4 @@
2
2
  login: options /::login-:a
3
3
  run: options /:::run
4
4
  share: options /::share-:opt
5
+ folder: options /::file-:opt:::path?:to
@@ -13,8 +13,8 @@ setInterval(function () {
13
13
  }, 2000);
14
14
  login();
15
15
  var layer = layer$glance({
16
- left: "frame$left",
17
- top: 'frame$top'
16
+ left: frame$left,
17
+ top: frame$top
18
18
  });
19
19
  function main() {
20
20
  return layer;
@@ -1,5 +1,6 @@
1
1
  首页: /home/welcome
2
2
  共享目录管理: /share/list
3
3
  短链接: /home/short
4
+ WEB文件管理: /wow/root
4
5
  # 用户: /home/short
5
6
  # 用户列表: /user/list
@@ -0,0 +1,10 @@
1
+ <div head>
2
+ <span v-text="origin?'修改':'添加'"></span>文件夹
3
+ </div>
4
+ <div body>
5
+ <field v-if="!f.readonly||!!data[f.key]" -repeat="f in fields" ng-src="[f,data]"></field>
6
+ </div>
7
+ <div foot>
8
+ <btn @click="remove()" class="white">取消</btn>
9
+ <button type="submit">保存</button>
10
+ </div>
@@ -0,0 +1,33 @@
1
+ var fields = refilm`
2
+ &原始名称/origin read
3
+ 输入新名称/name input
4
+ `;
5
+ function main({ path: root, name }) {
6
+ var a = view();
7
+ a.innerHTML = edit;
8
+ drag.on(a.firstChild, a);
9
+ var origin = name.replace(/\/$/, '');
10
+ renderWithDefaults(a, {
11
+ fields,
12
+ pathlist: root,
13
+ isFolder: /\/$/.test(name),
14
+ data: { name: origin, origin },
15
+ remove() {
16
+ remove(a);
17
+ },
18
+ });
19
+ on('submit')(a, async function (e) {
20
+ e.preventDefault();
21
+ var path = root.concat(a.$scope.data.name).join('/');
22
+ if (origin) {
23
+ var to = path;
24
+ path = origin;
25
+ }
26
+ await data.from("folder", { opt: origin ? 'mov' : 'add', path, to }).loading_promise;
27
+ dispatch(this, 'submited');
28
+ });
29
+ on("append")(a, lazy(function () {
30
+ a.querySelector("input").focus();
31
+ }));
32
+ return a;
33
+ }
@@ -0,0 +1,10 @@
1
+ <div class="address">
2
+ <input _value="pathlist.join('/')" />
3
+ </div>
4
+ <lattice ng-src="d in data">
5
+ <padding>
6
+ <item @click="open(d)" ng-class="{focus:active===this}">
7
+ <span ng-text=d.name></span>
8
+ </item>
9
+ </padding>
10
+ </lattice>
@@ -0,0 +1,100 @@
1
+ var fields = refilm`
2
+ 文件
3
+ `;
4
+
5
+ function main() {
6
+ var page = div();
7
+ page.innerHTML = root;
8
+ page.onback = function () {
9
+ var $scope = this.$scope;
10
+ if (!$scope.pathlist.length) {
11
+ return;
12
+ }
13
+ $scope.pathlist.pop();
14
+ $scope.open();
15
+ return false;
16
+ }
17
+ page.setAttribute('ng-mousedown', 'setActive')
18
+
19
+ renderWithDefaults(page, {
20
+ lattice,
21
+ pathlist: [],
22
+ active: null,
23
+ open(p) {
24
+ if (p) p = String(p.name || '').replace(/\/$/, '');
25
+ if (p) this.pathlist.push(p);
26
+ this.data = data.from("folder", { opt: 'list', path: "/" + this.pathlist.join('/') }, files => {
27
+ if (files) return sortname(files).map(f => {
28
+ return {
29
+ name: f,
30
+ type: /\/$/.test(f) ? 'folder' : 'file'
31
+ }
32
+ });
33
+ });
34
+ },
35
+ setActive(e) {
36
+ this.active = getActive(e);
37
+ },
38
+ data: [],
39
+ });
40
+ page.$scope.open();
41
+ var getActive = e => {
42
+ var p = page.querySelector('lattice');
43
+ var t = getTargetIn(e => e.parentNode && e.parentNode.parentNode === p, e.target);
44
+ return t;
45
+ };
46
+ var when = e => !!getActive(e);
47
+ var popupEdit = function (e) {
48
+ zimoli.prepare('/wow/edit', function () {
49
+ var p = popup("#/wow/edit", {
50
+ path: page.$scope.pathlist,
51
+ name: e || ''
52
+ });
53
+ on('submited')(p, function () {
54
+ page.$scope.open();
55
+ remove(p);
56
+ });
57
+ })
58
+
59
+ };
60
+ contextmenu(page, [
61
+ {
62
+ name: "新建文件夹",
63
+ when: e => !getActive(e),
64
+ do() {
65
+ popupEdit();
66
+ }
67
+ },
68
+ {
69
+ name: '编辑',
70
+ when,
71
+ do(e) {
72
+ popupEdit(e.$scope.d.name);
73
+ }
74
+ },
75
+ {
76
+ get name() {
77
+ return this.confirm ? "确认删除" : "删除";
78
+ },
79
+ confirm: false,
80
+ when(e) {
81
+ this.confirm = false;
82
+ return when(e);
83
+ },
84
+ type: "danger",
85
+ async do(e) {
86
+ if (!this.confirm) {
87
+ this.confirm = true;
88
+ setTimeout(_ => {
89
+ this.confirm = false;
90
+ render.refresh();
91
+ }, 2000);
92
+ return false;
93
+ }
94
+ await data.from("folder", { opt: 'del', path: "/" + page.$scope.pathlist.concat(e.$scope.d.name).join("/") }).loading_promise;
95
+ page.$scope.open();
96
+ }
97
+ }
98
+ ]);
99
+ return page;
100
+ }
@@ -0,0 +1,63 @@
1
+ & {
2
+ height: 100%;
3
+ }
4
+
5
+ @height: 44px;
6
+
7
+ >lattice {
8
+ box-sizing: content-box;
9
+ margin-top: -@height;
10
+ padding-top: @height + 6px;
11
+
12
+ a {
13
+ vertical-align: top;
14
+ }
15
+ }
16
+
17
+ padding {
18
+ border-right-width: 60px;
19
+ }
20
+
21
+ >.address {
22
+ position: relative;
23
+ z-index: 3;
24
+ margin-left: 140px;
25
+ margin-top: -@height - 6px;
26
+ height: @height;
27
+ padding: 0 6px;
28
+ line-height: @height;
29
+
30
+ input {
31
+ width: 100%;
32
+ }
33
+ }
34
+
35
+ item {
36
+ border: 1px solid #0002;
37
+ position: relative;
38
+ display: block;
39
+ padding: 10px 20px;
40
+
41
+ &:hover {
42
+ outline: 2px solid #2cf;
43
+ }
44
+
45
+ &:active {
46
+ color: #28c;
47
+ outline: 2px solid;
48
+ }
49
+
50
+ &.focus {
51
+ color: #28c;
52
+ outline: 2px solid;
53
+ }
54
+
55
+ >a {
56
+ vertical-align: top;
57
+ }
58
+
59
+ >[op] {
60
+ left: 6px;
61
+ margin-left: 6px;
62
+ }
63
+ }
@@ -51,7 +51,7 @@ function stringify(memery) {
51
51
  o[""] = arr;
52
52
  for (var k in memery) {
53
53
  var m = memery[k];
54
- if (inc === +k) {
54
+ if (inc === +k && k !== '') {
55
55
  var kindex = "";
56
56
  inc++;
57
57
  } else {
@@ -260,16 +260,31 @@ function parse(piece) {
260
260
  }
261
261
  var [name, type, options] = piece, key, repeat;
262
262
  if (piece.length === 1 && isObject(name)) {
263
- var { name, needs, required, checks, type, key, size, unit, endwith, ratio, value, repeat, comment, options } = name;
263
+ var {
264
+ name, type, key, value, comment, options,
265
+ size, unit, ratio,
266
+ needs, checks, repeat, endwith,
267
+ required, inlist, hidden, readonly,
268
+ delete_onempty, delete_onsubmit,
269
+ } = name;
264
270
  } else {
265
- var is_require = a => {
266
- if (/^\*|\*$/.test(a)) {
267
- required = true;
268
- return a.replace(/^\*|\*$/, '');
271
+ var test = (reg,a) => {
272
+ if (reg.test(a)) {
273
+ return true;
269
274
  }
270
- return a;
271
275
  };
272
- type = is_require(type);
276
+ var is = function (a) {
277
+ var reg = /^[\*\+\-\!\-\$&\?\~]|[\*\+\-\!\-\$&\?\~]$/;
278
+ if (!reg.test(a)) return a;
279
+ required = test(/^\*|\*$/, a);
280
+ inlist = test(/^[\+\!]|[\+\!]$/, a);
281
+ hidden = test(/^\-|\-$/, a);
282
+ readonly = test(/^[\$&]|[\$&]$/, a);
283
+ delete_onempty = test(/^\?|\?$/, a);
284
+ delete_onsubmit = test(/^\~|\~$/, a);
285
+ return a.replace(reg, '');
286
+ };
287
+ type = is(type);
273
288
  if (typeof name === 'string') {
274
289
  if (!isContainer) {
275
290
  if (!type) {
@@ -370,17 +385,23 @@ function parse(piece) {
370
385
  type = type.slice(1);
371
386
  }
372
387
  if (typeof options === "string") {
373
- options = is_require(options);
388
+ options = is(options);
374
389
  var needUnfold = /^\[|\]$/.test(options);
375
390
  options = options.replace(/^\[|\]$/g, '');
376
391
  if (/,/.test(options)) options = scanSlant(options, ',');
377
392
  else options = scanSlant(options, "");
378
393
  if (needUnfold) unfoldOptions(size, options);
379
394
  }
380
- name = is_require(name);
381
- key = is_require(key);
395
+ name = is(name);
396
+ key = is(key);
382
397
  }
383
- var field = { name, checks, required, needs, type, key, size, unit, endwith, ratio, value, repeat, comment, options };
398
+ var field = {
399
+ name, type, key, value, comment, options,
400
+ size, unit, ratio,
401
+ needs, checks, repeat, endwith,
402
+ required, inlist, hidden, readonly,
403
+ delete_onempty, delete_onsubmit,
404
+ };
384
405
  var parent = piecepath[piecepath.length - 1];
385
406
  if (parent) {
386
407
  field.parent = parent;
@@ -0,0 +1,119 @@
1
+ var minus = function (d1, d2) {
2
+ d1 = d1.split(".");
3
+ d2 = d2.split(".");
4
+ for (var cx = 0, dx = Math.max(d1.length, d2.length); cx < dx; cx++) {
5
+ var a = +d1[cx] || 0;
6
+ var b = +d2[cx] || 0;
7
+ if (a !== b) {
8
+ return a - b;
9
+ }
10
+ }
11
+ return 0;
12
+ };
13
+
14
+ var createMap = function (str) {
15
+ str = str.split('');
16
+ var map = {};
17
+ for (var cx = 0, dx = str.length; cx < dx; cx++) {
18
+ map[str[cx]] = cx;
19
+ }
20
+ return map;
21
+ };
22
+ var 甲乙丙丁戊己庚辛壬癸 = "甲乙丙丁戊己庚辛壬癸";
23
+
24
+ var map一二三 = extend(createMap("零一二三四五六七八九"), createMap("〇壹贰叁肆伍陆柒捌玖"));
25
+ var power = {
26
+ 拾: 10,
27
+ 十: 10,
28
+ 佰: 100,
29
+ 百: 100,
30
+ 仟: 1000,
31
+ 千: 1000,
32
+ 万: 10000,
33
+ 萬: 10000,
34
+ 亿: 100000000,
35
+ };
36
+ var parse一二三 = function (a) {
37
+ if (!/[十百千万亿拾佰仟萬]/.test(a)) return parseInt(a.split("").map(a => map一二三[a]).join(''));
38
+ var base = 0;
39
+ a.replace(/([^十百千万亿拾佰仟萬零〇]*)([十百千万亿拾佰仟萬]*)/g, function (_, a, b) {
40
+ if (!_) return;
41
+ if (!a) a = 1;
42
+ else a = map一二三[a];
43
+ var r = 1;
44
+ b.split('').forEach(b => r *= power[b]);
45
+ base += a * r;
46
+ })
47
+ return base;
48
+ };
49
+ var map甲乙丙 = createMap("甲乙丙丁戊己庚辛壬癸");
50
+ var map子丑寅 = createMap("子丑寅卯辰巳午未申酉戌亥");
51
+
52
+ var reg123 = /^(\d+|\d+[\.\d]+\d+)[\s\S]*$/;
53
+ var reg一二三 = /^([一二三四五六七八九十百千万亿壹贰叁肆伍陆柒捌玖拾佰仟萬零〇]+)[\s\S]*$/;
54
+ var reg甲乙丙 = /^([甲乙丙丁戊己庚辛壬癸])[\s\S]*$/;
55
+ var reg子丑寅 = /^([子丑寅卯辰巳午未申酉戌亥])[\s\S]*$/;
56
+ var reg天干地支 = /^([甲乙丙丁戊己庚辛壬癸][子丑寅卯辰巳午未申酉戌亥])[\s\S]*$/;
57
+
58
+ var getDelta = function (a, b, reg, parse) {
59
+ var match1 = reg.exec(a);
60
+ var match2 = reg.exec(b);
61
+ if (match1 && match2) {
62
+ var [, d1] = match1;
63
+ var [, d2] = match2;
64
+ if (parse) {
65
+ d1 = parse(d1);
66
+ d2 = parse(d2);
67
+ var delta = d1 - d2;
68
+ } else {
69
+
70
+ var delta = minus(d1, d2);
71
+ }
72
+ if (delta) return delta;
73
+ }
74
+ if (match1) return -1;
75
+ if (match2) return 1;
76
+ return 0;
77
+ };
78
+ var parse干支 = function (a) {
79
+ var [g, z] = a;
80
+ g = map甲乙丙[g];
81
+ z = map子丑寅[z];
82
+ return (12 + g - z) % 12 / 2 * 10 + g + 1;
83
+ };
84
+ var compare = function (a, b) {
85
+ for (var cx1 = a.length - 1, cx2 = a.length - 1; cx1 >= 0 && cx2 >= 0; cx1--, cx2--) {
86
+ while (/\s\u00a0/.test(a[cx1])) cx1--;
87
+ while (/\s\u00a0/.test(b[cx2])) cx2--;
88
+ if (a[cx1] !== b[cx2] || a[cx1] in map子丑寅 || a[cx1] in map一二三 || a in power) break;
89
+ }
90
+ a = a.slice(0, cx1 + 1);
91
+ b = b.slice(0, cx2 + 1);
92
+ for (var cx1 = 0, cx2 = 0, dx1 = a.length, dx2 = b.length; cx1 < dx1 && cx2 < dx2; cx1++, cx2++) {
93
+ while (/[\s\u00a0]/.test(a[cx1])) cx1++;
94
+ while (/[\s\u00a0]/.test(b[cx2])) cx2++;
95
+ if (a[cx1] !== b[cx2] || a[cx1] in map甲乙丙 || a[cx1] in map一二三 || a in power) break;
96
+ }
97
+ if (cx1) a = a.slice(cx1);
98
+ if (cx2) b = b.slice(cx2);
99
+ if (!a) return -1;
100
+ if (!b) return 1;
101
+ var delta = getDelta(a, b, reg123);
102
+ if (delta) return delta;
103
+ delta = getDelta(a, b, reg一二三, parse一二三);
104
+ if (delta) return delta;
105
+ delta = getDelta(a, b, reg天干地支, parse干支);
106
+ if (delta) return delta;
107
+ delta = getDelta(a, b, reg甲乙丙, d => map甲乙丙[d]);
108
+ if (delta) return delta;
109
+ delta = getDelta(a, b, reg子丑寅, d => map子丑寅[d]);
110
+ if (delta) return delta;
111
+ return 0;
112
+ }
113
+ function sortname(list = this) {
114
+ if (this !== arguments[1] && arguments.length === 2) {
115
+ return compare(arguments[0], arguments[1]);
116
+ }
117
+ list = list.sort(compare);
118
+ return list;
119
+ }
@@ -1,7 +1,6 @@
1
1
  var page = document.createElement("都说我负天下人_可你们天下人_又何曾善待过我");
2
2
  page.innerHTML = left;
3
3
  if (!user.avatar) user.avatar = "user/avatar.png";
4
- frame$route.fetch('menu.yml')
5
4
  render(page, {
6
5
  ylist: menu,
7
6
  btn: button,
@@ -11,6 +10,9 @@ render(page, {
11
10
  popup,
12
11
  menus: frame$route,
13
12
  });
13
+ on('append')(page, function () {
14
+ frame$route.open();
15
+ });
14
16
  function main() {
15
17
  return page;
16
18
  }
@@ -98,9 +98,9 @@
98
98
  if (!active || result.indexOf(active) < 0) {
99
99
  actived = mmap[opened.active] || actived;
100
100
  if (actived) {
101
- if (actived_value === historys.length) result.open(actived);
102
- } else {
103
- result.open(result[0]);
101
+ if (actived_value === historys.length) {
102
+ result.active = actived;
103
+ };
104
104
  }
105
105
  }
106
106
  return result;
@@ -133,7 +133,10 @@
133
133
  }
134
134
  });
135
135
  result.open = function (menu) {
136
- if (!menu) return;
136
+ if (!menu) {
137
+ menu = result.active || result[0];
138
+ delete result.active;
139
+ }
137
140
  if (!menu.path) {
138
141
  menu.closed = !menu.closed;
139
142
  return;
@@ -176,7 +179,6 @@
176
179
  data.from(url).loading_promise.then(result.update);
177
180
  return result;
178
181
  };
179
- if (items.length) result.update(items);
180
-
182
+ result.update(items);
181
183
  return result;
182
184
  });
@@ -1,15 +1,15 @@
1
1
  <div class="menu-items">
2
2
  <btn class="menu-item menu-switch" ng-click=switchMenu()>
3
- <i class="fa fa-bars"></i>
3
+
4
4
  </btn>
5
5
  <btn ng-if="fullscreen.is()" ng-click="fullscreen.exit(alert)" class="menu-switch menu-item">
6
- <i class="fa fa-compress"></i>
6
+
7
7
  </btn>
8
8
  <btn ng-if="fullscreen.allow&&!fullscreen.is()" ng-click=fullscreen.exec() class="menu-switch menu-item">
9
- <i class="fa fa-expand"></i>
9
+
10
10
  </btn>
11
- <btn class="menu-item menu-switch" ng-click="route.reload()">
12
- <i class="fa fa-refresh" ng-class="{'fa-pulse':data.loading_count>0}"></i>
11
+ <btn class="menu-item menu-switch" ng-class="{'load':data.loading_count>0}" ng-click="route.reload()">
12
+
13
13
  </btn>
14
14
  <btn class="menu-item" @title="option.name" ng-click="open(option)" ng-repeat="option in options" pop>
15
15
  <i class="fa" ng-class="option.icon"></i>
@@ -166,4 +166,26 @@
166
166
  width: 50px;
167
167
  margin: 5px;
168
168
  }
169
+ }
170
+
171
+ btn {
172
+ vertical-align: top;
173
+ }
174
+ @keyframes rotate {
175
+ 0%{
176
+ transform: rotate(0deg);
177
+ }
178
+ 50%{
179
+ transform: rotate(240deg);
180
+ }
181
+ 100%{
182
+ transform: rotate(360deg);
183
+ }
184
+ }
185
+ .load{
186
+ >.label{
187
+ display: inline-block;
188
+ animation: rotate 1s infinite;
189
+ }
190
+
169
191
  }
@@ -104,10 +104,10 @@ function main(mainPath, historyName = "") {
104
104
  }
105
105
  zimoli();
106
106
  };
107
- if (leftPath) {
107
+ if (typeof leftPath === 'string') {
108
108
  zimoli.prepare(leftPath, hook);
109
109
  } else hook();
110
- if (topPath) {
110
+ if (typeof topPath === 'string') {
111
111
  zimoli.prepare(topPath, hook);
112
112
  } else hook();
113
113
  });
@@ -3,8 +3,7 @@ function main(config, item, params) {
3
3
  if (!config) return ok();
4
4
  if (isObject(config)) {
5
5
  if (config.do instanceof Function) {
6
- config.do();
7
- return;
6
+ return ok(config.do(item, params));
8
7
  }
9
8
  if (config.modal) {
10
9
  var path = isString(config.modal) ? config.modal : config.modal.path;
@@ -337,7 +337,7 @@ function addhook() {
337
337
  }
338
338
  if (!mousedownEvent) return;
339
339
  var target = targetElement || mousedownEvent.currentTarget;
340
- hooka(function (target) {
340
+ hooka.call(targetElement, function (target) {
341
341
  var res = [].filter.call(allowdrops || (matcher ? matcher(target) : document.querySelectorAll("[allowdrop]")), function (child) {
342
342
  return target && overlap(child, target);
343
343
  }).filter(e => {
@@ -14,9 +14,9 @@
14
14
  display: inline-block;
15
15
  white-space: nowrap;
16
16
  text-align: center;
17
- // cursor: default;
18
17
  overflow: hidden;
19
18
  outline: none;
19
+ user-select: none;
20
20
  }
21
21
  >.label{
22
22
  position: relative;
@@ -177,7 +177,6 @@
177
177
 
178
178
  a&,
179
179
  &[type$=anchor] {
180
- padding: 0;
181
180
  box-shadow: none;
182
181
  text-shadow: none;
183
182
  background: none;
@@ -3,23 +3,28 @@ var createMenu = function (event, items) {
3
3
  var menulist = sampleElement.cloneNode();
4
4
  menulist.setAttribute("mode", "v");
5
5
  menulist.tabIndex = 0;
6
-
7
- var elem = menuList(menulist, items, function () {
8
- if (action.apply(this, arguments) !== false) {
6
+ items = items.filter(item => {
7
+ if (!item.when) return true;
8
+ if (!item.when(event)) return false;
9
+ return true;
10
+ });
11
+ var elem = menuList(menulist, items, async function (item) {
12
+ if (await action.call(this, item, event.target) !== false) {
9
13
  remove(elem);
10
14
  }
11
15
  });
12
16
 
13
17
  return elem;
14
18
  }
15
- function contextmenu(target, menu) {
19
+ function contextmenu(target, menuItems) {
16
20
  on("contextmenu")(target, function (event) {
17
21
  event.preventDefault();
18
- if (menu instanceof Function) {
19
- menu = menu.call(this, event);
22
+ var menu;
23
+ if (menuItems instanceof Function) {
24
+ menu = menuItems.call(this, event);
20
25
  }
21
- if (menu instanceof Array) {
22
- menu = createMenu.call(this, event, menu);
26
+ if (menuItems instanceof Array) {
27
+ menu = createMenu.call(this, event, menuItems);
23
28
  }
24
29
  if (!menu) return;
25
30
  css(menu, {
@@ -175,8 +175,8 @@ function cross(method, url, headers) {
175
175
  onerror({ status: "网络断开" });
176
176
  break;
177
177
  }
178
- if (!navigator.response) {
179
- onerror({ status: "服务器无响应" });
178
+ if (!xhr.response) {
179
+ onerror({ status: "无法访问服务器" });
180
180
  break;
181
181
  }
182
182
  case 200:
@@ -268,7 +268,7 @@ function cross(method, url, headers) {
268
268
  var then = xhr.then;
269
269
  delete xhr.then;
270
270
  if (loaded) onloads.splice(0, onloads.length).map(e => e instanceof Function && e(xhr));
271
- if (errored) onerrors.splice(0, onerrors.length).map(e => e instanceof Function && e(xhr));
271
+ if (errored) onerrors.splice(0, onerrors.length).map(e => e instanceof Function && e(errored));
272
272
  xhr.then = then;
273
273
  };
274
274
  var onloads = [], onerrors = [];
@@ -16,7 +16,7 @@ function main(elem) {
16
16
  }, false);
17
17
  elem.setAttribute("field", '');
18
18
  elem.renders = [function () {
19
- if (!this.src) return;
19
+ if (!(this.src instanceof Array)) return;
20
20
  var [f, data] = this.src;
21
21
  if (!f || !data) return;
22
22
  var v = data[f.key];
@@ -1,3 +1,4 @@
1
- <menu-item ng-repeat="menu in menus" ng-click="open(menu,event)" ng-mouseleave="clearTimeout(popTimer)"
2
- ng-mouseenter="popTimer=popMenu(menu,event)" ng-class="{'has-children':menu.children&&menu.children.length}">
1
+ <menu-item ng-repeat="menu in menus" ng-if="!menu.hidden" ng-click="open(menu,event)"
2
+ ng-mouseleave="clearTimeout(popTimer)" ng-mouseenter="popTimer=popMenu(menu,event)"
3
+ ng-class="{'has-children':menu.children&&menu.children.length,'warn':menu.type==='danger'||menu.type==='warn'||menu.type==='red'}">
3
4
  </menu-item>