diff --git a/erpnext/erpnext_version.py b/erpnext/erpnext_version.py deleted file mode 100644 index 48e45d5d313..00000000000 --- a/erpnext/erpnext_version.py +++ /dev/null @@ -1,3 +0,0 @@ -# version info - -version='1.0.0' diff --git a/erpnext/startup/modules.js b/erpnext/startup/modules.js index 3dd7b3e5fc2..b5356d9713a 100644 --- a/erpnext/startup/modules.js +++ b/erpnext/startup/modules.js @@ -145,8 +145,10 @@ SidebarItem.prototype.onclick = function() { // page type this.pointer.select(); - $item_set_working(me.pointer.label_area); - loadpage(this.det.module_page, function() { $item_done_working(me.pointer.label_area); }); + $(me.pointer.label_area).set_working(); + loadpage(this.det.module_page, function() { + $(me.pointer.label_area).done_working(); + }); } else { // show sub items @@ -190,7 +192,7 @@ SidebarItem.prototype.show_items = function() { this.loading = 1; var me = this; - $item_set_working(this.pointer.label_area); + $(this.pointer.label_area).set_working(); var callback = function(r,rt){ me.loaded = 1; me.loading = 0; @@ -199,7 +201,7 @@ SidebarItem.prototype.show_items = function() { var has_tools = 0; // widget code - $item_done_working(me.pointer.label_area); + $(me.pointer.label_area).done_working(); if(r.message.il) { me.il = r.message.il; diff --git a/erpnext/website/Module Def/Website/Website.txt b/erpnext/website/Module Def/Website/Website.txt index 7e67c3c7e7c..326fde177cb 100644 --- a/erpnext/website/Module Def/Website/Website.txt +++ b/erpnext/website/Module Def/Website/Website.txt @@ -5,7 +5,7 @@ { 'creation': '2012-01-23 17:05:32', 'docstatus': 0, - 'modified': '2012-01-24 15:57:51', + 'modified': '2012-01-25 16:12:14', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -21,6 +21,7 @@ # These values are common for all Module Def Item { + 'doc_type': 'Single DocType', 'doctype': 'Module Def Item', 'name': '__common__', 'parent': 'Website', @@ -48,7 +49,6 @@ { 'display_name': 'Top Bar Settings', 'doc_name': 'Top Bar Settings', - 'doc_type': 'Single DocType', 'doctype': 'Module Def Item' }, @@ -56,7 +56,13 @@ { 'display_name': 'Home Settings', 'doc_name': 'Home Settings', - 'doc_type': 'Forms', + 'doctype': 'Module Def Item' + }, + + # Module Def Item + { + 'display_name': 'Contact Us Settings', + 'doc_name': 'Contact Us Settings', 'doctype': 'Module Def Item' }, diff --git a/erpnext/website/css/website.css b/erpnext/website/css/website.css index bdef882b648..b60c2fb1044 100644 --- a/erpnext/website/css/website.css +++ b/erpnext/website/css/website.css @@ -8,6 +8,10 @@ header .topbar .container { margin: auto; } +.web-content input[type="text"], .web-content input[type="password"], .web-content select { + min-width: 180px; +} + .web-main-section { width: 65%; float: left; diff --git a/erpnext/website/doctype/contact_us_settings/__init__.py b/erpnext/website/doctype/contact_us_settings/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/website/doctype/contact_us_settings/contact_us_settings.py b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py new file mode 100644 index 00000000000..65d50dbf7ea --- /dev/null +++ b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py @@ -0,0 +1,16 @@ +""" +generate html +""" +import webnotes + +class DocType: + def __init__(self, d, dl): + self.doc, self.doclist = d, dl + + def on_update(self): + """make home html""" + from website.utils import make_template + import os + path = os.path.join(os.path.dirname(__file__), 'template.html') + + webnotes.conn.set_value('Page', 'contact', 'content', make_template(self.doc, path)) diff --git a/erpnext/website/doctype/contact_us_settings/contact_us_settings.txt b/erpnext/website/doctype/contact_us_settings/contact_us_settings.txt new file mode 100644 index 00000000000..ff43a0aa14f --- /dev/null +++ b/erpnext/website/doctype/contact_us_settings/contact_us_settings.txt @@ -0,0 +1,100 @@ +# DocType, Contact Us Settings +[ + + # These values are common in all dictionaries + { + 'creation': '2012-01-25 16:01:33', + 'docstatus': 0, + 'modified': '2012-01-25 16:01:33', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all DocType + { + 'colour': 'White:FFF', + 'doctype': 'DocType', + 'document_type': 'Other', + 'issingle': 1, + 'module': 'Website', + 'name': '__common__', + 'section_style': 'Simple', + 'show_in_menu': 0, + 'version': 1 + }, + + # These values are common for all DocField + { + 'colour': 'White:FFF', + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Contact Us Settings', + 'parentfield': 'fields', + 'parenttype': 'DocType', + 'permlevel': 0 + }, + + # These values are common for all DocPerm + { + 'create': 1, + 'doctype': 'DocPerm', + 'name': '__common__', + 'parent': 'Contact Us Settings', + 'parentfield': 'permissions', + 'parenttype': 'DocType', + 'permlevel': 0, + 'read': 1, + 'write': 1 + }, + + # DocType, Contact Us Settings + { + 'doctype': 'DocType', + 'name': 'Contact Us Settings' + }, + + # DocPerm + { + 'doctype': 'DocPerm', + 'role': 'Website Manager' + }, + + # DocPerm + { + 'doctype': 'DocPerm', + 'role': 'System Manager' + }, + + # DocField + { + 'default': 'Contact Us', + 'doctype': 'DocField', + 'fieldname': 'headline', + 'fieldtype': 'Data', + 'label': 'Headline' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'send_email_notification', + 'fieldtype': 'Check', + 'label': 'Send Email Notification' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'main_section', + 'fieldtype': 'Code', + 'label': 'Main Section' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'side_section', + 'fieldtype': 'Code', + 'label': 'Side Section' + } +] \ No newline at end of file diff --git a/erpnext/website/doctype/contact_us_settings/template.html b/erpnext/website/doctype/contact_us_settings/template.html new file mode 100644 index 00000000000..6453784b7f4 --- /dev/null +++ b/erpnext/website/doctype/contact_us_settings/template.html @@ -0,0 +1,24 @@ +