Merge branch 'saas-dev' into saas-dev-usability-hints

Conflicts:
	airtime_mvc/public/js/airtime/schedule/add-show.js
This commit is contained in:
Albert Santoni 2015-07-14 10:56:12 -04:00
commit 45b09a0d24
4 changed files with 138 additions and 121 deletions

View File

@ -1,21 +1,21 @@
#schedule-add-show, #schedule-add-show,
#fullcalendar_show_display { #fullcalendar_show_display {
float: left; float: left;
} }
#schedule-add-show { #schedule-add-show {
font-size: 12px; font-size: 12px;
/*width: 25%;*/ /*width: 25%;*/
width:310px; width: 310px;
} }
#schedule-add-show textarea { #schedule-add-show textarea {
width: 99%; width: 99%;
height: 80px; height: 80px;
} }
#fullcalendar_show_display { #fullcalendar_show_display {
width: 60%; width: 60%;
} }
#schedule-add-show .ui-tabs-panel { #schedule-add-show .ui-tabs-panel {
@ -23,16 +23,16 @@
} }
#schedule-add-show fieldset { #schedule-add-show fieldset {
padding:8px; padding: 8px;
margin-bottom:8px; margin-bottom: 8px;
} }
#schedule-add-show dl { #schedule-add-show dl {
padding:8px; padding: 8px;
margin-bottom:8px; margin-bottom: 8px;
margin:0; margin: 0;
padding:0; padding: 0;
width:100%; width: 100%;
} }
#schedule-add-show dd { #schedule-add-show dd {
@ -52,67 +52,67 @@
margin: 0; margin: 0;
padding: 4px 0; padding: 4px 0;
text-align: left; text-align: left;
min-width:103px; min-width: 103px;
clear:left; clear: left;
} }
#schedule-add-show dt.big { #schedule-add-show dt.big {
min-width:130px; min-width: 130px;
} }
#schedule-add-show dt.block-display, #schedule-add-show dd.block-display { #schedule-add-show dt.block-display, #schedule-add-show dd.block-display {
display:block; display: block;
float:none; float: none;
margin-left:0; margin-left: 0;
padding-left:0; padding-left: 0;
} }
#schedule-add-show dt label { #schedule-add-show dt label {
padding-right:0; padding-right: 0;
} }
.wrapp-label { .wrapp-label {
padding:0; padding: 0;
height:16px; height: 16px;
display:block; display: block;
line-height:18px; line-height: 18px;
} }
label.wrapp-label input[type="checkbox"] { label.wrapp-label input[type="checkbox"] {
float:left; float: left;
margin:-1px 2px 0 0; margin: -1px 2px 0 0;
} }
#schedule-add-show fieldset:last-child { #schedule-add-show fieldset:last-child {
margin-bottom:0; margin-bottom: 0;
} }
#schedule-add-show fieldset dd input[type="checkbox"] { #schedule-add-show fieldset dd input[type="checkbox"] {
margin-top:2px; margin-top: 2px;
} }
#add_show_day_check-element.block-display { #add_show_day_check-element.block-display {
margin-bottom:15px; margin-bottom: 15px;
margin-top:7px; margin-top: 7px;
} }
#add_show_day_check-element.block-display label.wrapp-label { #add_show_day_check-element.block-display label.wrapp-label {
font-size:12px; font-size: 12px;
float:left; float: left;
margin-right:10px; margin-right: 10px;
} }
#add_show_name-element .input_text { #add_show_name-element .input_text {
/*width:99%;*/ /*width:99%;*/
} }
#schedule-add-show-overlap { #schedule-add-show-overlap {
border: 1px solid #c83f3f; border: 1px solid #c83f3f;
background: #c6b4b4; background: #c6b4b4;
margin-top:8px; margin-top: 8px;
padding:8px; padding: 8px;
color:#902d2d; color: #902d2d;
display:none; display: none;
} }
#add_show_hosts-element { #add_show_hosts-element {
@ -121,38 +121,90 @@ label.wrapp-label input[type="checkbox"] {
overflow: auto; overflow: auto;
} }
#add_show_start_time, #add_show_end_time { #add_show_start_time, #add_show_end_time {
width: 54px; width: 54px;
margin-left:10px; margin-left: 10px;
} }
#add_show_end_date_no_repeat, #add_show_start_date { #add_show_end_date_no_repeat, #add_show_start_date {
width: 89px; width: 89px;
} }
#add_show_duration { #add_show_duration {
background: #AAAAAA; background: #AAAAAA;
cursor: default; cursor: default;
width: 65px; width: 65px;
} }
[id^=add_show_instance_description] { [id^=add_show_instance_description] {
display: none; display: none;
} }
#add_show_logo_current, #add_show_logo_current,
#add_show_logo_preview { #add_show_logo_preview {
border: 1px solid #5b5b5b; border: 1px solid #5b5b5b;
-webkit-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1); -webkit-box-shadow: 0px 0px 2px 1px rgba(48, 48, 48, 1);
-moz-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1); -moz-box-shadow: 0px 0px 2px 1px rgba(48, 48, 48, 1);
box-shadow: 0px 0px 2px 1px rgba(48,48,48,1); box-shadow: 0px 0px 2px 1px rgba(48, 48, 48, 1);
width: 200px; width: 200px;
height: 200px; height: 200px;
display: none; display: none;
cursor: default; cursor: default;
} }
#add_show_logo_current_remove { #add_show_logo_current_remove {
display: none; display: none;
height: 28px; height: 28px;
} }
.add-button {
cursor: pointer;
}
.add-button {
border: 1px solid #5b5b5b;
background-color: #767676;
background: -moz-linear-gradient(top, #868686 0, #6e6e6e 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #868686), color-stop(100%, #6e6e6e));
color: #ffffff;
margin:0;
font-size:12px;
font-weight:bold;
padding:4px 12px 4px 22px;
text-decoration:none;
/*text-shadow: #000 0px -1px;*/
display:block;
float:left;
position:relative;
}
.add-button:hover {
border: 1px solid #000000;
background-color: #353535;
background: -moz-linear-gradient(top, #353535 0, #000000 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #353535), color-stop(100%, #000000));
color: #ffffff;
}
.add-button span {
position:absolute;
top:3px;
left:3px;
height:16px;
width:16px;
display:block;
background:url(redmond/images/ui-icons_ffffff_256x240.png) no-repeat;
}
/*.add-button:hover span {*/
/*background:url(redmond/images/ui-icons_ff5d1a_256x240.png) no-repeat;*/
/*}*/
.add-button span.add-icon {
background-position: -32px -129px;
}
.add-button[disabled] {
cursor: auto;
color: #e7e7e7;
border: 1px solid #a1a1a1;
background-color: #b1b1b1;
background: -moz-linear-gradient(top, #c7c7c7 0, #c7c7c7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #c7c7c7), color-stop(100%, #c7c7c7));
}

View File

@ -1901,44 +1901,6 @@ span.errors.sp-errors{
height:38px; height:38px;
} }
.add-button, .ui-widget-content a.add-button {
border: 1px solid #242424;
background-color: #353535;
background: -moz-linear-gradient(top, #494949 0, #353535 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #494949), color-stop(100%, #353535));
color: #ffffff;
margin:0;
font-size:12px;
font-weight:bold;
padding:4px 12px 4px 22px;
text-decoration:none;
text-shadow: #000 0px -1px;
display:block;
float:left;
position:relative;
}
.add-button:hover, .ui-widget-content a.add-button:hover {
border: 1px solid #000000;
background-color: #353535;
background: -moz-linear-gradient(top, #353535 0, #000000 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #353535), color-stop(100%, #000000));
color: #ffffff;
}
.add-button span {
position:absolute;
top:3px;
left:3px;
height:16px;
width:16px;
display:block;
background:url(redmond/images/ui-icons_ffffff_256x240.png) no-repeat;
}
.add-button:hover span {
background:url(redmond/images/ui-icons_ff5d1a_256x240.png) no-repeat;
}
.add-button span.add-icon {
background-position: -32px -128px;
}
/*---//////////////////// NOW PLAYING COLORS ////////////////////---*/ /*---//////////////////// NOW PLAYING COLORS ////////////////////---*/
.playing-song, .datatable tr.playing-song:hover td { .playing-song, .datatable tr.playing-song:hover td {
@ -1958,7 +1920,6 @@ span.errors.sp-errors{
color:#FFF; color:#FFF;
} }
/*---//////////////////// END NOW PLAYING COLORS ////////////////////---*/ /*---//////////////////// END NOW PLAYING COLORS ////////////////////---*/
.icon-link, .ui-widget-content a.icon-link { .icon-link, .ui-widget-content a.icon-link {
color: #646464; color: #646464;

View File

@ -22,24 +22,26 @@ function openAddShowForm(nowOrFuture) {
} }
} }
function makeAddShowButton(){ function makeAddShowButton() {
$('.fc-header-left') if($('.add-button').length === 0) {
.append('<span class="fc-header-space"></span>') $('.fc-header-left')
.append('<span class="fc-button"><a href="#" class="add-button"><span class="add-icon"></span>'+$.i18n._("Show")+'</a></span>') .append('<span class="fc-header-space"></span>')
.find('span.fc-button:last > a') .append('<span class="fc-button">' +
.click(function(){ '<button onclick="showForm()" class="add-button">' +
openAddShowForm(true); '<span class="add-icon"></span>' + $.i18n._("Create New Show") +
removeAddShowButton(); '</button>' +
}); '</span>');
}
} }
function removeAddShowButton(){ function showForm() {
var aTag = $('.fc-header-left') openAddShowForm(true);
.find("span.fc-button:last > a"); toggleAddShowButton();
}
var span = aTag.parent(); function toggleAddShowButton(){
span.prev().remove(); var aTag = $('.add-button');
span.remove(); aTag.prop('disabled', function(i, v) { return !v; });
} }
function setupStartTimeWidgets() { function setupStartTimeWidgets() {
@ -94,11 +96,11 @@ function closeAddShowForm(event) {
windowResize(); windowResize();
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json) { $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json) {
redrawAddShowForm($el, json.form); redrawAddShowForm($el, json.form);
}); });
makeAddShowButton(); toggleAddShowButton();
} }
//dateText mm-dd-yy //dateText mm-dd-yy
@ -177,7 +179,7 @@ function beginEditShow(data){
} }
redrawAddShowForm($("#add-show-form"), data.newForm); redrawAddShowForm($("#add-show-form"), data.newForm);
removeAddShowButton(); toggleAddShowButton();
openAddShowForm(); openAddShowForm();
} }
@ -798,20 +800,20 @@ function setAddShowEvents(form) {
.fullCalendar('render'); .fullCalendar('render');
$addShowForm.hide(); $addShowForm.hide();
toggleAddShowButton();
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){ $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
redrawAddShowForm($addShowForm, json.form); redrawAddShowForm($addShowForm, json.form);
}); });
makeAddShowButton();
} else { } else {
redrawAddShowForm($addShowForm, json.newForm); redrawAddShowForm($addShowForm, json.newForm);
scheduleRefetchEvents(json); scheduleRefetchEvents(json);
$addShowForm.hide(); $addShowForm.hide();
toggleAddShowButton();
} }
/* CC-6062: Resize the window to avoid stretching the last column */ /* CC-6062: Resize the window to avoid stretching the last column */
windowResize(); windowResize();
makeAddShowButton(); makeAddShowButton();
} }
}); });
}); });

View File

@ -115,6 +115,8 @@ function dayClick(date, allDay, jsEvent, view){
$("#schedule-show-when").show(); $("#schedule-show-when").show();
openAddShowForm(); openAddShowForm();
makeAddShowButton();
toggleAddShowButton();
} }
} }
} }