1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

Include tabledata.js only once, before footer

This commit is contained in:
Afterster 2014-11-20 20:55:13 +01:00
parent d38345268e
commit cd53d38c51
13 changed files with 19 additions and 18 deletions

View file

@ -128,7 +128,7 @@ class Browse extends Query
}
}
}
/**
* show_objects
* This takes an array of objects
@ -476,7 +476,7 @@ class Browse extends Query
{
$this->show_header = $show_header;
}
/**
* Allow the current page to be save into the current session
* @param boolean $update_session
@ -494,7 +494,7 @@ class Browse extends Query
{
return $this->show_header;
}
/**
*
* @return boolean

View file

@ -78,7 +78,7 @@ class Query
if (is_null($id)) {
$this->reset();
$data = self::_serialize($this->_state);
$sql = 'INSERT INTO `tmp_browse` (`sid`, `data`) VALUES(?, ?)';
Dba::write($sql, array($sid, $data));
$this->id = Dba::insert_id();
@ -92,7 +92,7 @@ class Query
$this->id = $id;
$this->_state = self::_unserialize($results['data']);
return true;
}
}
@ -2061,7 +2061,7 @@ class Query
$data = self::_serialize($this->_state);
debug_event('DEBUG', 'Query Store Function called: {'.json_encode($data).'}', '5');
$sql = 'UPDATE `tmp_browse` SET `data` = ? WHERE `sid` = ? AND `id` = ?';
Dba::write($sql, array($data, session_id(), $id));
}

View file

@ -284,6 +284,9 @@ END;
*/
public static function show_footer()
{
if (!defined("TABLE_RENDERED")) {
show_table_render();
}
require_once AmpConfig::get('prefix') . '/templates/footer.inc.php';
if (isset($_REQUEST['profiling'])) {
Dba::show_profile();

View file

@ -19,10 +19,15 @@
//
$(document).ready(function() {
if ($('.tabledata').mediaTable()) {
InitTableData();
});
function InitTableData()
{
if ($('.tabledata').mediaTable()) {
ResponsiveElements.init();
setTimeout(function() {
$('.tabledata').mediaTable('analyze');
}, 1);
}
});
}

View file

@ -70,7 +70,7 @@ switch ($_REQUEST['action']) {
$browse->set_filter('catalog', null);
unset($_SESSION['catalog']);
}
ob_start();
$browse->show_objects();
$results[$browse->get_content_div()] = ob_get_clean();
@ -182,7 +182,7 @@ switch ($_REQUEST['action']) {
}
break;
}
ob_start();
$browse->show_objects();
$results[$browse->get_content_div()] = ob_get_clean();

View file

@ -69,5 +69,4 @@ switch ($_REQUEST['action']) {
break;
} // end switch on action
show_table_render(false, true);
UI::show_footer();

View file

@ -102,7 +102,7 @@ if ($limit > 0 && $total > $limit) {
if ($start > 0) {
$current_page = floor($start / $limit);
}
if ($browse->get_use_pages()) {
?>
<span class="list-header-navmenu-border">

View file

@ -155,4 +155,3 @@ if ($directplay_limit > 0) {
?>
</div><br />
<?php } ?>
<?php show_table_render(true, true); ?>

View file

@ -104,5 +104,4 @@ $thcount = 8;
</tr>
<tfoot>
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -106,5 +106,4 @@ $thcount = 8;
</tr>
</tfoot>
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -85,5 +85,4 @@ $thcount = 6;
</tr>
<tfoot>
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -91,5 +91,4 @@ $thcount = 8;
</tr>
</tfoot>
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>

View file

@ -102,5 +102,4 @@ if (isset($video_type) && $video_type != 'video') {
</tr>
</tfoot>
</table>
<?php show_table_render(); ?>
<?php if ($browse->get_show_header()) require AmpConfig::get('prefix') . '/templates/list_header.inc.php'; ?>