function __initialize($message, $type = 'highlight') { parent::__initialize('div'); $this->class = "ui-widget ui-message"; if (function_exists('translation_string_exists') && translation_string_exists($message)) { $message = getString($message); } $icon = $type == 'highlight' ? 'info' : 'alert'; $sub = $this->content(new Control('div')); $sub->class = "ui-state-{$type} ui-corner-all"; $sub->content("<span class='ui-icon ui-icon-close' onclick=\"\$(this).parent().parent().slideUp('fast', function(){ \$(this).remove(); })\"></span>"); $sub->content("<p><span class='ui-icon ui-icon-{$icon}'></span>{$message}</p>"); }
/** * @internal Ensures that a string will not be translated */ function translation_ensure_nt($text_potentially_named_like_a_constant) { if (!translation_string_exists($text_potentially_named_like_a_constant)) { return $text_potentially_named_like_a_constant; } return $text_potentially_named_like_a_constant . "[NT]"; }
private function _export_get_header() { $res = array(); if ($this->header) { foreach ($this->header->Rows() as $row) { $line = array(); foreach ($row->Cells() as $cell) { $cc = trim(strip_tags($cell->GetContent())); if (translation_string_exists($cc)) { $cc = getString($cc); } $line[] = $cc; } } $res[] = $line; } return $res; }