creating a separate controller for playouthistory templates.
This commit is contained in:
parent
5aa983be36
commit
653a6384b9
14 changed files with 217 additions and 162 deletions
|
@ -123,7 +123,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
|
||||
function updateTemplate(template_id, isDefault) {
|
||||
var url = baseUrl+"Playouthistory/update-template/format/json";
|
||||
var url = baseUrl+"Playouthistorytemplate/update-template/format/json";
|
||||
var data = {};
|
||||
var $lis, $li;
|
||||
var i, len;
|
||||
|
@ -152,7 +152,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$templateDiv.on("click", "#template_set_default", function() {
|
||||
var $btn = $(this),
|
||||
template_id = $btn.data("template"),
|
||||
url = baseUrl+"Playouthistory/set-template-default/format/json";
|
||||
url = baseUrl+"Playouthistorytemplate/set-template-default/format/json";
|
||||
|
||||
$btn.remove();
|
||||
$.post(url, {id: template_id});
|
||||
|
|
|
@ -9,9 +9,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
function createItemLi(id, name, configured) {
|
||||
|
||||
var editUrl = baseUrl+"Playouthistory/configure-template/id/"+id;
|
||||
var defaultUrl = baseUrl+"Playouthistory/set-template-default/format/json/id/"+id;
|
||||
var removeUrl = baseUrl+"Playouthistory/delete-template/format/json/id/"+id;
|
||||
var editUrl = baseUrl+"Playouthistorytemplate/configure-template/id/"+id;
|
||||
var defaultUrl = baseUrl+"Playouthistorytemplate/set-template-default/format/json/id/"+id;
|
||||
var removeUrl = baseUrl+"Playouthistorytemplate/delete-template/format/json/id/"+id;
|
||||
|
||||
var itemConfigured =
|
||||
"<li class='template_configured' data-template='<%= id %>' data-name='<%= name %>'>" +
|
||||
|
@ -72,7 +72,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
function createTemplate(type) {
|
||||
|
||||
var createUrl = baseUrl+"Playouthistory/create-template";
|
||||
var createUrl = baseUrl+"Playouthistorytemplate/create-template";
|
||||
|
||||
$.post(createUrl, {format: "json", type: type}, function(json) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue