mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
Merge 4c7b9c3360 into 7806faf16c
This commit is contained in:
commit
753597331b
3 changed files with 14 additions and 8 deletions
|
|
@ -2762,9 +2762,13 @@ jQuery.PrivateBin = (function($) {
|
|||
|
||||
if (format === 'markdown') {
|
||||
$plainText.removeClass('hidden');
|
||||
// Show copy button for markdown format
|
||||
$('#prettyMessageCopyBtn').removeClass('hidden');
|
||||
$prettyMessage.addClass('hidden');
|
||||
} else {
|
||||
$plainText.addClass('hidden');
|
||||
// Show copy button for non-markdown formats
|
||||
$('#prettyMessageCopyBtn').removeClass('hidden');
|
||||
$prettyMessage.removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
|
@ -2881,6 +2885,8 @@ jQuery.PrivateBin = (function($) {
|
|||
|
||||
$plainText.addClass('hidden');
|
||||
$prettyMessage.addClass('hidden');
|
||||
// Also hide the copy button when hiding the view
|
||||
$('#prettyMessageCopyBtn').addClass('hidden');
|
||||
$placeholder.addClass('hidden');
|
||||
AttachmentViewer.hideAttachmentPreview();
|
||||
|
||||
|
|
|
|||
|
|
@ -622,11 +622,11 @@ endif;
|
|||
<div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no document text +++'); ?></div>
|
||||
<div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
|
||||
<h5 id="copyShortcutHint" class="col-md-12"><small id="copyShortcutHintText"></small></h5>
|
||||
<button id="prettyMessageCopyBtn" class="col-md-12 hidden">
|
||||
<span id="copyIcon" class="glyphicon glyphicon-duplicate" aria-hidden="true"></span>
|
||||
<span id="copySuccessIcon" class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>
|
||||
</button>
|
||||
<div id="prettymessage" class="col-md-12 hidden">
|
||||
<button id="prettyMessageCopyBtn">
|
||||
<span id="copyIcon" class="glyphicon glyphicon-duplicate" aria-hidden="true"></span>
|
||||
<span id="copySuccessIcon" class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>
|
||||
</button>
|
||||
<pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
|
||||
</div>
|
||||
<div id="plaintext" class="col-md-12 hidden"></div>
|
||||
|
|
|
|||
|
|
@ -480,11 +480,11 @@ endif;
|
|||
<div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no document text +++'); ?></div>
|
||||
<div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
|
||||
<h6 id="copyShortcutHint" class="col-md-12"><small id="copyShortcutHintText"></small></h6>
|
||||
<button type="button" id="prettyMessageCopyBtn" class="text-secondary opacity-05-1-hover col-md-12 hidden">
|
||||
<svg id="copyIcon" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg>
|
||||
<svg id="copySuccessIcon" class="text-success" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#check" /></svg>
|
||||
</button>
|
||||
<div id="prettymessage" class="card col-md-12 hidden">
|
||||
<button type="button" id="prettyMessageCopyBtn" class="text-secondary opacity-05-1-hover">
|
||||
<svg id="copyIcon" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg>
|
||||
<svg id="copySuccessIcon" class="text-success" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#check" /></svg>
|
||||
</button>
|
||||
<pre id="prettyprint" class="card-body col-md-12 prettyprint linenums:1"></pre>
|
||||
</div>
|
||||
<div id="plaintext" class="col-md-12 hidden"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue