Merge lp:~stephen-stewart/snapweb/post-css-bem-lint into lp:~snappy-dev/snapweb/trunk
- post-css-bem-lint
- Merge into trunk
Proposed by
Stephen Stewart
Status: | Merged |
---|---|
Approved by: | John Lenton |
Approved revision: | 144 |
Merged at revision: | 141 |
Proposed branch: | lp:~stephen-stewart/snapweb/post-css-bem-lint |
Merge into: | lp:~snappy-dev/snapweb/trunk |
Diff against target: |
460 lines (+74/-49) 15 files modified
gulpfile.js (+14/-3) package.json (+3/-1) www/src/css/alert.css (+2/-0) www/src/css/banner.css (+4/-3) www/src/css/installer.css (+7/-5) www/src/css/layout.css (+2/-0) www/src/css/snap.css (+3/-1) www/src/css/snaplist.css (+20/-18) www/src/js/models/snap.js (+5/-4) www/src/js/templates/_installer.hbs (+2/-2) www/src/js/templates/layout-banner.hbs (+4/-4) www/src/js/views/layout-banner.js (+1/-1) www/src/js/views/snap-menu.js (+1/-1) www/src/js/views/snaplist.js (+2/-2) www/tests/snapLayoutViewSpec.js (+4/-4) |
To merge this branch: | bzr merge lp:~stephen-stewart/snapweb/post-css-bem-lint |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John Lenton (community) | Approve | ||
Review via email:
|
Commit message
postcss bem linter
Description of the change
To post a comment you must log in.
- 144. By Stephen Stewart
-
update class names in tests
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
John Lenton (chipaca) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'gulpfile.js' | |||
2 | --- gulpfile.js 2015-05-07 10:34:34 +0000 | |||
3 | +++ gulpfile.js 2015-05-12 11:34:29 +0000 | |||
4 | @@ -1,5 +1,7 @@ | |||
5 | 1 | var aliasify = require('aliasify'); | 1 | var aliasify = require('aliasify'); |
7 | 2 | var autoprefixer = require('gulp-autoprefixer'); | 2 | var postcss = require('gulp-postcss'); |
8 | 3 | var autoprefixer = require('autoprefixer-core'); | ||
9 | 4 | var bemlinter = require('postcss-bem-linter'); | ||
10 | 3 | var browserify = require('browserify'); | 5 | var browserify = require('browserify'); |
11 | 4 | var buffer = require('vinyl-buffer'); | 6 | var buffer = require('vinyl-buffer'); |
12 | 5 | var concat = require('gulp-concat'); | 7 | var concat = require('gulp-concat'); |
13 | @@ -71,10 +73,19 @@ | |||
14 | 71 | // Styles | 73 | // Styles |
15 | 72 | 74 | ||
16 | 73 | gulp.task('styles', ['styles:clean'], function() { | 75 | gulp.task('styles', ['styles:clean'], function() { |
18 | 74 | return gulp.src(['node_modules/normalize.css/normalize.css', 'www/src/css/**/*.css']) | 76 | var processors = [ |
19 | 77 | autoprefixer({browsers: ['last 1 version']}), | ||
20 | 78 | bemlinter('bem') | ||
21 | 79 | ]; | ||
22 | 80 | return gulp.src([ | ||
23 | 81 | 'node_modules/normalize.css/normalize.css', | ||
24 | 82 | 'www/src/css/**/*.css' | ||
25 | 83 | ]) | ||
26 | 84 | .pipe(sourcemaps.init()) | ||
27 | 85 | .pipe(postcss(processors)) | ||
28 | 75 | .pipe(csso()) | 86 | .pipe(csso()) |
29 | 76 | .pipe(autoprefixer()) | ||
30 | 77 | .pipe(concat('webdm.css')) | 87 | .pipe(concat('webdm.css')) |
31 | 88 | .pipe(sourcemaps.write('./')) | ||
32 | 78 | .pipe(gulp.dest('www/public/css')); | 89 | .pipe(gulp.dest('www/public/css')); |
33 | 79 | }); | 90 | }); |
34 | 80 | 91 | ||
35 | 81 | 92 | ||
36 | === modified file 'package.json' | |||
37 | --- package.json 2015-05-07 09:10:27 +0000 | |||
38 | +++ package.json 2015-05-12 11:34:29 +0000 | |||
39 | @@ -7,18 +7,19 @@ | |||
40 | 7 | }, | 7 | }, |
41 | 8 | "dependencies": { | 8 | "dependencies": { |
42 | 9 | "aliasify": "~1.7.2", | 9 | "aliasify": "~1.7.2", |
43 | 10 | "autoprefixer-core": "^5.1.11", | ||
44 | 10 | "backbone": "~1.1.2", | 11 | "backbone": "~1.1.2", |
45 | 11 | "backbone.marionette": "~2.4.1", | 12 | "backbone.marionette": "~2.4.1", |
46 | 12 | "backbone.radio": "^0.9.0", | 13 | "backbone.radio": "^0.9.0", |
47 | 13 | "browserify": "~9.0.3", | 14 | "browserify": "~9.0.3", |
48 | 14 | "del": "~1.1.1", | 15 | "del": "~1.1.1", |
49 | 15 | "gulp": "~3.8.11", | 16 | "gulp": "~3.8.11", |
50 | 16 | "gulp-autoprefixer": "~2.1.0", | ||
51 | 17 | "gulp-concat": "~2.5.2", | 17 | "gulp-concat": "~2.5.2", |
52 | 18 | "gulp-csso": "~1.0.0", | 18 | "gulp-csso": "~1.0.0", |
53 | 19 | "gulp-imagemin": "~2.2.1", | 19 | "gulp-imagemin": "~2.2.1", |
54 | 20 | "gulp-jscs": "~1.4.0", | 20 | "gulp-jscs": "~1.4.0", |
55 | 21 | "gulp-jshint": "~1.9.4", | 21 | "gulp-jshint": "~1.9.4", |
56 | 22 | "gulp-postcss": "^5.1.6", | ||
57 | 22 | "gulp-sourcemaps": "~1.5.0", | 23 | "gulp-sourcemaps": "~1.5.0", |
58 | 23 | "gulp-uglify": "~1.1.0", | 24 | "gulp-uglify": "~1.1.0", |
59 | 24 | "gulp-util": "~3.0.4", | 25 | "gulp-util": "~3.0.4", |
60 | @@ -35,6 +36,7 @@ | |||
61 | 35 | "karma-phantomjs-launcher": "~0.1.4", | 36 | "karma-phantomjs-launcher": "~0.1.4", |
62 | 36 | "lodash": "~3.3.1", | 37 | "lodash": "~3.3.1", |
63 | 37 | "normalize.css": "^3.0.3", | 38 | "normalize.css": "^3.0.3", |
64 | 39 | "postcss-bem-linter": "git://github.com/necolas/postcss-bem-linter", | ||
65 | 38 | "vinyl-buffer": "~1.0.0", | 40 | "vinyl-buffer": "~1.0.0", |
66 | 39 | "vinyl-source-stream": "~1.1.0", | 41 | "vinyl-source-stream": "~1.1.0", |
67 | 40 | "watchify": "~3.1.2" | 42 | "watchify": "~3.1.2" |
68 | 41 | 43 | ||
69 | === modified file 'www/src/css/alert.css' | |||
70 | --- www/src/css/alert.css 2015-05-07 15:38:47 +0000 | |||
71 | +++ www/src/css/alert.css 2015-05-12 11:34:29 +0000 | |||
72 | @@ -1,3 +1,5 @@ | |||
73 | 1 | /** @define b-alert; weak */ | ||
74 | 2 | |||
75 | 1 | .b-alert { | 3 | .b-alert { |
76 | 2 | position: relative; | 4 | position: relative; |
77 | 3 | width: 600px; | 5 | width: 600px; |
78 | 4 | 6 | ||
79 | === modified file 'www/src/css/banner.css' | |||
80 | --- www/src/css/banner.css 2015-05-04 18:24:04 +0000 | |||
81 | +++ www/src/css/banner.css 2015-05-12 11:34:29 +0000 | |||
82 | @@ -1,3 +1,5 @@ | |||
83 | 1 | /** @define b-banner; weak */ | ||
84 | 2 | |||
85 | 1 | .b-banner { | 3 | .b-banner { |
86 | 2 | display:flex; | 4 | display:flex; |
87 | 3 | align-items:center; | 5 | align-items:center; |
88 | @@ -73,11 +75,11 @@ | |||
89 | 73 | border-right:1px solid #333; | 75 | border-right:1px solid #333; |
90 | 74 | } | 76 | } |
91 | 75 | 77 | ||
93 | 76 | .b-banner__nav-item--active { | 78 | .b-banner__nav-item_active { |
94 | 77 | position:relative; | 79 | position:relative; |
95 | 78 | } | 80 | } |
96 | 79 | 81 | ||
98 | 80 | .b-banner__nav-item--active::before { | 82 | .b-banner__nav-item_active::before { |
99 | 81 | position:absolute; | 83 | position:absolute; |
100 | 82 | content:''; | 84 | content:''; |
101 | 83 | background:#dd4814; | 85 | background:#dd4814; |
102 | @@ -117,4 +119,3 @@ | |||
103 | 117 | .b-banner__secondary-nav .b-banner__nav-item:hover { | 119 | .b-banner__secondary-nav .b-banner__nav-item:hover { |
104 | 118 | background-color:#dd4814; | 120 | background-color:#dd4814; |
105 | 119 | } | 121 | } |
106 | 120 | |||
107 | 121 | 122 | ||
108 | === modified file 'www/src/css/installer.css' | |||
109 | --- www/src/css/installer.css 2015-05-08 13:11:16 +0000 | |||
110 | +++ www/src/css/installer.css 2015-05-12 11:34:29 +0000 | |||
111 | @@ -1,10 +1,12 @@ | |||
112 | 1 | /** @define b-installer; weak */ | ||
113 | 2 | |||
114 | 1 | .b-installer { | 3 | .b-installer { |
115 | 2 | position:relative; | 4 | position:relative; |
116 | 3 | width:260px; | 5 | width:260px; |
117 | 4 | font-size:15px; | 6 | font-size:15px; |
118 | 5 | } | 7 | } |
119 | 6 | 8 | ||
121 | 7 | .b-installer.b-installer--small { | 9 | .b-installer_small { |
122 | 8 | font-size:13px; | 10 | font-size:13px; |
123 | 9 | width:160px; | 11 | width:160px; |
124 | 10 | } | 12 | } |
125 | @@ -26,13 +28,13 @@ | |||
126 | 26 | white-space: nowrap; | 28 | white-space: nowrap; |
127 | 27 | } | 29 | } |
128 | 28 | 30 | ||
130 | 29 | .b-installer--uninstall .b-installer__button { | 31 | .b-installer_do_uninstall .b-installer__button { |
131 | 30 | background-color:#ccc; | 32 | background-color:#ccc; |
132 | 31 | color:#fff; | 33 | color:#fff; |
133 | 32 | font-weight:300; | 34 | font-weight:300; |
134 | 33 | } | 35 | } |
135 | 34 | 36 | ||
137 | 35 | .b-installer--disabled .b-installer__button { | 37 | .b-installer_disabled .b-installer__button { |
138 | 36 | font-weight: inherit; | 38 | font-weight: inherit; |
139 | 37 | background-color: inherit; | 39 | background-color: inherit; |
140 | 38 | color:#333; | 40 | color:#333; |
141 | @@ -40,7 +42,7 @@ | |||
142 | 40 | text-transform:none; | 42 | text-transform:none; |
143 | 41 | } | 43 | } |
144 | 42 | 44 | ||
146 | 43 | .b-installer--thinking .b-installer__button { | 45 | .b-installer_thinking .b-installer__button { |
147 | 44 | background-color:transparent; | 46 | background-color:transparent; |
148 | 45 | cursor:progress; | 47 | cursor:progress; |
149 | 46 | color:#dd4814; | 48 | color:#dd4814; |
150 | @@ -76,6 +78,6 @@ | |||
151 | 76 | transition: right 0.1s; | 78 | transition: right 0.1s; |
152 | 77 | } | 79 | } |
153 | 78 | 80 | ||
155 | 79 | .b-installer--thinking.b-installer--install .b-installer__progress { | 81 | .b-installer_thinking .b-installer__progress { |
156 | 80 | display:block; | 82 | display:block; |
157 | 81 | } | 83 | } |
158 | 82 | 84 | ||
159 | === modified file 'www/src/css/layout.css' | |||
160 | --- www/src/css/layout.css 2015-05-07 15:38:47 +0000 | |||
161 | +++ www/src/css/layout.css 2015-05-12 11:34:29 +0000 | |||
162 | @@ -1,3 +1,5 @@ | |||
163 | 1 | /** @define b-layout; weak */ | ||
164 | 2 | |||
165 | 1 | .b-layout { | 3 | .b-layout { |
166 | 2 | display: flex; | 4 | display: flex; |
167 | 3 | min-height: 100vh; | 5 | min-height: 100vh; |
168 | 4 | 6 | ||
169 | === modified file 'www/src/css/snap.css' | |||
170 | --- www/src/css/snap.css 2015-05-05 15:16:24 +0000 | |||
171 | +++ www/src/css/snap.css 2015-05-12 11:34:29 +0000 | |||
172 | @@ -1,3 +1,5 @@ | |||
173 | 1 | /** @define b-snap; weak */ | ||
174 | 2 | |||
175 | 1 | .b-snap { | 3 | .b-snap { |
176 | 2 | } | 4 | } |
177 | 3 | 5 | ||
178 | @@ -53,7 +55,7 @@ | |||
179 | 53 | padding:15px 0; | 55 | padding:15px 0; |
180 | 54 | } | 56 | } |
181 | 55 | 57 | ||
183 | 56 | .b-snap__nav-item--active::before { | 58 | .b-snap__nav-item_active::before { |
184 | 57 | position:absolute; | 59 | position:absolute; |
185 | 58 | content:''; | 60 | content:''; |
186 | 59 | background:#dd4814; | 61 | background:#dd4814; |
187 | 60 | 62 | ||
188 | === modified file 'www/src/css/snaplist.css' | |||
189 | --- www/src/css/snaplist.css 2015-05-08 13:11:16 +0000 | |||
190 | +++ www/src/css/snaplist.css 2015-05-12 11:34:29 +0000 | |||
191 | @@ -1,3 +1,5 @@ | |||
192 | 1 | /** @define b-snaplist; weak */ | ||
193 | 2 | |||
194 | 1 | .b-snaplist { | 3 | .b-snaplist { |
195 | 2 | } | 4 | } |
196 | 3 | 5 | ||
197 | @@ -7,38 +9,38 @@ | |||
198 | 7 | 9 | ||
199 | 8 | /** grid style **/ | 10 | /** grid style **/ |
200 | 9 | 11 | ||
202 | 10 | .b-snaplist--grid { | 12 | .b-snaplist_grid { |
203 | 11 | display:flex; | 13 | display:flex; |
204 | 12 | flex-wrap: wrap; | 14 | flex-wrap: wrap; |
205 | 13 | } | 15 | } |
206 | 14 | 16 | ||
208 | 15 | .b-snaplist--grid .b-snaplist__item { | 17 | .b-snaplist_grid .b-snaplist__item { |
209 | 16 | flex: 0 1 20%; | 18 | flex: 0 1 20%; |
210 | 17 | padding:10px; | 19 | padding:10px; |
211 | 18 | } | 20 | } |
212 | 19 | 21 | ||
214 | 20 | .b-snaplist--grid .b-snaplist__icon { | 22 | .b-snaplist_grid .b-snaplist__icon { |
215 | 21 | } | 23 | } |
216 | 22 | 24 | ||
218 | 23 | .b-snaplist--grid .b-snaplist__icon img { | 25 | .b-snaplist_grid .b-snaplist__icon img { |
219 | 24 | border-radius:15%; | 26 | border-radius:15%; |
220 | 25 | width:100%; | 27 | width:100%; |
221 | 26 | } | 28 | } |
222 | 27 | 29 | ||
224 | 28 | .b-snaplist--grid .b-snaplist__name { | 30 | .b-snaplist_grid .b-snaplist__name { |
225 | 29 | text-align: center; | 31 | text-align: center; |
226 | 30 | white-space: nowrap; | 32 | white-space: nowrap; |
227 | 31 | overflow: hidden; | 33 | overflow: hidden; |
228 | 32 | text-overflow: ellipsis; | 34 | text-overflow: ellipsis; |
229 | 33 | } | 35 | } |
230 | 34 | 36 | ||
232 | 35 | .b-snaplist--grid .b-snaplist__name ~ * { | 37 | .b-snaplist_grid .b-snaplist__name ~ * { |
233 | 36 | display:none; | 38 | display:none; |
234 | 37 | } | 39 | } |
235 | 38 | 40 | ||
236 | 39 | /** row style **/ | 41 | /** row style **/ |
237 | 40 | 42 | ||
239 | 41 | .b-snaplist--row .b-snaplist__item { | 43 | .b-snaplist_row .b-snaplist__item { |
240 | 42 | width:100%; | 44 | width:100%; |
241 | 43 | display:flex; | 45 | display:flex; |
242 | 44 | align-items:center; | 46 | align-items:center; |
243 | @@ -48,24 +50,24 @@ | |||
244 | 48 | background-color:#fff; | 50 | background-color:#fff; |
245 | 49 | } | 51 | } |
246 | 50 | 52 | ||
248 | 51 | .b-snaplist--row .b-snaplist__item:last-child { | 53 | .b-snaplist_row .b-snaplist__item:last-child { |
249 | 52 | margin-bottom:0; | 54 | margin-bottom:0; |
250 | 53 | } | 55 | } |
251 | 54 | 56 | ||
253 | 55 | .b-snaplist--row .b-snaplist__icon { | 57 | .b-snaplist_row .b-snaplist__icon { |
254 | 56 | flex:0 0 40px; | 58 | flex:0 0 40px; |
255 | 57 | } | 59 | } |
256 | 58 | 60 | ||
258 | 59 | .b-snaplist--row .b-snaplist__icon img { | 61 | .b-snaplist_row .b-snaplist__icon img { |
259 | 60 | display:block; | 62 | display:block; |
260 | 61 | width: 40px; | 63 | width: 40px; |
261 | 62 | height: 40px; | 64 | height: 40px; |
262 | 63 | } | 65 | } |
263 | 64 | 66 | ||
268 | 65 | .b-snaplist--row .b-snaplist__name, | 67 | .b-snaplist_row .b-snaplist__name, |
269 | 66 | .b-snaplist--row .b-snaplist__version, | 68 | .b-snaplist_row .b-snaplist__version, |
270 | 67 | .b-snaplist--row .b-snaplist__type, | 69 | .b-snaplist_row .b-snaplist__type, |
271 | 68 | .b-snaplist--row .b-snaplist__origin { | 70 | .b-snaplist_row .b-snaplist__origin { |
272 | 69 | flex:1 1; | 71 | flex:1 1; |
273 | 70 | margin:0 1em; | 72 | margin:0 1em; |
274 | 71 | white-space: nowrap; | 73 | white-space: nowrap; |
275 | @@ -74,18 +76,18 @@ | |||
276 | 74 | text-overflow: ellipsis; | 76 | text-overflow: ellipsis; |
277 | 75 | } | 77 | } |
278 | 76 | 78 | ||
280 | 77 | .b-snaplist--row .b-snaplist__version { | 79 | .b-snaplist_row .b-snaplist__version { |
281 | 78 | min-width:100px; | 80 | min-width:100px; |
282 | 79 | } | 81 | } |
283 | 80 | 82 | ||
285 | 81 | .b-snaplist--row .b-snaplist__type { | 83 | .b-snaplist_row .b-snaplist__type { |
286 | 82 | text-align:center; | 84 | text-align:center; |
287 | 83 | } | 85 | } |
288 | 84 | 86 | ||
290 | 85 | .b-snaplist--row .b-snaplist__actions { | 87 | .b-snaplist_row .b-snaplist__actions { |
291 | 86 | } | 88 | } |
292 | 87 | 89 | ||
294 | 88 | .b-snaplist--row .b-installer__message { | 90 | .b-snaplist_row .b-installer__message { |
295 | 89 | /** XXX hmm **/ | 91 | /** XXX hmm **/ |
296 | 90 | display:none; | 92 | display:none; |
297 | 91 | } | 93 | } |
298 | 92 | 94 | ||
299 | === modified file 'www/src/js/models/snap.js' | |||
300 | --- www/src/js/models/snap.js 2015-05-08 14:53:07 +0000 | |||
301 | +++ www/src/js/models/snap.js 2015-05-12 11:34:29 +0000 | |||
302 | @@ -67,24 +67,25 @@ | |||
303 | 67 | this.setInstallHTMLClass(model); | 67 | this.setInstallHTMLClass(model); |
304 | 68 | }, | 68 | }, |
305 | 69 | 69 | ||
306 | 70 | // XXX move to install behaviour | ||
307 | 70 | setInstallHTMLClass: function(model) { | 71 | setInstallHTMLClass: function(model) { |
308 | 71 | var state = model.get('status'); | 72 | var state = model.get('status'); |
309 | 72 | var installHTMLClass = ''; | 73 | var installHTMLClass = ''; |
310 | 73 | 74 | ||
311 | 74 | if (state === CONF.INSTALL_STATE.UNINSTALLED) { | 75 | if (state === CONF.INSTALL_STATE.UNINSTALLED) { |
313 | 75 | installHTMLClass = 'b-installer--install'; | 76 | installHTMLClass = 'b-installer_do_install'; |
314 | 76 | } | 77 | } |
315 | 77 | 78 | ||
316 | 78 | if (state === CONF.INSTALL_STATE.INSTALLED) { | 79 | if (state === CONF.INSTALL_STATE.INSTALLED) { |
318 | 79 | installHTMLClass = 'b-installer--uninstall'; | 80 | installHTMLClass = 'b-installer_do_uninstall'; |
319 | 80 | } | 81 | } |
320 | 81 | 82 | ||
321 | 82 | if (state === CONF.INSTALL_STATE.INSTALLING) { | 83 | if (state === CONF.INSTALL_STATE.INSTALLING) { |
323 | 83 | installHTMLClass = 'b-installer--install b-installer--thinking'; | 84 | installHTMLClass = 'b-installer_do_install b-installer_thinking'; |
324 | 84 | } | 85 | } |
325 | 85 | 86 | ||
326 | 86 | if (state === CONF.INSTALL_STATE.UNINSTALLING) { | 87 | if (state === CONF.INSTALL_STATE.UNINSTALLING) { |
328 | 87 | installHTMLClass = 'b-installer--uninstall b-installer--thinking'; | 88 | installHTMLClass = 'b-installer_do_uninstall b-installer_thinking'; |
329 | 88 | } | 89 | } |
330 | 89 | 90 | ||
331 | 90 | return model.set('installHTMLClass', installHTMLClass); | 91 | return model.set('installHTMLClass', installHTMLClass); |
332 | 91 | 92 | ||
333 | === modified file 'www/src/js/templates/_installer.hbs' | |||
334 | --- www/src/js/templates/_installer.hbs 2015-05-08 13:11:16 +0000 | |||
335 | +++ www/src/js/templates/_installer.hbs 2015-05-12 11:34:29 +0000 | |||
336 | @@ -1,5 +1,5 @@ | |||
337 | 1 | {{#if isInstallable}} | 1 | {{#if isInstallable}} |
339 | 2 | <div class="b-installer b-installer--small {{ installHTMLClass }}"> | 2 | <div class="b-installer b-installer_small {{ installHTMLClass }}"> |
340 | 3 | {{#if installActionString}} | 3 | {{#if installActionString}} |
341 | 4 | <div class="b-installer__button">{{ installActionString }}</div> | 4 | <div class="b-installer__button">{{ installActionString }}</div> |
342 | 5 | <div class="b-installer__progress" title="download progress"> | 5 | <div class="b-installer__progress" title="download progress"> |
343 | @@ -9,7 +9,7 @@ | |||
344 | 9 | <div class="b-installer__message"></div> | 9 | <div class="b-installer__message"></div> |
345 | 10 | </div> | 10 | </div> |
346 | 11 | {{else}} | 11 | {{else}} |
348 | 12 | <div class="b-installer b-installer--small b-installer--disabled {{ installHTMLClass }}"> | 12 | <div class="b-installer b-installer_small b-installer_disabled {{ installHTMLClass }}"> |
349 | 13 | <div class="b-installer__button"> | 13 | <div class="b-installer__button"> |
350 | 14 | {{#if isInstalled}} | 14 | {{#if isInstalled}} |
351 | 15 | Installed | 15 | Installed |
352 | 16 | 16 | ||
353 | === modified file 'www/src/js/templates/layout-banner.hbs' | |||
354 | --- www/src/js/templates/layout-banner.hbs 2015-05-04 18:24:04 +0000 | |||
355 | +++ www/src/js/templates/layout-banner.hbs 2015-05-12 11:34:29 +0000 | |||
356 | @@ -1,5 +1,5 @@ | |||
357 | 1 | <div class="b-banner__brand"> | 1 | <div class="b-banner__brand"> |
359 | 2 | <div class="b-banner__nav-item{{#if isHomeActive }} b-banner__nav-item--active{{/if}}"> | 2 | <div class="b-banner__nav-item{{#if isHomeActive }} b-banner__nav-item_active{{/if}}"> |
360 | 3 | <a href="/"> | 3 | <a href="/"> |
361 | 4 | <img src="/public/images/cof.svg" height="30" width="30"> | 4 | <img src="/public/images/cof.svg" height="30" width="30"> |
362 | 5 | <span>{{ name }} {{ subname }}</span> | 5 | <span>{{ name }} {{ subname }}</span> |
363 | @@ -7,7 +7,7 @@ | |||
364 | 7 | </div> | 7 | </div> |
365 | 8 | </div> | 8 | </div> |
366 | 9 | <div class="b-banner__primary-nav"> | 9 | <div class="b-banner__primary-nav"> |
368 | 10 | <div class="b-banner__nav-item{{#if isStoreActive }} b-banner__nav-item--active{{/if}}"> | 10 | <div class="b-banner__nav-item{{#if isStoreActive }} b-banner__nav-item_active{{/if}}"> |
369 | 11 | <a href="/store"> | 11 | <a href="/store"> |
370 | 12 | Snappy store | 12 | Snappy store |
371 | 13 | </a> | 13 | </a> |
372 | @@ -17,13 +17,13 @@ | |||
373 | 17 | <div class="b-banner__search"> | 17 | <div class="b-banner__search"> |
374 | 18 | <form class="b-banner__form" action="/search" method="GET"> | 18 | <form class="b-banner__form" action="/search" method="GET"> |
375 | 19 | <input class="b-banner__input" type="search" name="q" placeholder="Search for snaps" value="{{ query }}"> | 19 | <input class="b-banner__input" type="search" name="q" placeholder="Search for snaps" value="{{ query }}"> |
377 | 20 | <div class="b-banner__nav-item{{#if isSearchActive }} b-banner__nav-item--active{{/if}}"> | 20 | <div class="b-banner__nav-item{{#if isSearchActive }} b-banner__nav-item_active{{/if}}"> |
378 | 21 | <button type="submit" class="b-banner__submit"></button> | 21 | <button type="submit" class="b-banner__submit"></button> |
379 | 22 | </div> | 22 | </div> |
380 | 23 | </form> | 23 | </form> |
381 | 24 | </div> | 24 | </div> |
382 | 25 | <div class="b-banner__secondary-nav"> | 25 | <div class="b-banner__secondary-nav"> |
384 | 26 | <div class="b-banner__nav-item{{#if isSystemActive }} b-banner__nav-item--active{{/if}}"> | 26 | <div class="b-banner__nav-item{{#if isSystemActive }} b-banner__nav-item_active{{/if}}"> |
385 | 27 | <a href="/system-settings"> | 27 | <a href="/system-settings"> |
386 | 28 | <img src="/public/images/settings.svg" height="30" width="30"> | 28 | <img src="/public/images/settings.svg" height="30" width="30"> |
387 | 29 | </a> | 29 | </a> |
388 | 30 | 30 | ||
389 | === modified file 'www/src/js/views/layout-banner.js' | |||
390 | --- www/src/js/views/layout-banner.js 2015-04-30 14:33:49 +0000 | |||
391 | +++ www/src/js/views/layout-banner.js 2015-05-12 11:34:29 +0000 | |||
392 | @@ -16,7 +16,7 @@ | |||
393 | 16 | 'click @ui.submit': 'submit', | 16 | 'click @ui.submit': 'submit', |
394 | 17 | 'click': function(e) { | 17 | 'click': function(e) { |
395 | 18 | var CLASS = 'b-banner__nav-item'; | 18 | var CLASS = 'b-banner__nav-item'; |
397 | 19 | var ACTIVE_CLASS = 'b-banner__nav-item--active'; | 19 | var ACTIVE_CLASS = 'b-banner__nav-item_active'; |
398 | 20 | var navItem = e.target.closest('.' + CLASS); | 20 | var navItem = e.target.closest('.' + CLASS); |
399 | 21 | if (navItem) { | 21 | if (navItem) { |
400 | 22 | this.$('.' + ACTIVE_CLASS).toggleClass(ACTIVE_CLASS, false); | 22 | this.$('.' + ACTIVE_CLASS).toggleClass(ACTIVE_CLASS, false); |
401 | 23 | 23 | ||
402 | === modified file 'www/src/js/views/snap-menu.js' | |||
403 | --- www/src/js/views/snap-menu.js 2015-05-05 14:40:14 +0000 | |||
404 | +++ www/src/js/views/snap-menu.js 2015-05-12 11:34:29 +0000 | |||
405 | @@ -29,7 +29,7 @@ | |||
406 | 29 | setActiveNav: function(link) { | 29 | setActiveNav: function(link) { |
407 | 30 | link = link || 'details'; | 30 | link = link || 'details'; |
408 | 31 | var toActiveSelector = '[href=' + link + ']'; | 31 | var toActiveSelector = '[href=' + link + ']'; |
410 | 32 | var activeClass = 'b-snap__nav-item--active'; | 32 | var activeClass = 'b-snap__nav-item_active'; |
411 | 33 | var activeSelector = '.' + activeClass; | 33 | var activeSelector = '.' + activeClass; |
412 | 34 | this.$(activeSelector).removeClass(activeClass); | 34 | this.$(activeSelector).removeClass(activeClass); |
413 | 35 | this.$(toActiveSelector).addClass(activeClass); | 35 | this.$(toActiveSelector).addClass(activeClass); |
414 | 36 | 36 | ||
415 | === modified file 'www/src/js/views/snaplist.js' | |||
416 | --- www/src/js/views/snaplist.js 2015-04-28 21:33:43 +0000 | |||
417 | +++ www/src/js/views/snaplist.js 2015-05-12 11:34:29 +0000 | |||
418 | @@ -12,9 +12,9 @@ | |||
419 | 12 | var style = this.options.style || 'row'; | 12 | var style = this.options.style || 'row'; |
420 | 13 | 13 | ||
421 | 14 | if (style === 'row') { | 14 | if (style === 'row') { |
423 | 15 | return 'b-snaplist b-snaplist--row'; | 15 | return 'b-snaplist b-snaplist_row'; |
424 | 16 | } else if (style === 'grid') { | 16 | } else if (style === 'grid') { |
426 | 17 | return 'b-snaplist b-snaplist--grid'; | 17 | return 'b-snaplist b-snaplist_grid'; |
427 | 18 | } | 18 | } |
428 | 19 | }, | 19 | }, |
429 | 20 | 20 | ||
430 | 21 | 21 | ||
431 | === modified file 'www/tests/snapLayoutViewSpec.js' | |||
432 | --- www/tests/snapLayoutViewSpec.js 2015-05-05 20:29:57 +0000 | |||
433 | +++ www/tests/snapLayoutViewSpec.js 2015-05-12 11:34:29 +0000 | |||
434 | @@ -31,22 +31,22 @@ | |||
435 | 31 | 31 | ||
436 | 32 | it('should be thinking when installing', function() { | 32 | it('should be thinking when installing', function() { |
437 | 33 | this.model.set('status', CONF.INSTALL_STATE.INSTALLING); | 33 | this.model.set('status', CONF.INSTALL_STATE.INSTALLING); |
439 | 34 | expect(this.uiInstaller.hasClass('b-installer--thinking')).toBeTruthy(); | 34 | expect(this.uiInstaller.hasClass('b-installer_thinking')).toBeTruthy(); |
440 | 35 | }); | 35 | }); |
441 | 36 | 36 | ||
442 | 37 | it('should be thinking when uninstalling', function() { | 37 | it('should be thinking when uninstalling', function() { |
443 | 38 | this.model.set('status', CONF.INSTALL_STATE.UNINSTALLING); | 38 | this.model.set('status', CONF.INSTALL_STATE.UNINSTALLING); |
445 | 39 | expect(this.uiInstaller.hasClass('b-installer--thinking')).toBeTruthy(); | 39 | expect(this.uiInstaller.hasClass('b-installer_thinking')).toBeTruthy(); |
446 | 40 | }); | 40 | }); |
447 | 41 | 41 | ||
448 | 42 | it('should not be thinking when installed', function() { | 42 | it('should not be thinking when installed', function() { |
449 | 43 | this.model.set('status', CONF.INSTALL_STATE.INSTALLED); | 43 | this.model.set('status', CONF.INSTALL_STATE.INSTALLED); |
451 | 44 | expect(this.uiInstaller.hasClass('b-installer--thinking')).toBeFalsy(); | 44 | expect(this.uiInstaller.hasClass('b-installer_thinking')).toBeFalsy(); |
452 | 45 | }); | 45 | }); |
453 | 46 | 46 | ||
454 | 47 | it('should not be thinking when uninstalled', function() { | 47 | it('should not be thinking when uninstalled', function() { |
455 | 48 | this.model.set('status', CONF.INSTALL_STATE.UNINSTALLED); | 48 | this.model.set('status', CONF.INSTALL_STATE.UNINSTALLED); |
457 | 49 | expect(this.uiInstaller.hasClass('b-installer--thinking')).toBeFalsy(); | 49 | expect(this.uiInstaller.hasClass('b-installer_thinking')).toBeFalsy(); |
458 | 50 | }); | 50 | }); |
459 | 51 | 51 | ||
460 | 52 | it('should deactivate install button if model has unrecognised status', function() { | 52 | it('should deactivate install button if model has unrecognised status', function() { |