rosetta 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/views/rosetta/_translate_menu.html.erb +51 -0
- data/lib/rosetta/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8e31624af10b6499013ddde8239abb0b47d8e48889c307cc199174a995b694c5
|
4
|
+
data.tar.gz: 0aba8bf9b7a78145977432ea5447a747a0b79635709861af2cc1aa014f6694a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d452e7461c1d241abc9c62f3616859abb850a5bc039d6876655e5394262eec812bc19c078f35e8826b9fcc51a74bb19214a3874f45851f65df8a880ba819d29b
|
7
|
+
data.tar.gz: fdc89894c0fd83321e7b5be821a1120f30614d58d356d2a58e325d9811a6f2d63e5181f333889ff4ca3979910f27a59940623338707b84042c103e5b9b99a8a2
|
@@ -14,6 +14,19 @@
|
|
14
14
|
box-shadow: 3px 4px 6px 0 rgba(0, 0, 0, 0.2);
|
15
15
|
}
|
16
16
|
|
17
|
+
.phrases-menu.match-phrase,
|
18
|
+
.phrases-menu.match-phrase .open-phrases-menu-btn {
|
19
|
+
background-color: #eaffdd;
|
20
|
+
}
|
21
|
+
.phrases-menu.match-phrase .phrases-menu__block{
|
22
|
+
background-color: #f7fff3;
|
23
|
+
}
|
24
|
+
|
25
|
+
.phrases-menu.unmatch-phrase,
|
26
|
+
.phrases-menu.unmatch-phrase .open-phrases-menu-btn {
|
27
|
+
background-color: #fae0dd;
|
28
|
+
}
|
29
|
+
|
17
30
|
.phrases-menu.open{
|
18
31
|
left: 0px;
|
19
32
|
}
|
@@ -51,6 +64,10 @@
|
|
51
64
|
border: 1px solid #dedede;
|
52
65
|
}
|
53
66
|
|
67
|
+
.phrases-menu__block.hide{
|
68
|
+
display: none;
|
69
|
+
}
|
70
|
+
|
54
71
|
.phrases-menu:not(.local) .phrases-menu__block:hover {
|
55
72
|
color: #e81d08;
|
56
73
|
cursor: pointer;
|
@@ -146,6 +163,12 @@
|
|
146
163
|
transform: translate(-50%, -50%);
|
147
164
|
}
|
148
165
|
|
166
|
+
.phrases-menu__search{
|
167
|
+
font-size: 14px;
|
168
|
+
padding: 9px 16px;
|
169
|
+
color: #807e7e;
|
170
|
+
}
|
171
|
+
|
149
172
|
.phrases-menu__openbtn img {
|
150
173
|
height: 30px;
|
151
174
|
position: absolute;
|
@@ -173,6 +196,7 @@
|
|
173
196
|
</h1>
|
174
197
|
</div>
|
175
198
|
<div class="phrases-menu__content">
|
199
|
+
<div class="phrases-menu__search"></div>
|
176
200
|
<% Rosetta.phrases.each do |phrase| %>
|
177
201
|
<%= render "rosetta/#{Rosetta.repository.id}/actions",
|
178
202
|
phrase: phrase %>
|
@@ -188,6 +212,33 @@
|
|
188
212
|
|
189
213
|
<script type="text/javascript">
|
190
214
|
/* Toggle the Translate menu */
|
215
|
+
$( document ).ready(function() {
|
216
|
+
var searchSelectedText = function(){
|
217
|
+
var text = window.getSelection().toString();
|
218
|
+
if (text != ''){
|
219
|
+
var $matches = $( "div:contains('"+text+"')" ).parent('.phrases-menu__block');
|
220
|
+
|
221
|
+
$('.phrases-menu__block').addClass('hide');
|
222
|
+
$matches.removeClass('hide');
|
223
|
+
$('.phrases-menu__search').html('<u>Search</u>: ' + text);
|
224
|
+
|
225
|
+
if($matches.length > 0){
|
226
|
+
$('.phrases-menu').addClass('match-phrase');
|
227
|
+
}else{
|
228
|
+
$('.phrases-menu').addClass('unmatch-phrase');
|
229
|
+
$('.phrases-menu').removeClass('match-phrase');
|
230
|
+
}
|
231
|
+
}else{
|
232
|
+
$('.phrases-menu__block').removeClass('hide');
|
233
|
+
$('.phrases-menu__search').html('');
|
234
|
+
$('.phrases-menu').removeClass('unmatch-phrase');
|
235
|
+
$('.phrases-menu').removeClass('match-phrase');
|
236
|
+
}
|
237
|
+
}
|
238
|
+
$('*').mouseup(function() {
|
239
|
+
searchSelectedText();
|
240
|
+
});
|
241
|
+
});
|
191
242
|
function toggleNav() {
|
192
243
|
document.getElementById("phrasesMenu").classList.toggle("open");
|
193
244
|
}
|
data/lib/rosetta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rosetta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MarsBased
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.
|
204
|
+
rubygems_version: 2.7.7
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: Rosetta makes it easy for copy writers to edit the translations of your app.
|