mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 08:30:56 +03:00
edit comment
This commit is contained in:
parent
24b3ef9726
commit
d63f0f4df1
2 changed files with 11 additions and 3 deletions
|
@ -76,7 +76,7 @@ class Comment {
|
|||
<div class="dropdown">
|
||||
<a style="color: #000" class="compl" href="/lk/ticket.php?action=add&wid=3252565">...</a>
|
||||
<div class="dropdown-content">'; ?>
|
||||
<a href="#" onclick="createModal(100, 'EDIT_COMMENT'); return false;">Редактировать</a><br>
|
||||
<a href="#" onclick="createModal(100, 'EDIT_COMMENT', '<?=htmlspecialchars($this->c['body'])?>'); return false;">Редактировать</a><br>
|
||||
<a href="#" onclick="createModal(100, 'DELETE_COMMENT'); return false;">Удалить</a>
|
||||
<?php
|
||||
echo '
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
|
||||
|
||||
function createModal(id, type) {
|
||||
function createModal(id, type, value) {
|
||||
if (type === 'EDIT_COMMENT') {
|
||||
var modal = `
|
||||
<div id="modal`+id+`" class="modal" style="display: block;">
|
||||
<div class="modal-content">
|
||||
<span data-modal-id="`+id+`" class="close">×</span>
|
||||
<p>Some text in the Modal..</p>
|
||||
<h3><b>Отредактировать комментарий</b></h3>
|
||||
<div style="padding:0 11px 11px">
|
||||
|
||||
|
||||
<textarea name="wtext" id="wtext">`+value+`</textarea><br>
|
||||
<p id="statusSend" style="display: none;">Ошибка</p>
|
||||
<div class="cmt-submit"><input type="submit" value="Отредактировать" id="sbmt">  Ctrl + Enter
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>`;
|
||||
|
|
Loading…
Reference in a new issue