mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 19:09:52 +00:00
edit window: add loadUrl to config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4d07ee6cb9
commit
8b1217145c
@ -34,6 +34,10 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
// new object is part of the URL, or that URL differs from GET/PUT URL
|
// new object is part of the URL, or that URL differs from GET/PUT URL
|
||||||
submitUrl: Ext.identityFn,
|
submitUrl: Ext.identityFn,
|
||||||
|
|
||||||
|
// string or function, called as (url, initialConfig) - mostly for
|
||||||
|
// consistency with submitUrl existing. If both are set `url` gets optional
|
||||||
|
loadUrl: Ext.identityFn,
|
||||||
|
|
||||||
// needed for finding the reference to submitbutton
|
// needed for finding the reference to submitbutton
|
||||||
// because we do not have a controller
|
// because we do not have a controller
|
||||||
referenceHolder: true,
|
referenceHolder: true,
|
||||||
@ -205,9 +209,13 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
newopts.params = params;
|
newopts.params = params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let url = Ext.isFunction(me.loadUrl)
|
||||||
|
? me.loadUrl(me.url, me.initialConfig)
|
||||||
|
: me.loadUrl || me.url;
|
||||||
|
|
||||||
let createWrapper = function(successFn) {
|
let createWrapper = function(successFn) {
|
||||||
Ext.apply(newopts, {
|
Ext.apply(newopts, {
|
||||||
url: me.url,
|
url: url,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
success: function(response, opts) {
|
success: function(response, opts) {
|
||||||
form.clearInvalid();
|
form.clearInvalid();
|
||||||
|
Loading…
Reference in New Issue
Block a user