-
Notifications
You must be signed in to change notification settings - Fork 0
/
new.patch
60 lines (56 loc) · 2.67 KB
/
new.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Index: web/js/app/view/manager/addNewUserWin.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/js/app/view/manager/addNewUserWin.js (revision a588a9b9776965050610132a486cca1ff53e36ad)
+++ web/js/app/view/manager/addNewUserWin.js (revision )
@@ -123,6 +123,10 @@
invalidText: '用户信息不合法',
tipTpl: Ext.create('Ext.XTemplate', '<ul class="' + Ext.plainListCls + '"><tpl for="."><li><span class="field-name">{name}</span>: <span class="error">{error}</span></li></tpl></ul>'),
+ onDestroy: function() {
+ Ext.destroy(this.tip);
+ Ext.Component.prototype.onDestroy.call(this);
+ },
getTip: function() {
var tip = this.tip;
if (!tip) {
@@ -134,18 +138,36 @@
anchor: 'top',
//mouseOffset: [-11, -2],
closable: true,
- constrain :true,
- constrainPosition: true,
+ //constrain :true,
+ constrainPosition: false,
cls: 'errors-tip'
});
+
+ var win = this.up('window');
+
+ if (win) {
+ /*tip.mon(win, 'move', function() {
+ if (tip.isVisible()) {
+ Ext.defer(tip.show, 50, tip);
+ }
+ });*/
+ tip.mon(Ext.getBody(), 'mouseup', function() {
+ if (tip.isVisible()) {
- tip.show();
- }
+ tip.show();
+ }
+ }, null, {delay: 50});
+ }
+
+ tip.show();
+
+ }
return tip;
},
setErrors: function(errors) {
var me = this,
tip = me.getTip();
+
errors = Ext.Array.from(errors);
\ No newline at end of file