diff --git a/addons/website_quotation/static/src/css/website_quotation.css b/addons/website_quotation/static/src/css/website_quotation.css
new file mode 100644
index 00000000000..f44cf367e97
--- /dev/null
+++ b/addons/website_quotation/static/src/css/website_quotation.css
@@ -0,0 +1,3 @@
+.affix {
+ width : 260px;
+}
diff --git a/addons/website_quotation/static/src/js/website_quotation.js b/addons/website_quotation/static/src/js/website_quotation.js
index 29bdcbc1f31..2fcf5d7c832 100644
--- a/addons/website_quotation/static/src/js/website_quotation.js
+++ b/addons/website_quotation/static/src/js/website_quotation.js
@@ -22,5 +22,32 @@ $(document).ready(function () {
});
return false;
});
-});
+
+ // automatically generate a menu from h1 and h1 tag in content
+ var ul = null;
+ var sub_li = null;
+ var sub_ul = null;
+
+ $("section h1, section h2").each(function() {
+ switch (this.tagName.toLowerCase()) {
+ case "h1":
+ if (!ul) {
+ ul = $('[data-id="quote_sidebar"]');
+ }
+ sub_li = $("
").html('').appendTo(ul);
+ sub_ul = null;
+ break;
+ case "h2":
+ id = _.uniqueId('quote_')
+ if (sub_li) {
+ if (!sub_ul) {
+ sub_ul = $("").appendTo(sub_li);
+ }
+ $(this).attr('id',id)
+ $("- ").html(''+$(this).text()+'').appendTo(sub_ul);
+ }
+ break;
+ }
+ });
//vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
+});
diff --git a/addons/website_quotation/views/website_quotation.xml b/addons/website_quotation/views/website_quotation.xml
index 5a358f8f338..1bf15e90b8c 100644
--- a/addons/website_quotation/views/website_quotation.xml
+++ b/addons/website_quotation/views/website_quotation.xml
@@ -121,166 +121,158 @@
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
This quotation has been canceled. Contact
to ask a new one.
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This quotation has been canceled. Contact
to ask a new one.
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+