mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-04 02:09:23 +02:00
Include tabledata.js only once, before footer
This commit is contained in:
parent
d38345268e
commit
cd53d38c51
13 changed files with 19 additions and 18 deletions
|
@ -128,7 +128,7 @@ class Browse extends Query
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* show_objects
|
* show_objects
|
||||||
* This takes an array of objects
|
* This takes an array of objects
|
||||||
|
@ -476,7 +476,7 @@ class Browse extends Query
|
||||||
{
|
{
|
||||||
$this->show_header = $show_header;
|
$this->show_header = $show_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow the current page to be save into the current session
|
* Allow the current page to be save into the current session
|
||||||
* @param boolean $update_session
|
* @param boolean $update_session
|
||||||
|
@ -494,7 +494,7 @@ class Browse extends Query
|
||||||
{
|
{
|
||||||
return $this->show_header;
|
return $this->show_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Query
|
||||||
if (is_null($id)) {
|
if (is_null($id)) {
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$data = self::_serialize($this->_state);
|
$data = self::_serialize($this->_state);
|
||||||
|
|
||||||
$sql = 'INSERT INTO `tmp_browse` (`sid`, `data`) VALUES(?, ?)';
|
$sql = 'INSERT INTO `tmp_browse` (`sid`, `data`) VALUES(?, ?)';
|
||||||
Dba::write($sql, array($sid, $data));
|
Dba::write($sql, array($sid, $data));
|
||||||
$this->id = Dba::insert_id();
|
$this->id = Dba::insert_id();
|
||||||
|
@ -92,7 +92,7 @@ class Query
|
||||||
|
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->_state = self::_unserialize($results['data']);
|
$this->_state = self::_unserialize($results['data']);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2061,7 +2061,7 @@ class Query
|
||||||
$data = self::_serialize($this->_state);
|
$data = self::_serialize($this->_state);
|
||||||
|
|
||||||
debug_event('DEBUG', 'Query Store Function called: {'.json_encode($data).'}', '5');
|
debug_event('DEBUG', 'Query Store Function called: {'.json_encode($data).'}', '5');
|
||||||
|
|
||||||
$sql = 'UPDATE `tmp_browse` SET `data` = ? WHERE `sid` = ? AND `id` = ?';
|
$sql = 'UPDATE `tmp_browse` SET `data` = ? WHERE `sid` = ? AND `id` = ?';
|
||||||
Dba::write($sql, array($data, session_id(), $id));
|
Dba::write($sql, array($data, session_id(), $id));
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,6 +284,9 @@ END;
|
||||||
*/
|
*/
|
||||||
public static function show_footer()
|
public static function show_footer()
|
||||||
{
|
{
|
||||||
|
if (!defined("TABLE_RENDERED")) {
|
||||||
|
show_table_render();
|
||||||
|
}
|
||||||
require_once AmpConfig::get('prefix') . '/templates/footer.inc.php';
|
require_once AmpConfig::get('prefix') . '/templates/footer.inc.php';
|
||||||
if (isset($_REQUEST['profiling'])) {
|
if (isset($_REQUEST['profiling'])) {
|
||||||
Dba::show_profile();
|
Dba::show_profile();
|
||||||
|
|
|
@ -19,10 +19,15 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if ($('.tabledata').mediaTable()) {
|
InitTableData();
|
||||||
|
});
|
||||||
|
|
||||||
|
function InitTableData()
|
||||||
|
{
|
||||||
|
if ($('.tabledata').mediaTable()) {
|
||||||
ResponsiveElements.init();
|
ResponsiveElements.init();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.tabledata').mediaTable('analyze');
|
$('.tabledata').mediaTable('analyze');
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
});
|
}
|
|
@ -70,7 +70,7 @@ switch ($_REQUEST['action']) {
|
||||||
$browse->set_filter('catalog', null);
|
$browse->set_filter('catalog', null);
|
||||||
unset($_SESSION['catalog']);
|
unset($_SESSION['catalog']);
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$browse->show_objects();
|
$browse->show_objects();
|
||||||
$results[$browse->get_content_div()] = ob_get_clean();
|
$results[$browse->get_content_div()] = ob_get_clean();
|
||||||
|
@ -182,7 +182,7 @@ switch ($_REQUEST['action']) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$browse->show_objects();
|
$browse->show_objects();
|
||||||
$results[$browse->get_content_div()] = ob_get_clean();
|
$results[$browse->get_content_div()] = ob_get_clean();
|
||||||
|
|
|
@ -69,5 +69,4 @@ switch ($_REQUEST['action']) {
|
||||||
break;
|
break;
|
||||||
} // end switch on action
|
} // end switch on action
|
||||||
|
|
||||||
show_table_render(false, true);
|
|
||||||
UI::show_footer();
|
UI::show_footer();
|
||||||
|
|
|
@ -102,7 +102,7 @@ if ($limit > 0 && $total > $limit) {
|
||||||
if ($start > 0) {
|
if ($start > 0) {
|
||||||
$current_page = floor($start / $limit);
|
$current_page = floor($start / $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($browse->get_use_pages()) {
|
if ($browse->get_use_pages()) {
|
||||||
?>
|
?>
|
||||||
<span class="list-header-navmenu-border">
|
<span class="list-header-navmenu-border">
|
||||||
|
|
|
@ -155,4 +155,3 @@ if ($directplay_limit > 0) {
|
||||||
?>
|
?>
|
||||||
</div><br />
|
</div><br />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php show_table_render(true, true); ?>
|
|
||||||
|
|
|
@ -104,5 +104,4 @@ $thcount = 8;
|
||||||
</tr>
|
</tr>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
</table>
|
</table>
|
||||||
<?php show_table_render(); ?>
|
|
||||||
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -106,5 +106,4 @@ $thcount = 8;
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<?php show_table_render(); ?>
|
|
||||||
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -85,5 +85,4 @@ $thcount = 6;
|
||||||
</tr>
|
</tr>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
</table>
|
</table>
|
||||||
<?php show_table_render(); ?>
|
|
||||||
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -91,5 +91,4 @@ $thcount = 8;
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<?php show_table_render(); ?>
|
|
||||||
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
|
@ -102,5 +102,4 @@ if (isset($video_type) && $video_type != 'video') {
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<?php show_table_render(); ?>
|
|
||||||
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue