From 548a45d550ae051b489d0a89bde183f53c92e063 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 11 Jul 2012 18:40:48 +0530 Subject: [PATCH 1/2] Hong kong timezone added --- erpnext/startup/js/complete_setup.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js index 9180dfa1197..ff512827e6e 100644 --- a/erpnext/startup/js/complete_setup.js +++ b/erpnext/startup/js/complete_setup.js @@ -138,7 +138,7 @@ $.extend(erpnext.complete_setup, { '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', + 'Grenada', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras', 'Hong Kong' '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', @@ -147,7 +147,7 @@ $.extend(erpnext.complete_setup, { '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', + 'Paraguay', "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', @@ -252,6 +252,11 @@ $.extend(erpnext.complete_setup, { 'Cape Verde': ['Atlantic/Cape_Verde'], 'Central African Republic': ['Africa/Bangui'], 'Chad': ['Africa/Ndjamena'], + 'China': ['Asia/Shanghai', + 'Asia/Harbin', + 'Asia/Chongqing', + 'Asia/Urumqi', + 'Asia/Kashgar'], 'Chile': ['America/Santiago', 'Pacific/Easter'], 'Colombia': ['America/Bogota'], 'Comoros': ['Indian/Comoro'], @@ -292,6 +297,7 @@ $.extend(erpnext.complete_setup, { 'Guyana': ['America/Guyana'], 'Haiti': ['America/Guatemala'], 'Honduras': ['America/Tegucigalpa'], + 'Hong Kong': ['Asia/Hong_Kong'], 'Hungary': ['Europe/Budapest'], 'Iceland': ['Atlantic/Reykjavik'], 'India': ['Asia/Calcutta'], @@ -365,11 +371,6 @@ $.extend(erpnext.complete_setup, { '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'], From 179f01af17f45a0e2f4324a4a791b2f1686dad3d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 12 Jul 2012 11:03:39 +0530 Subject: [PATCH 2/2] hong kong added in country list --- erpnext/startup/js/complete_setup.js | 2 +- public/css/all-app.css | 27 +---- public/css/all-web.css | 22 +--- public/js/all-app.js | 165 ++++++++++++++------------- public/js/all-web.js | 19 ++- public/js/complete_setup.js | 2 +- public/js/fields.js | 9 +- public/js/report-legacy.js | 2 +- 8 files changed, 115 insertions(+), 133 deletions(-) diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js index ff512827e6e..83d65671c0e 100644 --- a/erpnext/startup/js/complete_setup.js +++ b/erpnext/startup/js/complete_setup.js @@ -138,7 +138,7 @@ $.extend(erpnext.complete_setup, { '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', 'Hong Kong' + 'Grenada', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras', 'Hong Kong', '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', diff --git a/public/css/all-app.css b/public/css/all-app.css index ecdbe652f93..84ac2758c38 100644 --- a/public/css/all-app.css +++ b/public/css/all-app.css @@ -2314,11 +2314,6 @@ div.form-title { border-bottom: 1px solid #eee; } -.appframe-titlebar .label { - vertical-align: middle; - margin-right: 7px; -} - div.form-section-head { margin: 11px -15px 3px -15px; border-top: 1px solid #ccc; @@ -3219,8 +3214,6 @@ div.stat-item { height: 18px; border: 1px solid #aaa; border-radius: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; overflow: hidden; } @@ -3229,10 +3222,6 @@ div.stat-bar { left: 0px; height: 100%; z-index: 0; - /* So that this div is also curved like the enclosing one */ - border-radius: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; background: #e0ff84; /* Old browsers */ background: -moz-linear-gradient(top, #e0ff84 0%, #a4e567 100%); /* FF3.6+ */ @@ -3248,8 +3237,12 @@ div.stat-bar { * lib/css/ui/views.css */ -.breadcrumb-area, .breadcrumb-area span { - vertical-align: middle; +.breadcrumbs { + color: #000000; +} + +.breadcrumbs a { + color: #000000; } div.appframe-titlebar { @@ -3267,14 +3260,6 @@ div.appframe-titlebar { border-radius: 5px 5px 0px 0px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; - - text-shadow: 0px 1px 1px #fff; - color: #555; -} - -span.appframe-title { - font-size: 160%; - font-weight: bold; } div.appframe-toolbar { diff --git a/public/css/all-web.css b/public/css/all-web.css index 332471b01b8..ec2fbcd333f 100644 --- a/public/css/all-web.css +++ b/public/css/all-web.css @@ -2470,8 +2470,6 @@ div.stat-item { height: 18px; border: 1px solid #aaa; border-radius: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; overflow: hidden; } @@ -2480,10 +2478,6 @@ div.stat-bar { left: 0px; height: 100%; z-index: 0; - /* So that this div is also curved like the enclosing one */ - border-radius: 9px; - -webkit-border-radius: 9px; - -moz-border-radius: 9px; background: #e0ff84; /* Old browsers */ background: -moz-linear-gradient(top, #e0ff84 0%, #a4e567 100%); /* FF3.6+ */ @@ -2499,8 +2493,12 @@ div.stat-bar { * lib/css/ui/views.css */ -.breadcrumb-area, .breadcrumb-area span { - vertical-align: middle; +.breadcrumbs { + color: #000000; +} + +.breadcrumbs a { + color: #000000; } div.appframe-titlebar { @@ -2518,14 +2516,6 @@ div.appframe-titlebar { border-radius: 5px 5px 0px 0px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; - - text-shadow: 0px 1px 1px #fff; - color: #555; -} - -span.appframe-title { - font-size: 160%; - font-weight: bold; } div.appframe-toolbar { diff --git a/public/js/all-app.js b/public/js/all-app.js index fd55b1684cc..691727aa3af 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -249,7 +249,7 @@ throw new SyntaxError('JSON.parse');};}}()); * lib/js/wn/router.js */ wn.re_route={} -wn.route=function(){if(wn.re_route[window.location.hash]){var re_route_val=wn.get_route_str(wn.re_route[window.location.hash]);var cur_route_val=wn.get_route_str(wn._cur_route);if(decodeURIComponent(re_route_val)===decodeURIComponent(cur_route_val)){window.history.back();return;}else{window.location.hash=wn.re_route[window.location.hash];}} +wn.route=function(){if(wn.re_route[window.location.hash]){window.location.hash=wn.re_route[window.location.hash];} wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');} wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;case"Report2":wn.views.reportview2.show();break;default:wn.views.pageview.show(route[0]);}} wn.get_route=function(route){if(!wn.boot){return[window.page_name];} @@ -350,8 +350,7 @@ df.original_type=df.fieldtype;df.description='';df.reqd=0;if(fieldtype){df.field if(df.fieldtype=='Check'){df.fieldtype='Select';df.options='No\nYes';}else if(['Text','Text Editor','Code','Link'].indexOf(df.fieldtype)!=-1){df.fieldtype='Data';}},set_default_condition:function(df,fieldtype){if(!fieldtype){if(df.fieldtype=='Data'){this.$w.find('.condition').val('like');}else{this.$w.find('.condition').val('=');}}},get_value:function(){var me=this;var val=me.field.get_value();var cond=me.$w.find('.condition').val();if(me.field.df.original_type=='Check'){val=(val=='Yes'?1:0);} if(cond=='like'){val=val+'%';} return[me.fieldselect.$select.find('option:selected').attr('table'),me.field.df.fieldname,me.$w.find('.condition').val(),cstr(val)];}});wn.ui.FieldSelect=Class.extend({init:function(parent,doctype,filter_fields,with_blank){this.doctype=doctype;this.fields_by_name={};this.with_blank=with_blank;this.$select=$('').appendTo(parent);if(filter_fields){for(var i in filter_fields) -this.add_field_option(this.filter_fields[i])}else{this.build_options();}},build_options:function(){var me=this;me.table_fields=[];var std_filters=[{fieldname:'name',fieldtype:'Data',label:'ID',parent:me.doctype},{fieldname:'modified',fieldtype:'Date',label:'Last Modified',parent:me.doctype},{fieldname:'owner',fieldtype:'Data',label:'Created By',parent:me.doctype},{fieldname:'creation',fieldtype:'Date',label:'Created On',parent:me.doctype},{fieldname:'_user_tags',fieldtype:'Data',label:'Tags',parent:me.doctype},{fieldname:'docstatus',fieldtype:'Int',label:'Doc Status',parent:me.doctype},];var doctype_obj=locals['DocType'][me.doctype];if(doctype_obj&&cint(doctype_obj.istable)){std_filters=std_filters.concat([{fieldname:'parent',fieldtype:'Data',label:'Parent',parent:me.doctype}]);} -if(this.with_blank){this.$select.append($('