cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/ui-template-uploader to a36d219
Date Tue, 06 Jan 2015 22:02:37 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/ui-template-uploader 6d9542ff3 -> a36d2191e


Add file upload field


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/70fe283b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/70fe283b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/70fe283b

Branch: refs/heads/ui-template-uploader
Commit: 70fe283b670e6f12d1b3ea05b7d41e6f81571ad1
Parents: 6d9542f
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Jan 6 11:38:00 2015 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Jan 6 11:38:00 2015 -0800

----------------------------------------------------------------------
 ui/scripts/ui/dialog.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fe283b/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index e5ac14b..a510be9 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -473,6 +473,12 @@
                     if (field.defaultValue) {
                         $input.val(strOrFunc(field.defaultValue));
                     }
+                } else if (field.isFileUpload) {
+                    $input = $('<input>').attr({
+                        type: 'file',
+                        name: 'files[]',
+                        'data-url': '/upload.jsp'
+                    }).appendTo($value);
                 } else if (field.isTokenInput) { // jquery.tokeninput.js
                     isAsync = true;
 


Mime
View raw message