fixes to website, item (added table for cross listing), modules_setup and form_header

This commit is contained in:
Rushabh Mehta
2012-12-25 15:09:14 +05:30
parent bea0671fc0
commit 7837d80716
20 changed files with 197 additions and 89 deletions

View File

@@ -31,28 +31,8 @@ window.render_product_list = function(data) {
var table = $("<table class='table'>").appendTo("#search-list");
$.each(data, function(i, d) {
if(!d.web_short_description)
d.web_short_description = "No description given."
var $tr = $(repl('<tr>\
<td style="width: 30%;">\
<img class="product-image" \
style="width: 80%;" src="files/%(website_image)s">\
</td>\
<td>\
<h4><a href="%(page_name)s">%(item_name)s</a></h4>\
<p class="help">Item Code: %(name)s</p>\
<p>%(website_description)s</p>\
</td>\
</tr>', d)).appendTo(table);
if(!d.website_image) {
$tr.find(".product-image").replaceWith("<div\
style='background-color: #eee; padding: 40px; \
width: 32px; font-size: 32px; color: #888;'>\
<i class='icon-camera'></i></div>");
}
$(d).appendTo(table);
});
}
if(data.length < 10) {
if(!table) {