Skip to content
Snippets Groups Projects

F9052: New feature implemented with js to edit content records in front end....

Closed Carsten Rose requested to merge F9052_Report_CodeMirror into develop
2 files
+ 101
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -1694,9 +1694,9 @@ class QuickFormQuery {
if ($uid === null) {
return '';
}
$icon = Support::renderGlyphIcon(GLYPH_ICON_TASKS);
$icon = Support::renderGlyphIcon(GLYPH_ICON_EDIT);
$showFormJs = '$("#tt-content-edit-' . $uid . '").toggleClass("hidden")';
$toggleBtn = Support::wrapTag("<a href='#' onclick='$showFormJs' style='float:right;'>", $icon);
$toggleBtn = Support::wrapTag("<a href='#' class='targetEditReport btn-xs btn-default' onclick='$showFormJs' style='float:right;'>", $icon);
$saveBtnAttributes = Support::doAttribute('class', 'btn btn-default') .
Support::doAttribute('id', "tt-content-save-$uid") .
@@ -1709,10 +1709,14 @@ class QuickFormQuery {
$headerBar = Support::wrapTag("<div class='col-md-12 qfq-form-title'>", $header . $saveBtn);
$ttContentCode = Support::htmlEntityEncodeDecode(MODE_ENCODE, $bodytext);
$codeBoxAttributes = Support::doAttribute('style', "width:100%;") .
$json = json_encode(array('mode'=>'text/x-sql','lineNumbers'=>true,'lineWrapping'=>true), JSON_UNESCAPED_SLASHES);
$codeBoxAttributes = Support::doAttribute('style', "width:100%;") .
Support::doAttribute('id', "tt-content-code-$uid") .
Support::doAttribute('name', REPORT_INLINE_BODYTEXT) .
Support::doAttribute('class', 'qfq-codemirror') .
Support::doAttribute('rows', 20) .
Support::doAttribute('name', REPORT_INLINE_BODYTEXT);
Support::doAttribute('data-config', $json, true);
$codeBox = Support::wrapTag("<textarea $codeBoxAttributes>", $ttContentCode);
$form = join(' ', [$headerBar, $codeBox]);
Loading