Skip to content

Commit

Permalink
Use the new progress bar widget in doSubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
william-gr committed Jun 28, 2013
1 parent 51c6b2c commit 917c310
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions gui/freeadmin/static/lib/js/freeadmin.js
Expand Up @@ -55,6 +55,7 @@ require([
"freeadmin/tree/Tree",
"freeadmin/ESCDialog",
"freeadmin/Menu",
"freeadmin/Progress",
"freeadmin/RRDControl",
"freeadmin/VolumeManager",
"freeadmin/WebShell",
Expand Down Expand Up @@ -130,6 +131,7 @@ require([
Tree,
ESCDialog,
fMenu,
Progress,
RRDControl,
VolumeManager,
WebShell,
Expand Down Expand Up @@ -961,12 +963,26 @@ require([
};

if (attrs.progressbar != undefined) {
pbar = ProgressBar({
style: "width:300px",
indeterminate: true,
});
/*
* We cannot destroy form node, that's why we just hide it
var pattrs;
if(attrs.progressbar == true) {
pattrs = {
steps: [
{"label": "Uploading file"}
],
fileUpload: true,
mode: "simple"
};
} else {
pattrs = {
steps: attrs.progressbar.steps,
fileUpload: true,
uuid: uuid,
poolUrl: attrs.progressbar.poolUrl
};
}
pbar = Progress(pattrs);

/* We cannot destroy form node, that's why we just hide it
* otherwise iframe.send won't work, it expects the form domNode
*/
attrs.form.domNode.parentNode.appendChild(pbar.domNode);
Expand Down Expand Up @@ -1033,7 +1049,7 @@ require([
}

if (attrs.progressbar != undefined) {
checkProgressBar(pbar, attrs.progressbar, uuid);
pbar.update(uuid);

} else if(attrs.progresstype == 'jail' &&
attrs.progressurl != undefined) {
Expand Down

0 comments on commit 917c310

Please sign in to comment.