Only enable copy icon when there is actually a selection

master
Jordi Boggiano 13 years ago
parent d9aca6be76
commit 5d168aa4d8
  1. 6
      php-console.js
  2. 1
      styles.css

@ -33,9 +33,13 @@
*/
prepareClippyButton = function(e) {
var selection = editor.getSession().doc.getTextRange(editor.getSelectionRange());
if (!selection) {
$('.statusbar .copy').hide();
return;
}
$('#clippy embed').attr('FlashVars', 'text=' + selection);
$('#clippy param[name="FlashVars"]').attr('value', 'text=' + selection);
$('.statusbar .copy').html($('.statusbar .copy').html());
$('.statusbar .copy').html($('.statusbar .copy').html()).show();
};
/**

@ -48,6 +48,7 @@ a {
.statusbar .copy {
margin-left: 50px;
display: none;
}
#clippy {
position: relative;

Loading…
Cancel
Save