CC-6118: Playlist crossfade panel needs restyling

Started re-styling the playlist fade editor
This commit is contained in:
drigato 2015-09-01 12:05:08 -04:00
parent c7d926f8e8
commit 34e7c09ab7
3 changed files with 29 additions and 17 deletions

View file

@ -345,7 +345,7 @@
}
.edit-error {
color: #b80000;
color: #bd362f;
margin: 0;
padding-bottom: 0;
font-size: 12px;
@ -359,14 +359,23 @@
color: #fff;
}
.playlist_main_fade_input {
width: 100px;
}
.crossfade-main {
background: #debc9e;
/*background: #debc9e;*/
border: 1px solid #5b5b5b;
padding: 10px 10px 0 10px;
margin: 0 1px 16px 0;
position: relative;
}
.crossfade-main dt {
color: #ffffff !important;
width: 100px;
}
.crossfade-main .edit-error {
padding-bottom: 4px;
margin: 0;

View file

@ -763,15 +763,18 @@ var AIRTIME = (function(AIRTIME){
playlistError(json);
}
else {
var fadeIn = $pl.find("span.spl_main_fade_in");
var fadeIn = $pl.find("input.spl_main_fade_in");
var fadeOut = $pl.find("span.spl_main_fade_out");
if (json.fadeIn == null) {
fadeIn.parent().prev().hide();
fadeIn.hide();
} else {
console.log(json.fadeIn);
//console.log(fadeIn.val());
fadeIn.parent().prev().show();
fadeIn.show();
fadeIn.empty().append(json.fadeIn);
fadeIn.val(json.fadeIn);
fadeIn.text(json.fadeIn);
}
if (json.fadeOut == null) {
fadeOut.parent().prev().hide();
@ -789,41 +792,41 @@ var AIRTIME = (function(AIRTIME){
}
});
$pl.on("blur", "span.spl_main_fade_in", function(event){
$pl.on("blur", "input.spl_main_fade_in", function(event){
event.stopPropagation();
var url = baseUrl+"playlist/set-playlist-fades",
span = $(this),
fadeIn = $.trim(span.text()),
input = $(this),
fadeIn = $.trim(input.val()),
lastMod = mod.getModified(),
type = $pl.find('.obj_type').val();
if (!isFadeValid(fadeIn)){
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
showError(input, $.i18n._("please put in a time in seconds '00 (.0)'"));
return;
}
$.post(url,
{format: "json", fadeIn: fadeIn, modified: lastMod, type: type},
function(json){
hideError(span);
hideError(input);
if (json.modified !== undefined) {
mod.setModified(json.modified);
}
});
});
$pl.on("blur", "span.spl_main_fade_out", function(event){
$pl.on("blur", "input.spl_main_fade_out", function(event){
event.stopPropagation();
var url = baseUrl+"playlist/set-playlist-fades",
span = $(this),
fadeOut = $.trim(span.text()),
input = $(this),
fadeOut = $.trim(input.text()),
lastMod = mod.getModified(),
type = $pl.find('.obj_type').val();
if (!isFadeValid(fadeOut)){
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
showError(input, $.i18n._("please put in a time in seconds '00 (.0)'"));
return;
}