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
8f7445b3
Commit
8f7445b3
authored
Jul 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy panel/InputPanel.js from manager to manager5
parent
7f9f949c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
InputPanel.js
www/manager5/panel/InputPanel.js
+108
-0
No files found.
www/manager5/panel/InputPanel.js
0 → 100644
View file @
8f7445b3
Ext
.
define
(
'
PVE.panel.InputPanel
'
,
{
extend
:
'
Ext.panel.Panel
'
,
alias
:
[
'
widget.inputpanel
'
],
border
:
false
,
// overwrite this to modify submit data
onGetValues
:
function
(
values
)
{
return
values
;
},
getValues
:
function
(
dirtyOnly
)
{
var
me
=
this
;
if
(
Ext
.
isFunction
(
me
.
onGetValues
))
{
dirtyOnly
=
false
;
}
var
values
=
{};
Ext
.
Array
.
each
(
me
.
query
(
'
[isFormField]
'
),
function
(
field
)
{
if
(
!
dirtyOnly
||
field
.
isDirty
())
{
PVE
.
Utils
.
assemble_field_data
(
values
,
field
.
getSubmitData
());
}
});
return
me
.
onGetValues
(
values
);
},
setValues
:
function
(
values
)
{
var
me
=
this
;
var
form
=
me
.
up
(
'
form
'
);
Ext
.
iterate
(
values
,
function
(
fieldId
,
val
)
{
var
field
=
me
.
query
(
'
[isFormField][name=
'
+
fieldId
+
'
]
'
)[
0
];
if
(
field
)
{
field
.
setValue
(
val
);
if
(
form
.
trackResetOnLoad
)
{
field
.
resetOriginalValue
();
}
}
});
},
initComponent
:
function
()
{
var
me
=
this
;
var
items
;
if
(
me
.
items
)
{
me
.
columns
=
1
;
items
=
[
{
columnWidth
:
1
,
layout
:
'
anchor
'
,
items
:
me
.
items
}
];
me
.
items
=
undefined
;
}
else
if
(
me
.
column1
)
{
me
.
columns
=
2
;
items
=
[
{
columnWidth
:
0.5
,
padding
:
'
0 10 0 0
'
,
layout
:
'
anchor
'
,
items
:
me
.
column1
},
{
columnWidth
:
0.5
,
padding
:
'
0 0 0 10
'
,
layout
:
'
anchor
'
,
items
:
me
.
column2
||
[]
// allow empty column
}
];
if
(
me
.
columnB
)
{
items
.
push
({
columnWidth
:
1
,
padding
:
'
10 0 0 0
'
,
layout
:
'
anchor
'
,
items
:
me
.
columnB
});
}
}
else
{
throw
"
unsupported config
"
;
}
if
(
me
.
useFieldContainer
)
{
Ext
.
apply
(
me
,
{
layout
:
'
fit
'
,
items
:
Ext
.
apply
(
me
.
useFieldContainer
,
{
layout
:
'
column
'
,
defaultType
:
'
container
'
,
items
:
items
})
});
}
else
{
Ext
.
apply
(
me
,
{
layout
:
'
column
'
,
defaultType
:
'
container
'
,
items
:
items
});
}
me
.
callParent
();
}
});
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