diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-20 15:45:02 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-20 15:45:02 -0400 |
commit | f77d6c590bf683377986064113ddddae9ed443c2 (patch) | |
tree | 9ac56f1658814c381cdc161492454143e5d0462a /app/Template/comment | |
parent | 787e91ca415ff2282a1b3328c6a1b28b23596ddc (diff) |
Added Markdown editor and Javascript code refactoring
Diffstat (limited to 'app/Template/comment')
-rw-r--r-- | app/Template/comment/create.php | 41 | ||||
-rw-r--r-- | app/Template/comment/edit.php | 25 |
2 files changed, 21 insertions, 45 deletions
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index 58b4abdf..b6c27ae0 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -6,36 +6,21 @@ <?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?> - <div class="form-tabs"> - <ul class="form-tabs-nav"> - <li class="form-tab form-tab-selected"> - <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a> - </li> - <li class="form-tab"> - <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a> - </li> - </ul> - <div class="write-area"> - <?= $this->form->textarea( - 'comment', - $values, - $errors, - array( - 'autofocus', - 'required', - 'placeholder="'.t('Leave a comment').'"', - 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"', - ), - 'comment-textarea' - ) ?> - </div> - <div class="preview-area"> - <div class="markdown"></div> - </div> + <div class="markdown-editor-small"> + <?= $this->form->textarea( + 'comment', + $values, + $errors, + array( + 'autofocus', + 'required', + 'placeholder="'.t('Leave a comment').'"', + 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"', + ), + 'markdown-editor' + ) ?> </div> - <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> - <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index ad6f58fb..4036b673 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -9,25 +9,16 @@ <?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?> - <div class="form-tabs"> - <ul class="form-tabs-nav"> - <li class="form-tab form-tab-selected"> - <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a> - </li> - <li class="form-tab"> - <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a> - </li> - </ul> - <div class="write-area"> - <?= $this->form->textarea('comment', $values, $errors, array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?> - </div> - <div class="preview-area"> - <div class="markdown"></div> - </div> + <div class="markdown-editor-small"> + <?= $this->form->textarea( + 'comment', + $values, + $errors, + array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), + 'markdown-editor' + ) ?> </div> - <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> - <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> |