Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing TableTools, fixing default stream mount #1140

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airtime_mvc/application/configs/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

// Defaults
define('DEFAULT_LOGO_PLACEHOLDER', 1);
define('DEFAULT_LOGO_FILE', 'images/airtime_logo.png');
define('DEFAULT_LOGO_FILE', 'images/logotype_white.png');
define('DEFAULT_TIMESTAMP_FORMAT', 'Y-m-d H:i:s');
define('DEFAULT_MICROTIME_FORMAT', 'Y-m-d H:i:s.u');
define('DEFAULT_ICECAST_PORT', 8000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public function indexAction()
$this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript');

$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
Expand All @@ -56,7 +54,6 @@ public function indexAction()
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript');

$this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']);
Expand Down
4 changes: 2 additions & 2 deletions airtime_mvc/application/models/StreamSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ public static function getDefaults($prefix) {
'output' => 'icecast',
'user' => $config['stationId'],
'pass' => Application_Model_Preference::getDefaultIcecastPassword(),
// Kind of ugly... convert prefix int to ascii char
'mount' => $config['stationId'] . '_' . chr($prefix[1] + 96),
// Forcing default mountpoint string for now
'mount' => 'airtime_128',
);
}

Expand Down
2 changes: 1 addition & 1 deletion airtime_mvc/application/views/scripts/embed/player.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

Html5Player.prototype.play = function() {
console.log('play');
playerhtml5_audio.src = this.settings.url+'?'+Math.floor(Math.random() * Math.floor(100000));
playerhtml5_audio.src = this.settings.url; //+'?'+Math.floor(Math.random() * Math.floor(100000));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was intended as a cache buster but it looks broken anyway.

playerhtml5_audio.play();
togglePlayStopButton();
};
Expand Down
483 changes: 219 additions & 264 deletions airtime_mvc/application/views/scripts/index/index.phtml

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions airtime_mvc/application/views/scripts/login/index.phtml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<div class="login_box">
<div class="logobox">&nbsp;</div>
<h2><?php echo _("Login") ?></h2>
<div class="logobox"></div>
<h2>Login</h2>
<div id="login" class="login-content clearfix">
<?php if(isset($this->demo) && $this->demo == 1){?>
hairmare marked this conversation as resolved.
Show resolved Hide resolved
<p style="font-weight:bold">
<?php echo sprintf(_("Welcome to the %s demo! You can log in using the username 'admin' and the password 'admin'."), PRODUCT_NAME)?>
</p>
<?php }?>
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
<?php echo $this->form; ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion airtime_mvc/public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ input[type="checkbox"] {
.logobox {
height:120px;
text-align:center;
background:url(images/airtime_logo_big.png) no-repeat 50% 0;
background:url(images/logotype_white.png) no-repeat 50% 0;
}

.login {
Expand Down
Binary file added airtime_mvc/public/images/logotype_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 4 additions & 63 deletions airtime_mvc/public/js/airtime/playouthistory/historytable.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,10 @@ var AIRTIME = (function(AIRTIME) {
mod = AIRTIME.history;

var $historyContentDiv;

var oTableTools = {
"sSwfPath": baseUrl+"js/datatables/plugin/TableTools-2.1.5/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "copy",
"fnComplete": function(nButton, oConfig, oFlash, text) {
var lines = text.split('\n').length,
len = this.s.dt.nTFoot === null ? lines-1 : lines-2,
plural = (len==1) ? "" : "s";
alert(sprintf($.i18n._('Copied %s row%s to the clipboard'), len, plural));
},
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "csv",
"fnClick": setFlashFileName,
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "pdf",
"fnClick": setFlashFileName,
"sPdfOrientation": "landscape",
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
},
{
"sExtends": "print",
"sInfo" : sprintf($.i18n._("%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished."), "<h6>", "</h6><p>"),
//set because only the checkbox row is not sortable.
"mColumns": "sortable"
}
]
};


var lengthMenu = [[10, 25, 50, 100, 500, -1], [10, 25, 50, 100, 500, $.i18n._("All")]];

var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>';
var sDom = 'l<"dt-process-rel"r><"H"><"dataTables_scrolling"t><"F"ip>';

var selectedLogItems = {};

Expand Down Expand Up @@ -155,25 +119,6 @@ var AIRTIME = (function(AIRTIME) {
}
return filename;
}

function setFlashFileName( nButton, oConfig, oFlash ) {
var filename = getFileName(oConfig.sExtends);
oFlash.setFileName( filename );

if (oConfig.sExtends == "pdf") {
this.fnSetText( oFlash,
"title:"+ this.fnGetTitle(oConfig) +"\n"+
"message:"+ oConfig.sPdfMessage +"\n"+
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
"orientation:"+ oConfig.sPdfOrientation +"\n"+
"size:"+ oConfig.sPdfSize +"\n"+
"--/TableToolsOpts--\n" +
this.fnGetTableData(oConfig));
}
else {
this.fnSetText(oFlash, this.fnGetTableData(oConfig));
}
}

/* This callback can be used for all history tables */
function fnServerData( sSource, aoData, fnCallback ) {
Expand Down Expand Up @@ -298,7 +243,6 @@ var AIRTIME = (function(AIRTIME) {
"</button>" +
"</div>");


$menu.append("<div class='btn-group'>" +
"<button class='btn btn-small dropdown-toggle' data-toggle='dropdown'>" +
$.i18n._("Select")+" <span class='caret'></span>" +
Expand Down Expand Up @@ -337,7 +281,6 @@ var AIRTIME = (function(AIRTIME) {
oTable = $historyTableDiv.dataTable( {

"aoColumns": columns,

"bProcessing": true,
"bServerSide": true,
"sAjaxSource": baseUrl+"playouthistory/file-history-feed",
Expand All @@ -356,8 +299,7 @@ var AIRTIME = (function(AIRTIME) {
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
"sDom": sDom,
});
oTable.fnSetFilteringDelay(350);

Expand Down Expand Up @@ -429,8 +371,7 @@ var AIRTIME = (function(AIRTIME) {
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bAutoWidth": true,
"sDom": sDom,
"oTableTools": oTableTools
"sDom": sDom,
});
oTable.fnSetFilteringDelay(350);

Expand Down
Loading