Merge branch 'saas-dev-publishing' of https://github.com/sourcefabric/Airtime into saas-dev-publishing

This commit is contained in:
drigato 2015-09-21 14:51:55 -04:00
commit 77a53491b0
10 changed files with 82 additions and 66 deletions

View File

@ -73,10 +73,6 @@ class Podcast extends BasePodcast
$podcastArray["episodes"] = array();
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);
}
return $podcastArray;
@ -113,10 +109,6 @@ class Podcast extends BasePodcast
$podcastArray["episodes"] = array();
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);
}

View File

@ -1,4 +1,3 @@
<div class="podcast-wrapper" ng-controller="RestController">
<div class="inner_editor_title">
<h2>
<?php echo _("Editing ") ?>"<span ng-bind="podcast.title" class="title_obj_name"></span>"
@ -16,7 +15,7 @@
</label>
</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-group pull-right">
@ -31,4 +30,3 @@
</div>
<div class='success' style='display:none'></span></div>
</div>
</div>

View File

@ -100,11 +100,11 @@
padding: 0;
}
#library_display_length {
.dataTables_length {
padding: 6px;
}
#library_display_length label {
.dataTables_length label {
color: #efefef;
line-height: 26px;
font-weight: normal;
@ -149,7 +149,7 @@ div.btn > span {
z-index: 1;
}
#library_display_wrapper, #show_builder_table_wrapper {
.outer-datatable-wrapper .dataTables_wrapper {
position: absolute;
top: 34px;
bottom: 4px;
@ -157,12 +157,14 @@ div.btn > span {
left: 4px;
}
#library_display, #show_builder_table {
/*#library_display, #show_builder_table*/
.datatable.dataTable {
border: none;
}
#library_display_wrapper > .dataTables_scrolling,
#show_builder_table_wrapper > .dataTables_scrolling {
/*#library_display_wrapper > .dataTables_scrolling,
#show_builder_table_wrapper > .dataTables_scrolling*/
.dataTables_wrapper > .dataTables_scrolling {
border: 1px solid #5b5b5b;
}
@ -451,7 +453,7 @@ li.ui-state-default {
background-color: transparent;
}
.side_playlist label, .side_playlist h4, .side_playlist span {
.side_playlist label/*, .side_playlist h4, .side_playlist span*/ {
color: #efefef;
font-size: 14px;
line-height: 24px;
@ -648,7 +650,7 @@ div.ColVis_collectionBackground {
overflow: auto;
}
.ColVis.TableTools {
:not(.table_toolbar) > .ColVis.TableTools {
margin: 6px 6px 0 0;
}

View File

@ -3916,7 +3916,7 @@ li .ui-state-hover {
/* Podcasts */
.podcast-wrapper > .dataTables_wrapper {
#podcast_episodes_wrapper {
position: relative;
height: 100%;
float: left;
@ -3927,3 +3927,10 @@ li .ui-state-hover {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#podcast_episodes_wrapper td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 300px;
}

View File

@ -289,8 +289,10 @@ function getUsabilityHint() {
});
}
function setupTextScrolling(parent, selector) {
parent.on("mouseenter", selector, function () {
// Set up text scrolling for all tags matching selector within the calling element(s)
jQuery.fn.textScroll = function(selector) {
this.each(function() {
$(this).on("mouseenter", selector, function () {
var sw = $(this)[0].scrollWidth - parseFloat($(this).css("textIndent")), iw = $(this).innerWidth();
if (sw > iw) {
$(this).stop().animate({
@ -298,9 +300,12 @@ function setupTextScrolling(parent, selector) {
}, sw * 8);
}
});
parent.on("mouseleave", selector, function () {
$(this).on("mouseleave", selector, function () {
$(this).stop().animate({
textIndent: "0"
}, 500);
});
}
});
return this; // jQuery chaining
};

View File

@ -1271,7 +1271,7 @@ var AIRTIME = (function(AIRTIME) {
});
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
}
};
mod.libraryInit = libraryInit;

View File

@ -161,7 +161,7 @@ $(document).ready(function () {
});
};
setupTextScrolling($("#recent_uploads"), "td");
$("#recent_uploads").textScroll("td");
self.isRecentUploadsRefreshTimerActive = false;

View File

@ -42,7 +42,9 @@ var AIRTIME = (function (AIRTIME) {
function _bootstrapAngularApp(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() {
@ -112,15 +114,21 @@ var AIRTIME = (function (AIRTIME) {
};
mod.initPodcastEpisodeDatatable = function(episodes) {
console.log(episodes);
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();
// Set up the div with id "podcast_table" as a datatable.
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
podcastToolbarButtons, // Toolbar buttons
{ // Datatables overrides.
@ -131,6 +139,7 @@ var AIRTIME = (function (AIRTIME) {
});
mod.podcastEpisodesDatatable = mod.podcastEpisodesTableWidget.getDatatable();
mod.podcastEpisodesDatatable.textScroll("td");
};
return AIRTIME;

View File

@ -205,5 +205,5 @@ var AIRTIME = (function(AIRTIME){
}(AIRTIME || {}));
$(document).ready(function() {
setupTextScrolling($("#show_builder"), ".tab-name");
$("#show_builder").textScroll(".tab-name");
});

View File

@ -36,6 +36,8 @@ var AIRTIME = (function(AIRTIME) {
self._$wrapperDOMNode = $(wrapperDOMNode);
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.
@ -65,6 +67,7 @@ var AIRTIME = (function(AIRTIME) {
}),
"oColVis": {
"sAlign": "right",
"aiExclude": self.colVisExcludeColumns,
"buttonText": $.i18n._("Columns"),
"iOverlayFade": 0
},