summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/xml')
-rw-r--r--addons/website/static/src/xml/website.editor.xml2
-rw-r--r--addons/website/static/src/xml/website.gallery.xml102
-rw-r--r--addons/website/static/src/xml/website.snippets.xml11
-rw-r--r--addons/website/static/src/xml/website.theme.xml159
4 files changed, 104 insertions, 170 deletions
diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml
index 24d54ec017e..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>
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[&times;]]></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">&amp;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.theme.xml b/addons/website/static/src/xml/website.theme.xml
deleted file mode 100644
index 16f4961d367..00000000000
--- a/addons/website/static/src/xml/website.theme.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<templates id="template" xml:space="preserve">
-
-<!--
- Customize Themes
-
- Use INPUT type 'checkbox' or 'radio' or use OPTION in select box
- 'data-xmlid' (optional) xml id of the template to add if the input is checked.
- You can set a list of xml id separate by comma (all template is enable or
- disable in same time)
- 'data-enable' (optional) to checked one or more HTML ids, or list separate by comma
- 'data-disable' (optional) to unchecked one or more HTML ids, or list separate by comma
- 'data-reload="/"' (optional) force the reloading of the page if the url match with
- the string ( = regexp).
- Otherwise, only the '/web/css/website.assets_frontend' is reloaded
-
- For the sets (data-enable and/or data-disable without data-xmlid), the set is
- automatically checked if:
- - all related fields are enabled for data-enable
- - all related fields are disabled for data-disable
- else unchecked
-
- HTML apply classes:
- - 'checked': on the parent label when input is checked
- - 'in': on the container (e.g.: bootstrap modal) after added in DOM (removed together
- out is added)
- - 'out': on the container 1 second before removed from ths DOM
- - 'loading': on the container/modal when the new css is loading
--->
-
-<t t-name="website.theme_customize">
- <div id="theme_customize_modal" class="modal fade">
- <div class="modal-dialog">
- <div class="modal-content">
- <input id="less" data-xmlid="website.option_bootstrap_less" style="display: none;"/>
-
- <div class="loading_backdrop"></div>
- <div class="modal-header">
- <button type="button" class="close">×</button>
- <h4 class="modal-title" id="mySmallModalLabel">Customize your theme</h4>
- </div>
- <div class="modal-body">
- <h5 class="modal-h5">LAYOUT</h5>
- <table name="layout">
- <tr>
- <td class=" text-center" width="50%">
- <label class=" center-block">
- <div class="text-center" style="background-image: url(/website/static/src/img/theme/layout-full.gif); background-size: 100%; line-height: 40px;">FULL WIDTH</div>
- <input name="layoutvar" type="radio" data-xmlid=""/>
- </label>
- </td>
- <td class=" text-center">
- <label class=" center-block">
- <div class="text-center" style="background-image: url(/website/static/src/img/theme/layout-boxed.gif); background-size: 100%; line-height: 40px;">BOXED</div>
- <input name="layoutvar" type="radio" data-xmlid="website.option_layout_boxed" data-enable="less"/>
- </label>
- </td>
- </tr>
- </table>
-
- <h5 class="modal-h5">MAIN COLOR</h5>
- <table name="color">
- <tr>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-stone.gif" alt="Stone" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="" data-disable="less"/>
- </label>
- </td>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-emerald.gif" alt="Emerald" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="website.option_color_emerald" data-enable="less"/>
- </label>
- </td>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-cobalt.gif" alt="Cobalt" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="website.option_color_cobalt" data-enable="less"/>
- </label>
- </td>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-amethyst.gif" alt="Amethyst" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="website.option_color_amethyst" data-enable="less"/>
- </label>
- </td>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-ruby.gif" alt="Blue" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="website.option_color_ruby" data-enable="less"/>
- </label>
- </td>
- <td>
- <label class="chd-color-combi">
- <img src="/website/static/src/img/theme/variant-gold.gif" alt="Gold" class="chd-color-combi-img"/>
- <input name="colorvar" type="radio" data-xmlid="website.option_color_gold" data-enable="less"/>
- </label>
- </td>
- </tr>
- </table>
-
- <h5 class="modal-h5">FONTS COMBINATIONS</h5>
- <table name="font">
- <tr>
- <td width="50%">
- <label>
- <div>
- <span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:11px">Helvetica</span>
- <span style="font-family:Georgia, 'Times New Roman', Times, serif; font-size:11px" >/ Georgia</span>
- </div>
- <input name="theme" type="radio" data-xmlid=""/>
- </label>
- </td>
- <td width="50%">
- <label>
- <div>
- <span style="font-family:Georgia, 'Times New Roman', Times, serif; font-size:11px" >Georgia</span>
- <span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:11px">/ Helvetica</span>
- <input name="theme" type="radio" data-xmlid="website.option_font" data-enable="less"/>
- </div>
- </label>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
-</t>
-
-<!-- color-picker -->
-<!-- HTML class to hide option for one mode : only-text, only-bg -->
-
-<t t-name="website.colorpicker">
- <table class="colorpicker">
- <tr>
- <td><button class="automatic-color" title="Automatic Color"/></td>
- <td><button class="bg-primary" title="Primary Color"/></td>
- <td><button class="bg-success" title="Success Color"/></td>
- <td><button class="bg-info" title="Info Color"/></td>
- <td><button class="bg-warning" title="Warning Color"/></td>
- <td><button class="bg-danger" title="Danger Color"/></td>
- </tr>
- <tr><td colspan="8"><hr style="width: 100%; height: 1px;"/></td></tr>
- <tr>
- <td><button class="bg-blue"/></td>
- <td><button class="bg-turquoise"/></td>
- <td><button class="bg-green"/></td>
- <td><button class="bg-yellow"/></td>
- <td><button class="bg-red"/></td>
- <td><button class="bg-pink"/></td>
- <td><button class="bg-purple"/></td>
- <td><button class="bg-brown"/></td>
- </tr>
- </table>
-</t>
-
-</templates> \ No newline at end of file