1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Fix paste link overlay bug

This commit is contained in:
sam 2012-04-29 02:28:12 +07:00
parent acd2d26772
commit ea93fcf35e
2 changed files with 8 additions and 8 deletions

View File

@ -135,9 +135,6 @@ if (content && key) {
if (!error) { if (!error) {
ZeroClipboard.setMoviePath('/static/js/ZeroClipboard.swf' );
var clip = new ZeroClipboard.Client();
$('#short-url').click(function(e) { $('#short-url').click(function(e) {
e.preventDefault(); e.preventDefault();
$('#short-url').text('Loading short url...'); $('#short-url').text('Loading short url...');
@ -154,6 +151,8 @@ if (content && key) {
prettyPrint(); prettyPrint();
/* Setup flash clipboard button */ /* Setup flash clipboard button */
ZeroClipboard.setMoviePath('/static/js/ZeroClipboard.swf' );
var clip = new ZeroClipboard.Client();
clip.addEventListener('onMouseUp', function(){ clip.addEventListener('onMouseUp', function(){
clip.setText($('#paste-content').text()); clip.setText($('#paste-content').text());
@ -202,8 +201,8 @@ $('.previous-pastes .items').html(zerobin.get_pastes());
$('.btn-clone').click(function(e){ $('.btn-clone').click(function(e){
e.preventDefault(); e.preventDefault();
var content_clone = '' ; var content_clone = '' ;
$("#paste-content li").each(function(index) { $("#paste-content li").each(function(index) {
content_clone = content_clone + $(this).text() + '\n'; content_clone = content_clone + $(this).text() + '\n';
}); });
$('.submit-form').show(); $('.submit-form').show();
$('.paste-form').remove(); $('.paste-form').remove();

View File

@ -22,11 +22,12 @@
<div class="well paste-form"> <div class="well paste-form">
<form action="/" method="get" accept-charset="utf-8"> <form action="/" method="get" accept-charset="utf-8">
<p> <p>
<a id="short-url" href=""
target="_blank">Get short url</a> |
<span id="clip-container" style="position:relative"> <span id="clip-container" style="position:relative">
<a id="clip-button">Copy To Clipboard</a> <a id="clip-button">Copy To Clipboard</a>
</span> </span> |
<a id="short-url" href=""
target="_blank">Get short url</a>
<span class="paste-option btn-group top"> <span class="paste-option btn-group top">
<button class="btn btn-clone"><i class="icon-camera"></i>&nbsp;Clone</button> <button class="btn btn-clone"><i class="icon-camera"></i>&nbsp;Clone</button>
<button class="btn">New Paste</button> <button class="btn">New Paste</button>