Fixed table presentations with new bootstrap, added HTML::abbr(), added public access to Database::config(), enabled DB compression to be disabled in database.php

This commit is contained in:
Deon George
2016-05-03 11:01:28 +10:00
parent 113597f9eb
commit 8f659c50c6
13 changed files with 126 additions and 226 deletions

View File

@@ -12,6 +12,26 @@
abstract class lnApp_HTML extends Kohana_HTML {
public static $windowed_urls = TRUE;
/**
* Limit the number of characters that some text takes up.
* If the Text is smaller than the number of characters to display, then it is
* displayed normally.
*
* @param string Text to re-format
* @param int Number of characters to display
*/
public static function abbr($string,$chars=0) {
if (! $chars OR strlen($string)<=$chars)
return $string;
return sprintf('<abbr title="%s">%s</abbr>',$string,Text::limit_chars($string,$chars));
}
/**
* If the string is blank, then return &ampnbsp;
*
* @param string Text to print.
*/
public static function nbsp($string) {
if (strlen((string)$string))
return $string;