Merge branch 'saas-dev-publishing' of https://github.com/sourcefabric/Airtime into saas-dev-publishing
This commit is contained in:
commit
77a53491b0
|
@ -73,10 +73,6 @@ class Podcast extends BasePodcast
|
||||||
|
|
||||||
$podcastArray["episodes"] = array();
|
$podcastArray["episodes"] = array();
|
||||||
foreach ($rss->item as $item) {
|
foreach ($rss->item as $item) {
|
||||||
// Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array
|
|
||||||
foreach($item as $k => $v) {
|
|
||||||
$array[$k] = (string)$v;
|
|
||||||
}
|
|
||||||
array_push($podcastArray["episodes"], $item);
|
array_push($podcastArray["episodes"], $item);
|
||||||
}
|
}
|
||||||
return $podcastArray;
|
return $podcastArray;
|
||||||
|
@ -113,10 +109,6 @@ class Podcast extends BasePodcast
|
||||||
|
|
||||||
$podcastArray["episodes"] = array();
|
$podcastArray["episodes"] = array();
|
||||||
foreach ($rss->item as $item) {
|
foreach ($rss->item as $item) {
|
||||||
// Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array
|
|
||||||
foreach($item as $k => $v) {
|
|
||||||
$array[$k] = (string)$v;
|
|
||||||
}
|
|
||||||
array_push($podcastArray["episodes"], $item);
|
array_push($podcastArray["episodes"], $item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
<div class="podcast-wrapper" ng-controller="RestController">
|
<div class="inner_editor_title">
|
||||||
<div class="inner_editor_title">
|
<h2>
|
||||||
<h2>
|
<?php echo _("Editing ") ?>"<span ng-bind="podcast.title" class="title_obj_name"></span>"
|
||||||
<?php echo _("Editing ") ?>"<span ng-bind="podcast.title" class="title_obj_name"></span>"
|
</h2>
|
||||||
</h2>
|
</div>
|
||||||
</div>
|
<div class="inner_editor_wrapper">
|
||||||
<div class="inner_editor_wrapper">
|
<input ng-value="podcast.id" class="obj_id" type="hidden"/>
|
||||||
<input ng-value="podcast.id" class="obj_id" type="hidden"/>
|
<label>
|
||||||
<label>
|
<?php echo _("Podcast Name") ?>
|
||||||
<?php echo _("Podcast Name") ?>
|
<input disabled ng-model="podcast.title" type="text"/>
|
||||||
<input disabled ng-model="podcast.title" type="text"/>
|
</label>
|
||||||
</label>
|
<label>
|
||||||
<label>
|
<?php echo _("Podcast URL") ?>
|
||||||
<?php echo _("Podcast URL") ?>
|
<input disabled ng-model="podcast.url" type="text"/>
|
||||||
<input disabled ng-model="podcast.url" type="text"/>
|
</label>
|
||||||
</label>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="podcast_episodes datatable" cellpadding="0" cellspacing="0"></table>
|
<table id="podcast_episodes" class="datatable" cellpadding="0" cellspacing="0"></table>
|
||||||
|
|
||||||
<div class="btn-toolbar clearfix">
|
<div class="btn-toolbar clearfix">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button ng-click="discard()" class="btn" type="button" name="cancel">
|
<button ng-click="discard()" class="btn" type="button" name="cancel">
|
||||||
<?php echo _("Cancel") ?>
|
<?php echo _("Cancel") ?>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<button ng-click="put()" class="btn" title='<?php echo _("Save podcast") ?>' type="button">
|
|
||||||
<?php echo _("Save") ?>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class='success' style='display:none'></span></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class='btn-group pull-right'>
|
||||||
|
<button ng-click="put()" class="btn" title='<?php echo _("Save podcast") ?>' type="button">
|
||||||
|
<?php echo _("Save") ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class='success' style='display:none'></span></div>
|
||||||
</div>
|
</div>
|
|
@ -100,11 +100,11 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display_length {
|
.dataTables_length {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display_length label {
|
.dataTables_length label {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
@ -149,7 +149,7 @@ div.btn > span {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display_wrapper, #show_builder_table_wrapper {
|
.outer-datatable-wrapper .dataTables_wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 34px;
|
top: 34px;
|
||||||
bottom: 4px;
|
bottom: 4px;
|
||||||
|
@ -157,12 +157,14 @@ div.btn > span {
|
||||||
left: 4px;
|
left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display, #show_builder_table {
|
/*#library_display, #show_builder_table*/
|
||||||
|
.datatable.dataTable {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display_wrapper > .dataTables_scrolling,
|
/*#library_display_wrapper > .dataTables_scrolling,
|
||||||
#show_builder_table_wrapper > .dataTables_scrolling {
|
#show_builder_table_wrapper > .dataTables_scrolling*/
|
||||||
|
.dataTables_wrapper > .dataTables_scrolling {
|
||||||
border: 1px solid #5b5b5b;
|
border: 1px solid #5b5b5b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +453,7 @@ li.ui-state-default {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist label, .side_playlist h4, .side_playlist span {
|
.side_playlist label/*, .side_playlist h4, .side_playlist span*/ {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
|
@ -648,7 +650,7 @@ div.ColVis_collectionBackground {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ColVis.TableTools {
|
:not(.table_toolbar) > .ColVis.TableTools {
|
||||||
margin: 6px 6px 0 0;
|
margin: 6px 6px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3916,7 +3916,7 @@ li .ui-state-hover {
|
||||||
|
|
||||||
/* Podcasts */
|
/* Podcasts */
|
||||||
|
|
||||||
.podcast-wrapper > .dataTables_wrapper {
|
#podcast_episodes_wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -3926,4 +3926,11 @@ li .ui-state-hover {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#podcast_episodes_wrapper td {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 300px;
|
||||||
}
|
}
|
|
@ -289,18 +289,23 @@ function getUsabilityHint() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupTextScrolling(parent, selector) {
|
// Set up text scrolling for all tags matching selector within the calling element(s)
|
||||||
parent.on("mouseenter", selector, function () {
|
jQuery.fn.textScroll = function(selector) {
|
||||||
var sw = $(this)[0].scrollWidth - parseFloat($(this).css("textIndent")), iw = $(this).innerWidth();
|
this.each(function() {
|
||||||
if (sw > iw) {
|
$(this).on("mouseenter", selector, function () {
|
||||||
|
var sw = $(this)[0].scrollWidth - parseFloat($(this).css("textIndent")), iw = $(this).innerWidth();
|
||||||
|
if (sw > iw) {
|
||||||
|
$(this).stop().animate({
|
||||||
|
textIndent: "-" + (sw + 1 - iw) + "px"
|
||||||
|
}, sw * 8);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(this).on("mouseleave", selector, function () {
|
||||||
$(this).stop().animate({
|
$(this).stop().animate({
|
||||||
textIndent: "-" + (sw + 1 - iw) + "px"
|
textIndent: "0"
|
||||||
}, sw * 8);
|
}, 500);
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
parent.on("mouseleave", selector, function () {
|
|
||||||
$(this).stop().animate({
|
return this; // jQuery chaining
|
||||||
textIndent: "0"
|
};
|
||||||
}, 500);
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1271,7 +1271,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
});
|
});
|
||||||
|
|
||||||
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
mod.libraryInit = libraryInit;
|
mod.libraryInit = libraryInit;
|
||||||
|
|
|
@ -161,7 +161,7 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
setupTextScrolling($("#recent_uploads"), "td");
|
$("#recent_uploads").textScroll("td");
|
||||||
|
|
||||||
self.isRecentUploadsRefreshTimerActive = false;
|
self.isRecentUploadsRefreshTimerActive = false;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,9 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
|
|
||||||
function _bootstrapAngularApp(podcast) {
|
function _bootstrapAngularApp(podcast) {
|
||||||
podcastApp.value('podcast', JSON.parse(podcast));
|
podcastApp.value('podcast', JSON.parse(podcast));
|
||||||
angular.bootstrap(AIRTIME.tabs.getActiveTab().find(".podcast-wrapper").get(0), ["podcast"]);
|
var wrapper = AIRTIME.tabs.getActiveTab().find(".editor_pane_wrapper");
|
||||||
|
wrapper.attr("ng-controller", "RestController");
|
||||||
|
angular.bootstrap(wrapper.get(0), ["podcast"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
mod.createUrlDialog = function() {
|
mod.createUrlDialog = function() {
|
||||||
|
@ -112,15 +114,21 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.initPodcastEpisodeDatatable = function(episodes) {
|
mod.initPodcastEpisodeDatatable = function(episodes) {
|
||||||
|
console.log(episodes);
|
||||||
var aoColumns = [
|
var aoColumns = [
|
||||||
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "title" , "sClass" : "library_title" , "sWidth" : "170px" },
|
/* Title */ { "sTitle" : $.i18n._("Title") , "mDataProp" : "title" , "sClass" : "podcast_episodes_title" , "sWidth" : "170px" },
|
||||||
|
/* Author */ { "sTitle" : $.i18n._("Author") , "mDataProp" : "author" , "sClass" : "podcast_episodes_author" , "sWidth" : "170px" },
|
||||||
|
/* Description */ { "sTitle" : $.i18n._("Description") , "mDataProp" : "description" , "sClass" : "podcast_episodes_description" , "sWidth" : "300px" },
|
||||||
|
/* Link */ { "sTitle" : $.i18n._("Link") , "mDataProp" : "link" , "sClass" : "podcast_episodes_link" , "sWidth" : "170px" },
|
||||||
|
/* GUID */ { "sTitle" : $.i18n._("GUID") , "mDataProp" : "guid" , "sClass" : "podcast_episodes_guid" , "sWidth" : "170px" },
|
||||||
|
/* Publication Date */ { "sTitle" : $.i18n._("Publication Date") , "mDataProp" : "pubDate" , "sClass" : "podcast_episodes_pub_date" , "sWidth" : "170px" }
|
||||||
];
|
];
|
||||||
|
|
||||||
var podcastToolbarButtons = AIRTIME.widgets.Table.getStandardToolbarButtons();
|
var podcastToolbarButtons = AIRTIME.widgets.Table.getStandardToolbarButtons();
|
||||||
|
|
||||||
// Set up the div with id "podcast_table" as a datatable.
|
// Set up the div with id "podcast_table" as a datatable.
|
||||||
mod.podcastEpisodesTableWidget = new AIRTIME.widgets.Table(
|
mod.podcastEpisodesTableWidget = new AIRTIME.widgets.Table(
|
||||||
AIRTIME.tabs.getActiveTab().find('.podcast_episodes'), // DOM node to create the table inside.
|
AIRTIME.tabs.getActiveTab().find('#podcast_episodes'), // DOM node to create the table inside.
|
||||||
true, // Enable item selection
|
true, // Enable item selection
|
||||||
podcastToolbarButtons, // Toolbar buttons
|
podcastToolbarButtons, // Toolbar buttons
|
||||||
{ // Datatables overrides.
|
{ // Datatables overrides.
|
||||||
|
@ -131,6 +139,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
});
|
});
|
||||||
|
|
||||||
mod.podcastEpisodesDatatable = mod.podcastEpisodesTableWidget.getDatatable();
|
mod.podcastEpisodesDatatable = mod.podcastEpisodesTableWidget.getDatatable();
|
||||||
|
mod.podcastEpisodesDatatable.textScroll("td");
|
||||||
};
|
};
|
||||||
|
|
||||||
return AIRTIME;
|
return AIRTIME;
|
||||||
|
|
|
@ -205,5 +205,5 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}(AIRTIME || {}));
|
}(AIRTIME || {}));
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
setupTextScrolling($("#show_builder"), ".tab-name");
|
$("#show_builder").textScroll(".tab-name");
|
||||||
});
|
});
|
|
@ -36,6 +36,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
self._$wrapperDOMNode = $(wrapperDOMNode);
|
self._$wrapperDOMNode = $(wrapperDOMNode);
|
||||||
self._toolbarButtons = toolbarButtons;
|
self._toolbarButtons = toolbarButtons;
|
||||||
|
|
||||||
|
// Exclude the leftmost column if we're implementing item selection
|
||||||
|
self._colVisExcludeColumns = bItemSelection ? [0] : [];
|
||||||
|
|
||||||
//Finish initialization of the datatable since everything is declared by now.
|
//Finish initialization of the datatable since everything is declared by now.
|
||||||
|
|
||||||
|
@ -65,6 +67,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
}),
|
}),
|
||||||
"oColVis": {
|
"oColVis": {
|
||||||
"sAlign": "right",
|
"sAlign": "right",
|
||||||
|
"aiExclude": self.colVisExcludeColumns,
|
||||||
"buttonText": $.i18n._("Columns"),
|
"buttonText": $.i18n._("Columns"),
|
||||||
"iOverlayFade": 0
|
"iOverlayFade": 0
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue