From 9dde7f034a102b1a501d0884659f5f940f192733 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 12 Sep 2015 10:38:04 +0200 Subject: [PATCH] moving remaining time / for your eyes only message from nav bar into status alert in bootstrap theme, to ensure it is seen even with a collapsed nav bar as in the mobile view --- js/zerobin.js | 13 ++++++++----- tpl/bootstrap.html | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/js/zerobin.js b/js/zerobin.js index c7146382..b45725a0 100644 --- a/js/zerobin.js +++ b/js/zerobin.js @@ -553,7 +553,8 @@ $(function() { } } - // Display paste expiration. + // Display paste expiration / for your eyes only. + var content = this.remainingTime.contents(); if (comments[0].meta.expire_date) { var expiration = helper.secondsToHuman(comments[0].meta.remaining_time), @@ -561,9 +562,9 @@ $(function() { 'This document will expire in %d ' + expiration[1] + '.', 'This document will expire in %d ' + expiration[1] + 's.' ]; + content[content.length - 1].nodeValue = ' ' + i18n._(expirationLabel, expiration[0]); this.remainingTime.removeClass('foryoureyesonly') - .text(i18n._(expirationLabel, expiration[0])) - .removeClass('hidden'); + .removeClass('hidden'); } if (comments[0].meta.burnafterreading) { @@ -571,9 +572,11 @@ $(function() { .fail(function() { zerobin.showError(i18n._('Could not delete the paste, it was not stored in burn after reading mode.')); }); + content[content.length - 1].nodeValue = ' ' + i18n._( + 'FOR YOUR EYES ONLY. Don\'t close this window, this message can\'t be displayed again.' + ); this.remainingTime.addClass('foryoureyesonly') - .text(i18n._('FOR YOUR EYES ONLY. Don\'t close this window, this message can\'t be displayed again.')) - .removeClass('hidden'); + .removeClass('hidden'); // Discourage cloning (as it can't really be prevented). this.cloneButton.addClass('hidden'); } diff --git a/tpl/bootstrap.html b/tpl/bootstrap.html index 78658769..9dbc8941 100644 --- a/tpl/bootstrap.html +++ b/tpl/bootstrap.html @@ -80,9 +80,6 @@ {/if} -
  • - -