Exemplo n.º 1
0
 public function GetValue()
 {
     $showButton = true;
     $this->OnShow->Fire(array(&$showButton));
     if ($showButton) {
         if ($this->useImages) {
             AddStr($result, '<span class="inline_edit_controls default-fade-in fade-out-on-hover" style="white-space: nowrap;">');
         } else {
             AddStr($result, '<span class="inline_edit_controls" style="white-space: nowrap;">');
         }
         if ($this->useImages) {
             AddStr($result, '<a href="#" class="inline_edit_init" title="' . $this->editButtonText . '">' . '<i class="pg-icon-edit-record"></i>' . '</a>');
             AddStr($result, '<a href="#" style="display: none;" class="inline_edit_cancel" title="' . $this->cancelButtonText . '">' . '<i class="pg-icon-inline-edit-cancel" title="' . $this->cancelButtonText . '"></i>' . '</a>');
             AddStr($result, '<a href="#" style="display: none;" class="inline_edit_commit" title="' . $this->commitButtonText . '">' . '<i class="pg-icon-inline-edit-commit" title="' . $this->commitButtonText . '"></i>' . '</a>');
         } else {
             AddStr($result, '<a href="#" class="inline_edit_init" title="' . $this->editButtonText . '">' . $this->editButtonText . '</a>');
             AddStr($result, '<a style="margin-right: 5px;" href="#" class="inline_edit_cancel" title="' . $this->cancelButtonText . '">' . $this->cancelButtonText . '</a>');
             AddStr($result, '<a href="#" class="inline_edit_commit" title="' . $this->commitButtonText . '">' . $this->commitButtonText . '</a>');
         }
         $keyValues = $this->dataset->GetPrimaryKeyValues();
         for ($i = 0; $i < count($keyValues); $i++) {
             // AddStr($result, sprintf('<input type="hidden" name="pk%d" value="%s"></input>', $i, $keyValues[$i]));
             AddStr($result, sprintf('<input type="hidden" name="pk%d" value="%s"/>', $i, $keyValues[$i]));
         }
         AddStr($result, '</span>');
         return $result;
     } else {
         return '';
     }
 }