Commit Graph

21 Commits

Author SHA1 Message Date
Thomas Lamprecht
4b5c6b3ff1 window: edit: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 13:08:07 +02:00
Thomas Lamprecht
b24601aff5 window: edit: call setValue on all fields
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 13:01:01 +02:00
Dominik Csapak
8ae2f8c8b1 window/Edit: read digest also from top level response
we want to have the digest in the top level object, like:
{
    data: { /* the real data */ },
    digest: "fa123asf123123123", // the digest
}

instead of in the data itself, so read it preferably from there
(with fallback to stay compatible)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-18 17:03:32 +02:00
Dominik Csapak
271171f81a window/Edit: accept bodyPadding from config
this is sometimes useful, e.g. when using a tabpanel in an edit window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-18 19:05:52 +02:00
Thomas Lamprecht
68689d7374 indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 17:50:25 +01:00
Thomas Lamprecht
4e78d7190d window: edit: allow to set submit text for data binding
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 15:54:09 +01:00
Dominik Csapak
a498f27991 add apiCallDone callback for window.edit
we sometimes want/need to do something when the api call
finished and need to know whether it was successful or need the result

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-27 14:03:37 +02:00
Dominik Csapak
5d3089cd94 better default focus selection
we do not want to focus on hidden/disabled fields,
because that focus gets lost and prevents some things
e.g. cancelling with ESC

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 13:44:27 +02:00
Dominik Csapak
880df5d504 add a checkbox to edit windows for advanced options
if the inputpanel has advanced options, show a checkbox to
show/hide them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 10:08:31 +02:00
Thomas Lamprecht
fde8e8bbb9 task view, progress: add taskDone callback
and integrate it into the edit window

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-27 14:03:14 +02:00
Thomas Lamprecht
8d8dbfc5b9 window/Edit: allow showing TaskViewer instead of TaskProgress
let our users decide if the want to show a TaskProgress window or a
TaskViewer window, so that they do not always must create the Viewer
their self

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-27 11:53:30 +02:00
Dominik Csapak
31a5025184 pass given defaults in Edit window
this is a port of the change for the Edit window from
pve-manager commit:
ff740ccbeed1e7e2131b14c9ce50f300f24201f6

which passes the given defaults to the items
2018-01-11 14:48:13 +01:00
Dominik Csapak
42a9df8b1f add the missing explanation of onlineHelp 2018-01-11 14:48:13 +01:00
Dominik Csapak
b33f451f98 change 'create' parameter to 'isCreate'
this mirrors the changes from Emmanuel in commit
9af71828d42c67b13144b568eee828b215054399
of pve-manager

where he renamed the 'create' parameter of the Edit Window to
isCreate, to avoid countless jslint errors regarding type confusion

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 11:37:04 +01:00
Dominik Csapak
00ee113714 use Proxmox.window.TaskProgress instead of PVE.window.TaskProgress
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 11:36:22 +01:00
Dominik Csapak
ffea05ec4e add custom submittext to Edit Window
we will use this for the restore window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 11:36:12 +01:00
Dietmar Maurer
c3457485e6 allow to set onlineHelp on Proxmox.window.Edit 2017-10-03 13:17:47 +02:00
Dietmar Maurer
a7dcbdebb9 set default focus and default button for edit window
this patch sets following defaults for the edit window:

defaultFocus: 'field'

sets the focus on the first field it finds in its child items,
works for most edit windows, so that the cursor stands in a
textfield, or on a checkbox

defaultButton: 'submitbutton'

so that when someone presses enter, we submit the form

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-25 06:17:22 +02:00
Dietmar Maurer
a33ba257ed window/Edit.js: implement autoLoad feature 2017-03-29 19:36:13 +02:00
Dietmar Maurer
1b07a95ac8 window/Edit.js: query for inputpanel
Because access to item[0] return the config object (not the real object).
2017-03-28 15:12:22 +02:00
Dietmar Maurer
0669450939 add TimeView, TimeEdit and TaskViewer 2017-01-30 13:40:51 +01:00