diff options
| author | Frederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com> | 2014-08-25 16:42:57 +0200 |
|---|---|---|
| committer | Frederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com> | 2014-08-25 16:42:57 +0200 |
| commit | d7f93defb899b2b48a14d679e5dffffdb4a00eff (patch) | |
| tree | f8572183b480477622917a1f504cf49a8e202f6e /addons/website/static/src/xml | |
| parent | 2b67528fe9e366829d44d8aba756bc6e359b4c61 (diff) | |
| parent | 36146b3fadc47543f4b696ab75c31b3459afb15b (diff) | |
Merge branch 'master' into master-pos-new-payment-screen-fva
Conflicts:
addons/point_of_sale/point_of_sale.py
addons/point_of_sale/point_of_sale_view.xml
Diffstat (limited to 'addons/website/static/src/xml')
| -rw-r--r-- | addons/website/static/src/xml/website.editor.xml | 8 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.gallery.xml | 102 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.snippets.xml | 11 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.xml | 2 |
4 files changed, 109 insertions, 14 deletions
diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index 0e3873b1de6..607759cb0c2 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -203,7 +203,7 @@ class="form-inline"> <div class="well"> <div class="form-group pull-left"> - <input type="file" name="upload" accept="image/*" style="position: absolute; opacity: 0; width: 1px; height: 1px;"/> + <input type="file" name="upload" accept="image/*" multiple="multiple" style="position: absolute; opacity: 0; width: 1px; height: 1px;"/> <button type="button" class="btn btn-primary filepicker">Upload an image from your computer</button> <button type="button" class="btn hidden wait" disabled="disabled">Uploading...</button> </div> @@ -360,7 +360,8 @@ class="form-control url pull-left" style="width: 400px;" id="urlvideo" - placeholder="//www.youtube.com/embed/yws1tbgNV7k"/> + placeholder="//www.youtube.com/embed/yws1tbgNV7k" + t-translation="off"/> <button class="btn btn-default">Preview</button> </div> <div class="form-group btn-group"> @@ -370,7 +371,8 @@ class="form-control url pull-left" style="width: 400px;" id="embedvideo" - placeholder='<iframe src="//www.youtube.com/embed/yws1tbgNV7k"></iframe>'/> + placeholder='<iframe src="//www.youtube.com/embed/yws1tbgNV7k"></iframe>' + t-translation="off"/> <button class="btn btn-default">Preview</button> </div> </div> diff --git a/addons/website/static/src/xml/website.gallery.xml b/addons/website/static/src/xml/website.gallery.xml new file mode 100644 index 00000000000..cefe50a5319 --- /dev/null +++ b/addons/website/static/src/xml/website.gallery.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates xml:space="preserve"> + <!-- + ======================================================================= + Gallery Dialog + + This template is shown when creating a gallery, allowing users to upload + images. + ======================================================================= + --> + + <t t-name="website.gallery.dialog.upload"> + <div class="modal fade" > + <div class="modal-dialog" style="max-width: 50%;"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><![CDATA[×]]></button> + <h4 class="modal-title">Add images</h4> + </div> + <div class="modal-body"> + <form action="/website/attach" method="post" enctype="multipart/form-data" > + <div class="form-group"> + <input name="upload" type="file" value="Choose images" multiple="multiple" accept="image/*"/> + </div> + <div class="form-group hidden"> + <input type="submit" value="Upload images" class="btn btn-default" /> + </div> + </form> + <div class="text-center"><span class="fa fa-refresh fa-5x fa-spin hidden"></span></div> + <div class="alert alert-success" role="alert">Upload successful.</div> + <div class="alert alert-danger" role="alert">Upload failed, some images might not have been uploaded. Check your network connectivity.</div> + </div> + + </div> + </div> + </div> + </t> + + <!-- + ======================================================================== + Gallery Slideshow + + This template is used to display a slideshow of images inside a + bootstrap carousel. + + ======================================================================== + --> + + <t t-name="website.gallery.slideshow"> + <div t-attf-id="#{id}" class="carousel slide" data-ride="carousel" t-attf-data-interval="#{interval}"> + <div class="carousel-inner container"> + <t t-foreach="srcs" t-as="src"> + <div t-attf-class="item #{src_index == index and 'active' or ''}"> + <img class="img" t-att-src="src"/> + </div> + </t> + </div> + + <ul class="carousel-indicators"> + <t t-foreach="srcs" t-as="src"> + <li t-attf-data-target="##{id}" t-att-data-slide-to="src_index" t-att-class="src_index == index and 'active'" t-attf-style="background-image: url(#{src})"></li> + </t> + </ul> + + <a class="carousel-control left" t-attf-href="##{id}" data-slide="prev"><span class="glyphicon glyphicon-chevron-left" /></a> + <a class="carousel-control right" t-attf-href="##{id}" data-slide="next"><span class="glyphicon glyphicon-chevron-right" /></a> + </div> <!-- carousel-id --> + <script type="text/javascript"> + (function() { + $(".slideshow").css("height", Math.round(window.innerHeight*0.7)); + $(window).on("resize", function() { $(".slideshow").css("height", Math.round(window.innerHeight*0.7)); }); + })(); + </script> + </t> + + <!-- + ======================================================================== + Gallery Slideshow LightBox + + This template is used to display a lightbox with a slideshow. + + This template wraps website.gallery.slideshow in a bootstrap modal + dialog. + ======================================================================== + --> + <t t-name="website.gallery.slideshow.lightbox"> + + <div class="modal fade" aria-labbelledby="Image Gallery Dialog" aria-hidden="true"> + + <div class="modal-dialog modal-lg" role="Picture Gallery" + t-attf-style="min-width: #{dim.min_width}px ; min-height: #{dim.min_height}px ; max-width: #{dim.max_width}px ; max-height: #{dim.max_height}px ; height: #{dim.height}px ;"> + <div class="modal-content"> + <div class="modal-body o_slideshow"> + <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> + <t t-call="website.gallery.slideshow"></t> + </div> + + </div> + </div> + </div> + </t> +</templates> diff --git a/addons/website/static/src/xml/website.snippets.xml b/addons/website/static/src/xml/website.snippets.xml index 4b37ccc5e65..1db2433a4d4 100644 --- a/addons/website/static/src/xml/website.snippets.xml +++ b/addons/website/static/src/xml/website.snippets.xml @@ -4,7 +4,7 @@ <!-- Snippet loader --> <t t-name="website.snippets_button"> <li class="navbar-form js_hide_on_translate" style="margin-top: 6px;"> - <button type="button" data-action="snippet" class="hidden btn btn-primary btn-xs">Insert Blocks</button> + <button type="button" data-action="snippet" class="btn btn-primary btn-xs">Insert Blocks</button> </li> </t> <t t-name="website.snippets_style"> @@ -53,13 +53,4 @@ <div class='oe_snippet_manipulator'></div> </t> - <!-- snippet objects --> - - <div t-name="website.snippets.resize" data-snippet-id='resize'> - <!-- custom data for the widget --> - <div class='oe_snippet_thumbnail'>Margin resize</div> - </div> - - <div t-name="website.snippets.colmd" data-snippet-id='colmd' data-selector-vertical-children='.row'></div> - </templates> diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml index cb0071a2ef8..0d7ae3e9821 100644 --- a/addons/website/static/src/xml/website.xml +++ b/addons/website/static/src/xml/website.xml @@ -35,7 +35,7 @@ <p> It might be possible to edit the relevant items or fix the issue in <a t-attf-href="#{backend_url}"> - the classic OpenERP interface</a>. + the classic Odoo interface</a>. </p> </section> </div> |
