diff --git a/include/class.i18n.php b/include/class.i18n.php index 5d411a086d26642b3e075cbd037fd7d02360f7a4..b9bac6202c110bb9652ded88381e8faba3979cf8 100644 --- a/include/class.i18n.php +++ b/include/class.i18n.php @@ -384,6 +384,10 @@ class Internationalization { return self::getDefaultLanguage(); } + static function getCurrentLanguageInfo($user=false) { + return static::getLanguageInfo(static::getCurrentLanguage($user)); + } + static function getCurrentLocale($user=false) { global $thisstaff, $cfg; diff --git a/include/class.queue.php b/include/class.queue.php index 6068f704946e81aa70cb2b4088c2c6b25f6009f2..3cdd0f0a6ff846a3146c91bc8e2ebb2211668ded 100644 --- a/include/class.queue.php +++ b/include/class.queue.php @@ -848,13 +848,17 @@ extends VerySimpleModel { $offset += $a->getWidth($row); $width = $this->width - $offset; + $class = array(); switch ($this->truncate) { - case 'ellipsis': - return sprintf('<span class="%s" style="max-width:%dpx">%s</span>', - 'truncate', $width, $text); + case 'lclip': + $linfo = Internationalization::getCurrentLanguageInfo(); + $class[] = $linfo['direction'] == 'rtl' ? 'ltr' : 'rtl'; case 'clip': + $class[] = 'bleed'; + case 'ellipsis': + $class[] = 'truncate'; return sprintf('<span class="%s" style="max-width:%dpx">%s</span>', - 'truncate bleed', $width, $text); + implode(' ', $class), $width, $text); default: case 'wrap': return $text; @@ -1019,15 +1023,6 @@ extends VerySimpleModel { $this->annotations = JsonDataEncoder::encode($annotations); $this->conditions = JsonDataEncoder::encode($conditions); } - - function save($refetch=false) { - if ($this->__new__ && isset($this->id)) - // The ID is used to synchrize the POST data with the forms API. - // It should not be assumed to be a valid or unique database ID - // number - unset($this->id); - return parent::save($refetch); - } } class QueueColumnGlue @@ -1242,6 +1237,7 @@ extends AbstractForm { 'wrap' => __("Wrap Lines"), 'ellipsis' => __("Add Ellipsis"), 'clip' => __("Clip Text"), + 'lclip' => __("Clip Beginning Text"), ), 'default' => 'wrap', 'layout' => new GridFluidCell(4),