added moduleview

This commit is contained in:
Rushabh Mehta
2013-01-09 16:39:27 +05:30
parent 996c30a575
commit ce1d5276ff
28 changed files with 1117 additions and 1086 deletions

View File

@@ -2,23 +2,18 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-02 16:02:43",
"creation": "2012-07-03 13:30:57",
"modified_by": "Administrator",
"modified": "2012-05-01 15:58:16"
"modified": "2013-01-08 12:00:51"
},
{
"section_style": "Simple",
"allow_attach": 1,
"module": "Website",
"doctype": "DocType",
"description": "Set your background color, font and image (tiled)",
"issingle": 1,
"allow_attach": 1,
"name": "__common__",
"colour": "White:FFF",
"_last_update": "1330594969",
"show_in_menu": 0,
"doctype": "DocType",
"module": "Website",
"max_attachments": 1,
"version": 1
"description": "Set your background color, font and image (tiled)"
},
{
"name": "__common__",
@@ -40,29 +35,17 @@
"name": "Style Settings",
"doctype": "DocType"
},
{
"write": 1,
"create": 1,
"permlevel": 0,
"doctype": "DocPerm"
},
{
"permlevel": 1,
"doctype": "DocPerm"
},
{
"description": "If image is selected, color will be ignored (attach first)",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Background Image",
"permlevel": 0,
"options": "attach_files:",
"fieldname": "background_image",
"fieldtype": "Select",
"options": "attach_files:"
"permlevel": 0
},
{
"description": "Solid background color (default light gray)",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Background Color",
"fieldname": "background_color",
@@ -70,33 +53,35 @@
"permlevel": 0
},
{
"width": "50%",
"print_width": "50%",
"doctype": "DocField",
"width": "50%",
"fieldname": "cb0",
"fieldtype": "Column Break",
"permlevel": 0
},
{
"doctype": "DocField",
"options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans",
"label": "Font",
"options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma",
"fieldname": "font",
"fieldtype": "Select",
"label": "Font",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Font Size",
"options": "\n12px\n13px\n14px\n15px\n16px",
"fieldname": "font_size",
"fieldtype": "Select",
"label": "Font Size",
"permlevel": 0
},
{
"doctype": "DocField",
"label": "Heading Font",
"options": "\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans",
"fieldname": "heading_font",
"fieldtype": "Select",
"label": "Heading Font",
"permlevel": 0
},
{
@@ -108,7 +93,6 @@
},
{
"description": "add your own CSS (careful!)",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Add CSS",
"fieldname": "add_css",
@@ -117,7 +101,6 @@
},
{
"description": "Auto generated",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Custom CSS",
"fieldname": "custom_css",
@@ -133,5 +116,19 @@
"fieldtype": "Text",
"hidden": 1,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"cancel": 0,
"permlevel": 1
}
]

View File

@@ -1,47 +0,0 @@
<div class="layout-wrapper layout-wrapper-background">
<div class="appframe-area"></div>
<div class="layout-main-section">
<div style="width: 48%; float: left;">
<h5><a href="#List/Web Page">Web Page</a></h5>
<p class="help">Static (content) web page.</p>
<br>
<h5><a href="#List/Blog">Blog</a></h5>
<p class="help">Weblog (blog) entry.</p>
<br>
<h5><a href="#List/Website Slideshow">Website Slideshow</a></h5>
<p class="help">Slideshows for adding in website pages.</p>
</div>
<div style="width: 48%; float: right;">
<h5><a href="#Form/Website Settings">Website Settings</a></h5>
<p class="help">Setup of top navigation bar, footer and logo.</p>
<br>
<h5><a href="#Form/Style Settings">Style Settings</a></h5>
<p class="help">Setup of fonts and background.</p>
<br>
<h5><a href="#Form/Product Settings">Product Settings</a></h5>
<p class="help">Settings for Product Catalog on the website.</p>
<br>
<h5><a href="#Form/About Us Settings">About Us Settings</a></h5>
<p class="help">Settings for About Us Page.</p>
<br>
<h5><a href="#Form/Contact Us Settings">Contact Us Settings</a></h5>
<p class="help">Settings for the Contact Us Page.</p>
</div>
<div style="clear: both"></div>
</div>
<div class="layout-side-section">
<div class="psidebar">
<div class="section">
<div class="section-head">Advanced</div>
<div class="section-body">
<div class="section-item">
<a class="section-link"
title = "Javascript to append to the head section of the page."
href="#Form/Website Script">Website Script</a>
</div>
</div>
</div>
</div>
</div>
<div style="clear: both;"></div>
</div>

View File

@@ -1,20 +1,85 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ERPNext: Copyright 2013 Web Notes Technologies Pvt Ltd
// GNU General Public License. See "license.txt"
wn.module_page["Website"] = [
{
title: wn._("Web Content"),
icon: "icon-copy",
items: [
{
label: wn._("Web Page"),
description: wn._("Content web page."),
doctype:"Web Page"
},
{
label: wn._("Blog"),
description: wn._("Blog entry."),
doctype:"Blog"
},
{
label: wn._("Website Slideshow"),
description: wn._("Embed image slideshows in website pages."),
doctype:"Website Slideshow"
},
]
},
{
title: wn._("Website Overall Settings"),
icon: "icon-wrench",
right: true,
items: [
{
"route":"Form/Website Settings",
"label":wn._("Website Settings"),
"description":wn._("Setup of top navigation bar, footer and logo."),
doctype:"Website Settings"
},
{
"route":"Form/Style Settings",
"label":wn._("Style Settings"),
"description":wn._("Setup of fonts and background."),
doctype:"Style Settings"
},
]
},
{
title: wn._("Special Page Settings"),
icon: "icon-wrench",
items: [
{
"route":"Form/Product Settings",
"label":wn._("Product Settings"),
"description":wn._("Settings for Product Catalog on the website."),
doctype:"Product Settings"
},
{
"route":"Form/About Us Settings",
"label":wn._("About Us Settings"),
"description":wn._("Settings for About Us Page."),
doctype:"About Us Settings"
},
{
"route":"Form/Contact Us Settings",
"label":wn._("Contact Us Settings"),
"description":wn._("Settings for Contact Us Page."),
doctype:"Contact Us Settings"
},
]
},
{
title: wn._("Advanced Scripting"),
icon: "icon-wrench",
items: [
{
"route":"Form/Website Script",
"label":wn._("Website Script"),
"description":wn._("Javascript to append to the head section of the page."),
doctype:"Website Script"
},
]
}
]
pscript['onload_website-home'] = function(wrapper) {
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Website');
erpnext.module_page.setup_page('Website', wrapper);
wn.views.moduleview.make(wrapper, "Website");
}