Changeset 7849 for extensions/event_cats/admin
- Timestamp:
- Nov 23, 2010, 8:55:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/template/autolog_new.js
r7847 r7849 716 716 } 717 717 718 function ec_mark_now() {719 maintenant = new Date();720 validity_date.setTime(maintenant.getTime() + 120000); // Validity721 // [date & time] cannot be less than two minutes722 ec_set_validity();723 }724 725 718 function ec_validity_check_min() { 726 719 var tp = new Date(); … … 741 734 } 742 735 736 function ec_mark_now() { 737 maintenant = new Date(); 738 validity_date.setTime(maintenant.getTime() + 120000); // Validity 739 // [date & time] cannot be less than two minutes 740 ec_set_validity(); 741 } 742 743 743 function ec_validity_set_min() { 744 744 ec_validity_check_min(); … … 754 754 ts = Number(validity_date.getTime()); 755 755 switch (k) { 756 case 0 756 case 0: // minute(s) 757 757 validity_date.setTime(ts + (v * 60000)); 758 758 break; 759 case 1 759 case 1: // hour(s) 760 760 validity_date.setTime(ts + (v * 3600000)); 761 761 break; 762 case 2 762 case 2: // day(s) 763 763 validity_date.setTime(ts + (v * 86400000)); 764 764 break; 765 case 3 765 case 3: // month(s) 766 766 m = Number(de('ec_validity_month_id').selectedIndex + v); 767 767 validity_date.setFullYear( … … 770 770 validity_date.setMonth(m % 12); // % : modulo 771 771 break; 772 case 4 772 case 4: // year(s) 773 773 validity_date.setFullYear(Number(de('ec_validity_year_id').value) + v); 774 774 break; 775 775 } 776 776 ec_set_validity(); 777 ec_validity_check_min(); 777 778 } 778 779
Note: See TracChangeset
for help on using the changeset viewer.