[cleanup] [website]
diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html
index 500a118..8a2dcf2 100644
--- a/erpnext/templates/generators/item.html
+++ b/erpnext/templates/generators/item.html
@@ -1,3 +1,5 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %}
@@ -6,7 +8,7 @@
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
-{% block content %}
+{% block page_content %}
{% from "erpnext/templates/includes/macros.html" import product_image %}
<div class="item-content">
<div class="product-page-content" itemscope itemtype="http://schema.org/Product">
diff --git a/erpnext/templates/generators/item_group.html b/erpnext/templates/generators/item_group.html
index 2652f6f..2cfb934 100644
--- a/erpnext/templates/generators/item_group.html
+++ b/erpnext/templates/generators/item_group.html
@@ -1,8 +1,10 @@
+{% extends "templates/web.html" %}
+
{% block header_actions %}
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
-{% block content %}
+{% block page_content %}
<div class="item-group-content">
<div>
{% if slideshow %}<!-- slideshow -->
@@ -27,17 +29,6 @@
{% endif %}
</div>
</div>
-<script>
-$(function() {
- if(window.logged_in && getCookie("system_user")==="yes") {
- frappe.has_permission("Item Group", "{{ name }}", "write", function(r) {
- frappe.require("/assets/frappe/js/frappe/website/editable.js");
- frappe.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
- });
- }
-});
-</script>
-
{% endblock %}
{% block style %}
diff --git a/erpnext/templates/generators/sales_partner.html b/erpnext/templates/generators/sales_partner.html
index 2a07448..6da6ad0 100644
--- a/erpnext/templates/generators/sales_partner.html
+++ b/erpnext/templates/generators/sales_partner.html
@@ -1,8 +1,10 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %}
-{% block content %}
+{% block page_content %}
<div class="partner-content" itemscope itemtype="http://schema.org/Organization">
<div class="row">
<div class="col-md-4">
diff --git a/erpnext/templates/includes/address_row.html b/erpnext/templates/includes/address_row.html
index f6ec819..15dcb95 100644
--- a/erpnext/templates/includes/address_row.html
+++ b/erpnext/templates/includes/address_row.html
@@ -1,5 +1,5 @@
<div class="web-list-item">
- <a href="/addresses?name={{ doc.name | urlencode }}" no-pjax class="no-decoration">
+ <a href="/addresses?name={{ doc.name | urlencode }}" class="no-decoration">
<h4 class="strong">{{ doc.address_title }}</h4>
<p class="text-muted small">
{{ frappe.get_doc(doc).get_display() }}
diff --git a/erpnext/templates/includes/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html
index 400043e..e24b862 100644
--- a/erpnext/templates/includes/footer/footer_extension.html
+++ b/erpnext/templates/includes/footer/footer_extension.html
@@ -15,6 +15,7 @@
</div>
</div>
<script>
+frappe.ready(function() {
$("#footer-subscribe-button").click(function() {
if($("#footer-subscribe-email").val()) {
@@ -38,5 +39,6 @@
else
frappe.msgprint(frappe._("Please enter email address"))
});
+});
</script>
{% endif %}
diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html
index 2935a24..c090f93 100644
--- a/erpnext/templates/includes/issue_row.html
+++ b/erpnext/templates/includes/issue_row.html
@@ -1,5 +1,5 @@
<div class="web-list-item">
- <a class="no-decoration" href="/issues?name={{ doc.name }}" no-pjax>
+ <a class="no-decoration" href="/issues?name={{ doc.name }}">
<div class="row">
<div class="col-xs-8">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">
diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js
index cec4f2a..0a38c23 100644
--- a/erpnext/templates/includes/product_page.js
+++ b/erpnext/templates/includes/product_page.js
@@ -86,7 +86,7 @@
return;
}
- frappe.load_via_ajax(window.location.pathname + "?variant=" + item_code);
+ window.location.href = window.location.pathname + "?variant=" + item_code;
});
});
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html
index 9b9fd52..7c03579 100644
--- a/erpnext/templates/includes/transaction_row.html
+++ b/erpnext/templates/includes/transaction_row.html
@@ -1,5 +1,5 @@
<div class="web-list-item">
-<a href="/{{ pathname }}/{{ doc.name }}" no-pjax>
+<a href="/{{ pathname }}/{{ doc.name }}">
<div class="row">
<div class="col-sm-8 col-xs-7">
<div class="row">
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index a97e658..6891bce 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -1,9 +1,18 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ "Shopping Cart" }} {% endblock %}
{% block header %}<h2>{{ _("My Cart") }}</h2>{% endblock %}
-{% block script %}{% include "templates/includes/cart.js" %}{% endblock %}
-{% block style %}{% include "templates/includes/cart.css" %}{% endblock %}
+{% block script %}
+<script>{% include "templates/includes/cart.js" %}</script>
+{% endblock %}
+
+{% block style %}
+<style>
+ {% include "templates/includes/cart.css" %}
+</style>
+{% endblock %}
{% block header_actions %}
@@ -14,7 +23,7 @@
{% endif %}
{% endblock %}
-{% block content %}
+{% block page_content %}
{% from "templates/includes/macros.html" import item_name_and_description %}
diff --git a/erpnext/templates/pages/edit-profile.html b/erpnext/templates/pages/edit-profile.html
index 82ad6fa..f10e0a3 100644
--- a/erpnext/templates/pages/edit-profile.html
+++ b/erpnext/templates/pages/edit-profile.html
@@ -1,8 +1,10 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ "My Profile" }} {% endblock %}
{% block header %}<h2>My Profile</h2>{% endblock %}
-{% block content %}
+{% block page_content %}
<div class="user-content" style="max-width: 500px;">
<div class="alert alert-warning" id="message" style="display: none;"></div>
<form>
@@ -26,7 +28,7 @@
</form>
</div>
<script>
-$(document).ready(function() {
+frappe.ready(function() {
$("#fullname").val(getCookie("full_name") || "");
$("#update_user").click(function() {
frappe.call({
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 45f6af0..26dbed6 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -1,11 +1,17 @@
+{% extends "templates/web.html" %}
+
{% block header %}
<h1>{{ doc.name }}</h1>
<!-- <h6 class="text-muted">{{ doc._title or doc.doctype }}</h6> -->
{% endblock %}
-{% block style %}{% include "templates/includes/order/order.css" %}{% endblock %}
+{% block style %}
+<style>
+ {% include "templates/includes/order/order.css" %}
+</style>
+{% endblock %}
-{% block content %}
+{% block page_content %}
{% from "erpnext/templates/includes/order/order_macros.html" import item_name_and_description %}
diff --git a/erpnext/templates/pages/partners.html b/erpnext/templates/pages/partners.html
index 9c87f44..132c06b 100644
--- a/erpnext/templates/pages/partners.html
+++ b/erpnext/templates/pages/partners.html
@@ -1,8 +1,10 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ title }} {% endblock %}
{% block header %}<h2>{{ title }}</h2>{% endblock %}
-{% block content %}
+{% block page_content %}
<div class="partners-content">
{% for partner_info in partners %}
<div class="row">
diff --git a/erpnext/templates/pages/product_search.html b/erpnext/templates/pages/product_search.html
index 07e6c6e..2d80cf4 100644
--- a/erpnext/templates/pages/product_search.html
+++ b/erpnext/templates/pages/product_search.html
@@ -1,3 +1,5 @@
+{% extends "templates/web.html" %}
+
{% block title %} {{ "Product Search" }} {% endblock %}
{% block header %}<h2>Product Search</h2>{% endblock %}
@@ -6,11 +8,11 @@
{% include 'templates/includes/product_search_box.html' %}
{% endblock %}
-{% block content %}
+{% block page_content %}
<script>{% include "templates/includes/product_list.js" %}</script>
<script>
-$(document).ready(function() {
+frappe.ready(function() {
var txt = get_url_arg("q");
$(".search-results").html("Search results for: " + txt);
window.search = txt;