mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 04:41:41 +02:00
Let progress attribute be a widget ID or the ID of a specific DOM node
This commit is contained in:
parent
7b9b5efe7f
commit
9192652877
@ -53,7 +53,7 @@ var et2_file = et2_inputWidget.extend(
|
|||||||
"name": "Progress node",
|
"name": "Progress node",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": et2_no_init,
|
"default": et2_no_init,
|
||||||
"description": "The ID of an alternate node (div) to display progress and results."
|
"description": "The ID of an alternate node (div) to display progress and results. Either the ID of a box widget or the ID of a specific DOM node will work."
|
||||||
},
|
},
|
||||||
"onStart": {
|
"onStart": {
|
||||||
"name": "Start event handler",
|
"name": "Start event handler",
|
||||||
@ -168,9 +168,22 @@ var et2_file = et2_inputWidget.extend(
|
|||||||
{
|
{
|
||||||
// This may be a problem submitting via ajax
|
// This may be a problem submitting via ajax
|
||||||
}
|
}
|
||||||
this.progress = this.options.progress ?
|
if(this.options.progress)
|
||||||
$j(document.getElementById(this.options.progress)) :
|
{
|
||||||
$j(document.createElement("div")).appendTo(this.node);
|
this.progress = $j(document.getElementById(this.options.progress));
|
||||||
|
if(!this.progress)
|
||||||
|
{
|
||||||
|
var widget = this.getRoot().getWidgetById(this.options.progress);
|
||||||
|
if(widget)
|
||||||
|
{
|
||||||
|
this.progress = $j(widget.getDOMNode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!this.progress)
|
||||||
|
{
|
||||||
|
this.progress = $j(document.createElement("div")).appendTo(this.node);
|
||||||
|
}
|
||||||
this.progress.addClass("progress");
|
this.progress.addClass("progress");
|
||||||
|
|
||||||
if(this.options.multiple)
|
if(this.options.multiple)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user