mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
login, analytics fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
pscript.onload_dashboard = function() {
|
pscript.onload_dashboard = function() {
|
||||||
// load jqplot
|
// load jqplot
|
||||||
wn.require('lib/css/jqpot.css');
|
wn.require('lib/css/jqplot.css');
|
||||||
wn.require('lib/js/legacy/jquery/jquery.jqplot.min.js');
|
wn.require('lib/js/legacy/jquery/jquery.jqplot.min.js');
|
||||||
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.barRenderer.js');
|
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.barRenderer.js');
|
||||||
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
|
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
|
||||||
|
|||||||
5
erpnext/patches/jan_mar_2012/website/analytics.py
Normal file
5
erpnext/patches/jan_mar_2012/website/analytics.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
def execute():
|
||||||
|
from webnotes.modules import reload_doc
|
||||||
|
reload_doc('website', 'doctype', 'website_settings')
|
||||||
|
reload_doc('website', 'doctype', 'product_settings')
|
||||||
|
|
||||||
@@ -56,6 +56,10 @@ def boot_session(bootinfo):
|
|||||||
parent_label, parentfield
|
parent_label, parentfield
|
||||||
from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)
|
from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)
|
||||||
bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
|
bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
|
||||||
|
bootinfo['analytics_code'] = \
|
||||||
|
webnotes.conn.get_value('Website Settings', None, 'analytics_code')
|
||||||
|
bootinfo['analytics_call'] = \
|
||||||
|
webnotes.conn.get_value('Website Settings', None, 'analytics_call')
|
||||||
else:
|
else:
|
||||||
bootinfo['letter_heads'] = get_letter_heads()
|
bootinfo['letter_heads'] = get_letter_heads()
|
||||||
|
|
||||||
|
|||||||
@@ -5,68 +5,68 @@
|
|||||||
{
|
{
|
||||||
'creation': '2012-01-30 12:15:00',
|
'creation': '2012-01-30 12:15:00',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-01-30 13:50:53',
|
'modified': '2012-02-14 14:29:41',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1327906116',
|
'_last_update': u'1327911653',
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Products are automatically updated from the item master. To add products to the website, go to the <a href="#!List/Item">Item master</a> and check "Show in Website" in the "Website Details"\n\n',
|
'description': u'\n\n',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'issingle': 1,
|
'issingle': 1,
|
||||||
'module': 'Website',
|
'module': u'Website',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'section_style': 'Simple',
|
'section_style': u'Simple',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 3
|
'version': 4
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
|
'description': u'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'groups',
|
'fieldname': u'groups',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': u'Table',
|
||||||
'label': 'Groups',
|
'label': u'Groups',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'options': 'Product Group',
|
'options': u'Product Group',
|
||||||
'parent': 'Products Settings',
|
'parent': u'Products Settings',
|
||||||
'parentfield': 'fields',
|
'parentfield': u'fields',
|
||||||
'parenttype': 'DocType',
|
'parenttype': u'DocType',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocPerm
|
# These values are common for all DocPerm
|
||||||
{
|
{
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Products Settings',
|
'parent': u'Products Settings',
|
||||||
'parentfield': 'permissions',
|
'parentfield': u'permissions',
|
||||||
'parenttype': 'DocType',
|
'parenttype': u'DocType',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'read': 1,
|
'read': 1,
|
||||||
'role': 'Website Manager',
|
'role': u'Website Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType, Products Settings
|
# DocType, Products Settings
|
||||||
{
|
{
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'name': 'Products Settings'
|
'name': u'Products Settings'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm'
|
'doctype': u'DocPerm'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField'
|
'doctype': u'DocField'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-02-02 13:51:29',
|
'creation': '2012-02-02 13:19:50',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-02-13 12:23:36',
|
'modified': '2012-02-14 16:13:59',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'section_style': u'Simple',
|
'section_style': u'Simple',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 8
|
'version': 9
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@@ -205,5 +205,35 @@
|
|||||||
'label': u'Domain List',
|
'label': u'Domain List',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'reqd': 0
|
'reqd': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldtype': u'Section Break',
|
||||||
|
'label': u'Analytics',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'description': u'Code pasted in the head tag to start an Analytics engine like Google Analytics',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'analytics_code',
|
||||||
|
'fieldtype': u'Text',
|
||||||
|
'label': u'Analytics Code',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'description': u"Function to be called when page is changed. (_gaq.push['_trackPageview'] for Google Code)",
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'analytics_call',
|
||||||
|
'fieldtype': u'Text',
|
||||||
|
'label': u'Analytics Call',
|
||||||
|
'permlevel': 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1027,7 +1027,7 @@ if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(n
|
|||||||
var nav_obj={}
|
var nav_obj={}
|
||||||
nav_obj.observers=[];nav_obj.add_observer=function(o){nav_obj.observers.push(o);}
|
nav_obj.observers=[];nav_obj.add_observer=function(o){nav_obj.observers.push(o);}
|
||||||
nav_obj.ol=[];nav_obj.open_notify=function(t,dt,dn,no_history){if(nav_obj.ol.length){var tmp=nav_obj.ol[nav_obj.ol.length-1];if(tmp&&tmp[0]==t&&tmp[1]==dt&&tmp[2]==dn)return;}
|
nav_obj.ol=[];nav_obj.open_notify=function(t,dt,dn,no_history){if(nav_obj.ol.length){var tmp=nav_obj.ol[nav_obj.ol.length-1];if(tmp&&tmp[0]==t&&tmp[1]==dt&&tmp[2]==dn)return;}
|
||||||
if(!no_history){var tmp=[];for(var i in nav_obj.ol)
|
if(!no_history){var tmp=[];for(var i in nav_obj.ol)
|
||||||
if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(nav_obj.ol[i]);nav_obj.ol=tmp;nav_obj.ol.push([t,dt,dn])
|
if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(nav_obj.ol[i]);nav_obj.ol=tmp;nav_obj.ol.push([t,dt,dn])
|
||||||
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
|
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
|
||||||
if(nav_obj.on_open)
|
if(nav_obj.on_open)
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(n
|
|||||||
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
|
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
|
||||||
if(nav_obj.on_open)
|
if(nav_obj.on_open)
|
||||||
nav_obj.on_open(id);if(window.location.hash!='!'+id){window.location.hash='!'+id;}}
|
nav_obj.on_open(id);if(window.location.hash!='!'+id){window.location.hash='!'+id;}}
|
||||||
nav_obj.notify_observers(t,dt,dn);}
|
nav_obj.notify_observers(t,dt,dn);if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}
|
||||||
nav_obj.notify_observers=function(t,dt,dn){for(var i=0;i<nav_obj.observers.length;i++){var o=nav_obj.observers[i];if(o&&o.notify)o.notify(t,dt,dn);}}
|
nav_obj.notify_observers=function(t,dt,dn){for(var i=0;i<nav_obj.observers.length;i++){var o=nav_obj.observers[i];if(o&&o.notify)o.notify(t,dt,dn);}}
|
||||||
nav_obj.rename_notify=function(dt,oldn,newn){for(var i=0;i<nav_obj.ol.length;i++){var o=nav_obj.ol[i];if(o[1]==dt&&o[2]==oldn)o[2]=newn;}}
|
nav_obj.rename_notify=function(dt,oldn,newn){for(var i=0;i<nav_obj.ol.length;i++){var o=nav_obj.ol[i];if(o[1]==dt&&o[2]==oldn)o[2]=newn;}}
|
||||||
nav_obj.show_last_open=function(){var l=nav_obj.ol[nav_obj.ol.length-2];delete nav_obj.ol[nav_obj.ol.length-1];if(!l)loadpage('_home');else if(l[0]=='Page'){loadpage(l[1]);}else if(l[0]=='Report'){loadreport(l[1],l[2]);}else if(l[0]=='Form'){loaddoc(l[1],l[2]);}else if(l[0]=='DocBrowser'||l[0]=='List'){loaddocbrowser(l[1]);}}
|
nav_obj.show_last_open=function(){var l=nav_obj.ol[nav_obj.ol.length-2];delete nav_obj.ol[nav_obj.ol.length-1];if(!l)loadpage('_home');else if(l[0]=='Page'){loadpage(l[1]);}else if(l[0]=='Report'){loadreport(l[1],l[2]);}else if(l[0]=='Form'){loaddoc(l[1],l[2]);}else if(l[0]=='DocBrowser'||l[0]=='List'){loaddocbrowser(l[1]);}}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
422
|
423
|
||||||
Reference in New Issue
Block a user