Updated tablesorter to 2.10

This commit is contained in:
Deon George 2013-05-15 22:21:34 +10:00
parent 25d9fbf846
commit 41e777bd9d
10 changed files with 56 additions and 31 deletions

View File

@ -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();
}
}

View File

@ -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');

View File

@ -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');

View File

@ -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) {

View File

@ -0,0 +1,3 @@
.table-striped td {
padding-left: 10px;
}

View File

@ -1,12 +1,16 @@
/* pager wrapper, div */
.tablesorter-pager {
font-size: 14px;
padding: 5px;
}
/* pager wrapper, in thead/tfoot */
td.tablesorter-pager {
background-color: #e6eeee;
margin: 0; /* needed for bootstrap .pager gets a 18px bottom margin */
}
/* pager navigation arrows */
.tablesorter-pager [class^="icon-"] {
.tablesorter-pager img {
vertical-align: middle;
margin-right: 4px;
margin-right: 2px;
cursor: pointer;
}
@ -22,8 +26,6 @@
.tablesorter-pager select {
margin: 0;
padding: 0;
height: 25px;
font-size: 12px;
}
/*** css used when "updateArrows" option is true ***/
@ -37,4 +39,4 @@
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default;
}
}

View File

@ -94,6 +94,7 @@ caption {
}
.tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter.disabled {
background: #eee;
cursor: not-allowed;
}
.tablesorter-bootstrap .tablesorter-filter-row td {
background: #eee;
@ -131,6 +132,8 @@ caption {
border: 0;
}
.table-striped td {
padding-left: 15px;
/* ajax error row */
.tablesorter .tablesorter-errorRow td {
cursor: pointer;
background-color: #e6bf99;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long