More smart block and playlist editor improvements
* Fixed smart block/playlist form validation error messages not showing up. * Improved styling of all save/error messages across the application. * Removed broken fade editors
This commit is contained in:
parent
f36ff944c2
commit
e743c3589e
|
@ -15,8 +15,6 @@ if (isset($this->obj)) {
|
|||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||
<input class='obj_type' type='hidden' value='playlist'/>
|
||||
|
||||
<div id='sp-success' class='success' style='display:none'></div>
|
||||
|
||||
<dl class="zend_form playlist_editor">
|
||||
<dt>
|
||||
<label><?php echo(_("Name:")); ?></label>
|
||||
|
@ -79,6 +77,9 @@ if (isset($this->obj)) {
|
|||
<div class='btn-group pull-right'>
|
||||
<button class="btn" title='<?php echo _("Save playlist") ?>' type="button" id="save_button"><?php echo _("Save") ?></button>
|
||||
</div>
|
||||
<div id='sp-success' class='success' style='display:none'></span></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
|
|
@ -15,8 +15,6 @@ if (isset($this->obj)) {
|
|||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||
<input class='obj_type' type='hidden' value='block'/>
|
||||
|
||||
<div id='sp-success-saved' class='success' style='display:none'></div>
|
||||
|
||||
<dl class="zend_form playlist_editor">
|
||||
<dt>
|
||||
<label><?php echo(_("Name:")); ?></label>
|
||||
|
@ -87,6 +85,7 @@ if (isset($this->obj)) {
|
|||
<div class='btn-group pull-right'>
|
||||
<button class="btn" title='Save smart block's title, description, and criteria' type="button" id="save_button"><?php echo _("Save") ?></button>
|
||||
</div>
|
||||
<div id='sp-success-saved' class='success' style='display:none'><span</div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
|
|
@ -48,7 +48,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
|||
<div class="text-row top">
|
||||
<span class="spl_playlength"><?php echo $item["length"] ?></span>
|
||||
<?php if ($item['type'] == 0) {?>
|
||||
<span class="spl_cue ui-state-default"></span>
|
||||
<!-- <span class="spl_cue ui-state-default"></span> -->
|
||||
<?php } else if ($item['type'] == 2) {
|
||||
if ($staticBlock) {?>
|
||||
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
|
||||
|
@ -71,7 +71,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
|||
<?php //create the crossfade icon.
|
||||
if (($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])):
|
||||
?>
|
||||
<div id="fade_<?php echo $i ?>" class="spl_fade_control ui-state-default"></div>
|
||||
<!-- <div id="fade_<?php echo $i ?>" class="spl_fade_control ui-state-default"></div> -->
|
||||
<?php endif; ?>
|
||||
<span id="remove_<?php echo $item["id"] ?>" class="ui-icon ui-icon-closethick"></span>
|
||||
</div>
|
||||
|
|
|
@ -1970,20 +1970,29 @@ ul.errors li, .warning {
|
|||
|
||||
div.success{
|
||||
color:#3B5323;
|
||||
font-size:11px;
|
||||
padding:2px 4px;
|
||||
font-size:14px;
|
||||
padding:2px 10px;
|
||||
background:#93DB70;
|
||||
margin-bottom:2px;
|
||||
margin-bottom:0px;
|
||||
border:1px solid #488214;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
float: right;
|
||||
height: 30px;
|
||||
line-height: 24px;
|
||||
box-sizing: border-box;;
|
||||
}
|
||||
|
||||
div.errors, span.errors{
|
||||
color:#902d2d;
|
||||
font-size:11px;
|
||||
padding:2px 4px;
|
||||
font-size:14px;
|
||||
padding:2px 10px;
|
||||
background:#c6b4b4;
|
||||
margin-bottom:2px;
|
||||
margin-bottom:0px;
|
||||
border:1px solid #c83f3f;
|
||||
height: 30px;
|
||||
line-height: 24px;
|
||||
box-sizing: border-box;;
|
||||
}
|
||||
|
||||
span.errors.sp-errors{
|
||||
|
|
|
@ -1028,7 +1028,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (obj_type == "block") {
|
||||
callback(json, "save");
|
||||
} else {
|
||||
$pl.find('.success').text($.i18n._('Playlist saved'));
|
||||
$pl.find('.success').text($.i18n._('Playlist saved.'));
|
||||
$pl.find('.success').show();
|
||||
setTimeout(removeSuccessMsg, 5000);
|
||||
dt.fnStandingRedraw();
|
||||
|
@ -1266,17 +1266,28 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
|
||||
mod.playlistResponse = function(json){
|
||||
if (json.error !== undefined) {
|
||||
playlistError(json);
|
||||
console.log(json);
|
||||
if (json.error !== undefined || json.result != 0) {
|
||||
if (json.error) {
|
||||
playlistError(json);
|
||||
}
|
||||
AIRTIME.playlist.replaceForm(json);
|
||||
}
|
||||
else {
|
||||
setPlaylistContent(json);
|
||||
setFadeIcon();
|
||||
$pl.find('.errors').hide();
|
||||
}
|
||||
|
||||
mod.enableUI();
|
||||
}
|
||||
|
||||
mod.replaceForm = function(json){
|
||||
$pl.find('.editor_pane_wrapper').html(json.html);
|
||||
openPlaylist(json);
|
||||
}
|
||||
|
||||
|
||||
function playlistRequest(sUrl, oData) {
|
||||
var lastMod,
|
||||
obj_type = $pl.find('.obj_type').val();
|
||||
|
|
|
@ -522,6 +522,9 @@ function callback(json, type) {
|
|||
//redraw library table so the length gets updated
|
||||
dt.fnStandingRedraw();
|
||||
}
|
||||
else {
|
||||
AIRTIME.playlist.playlistResponse(json);
|
||||
}
|
||||
form.find('.smart-block-form').removeClass("closed");
|
||||
}
|
||||
setTimeout(removeSuccessMsg, 5000);
|
||||
|
|
Loading…
Reference in New Issue