1
1
import helper from './utils/updateWizardHelper' ;
2
2
import SynoApiProvider from './utils/synoApiProvider' ;
3
+ // Namespace definition
4
+ Ext . ns ( 'SYNOCOMMUNITY.RRManager' ) ;
3
5
export default
4
- // Window definition
5
- Ext . define ( 'SYNOCOMMUNITY.RRManager.AppWindow' , {
6
- helper : SYNOCOMMUNITY . RRManager . Helper ,
7
- apiProvider : SYNOCOMMUNITY . RRManager . SynoApiProvider ,
8
- formatString : function ( str , ...args ) {
9
- return str . replace ( / { ( \d + ) } / g, function ( match , number ) {
10
- return typeof args [ number ] !== 'undefined' ? args [ number ] : match ;
11
- } ) ;
12
- } ,
13
- extend : "SYNO.SDS.PageListAppWindow" ,
14
- activePage : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
15
- defaultWinSize : { width : 1160 , height : 620 } ,
16
- constructor : function ( config ) {
17
- const t = this ;
18
- t . callParent ( [ t . fillConfig ( config ) ] ) ;
19
- this . apiProvider . init ( this . sendWebAPI . bind ( this ) ) ;
20
- } ,
21
- fillConfig : function ( e ) {
22
- let t ;
23
- t = this . getListItems ( ) ;
24
- const i = {
25
- cls : "syno-app-iscsi" ,
26
- width : this . defaultWinSize . width ,
27
- height : this . defaultWinSize . height ,
28
- minWidth : this . defaultWinSize . width ,
29
- minHeight : this . defaultWinSize . height ,
30
- activePage : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
31
- listItems : t ,
32
- } ;
33
- return Ext . apply ( i , e ) , i ;
6
+ // Window definition
7
+ Ext . define ( 'SYNOCOMMUNITY.RRManager.AppWindow' , {
8
+ helper : SYNOCOMMUNITY . RRManager . Helper ,
9
+ apiProvider : SYNOCOMMUNITY . RRManager . SynoApiProvider ,
10
+ formatString : function ( str , ...args ) {
11
+ return str . replace ( / { ( \d + ) } / g, function ( match , number ) {
12
+ return typeof args [ number ] !== 'undefined' ? args [ number ] : match ;
13
+ } ) ;
14
+ } ,
15
+ extend : "SYNO.SDS.PageListAppWindow" ,
16
+ activePage : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
17
+ defaultWinSize : { width : 1160 , height : 620 } ,
18
+ constructor : function ( config ) {
19
+ const t = this ;
20
+ t . callParent ( [ t . fillConfig ( config ) ] ) ;
21
+ this . apiProvider . init ( this . sendWebAPI . bind ( this ) ) ;
22
+ } ,
23
+ fillConfig : function ( e ) {
24
+ let t ;
25
+ t = this . getListItems ( ) ;
26
+ const i = {
27
+ cls : "syno-app-iscsi" ,
28
+ width : this . defaultWinSize . width ,
29
+ height : this . defaultWinSize . height ,
30
+ minWidth : this . defaultWinSize . width ,
31
+ minHeight : this . defaultWinSize . height ,
32
+ activePage : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
33
+ listItems : t ,
34
+ } ;
35
+ return Ext . apply ( i , e ) , i ;
34
36
35
- } ,
36
- getListItems : function ( ) {
37
- return [
38
- {
39
- text : this . helper . V ( 'ui' , 'tab_general' ) ,
40
- iconCls : "icon-overview" ,
41
- fn : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
42
- // help: "overview.html",
43
- } ,
44
- {
45
- text : this . helper . V ( 'ui' , 'tab_addons' ) ,
46
- iconCls : "icon-log" ,
47
- fn : "SYNOCOMMUNITY.RRManager.Addons.Main" ,
48
- // help: "overview.html",
49
- } ,
50
- {
51
- text : this . helper . V ( 'ui' , 'tab_configuration' ) ,
52
- iconCls : "icon-settings" ,
53
- fn : "SYNOCOMMUNITY.RRManager.Setting.Main" ,
54
- // help: "setting.html",
55
- } ,
56
- {
57
- text : this . helper . V ( 'ui' , 'tab_debug' ) ,
58
- iconCls : "icon-debug" ,
59
- fn : "SYNOCOMMUNITY.RRManager.Debug.Main" ,
60
- // help: "setting.html",
61
- } ,
62
- ] ;
63
- } ,
37
+ } ,
38
+ getListItems : function ( ) {
39
+ return [
40
+ {
41
+ text : this . helper . V ( 'ui' , 'tab_general' ) ,
42
+ iconCls : "icon-overview" ,
43
+ fn : "SYNOCOMMUNITY.RRManager.Overview.Main" ,
44
+ // help: "overview.html",
45
+ } ,
46
+ {
47
+ text : this . helper . V ( 'ui' , 'tab_addons' ) ,
48
+ iconCls : "icon-log" ,
49
+ fn : "SYNOCOMMUNITY.RRManager.Addons.Main" ,
50
+ // help: "overview.html",
51
+ } ,
52
+ {
53
+ text : this . helper . V ( 'ui' , 'tab_configuration' ) ,
54
+ iconCls : "icon-settings" ,
55
+ fn : "SYNOCOMMUNITY.RRManager.Setting.Main" ,
56
+ // help: "setting.html",
57
+ } ,
58
+ {
59
+ text : this . helper . V ( 'ui' , 'tab_debug' ) ,
60
+ iconCls : "icon-debug" ,
61
+ fn : "SYNOCOMMUNITY.RRManager.Debug.Main" ,
62
+ // help: "setting.html",
63
+ } ,
64
+ ] ;
65
+ } ,
64
66
65
- onOpen : function ( a ) {
66
- this . apiProvider . runScheduledTask ( 'MountLoaderDisk' ) ;
67
- SYNOCOMMUNITY . RRManager . AppWindow . superclass . onOpen . call ( this , a ) ;
68
- } ,
69
- onDestroy : function ( e ) {
70
- this . apiProvider . runScheduledTask ( 'UnMountLoaderDisk' ) ;
71
- SYNOCOMMUNITY . RRManager . AppWindow . superclass . onDestroy . call ( this ) ;
72
- }
73
- } ) ;
67
+ onOpen : function ( a ) {
68
+ this . apiProvider . runScheduledTask ( 'MountLoaderDisk' ) ;
69
+ SYNOCOMMUNITY . RRManager . AppWindow . superclass . onOpen . call ( this , a ) ;
70
+ } ,
71
+ onDestroy : function ( e ) {
72
+ this . apiProvider . runScheduledTask ( 'UnMountLoaderDisk' ) ;
73
+ SYNOCOMMUNITY . RRManager . AppWindow . superclass . onDestroy . call ( this ) ;
74
+ }
75
+ } ) ;
0 commit comments