Browse Source

grabed copy to clipboard functions from Calm client for Tox and Bitmessage address

master
erqan 11 years ago
parent
commit
e513d4b84b
  1. 9
      css/profile.css
  2. 7
      js/interface_common.js
  3. 6
      js/interface_localization.js
  4. 7
      theme_calm/css/profile.css

9
css/profile.css

@ -198,12 +198,13 @@
display: none; display: none;
} }
.bitmessage-ctc, .tox-ctc { .bitmessage-ctc, .tox-ctc {
position: absolute;
height: 30px; height: 30px;
width: 30px; width: 30px;
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
border: 1px solid #d6d8dc; border: 1px solid #d6d8dc;
background: #e3e5ea url(img/clipboard.png) center no-repeat; background: #e3e5ea;
opacity: .8; opacity: .8;
-webkit-border-radius: 0 5px 5px 0; -webkit-border-radius: 0 5px 5px 0;
-moz-border-radius: 0 5px 5px 0; -moz-border-radius: 0 5px 5px 0;
@ -213,15 +214,21 @@
-ms-transition: all 20ms; -ms-transition: all 20ms;
-o-transition: all 20ms; -o-transition: all 20ms;
transition: all 20ms; transition: all 20ms;
font-size: 18px;
} }
.bitmessage-ctc:hover, .tox-ctc:hover { .bitmessage-ctc:hover, .tox-ctc:hover {
background-color: #f0f2f8; background-color: #f0f2f8;
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
text-decoration: none;
} }
.bitmessage-ctc:active, .tox-ctc:active { .bitmessage-ctc:active, .tox-ctc:active {
background-color: #edfced; background-color: #edfced;
} }
.bitmessage-ctc:after,
.tox-ctc:after {
content: '📋';
}
.profile-modal .profile-tox, .profile-modal .profile-bitmessage { .profile-modal .profile-tox, .profile-modal .profile-bitmessage {
display: inline-block; display: inline-block;
width: 70px; width: 70px;

7
js/interface_common.js

@ -1327,4 +1327,11 @@ function initInterfaceCommon() {
$( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow ); $( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow );
$( ".who-to-follow .view-all-users" ).bind( "click", openWhoToFollowModal ); $( ".who-to-follow .view-all-users" ).bind( "click", openWhoToFollowModal );
$('.tox-ctc').on('click', function(){
window.prompt(polyglot.t('copy_to_clipboard'), $(this).attr('data'))
});
$('.bitmessage-ctc').on('click', function(){
window.prompt(polyglot.t('copy_to_clipboard'), $(this).attr('data'))
});
} }

6
js/interface_localization.js

@ -229,7 +229,8 @@ if(preferredLanguage == "en"){
"show_more_count": "%{count} more...", "show_more_count": "%{count} more...",
"hide": "hide", "hide": "hide",
"Show more in this conversation...": "Show more in this conversation...", "Show more in this conversation...": "Show more in this conversation...",
"conversation_title": "Conversation of @%{username}" "conversation_title": "Conversation of @%{username}",
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close"
}; };
} }
if(preferredLanguage == "es"){ if(preferredLanguage == "es"){
@ -1877,7 +1878,8 @@ if(preferredLanguage == "tr"){
"show_more_count": "%{count} tane daha...", "show_more_count": "%{count} tane daha...",
"hide": "gizle", "hide": "gizle",
"Show more in this conversation...": "Sohbetin tamamını göster...", "Show more in this conversation...": "Sohbetin tamamını göster...",
"conversation_title": "@%{username} kullanıcısının bir sohbeti" "conversation_title": "@%{username} kullanıcısının bir sohbeti",
"copy_to_clipboard": "Kopyalamak için Ctrl/Cmd+C tuşlarına, kapatmak için Enter tuşuna basınız"
}; };
} }

7
theme_calm/css/profile.css

@ -262,6 +262,7 @@
display: none; display: none;
} }
.bitmessage-ctc, .tox-ctc { .bitmessage-ctc, .tox-ctc {
position: absolute;
height: 30px; height: 30px;
width: 30px; width: 30px;
display: inline-block; display: inline-block;
@ -277,15 +278,21 @@
-ms-transition: all 20ms; -ms-transition: all 20ms;
-o-transition: all 20ms; -o-transition: all 20ms;
transition: all 20ms; transition: all 20ms;
font-size: 18px;
} }
.bitmessage-ctc:hover, .tox-ctc:hover { .bitmessage-ctc:hover, .tox-ctc:hover {
background-color: #f0f2f8; background-color: #f0f2f8;
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
text-decoration: none;
} }
.bitmessage-ctc:active, .tox-ctc:active { .bitmessage-ctc:active, .tox-ctc:active {
background-color: #edfced; background-color: #edfced;
} }
.bitmessage-ctc:after,
.tox-ctc:after {
content: '📋';
}
.profile-modal .profile-tox, .profile-modal .profile-bitmessage { .profile-modal .profile-tox, .profile-modal .profile-bitmessage {
display: inline-block; display: inline-block;
width: 70px; width: 70px;

Loading…
Cancel
Save