Merge branch 'saas-showbuilder' into saas-showbuilder-contextmenus
This commit is contained in:
commit
b645f1c2ed
7 changed files with 68 additions and 24 deletions
|
@ -48,8 +48,6 @@ class NewPlaylistController extends Zend_Controller_Action
|
||||||
$modified = $this->_getParam('modified', null);
|
$modified = $this->_getParam('modified', null);
|
||||||
if ($obj->getLastModified("U") !== $modified) {
|
if ($obj->getLastModified("U") !== $modified) {
|
||||||
$this->createFullResponse($obj);
|
$this->createFullResponse($obj);
|
||||||
Logging::info($obj->getLastModified("U"));
|
|
||||||
Logging::info($modified);
|
|
||||||
throw new PlaylistOutDatedException(sprintf(_("You are viewing an older version of %s"), $obj->getName()));
|
throw new PlaylistOutDatedException(sprintf(_("You are viewing an older version of %s"), $obj->getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,9 +197,9 @@ class NewPlaylistController extends Zend_Controller_Action
|
||||||
$objInfo = Application_Model_Library::getObjInfo($type);
|
$objInfo = Application_Model_Library::getObjInfo($type);
|
||||||
Logging::info("editing {$type} {$id}");
|
Logging::info("editing {$type} {$id}");
|
||||||
|
|
||||||
if (!is_null($id)) {
|
// if (!is_null($id)) {
|
||||||
Application_Model_Library::changePlaylist($id, $type);
|
Application_Model_Library::changePlaylist($id, $type);
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$obj = new $objInfo['className']($id);
|
$obj = new $objInfo['className']($id);
|
||||||
|
@ -552,8 +550,8 @@ class NewPlaylistController extends Zend_Controller_Action
|
||||||
$result['id'] = $bl->getId();
|
$result['id'] = $bl->getId();
|
||||||
$result["modified"] = $bl->getLastModified("U");
|
$result["modified"] = $bl->getLastModified("U");
|
||||||
} else if ($params['type'] == 'playlist') {
|
} else if ($params['type'] == 'playlist') {
|
||||||
$result["modified"] = $this->view->modified;
|
|
||||||
$this->setPlaylistNameDescAction();
|
$this->setPlaylistNameDescAction();
|
||||||
|
$result["modified"] = $this->view->modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_helper->json->sendJson($result);
|
$this->_helper->json->sendJson($result);
|
||||||
|
|
|
@ -513,6 +513,10 @@ li.ui-state-default {
|
||||||
left: 4px;
|
left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[tab-type='md'] > .editor_pane_wrapper {
|
||||||
|
overflow-x: hidden; /* Show the y-direction scrollbar (magic!) */
|
||||||
|
}
|
||||||
|
|
||||||
.inner_editor_wrapper {
|
.inner_editor_wrapper {
|
||||||
max-height: 60%;
|
max-height: 60%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
@ -534,12 +538,16 @@ li.ui-state-default {
|
||||||
|
|
||||||
.spl_sortable {
|
.spl_sortable {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 0;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
flex: 1 100%;
|
flex: 1 100%;
|
||||||
|
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spl_sortable .list-item-container {
|
.spl_sortable .list-item-container {
|
||||||
|
@ -551,7 +559,6 @@ li.ui-state-default {
|
||||||
|
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2627,13 +2627,15 @@ label span {
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset > legend {
|
fieldset > legend {
|
||||||
font-size: 16px;
|
|
||||||
line-height: 140%;
|
|
||||||
background: #333;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px;
|
box-sizing: border-box;
|
||||||
padding: 0px;
|
|
||||||
border: 0px;
|
background: #333;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1em;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px 0 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset.padded > legend {
|
fieldset.padded > legend {
|
||||||
|
|
|
@ -22,7 +22,6 @@ $(document).ready(function() {
|
||||||
var ifr = document.getElementById('livechat-compact-container');
|
var ifr = document.getElementById('livechat-compact-container');
|
||||||
if (ifr) {
|
if (ifr) {
|
||||||
LC_API.on_chat_state_changed = function(data) {
|
LC_API.on_chat_state_changed = function(data) {
|
||||||
console.log('Chat state changed to: ' + data.state);
|
|
||||||
if (data.state == 'offline') {
|
if (data.state == 'offline') {
|
||||||
$('.wrapper').css('padding-bottom', 10);
|
$('.wrapper').css('padding-bottom', 10);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -842,8 +842,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
AIRTIME.library.dblClickAdd(data, data.ftype);
|
AIRTIME.library.dblClickAdd(data, data.ftype);
|
||||||
});
|
});
|
||||||
|
|
||||||
$libTable.find("tbody").on("mousedown", "tr", function(ev) {
|
$libTable.find("tbody").on("mousedown", "tr > td.library_checkbox", function(ev) {
|
||||||
var $tr = $(this),
|
var $tr = $(this).parent(),
|
||||||
// Get the ID of the selected row
|
// Get the ID of the selected row
|
||||||
$rowId = $tr.attr("id");
|
$rowId = $tr.attr("id");
|
||||||
|
|
||||||
|
@ -877,19 +877,53 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
$previouslySelected = $tr;
|
$previouslySelected = $tr;
|
||||||
});
|
});
|
||||||
|
|
||||||
$libTable.find("tbody").on("click", "tr", function(ev) {
|
$libTable.find("tbody").on("mousedown", "tr > td:not(.library_checkbox)", function(ev) {
|
||||||
//ev.preventDefault();
|
var $tr = $(this).parent(),
|
||||||
|
// Get the ID of the selected row
|
||||||
|
$rowId = $tr.attr("id");
|
||||||
|
|
||||||
|
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||||
|
if ($previouslySelected.attr("id") == $rowId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the selected row comes before the previously selected row,
|
||||||
|
// we want to select previous rows, otherwise we select next
|
||||||
|
if ($previouslySelected.prevAll("#" + $rowId).length !== 0) {
|
||||||
|
$previouslySelected.prevUntil($tr).each(function (i, el) {
|
||||||
|
mod.selectItem($(el));
|
||||||
|
mod.checkItem($(el));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$previouslySelected.nextUntil($tr).each(function (i, el) {
|
||||||
|
mod.selectItem($(el));
|
||||||
|
mod.checkItem($(el));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (!ev.ctrlKey) {
|
||||||
|
AIRTIME.library.selectNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
mod.selectItem($tr);
|
||||||
|
mod.checkItem($tr);
|
||||||
|
|
||||||
|
// Remember this row so we can properly multiselect
|
||||||
|
$previouslySelected = $tr;
|
||||||
|
});
|
||||||
|
|
||||||
|
$libTable.find("tbody").on("click", "tr", function() {
|
||||||
|
var tr = $(this);
|
||||||
|
|
||||||
if (flagForDeselection) {
|
if (flagForDeselection) {
|
||||||
flagForDeselection = false;
|
flagForDeselection = false;
|
||||||
mod.deselectItem($(this));
|
mod.deselectItem(tr);
|
||||||
mod.uncheckItem($(this));
|
mod.uncheckItem(tr);
|
||||||
} else {
|
} else {
|
||||||
mod.checkItem($(this));
|
mod.checkItem(tr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$libTable.find("thead").on("click", "th > input[type='checkbox']", function(ev) {
|
$libTable.find("thead").on("click", "th > input[type='checkbox']", function() {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
AIRTIME.library.selectCurrentPage();
|
AIRTIME.library.selectCurrentPage();
|
||||||
$(this).prop("checked", true);
|
$(this).prop("checked", true);
|
||||||
|
|
|
@ -436,6 +436,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
* Should all be moved to builder.js eventually
|
* Should all be moved to builder.js eventually
|
||||||
*/
|
*/
|
||||||
function buildNewTab(json) {
|
function buildNewTab(json) {
|
||||||
|
AIRTIME.library.selectNone();
|
||||||
|
|
||||||
var tabId = $openTabs[json.type + json.id];
|
var tabId = $openTabs[json.type + json.id];
|
||||||
if (tabId !== undefined) {
|
if (tabId !== undefined) {
|
||||||
AIRTIME.showbuilder.switchTab($("#pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
AIRTIME.showbuilder.switchTab($("#pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
||||||
|
@ -443,7 +445,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
$tabCount++;
|
$tabCount++;
|
||||||
|
|
||||||
var wrapper = "<div tab-id='" + $tabCount + "' id='pl-tab-content-" + $tabCount + "' class='side_playlist pl-content'><div class='editor_pane_wrapper'></div></div>",
|
var wrapper = "<div tab-type='" + json.type + "' tab-id='" + $tabCount + "' id='pl-tab-content-" + $tabCount + "' class='side_playlist pl-content'><div class='editor_pane_wrapper'></div></div>",
|
||||||
t = $("#show_builder").append(wrapper).find("#pl-tab-content-" + $tabCount),
|
t = $("#show_builder").append(wrapper).find("#pl-tab-content-" + $tabCount),
|
||||||
pane = $(".editor_pane_wrapper:last"),
|
pane = $(".editor_pane_wrapper:last"),
|
||||||
name = json.type == "md" ? // file
|
name = json.type == "md" ? // file
|
||||||
|
@ -1250,6 +1252,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
|
|
||||||
mod.fnAddItems = function(aItems, iAfter, sAddType) {
|
mod.fnAddItems = function(aItems, iAfter, sAddType) {
|
||||||
|
AIRTIME.library.selectNone();
|
||||||
var sUrl = baseUrl+"new-playlist/add-items";
|
var sUrl = baseUrl+"new-playlist/add-items";
|
||||||
oData = {"aItems": aItems, "afterItem": iAfter, "type": sAddType};
|
oData = {"aItems": aItems, "afterItem": iAfter, "type": sAddType};
|
||||||
playlistRequest(sUrl, oData);
|
playlistRequest(sUrl, oData);
|
||||||
|
|
|
@ -322,6 +322,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.fnAdd = function(aMediaIds, aSchedIds) {
|
mod.fnAdd = function(aMediaIds, aSchedIds) {
|
||||||
|
AIRTIME.library.selectNone();
|
||||||
mod.disableUI();
|
mod.disableUI();
|
||||||
|
|
||||||
$.post(baseUrl+"showbuilder/schedule-add",
|
$.post(baseUrl+"showbuilder/schedule-add",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue