copy_tuner_client 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,83 +1,96 @@
1
1
  @charset "UTF-8";
2
2
 
3
3
  /* selector for element and children */
4
- #copyray-overlay, #copyray-overlay *, #copyray-overlay a:hover, #copyray-overlay a:visited, #copyray-overlay a:active {
5
- background:none;
6
- border:none;
7
- bottom:auto;
8
- clear:none;
9
- cursor:default;
10
- float:none;
11
- font-family:Arial, Helvetica, sans-serif;
12
- font-size:medium;
13
- font-style:normal;
14
- font-weight:normal;
15
- height:auto;
16
- left:auto;
17
- letter-spacing:normal;
18
- line-height:normal;
19
- max-height:none;
20
- max-width:none;
21
- min-height:0;
22
- min-width:0;
23
- overflow:visible;
24
- position:static;
25
- right:auto;
26
- text-align:left;
27
- text-decoration:none;
28
- text-indent:0;
29
- text-transform:none;
30
- top:auto;
31
- visibility:visible;
32
- white-space:normal;
33
- width:auto;
34
- z-index:auto;
4
+ #copyray-overlay,
5
+ #copyray-overlay *,
6
+ #copyray-overlay a:hover,
7
+ #copyray-overlay a:visited,
8
+ #copyray-overlay a:active {
9
+ background: none;
10
+ border: none;
11
+ bottom: auto;
12
+ clear: none;
13
+ cursor: default;
14
+ float: none;
15
+ font-family: Arial, Helvetica, sans-serif;
16
+ font-size: medium;
17
+ font-style: normal;
18
+ font-weight: normal;
19
+ height: auto;
20
+ left: auto;
21
+ letter-spacing: normal;
22
+ line-height: normal;
23
+ max-height: none;
24
+ max-width: none;
25
+ min-height: 0;
26
+ min-width: 0;
27
+ overflow: visible;
28
+ position: static;
29
+ right: auto;
30
+ text-align: left;
31
+ text-decoration: none;
32
+ text-indent: 0;
33
+ text-transform: none;
34
+ top: auto;
35
+ visibility: visible;
36
+ white-space: normal;
37
+ width: auto;
38
+ z-index: auto;
35
39
  }
36
40
 
37
41
  #copyray-overlay {
38
- position: fixed; left: 0; top: 0; bottom: 0; right: 0;
39
- background: rgba(0,0,0,0.7);
40
- background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0.4) 10%, rgba(0,0,0,0.8) 100%);
42
+ position: fixed;
43
+ left: 0;
44
+ top: 0;
45
+ bottom: 0;
46
+ right: 0;
47
+ background: rgba(0, 0, 0, 0.7);
48
+ background: -webkit-radial-gradient(
49
+ center,
50
+ ellipse cover,
51
+ rgba(0, 0, 0, 0.4) 10%,
52
+ rgba(0, 0, 0, 0.8) 100%
53
+ );
41
54
  z-index: 9000;
42
55
  }
43
56
 
44
57
  .copyray-specimen {
45
58
  position: absolute;
46
- background: rgba(255,255,255,0.15);
47
- outline: 1px solid rgba(255,255,255,0.8);
59
+ background: rgba(255, 255, 255, 0.15);
60
+ outline: 1px solid rgba(255, 255, 255, 0.8);
48
61
  outline-offset: -1px;
49
62
  color: #666;
50
63
  font-family: "Helvetica Neue", sans-serif;
51
64
  font-size: 13px;
52
- box-shadow: 0 1px 3px rgba(0,0,0,0.7);
65
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
53
66
  }
54
67
 
55
- .copyray-specimen:hover {
56
- cursor: pointer;
57
- background: rgba(255,255,255,0.4);
58
- }
68
+ .copyray-specimen:hover {
69
+ cursor: pointer;
70
+ background: rgba(255, 255, 255, 0.4);
71
+ }
59
72
 
60
- .copyray-specimen.BlurbSpecimen {
61
- outline: 1px solid rgba(255,50,50,0.8);
62
- background: rgba(255,50,50,0.1);
63
- }
73
+ .copyray-specimen.BlurbSpecimen {
74
+ outline: 1px solid rgba(255, 50, 50, 0.8);
75
+ background: rgba(255, 50, 50, 0.1);
76
+ }
64
77
 
65
- .copyray-specimen.BlurbSpecimen:hover {
66
- background: rgba(255,50,50,0.4);
67
- }
78
+ .copyray-specimen.BlurbSpecimen:hover {
79
+ background: rgba(255, 50, 50, 0.4);
80
+ }
68
81
 
69
- .copyray-specimen-handle {
70
- float:left;
71
- background: #fff;
72
- padding: 0 3px;
73
- color: #333;
74
- font-size: 10px;
75
- }
82
+ .copyray-specimen-handle {
83
+ float: left;
84
+ background: #fff;
85
+ padding: 0 3px;
86
+ color: #333;
87
+ font-size: 10px;
88
+ }
76
89
 
77
- .copyray-specimen-handle.BlurbSpecimen {
78
- background: rgba(255,50,50,0.8);
79
- color: #fff;
80
- }
90
+ .copyray-specimen-handle.BlurbSpecimen {
91
+ background: rgba(255, 50, 50, 0.8);
92
+ color: #fff;
93
+ }
81
94
 
82
95
  a.copyray-toggle-button {
83
96
  display: block;
@@ -109,8 +122,9 @@ a.copyray-toggle-button:hover {
109
122
  font-weight: 200;
110
123
  color: #fff;
111
124
  z-index: 2147483647;
112
- box-shadow: 0 -1px 0 rgba(255,255,255,0.1), inset 0 2px 6px rgba(0,0,0,0.8);
113
- background-image: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.3));
125
+ box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1),
126
+ inset 0 2px 6px rgba(0, 0, 0, 0.8);
127
+ background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
114
128
  }
115
129
 
116
130
  #copy-tuner-bar-log-menu {
@@ -142,7 +156,8 @@ a.copyray-toggle-button:hover {
142
156
  color: #fff;
143
157
  }
144
158
 
145
- #copy-tuner-bar-log-menu__tbody a:hover, #copy-tuner-bar-log-menu__tbody a:focus {
159
+ #copy-tuner-bar-log-menu__tbody a:hover,
160
+ #copy-tuner-bar-log-menu__tbody a:focus {
146
161
  color: #fff;
147
162
  text-decoration: underline;
148
163
  }
@@ -161,7 +176,9 @@ a.copyray-toggle-button:hover {
161
176
  background-color: #444;
162
177
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
163
178
  border-radius: 2px;
164
- box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 2px rgba(255, 255, 255, 0.2);
179
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5),
180
+ inset 0 1px 0 rgba(255, 255, 255, 0.2),
181
+ inset 0 0 2px rgba(255, 255, 255, 0.2);
165
182
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
166
183
  }
167
184
 
@@ -178,10 +195,15 @@ input[type="text"].copy-tuner-bar__search {
178
195
  border: none;
179
196
  border-radius: 2px;
180
197
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
181
- box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 2px rgba(0, 0, 0, 0.2);
198
+ box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2),
199
+ inset 0 0 2px rgba(0, 0, 0, 0.2);
182
200
  padding: 2px 8px;
183
201
  margin: 0;
184
202
  line-height: 20px;
185
203
  vertical-align: middle;
186
204
  color: black;
187
205
  }
206
+
207
+ .copy-tuner-hidden {
208
+ display: none !important;
209
+ }
@@ -1,10 +1,10 @@
1
- <div id="copy-tuner-bar" style="display:none">
1
+ <div id="copy-tuner-bar" class="copy-tuner-hidden">
2
2
  <%= link_to 'CopyTuner', CopyTunerClient.configuration.project_url, class: 'copy-tuner-bar-button', target: '_blank' %>
3
3
  <a href="/copytuner" target="_blank" class="copy-tuner-bar-button">Sync</a>
4
4
  <a href="javascript:void(0)" class="copy-tuner-bar-open-log copy-tuner-bar-button js-copy-tuner-bar-open-log">Translations in this page</a>
5
5
  <input type="text" class="copy-tuner-bar__search js-copy-tuner-bar-search" placeholder="search">
6
6
  </div>
7
- <div id="copy-tuner-bar-log-menu" class="js-copy-tuner-bar-log-menu" style="display:none">
7
+ <div id="copy-tuner-bar-log-menu" class="js-copy-tuner-bar-log-menu copy-tuner-hidden">
8
8
  <table>
9
9
  <tbody id="copy-tuner-bar-log-menu__tbody" class="js-copy-tuner-bar-log-menu__tbody is-not-initialized">
10
10
  </tbody>
