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

@ -156,3 +156,55 @@ label.wrapp-label input[type="checkbox"] {
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

@ -23,23 +23,25 @@ function openAddShowForm(nowOrFuture) {
} }
function makeAddShowButton() { function makeAddShowButton() {
if($('.add-button').length === 0) {
$('.fc-header-left') $('.fc-header-left')
.append('<span class="fc-header-space"></span>') .append('<span class="fc-header-space"></span>')
.append('<span class="fc-button"><a href="#" class="add-button"><span class="add-icon"></span>'+$.i18n._("Show")+'</a></span>') .append('<span class="fc-button">' +
.find('span.fc-button:last > a') '<button onclick="showForm()" class="add-button">' +
.click(function(){ '<span class="add-icon"></span>' + $.i18n._("Create New Show") +
openAddShowForm(true); '</button>' +
removeAddShowButton(); '</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() {
@ -98,7 +100,7 @@ function closeAddShowForm(event) {
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();
} }
} }
} }