summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorbth-openerp <bth@tinyerp.com>2013-09-24 12:11:29 +0530
committerbth-openerp <bth@tinyerp.com>2013-09-24 12:11:29 +0530
commit438f81b4e99753c17b9a63eaa2a0476b3fac0ab5 (patch)
tree5bab54f228055c1b67bc5f51fccf8402a1db8ee5 /addons/website/static/src
parenta4ddc287795ed99ad41c34dd6e35af5110fb17cf (diff)
parent3862a4e83da1c1bda2711d17d55148a41a3ee504 (diff)
[MERGE]Merge trunk-website-al branch and removed new created snippet and add class oe_structure in description.
bzr revid: bth@tinyerp.com-20130924064129-ss5gi0nxbm26mlfi
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/website.editor.js15
-rw-r--r--addons/website/static/src/js/website.seo.js6
-rw-r--r--addons/website/static/src/xml/website.snippets.xml12
3 files changed, 14 insertions, 19 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index b2a93b9cfd6..b82f665c838 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -236,12 +236,8 @@
this.rte = new website.RTE(this);
this.rte.on('change', this, this.proxy('rte_changed'));
- var instanceReady = false;
- this.rte.on('instanceReady', this, function () {
- clearTimeout(instanceReady);
- instanceReady = setTimeout(function () {
- self.trigger('rte:ready');
- }, 0);
+ this.rte.on('rte:ready', this, function () {
+ self.trigger('rte:ready');
});
return $.when(
@@ -337,6 +333,8 @@
root.contentEditable = false;
self.setup_editables(root);
+
+ self.trigger('rte:ready');
});
},
@@ -408,6 +406,9 @@
allowedContent: true,
// Don't insert paragraphs around content in e.g. <li>
autoParagraph: false,
+ // Don't automatically add &nbsp; or <br> in empty block-level
+ // elements when edition starts
+ fillEmptyBlocks: false,
filebrowserImageUploadUrl: "/website/attach",
// Support for sharedSpaces in 4.x
extraPlugins: 'sharedspace,customdialogs,tablebutton,oeref',
@@ -648,7 +649,7 @@
return openerp.jsonRpc('/web/dataset/call_kw', 'call', {
model: 'website',
method: 'list_pages',
- args: [],
+ args: [null],
kwargs: {
context: website.get_context()
},
diff --git a/addons/website/static/src/js/website.seo.js b/addons/website/static/src/js/website.seo.js
index 1d9234165c4..3a27e8187e6 100644
--- a/addons/website/static/src/js/website.seo.js
+++ b/addons/website/static/src/js/website.seo.js
@@ -281,13 +281,13 @@
return $('body').children().not('.js_seo_configuration').text();
},
isInBody: function (text) {
- return new RegExp(text, "gi").test(this.bodyText());
+ return new RegExp("\\b"+text+"\\b", "gi").test(this.bodyText());
},
isInTitle: function (text) {
- return new RegExp(text, "gi").test(this.title());
+ return new RegExp("\\b"+text+"\\b", "gi").test(this.title());
},
isInDescription: function (text) {
- return new RegExp(text, "gi").test(this.description());
+ return new RegExp("\\b"+text+"\\b", "gi").test(this.description());
},
});
diff --git a/addons/website/static/src/xml/website.snippets.xml b/addons/website/static/src/xml/website.snippets.xml
index ce6ce3f45fa..5a1ad2db4c5 100644
--- a/addons/website/static/src/xml/website.snippets.xml
+++ b/addons/website/static/src/xml/website.snippets.xml
@@ -194,7 +194,7 @@
<div class='oe_snippet_class'>dark</div>
</div>
- <div t-name="website.snippets.well" data-snippet-id='well' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
+ <div t-name="website.snippets.well" data-snippet-id='well' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div class='oe_snippet_thumbnail'>Well</div>
<div class="oe_snippet_body well">
Manage your sales funnel with no effort with OpenERP CRM. Attract
@@ -203,7 +203,7 @@
</div>
</div>
- <div t-name="website.snippets.quote" data-snippet-id='quote' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
+ <div t-name="website.snippets.quote" data-snippet-id='quote' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div class='oe_snippet_thumbnail'>Quote</div>
<blockquote class="oe_snippet_body">
<p>
@@ -214,7 +214,7 @@
</blockquote>
</div>
- <div t-name="website.snippets.panel" data-snippet-id='panel' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote'>
+ <div t-name="website.snippets.panel" data-snippet-id='panel' data-category='content' data-selector-siblings='p, h1, h2, h3, blockquote, div'>
<div class='oe_snippet_thumbnail'>Panel</div>
<div class="oe_snippet_body panel panel-default">
<div class="panel-heading">
@@ -234,12 +234,6 @@
<div class='oe_snippet_thumbnail' style='background-image:radial-gradient(red,orange,yellow,green,blue);'>Surprise!</div>
</div>
- <div t-name="website.snippets.description" data-snippet-id='description' data-category='content' data-selector-siblings='p, h1, h2, h3,div,,span, blockquote'>
- <div class='oe_snippet_thumbnail'>Description</div>
- <div class="oe_snippet_body">
- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
- </div>
- </div>
<div t-name="website.snippets.text-image" data-snippet-id='text-image' data-category='structure' data-selector-children='.oe_structure, [data-oe-type=html]'>
<div class='oe_snippet_thumbnail'>
<span style="position: absolute; top: 50px; left: 5px;">Text-Image</span>