* SAAS-1184 - more polish for publishing/podcasting
* Fix some issues with the station podcast feed * Various small fixes
This commit is contained in:
parent
5264bebe57
commit
74f7c454b5
|
@ -5,3 +5,160 @@
|
||||||
function _pro($str) {
|
function _pro($str) {
|
||||||
return dgettext("pro", $str);
|
return dgettext("pro", $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Application_Common_LocaleHelper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return an array of all ISO 639-1 language codes and their corresponding translated language names
|
||||||
|
*
|
||||||
|
* @return array the array of language codes to names
|
||||||
|
*/
|
||||||
|
public static function getISO6391LanguageCodes() {
|
||||||
|
/**
|
||||||
|
* From: http://www.binarytides.com/php-array-of-iso-639-1-language-codes-and-names/
|
||||||
|
*
|
||||||
|
* ISO 639-1 Language Codes
|
||||||
|
* References :
|
||||||
|
* 1. http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
||||||
|
* 2. http://blog.xoundboy.com/?p=235
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'en' => _('English'),
|
||||||
|
'aa' => _('Afar'),
|
||||||
|
'ab' => _('Abkhazian'),
|
||||||
|
'af' => _('Afrikaans'),
|
||||||
|
'am' => _('Amharic'),
|
||||||
|
'ar' => _('Arabic'),
|
||||||
|
'as' => _('Assamese'),
|
||||||
|
'ay' => _('Aymara'),
|
||||||
|
'az' => _('Azerbaijani'),
|
||||||
|
'ba' => _('Bashkir'),
|
||||||
|
'be' => _('Belarusian'),
|
||||||
|
'bg' => _('Bulgarian'),
|
||||||
|
'bh' => _('Bihari'),
|
||||||
|
'bi' => _('Bislama'),
|
||||||
|
'bn' => _('Bengali/Bangla'),
|
||||||
|
'bo' => _('Tibetan'),
|
||||||
|
'br' => _('Breton'),
|
||||||
|
'ca' => _('Catalan'),
|
||||||
|
'co' => _('Corsican'),
|
||||||
|
'cs' => _('Czech'),
|
||||||
|
'cy' => _('Welsh'),
|
||||||
|
'da' => _('Danish'),
|
||||||
|
'de' => _('German'),
|
||||||
|
'dz' => _('Bhutani'),
|
||||||
|
'el' => _('Greek'),
|
||||||
|
'eo' => _('Esperanto'),
|
||||||
|
'es' => _('Spanish'),
|
||||||
|
'et' => _('Estonian'),
|
||||||
|
'eu' => _('Basque'),
|
||||||
|
'fa' => _('Persian'),
|
||||||
|
'fi' => _('Finnish'),
|
||||||
|
'fj' => _('Fiji'),
|
||||||
|
'fo' => _('Faeroese'),
|
||||||
|
'fr' => _('French'),
|
||||||
|
'fy' => _('Frisian'),
|
||||||
|
'ga' => _('Irish'),
|
||||||
|
'gd' => _('Scots/Gaelic'),
|
||||||
|
'gl' => _('Galician'),
|
||||||
|
'gn' => _('Guarani'),
|
||||||
|
'gu' => _('Gujarati'),
|
||||||
|
'ha' => _('Hausa'),
|
||||||
|
'hi' => _('Hindi'),
|
||||||
|
'hr' => _('Croatian'),
|
||||||
|
'hu' => _('Hungarian'),
|
||||||
|
'hy' => _('Armenian'),
|
||||||
|
'ia' => _('Interlingua'),
|
||||||
|
'ie' => _('Interlingue'),
|
||||||
|
'ik' => _('Inupiak'),
|
||||||
|
'in' => _('Indonesian'),
|
||||||
|
'is' => _('Icelandic'),
|
||||||
|
'it' => _('Italian'),
|
||||||
|
'iw' => _('Hebrew'),
|
||||||
|
'ja' => _('Japanese'),
|
||||||
|
'ji' => _('Yiddish'),
|
||||||
|
'jw' => _('Javanese'),
|
||||||
|
'ka' => _('Georgian'),
|
||||||
|
'kk' => _('Kazakh'),
|
||||||
|
'kl' => _('Greenlandic'),
|
||||||
|
'km' => _('Cambodian'),
|
||||||
|
'kn' => _('Kannada'),
|
||||||
|
'ko' => _('Korean'),
|
||||||
|
'ks' => _('Kashmiri'),
|
||||||
|
'ku' => _('Kurdish'),
|
||||||
|
'ky' => _('Kirghiz'),
|
||||||
|
'la' => _('Latin'),
|
||||||
|
'ln' => _('Lingala'),
|
||||||
|
'lo' => _('Laothian'),
|
||||||
|
'lt' => _('Lithuanian'),
|
||||||
|
'lv' => _('Latvian/Lettish'),
|
||||||
|
'mg' => _('Malagasy'),
|
||||||
|
'mi' => _('Maori'),
|
||||||
|
'mk' => _('Macedonian'),
|
||||||
|
'ml' => _('Malayalam'),
|
||||||
|
'mn' => _('Mongolian'),
|
||||||
|
'mo' => _('Moldavian'),
|
||||||
|
'mr' => _('Marathi'),
|
||||||
|
'ms' => _('Malay'),
|
||||||
|
'mt' => _('Maltese'),
|
||||||
|
'my' => _('Burmese'),
|
||||||
|
'na' => _('Nauru'),
|
||||||
|
'ne' => _('Nepali'),
|
||||||
|
'nl' => _('Dutch'),
|
||||||
|
'no' => _('Norwegian'),
|
||||||
|
'oc' => _('Occitan'),
|
||||||
|
'om' => _('(Afan)/Oromoor/Oriya'),
|
||||||
|
'pa' => _('Punjabi'),
|
||||||
|
'pl' => _('Polish'),
|
||||||
|
'ps' => _('Pashto/Pushto'),
|
||||||
|
'pt' => _('Portuguese'),
|
||||||
|
'qu' => _('Quechua'),
|
||||||
|
'rm' => _('Rhaeto-Romance'),
|
||||||
|
'rn' => _('Kirundi'),
|
||||||
|
'ro' => _('Romanian'),
|
||||||
|
'ru' => _('Russian'),
|
||||||
|
'rw' => _('Kinyarwanda'),
|
||||||
|
'sa' => _('Sanskrit'),
|
||||||
|
'sd' => _('Sindhi'),
|
||||||
|
'sg' => _('Sangro'),
|
||||||
|
'sh' => _('Serbo-Croatian'),
|
||||||
|
'si' => _('Singhalese'),
|
||||||
|
'sk' => _('Slovak'),
|
||||||
|
'sl' => _('Slovenian'),
|
||||||
|
'sm' => _('Samoan'),
|
||||||
|
'sn' => _('Shona'),
|
||||||
|
'so' => _('Somali'),
|
||||||
|
'sq' => _('Albanian'),
|
||||||
|
'sr' => _('Serbian'),
|
||||||
|
'ss' => _('Siswati'),
|
||||||
|
'st' => _('Sesotho'),
|
||||||
|
'su' => _('Sundanese'),
|
||||||
|
'sv' => _('Swedish'),
|
||||||
|
'sw' => _('Swahili'),
|
||||||
|
'ta' => _('Tamil'),
|
||||||
|
'te' => _('Tegulu'),
|
||||||
|
'tg' => _('Tajik'),
|
||||||
|
'th' => _('Thai'),
|
||||||
|
'ti' => _('Tigrinya'),
|
||||||
|
'tk' => _('Turkmen'),
|
||||||
|
'tl' => _('Tagalog'),
|
||||||
|
'tn' => _('Setswana'),
|
||||||
|
'to' => _('Tonga'),
|
||||||
|
'tr' => _('Turkish'),
|
||||||
|
'ts' => _('Tsonga'),
|
||||||
|
'tt' => _('Tatar'),
|
||||||
|
'tw' => _('Twi'),
|
||||||
|
'uk' => _('Ukrainian'),
|
||||||
|
'ur' => _('Urdu'),
|
||||||
|
'uz' => _('Uzbek'),
|
||||||
|
'vi' => _('Vietnamese'),
|
||||||
|
'vo' => _('Volapuk'),
|
||||||
|
'wo' => _('Wolof'),
|
||||||
|
'xh' => _('Xhosa'),
|
||||||
|
'yo' => _('Yoruba'),
|
||||||
|
'zh' => _('Chinese'),
|
||||||
|
'zu' => _('Zulu'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@ class LocaleController extends Zend_Controller_Action
|
||||||
"You haven't added any webstreams" => _("You haven't added any webstreams"),
|
"You haven't added any webstreams" => _("You haven't added any webstreams"),
|
||||||
"Learn about tracks" => _("Learn about tracks"),
|
"Learn about tracks" => _("Learn about tracks"),
|
||||||
"Learn about playlists" => _("Learn about playlists"),
|
"Learn about playlists" => _("Learn about playlists"),
|
||||||
|
"Learn about podcasts" => _("Learn about podcasts"),
|
||||||
"Learn about smart blocks" => _("Learn about smart blocks"),
|
"Learn about smart blocks" => _("Learn about smart blocks"),
|
||||||
"Learn about webstreams" => _("Learn about webstreams"),
|
"Learn about webstreams" => _("Learn about webstreams"),
|
||||||
"Click 'New' to create one." => _("Click 'New' to create one."),
|
"Click 'New' to create one." => _("Click 'New' to create one."),
|
||||||
|
|
|
@ -92,13 +92,16 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||||
<?php echo $this->navigation()->menu(); ?>
|
<?php echo $this->navigation()->menu(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
<?php
|
<?php
|
||||||
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
$partitions = Application_Model_Systemstatus::GetDiskInfo();
|
||||||
$status = new StdClass;
|
$status = new StdClass;
|
||||||
$disk = $partitions[0];
|
$disk = $partitions[0];
|
||||||
$used = $disk->totalSpace-$disk->totalFreeSpace;
|
$used = $disk->totalSpace-$disk->totalFreeSpace;
|
||||||
$total = $disk->totalSpace;
|
$total = $disk->totalSpace;
|
||||||
|
echo "var remainingDiskSpace = ".$disk->totalFreeSpace;
|
||||||
?>
|
?>
|
||||||
|
</script>
|
||||||
<div id="disk_usage" style="height: 13px; position:fixed; bottom: 5px; left: 10px;">
|
<div id="disk_usage" style="height: 13px; position:fixed; bottom: 5px; left: 10px;">
|
||||||
<!--<div style="padding-bottom: 2px;">Disk Usage</div>-->
|
<!--<div style="padding-bottom: 2px;">Disk Usage</div>-->
|
||||||
<div class="disk_usage_progress_bar"></div>
|
<div class="disk_usage_progress_bar"></div>
|
||||||
|
|
|
@ -341,6 +341,9 @@ class Application_Service_PodcastService
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function addEscapedChild($node, $name, $value = null, $namespace = null) {
|
private static function addEscapedChild($node, $name, $value = null, $namespace = null) {
|
||||||
|
if (empty($value)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$child = $node->addChild($name, null, $namespace);
|
$child = $node->addChild($name, null, $namespace);
|
||||||
$child->{0} = $value;
|
$child->{0} = $value;
|
||||||
return $child;
|
return $child;
|
||||||
|
@ -399,7 +402,7 @@ class Application_Service_PodcastService
|
||||||
//link - do we need this?
|
//link - do we need this?
|
||||||
|
|
||||||
//pubDate
|
//pubDate
|
||||||
self::addEscapedChild($item, "pubDate", $episode->getDbPublicationDate());
|
self::addEscapedChild($item, "pubDate", gmdate(DATE_RFC2822, strtotime($episode->getDbPublicationDate())));
|
||||||
|
|
||||||
//category
|
//category
|
||||||
foreach($itunesCategories as $c) {
|
foreach($itunesCategories as $c) {
|
||||||
|
@ -416,7 +419,7 @@ class Application_Service_PodcastService
|
||||||
//encolsure - url, length, type attribs
|
//encolsure - url, length, type attribs
|
||||||
$enclosure = $item->addChild("enclosure");
|
$enclosure = $item->addChild("enclosure");
|
||||||
$enclosure->addAttribute("url", $episode->getDbDownloadUrl());
|
$enclosure->addAttribute("url", $episode->getDbDownloadUrl());
|
||||||
$enclosure->addAttribute("length", Application_Common_DateHelper::calculateLengthInSeconds($publishedFile->getDbLength()));
|
$enclosure->addAttribute("length", $publishedFile->getDbFilesize());
|
||||||
$enclosure->addAttribute("type", $publishedFile->getDbMime());
|
$enclosure->addAttribute("type", $publishedFile->getDbMime());
|
||||||
|
|
||||||
//itunes:subtitle
|
//itunes:subtitle
|
||||||
|
|
|
@ -39,7 +39,13 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label><?php echo _("Language") ?></label>
|
<label><?php echo _("Language") ?></label>
|
||||||
<input name="podcast_language" ng-model="podcast.language" type="text"/>
|
<select name="podcast_language" ng-model="podcast.language">
|
||||||
|
<?php
|
||||||
|
foreach(Application_Common_LocaleHelper::getISO6391LanguageCodes() as $code=>$lang) {
|
||||||
|
echo "<option value='$code'>$lang</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -49,7 +55,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label><?php echo _("Link") ?></label>
|
<label><?php echo _("Link") ?></label>
|
||||||
<input name="podcast_link" ng-model="podcast.link" type="text"/>
|
<input name="podcast_link" ng-model="podcast.link" type="url"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#schedule-add-show dl {
|
#schedule-add-show dl {
|
||||||
padding: 8px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -51,7 +49,6 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
min-width: 103px;
|
min-width: 103px;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
clear: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#schedule-add-show dt.big {
|
#schedule-add-show dt.big {
|
||||||
|
@ -124,7 +121,14 @@ label.wrapp-label input[type="checkbox"] {
|
||||||
}
|
}
|
||||||
|
|
||||||
#add_show_hosts-element > label {
|
#add_show_hosts-element > label {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -moz-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: -webkit-flex;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
-webkit-align-items: flex-end;
|
||||||
|
-moz-align-items: flex-end;
|
||||||
|
-ms-align-items: flex-end;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ div.btn > span {
|
||||||
border: 1px solid #5b5b5b;
|
border: 1px solid #5b5b5b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_empty_image {
|
.empty_placeholder_image {
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
|
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
@ -171,7 +171,7 @@ div.btn > span {
|
||||||
padding-right: 2px; /* For the webstream icon */
|
padding-right: 2px; /* For the webstream icon */
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_empty {
|
.empty_placeholder {
|
||||||
display: none;
|
display: none;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -181,14 +181,14 @@ div.btn > span {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_empty a {
|
.empty_placeholder a {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
line-height: 37px;
|
line-height: 37px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #FF5D1A;
|
color: #FF5D1A;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_empty a:visited {
|
.empty_placeholder a:visited {
|
||||||
color: #CE3C01;
|
color: #CE3C01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4019,11 +4019,13 @@ li .ui-state-hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.podcast-metadata label,
|
.podcast-metadata label,
|
||||||
.podcast-metadata input,
|
.podcast-metadata input:not([type="checkbox"]),
|
||||||
|
.podcast-metadata select,
|
||||||
.podcast-metadata textarea,
|
.podcast-metadata textarea,
|
||||||
.media-metadata label,
|
.media-metadata label,
|
||||||
.media-metadata input,
|
.media-metadata input:not([type="checkbox"]),
|
||||||
.media-metadata textarea{
|
.media-metadata select,
|
||||||
|
.media-metadata textarea {
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4038,9 +4040,11 @@ li .ui-state-hover {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.podcast-metadata input[type="text"],
|
.podcast-metadata input:not([type="checkbox"]),
|
||||||
|
.podcast-metadata select,
|
||||||
.podcast-metadata textarea,
|
.podcast-metadata textarea,
|
||||||
.media-metadata input[type="text"],
|
.media-metadata input:not([type="checkbox"]),
|
||||||
|
.media-metadata select,
|
||||||
.media-metadata textarea {
|
.media-metadata textarea {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
|
@ -69,30 +69,27 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"timeline");
|
"timeline");
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.fnDrawCallback = function fnLibDrawCallback() {
|
/**
|
||||||
|
*
|
||||||
|
* @param {jQuery} table
|
||||||
|
*/
|
||||||
|
mod.drawEmptyPlaceholder = function (table) {
|
||||||
|
var emptyRow = table.find('tr:has(td.dataTables_empty)'),
|
||||||
|
wrapper = table.closest(".dataTables_wrapper");
|
||||||
|
|
||||||
mod.redrawChosen();
|
var libEmpty = wrapper.find('.empty_placeholder');
|
||||||
mod.checkToolBarIcons();
|
|
||||||
|
|
||||||
var cb = $('th.library_checkbox'),
|
|
||||||
emptyRow = $('#library_display').find('tr:has(td.dataTables_empty)');
|
|
||||||
if (cb.find("input").length == 0) {
|
|
||||||
cb.append("<input id='super-checkbox' type='checkbox'>");
|
|
||||||
}
|
|
||||||
|
|
||||||
var libEmpty = $('#library_empty');
|
|
||||||
if (emptyRow.length > 0) {
|
if (emptyRow.length > 0) {
|
||||||
emptyRow.hide();
|
emptyRow.hide();
|
||||||
var mediaType = parseInt($('.media_type_selector.selected').data('selection-id')),
|
var mediaType = parseInt($('.media_type_selector.selected').data('selection-id')),
|
||||||
img = $('#library_empty_image');
|
img = wrapper.find('.empty_placeholder_image');
|
||||||
// Remove all classes for when we change between empty media types
|
// Remove all classes for when we change between empty media types
|
||||||
img.removeClass(function() {
|
img.removeClass(function() {
|
||||||
return $( this ).attr( "class" );
|
return $(this).attr("class");
|
||||||
});
|
});
|
||||||
|
|
||||||
var opts = AIRTIME.library.placeholder(mediaType);
|
var opts = AIRTIME.library.placeholder(mediaType);
|
||||||
img.addClass("icon-white " + opts.icon);
|
img.addClass("empty_placeholder_image icon-white " + opts.icon);
|
||||||
$('#library_empty_text').html(
|
wrapper.find('.empty_placeholder_text').html(
|
||||||
$.i18n._("You haven't added any " + opts.media + ".")
|
$.i18n._("You haven't added any " + opts.media + ".")
|
||||||
+ "<br/>" + $.i18n._(opts.subtext)
|
+ "<br/>" + $.i18n._(opts.subtext)
|
||||||
+ "<br/><a target='_blank' href='" + opts.href + "'>" + $.i18n._("Learn about " + opts.media) + "</a>"
|
+ "<br/><a target='_blank' href='" + opts.href + "'>" + $.i18n._("Learn about " + opts.media) + "</a>"
|
||||||
|
@ -102,6 +99,19 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
} else {
|
} else {
|
||||||
libEmpty.hide();
|
libEmpty.hide();
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
mod.fnDrawCallback = function fnLibDrawCallback() {
|
||||||
|
var table = $('#library_display'),
|
||||||
|
cb = table.find('th[class*="checkbox"]');
|
||||||
|
if (cb.find("input").length == 0) {
|
||||||
|
cb.append("<input id='super-checkbox' type='checkbox'>");
|
||||||
|
}
|
||||||
|
|
||||||
|
mod.redrawChosen();
|
||||||
|
mod.checkToolBarIcons();
|
||||||
|
|
||||||
|
mod.drawEmptyPlaceholder(table);
|
||||||
|
|
||||||
var sortable;
|
var sortable;
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,6 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
});
|
});
|
||||||
|
|
||||||
mod.DataTableTypeEnum = Object.freeze({
|
mod.DataTableTypeEnum = Object.freeze({
|
||||||
//FILE: "au",
|
|
||||||
LIBRARY : "library",
|
LIBRARY : "library",
|
||||||
PODCAST : "podcast",
|
PODCAST : "podcast",
|
||||||
PODCAST_EPISODES: "podcastEpisodes"
|
PODCAST_EPISODES: "podcastEpisodes"
|
||||||
|
@ -661,8 +660,6 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
type = (type === undefined) ? AIRTIME.library.MediaTypeIntegerEnum.DEFAULT : type;
|
type = (type === undefined) ? AIRTIME.library.MediaTypeIntegerEnum.DEFAULT : type;
|
||||||
aoData.push({name: "type", value: type});
|
aoData.push({name: "type", value: type});
|
||||||
|
|
||||||
//getUsabilityHint();
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
"dataType": 'json',
|
"dataType": 'json',
|
||||||
"type": "POST",
|
"type": "POST",
|
||||||
|
@ -678,7 +675,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
+ $.i18n._(" of ") + data.iTotalRecords
|
+ $.i18n._(" of ") + data.iTotalRecords
|
||||||
+ $.i18n._(" records")
|
+ $.i18n._(" records")
|
||||||
);
|
);
|
||||||
$('#library_empty').hide();
|
$('.empty_placeholder').hide();
|
||||||
$libTable.find('tr:has(td.dataTables_empty)').show();
|
$libTable.find('tr:has(td.dataTables_empty)').show();
|
||||||
} else {
|
} else {
|
||||||
filterMessage.text("");
|
filterMessage.text("");
|
||||||
|
@ -736,7 +733,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"oLanguage": getLibraryDatatableStrings(),
|
"oLanguage": getLibraryDatatableStrings(),
|
||||||
|
|
||||||
// z = ColResize, R = ColReorder, C = ColVis
|
// z = ColResize, R = ColReorder, C = ColVis
|
||||||
"sDom": 'Rf<"dt-process-rel"r><"H"<"library_toolbar"C>><"dataTables_scrolling"t<"#library_empty"<"#library_empty_image"><"#library_empty_text">>><"F"lip>>',
|
"sDom": 'Rf<"dt-process-rel"r><"H"<"library_toolbar"C>><"dataTables_scrolling"t<".empty_placeholder"<".empty_placeholder_image"><".empty_placeholder_text">>><"F"lip>>',
|
||||||
|
|
||||||
"oColVis": {
|
"oColVis": {
|
||||||
"sAlign": "right",
|
"sAlign": "right",
|
||||||
|
@ -870,9 +867,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
if (r.status === 403) {
|
if (r.status === 403) {
|
||||||
// Hide the processing div
|
// Hide the processing div
|
||||||
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
||||||
$('#library_empty_text').text($.i18n._("You don't have permission to view the library."));
|
$('.empty_placeholder_text').text($.i18n._("You don't have permission to view the library."));
|
||||||
|
|
||||||
$('#library_empty').show();
|
$('.empty_placeholder').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,7 +880,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
table = mod.DataTableTypeEnum.LIBRARY;
|
table = mod.DataTableTypeEnum.LIBRARY;
|
||||||
}
|
}
|
||||||
|
|
||||||
AIRTIME.library.setCurrentTable(table);
|
AIRTIME.library.setCurrentTable(table, false);
|
||||||
|
oTable = $datatables[table];
|
||||||
setColumnFilter(oTable);
|
setColumnFilter(oTable);
|
||||||
oTable.fnSetFilteringDelay(350);
|
oTable.fnSetFilteringDelay(350);
|
||||||
|
|
||||||
|
@ -1252,18 +1250,24 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/**
|
/**
|
||||||
* Show the given table in the left-hand pane of the dashboard and give it internal focus
|
* Show the given table in the left-hand pane of the dashboard and give it internal focus
|
||||||
*
|
*
|
||||||
* @param table the table to show
|
* @param {string} table the string name of the table to show
|
||||||
|
* @param {boolean} [redraw] whether or not to redraw the table
|
||||||
*/
|
*/
|
||||||
mod.setCurrentTable = function (table) {
|
mod.setCurrentTable = function (table, redraw) {
|
||||||
if (oTable && oTable === $datatables[mod.DataTableTypeEnum.PODCAST_EPISODES]) {
|
if (typeof redraw === 'undefined') {
|
||||||
oTable.fnClearTable();
|
redraw = true;
|
||||||
}
|
}
|
||||||
var dt = $datatables[table],
|
var dt = $datatables[table],
|
||||||
wrapper = $(dt).closest(".dataTables_wrapper");
|
wrapper = $(dt).closest(".dataTables_wrapper");
|
||||||
$("#library_content").find(".dataTables_wrapper").hide();
|
if (oTable && typeof oTable.fnClearTable === 'function') {
|
||||||
wrapper.show();
|
oTable.fnClearTable();
|
||||||
|
}
|
||||||
|
// Don't redraw if we're switching to another hash for the library table
|
||||||
|
$.when(redraw && oTable != dt ? dt.fnDraw() : function () {}).done(function () {
|
||||||
|
$("#library_content").find(".dataTables_wrapper").hide();
|
||||||
|
wrapper.show();
|
||||||
|
});
|
||||||
oTable = dt;
|
oTable = dt;
|
||||||
oTable.fnDraw();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.getCurrentTable = function () {
|
mod.getCurrentTable = function () {
|
||||||
|
@ -1371,6 +1375,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
sAjaxSource : ajaxSourceURL,
|
sAjaxSource : ajaxSourceURL,
|
||||||
oColReorder: {
|
oColReorder: {
|
||||||
iFixedColumns: 1 // Checkbox
|
iFixedColumns: 1 // Checkbox
|
||||||
|
},
|
||||||
|
fnDrawCallback: function () {
|
||||||
|
AIRTIME.library.drawEmptyPlaceholder($(this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -592,6 +592,10 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
*/
|
*/
|
||||||
mod.importSelectedEpisodes = function (episodes, dt) {
|
mod.importSelectedEpisodes = function (episodes, dt) {
|
||||||
$.each(episodes, function () {
|
$.each(episodes, function () {
|
||||||
|
if (this.enclosure.length > remainingDiskSpace) {
|
||||||
|
alert("You don't have enough disk space to import " + this.title);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.file && Object.keys(this.file).length > 0) return false;
|
if (this.file && Object.keys(this.file).length > 0) return false;
|
||||||
var podcastId = this.podcast_id;
|
var podcastId = this.podcast_id;
|
||||||
$.post(endpoint + podcastId + '/episodes', JSON.stringify({
|
$.post(endpoint + podcastId + '/episodes', JSON.stringify({
|
||||||
|
@ -600,6 +604,8 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
}), function () {
|
}), function () {
|
||||||
dt.reload(podcastId);
|
dt.reload(podcastId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
remainingDiskSpace -= this.enclosure.length;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -631,6 +637,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
}
|
}
|
||||||
params = $.extend(true, params,
|
params = $.extend(true, params,
|
||||||
{
|
{
|
||||||
|
bDeferRender: true,
|
||||||
oColVis: {
|
oColVis: {
|
||||||
aiExclude: [0, 1],
|
aiExclude: [0, 1],
|
||||||
oColReorder: {
|
oColReorder: {
|
||||||
|
|
|
@ -196,7 +196,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
// In case we're adding a tab that wraps to the next row
|
// In case we're adding a tab that wraps to the next row
|
||||||
// It's better to call this here so we don't have to call it in multiple places
|
// It's better to call this here so we don't have to call it in multiple places
|
||||||
mod.onResize();
|
mod.onResize();
|
||||||
AIRTIME.library.fnRedraw();
|
// AIRTIME.library.fnRedraw();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -61,6 +61,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"bJQueryUI": true,
|
"bJQueryUI": true,
|
||||||
"bAutoWidth": false,
|
"bAutoWidth": false,
|
||||||
"aaSorting": [],
|
"aaSorting": [],
|
||||||
|
"iDisplayLength": 25,
|
||||||
|
"aLengthMenu": [25, 50, 100],
|
||||||
"oLanguage" : getDatatablesStrings({
|
"oLanguage" : getDatatablesStrings({
|
||||||
"sEmptyTable": $.i18n._(""),
|
"sEmptyTable": $.i18n._(""),
|
||||||
"sZeroRecords": $.i18n._("No matching results found.")
|
"sZeroRecords": $.i18n._("No matching results found.")
|
||||||
|
@ -72,8 +74,11 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"iOverlayFade": 0
|
"iOverlayFade": 0
|
||||||
},
|
},
|
||||||
// z = ColResize, R = ColReorder, C = ColVis
|
// z = ColResize, R = ColReorder, C = ColVis
|
||||||
"sDom": 'Rf<"dt-process-rel"r><"H"<"table_toolbar"C>><"dataTables_scrolling"t<"#library_empty"<"#library_empty_image"><"#library_empty_text">>><"F"lip>>',
|
"sDom": 'Rf<"dt-process-rel"r><"H"<"table_toolbar"C>><"dataTables_scrolling"t<".empty_placeholder"<".empty_placeholder_image"><".empty_placeholder_text">>><"F"lip>>',
|
||||||
|
|
||||||
|
"fnPreDrawCallback": function () {
|
||||||
|
$("#draggingContainer").remove();
|
||||||
|
},
|
||||||
"fnServerData": self._fetchData
|
"fnServerData": self._fetchData
|
||||||
//"fnInitComplete" : function() { self._setupEventHandlers(bItemSelection) }
|
//"fnInitComplete" : function() { self._setupEventHandlers(bItemSelection) }
|
||||||
//"fnDrawCallback" : self._tableDrawCallback
|
//"fnDrawCallback" : self._tableDrawCallback
|
||||||
|
@ -371,10 +376,10 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/*
|
/*
|
||||||
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
||||||
$.getJSON( "ajax/library_placeholders.json", function( data ) {
|
$.getJSON( "ajax/library_placeholders.json", function( data ) {
|
||||||
$('#library_empty_text').text($.i18n._(data.unauthorized));
|
$('.empty_placeholder_text').text($.i18n._(data.unauthorized));
|
||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
$('#library_empty').show();
|
$('.empty_placeholder').show();
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue