From 24a69613e0dac4b4bc679dec5139e5d14e3f675a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 11 Dec 2012 15:58:19 +0530 Subject: [PATCH] update file urls --- home/page/activity/activity.js | 2 +- stock/doctype/item/item.txt | 110 ++++++++++++++-------------- utilities/page/messages/messages.js | 6 +- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js index df34b043485..90977be19bf 100644 --- a/home/page/activity/activity.js +++ b/home/page/activity/activity.js @@ -32,7 +32,7 @@ erpnext.ActivityFeed = Class.extend({ }, scrub_data: function(data) { data.by = wn.user_info(data.owner).fullname; - data.imgsrc = wn.user_info(data.owner).image; + data.imgsrc = wn.utils.get_file_link(wn.user_info(data.owner).image); // feedtype if(!data.feed_type) { diff --git a/stock/doctype/item/item.txt b/stock/doctype/item/item.txt index 889f29b4ad6..cabf7fa23ae 100644 --- a/stock/doctype/item/item.txt +++ b/stock/doctype/item/item.txt @@ -2,9 +2,9 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-12-07 15:15:29", + "creation": "2012-12-06 15:57:02", "modified_by": "Administrator", - "modified": "2012-12-07 15:44:48" + "modified": "2012-12-11 15:56:37" }, { "allow_attach": 1, @@ -14,6 +14,7 @@ "description": "A Product or a Service that is bought, sold or kept in stock.", "autoname": "field:item_code", "name": "__common__", + "default_print_format": "Standard", "allow_rename": 1, "doctype": "DocType", "max_attachments": 1 @@ -131,6 +132,14 @@ "fieldtype": "Column Break", "permlevel": 0 }, + { + "doctype": "DocField", + "label": "Image", + "options": "attach_files:", + "fieldname": "image", + "fieldtype": "Select", + "permlevel": 0 + }, { "oldfieldtype": "Text", "doctype": "DocField", @@ -768,72 +777,23 @@ "doctype": "DocField", "label": "Short Description", "fieldname": "web_short_description", - "fieldtype": "Small Text", + "fieldtype": "Text", "permlevel": 0 }, { "depends_on": "show_in_website", "doctype": "DocField", "label": "Long Description", + "options": "Markdown", "fieldname": "web_long_description", "fieldtype": "Text Editor", "permlevel": 0 }, - { - "description": "These details will be shown in a formatted table the page for this product.", - "depends_on": "show_in_website", - "doctype": "DocField", - "label": "Item Website Specifications", - "options": "Item Website Specification", - "fieldname": "item_website_specifications", - "fieldtype": "Table", - "permlevel": 0 - }, - { - "amend": 0, - "create": 0, - "doctype": "DocPerm", - "submit": 0, - "write": 0, - "cancel": 0, - "role": "Material Manager", - "permlevel": 1 - }, - { - "amend": 0, - "create": 0, - "doctype": "DocPerm", - "submit": 0, - "write": 0, - "cancel": 0, - "role": "Material Manager", - "permlevel": 0 - }, - { - "amend": 0, - "create": 0, - "doctype": "DocPerm", - "submit": 0, - "write": 0, - "cancel": 0, - "role": "Material User", - "permlevel": 1 - }, - { - "amend": 0, - "create": 0, - "doctype": "DocPerm", - "submit": 0, - "write": 0, - "cancel": 0, - "role": "Material User", - "permlevel": 0 - }, { "create": 1, "doctype": "DocPerm", "write": 1, - "role": "Material Master Manager", + "role": "System Manager", "cancel": 1, "permlevel": 0 }, @@ -848,7 +808,7 @@ "create": 1, "doctype": "DocPerm", "write": 1, - "role": "System Manager", + "role": "Material Master Manager", "cancel": 1, "permlevel": 0 }, @@ -856,5 +816,45 @@ "doctype": "DocPerm", "role": "System Manager", "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material Manager", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material Manager", + "cancel": 0, + "permlevel": 0 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material User", + "cancel": 0, + "permlevel": 1 + }, + { + "amend": 0, + "create": 0, + "doctype": "DocPerm", + "submit": 0, + "write": 0, + "role": "Material User", + "cancel": 0, + "permlevel": 0 } ] \ No newline at end of file diff --git a/utilities/page/messages/messages.js b/utilities/page/messages/messages.js index 625fe5b5358..66835403288 100644 --- a/utilities/page/messages/messages.js +++ b/utilities/page/messages/messages.js @@ -88,7 +88,7 @@ erpnext.Messages = Class.extend({ $('#message-title').html(contact==user ? "Everyone" : wn.user_info(contact).fullname) - $('#avatar-image').attr("src", wn.user_info(contact).image); + $('#avatar-image').attr("src", wn.utils.get_file_link(wn.user_info(contact).image)); $("#show-everyone").toggle(contact!=user); @@ -129,7 +129,7 @@ erpnext.Messages = Class.extend({ data.creation = dateutil.comment_when(data.creation); data.comment_by_fullname = wn.user_info(data.owner).fullname; - data.image = wn.user_info(data.owner).image; + data.image = wn.utils.get_file_link(wn.user_info(data.owner).image); data.mark_html = ""; data.reply_html = ''; @@ -190,7 +190,7 @@ erpnext.Messages = Class.extend({ var p = r.message[i]; if(p.name != user) { p.fullname = wn.user_info(p.name).fullname; - p.image = wn.user_info(p.name).image; + p.image = wn.utils.get_file_link(wn.user_info(p.name).image); p.name = p.name.replace('@', '__at__'); p.status_color = p.has_session ? "green" : "#ddd"; p.status = p.has_session ? "Online" : "Offline";