Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a "Press CTRL-C" message in the share dialog

  • Loading branch information...
commit 02eed8a433b9aefed6eacf3b9308d77dedae36eb 1 parent 94fc664
@rbuels rbuels authored
Showing with 20 additions and 5 deletions.
  1. +10 −0 main.css
  2. +10 −5 src/JBrowse/Browser.js
View
10 main.css
@@ -542,6 +542,16 @@ a.dialog-new-window {
.sharePane input {
padding: 1px 0 2px 1px;
}
+.sharePane .copyReminder {
+ background-color: #396494;
+ text-align: center;
+ width: 50%;
+ margin: 0 auto;
+ color: white;
+ padding: 2px;
+ font-weight: bold;
+}
+
.tundra .sharePane input {
border: 1px solid #ccc;
}
View
15 src/JBrowse/Browser.js
@@ -1013,7 +1013,6 @@ Browser.prototype.makeShareLink = function () {
var browser = this;
var viewURL = '#';
-
// make the share link
var link = dojo.create(
'a',
@@ -1026,7 +1025,6 @@ Browser.prototype.makeShareLink = function () {
position: 'relative'
},
onclick: function() {
- console.log('click!');
URLinput.value = viewURL;
previewLink.href = viewURL;
@@ -1038,8 +1036,8 @@ Browser.prototype.makeShareLink = function () {
right: 0,
left: ''
});
- URLinput.select();
URLinput.focus();
+ URLinput.select();
return false;
}
@@ -1051,12 +1049,18 @@ Browser.prototype.makeShareLink = function () {
'div', {
innerHTML: 'Paste this link in <b>email</b> or <b>IM</b>'
});
+ var copyReminder = dojo.create('div', {
+ className: 'copyReminder',
+ innerHTML: 'Press CTRL-C to copy'
+ });
var URLinput = dojo.create(
'input', {
type: 'text',
value: viewURL,
size: 50,
- onclick: function() { this.select(); }
+ readonly: 'readonly',
+ onclick: function() { this.select(); copyReminder.style.display = 'block'; },
+ onblur: function() { copyReminder.style.display = 'none'; }
});
var previewLink = dojo.create('a', {
innerHTML: 'preview',
@@ -1070,7 +1074,8 @@ Browser.prototype.makeShareLink = function () {
title: 'Share this view',
content: [
container,
- URLinput
+ URLinput,
+ copyReminder
],
autofocus: false
});
Please sign in to comment.
Something went wrong with that request. Please try again.