Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
pve-manager
Commits
900abd33
Commit
900abd33
authored
Jul 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy panel/SubConfigPanel.js from manager to manager5
parent
55aa5636
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
0 deletions
+80
-0
SubConfigPanel.js
www/manager5/panel/SubConfigPanel.js
+80
-0
No files found.
www/manager5/panel/SubConfigPanel.js
0 → 100644
View file @
900abd33
Ext
.
define
(
'
PVE.panel.SubConfig
'
,
{
extend
:
'
Ext.tab.Panel
'
,
alias
:
[
'
widget.pvePanelSubConfig
'
],
configPrefix
:
undefined
,
getHState
:
function
(
itemId
)
{
/*jslint confusion: true */
var
me
=
this
;
if
(
!
itemId
)
{
itemId
=
me
.
getActiveTab
().
itemId
;
}
var
first
=
me
.
items
.
get
(
0
);
var
ntab
;
// Note: '' is alias for first tab.
if
(
itemId
===
first
.
itemId
)
{
ntab
=
me
.
configPrefix
;
}
else
{
ntab
=
me
.
configPrefix
+
'
-
'
+
itemId
;
}
return
{
value
:
ntab
};
},
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
phstateid
)
{
throw
"
no parent history state specified
"
;
}
var
sp
=
Ext
.
state
.
Manager
.
getProvider
();
var
state
=
sp
.
get
(
me
.
phstateid
);
var
hsregex
=
/^
([^\-\s]
+
)
-
(\S
+
)?
$/
;
if
(
state
&&
state
.
value
)
{
var
res
=
hsregex
.
exec
(
state
.
value
);
if
(
res
&&
res
[
1
]
&&
res
[
2
]
&&
res
[
1
]
===
me
.
configPrefix
)
{
me
.
activeTab
=
res
[
2
];
}
}
Ext
.
apply
(
me
,
{
plain
:
true
,
tabPosition
:
'
bottom
'
,
listeners
:
{
afterrender
:
function
(
tp
)
{
var
first
=
tp
.
items
.
get
(
0
);
if
(
first
)
{
first
.
fireEvent
(
'
show
'
,
first
);
}
},
tabchange
:
function
(
tp
,
newcard
,
oldcard
)
{
var
state
=
me
.
getHState
(
newcard
.
itemId
);
sp
.
set
(
me
.
phstateid
,
state
);
}
}
});
me
.
callParent
();
var
statechange
=
function
(
sp
,
key
,
state
)
{
if
((
key
===
me
.
phstateid
)
&&
state
)
{
var
first
=
me
.
items
.
get
(
0
);
var
atab
=
me
.
getActiveTab
().
itemId
;
var
res
=
hsregex
.
exec
(
state
.
value
);
var
ntab
=
(
res
&&
res
[
1
])
?
res
[
1
]
:
first
.
itemId
;
if
(
ntab
&&
(
atab
!=
ntab
))
{
me
.
setActiveTab
(
ntab
);
}
}
};
me
.
mon
(
sp
,
'
statechange
'
,
statechange
);
}
});
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