示例#1
0
 /**
  * @param TextViewColumn $column
  */
 public function RenderTextViewColumn($column)
 {
     $value = $column->GetValue();
     $dataset = $column->GetDataset();
     $column->BeforeColumnRender->Fire(array(&$value, &$dataset));
     if (!isset($value)) {
         $this->result = $this->GetNullValuePresentation($column);
     } else {
         if ($column->GetEscapeHTMLSpecialChars()) {
             $value = htmlspecialchars($value);
         }
         $columnMaxLength = $column->GetMaxLength();
         if ($this->HttpHandlersAvailable() && $this->ChildPagesAvailable() && isset($columnMaxLength) && isset($value) && StringUtils::StringLength($value, $column->GetGrid()->GetPage()->GetContentEncoding()) > $columnMaxLength) {
             $originalValue = $value;
             if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
                 $originalValue = str_replace("\n", "<br/>", $originalValue);
             }
             $value = StringUtils::SubString($value, 0, $columnMaxLength, $column->GetGrid()->GetPage()->GetContentEncoding());
             $value .= '... <span class="more_hint"><a href="' . $column->GetMoreLink() . '" ' . 'onClick="javascript: pwin = window.open(\'\',null,\'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location=no,left=150,top=200,scrollbars=yes\'); pwin.location=\'' . $column->GetMoreLink() . '\'; return false;">' . $this->captions->GetMessageString('more') . '</a>';
             $value .= '<div class="box_hidden">' . $originalValue . '</div></span>';
         }
         if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
             $value = str_replace("\n", "<br/>", $value);
         }
         $this->result = $value;
     }
 }
 /**
  * @param TextViewColumn $column
  */
 public function RenderTextViewColumn($column)
 {
     $value = $column->GetValue();
     $dataset = $column->GetDataset();
     $column->BeforeColumnRender->Fire(array(&$value, &$dataset));
     if (!isset($value)) {
         $this->result = $this->GetNullValuePresentation($column);
     } else {
         if ($column->GetEscapeHTMLSpecialChars()) {
             $value = htmlspecialchars($value);
         }
         $columnMaxLength = $column->GetMaxLength();
         if ($this->handleLongValuedTextFields() && $this->HttpHandlersAvailable() && $this->ChildPagesAvailable() && isset($columnMaxLength) && isset($value) && StringUtils::StringLength($value, $column->GetGrid()->GetPage()->GetContentEncoding()) > $columnMaxLength) {
             $originalValue = $value;
             if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
                 $originalValue = str_replace("\n", "<br/>", $originalValue);
             }
             $value = StringUtils::SubString($value, 0, $columnMaxLength, $column->GetGrid()->GetPage()->GetContentEncoding());
             $value .= '... <a class="js-more-hint" href="' . $column->GetMoreLink() . '">' . $this->captions->GetMessageString('more') . '</a>' . '<div class="js-more-box hide">' . $originalValue . '</div>';
         }
         if ($this->HtmlMarkupAvailable() && $column->GetReplaceLFByBR()) {
             $value = str_replace("\n", "<br/>", $value);
         }
         $this->result = $value;
     }
 }