Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
This commit is contained in:
commit
2ab4451d1b
@ -1260,7 +1260,7 @@ button.btn.small, input[type="submit"].btn.small {
|
||||
}
|
||||
|
||||
.icon-white {
|
||||
background-image: url("./lib/images/icons/glyphicons-halflings-white.png");
|
||||
background-image: url("../lib/images/icons/glyphicons-halflings-white.png");
|
||||
}
|
||||
|
||||
.icon-glass {
|
||||
|
@ -1217,7 +1217,7 @@ button.btn.small, input[type="submit"].btn.small {
|
||||
}
|
||||
|
||||
.icon-white {
|
||||
background-image: url("./lib/images/icons/glyphicons-halflings-white.png");
|
||||
background-image: url("../lib/images/icons/glyphicons-halflings-white.png");
|
||||
}
|
||||
|
||||
.icon-glass {
|
||||
|
@ -19,14 +19,12 @@
|
||||
wn.provide('erpnext.complete_setup');
|
||||
|
||||
$.extend(erpnext.complete_setup, {
|
||||
|
||||
show: function() {
|
||||
d = erpnext.complete_setup.prepare_dialog();
|
||||
d.show();
|
||||
},
|
||||
|
||||
prepare_dialog: function() {
|
||||
|
||||
prepare_dialog: function() {
|
||||
var d = new wn.widgets.Dialog({
|
||||
title: "Setup",
|
||||
fields: [
|
||||
@ -46,11 +44,11 @@ $.extend(erpnext.complete_setup, {
|
||||
{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'},
|
||||
options: '', fieldtype: 'Select'},
|
||||
{fieldname:'update', label:'Setup',fieldtype:'Button'},
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
if(user != 'Administrator'){
|
||||
$(d.appframe.$titlebar).find('.close').toggle(false); // Hide close image
|
||||
$('header').toggle(false); // hide toolbar
|
||||
@ -160,319 +158,319 @@ $.extend(erpnext.complete_setup, {
|
||||
'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']
|
||||
},
|
||||
'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'],
|
||||
},
|
||||
});
|
@ -43,25 +43,7 @@ erpnext.toolbar.setup = function() {
|
||||
$('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
|
||||
Live Chat (Office Hours)</a></li>')
|
||||
|
||||
$.extend(wn.container.wntoolbar, {
|
||||
set_new_comments: function(new_comments) {
|
||||
var navbar_nc = $('.navbar-new-comments');
|
||||
if(new_comments && new_comments.length>0) {
|
||||
navbar_nc.text(new_comments.length);
|
||||
navbar_nc.addClass('navbar-new-comments-true')
|
||||
$.each(new_comments, function(i, v) {
|
||||
var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "..."));
|
||||
var id = v[0].replace('/', '-');
|
||||
if(!$('#' + id)[0]) { show_alert(msg, id); }
|
||||
})
|
||||
} else {
|
||||
navbar_nc.removeClass('navbar-new-comments-true');
|
||||
navbar_nc.text(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
wn.container.wntoolbar.set_new_comments();
|
||||
erpnext.toolbar.set_new_comments();
|
||||
}
|
||||
|
||||
erpnext.toolbar.add_modules = function() {
|
||||
@ -73,8 +55,9 @@ erpnext.toolbar.add_modules = function() {
|
||||
</li>').prependTo('.navbar .nav:first');
|
||||
|
||||
// if no modules list then show all
|
||||
if(wn.boot.modules_list)
|
||||
wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
|
||||
if(wn.boot.modules_list && typeof(wn.boot.modules_list) == 'string') {
|
||||
wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
|
||||
}
|
||||
else
|
||||
wn.boot.modules_list = keys(erpnext.modules).sort();
|
||||
|
||||
@ -108,3 +91,19 @@ erpnext.toolbar.add_modules = function() {
|
||||
|
||||
}
|
||||
|
||||
erpnext.toolbar.set_new_comments = function(new_comments) {
|
||||
var navbar_nc = $('.navbar-new-comments');
|
||||
if(new_comments && new_comments.length>0) {
|
||||
navbar_nc.text(new_comments.length);
|
||||
navbar_nc.addClass('navbar-new-comments-true')
|
||||
$.each(new_comments, function(i, v) {
|
||||
var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "..."));
|
||||
var id = v[0].replace('/', '-');
|
||||
if(!$('#' + id)[0]) { show_alert(msg, id); }
|
||||
})
|
||||
} else {
|
||||
navbar_nc.removeClass('navbar-new-comments-true');
|
||||
navbar_nc.text(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ erpnext.startup.start = function() {
|
||||
|
||||
// setup toolbar
|
||||
erpnext.toolbar.setup();
|
||||
|
||||
|
||||
// set interval for updates
|
||||
erpnext.startup.set_periodic_updates();
|
||||
|
||||
@ -93,7 +93,6 @@ erpnext.startup.start = function() {
|
||||
wn.require("erpnext/startup/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);
|
||||
@ -111,6 +110,7 @@ erpnext.startup.start = function() {
|
||||
</div>', { expiry_string: expiry_string }));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
erpnext.set_about();
|
||||
@ -144,7 +144,7 @@ var update_messages = function(reset) {
|
||||
var set_messages = function(r) {
|
||||
if(!r.exc) {
|
||||
// This function is defined in toolbar.js
|
||||
wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
|
||||
erpnext.toolbar.set_new_comments(r.message.unread_messages);
|
||||
|
||||
var show_in_circle = function(parent_id, msg) {
|
||||
var parent = $('#'+parent_id);
|
||||
@ -174,7 +174,7 @@ var update_messages = function(reset) {
|
||||
});
|
||||
|
||||
} else {
|
||||
wn.container.wntoolbar.set_new_comments(0);
|
||||
erpnext.toolbar.set_new_comments(0);
|
||||
$('#unread_messages').toggle(false);
|
||||
}
|
||||
}
|
||||
|
@ -927,7 +927,7 @@ if(this.df.options=='attach_files:'){this.file_attach=true;}}
|
||||
this.set_as_single=function(){var i=this.input;i.multiple=false;i.style.height=null;if(i.lab)$dh(i.lab)}
|
||||
this.refresh_options=function(options){if(options)
|
||||
me.df.options=options;if(this.file_attach)
|
||||
this.set_attach_options();me.options_list=me.df.options?me.df.options.split('\n'):[];empty_select(this.input);if(me.in_filter&&me.options_list[0]!=''){me.options_list=add_lists([''],me.options_list);}
|
||||
this.set_attach_options();me.options_list=me.df.options?me.df.options.split('\n'):[''];empty_select(this.input);if(me.in_filter&&me.options_list[0]!=''){me.options_list=add_lists([''],me.options_list);}
|
||||
add_sel_options(this.input,me.options_list);}
|
||||
this.onrefresh=function(){this.refresh_options();if(this.not_in_form){this.input.value='';return;}
|
||||
if(_f.get_value)
|
||||
@ -1396,9 +1396,7 @@ wn.ui.toolbar.RecentDocs=Class.extend({init:function(){$('.navbar .nav:first').a
|
||||
</li>');this.setup();this.bind_events();},bind_events:function(){var me=this;$(document).bind('rename',function(event,dt,old_name,new_name){me.rename_notify(dt,old_name,new_name)});},rename_notify:function(dt,old,name){this.remove(dt,old);this.add(dt,name,1);},add:function(dt,dn,on_top){if(this.istable(dt))return;this.remove(dt,dn);var html=repl('<li data-docref="%(dt)s/%(dn)s">\
|
||||
<a href="#Form/%(dt)s/%(dn)s">\
|
||||
%(dn)s <span style="font-size: 10px">(%(dt)s)</span>\
|
||||
</a></li>',{dt:dt,dn:dn});if(on_top){$('#toolbar-recent').prepend(html);}else{$('#toolbar-recent').append(html);}},istable:function(dt){return locals.DocType[dt]&&locals.DocType[dt].istable||false;},remove:function(dt,dn){$(repl('#toolbar-recent li[data-docref="%(dt)s/%(dn)s"]',{dt:dt,dn:dn})).remove();},setup:function(){try{var rlist=JSON.parse(profile.recent);}
|
||||
catch(e){return;}
|
||||
var m=rlist.length;if(m>15)m=15;for(var i=0;i<m;i++){var rd=rlist[i]
|
||||
</a></li>',{dt:dt,dn:dn});if(on_top){$('#toolbar-recent').prepend(html);}else{$('#toolbar-recent').append(html);}},istable:function(dt){return locals.DocType[dt]&&locals.DocType[dt].istable||false;},remove:function(dt,dn){$(repl('#toolbar-recent li[data-docref="%(dt)s/%(dn)s"]',{dt:dt,dn:dn})).remove();},setup:function(){var rlist=JSON.parse(profile.recent||"[]");var m=rlist.length;if(m>15)m=15;for(var i=0;i<m;i++){var rd=rlist[i]
|
||||
if(rd[1]){var dt=rd[0];var dn=rd[1];this.add(dt,dn,0);}}}});
|
||||
/*
|
||||
* lib/js/wn/ui/toolbar/toolbar.js
|
||||
@ -1612,7 +1610,7 @@ if(this.df.options=='attach_files:'){this.file_attach=true;}}
|
||||
this.set_as_single=function(){var i=this.input;i.multiple=false;i.style.height=null;if(i.lab)$dh(i.lab)}
|
||||
this.refresh_options=function(options){if(options)
|
||||
me.df.options=options;if(this.file_attach)
|
||||
this.set_attach_options();me.options_list=me.df.options?me.df.options.split('\n'):[];empty_select(this.input);if(me.in_filter&&me.options_list[0]!=''){me.options_list=add_lists([''],me.options_list);}
|
||||
this.set_attach_options();me.options_list=me.df.options?me.df.options.split('\n'):[''];empty_select(this.input);if(me.in_filter&&me.options_list[0]!=''){me.options_list=add_lists([''],me.options_list);}
|
||||
add_sel_options(this.input,me.options_list);}
|
||||
this.onrefresh=function(){this.refresh_options();if(this.not_in_form){this.input.value='';return;}
|
||||
if(_f.get_value)
|
||||
@ -2220,7 +2218,7 @@ $(favicon).appendTo('head');}})
|
||||
/*
|
||||
* js/app.js
|
||||
*/
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number});}
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2'});}
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
|
||||
<i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
/*
|
||||
@ -2247,9 +2245,9 @@ else if(nm=='Accounts Browser')
|
||||
pscript.make_chart(chart_type);}
|
||||
loadpage(nm,call_back);}
|
||||
var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
|
||||
if(!reset){var set_messages=function(r){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||
if(!reset){var set_messages=function(r){if(!r.exc){erpnext.toolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||
show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}}
|
||||
wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||
wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{erpnext.toolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||
wn.updates.id=setInterval(update_messages,60000);}
|
||||
erpnext.set_user_background=function(src){set_style(repl('#body_div { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||
@ -2280,15 +2278,14 @@ $('#toolbar-help').append('<li><a href="http://groups.google.com/group/erpnext-u
|
||||
Forum</a></li>')
|
||||
$('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
|
||||
Live Chat (Office Hours)</a></li>')
|
||||
$.extend(wn.container.wntoolbar,{set_new_comments:function(new_comments){var navbar_nc=$('.navbar-new-comments');if(new_comments&&new_comments.length>0){navbar_nc.text(new_comments.length);navbar_nc.addClass('navbar-new-comments-true')
|
||||
$.each(new_comments,function(i,v){var msg='New Message: '+(v[1].length<=100?v[1]:(v[1].substr(0,100)+"..."));var id=v[0].replace('/','-');if(!$('#'+id)[0]){show_alert(msg,id);}})}else{navbar_nc.removeClass('navbar-new-comments-true');navbar_nc.text(0);}}});wn.container.wntoolbar.set_new_comments();}
|
||||
erpnext.toolbar.set_new_comments();}
|
||||
erpnext.toolbar.add_modules=function(){$('<li class="dropdown">\
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#"\
|
||||
onclick="return false;">Modules<b class="caret"></b></a>\
|
||||
<ul class="dropdown-menu modules">\
|
||||
</ul>\
|
||||
</li>').prependTo('.navbar .nav:first');if(wn.boot.modules_list)
|
||||
wn.boot.modules_list=JSON.parse(wn.boot.modules_list);else
|
||||
</li>').prependTo('.navbar .nav:first');if(wn.boot.modules_list&&typeof(wn.boot.modules_list)=='string'){wn.boot.modules_list=JSON.parse(wn.boot.modules_list);}
|
||||
else
|
||||
wn.boot.modules_list=keys(erpnext.modules).sort();for(var i in wn.boot.modules_list){var m=wn.boot.modules_list[i]
|
||||
if(m!='Setup'&&wn.boot.profile.allow_modules.indexOf(m)!=-1){args={module:m,module_page:erpnext.modules[m],module_label:m=='HR'?'Human Resources':m}
|
||||
$('.navbar .modules').append(repl('<li><a href="#!%(module_page)s" \
|
||||
@ -2297,6 +2294,8 @@ if(user_roles.indexOf("Accounts Manager")!=-1){$('.navbar .modules').append('<li
|
||||
data-module="Dashboard">Dashboard</a></li>');}
|
||||
if(user_roles.indexOf("System Manager")!=-1){$('.navbar .modules').append('<li class="divider"></li>\
|
||||
<li><a href="#!Setup" data-module="Setup">Setup</a></li>');}}
|
||||
erpnext.toolbar.set_new_comments=function(new_comments){var navbar_nc=$('.navbar-new-comments');if(new_comments&&new_comments.length>0){navbar_nc.text(new_comments.length);navbar_nc.addClass('navbar-new-comments-true')
|
||||
$.each(new_comments,function(i,v){var msg='New Message: '+(v[1].length<=100?v[1]:(v[1].substr(0,100)+"..."));var id=v[0].replace('/','-');if(!$('#'+id)[0]){show_alert(msg,id);}})}else{navbar_nc.removeClass('navbar-new-comments-true');navbar_nc.text(0);}}
|
||||
/*
|
||||
* erpnext/startup/js/feature_setup.js
|
||||
*/
|
||||
|
@ -829,7 +829,7 @@ $(favicon).appendTo('head');}})
|
||||
/*
|
||||
* js/app.js
|
||||
*/
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number});}
|
||||
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2'});}
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
|
||||
<i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
/*
|
||||
@ -856,9 +856,9 @@ else if(nm=='Accounts Browser')
|
||||
pscript.make_chart(chart_type);}
|
||||
loadpage(nm,call_back);}
|
||||
var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
|
||||
if(!reset){var set_messages=function(r){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||
if(!reset){var set_messages=function(r){if(!r.exc){erpnext.toolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||
show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}}
|
||||
wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||
wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{erpnext.toolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||
wn.updates.id=setInterval(update_messages,60000);}
|
||||
erpnext.set_user_background=function(src){set_style(repl('#body_div { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||
|
@ -7,7 +7,7 @@ erpnext.set_about = function() {
|
||||
source: 'https://github.com/webnotes/erpnext',
|
||||
publisher: 'Web Notes Technologies Pvt Ltd, Mumbai',
|
||||
copyright: '© Web Notes Technologies Pvt Ltd',
|
||||
version: '2.' + window._version_number
|
||||
version: '2' //+ '.' + window._version_number
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user