[editable] [minor] made item, item_group pages editable
diff --git a/setup/doctype/item_group/templates/generators/item_group.html b/setup/doctype/item_group/templates/generators/item_group.html
index 48db596..459c989 100644
--- a/setup/doctype/item_group/templates/generators/item_group.html
+++ b/setup/doctype/item_group/templates/generators/item_group.html
@@ -8,7 +8,7 @@
{% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %}
{% endif %}
{% if description %}<!-- description -->
- <div>{{ description or ""}}</div>
+ <div itemprop="description">{{ description or ""}}</div>
{% else %}
<h3>{{ name }}</h3>
{% endif %}
@@ -38,5 +38,13 @@
<div class="alert alert-warning">No items listed.</div>
{% endif %}
</div>
+<script>
+$(function() {
+ if(window.logged_in && getCookie("system_user")==="yes") {
+ wn.require("lib/js/wn/website/editable.js");
+ wn.make_editable($('[itemprop="description"]'), "Item Group", "{{ name }}", "description");
+ }
+})
+</script>
{% endblock %}
\ No newline at end of file
diff --git a/stock/doctype/item/templates/generators/item.html b/stock/doctype/item/templates/generators/item.html
index 7056068..eab1b73 100644
--- a/stock/doctype/item/templates/generators/item.html
+++ b/stock/doctype/item/templates/generators/item.html
@@ -3,6 +3,14 @@
{% block javascript %}
<script>
{% include "app/stock/doctype/item/templates/includes/product_page.js" %}
+
+ $(function() {
+ if(window.logged_in && getCookie("system_user")==="yes") {
+ wn.require("lib/js/wn/website/editable.js");
+ wn.make_editable($('[itemprop="description"]'), "Item", "{{ name }}", "web_long_description");
+ }
+ })
+
</script>
{% endblock %}