Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
0c50834d
Commit
0c50834d
authored
Apr 23, 2016
by
antoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewriting class binding method
重写类绑定方法
parent
78755518
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
40 deletions
+39
-40
index.jsx
source/modules/database/asp/index.jsx
+4
-4
index.jsx
source/modules/database/custom/index.jsx
+4
-4
index.jsx
source/modules/database/php/index.jsx
+4
-4
index.jsx
source/modules/filemanager/index.jsx
+1
-1
index.jsx
source/modules/plugin/index.jsx
+8
-8
index.jsx
source/modules/settings/index.jsx
+1
-1
category.jsx
source/modules/shellmanager/category.jsx
+5
-5
index.jsx
source/modules/shellmanager/index.jsx
+4
-4
list.jsx
source/modules/shellmanager/list.jsx
+8
-9
No files found.
source/modules/database/asp/index.jsx
View file @
0c50834d
...
...
@@ -93,13 +93,13 @@ class ASP {
{
text
:
'添加配置'
,
icon
:
'fa fa-plus-circle'
,
action
:
this
::
this
.
addConf
action
:
this
.
addConf
.
bind
(
this
)
},
{
divider
:
true
},
{
text
:
'删除配置'
,
icon
:
'fa fa-remove'
,
action
:
this
::
this
.
delConf
action
:
this
.
delConf
.
bind
(
this
)
}
],
event
);
});
...
...
@@ -456,7 +456,7 @@ class ASP {
// 禁用SQL编辑框
disableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
disableItem
this
.
manager
.
query
.
toolbar
.
disableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
true
);
}
...
...
@@ -464,7 +464,7 @@ class ASP {
// 启用SQL编辑框
enableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
enableItem
this
.
manager
.
query
.
toolbar
.
enableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
false
);
}
...
...
source/modules/database/custom/index.jsx
View file @
0c50834d
...
...
@@ -89,13 +89,13 @@ class ASP {
{
text
:
'添加配置'
,
icon
:
'fa fa-plus-circle'
,
action
:
this
::
this
.
addConf
action
:
this
.
addConf
.
bind
(
this
)
},
{
divider
:
true
},
{
text
:
'删除配置'
,
icon
:
'fa fa-remove'
,
action
:
this
::
this
.
delConf
action
:
this
.
delConf
.
bind
(
this
)
}
],
event
);
});
...
...
@@ -455,7 +455,7 @@ class ASP {
// 禁用SQL编辑框
disableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
disableItem
this
.
manager
.
query
.
toolbar
.
disableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
true
);
}
...
...
@@ -463,7 +463,7 @@ class ASP {
// 启用SQL编辑框
enableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
enableItem
this
.
manager
.
query
.
toolbar
.
enableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
false
);
}
...
...
source/modules/database/php/index.jsx
View file @
0c50834d
...
...
@@ -84,13 +84,13 @@ class PHP {
{
text
:
LANG
[
'list'
][
'menu'
][
'add'
],
icon
:
'fa fa-plus-circle'
,
action
:
this
::
this
.
addConf
action
:
this
.
addConf
.
bind
(
this
)
},
{
divider
:
true
},
{
text
:
LANG
[
'list'
][
'menu'
][
'del'
],
icon
:
'fa fa-remove'
,
action
:
this
::
this
.
delConf
action
:
this
.
delConf
.
bind
(
this
)
}
],
event
);
});
...
...
@@ -481,7 +481,7 @@ class PHP {
// 禁用SQL编辑框
disableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
disableItem
this
.
manager
.
query
.
toolbar
.
disableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
true
);
}
...
...
@@ -489,7 +489,7 @@ class PHP {
// 启用SQL编辑框
enableEditor
()
{
[
'exec'
,
'clear'
].
map
(
this
.
manager
.
query
.
toolbar
::
this
.
manager
.
query
.
toolbar
.
enableItem
this
.
manager
.
query
.
toolbar
.
enableItem
.
bind
(
this
.
manager
.
query
.
toolbar
)
);
this
.
manager
.
query
.
editor
.
setReadOnly
(
false
);
}
...
...
source/modules/filemanager/index.jsx
View file @
0c50834d
...
...
@@ -837,7 +837,7 @@ class FileManager {
editor
.
session
.
setValue
(
ret
);
// 定时刷新
const
inter
=
setInterval
(
editor
::
editor
.
resize
,
200
);
const
inter
=
setInterval
(
editor
.
resize
.
bind
(
editor
)
,
200
);
win
.
attachEvent
(
'onClose'
,
()
=>
{
clearInterval
(
inter
);
return
true
;
...
...
source/modules/plugin/index.jsx
View file @
0c50834d
...
...
@@ -8,7 +8,7 @@ const LANG_T = antSword['language']['toastr'];
class
Plugin
{
constructor
()
{
antSword
[
'menubar'
].
reg
(
'plugin'
,
this
::
this
.
open
);
antSword
[
'menubar'
].
reg
(
'plugin'
,
this
.
open
.
bind
(
this
)
);
this
.
homepage
=
'http://u.uyu.us/'
;
}
...
...
@@ -39,8 +39,8 @@ class Plugin {
// 开始加载web
cell
.
progressOn
();
const
frame
=
cell
.
attachURI
(
this
.
homepage
);
frame
.
addEventListener
(
'did-start-loading'
,
cell
::
cell
.
progressOn
);
frame
.
addEventListener
(
'did-finish-load'
,
cell
::
cell
.
progressOff
);
frame
.
addEventListener
(
'did-start-loading'
,
cell
.
progressOn
.
bind
(
cell
)
);
frame
.
addEventListener
(
'did-finish-load'
,
cell
.
progressOff
.
bind
(
cell
)
);
frame
.
addEventListener
(
'did-fail-load'
,
(
err
)
=>
{
cell
.
progressOff
();
// cell.close();
...
...
source/modules/settings/index.jsx
View file @
0c50834d
...
...
@@ -10,7 +10,7 @@ import AProxy from './aproxy'
class
Settings
{
constructor
()
{
antSword
[
'menubar'
].
reg
(
'settings'
,
this
::
this
.
open
);
antSword
[
'menubar'
].
reg
(
'settings'
,
this
.
open
.
bind
(
this
)
);
[
'about'
,
'update'
,
'language'
,
'aproxy'
].
map
((
_
)
=>
{
antSword
[
'menubar'
].
reg
(
`settings-
${
_
}
`
,
this
.
setActive
.
bind
(
this
,
_
));
});
...
...
source/modules/shellmanager/category.jsx
View file @
0c50834d
/
/
//
右侧目录管理模块
//
/
**
*
右侧目录管理模块
*/
'use strict'
;
...
...
@@ -95,7 +95,7 @@ class Category {
sidebar
.
callEvent
(
'onSelect'
,
[
'default'
]);
// 3. 删除侧边栏
sidebar
.
items
(
category
).
remove
();
setTimeout
(
this
::
this
.
updateTitle
,
100
);
setTimeout
(
this
.
updateTitle
.
bind
(
this
)
,
100
);
}
else
{
return
toastr
.
error
(
LANG
[
'category'
][
'del'
][
'error'
](
category
,
ret
.
toString
()),
LANG_T
[
'error'
]);
}
...
...
source/modules/shellmanager/index.jsx
View file @
0c50834d
/
/
//
Shell管理模块
/
/
/
**
*
Shell管理模块
*
/
'use strict'
;
...
...
@@ -37,7 +37,7 @@ class ShellManager {
this
.
win
.
attachViewportTo
(
cell
.
cell
);
// 监听菜单栏消息
antSword
[
'menubar'
].
reg
(
'shell-add'
,
this
::
this
.
addData
);
antSword
[
'menubar'
].
reg
(
'shell-add'
,
this
.
addData
.
bind
(
this
)
);
this
.
loadData
();
...
...
source/modules/shellmanager/list.jsx
View file @
0c50834d
/
/
//
左侧shell数据管理模块
//
/
**
*
左侧shell数据管理模块
*/
// import Db from '../../database/';
import
Terminal
from
'../terminal/'
;
import
Database
from
'../database/'
;
import
FileManager
from
'../filemanager/'
;
...
...
@@ -82,7 +81,7 @@ class List {
{
text
:
LANG
[
'contextmenu'
][
'plugin'
],
icon
:
'fa fa-puzzle-piece'
,
disabled
:
!
id
||
ids
.
length
!==
1
||
true
,
subMenu
:
[]
},
{
text
:
LANG
[
'contextmenu'
][
'pluginCenter'
],
icon
:
'fa fa-cart-arrow-down'
,
action
:
antSword
[
'menubar'
].
run
.
bind
(
antSword
[
'menubar'
],
'plugin'
)
},
{
divider
:
true
},
{
text
:
LANG
[
'contextmenu'
][
'add'
],
icon
:
'fa fa-plus-circle'
,
action
:
manager
::
manager
.
addData
},
{
text
:
LANG
[
'contextmenu'
][
'add'
],
icon
:
'fa fa-plus-circle'
,
action
:
manager
.
addData
.
bind
(
manager
)
},
{
text
:
LANG
[
'contextmenu'
][
'edit'
],
icon
:
'fa fa-edit'
,
disabled
:
!
id
||
ids
.
length
!==
1
,
action
:
()
=>
{
manager
.
editData
(
id
);
}
},
...
...
@@ -118,12 +117,12 @@ class List {
});
return
ret
;
})()
},
{
text
:
LANG
[
'contextmenu'
][
'search'
],
icon
:
'fa fa-search'
,
action
:
manager
::
manager
.
searchData
,
disabled
:
true
},
{
text
:
LANG
[
'contextmenu'
][
'search'
],
icon
:
'fa fa-search'
,
action
:
manager
.
searchData
.
bind
(
manager
)
,
disabled
:
true
},
{
divider
:
true
},
{
text
:
LANG
[
'contextmenu'
][
'clearCache'
],
icon
:
'fa fa-trash-o'
,
disabled
:
!
id
,
action
:
()
=>
{
manager
.
clearCache
(
id
);
}
},
{
text
:
LANG
[
'contextmenu'
][
'clearAllCache'
],
icon
:
'fa fa-trash'
,
action
:
manager
::
manager
.
clearAllCache
}
{
text
:
LANG
[
'contextmenu'
][
'clearAllCache'
],
icon
:
'fa fa-trash'
,
action
:
manager
.
clearAllCache
.
bind
(
manager
)
}
],
event
);
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment