summaryrefslogtreecommitdiff
path: root/addons/base/static/src/xml/base.xml
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2011-05-19 00:36:16 +0200
committerFabien Meghazi <fme@openerp.com>2011-05-19 00:36:16 +0200
commit279d206a64d92f9acfb4ad330fe8a39ea6c1c7dd (patch)
treeb9722c06e5184822650d03fee4342f989689355a /addons/base/static/src/xml/base.xml
parentb432e7ba1a48c8520f5de25f2a7d24b87c145ef6 (diff)
[ADD] Added upload of image. (WIP)
bzr revid: fme@openerp.com-20110518223616-axty8elieyq3ccqt
Diffstat (limited to 'addons/base/static/src/xml/base.xml')
-rw-r--r--addons/base/static/src/xml/base.xml31
1 files changed, 22 insertions, 9 deletions
diff --git a/addons/base/static/src/xml/base.xml b/addons/base/static/src/xml/base.xml
index 6668697b38c..a89f0210ad7 100644
--- a/addons/base/static/src/xml/base.xml
+++ b/addons/base/static/src/xml/base.xml
@@ -401,15 +401,28 @@
</tr>
<tr>
<td align="center" valign="bottom" height="25">
- <button class="button oe-binary-image-set" type="button" title="Set Image">
- <img src="/base/static/src/img/icons/STOCK_DIRECTORY.png"/>
- </button>
- <!--<button class="button oe-binary-image-save" type="button" title="Save As">
- <img src="/base/static/src/img/icons/gtk-save.png"/>
- </button>-->
- <button class="button oe-binary-image-clear" type="button" title="Clear">
- <img src="/base/static/src/img/icons/STOCK_MISSING_IMAGE.png"/>
- </button>
+ <div class="oe-binary-image-buttons">
+ <!-- TODO: input@type=file inside a button won't work in firefox. Use links instead -->
+ <button class="button oe-binary-image-set" type="button" title="Set Image">
+ <img src="/base/static/src/img/icons/STOCK_DIRECTORY.png"/>
+ <form class="oe-binary-form" t-att-target="widget.iframe"
+ method="post" enctype="multipart/form-data" action="/base/formview/upload">
+ <input type="hidden" name="session_id" value=""/>
+ <input type="hidden" name="callback" t-att-value="widget.iframe"/>
+ <input type="file" class="oe-binary-file" name="ufile"/>
+ </form>
+ </button>
+ <!--<button class="button oe-binary-image-save" type="button" title="Save As">
+ <img src="/base/static/src/img/icons/gtk-save.png"/>
+ </button>-->
+ <button class="button oe-binary-image-clear" type="button" title="Clear">
+ <img src="/base/static/src/img/icons/STOCK_MISSING_IMAGE.png"/>
+ </button>
+ </div>
+ <div class="oe-binary-progress" style="display: none">
+ Uploading ...
+ </div>
+ <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"> </iframe>
</td>
</tr>
</table>