[IMP] Hide SEO image section when unused

bzr revid: ddm@openerp.com-20130920133649-akgg8blxmaxy9i5b
This commit is contained in:
ddm 2013-09-20 15:36:49 +02:00
parent a139fb4d48
commit 8989d0c7d9
2 changed files with 7 additions and 3 deletions

View File

@ -326,7 +326,11 @@
$modal.find('textarea[name=seo_page_description]').val(htmlPage.description());
self.suggestImprovements();
self.imageList = new website.seo.ImageList(self, { page: htmlPage });
self.imageList.appendTo($modal.find('.js_seo_image_list'));
if (htmlPage.images().length === 0) {
$modal.find('.js_image_section').remove()
} else {
self.imageList.appendTo($modal.find('.js_seo_image_list'));
}
self.keywordList = new website.seo.KeywordList(self, { page: htmlPage });
self.keywordList.on('list-full', self, function () {
$modal.find('input[name=seo_page_keywords]')

View File

@ -46,10 +46,10 @@
</div>
</div>
</section>
<section>
<section class="js_image_section">
<h3 class="page-header">3. Describe your images</h3>
<div class="row js_seo_image_list">
<!-- filled in JS -->
<!-- filled in JS -->
</div>
</section>
<hr/>