Updated tablesorter to 2.10
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class lnApp_HTMLRender {
|
||||
protected static $_unique_vals = array();
|
||||
protected $_unique_vals = array();
|
||||
protected $_x = 0;
|
||||
|
||||
abstract protected function render();
|
||||
@@ -25,6 +25,16 @@ abstract class lnApp_HTMLRender {
|
||||
if (! $args)
|
||||
return static::$_data[$c][$name];
|
||||
|
||||
// Strip out unique values
|
||||
if (in_array($name,$this->_unique_vals))
|
||||
foreach ($args as $u)
|
||||
foreach (static::$_data as $d)
|
||||
if (isset($d[$name]) AND $d[$name] == $u) {
|
||||
unset(static::$_data[$c]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
static::$_data[$c][$name] = array_pop($args);
|
||||
|
||||
return $this;
|
||||
@@ -44,13 +54,11 @@ abstract class lnApp_HTMLRender {
|
||||
if (empty(static::$_data[$this->_x]))
|
||||
$this->record();
|
||||
|
||||
return $this->render();
|
||||
try {
|
||||
return $this->render();
|
||||
}
|
||||
|
||||
// Display the exception message
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ abstract class lnApp_Script extends HTMLRender {
|
||||
protected static $_spacer = "\n";
|
||||
protected static $_c = 0;
|
||||
protected $_items = array('data','media','type');
|
||||
protected $_unique_vals = array('data');
|
||||
|
||||
protected static $_required_keys = array('type','data');
|
||||
|
||||
|
@@ -14,6 +14,7 @@ abstract class lnApp_Style extends HTMLRender {
|
||||
protected static $_spacer = "\n";
|
||||
protected static $_c = 0;
|
||||
protected $_items = array('data','media','type');
|
||||
protected $_unique_vals = array('data');
|
||||
|
||||
protected static $_required_keys = array('type','data');
|
||||
|
||||
|
@@ -201,6 +201,9 @@ $(document).ready(function() {
|
||||
widthFixed : true,
|
||||
headerTemplate : "{content} {icon}", // Add icon for jui theme; new in v2.7!
|
||||
widgets: [ "uitheme", "stickyHeaders", "filter" ],
|
||||
widgetOptions : {
|
||||
stickyHeaders_offset: ".navbar-fixed-top",
|
||||
}
|
||||
|
||||
}).tablesorterPager({
|
||||
// target the pager markup - see the HTML block below
|
||||
@@ -232,6 +235,10 @@ $(document).ready(function() {
|
||||
Style::factory()
|
||||
->type('file')
|
||||
->data('media/vendor/mottie-tablesorter/css/jquery.tablesorter.pager.css');
|
||||
// @todo The theme should be moved from here, but Controller_Media will need to know about admin requests for media/
|
||||
Style::factory()
|
||||
->type('file')
|
||||
->data('media/theme/baseadmin/css/custom/tablesort.css');
|
||||
}
|
||||
|
||||
if ($this->select) {
|
||||
|
Reference in New Issue
Block a user