mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Reposition flash clipboard overflay after getting the get short url message
This commit is contained in:
parent
12276d9ff2
commit
0dd2383893
@ -368,21 +368,6 @@ if (content && key) {
|
||||
/* Add a continuation to let the UI redraw */
|
||||
setTimeout(function(){
|
||||
|
||||
/* Setup link to get the paste short url*/
|
||||
$('#short-url').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#short-url').text('Loading short url...');
|
||||
zerobin.getTinyURL(window.location.toString(), function(tinyurl){
|
||||
clip.setText(tinyurl);
|
||||
$('#copy-success').hide();
|
||||
zerobin.message('success',
|
||||
'<a href="' + tinyurl + '">' + tinyurl + '</a>',
|
||||
'Short url', true
|
||||
)
|
||||
$('#short-url').text('Get short url');
|
||||
});
|
||||
});
|
||||
|
||||
/* Setup flash clipboard button */
|
||||
ZeroClipboard.setMoviePath('/static/js/ZeroClipboard.swf');
|
||||
|
||||
@ -398,6 +383,22 @@ if (content && key) {
|
||||
|
||||
window.onresize = clip.reposition;
|
||||
|
||||
|
||||
/* Setup link to get the paste short url*/
|
||||
$('#short-url').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#short-url').text('Loading short url...');
|
||||
zerobin.getTinyURL(window.location.toString(), function(tinyurl){
|
||||
clip.setText(tinyurl);
|
||||
$('#copy-success').hide();
|
||||
zerobin.message('success',
|
||||
'<a href="' + tinyurl + '">' + tinyurl + '</a>',
|
||||
'Short url', true, function(){clip.reposition()}
|
||||
)
|
||||
$('#short-url').text('Get short url');
|
||||
});
|
||||
});
|
||||
|
||||
/** Syntaxic coloration */
|
||||
prettyPrint();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user