data/coffeelint.json ADDED
@@ -0,0 +1,135 @@
1
+ {
2
+ "arrow_spacing": {
3
+ "level": "ignore"
4
+ },
5
+ "braces_spacing": {
6
+ "level": "ignore",
7
+ "spaces": 0,
8
+ "empty_object_spaces": 0
9
+ },
10
+ "camel_case_classes": {
11
+ "level": "error"
12
+ },
13
+ "coffeescript_error": {
14
+ "level": "error"
15
+ },
16
+ "colon_assignment_spacing": {
17
+ "level": "ignore",
18
+ "spacing": {
19
+ "left": 0,
20
+ "right": 0
21
+ }
22
+ },
23
+ "cyclomatic_complexity": {
24
+ "value": 10,
25
+ "level": "ignore"
26
+ },
27
+ "duplicate_key": {
28
+ "level": "error"
29
+ },
30
+ "empty_constructor_needs_parens": {
31
+ "level": "ignore"
32
+ },
33
+ "ensure_comprehensions": {
34
+ "level": "warn"
35
+ },
36
+ "eol_last": {
37
+ "level": "ignore"
38
+ },
39
+ "indentation": {
40
+ "value": 2,
41
+ "level": "error"
42
+ },
43
+ "line_endings": {
44
+ "level": "ignore",
45
+ "value": "unix"
46
+ },
47
+ "max_line_length": {
48
+ "value": 160,
49
+ "level": "error",
50
+ "limitComments": true
51
+ },
52
+ "missing_fat_arrows": {
53
+ "level": "ignore",
54
+ "is_strict": false
55
+ },
56
+ "newlines_after_classes": {
57
+ "value": 3,
58
+ "level": "ignore"
59
+ },
60
+ "no_backticks": {
61
+ "level": "error"
62
+ },
63
+ "no_debugger": {
64
+ "level": "warn",
65
+ "console": false
66
+ },
67
+ "no_empty_functions": {
68
+ "level": "ignore"
69
+ },
70
+ "no_empty_param_list": {
71
+ "level": "ignore"
72
+ },
73
+ "no_implicit_braces": {
74
+ "level": "ignore",
75
+ "strict": true
76
+ },
77
+ "no_implicit_parens": {
78
+ "strict": true,
79
+ "level": "ignore"
80
+ },
81
+ "no_interpolation_in_single_quotes": {
82
+ "level": "ignore"
83
+ },
84
+ "no_nested_string_interpolation": {
85
+ "level": "warn"
86
+ },
87
+ "no_plusplus": {
88
+ "level": "ignore"
89
+ },
90
+ "no_private_function_fat_arrows": {
91
+ "level": "warn"
92
+ },
93
+ "no_stand_alone_at": {
94
+ "level": "ignore"
95
+ },
96
+ "no_tabs": {
97
+ "level": "error"
98
+ },
99
+ "no_this": {
100
+ "level": "ignore"
101
+ },
102
+ "no_throwing_strings": {
103
+ "level": "error"
104
+ },
105
+ "no_trailing_semicolons": {
106
+ "level": "error"
107
+ },
108
+ "no_trailing_whitespace": {
109
+ "level": "error",
110
+ "allowed_in_comments": false,
111
+ "allowed_in_empty_lines": true
112
+ },
113
+ "no_unnecessary_double_quotes": {
114
+ "level": "ignore"
115
+ },
116
+ "no_unnecessary_fat_arrows": {
117
+ "level": "warn"
118
+ },
119
+ "non_empty_constructor_needs_parens": {
120
+ "level": "ignore"
121
+ },
122
+ "prefer_english_operator": {
123
+ "level": "ignore",
124
+ "doubleNotLevel": "ignore"
125
+ },
126
+ "space_operators": {
127
+ "level": "ignore"
128
+ },
129
+ "spacing_after_comma": {
130
+ "level": "ignore"
131
+ },
132
+ "transform_messes_up_line_numbers": {
133
+ "level": "warn"
134
+ }
135
+ }
@@ -38,7 +38,7 @@ module CopyTunerClient
38
38
  if CopyTunerClient::TranslationLog.initialized?
39
39
  json = CopyTunerClient::TranslationLog.translations.to_json
40
40
  # Use block to avoid back reference \?
41
- html.sub('</body>') { "<div data-copy-tuner-translation-log='#{ERB::Util.html_escape json}' data-copy-tuner-url='#{CopyTunerClient.configuration.project_url}'></div></body>" }
41
+ html.sub('</body>') { "<div id='copy-tuner-data' data-copy-tuner-translation-log='#{ERB::Util.html_escape json}' data-copy-tuner-url='#{CopyTunerClient.configuration.project_url}'></div></body>" }
42
42
  else
43
43
  html
44
44
  end
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.3.5'.freeze
3
+ VERSION = '0.4.0'.freeze
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
data/package-lock.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "copy-tuner-ruby-client",
3
+ "lockfileVersion": 1,
4
+ "dependencies": {
5
+ "coffeescript": {
6
+ "version": "1.12.6",
7
+ "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.6.tgz",
8
+ "integrity": "sha1-3L8r5bZM5mUFy0PE7X8bRMuQ8zw=",
9
+ "dev": true
10
+ }
11
+ }
12
+ }
data/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "copy-tuner-ruby-client",
3
+ "private": true,
4
+ "repository": "https://github.com/SonicGarden/copy-tuner-ruby-client",
5
+ "author": "SonicGarden",
6
+ "license": "MIT",
7
+ "scripts": {
8
+ "build": "coffee -o app/assets/javascripts -c src/copyray.coffee",
9
+ "watch": "coffee -o app/assets/javascripts -w src/copyray.coffee"
10
+ },
11
+ "devDependencies": {
12
+ "coffeescript": "^1.12.6"
13
+ }
14
+ }