mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01: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",
|
||||
"type": "string",
|
||||
"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": {
|
||||
"name": "Start event handler",
|
||||
@ -168,9 +168,22 @@ var et2_file = et2_inputWidget.extend(
|
||||
{
|
||||
// This may be a problem submitting via ajax
|
||||
}
|
||||
this.progress = this.options.progress ?
|
||||
$j(document.getElementById(this.options.progress)) :
|
||||
$j(document.createElement("div")).appendTo(this.node);
|
||||
if(this.options.progress)
|
||||
{
|
||||
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");
|
||||
|
||||
if(this.options.multiple)
|
||||
|
Loading…
Reference in New Issue
Block a user