-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogBookEdit.js
64 lines (36 loc) · 1.77 KB
/
logBookEdit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var count = $('#eld-ev-text-content > tr').length;
for (i = 2; i < count + 1; i++) {
loopBody(i);
}
function loopBody(i){
setTimeout(function(){
$('#eld-ev-text-content > tr:nth-child('+i+')').find('td:nth-child(7) span').attr('id', 'editBtn' + i);
console.log( 'editBtn' + i );
document.getElementById('editBtn' + i).click();
function timeMove(hours, minutes) {
document.getElementById('EventTime1').click();
function datePickerMove(id, count, index) {
$('.bootstrap-timepicker-widget').find('tr:nth-child(3)').find('td:nth-child(' + index + ') a').attr('id', id);
for (var i = 1; i <= count; i++)
document.getElementById(id).click();
}
if ($('#EventNotes').val() == '') $('#EventNotes').val(' ');
datePickerMove('timeHoursSel', hours, 1);
datePickerMove('timeMinutesSel', minutes, 3);
if ( $('#tab-default').hasClass('active') == false ) document.getElementById('eld_log_edit_save_button').click();
}
timeMove(hTime, mTime);
},500 + ( (i) * 1800 ));
}
var hTime = 1, mTime = 10;
function startTime(t1,t2){
hTime = t1;
mTime = t2;
}
var hmtime = prompt('Введите время в формате часы : минуты через пробел Н: 1 12');
var hmtimeArr = hmtime.trim().split(' ');
if ( hmtimeArr[ 0 ] !== '' && hmtimeArr[ 1 ] !== '' ) {
console.log( hmtimeArr[ 0 ], hmtimeArr[ 1 ] );
startTime( parseInt( hmtimeArr[ 0 ] ) , parseInt( hmtimeArr[ 1 ] ));
} else alert('Время введено не верно ! ');
//https://www.google.com/maps/dir/Glasgow,+KY,+USA/Lowell+INd,+USA/Spring+Grove,+IL,+USA/Long+Grove,+IL,+USA/Addison,+IL,+USA/@?hl=en