diff --git a/bower.json b/bower.json index ed357189c..d96cd64d8 100644 --- a/bower.json +++ b/bower.json @@ -22,6 +22,7 @@ "angular-moment": "~0.7.1", "socket.io-client": ">=1.0.0", "mousetrap": "1.4.6", + "zeroclipboard": "~2.1.6", "ng-idle": "*" } } diff --git a/css/main.css b/css/main.css index 9841917df..8b8e10278 100644 --- a/css/main.css +++ b/css/main.css @@ -682,9 +682,7 @@ ul.pagination li.current a:hover, ul.pagination li.current a:focus { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; - border: 1px solid #1ABC9C; - text-overflow: ellipsis; - overflow-y: hidden; + border: 1px solid #16A085; } .tooltip>.nub { @@ -700,6 +698,11 @@ ul.pagination li.current a:hover, ul.pagination li.current a:focus { border-color:transparent transparent transparent #16A085; } +.has-tip { + color: #7A8C9E; + border-color: #7A8C9E; +} + .logo { background: transparent url('../img/logo-negative-beta.svg') no-repeat; background-size: 130px 51px; @@ -1090,6 +1093,29 @@ a.text-white:hover {color: #ccc;} text-align: left; } +/**** Copy to clipboard ****/ + +.btn-copy { + color: #9b9b9b; + display: inline-block; + height: 16px; + width: 16px; + outline: none; + vertical-align: sub; + background: transparent url('../img/icons/copy.png') center center no-repeat; +} + +.btn-copied { + display: inline-block; + width: auto; + color: #16A085; + font-weight: bold; + font-size: 11px; +} + +.btn-copy.zeroclipboard-is-hover { color: #000; } +.btn-copy.zeroclipboard-is-active { opacity: 1; } + @media only screen and (min-width: 40.063em) { dialog.tiny, .reveal-modal.tiny { width: 50%; @@ -1097,5 +1123,4 @@ a.text-white:hover {color: #ccc;} } } - /*-----------------------------------------------------------------*/ diff --git a/css/mobile.css b/css/mobile.css index 1b2265124..9049147ea 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -122,5 +122,10 @@ width: 200px; height: 200px; } + + .btn-copy { + display: none; + } + } diff --git a/img/icons/copy.png b/img/icons/copy.png new file mode 100644 index 000000000..b43ca0634 Binary files /dev/null and b/img/icons/copy.png differ diff --git a/index.html b/index.html index e77e29869..f09603637 100644 --- a/index.html +++ b/index.html @@ -75,6 +75,7 @@ + diff --git a/js/directives.js b/js/directives.js index 3fac18f34..03681d02b 100644 --- a/js/directives.js +++ b/js/directives.js @@ -238,4 +238,38 @@ angular.module('copayApp.directives') }); } }; + }) + .directive('clipCopy', function() { + ZeroClipboard.config({ + moviePath: '/lib/zeroclipboard/dist/ZeroClipboard.swf', + trustedDomains: ['*'], + allowScriptAccess: 'always', + forceHandCursor: true + }); + + return { + restric: 'A', + scope: { clipCopy: '=clipCopy' }, + link: function(scope, elm) { + var client = new ZeroClipboard(elm); + + client.on( 'ready', function(event) { + client.on( 'copy', function(event) { + event.clipboardData.setData('text/plain', scope.clipCopy); + }); + + client.on( 'aftercopy', function(event) { + elm.removeClass('btn-copy').addClass('btn-copied').html('Copied!'); + setTimeout(function() { + elm.addClass('btn-copy').removeClass('btn-copied').html(''); + }, 1000); + }); + }); + + client.on( 'error', function(event) { + console.log( 'ZeroClipboard error of type "' + event.name + '": ' + event.message ); + ZeroClipboard.destroy(); + }); + } + }; }); diff --git a/views/copayers.html b/views/copayers.html index de32be126..e71e2d6c0 100644 --- a/views/copayers.html +++ b/views/copayers.html @@ -11,7 +11,10 @@

Share this secret with your other copayers

-
{{$root.wallet.getSecret()}}
+
+ {{$root.wallet.getSecret()}} + +
diff --git a/views/includes/peer-list.html b/views/includes/peer-list.html index 4adcce3bf..cdccb5a91 100644 --- a/views/includes/peer-list.html +++ b/views/includes/peer-list.html @@ -11,7 +11,7 @@ diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index 3d33607d8..220358562 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -25,7 +25,9 @@ {{totalBalance || 0 @@ -37,7 +39,9 @@ {{lockedBalance || 0|noFractionNumber}} {{$root.unitName}} diff --git a/views/join.html b/views/join.html index 8a1535076..8de78dad0 100644 --- a/views/join.html +++ b/views/join.html @@ -55,7 +55,8 @@ check-strength="passwordStrength" tooltip-html-unsafe="Password strength: {{passwordStrength}}
Tip: Use lower and uppercase, - numbers and symbols" tooltip-trigger="focus" required> + numbers and symbols
" tooltip-trigger="focus" + tooltip-placement="left" required>
-

{{address.address}}

+

{{address.address}}

diff --git a/views/send.html b/views/send.html index 3be526cf3..e80ccda0e 100644 --- a/views/send.html +++ b/views/send.html @@ -123,34 +123,34 @@
-
-

Address Book

-

Empty. Create an alias for your addresses

- - - - - - - - - - - - - - - - - +
+

Address Book

+

Empty. Create an alias for your addresses

+
LabelAddressCreatorDate 
{{info.label}}{{addr}}{{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}}{{info.hidden ? - 'Enable' : 'Disable'}}
+ + + + + + + - -
LabelAddressCreatorDate 
- -
+ + + + {{info.label}} + {{addr}} + {{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}} + + {{info.hidden ? + 'Enable' : 'Disable'}} + + + + + diff --git a/views/transactions.html b/views/transactions.html index 1119e81ce..72be42b57 100644 --- a/views/transactions.html +++ b/views/transactions.html @@ -154,12 +154,13 @@
-
- - {{btx.txid}} - + -
+
first seen at