diff --git a/airtime_mvc/public/css/fullcalendar.css b/airtime_mvc/public/css/fullcalendar.css index e0c991eb5..b6cc9f578 100644 --- a/airtime_mvc/public/css/fullcalendar.css +++ b/airtime_mvc/public/css/fullcalendar.css @@ -314,7 +314,8 @@ a.fc-event { .fc-event-time, .fc-event-title { padding: 0 1px; - } + height: 12px; +} .fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ display: block; diff --git a/airtime_mvc/public/css/images/icon-clock.svg b/airtime_mvc/public/css/images/icon-clock.svg new file mode 100644 index 000000000..dbf371486 --- /dev/null +++ b/airtime_mvc/public/css/images/icon-clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 7e2d26018..db258fd61 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -204,18 +204,14 @@ img.logo .airtime_auth_help_icon, .custom_auth_help_icon, .stream_username_help_icon, .playlist_type_help_icon, .repeat_tracks_help_icon, .show_linking_help_icon, .admin_username_help_icon, .stream_type_help_icon, -.show_timezone_help_icon, .show_autoplaylist_help_icon { +.show_timezone_help_icon{ cursor: help; position: relative; display:inline-block; zoom:1; width:14px; height:14px; background:url(images/icon_info.png) 0 0 no-repeat; - left: 3px; + top:2px; right:7px; left: 3px; line-height:16px !important; - vertical-align: text-top; -} -.qtip a { - color: white; } /* Clearfix */ @@ -2272,14 +2268,15 @@ span.errors.sp-errors{ height:10px; float:right; margin-left:3px; - margin-top:2px; } .small-icon.linked { background:url(images/icon_link.png) no-repeat 0 0; margin-top: 0px !important; } .small-icon.autoplaylist { - background:url(images/icon_alert_cal_autoplaylist.png) no-repeat 0 0; + background: url(images/icon-clock.svg) black no-repeat center center; + border-radius: 2px; + background-size: contain; } .small-icon.recording { diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js index 2cc74acbd..15bd52d9a 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -5,10 +5,10 @@ */ function scheduleRefetchEvents(json) { - if(json.show_error == true){ + if (json.show_error == true) { alert($.i18n._("The show instance doesn't exist anymore!")); } - if(json.show_id) { + if (json.show_id) { var dialog_id = parseInt($("#add_show_id").val(), 10); //if you've deleted the show you are currently editing, close the add show dialog. @@ -16,10 +16,10 @@ function scheduleRefetchEvents(json) { $("#add-show-close").click(); } } - $("#schedule_calendar").fullCalendar( 'refetchEvents' ); + $("#schedule_calendar").fullCalendar('refetchEvents'); } -function makeTimeStamp(date){ +function makeTimeStamp(date) { var sy, sm, sd, h, m, s, timestamp; sy = date.getFullYear(); sm = date.getMonth() + 1; @@ -28,19 +28,19 @@ function makeTimeStamp(date){ m = date.getMinutes(); s = date.getSeconds(); - timestamp = sy+"-"+ pad(sm, 2) +"-"+ pad(sd, 2) +" "+ pad(h, 2) +":"+ pad(m, 2) +":"+ pad(s, 2); + timestamp = sy + "-" + pad(sm, 2) + "-" + pad(sd, 2) + " " + pad(h, 2) + ":" + pad(m, 2) + ":" + pad(s, 2); return timestamp; } -function dayClick(date, allDay, jsEvent, view){ +function dayClick(date, allDay, jsEvent, view) { // The show from will be preloaded if the user is admin or program manager. // Hence, if the user if DJ then it won't open anything. - if(userType == "S" || userType == "A" || userType == "P"){ + if (userType == "S" || userType == "A" || userType == "P") { var now, today, selected, chosenDate, chosenTime; now = adjustDateToServerDate(new Date(), serverTimezoneOffset); - if(view.name === "month") { + if (view.name === "month") { today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); selected = new Date(date.getFullYear(), date.getMonth(), date.getDate()); } @@ -49,12 +49,12 @@ function dayClick(date, allDay, jsEvent, view){ selected = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes()); } - if(selected >= today) { + if (selected >= today) { var addShow = $('.add-button'); //remove the +show button if it exists. - if(addShow.length == 1){ - var span = $(addShow).parent(); + if (addShow.length == 1) { + var span = $(addShow).parent(); $(span).next().remove(); $(span).remove(); @@ -65,10 +65,10 @@ function dayClick(date, allDay, jsEvent, view){ var duration_info = duration_string.split(" "); var duration_h = 0; var duration_m = 0; - if(duration_info[0] != null){ + if (duration_info[0] != null) { duration_h = parseInt(duration_info[0], 10); } - if(duration_info[1] != null){ + if (duration_info[1] != null) { duration_m = parseInt(duration_info[1], 10); } // duration in milisec @@ -77,28 +77,28 @@ function dayClick(date, allDay, jsEvent, view){ var startTime_string; var startTime = 0; // get start time value on the form - if(view.name === "month") { + if (view.name === "month") { startTime_string = $("#add_show_start_time").val(); var startTime_info = startTime_string.split(':'); if (startTime_info.length == 2) { - var start_time_temp = (parseInt(startTime_info[0],10) * 60 * 60 * 1000) + var start_time_temp = (parseInt(startTime_info[0], 10) * 60 * 60 * 1000) + (parseInt(startTime_info[1], 10) * 60 * 1000); if (!isNaN(start_time_temp)) { startTime = start_time_temp; } } - }else{ + } else { // if in day or week view, selected has all the time info as well // so we don't ahve to calculate it explicitly - startTime_string = pad(selected.getHours(),2)+":"+pad(selected.getMinutes(),2) + startTime_string = pad(selected.getHours(), 2) + ":" + pad(selected.getMinutes(), 2) startTime = 0 } // calculate endDateTime var endDateTime = new Date(selected.getTime() + startTime + duration); - chosenDate = selected.getFullYear() + '-' + pad(selected.getMonth()+1,2) + '-' + pad(selected.getDate(),2); - var endDateFormat = endDateTime.getFullYear() + '-' + pad(endDateTime.getMonth()+1,2) + '-' + pad(endDateTime.getDate(),2); + chosenDate = selected.getFullYear() + '-' + pad(selected.getMonth() + 1, 2) + '-' + pad(selected.getDate(), 2); + var endDateFormat = endDateTime.getFullYear() + '-' + pad(endDateTime.getMonth() + 1, 2) + '-' + pad(endDateTime.getDate(), 2); //TODO: This should all be refactored into a proper initialize() function for the show form. @@ -108,8 +108,8 @@ function dayClick(date, allDay, jsEvent, view){ $("#add_show_start_date").val(chosenDate); $("#add_show_end_date_no_repeat").val(endDateFormat); $("#add_show_end_date").val(endDateFormat); - if(view.name !== "month") { - var endTimeString = pad(endDateTime.getHours(),2)+":"+pad(endDateTime.getMinutes(),2); + if (view.name !== "month") { + var endTimeString = pad(endDateTime.getHours(), 2) + ":" + pad(endDateTime.getMinutes(), 2); $("#add_show_start_time").val(startTime_string) $("#add_show_end_time").val(endTimeString) } @@ -123,21 +123,21 @@ function dayClick(date, allDay, jsEvent, view){ } } -function viewDisplay( view ) { +function viewDisplay(view) { view_name = view.name; - - if(view.name === 'agendaDay' || view.name === 'agendaWeek') { + + if (view.name === 'agendaDay' || view.name === 'agendaWeek') { var calendarEl = this; var select = $('