Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix in issues arising due to wn.require

  • Loading branch information...
commit 951d8ec34288e97b499abab042e57c4422172dbf 1 parent 45b187d
@anandpdoshi anandpdoshi authored
View
11 build.json
@@ -16,5 +16,14 @@
"erpnext/startup/js/toolbar.js",
"erpnext/startup/js/feature_setup.js",
"conf.js"
- ]
+ ],
+ "public/js/kb_common.js": [
+ "erpnext/utilities/page/kb_common/kb_common.js",
+ ],
+ "public/js/complete_setup.js": [
+ "erpnext/startup/js/complete_setup.js",
+ ],
+ "public/js/product_category.js": [
+ "erpnext/website/js/product_category.js",
+ ],
}
View
2  erpnext/startup/startup.js
@@ -76,7 +76,7 @@ erpnext.startup.start = function() {
// complete registration
if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {
- wn.require("erpnext/startup/js/complete_setup.js");
+ wn.require("js/complete_setup.js");
erpnext.complete_setup.show();
}
if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
View
2  erpnext/utilities/page/questions/questions.js
@@ -220,4 +220,4 @@ KBQuestion = function(parent, det, kb) {
this.make()
}
-wn.require('erpnext/utilities/page/kb_common/kb_common.js');
+wn.require('js/kb_common.js');
View
2  erpnext/website/page/products/products.js
@@ -16,7 +16,7 @@
erpnext.products = {}
-wn.require('erpnext/website/js/product_category.js');
+wn.require('js/product_category.js');
pscript.onload_products = function(wrapper) {
erpnext.make_product_categories(wrapper);
View
134 public/css/wn-web.css
@@ -0,0 +1,134 @@
+#body_div {
+
+ background: url("../files/indian-textile-5.gif") repeat;
+
+
+ font-family: 'Arial', Verdana, Sans !important;
+
+
+ font-size: 14px !important;
+
+}
+
+
+.small {
+ font-size: 12px !important;
+}
+
+
+
+h1, h2, h3, h4, h5 {
+ font-family: 'Arial', Arial, 'Helvetica Neue' !important;
+}
+
+
+/* User CSS */
+
+hr {
+ clear: both;
+}
+
+p {
+ margin-top: 2px;
+}
+
+
+.hand {
+ font-family: Pacifico;
+ font-size: 18px;
+}
+
+h1.top {
+ text-align: center;
+}
+
+.sub-head {
+ text-align: center;
+ color: #888;
+ font-size: 18px;
+ margin: 10px 0px;
+}
+
+.layout-main, .layout-main-section {
+ padding: 50px;
+}
+
+.layout-main-section {
+ width: 60%;
+}
+
+.layout-side-section {
+ padding-top: 50px;
+}
+
+h2 {
+ //font-family: Pacifico;
+ font-size: 20px;
+ font-weight: bold;
+ color: #CC0000;
+ padding: 25px 0px 25px 0px;
+ clear: both;
+ text-align: left;
+}
+
+.center {
+ text-align: center;
+}
+
+.left {
+ width: 375px;
+ padding-right: 25px;
+ float: left;
+}
+
+.right {
+ width: 375px;
+ padding-left: 25px;
+ float: left;
+}
+
+.page-footer {
+ clear: both;
+ margin: -50px;
+ margin-top: 50px;
+ background-color: #FFFAED;
+ padding: 50px;
+}
+
+.page-footer input {
+ width: 140px;
+ font-size: 17px;
+ padding: 4px;
+ margin-top: 2px;
+}
+
+.page-footer .section-head {
+ padding: 0px;
+ margin-bottom: 7px;
+}
+
+.green {
+ color: green;
+}
+
+.web-form input, .web-form textarea {
+ width: 400px;
+ font-size: 17px;
+ padding: 4px;
+}
+
+.link-big {
+ font-size: 140%;
+}
+
+.sticky {
+ background-color: #F0EDDD;
+ padding: 15px;
+ margin-left: 15px;
+ font-size: 12px;
+ color: #444;
+ width: 240px;
+ min-height: 120px;
+ float: right;
+ box-shadow: 2px 2px 6px #973;
+}
View
2  public/js/all-app.js
@@ -2256,7 +2256,7 @@ wn.provide('wn.modules');$.extend(wn.modules,erpnext.modules);wn.modules['Core']
erpnext.startup.start=function(){console.log('Starting up...');$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(user!='Guest'){if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
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">\
- <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.show();}
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
View
2  public/js/all-web.js
@@ -710,7 +710,7 @@ wn.provide('wn.modules');$.extend(wn.modules,erpnext.modules);wn.modules['Core']
erpnext.startup.start=function(){console.log('Starting up...');$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(user!='Guest'){if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
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">\
- <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.show();}
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
View
10 public/js/complete_setup.js
@@ -0,0 +1,10 @@
+
+/*
+ * erpnext/startup/js/complete_setup.js
+ */
+wn.provide('erpnext.complete_setup');$.extend(erpnext.complete_setup,{show:function(){d=erpnext.complete_setup.prepare_dialog();d.show();},prepare_dialog:function(){var d=new wn.widgets.Dialog({title:"Setup",fields:[{fieldname:'first_name',label:'Your First Name',fieldtype:'Data',reqd:1},{fieldname:'last_name',label:'Your Last Name',fieldtype:'Data'},{fieldname:'company_name',label:'Company Name',fieldtype:'Data',reqd:1,description:'e.g. "My Company LLC"'},{fieldname:'company_abbr',label:'Company Abbreviation',fieldtype:'Data',description:'e.g. "MC"',reqd:1},{fieldname:'fy_start',label:'Financial Year Start Date',fieldtype:'Select',description:'Your financial year begins on"',reqd:1,options:erpnext.complete_setup.fy_start_list.join('\n')},{fieldname:'currency',label:'Default Currency',reqd:1,options:erpnext.complete_setup.currency_list.join('\n'),fieldtype:'Select'},{fieldname:'industry',label:'Industry',reqd:1,options:erpnext.complete_setup.industry_list.join('\n'),fieldtype:'Select'},{fieldname:'country',label:'Country',reqd:1,options:erpnext.complete_setup.country_list.join('\n'),fieldtype:'Select'},{fieldname:'timezone',label:'Time Zone',reqd:1,options:'',fieldtype:'Select'},{fieldname:'update',label:'Setup',fieldtype:'Button'},],});if(user!='Administrator'){$(d.appframe.$titlebar).find('.close').toggle(false);$('header').toggle(false);}
+d.fields_dict.update.input.onclick=function(){var data=d.get_values();if(!data)return;$(this).set_working();$c_obj('Setup Control','setup_account',data,function(r,rt){sys_defaults=r.message;user_fullname=r.message.user_fullname;wn.boot.user_info[user].fullname=user_fullname;d.hide();$('header').toggle(true);wn.container.wntoolbar.set_user_name();});};d.fields_dict.country.input.onchange=function(){var country=d.fields_dict.country.input.value;var $timezone=$(d.fields_dict.timezone.input);$timezone.empty();if(country){var timezone_list=erpnext.complete_setup.timezone_dict[country];if(timezone_list.length>1){timezone_list=[""].concat(timezone_list);}
+$timezone.add_options(timezone_list);}};if(wn.control_panel.company_name){var inp=d.fields_dict.company_name.input;inp.value=wn.control_panel.company_name;inp.disabled=true;}
+if(user_fullname){u=user_fullname.split(' ');if(u[0]){d.fields_dict.first_name.input.value=u[0];}
+if(u[1]){d.fields_dict.last_name.input.value=u[1];}}
+return d;},fy_start_list:['','1st Jan','1st Apr','1st Jul','1st Oct'],currency_list:['','AED','AFN','ALL','AMD','ANG','AOA','ARS','AUD','AZN','BAM','BBD','BDT','BGN','BHD','BIF','BMD','BND','BOB','BRL','BSD','BTN','BYR','BZD','CAD','CDF','CFA','CFP','CHF','CLP','CNY','COP','CRC','CUC','CZK','DJF','DKK','DOP','DZD','EEK','EGP','ERN','ETB','EUR','EURO','FJD','FKP','FMG','GBP','GEL','GHS','GIP','GMD','GNF','GQE','GTQ','GYD','HKD','HNL','HRK','HTG','HUF','IDR','ILS','INR','IQD','IRR','ISK','JMD','JOD','JPY','KES','KGS','KHR','KMF','KPW','KRW','KWD','KYD','KZT','LAK','LBP','LKR','LRD','LSL','LTL','LVL','LYD','MAD','MDL','MGA','MKD','MMK','MNT','MOP','MRO','MUR','MVR','MWK','MXN','MYR','MZM','NAD','NGN','NIO','NOK','NPR','NRs','NZD','OMR','PAB','PEN','PGK','PHP','PKR','PLN','PYG','QAR','RMB','RON','RSD','RUB','RWF','SAR','SCR','SDG','SDR','SEK','SGD','SHP','SOS','SRD','STD','SYP','SZL','THB','TJS','TMT','TND','TRY','TTD','TWD','TZS','UAE','UAH','UGX','USD','USh','UYU','UZS','VEB','VND','VUV','WST','XAF','XCD','XDR','XOF','XPF','YEN','YER','YTL','ZAR','ZMK','ZWR'],industry_list:['','Aerospace and Defence','Agriculture','Apparel','Automobile','Banking','Biotechnology','Chemical','Communications','Consulting','Customer Service','Education','Electronics','Energy','Engineering','Entertainment','Environmental','Finance','Food and Beverage','Government','Healthcare','Hospitality','Information Technology','Insurance','Machinery','Manufacturing','Media','Not For Profit','Recreation','Retail','Shipping','Technology','Telecommunications','Transportation','Trading','Utilities','Other'],country_list:["",'Afghanistan','Albania','Algeria','Andorra','Angola','Antigua and Barbuda','Argentina','Armenia','Australia','Austria','Azerbaijan','Bahamas','Bahrain','Bangladesh','Barbados','Belarus','Belgium','Belize','Benin','Bhutan','Bolivia','Bosnia and Herzegovina','Botswana','Brazil','Brunei Darussalam','Bulgaria','Burkina Faso','Burundi','Cambodia','Cameroon','Canada','Cape Verde','Central African Republic','Chad','Chile','Colombia','Comoros','Costa Rica','Croatia','Cuba','Cyprus','Czech Republic',"C\xc3\xb4te d'Ivoire",'Democratic Republic of the Congo','Denmark','Djibouti','Dominica','Dominican Republic','East Timor','Ecuador','Egypt','El Salvador','Equatorial Guinea','Eritrea','Estonia','Ethiopia','Federated States of Micronesia','Fiji','Finland','France','Gabon','Georgia','Germany','Ghana','Greece','Grenada','Guatemala','Guinea','Guinea-Bissau','Guyana','Haiti','Honduras','Hungary','Iceland','India','Indonesia','Iran','Iraq','Israel','Italy','Jamaica','Japan','Jordan','Kazakhstan','Kenya','Kingdom of the Netherlands','Kiribati','Kuwait','Kyrgyzstan','Laos','Latvia','Lebanon','Lesotho','Liberia','Libya','Liechtenstein','Lithuania','Luxembourg','Macedonia','Madagascar','Malawi','Malaysia','Maldives','Mali','Malta','Marshall Islands','Mauritania','Mauritius','Mexico','Moldova','Monaco','Mongolia','Montenegro','Morocco','Mozambique','Myanmar','Namibia','Nauru','Nepal','New Zealand','Nicaragua','Niger','Nigeria','North Korea','Norway','Oman','Pakistan','Palau','Panama','Papua New Guinea','Paraguay',"People's Republic of China",'Peru','Philippines','Poland','Portugal','Qatar','Republic of Ireland','Republic of the Congo','Romania','Russia','Rwanda','Saint Kitts and Nevis','Saint Lucia','Saint Vincent and the Grenadines','Samoa','San Marino','Saudi Arabia','Senegal','Serbia','Seychelles','Sierra Leone','Singapore','Slovakia','Slovenia','Solomon Islands','Somalia','South Africa','South Korea','Spain','Sri Lanka','Sudan','Suriname','Swaziland','Sweden','Switzerland','Syria','S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe','Tajikistan','Tanzania','Thailand','The Gambia','Togo','Tonga','Trinidad and Tobago','Tunisia','Turkey','Turkmenistan','Tuvalu','Uganda','Ukraine','United Arab Emirates','United Kingdom','United States','Uruguay','Uzbekistan','Vanuatu','Vatican City','Venezuela','Vietnam','Yemen','Zambia','Zimbabwe'],timezone_dict:{'Afghanistan':['Asia/Kabul'],'Albania':['Europe/Tirane'],'Algeria':['Africa/Algiers'],'Andorra':['Europe/Andorra'],'Angola':['Africa/Luanda'],'Antigua and Barbuda':['America/Antigua'],'Argentina':['America/Argentina/Buenos_Aires','America/Argentina/Cordoba','America/Argentina/Jujuy','America/Argentina/Tucuman','America/Argentina/Catamarca','America/Argentina/La_Rioja','America/Argentina/San_Juan','America/Argentina/Mendoza','America/Argentina/Rio_Gallegos','America/Argentina/Ushuaia'],'Armenia':['Asia/Yerevan'],'Australia':['Australia/Lord_Howe','Australia/Hobart','Australia/Currie','Australia/Melbourne','Australia/Sydney','Australia/Broken_Hill','Australia/Brisbane','Australia/Lindeman','Australia/Adelaide','Australia/Darwin','Australia/Perth'],'Austria':['Europe/Vienna'],'Azerbaijan':['Asia/Baku'],'Bahamas':['America/Nassau'],'Bahrain':['Asia/Bahrain'],'Bangladesh':['Asia/Dhaka'],'Barbados':['America/Barbados'],'Belarus':['Europe/Minsk'],'Belgium':['Europe/Brussels'],'Belize':['America/Belize'],'Benin':['Africa/Porto-Novo'],'Bhutan':['Asia/Thimphu'],'Bolivia':['America/La_Paz'],'Bosnia and Herzegovina':['Europe/Sarajevo'],'Botswana':['Africa/Gaborone'],'Brazil':['America/Noronha','America/Belem','America/Fortaleza','America/Recife','America/Araguaina','America/Maceio','America/Bahia','America/Sao_Paulo','America/Campo_Grande','America/Cuiaba','America/Porto_Velho','America/Boa_Vista','America/Manaus','America/Eirunepe','America/Rio_Branco'],'Brunei Darussalam':['Asia/Brunei'],'Bulgaria':['Europe/Sofia'],'Burkina Faso':['Africa/Ouagadougou'],'Burundi':['Africa/Bujumbura'],'Cambodia':['Asia/Phnom_Penh'],'Cameroon':['Africa/Douala'],'Canada':['America/St_Johns','America/Halifax','America/Glace_Bay','America/Moncton','America/Goose_Bay','America/Blanc-Sablon','America/Montreal','America/Toronto','America/Nipigon','America/Thunder_Bay','America/Pangnirtung','America/Iqaluit','America/Atikokan','America/Rankin_Inlet','America/Winnipeg','America/Rainy_River','America/Cambridge_Bay','America/Regina','America/Swift_Current','America/Edmonton','America/Yellowknife','America/Inuvik','America/Dawson_Creek','America/Vancouver','America/Whitehorse','America/Dawson'],'Cape Verde':['Atlantic/Cape_Verde'],'Central African Republic':['Africa/Bangui'],'Chad':['Africa/Ndjamena'],'Chile':['America/Santiago','Pacific/Easter'],'Colombia':['America/Bogota'],'Comoros':['Indian/Comoro'],'Costa Rica':['America/Costa_Rica'],'Croatia':['Europe/Zagreb'],'Cuba':['America/Havana'],'Cyprus':['Asia/Nicosia'],'Czech Republic':['Europe/Prague'],"C\xc3\xb4te d'Ivoire":['Africa/Abidjan'],'Democratic Republic of the Congo':['Africa/Kinshasa','Africa/Lubumbashi'],'Denmark':['Europe/Copenhagen'],'Djibouti':['Africa/Djibouti'],'Dominica':['America/Dominica'],'Dominican Republic':['America/Santo_Domingo'],'East Timor':['Asia/Dili'],'Ecuador':['America/Guayaquil','Pacific/Galapagos'],'Egypt':['Africa/Cairo'],'El Salvador':['America/El_Salvador'],'Equatorial Guinea':['Africa/Malabo'],'Eritrea':['Africa/Asmera'],'Estonia':['Europe/Tallinn'],'Ethiopia':['Africa/Addis_Ababa'],'Federated States of Micronesia':['Pacific/Truk','Pacific/Ponape','Pacific/Kosrae'],'Fiji':['Pacific/Fiji'],'Finland':['Europe/Helsinki'],'France':['Europe/Paris'],'Gabon':['Africa/Libreville'],'Georgia':['Asia/Tbilisi'],'Germany':['Europe/Berlin'],'Ghana':['Africa/Accra'],'Greece':['Europe/Athens'],'Grenada':['America/Grenada'],'Guatemala':['America/Guatemala'],'Guinea':['Africa/Conakry'],'Guinea-Bissau':['Africa/Bissau'],'Guyana':['America/Guyana'],'Haiti':['America/Guatemala'],'Honduras':['America/Tegucigalpa'],'Hungary':['Europe/Budapest'],'Iceland':['Atlantic/Reykjavik'],'India':['Asia/Calcutta'],'Indonesia':['Asia/Jakarta','Asia/Pontianak','Asia/Makassar','Asia/Jayapura'],'Iran':['Asia/Tehran'],'Iraq':['Asia/Baghdad'],'Israel':['Asia/Jerusalem'],'Italy':['Europe/Rome'],'Jamaica':['America/Jamaica'],'Japan':['Asia/Tokyo'],'Jordan':['Asia/Amman'],'Kazakhstan':['Asia/Almaty','Asia/Qyzylorda','Asia/Aqtobe','Asia/Aqtau','Asia/Oral'],'Kenya':['Africa/Nairobi'],'Kingdom of the Netherlands':['Europe/Amsterdam'],'Kiribati':['Pacific/Tarawa','Pacific/Enderbury','Pacific/Kiritimati'],'Kuwait':['Asia/Kuwait'],'Kyrgyzstan':['Asia/Bishkek'],'Laos':['Asia/Vientiane'],'Latvia':['Europe/Riga'],'Lebanon':['Asia/Beirut'],'Lesotho':['Africa/Maseru'],'Liberia':['Africa/Monrovia'],'Libya':['Africa/Tripoli'],'Liechtenstein':['Europe/Vaduz'],'Lithuania':['Europe/Vilnius'],'Luxembourg':['Europe/Luxembourg'],'Macedonia':['Europe/Skopje'],'Madagascar':['Indian/Antananarivo'],'Malawi':['Africa/Blantyre'],'Malaysia':['Asia/Kuala_Lumpur','Asia/Kuching'],'Maldives':['Indian/Maldives'],'Mali':['Africa/Bamako'],'Malta':['Europe/Malta'],'Marshall Islands':['Pacific/Majuro','Pacific/Kwajalein'],'Mauritania':['Africa/Nouakchott'],'Mauritius':['Indian/Mauritius'],'Mexico':['America/Mexico_City','America/Cancun','America/Merida','America/Monterrey','America/Mazatlan','America/Chihuahua','America/Hermosillo','America/Tijuana'],'Moldova':['Europe/Chisinau'],'Monaco':['Europe/Monaco'],'Mongolia':['Asia/Ulaanbaatar','Asia/Hovd','Asia/Choibalsan'],'Montenegro':['Europe/Podgorica'],'Morocco':['Africa/Casablanca'],'Mozambique':['Africa/Maputo'],'Myanmar':['Asia/Rangoon'],'Namibia':['Africa/Windhoek'],'Nauru':['Pacific/Nauru'],'Nepal':['Asia/Katmandu'],'New Zealand':['Pacific/Auckland','Pacific/Chatham'],'Nicaragua':['America/Managua'],'Niger':['Africa/Niamey'],'Nigeria':['Africa/Lagos'],'North Korea':['Asia/Pyongyang'],'Norway':['Europe/Oslo'],'Oman':['Asia/Muscat'],'Pakistan':['Asia/Karachi'],'Palau':['Pacific/Palau'],'Panama':['America/Panama'],'Papua New Guinea':['Pacific/Port_Moresby'],'Paraguay':['America/Asuncion'],"People's Republic of China":['Asia/Shanghai','Asia/Harbin','Asia/Chongqing','Asia/Urumqi','Asia/Kashgar'],'Peru':['America/Lima'],'Philippines':['Asia/Manila'],'Poland':['Europe/Warsaw'],'Portugal':['Europe/Lisbon','Atlantic/Madeira','Atlantic/Azores'],'Qatar':['Asia/Qatar'],'Republic of Ireland':['Europe/Dublin'],'Republic of the Congo':['Africa/Brazzaville'],'Romania':['Europe/Bucharest'],'Russia':['Europe/Kaliningrad','Europe/Moscow','Europe/Volgograd','Europe/Samara','Asia/Yekaterinburg','Asia/Omsk','Asia/Novosibirsk','Asia/Krasnoyarsk','Asia/Irkutsk','Asia/Yakutsk','Asia/Vladivostok','Asia/Sakhalin','Asia/Magadan','Asia/Kamchatka','Asia/Anadyr'],'Rwanda':['Africa/Kigali'],'Saint Kitts and Nevis':['America/St_Kitts'],'Saint Lucia':['America/St_Lucia'],'Saint Vincent and the Grenadines':['America/St_Vincent'],'Samoa':['Pacific/Apia'],'San Marino':['Europe/San_Marino'],'Saudi Arabia':['Asia/Riyadh'],'Senegal':['Africa/Dakar'],'Serbia':['Europe/Belgrade'],'Seychelles':['Indian/Mahe'],'Sierra Leone':['Africa/Freetown'],'Singapore':['Asia/Singapore'],'Slovakia':['Europe/Bratislava'],'Slovenia':['Europe/Ljubljana'],'Solomon Islands':['Pacific/Guadalcanal'],'Somalia':['Africa/Mogadishu'],'South Africa':['Africa/Johannesburg'],'South Korea':['Asia/Seoul'],'Spain':['Europe/Madrid','Africa/Ceuta','Atlantic/Canary'],'Sri Lanka':['Asia/Colombo'],'Sudan':['Africa/Khartoum'],'Suriname':['America/Paramaribo'],'Swaziland':['Africa/Mbabane'],'Sweden':['Europe/Stockholm'],'Switzerland':['Europe/Zurich'],'Syria':['Asia/Damascus'],'S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe':['Africa/Sao_Tome'],'Tajikistan':['Asia/Dushanbe'],'Tanzania':['Africa/Dar_es_Salaam'],'Thailand':['Asia/Bangkok'],'The Gambia':['Africa/Banjul'],'Togo':['Africa/Lome'],'Tonga':['Pacific/Tongatapu'],'Trinidad and Tobago':['America/Port_of_Spain'],'Tunisia':['Africa/Tunis'],'Turkey':['Europe/Istanbul'],'Turkmenistan':['Asia/Ashgabat'],'Tuvalu':['Pacific/Funafuti'],'Uganda':['Africa/Kampala'],'Ukraine':['Europe/Kiev','Europe/Uzhgorod','Europe/Zaporozhye','Europe/Simferopol'],'United Arab Emirates':['Asia/Dubai'],'United Kingdom':['Europe/London'],'United States':['America/New_York','America/Detroit','America/Kentucky/Louisville','America/Kentucky/Monticello','America/Indiana/Indianapolis','America/Indiana/Marengo','America/Indiana/Knox','America/Indiana/Vevay','America/Chicago','America/Indiana/Vincennes','America/Indiana/Petersburg','America/Menominee','America/North_Dakota/Center','America/North_Dakota/New_Salem','America/Denver','America/Boise','America/Shiprock','America/Phoenix','America/Los_Angeles','America/Anchorage','America/Juneau','America/Yakutat','America/Nome','America/Adak','Pacific/Honolulu'],'Uruguay':['America/Montevideo'],'Uzbekistan':['Asia/Samarkand','Asia/Tashkent'],'Vanuatu':['Pacific/Efate'],'Vatican City':['Europe/Vatican'],'Venezuela':['America/Caracas'],'Vietnam':['Asia/Saigon'],'Yemen':['Asia/Aden'],'Zambia':['Africa/Lusaka'],'Zimbabwe':['Africa/Harare'],},});
View
29 public/js/kb_common.js
@@ -0,0 +1,29 @@
+
+/*
+ * erpnext/utilities/page/kb_common/kb_common.js
+ */
+KBItemToolbar=function(args,kb){$.extend(this,args);var me=this;this.make=function(){this.wrapper=$a(this.parent,'div','',{});this.line1=$a(this.wrapper,'div','',{color:'#888',fontSize:'11px',margin:'7px 0px'});this.make_timestamp();if(this.with_tags)
+this.make_tags();this.setup_del();}
+this.make_timestamp=function(){this.line1.innerHTML=repl('By %(name)s | %(when)s',{name:wn.utils.full_name(this.det.first_name,this.det.last_name),when:wn.datetime.comment_when(this.det.modified)});if(has_common(user_roles,['Administrator','System Manager'])){this.line1.innerHTML+=' | <a style="cursor:pointer;"\
+ class="del-link">delete</a>';}}
+this.make_tags=function(){this.line1.innerHTML+=' | '
+this.tags_area=$a(this.line1,'span','kb-tags')
+this.tags=new TagList(this.tags_area,this.det._user_tags&&(this.det._user_tags.split(',')),this.doctype,this.det.name,0,kb.set_tag_filter)}
+this.setup_del=function(){$(this.line1).find('.del-link').click(function(){console.log(1);this.innerHTML='deleting...';this.disabled=1;$c_page('utilities','questions','delete',{dt:me.doctype,dn:me.det.name},function(r,rt){kb.list.run()});});}
+this.make();}
+EditableText=function(args){$.extend(this,args);var me=this;me.$w=$(repl('<div class="ed-text">\
+ <div class="ed-text-display %(disp_class)s"></div>\
+ <a class="ed-text-edit" style="cursor: pointer; float: right; margin-top: -16px;">[edit]</a>\
+ <textarea class="ed-text-input %(inp_class)s hide"></textarea>\
+ <div class="help hide"><br>Formatted as <a href="http://en.wikipedia.org/wiki/Markdown#Syntax_examples"\
+ target="_blank">markdown</a></div>\
+ <button class="btn btn-small btn-info hide ed-text-save">Save</button>\
+ <a class="ed-text-cancel hide" style="cursor: pointer;">Cancel</a>\
+ </div>',args)).appendTo(me.parent);this.set_display=function(txt){me.$w.find('.ed-text-display').html(wn.markdown(txt));me.text=txt;}
+this.set_display(me.text);if(me.height)me.$w.find('.ed-text-input').css('height',me.height);me.$w.find('.ed-text-edit').click(function(){me.$w.find('.ed-text-input').val(me.text);me.show_as_input();})
+me.$w.find('.ed-text-save').click(function(){var v=me.$w.find('.ed-text-input').val();if(!v){msgprint('Please write something!');return;}
+var btn=this;$(btn).set_working();$c_page('utilities','question_view','update_item',{dt:me.dt,dn:me.dn,fn:me.fieldname,text:v},function(r){$(btn).done_working();if(r.exc){msgprint(r.exc);return;}
+me.set_display(v);me.show_as_text();});})
+me.$w.find('.ed-text-cancel').click(function(){me.show_as_text();})
+this.show_as_text=function(){me.$w.find('.ed-text-display, .ed-text-edit').toggle(true);me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(false);}
+this.show_as_input=function(){me.$w.find('.ed-text-display, .ed-text-edit').toggle(false);me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(true);}}
View
7 public/js/product_category.js
@@ -0,0 +1,7 @@
+
+/*
+ * erpnext/website/js/product_category.js
+ */
+erpnext.make_product_categories=function(wrapper){wrapper.category_list=new wn.ui.Listing({parent:$(wrapper).find('.more-categories').get(0),query:'select count(name) as items, item_group \
+ from tabItem where is_sales_item="Yes" \
+ group by item_group order by items desc',hide_refresh:true,render_row:function(parent,data){parent.innerHTML=repl('<a href="#!products/%(item_group)s">%(item_group)s</a> (%(items)s)',data);}});wrapper.category_list.run();}
View
122 public/js/wn-web.js
@@ -1 +1,121 @@
-window.home_page = "Login Page";
+window.home_page = "home";
+// footer signup widget
+// automatically adds it to the .layout-main div of the page
+// adds events and also random goodies.
+
+erpnext.set_request_signup = function(page_name) {
+
+ // goodies
+ var goodies = [
+ "ERPNext also contains a module to build your website. \
+ The way it works is, when you log out, the app becomes your website. \
+ This website is generated from ERPNext.",
+
+ "You can add custom fields to your transactions in ERPNext to \
+ capture specific information about your business.",
+
+ "All forms in ERPNext can be customized, if you feel there are \
+ features you do not want to use, you can hide them.",
+
+ "You can email transactions like Quotations and Invoices directly \
+ from the system. You can also set this process to become automatic",
+
+ "You can create your own Roles and assign user to those roles. \
+ You can also set detailed permissions for each role in transactions.",
+
+ "ERPNext allows you to assign any transaction like an Invoice \
+ or Customer Issue to a user. You can also add comments on any \
+ transaction.",
+
+ "Stay on top with a daily, weekly or montly email summarizing all your business\
+ activites and accounting data like Income, Receivables, Paybles etc.",
+
+ "Integrate incoming Support queries to your email into ERPNext. \
+ Keep track of open tickets and allocate tickets to your users."
+
+ ];
+
+
+ // add the footer
+
+ $('#page-' + page_name + ' .layout-main').append('<div class="page-footer">\
+<h2 style="padding: 0px">Try before you buy. \
+Request a 30-day Free Trial.</h2>\
+<ul>\
+<li><a href="erpnext-pricing.html">Starts at an un-believable $299 per year.</a>\
+<li><a href="http://demo.erpnext.com" target="_blank">\
+Show me a full demo (new page).</a>\
+<li><a href="sign-up.html">Take me to the sign-up page.</a>\
+</ul>\
+<p>\
+<i class="icon-hand-right"></i> <b>ERPNext Goodies:</b> <span class="goodie">'
+
++ goodies[parseInt(Math.random() * goodies.length)]+
+
+'</goodie></p>\
+<p>ERPNext is <a href="open-source.html">Open Source</a> under the GNU/General Public License.</p>\
+<p><g:plusone size="medium" annotation="inline"></g:plusone></p>\
+\
+<table><tr><td style="width: 115px">\
+ <a href="https://twitter.com/erpnext" class="twitter-follow-button" \
+ data-show-count="false">Follow @erpnext</a></td>\
+ <td style="width: 150px; font-size: 80%; vertical-align: middle;">\
+ Get status updates on Twitter.</td></tr>\
+</table>');
+
+ // render plusone
+ window.gapi && window.gapi.plusone.go();
+
+ // render twitter button
+ twttr.widgets.load();
+}
+
+//////////////// Hide Login for frappe!
+
+$(document).ready(function() {
+ setTimeout("$('#login-topbar-item').toggle(false);", 1000);
+});
+
+//////////////// Analytics
+
+window._gaq = window._gaq || [];
+window._gaq.push(['_setAccount', 'UA-8911157-1']);
+window._gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+
+
+/////////////// Page view
+
+$(window).bind('hashchange', function() {
+ window._gaq.push(['_trackPageview', wn.get_route_str()]);
+});
+
+/////////////// Update conversion
+
+erpnext.update_conversion = function() {
+ $('body').append('<div style="display:inline;">\
+<img height="1" width="1" style="border-style:none;" alt="" \
+src="http://www.googleadservices.com/pagead/conversion/1032834481/?label=JvAUCLX41gEQsZu_7AM&amp;guid=ON&amp;script=0"/>\
+</div>')
+};
+
+////////////// Plus One
+
+(function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+})();
+
+////////////// Twitter
+
+(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
+if(!d.getElementById(id)){js=d.createElement(s);js.id=id;
+js.src="//platform.twitter.com/widgets.js";
+fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs");
+
Please sign in to comment.
Something went wrong with that request. Please try again.