merge
This commit is contained in:
commit
bb8bf194a7
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:17',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-02-27 18:42:06',
|
||||
'modified': '2012-03-02 14:39:34',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 43
|
||||
'version': 44
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -104,6 +104,7 @@
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate ',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
@ -114,6 +115,7 @@
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Discount %',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
@ -150,6 +152,7 @@
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate *',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:20',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-01 18:43:30',
|
||||
'modified': '2012-03-02 14:37:42',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 26
|
||||
'version': 27
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -85,15 +85,6 @@
|
||||
'width': u'200px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'UOM',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -107,6 +98,15 @@
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'UOM',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:12',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-02-27 14:47:48',
|
||||
'modified': '2012-03-02 14:36:13',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 62
|
||||
'version': 63
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -124,7 +124,8 @@
|
||||
'fieldname': u'import_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate ',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -134,6 +135,7 @@
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Discount %',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
@ -168,7 +170,8 @@
|
||||
'fieldname': u'purchase_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate *',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
|
@ -48,12 +48,13 @@ erpnext.ActivityFeed = Class.extend({
|
||||
var date = dateutil.str_to_obj(data.modified);
|
||||
var last = erpnext.last_feed_date;
|
||||
|
||||
if((last && dateutil.get_diff(last, date)>1) || (!last)) {
|
||||
var pdate = dateutil.comment_when(date);
|
||||
var diff = dateutil.get_diff(new Date(), date);
|
||||
if((last && dateutil.obj_to_str(last) != dateutil.obj_to_str(date)) || (!last)) {
|
||||
var diff = dateutil.get_day_diff(new Date(), date);
|
||||
if(diff < 1) {
|
||||
pdate = 'Today';
|
||||
} else if(diff > 6) {
|
||||
} else if(diff < 2) {
|
||||
pdate = 'Yesterday';
|
||||
} else {
|
||||
pdate = dateutil.global_date_format(date);
|
||||
}
|
||||
$(row).html(repl('<div class="date-sep">%(date)s</div>', {date: pdate}));
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:18',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-02-24 13:21:21',
|
||||
'modified': '2012-03-02 14:40:25',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 30
|
||||
'version': 31
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -90,6 +90,24 @@
|
||||
'width': u'300px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'qty',
|
||||
'fieldtype': u'Currency',
|
||||
'in_filter': 0,
|
||||
'label': u'Quantity',
|
||||
'oldfieldname': u'qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
@ -116,7 +134,7 @@
|
||||
'oldfieldname': u'adj_rate',
|
||||
'oldfieldtype': u'Float',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'print_hide': 1,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
},
|
||||
@ -139,24 +157,6 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'qty',
|
||||
'fieldtype': u'Currency',
|
||||
'in_filter': 0,
|
||||
'label': u'Quantity',
|
||||
'oldfieldname': u'qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'reqd': 1,
|
||||
'search_index': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:21',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-02 12:19:01',
|
||||
'modified': '2012-03-02 14:34:02',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': u'1330593645',
|
||||
'_last_update': u'1330670942',
|
||||
'allow_attach': 0,
|
||||
'colour': u'White:FFF',
|
||||
'default_print_format': u'Standard',
|
||||
@ -38,7 +38,7 @@
|
||||
'show_in_menu': 0,
|
||||
'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
|
||||
'tag_fields': u'delivery_status,billing_status',
|
||||
'version': 630
|
||||
'version': 631
|
||||
},
|
||||
|
||||
# These values are common for all DocFormat
|
||||
@ -392,6 +392,7 @@
|
||||
'oldfieldtype': u'Select',
|
||||
'options': u'\nSales\nMaintenance',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:22',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-02-24 10:38:06',
|
||||
'modified': '2012-03-02 15:49:26',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 49
|
||||
'version': 53
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -117,18 +117,15 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'ref_rate',
|
||||
'fieldname': u'base_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Price List Rate',
|
||||
'oldfieldname': u'ref_rate',
|
||||
'label': u'Price List Rate*',
|
||||
'oldfieldname': u'base_ref_rate',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'70px'
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -146,49 +143,6 @@
|
||||
'width': u'70px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'export_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Rate',
|
||||
'oldfieldname': u'export_rate',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'reqd': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'export_amount',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Amount',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'export_amount',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1,
|
||||
'reqd': 0,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'base_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Price List Rate*',
|
||||
'oldfieldname': u'base_ref_rate',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
@ -221,6 +175,52 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Price List Rate',
|
||||
'oldfieldname': u'ref_rate',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'70px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'export_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Rate',
|
||||
'oldfieldname': u'export_rate',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'reqd': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'export_amount',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Amount',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'export_amount',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1,
|
||||
'reqd': 0,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -398,41 +398,6 @@
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'required for production. will be used later.',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'delivery_date',
|
||||
'fieldtype': u'Date',
|
||||
'hidden': 1,
|
||||
'label': u'Expected Delivery Date',
|
||||
'oldfieldname': u'delivery_date',
|
||||
'oldfieldtype': u'Date',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'allow_on_submit': 1,
|
||||
'colour': u'White:FFF',
|
||||
'description': u'required for production. will be used later.',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'confirmation_date',
|
||||
'fieldtype': u'Date',
|
||||
'hidden': 0,
|
||||
'in_filter': 1,
|
||||
'label': u'Confirmed Delivery Date',
|
||||
'oldfieldname': u'confirmation_date',
|
||||
'oldfieldtype': u'Date',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'report_hide': 1,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
|
@ -48,7 +48,7 @@ def on_login_post_session(login_manager):
|
||||
sid!=%s""", \
|
||||
(webnotes.session['user'], webnotes.session['sid']), as_list=1)
|
||||
|
||||
if webnotes.session['user'] not in ('Guest') and webnotes.conn.cur_db_name!='accounts':
|
||||
if webnotes.session['user'] not in ('Guest', 'demo@webnotestech.com') and webnotes.conn.cur_db_name!='accounts':
|
||||
# create feed
|
||||
from webnotes.utils import nowtime
|
||||
home.make_feed('Login', 'Profile', login_manager.user, login_manager.user,
|
||||
|
@ -128,7 +128,7 @@ pscript.feature_dict = {
|
||||
'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['ref_rate','export_amount','export_rate']},
|
||||
'Item': {'ref_rate_details':['ref_currency']},
|
||||
'Sales BOM': {'fields':['currency']},
|
||||
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','export_amount','export_rate']}
|
||||
'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['ref_rate','export_amount','export_rate']}
|
||||
},
|
||||
'fs_imports': {
|
||||
'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['import_amount','import_rate']},
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
'creation': '2010-08-08 17:09:16',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-02-27 18:43:39',
|
||||
'modified': '2012-03-02 14:38:56',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 74
|
||||
'version': 75
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -95,6 +95,7 @@
|
||||
'oldfieldname': u'received_qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
@ -125,6 +126,7 @@
|
||||
'oldfieldname': u'rejected_qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'search_index': 0,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
@ -136,7 +138,8 @@
|
||||
'fieldname': u'import_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate ',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -145,7 +148,8 @@
|
||||
'fieldname': u'discount_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Discount %',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -181,7 +185,8 @@
|
||||
'fieldname': u'purchase_ref_rate',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Ref Rate *',
|
||||
'permlevel': 0
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
@ -228,7 +233,7 @@
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'Warehouse',
|
||||
'permlevel': 0,
|
||||
'print_hide': 0,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
@ -243,6 +248,7 @@
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'UOM',
|
||||
'permlevel': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 1,
|
||||
'trigger': u'Client',
|
||||
'width': u'100px'
|
||||
@ -441,7 +447,7 @@
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'Purchase Order',
|
||||
'permlevel': 1,
|
||||
'print_hide': 0,
|
||||
'print_hide': 1,
|
||||
'reqd': 0,
|
||||
'search_index': 1,
|
||||
'width': u'150px'
|
||||
|
@ -51,7 +51,7 @@ var cfn_set_fields = function(doc, cdt, cdn) {
|
||||
hide_field(lst);
|
||||
unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']);
|
||||
}
|
||||
if(doc.purpose == 'Sales Return'){
|
||||
else if(doc.purpose == 'Sales Return'){
|
||||
doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
|
||||
hide_field(lst);
|
||||
unhide_field(['customer','customer_name','customer_address','delivery_note_no', 'sales_invoice_no']);
|
||||
|
File diff suppressed because one or more lines are too long
@ -243,7 +243,7 @@ function same_day(d1,d2){if(d1.getFullYear()==d2.getFullYear()&&d1.getMonth()==d
|
||||
var month_list=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var month_last={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
|
||||
var month_list_full=['January','February','March','April','May','June','July','August','September','October','November','December'];var week_list=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var week_list_full=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];function int_to_str(i,len){i=''+i;if(i.length<len)for(c=0;c<(len-i.length);c++)i='0'+i;return i}
|
||||
wn.datetime={str_to_obj:function(d){if(!d)return new Date();var tm=[null,null];if(d.search(' ')!=-1){var tm=d.split(' ')[1].split(':');var d=d.split(' ')[0];}
|
||||
if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){return((d1-d2)/86400000);},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
|
||||
if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
|
||||
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
|
||||
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
|
||||
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
|
||||
@ -359,7 +359,7 @@ wn.urllib={get_arg:function(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]
|
||||
return"";else
|
||||
return decodeURIComponent(results[1]);},get_dict:function(){var d={}
|
||||
var t=window.location.href.split('?')[1];if(!t)return d;if(t.indexOf('#')!=-1)t=t.split('#')[0];if(!t)return d;t=t.split('&');for(var i=0;i<t.length;i++){var a=t[i].split('=');d[decodeURIComponent(a[0])]=decodeURIComponent(a[1]);}
|
||||
return d;},get_base_url:function(){var url=window.location.href.split('#')[0].split('?')[0].split('index.html')[0];if(url.substr(url.length-1,1)=='/')url=url.substr(0,url.length-1)
|
||||
return d;},get_base_url:function(){var url=window.location.href.split('#')[0].split('?')[0].split('index.cgi')[0];if(url.substr(url.length-1,1)=='/')url=url.substr(0,url.length-1)
|
||||
return url},get_file_url:function(file_id){return repl('files/%(fn)s',{fn:file_id})}}
|
||||
get_url_arg=wn.urllib.get_arg;get_url_dict=wn.urllib.get_dict;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user