Merge branch 'navupdate' of github.com:webnotes/erpnext into navupdate

This commit is contained in:
Nabin Hait 2012-03-01 14:48:13 +05:30
commit b95ad21208
28 changed files with 220 additions and 152 deletions

View File

@ -37,7 +37,6 @@
{
"css/all-web.css": [
"lib/css/legacy/body.css",
"lib/css/legacy/menus.css",
"lib/css/legacy/messages.css",
"lib/css/legacy/dialog.css",
"lib/css/bootstrap/headings.css",
@ -53,7 +52,6 @@
{
"css/all-app.css": [
"lib/css/legacy/body.css",
"lib/css/legacy/menus.css",
"lib/css/legacy/messages.css",
"lib/css/legacy/forms.css",
"lib/css/legacy/grid.css",

View File

@ -230,59 +230,16 @@ div.std-footer-item {
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
/*
* lib/css/legacy/menus.css
*/
/******** Menus - menu.js ************/
ul.menu_toolbar {
z-index: 30;
padding: 0px;
margin: 0px;
margin-top: 1px;
.avatar-small {
display: inline-block;
min-width: 29px;
}
.avatar-small img {
height: 24px;
margin-bottom: -7px;
max-width: 24px;
}
ul.menu_toolbar li {
list-style: none;
margin: 0px;
float: left;
}
.top_menu {
margin: 0px;
padding: 4px;
cursor: pointer;
color: #FFF;
margin-right: 8px;
}
.top_menu_mo {
background-color: #000;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
div.menu_toolbar_dropdown {
position: absolute;
margin-top: 4px;
margin-left: 8px;
width: 140px;
background-color: #FFF;
color: #000;
display: none;
border: 2px solid #333;
z-index: 31;
overflow-y: auto;
overflow-x: hidden;
}
div.dd_item {
cursor: pointer;
padding: 4px;
background-color: #FFF;
}
div.dd_item_mo { background-color: #FE8; }
/*
* lib/css/legacy/messages.css
*/
@ -2812,7 +2769,7 @@ body {
}
.erpnext-footer {
margin: 3px auto;
margin: 11px auto;
text-align: center;
}

View File

@ -230,59 +230,16 @@ div.std-footer-item {
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
/*
* lib/css/legacy/menus.css
*/
/******** Menus - menu.js ************/
ul.menu_toolbar {
z-index: 30;
padding: 0px;
margin: 0px;
margin-top: 1px;
.avatar-small {
display: inline-block;
min-width: 29px;
}
.avatar-small img {
height: 24px;
margin-bottom: -7px;
max-width: 24px;
}
ul.menu_toolbar li {
list-style: none;
margin: 0px;
float: left;
}
.top_menu {
margin: 0px;
padding: 4px;
cursor: pointer;
color: #FFF;
margin-right: 8px;
}
.top_menu_mo {
background-color: #000;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
div.menu_toolbar_dropdown {
position: absolute;
margin-top: 4px;
margin-left: 8px;
width: 140px;
background-color: #FFF;
color: #000;
display: none;
border: 2px solid #333;
z-index: 31;
overflow-y: auto;
overflow-x: hidden;
}
div.dd_item {
cursor: pointer;
padding: 4px;
background-color: #FFF;
}
div.dd_item_mo { background-color: #FE8; }
/*
* lib/css/legacy/messages.css
*/
@ -1620,7 +1577,7 @@ body {
}
.erpnext-footer {
margin: 3px auto;
margin: 11px auto;
text-align: center;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,8 +15,7 @@ erpnext.ActivityFeed = Class.extend({
this.scrub_data(data);
this.add_date_separator(row, data);
$(row).append(sprintf('<div style="margin: 0px">\
<img src="%(imgsrc)s" style= "height: 24px; margin-bottom: -7px; \
max-width: 24px; margin-right: 5px"> \
<span class="avatar-small"><img src="%(imgsrc)s" /></span> \
<span %(onclick)s class="label %(add_class)s">%(feed_type)s</span>\
%(link)s %(subject)s <span class="user-info">%(by)s</span></div>', data));
},

View File

@ -0,0 +1,91 @@
<div class="layout-wrapper">
<a class="close" onclick="window.history.back();">&times;</a>
<h1>Attributions</h1>
<hr>
<p><b>Source Code:</b> <a href="https://github.com/webnotes/erpnext">
https://github.com/webnotes/erpnext</a></p>
<p><b>Website:</b> <a href="https://erpnext.com">
https://erpnext.com</a></p>
<hr>
<p class="help">ERPNext is an Open Source project and is possible because of the work of
thousands of software developers, companies and designers who have contributed their
work to the community. We have tried to list as many projects as possible that are
used by ERPNext, but this list may not be exhaustive.</p>
<h4>Server</h4>
<ul>
<li>Linux (GNU)</li>
<li>Apache HTTPD server (web server)</li>
<li>MySQL (database, Percona build)</li>
<li>Git (source code control via Github)</li>
</ul>
<h4>Programming Languages & Libraries</h4>
<ul>
<li><a href="http://python.org">Python</a></li>
<ul>
<li>Python-MySQL</li>
<li>pytz (timezones)</li>
<li>jinja2 (templating)</li>
<li>markdown2 (markdown parser)</li>
<li>jsmin (javascript minifier)</li>
</ul>
<li>Javascript</li>
<ul>
<li>JQuery</li>
<li>JQuery UI (datepicker, sortable)</li>
<li>TinyMCE - text editor</li>
<li>Twitter Bootstrap</li>
<li>jQPlot - graphs</li>
<li>JSON2 - JSON builder, parser</li>
<li>JSColor - color picker</li>
<li>sprintf - string formatting</li>
<li>historyjs - AJAX history</li>
</ul>
</ul>
<h4>CSS Frameworks</h4>
<ul>
<li>Twitter Bootstrap</li>
</ul>
<h4>Icons</h4>
<ul>
<li>The Noun Project</li>
<li>Glyphicons</li>
</ul>
<h4>Web Frameworks</h4>
<ul>
<li>wnframework</li>
</ul>
<h4>Web Browsers</h4>
<ul>
<li>Mozilla Firefox</li>
<ul>
<li>Firebug (debugger)</li>
</ul>
<li>Apple Safari</li>
<li>Google Chorme</li>
</ul>
<hr>
<h2>ERPNext License</h2>
<p><b>ERPNext - Open Source, web based ERP</b></p>
<p>Copyright &copy; 2008 onwards, Web Notes Technologies Pvt Ltd, India</p>
<p>This program is free software: you can redistribute it and/or modify
it under the terms of the <b>GNU General Public License</b> as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.</p>
<p>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.</p>
<p>For complete license see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></p>
<hr>
<p>For more information please write to us at support@erpnext.com</p>
</div>

View File

@ -0,0 +1 @@
wn.pages['attributions'].onload = function(wrapper) { }

View File

@ -0,0 +1 @@
import webnotes

View File

@ -0,0 +1,28 @@
# Page, attributions
[
# These values are common in all dictionaries
{
'creation': '2012-03-01 12:30:42',
'docstatus': 0,
'modified': '2012-03-01 12:30:42',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': u'Home',
'name': '__common__',
'page_name': u'attributions',
'standard': u'Yes',
'title': u'Attributions'
},
# Page, attributions
{
'doctype': 'Page',
'name': u'attributions'
}
]

View File

@ -0,0 +1,10 @@
def execute():
"""
Adds various roles to Administrator. This patch is for making master db
ready for on premise installation
"""
import webnotes
from webnotes.model.code import get_obj
from webnotes.model.doc import Document
sc = get_obj('Setup Control', 'Setup Control')
sc.add_roles(Document('Profile', 'Administrator'))

View File

@ -40,3 +40,8 @@ def execute():
delete_doc('DocType', 'Update Delivery Date Detail')
# Reload print formats
reload_doc('accounts', 'Print Format', 'Sales Invoice Classic')
reload_doc('accounts', 'Print Format', 'Sales Invoice Modern')
reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan')

View File

@ -35,6 +35,7 @@ def execute():
reload_doc('setup', 'page', 'modules_setup')
reload_doc('utilities', 'page', 'users')
reload_doc('home', 'page', 'activity')
reload_doc('home', 'page', 'attributions')
reload_doc('core', 'doctype', 'profile')
# update user_image in profile

View File

@ -69,3 +69,12 @@ def replace_file_list_column_entries():
if file_list and "/" in file_list:
webnotes.conn.sql("UPDATE `%s` SET file_list='%s' WHERE name='%s'" \
% (tab, file_list.replace('/', '-'), name))
singles = webnotes.conn.sql("""SELECT doctype, value FROM `tabSingles`
WHERE field='file_list'""")
for doctype, file_list in singles:
if file_list and "/" in file_list:
webnotes.conn.sql("""UPDATE `tabSingles` SET value='%s'
WHERE doctype='%s' AND field='file_list'"""
% (file_list.replace('/', '-'), doctype))

View File

@ -157,4 +157,14 @@ patch_list = [
'patch_file': 'navupdate',
'description': 'New Navigation Pages'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'label_cleanup',
'description': 'Remove extra fields and new dynamic labels'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'add_roles_to_admin',
'description': 'Add Roles to Administrator'
},
]

View File

@ -200,7 +200,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -227,7 +227,7 @@
</tr>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -222,7 +222,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
<td><script>date.str_to_user(doc.voucher_date)</script></td>
<td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>

View File

@ -32,7 +32,7 @@ erpnext.module_page.hide_links = function(wrapper) {
$(wrapper).find('[href*="List/"]').each(function() {
var href = $(this).attr('href');
var dt = href.split('/')[1];
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
var txt = $(this).text();
$(this).parent().css('color', '#999').html(txt);
}
@ -41,7 +41,7 @@ erpnext.module_page.hide_links = function(wrapper) {
// reports
$(wrapper).find('[data-doctype]').each(function() {
var dt = $(this).attr('data-doctype');
if(wn.boot.profile.can_read.indexOf(dt)==-1) {
if(wn.boot.profile.all_read.indexOf(dt)==-1) {
var txt = $(this).text();
$(this).parent().css('color', '#999').html(txt);
}
@ -51,7 +51,7 @@ erpnext.module_page.hide_links = function(wrapper) {
$(wrapper).find('[href*="Form/"]').each(function() {
var href = $(this).attr('href');
var dt = href.split('/')[1];
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
var txt = $(this).text();
$(this).parent().css('color', '#999').html(txt);
}

View File

@ -16,7 +16,7 @@ body {
}
.erpnext-footer {
margin: 3px auto;
margin: 11px auto;
text-align: center;
}

View File

@ -62,7 +62,7 @@ erpnext.startup.start = function() {
} else {
// always allow apps
wn.boot.profile.allow_modules = wn.boot.profile.allow_modules.concat(
['To Do', 'Knowledge Base', 'Calendar', 'Activity'])
['To Do', 'Knowledge Base', 'Calendar', 'Activity', 'Messages'])
// setup toolbar
erpnext.toolbar.setup();
@ -73,7 +73,7 @@ erpnext.startup.start = function() {
// border to the body
// ------------------
$('footer').html('<div class="web-footer erpnext-footer">\
Powered by <a href="https://erpnext.com">ERPNext</a></div>');
<a href="#!attributions">ERPNext | Attributions and License</a></div>');
// complete registration
if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {

View File

@ -48,7 +48,8 @@ def get_list(arg=None):
@webnotes.whitelist()
def get_active_users(arg=None):
return webnotes.conn.sql("""select name from tabProfile
where enabled=1 and
where ifnull(enabled,0)=1 and
docstatus < 2 and
name not in ('Administrator', 'Guest')
order by first_name""", as_dict=1)

View File

@ -1717,7 +1717,7 @@ f.hide_save=function(){$dh(me.page_layout.footer.save_area);}}
_f.Frm.prototype.setup_fields_std=function(){var fl=fields_list[this.doctype];fl.sort(function(a,b){return a.idx-b.idx});if(fl[0]&&fl[0].fieldtype!="Section Break"||get_url_arg('embed')){this.layout.addrow();if(fl[0].fieldtype!="Column Break"){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}
var sec;for(var i=0;i<fl.length;i++){var f=fl[i];if(get_url_arg('embed')&&(in_list(['Section Break','Column Break'],f.fieldtype)))continue;if(f.fieldtype=='Section Break'&&fl[i+1]&&fl[i+1].fieldtype=='Section Break')continue;var fn=f.fieldname?f.fieldname:f.label;var fld=make_field(f,this.doctype,this.layout.cur_cell,this);this.fields[this.fields.length]=fld;this.fields_dict[fn]=fld;if(this.meta.section_style!='Simple')
fld.parent_section=sec;if(f.fieldtype=='Section Break'&&f.options!='Simple')
sec=fld;if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
sec=fld;if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')&&!f.hidden){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
_f.Frm.prototype.add_custom_button=function(label,fn,icon){this.frm_head.page_head.add_button(label,fn,1);}
_f.Frm.prototype.clear_custom_buttons=function(){}
_f.Frm.prototype.add_fetch=function(link_field,src_field,tar_field){if(!this.fetch_dict[link_field]){this.fetch_dict[link_field]={'columns':[],'fields':[]}}
@ -2234,9 +2234,9 @@ erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_p
if(inList(user_roles,'System Manager'))is_system_manager=1;}
erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity'])
if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
Powered by <a href="https://erpnext.com">ERPNext</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
<a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
else if(nm=='Accounts Browser')
@ -2253,7 +2253,7 @@ $(document).bind('startup',function(){erpnext.startup.start();});
* erpnext/startup/js/modules.js
*/
wn.provide('erpnext.module_page');erpnext.module_page.setup_page=function(module,wrapper){erpnext.module_page.hide_links(wrapper);erpnext.module_page.make_list(module,wrapper);$(wrapper).find("a[title]").tooltip({delay:{show:500,hide:100}});}
erpnext.module_page.hide_links=function(wrapper){$(wrapper).find('[href*="List/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[data-doctype]').each(function(){var dt=$(this).attr('data-doctype');if(wn.boot.profile.can_read.indexOf(dt)==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[href*="Form/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});}
erpnext.module_page.hide_links=function(wrapper){$(wrapper).find('[href*="List/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[data-doctype]').each(function(){var dt=$(this).attr('data-doctype');if(wn.boot.profile.all_read.indexOf(dt)==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[href*="Form/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});}
erpnext.module_page.make_list=function(module,wrapper){wrapper.list=new wn.widgets.Listing({parent:$(wrapper).find('.reports-list').get(0),method:'utilities.get_report_list',render_row:function(row,data){if(!data.parent_doc_type)data.parent_doc_type=data.doc_type;$(row).html(repl('<a href="#!Report/%(doc_type)s/%(criteria_name)s" \
data-doctype="%(parent_doc_type)s">\
%(criteria_name)s</a>',data))},args:{module:module},no_refresh:true,callback:function(r){erpnext.module_page.hide_links(wrapper)}});wrapper.list.run();}

View File

@ -1082,9 +1082,9 @@ erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_p
if(inList(user_roles,'System Manager'))is_system_manager=1;}
erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity'])
if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
Powered by <a href="https://erpnext.com">ERPNext</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
<a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
else if(nm=='Accounts Browser')

View File

@ -1 +1 @@
781
784