CC-3174 : showbuilder
created controller Usersettings, noticed hosts couldn't save datatables setting through pref controller. starting to use new cursor arrows.
This commit is contained in:
parent
aabcaafff0
commit
b357b80054
|
@ -25,7 +25,8 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
||||||
->add(new Zend_Acl_Resource('preference'))
|
->add(new Zend_Acl_Resource('preference'))
|
||||||
->add(new Zend_Acl_Resource('recorder'))
|
->add(new Zend_Acl_Resource('recorder'))
|
||||||
->add(new Zend_Acl_Resource('showbuilder'))
|
->add(new Zend_Acl_Resource('showbuilder'))
|
||||||
->add(new Zend_Acl_Resource('auth'));
|
->add(new Zend_Acl_Resource('auth'))
|
||||||
|
->add(new Zend_Acl_Resource('usersettings'));
|
||||||
|
|
||||||
/** Creating permissions */
|
/** Creating permissions */
|
||||||
$ccAcl->allow('G', 'index')
|
$ccAcl->allow('G', 'index')
|
||||||
|
@ -34,11 +35,10 @@ $ccAcl->allow('G', 'index')
|
||||||
->allow('G', 'nowplaying')
|
->allow('G', 'nowplaying')
|
||||||
->allow('G', 'api')
|
->allow('G', 'api')
|
||||||
->allow('G', 'auth')
|
->allow('G', 'auth')
|
||||||
//->allow('G', 'plupload', array('upload-recorded'))
|
|
||||||
->allow('G', 'recorder')
|
->allow('G', 'recorder')
|
||||||
->allow('G', 'schedule')
|
->allow('G', 'schedule')
|
||||||
->allow('G', 'dashboard')
|
->allow('G', 'dashboard')
|
||||||
//->allow('H', 'plupload', array('plupload', 'upload', 'index'))
|
->allow('H', 'usersettings')
|
||||||
->allow('H', 'plupload')
|
->allow('H', 'plupload')
|
||||||
->allow('H', 'library')
|
->allow('H', 'library')
|
||||||
->allow('H', 'search')
|
->allow('H', 'search')
|
||||||
|
|
|
@ -14,10 +14,6 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
->addActionContext('is-import-in-progress', 'json')
|
->addActionContext('is-import-in-progress', 'json')
|
||||||
->addActionContext('change-stream-setting', 'json')
|
->addActionContext('change-stream-setting', 'json')
|
||||||
->addActionContext('get-liquidsoap-status', 'json')
|
->addActionContext('get-liquidsoap-status', 'json')
|
||||||
->addActionContext('get-library-datatable', 'json')
|
|
||||||
->addActionContext('set-library-datatable', 'json')
|
|
||||||
->addActionContext('get-timeline-datatable', 'json')
|
|
||||||
->addActionContext('set-timeline-datatable', 'json')
|
|
||||||
->initContext();
|
->initContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,40 +331,6 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
die(json_encode($out));
|
die(json_encode($out));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLibraryDatatableAction() {
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
|
||||||
$settings = $request->getParam("settings");
|
|
||||||
|
|
||||||
$data = serialize($settings);
|
|
||||||
Application_Model_Preference::SetValue("library_datatable", $data, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getLibraryDatatableAction() {
|
|
||||||
|
|
||||||
$data = Application_Model_Preference::GetValue("library_datatable", true);
|
|
||||||
if ($data != "") {
|
|
||||||
$this->view->settings = unserialize($data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setTimelineDatatableAction() {
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
|
||||||
$settings = $request->getParam("settings");
|
|
||||||
|
|
||||||
$data = serialize($settings);
|
|
||||||
Application_Model_Preference::SetValue("timeline_datatable", $data, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTimelineDatatableAction() {
|
|
||||||
|
|
||||||
$data = Application_Model_Preference::GetValue("timeline_datatable", true);
|
|
||||||
if ($data != "") {
|
|
||||||
$this->view->settings = unserialize($data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
class UsersettingsController extends Zend_Controller_Action
|
||||||
|
{
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
/* Initialize action controller here */
|
||||||
|
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||||
|
$ajaxContext->addActionContext('get-library-datatable', 'json')
|
||||||
|
->addActionContext('set-library-datatable', 'json')
|
||||||
|
->addActionContext('get-timeline-datatable', 'json')
|
||||||
|
->addActionContext('set-timeline-datatable', 'json')
|
||||||
|
->initContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLibraryDatatableAction() {
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$settings = $request->getParam("settings");
|
||||||
|
|
||||||
|
$data = serialize($settings);
|
||||||
|
Application_Model_Preference::SetValue("library_datatable", $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLibraryDatatableAction() {
|
||||||
|
|
||||||
|
$data = Application_Model_Preference::GetValue("library_datatable", true);
|
||||||
|
if ($data != "") {
|
||||||
|
$this->view->settings = unserialize($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTimelineDatatableAction() {
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$settings = $request->getParam("settings");
|
||||||
|
|
||||||
|
$data = serialize($settings);
|
||||||
|
Application_Model_Preference::SetValue("timeline_datatable", $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTimelineDatatableAction() {
|
||||||
|
|
||||||
|
$data = Application_Model_Preference::GetValue("timeline_datatable", true);
|
||||||
|
if ($data != "") {
|
||||||
|
$this->view->settings = unserialize($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1019 B |
|
@ -4,9 +4,23 @@
|
||||||
width:100px;
|
width:100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#show_builder span.ui-icon-triangle-1-e {
|
table tr.selected-row td, table tr.selected-row th,
|
||||||
float: left;
|
table.datatable tr.selected-row td, table.datatable tr.selected-row th {
|
||||||
position: relative;
|
border-bottom: 2px solid #db0000 !important;
|
||||||
left: -20px;
|
|
||||||
top: 15px;
|
|
||||||
}
|
}
|
||||||
|
.innerWrapper {
|
||||||
|
position:relative;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.marker {
|
||||||
|
position:absolute;
|
||||||
|
bottom:-10px;
|
||||||
|
left:-14px;
|
||||||
|
width:9px;
|
||||||
|
height:9px;
|
||||||
|
background:url(images/tl-arrow.png) no-repeat 0 0;
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
tr.selected-row .marker {
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
|
@ -256,7 +256,7 @@ $(document).ready(function() {
|
||||||
"fnStateSave": function (oSettings, oData) {
|
"fnStateSave": function (oSettings, oData) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/preference/set-library-datatable",
|
url: "/usersettings/set-library-datatable",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {settings : oData, format: "json"},
|
data: {settings : oData, format: "json"},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
@ -270,7 +270,7 @@ $(document).ready(function() {
|
||||||
var o;
|
var o;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/preference/get-library-datatable",
|
url: "/usersettings/get-library-datatable",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: {format: "json"},
|
data: {format: "json"},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
|
|
@ -205,7 +205,7 @@ $(document).ready(function() {
|
||||||
if (aData.header === true) {
|
if (aData.header === true) {
|
||||||
cl = 'sb-header';
|
cl = 'sb-header';
|
||||||
|
|
||||||
sSeparatorHTML = '<span>'+aData.title+'</span><span>'+aData.starts+'</span><span>'+aData.ends+'</span><span class="ui-icon ui-icon-triangle-1-e"></span>';
|
sSeparatorHTML = '<span>'+aData.title+'</span><span>'+aData.starts+'</span><span>'+aData.ends+'</span>';
|
||||||
fnPrepareSeparatorRow(sSeparatorHTML, cl, 0);
|
fnPrepareSeparatorRow(sSeparatorHTML, cl, 0);
|
||||||
}
|
}
|
||||||
else if (aData.footer === true) {
|
else if (aData.footer === true) {
|
||||||
|
@ -226,11 +226,11 @@ $(document).ready(function() {
|
||||||
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//$(nRow).attr("id", "sched_"+aData.id);
|
|
||||||
|
|
||||||
node = nRow.children[0];
|
node = nRow.children[0];
|
||||||
if (aData.checkbox === true) {
|
if (aData.checkbox === true) {
|
||||||
node.innerHTML = '<input type="checkbox" name="'+aData.id+'"></input><span class="ui-icon ui-icon-triangle-1-e"></span>';
|
var height = $(node).height();
|
||||||
|
node.innerHTML = '<div class="innerWrapper" height="'+height+'"><input type="checkbox" name="'+aData.id+'"></input><div class="marker"></div></div>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
node.innerHTML = '';
|
node.innerHTML = '';
|
||||||
|
@ -292,7 +292,7 @@ $(document).ready(function() {
|
||||||
"fnStateSave": function (oSettings, oData) {
|
"fnStateSave": function (oSettings, oData) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/preference/set-timeline-datatable",
|
url: "/usersettings/set-timeline-datatable",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {settings : oData, format: "json"},
|
data: {settings : oData, format: "json"},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
@ -306,7 +306,7 @@ $(document).ready(function() {
|
||||||
var o;
|
var o;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/preference/get-timeline-datatable",
|
url: "/usersettings/get-timeline-datatable",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: {format: "json"},
|
data: {format: "json"},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
|
Loading…
Reference in New Issue