Merge lp:~huwshimi/juju-gui/more-load-improvements into lp:juju-gui/experimental
- more-load-improvements
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 1164 |
Proposed branch: | lp:~huwshimi/juju-gui/more-load-improvements |
Merge into: | lp:juju-gui/experimental |
Diff against target: |
798 lines (+136/-211) 17 files modified
Makefile (+0/-27) app/index.html (+3/-3) app/subapps/browser/templates/browser_charm.handlebars (+17/-5) app/subapps/browser/templates/minimized.handlebars (+3/-1) app/subapps/browser/templates/sidebar.handlebars (+3/-1) app/templates/bundle-token.handlebars (+6/-1) app/templates/bundle.handlebars (+10/-1) app/templates/charm-token.handlebars (+7/-2) app/templates/left-breakout-panel.handlebars (+3/-1) lib/views/browser/browser-icon.less (+6/-4) lib/views/browser/charm-full.less (+15/-15) lib/views/browser/token.less (+9/-6) lib/views/browser/vars.less (+1/-1) lib/views/content-panel.less (+4/-3) lib/views/juju-inspector.less (+10/-9) lib/views/mixins.less (+17/-7) lib/views/stylesheet.less (+22/-124) |
To merge this branch: | bzr merge lp:~huwshimi/juju-gui/more-load-improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Commit message
Description of the change
More sprite and CSS cleanups
Moved images that are only used via background-image out of the sprites folder.
Changed some images to be used as sprites.
Removed some unused images.
Added a new mixin to handle using sprites for hover.
Removed some CSS that is no longer being used.
Cleaned up a little CSS for the sake of file size.
Removed old slider images from the Makefile as they were no longer being used.
Drive-by fix for bug #1245907 where extra scrollbars where appearing in the ghost inspector.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Huw Wilkins (huwshimi) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gary Poster (gary) wrote : | # |
LGTM. Doing QA now.
https:/
File lib/views/
https:/
lib/views/
Cool :-)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gary Poster (gary) wrote : | # |
On 2013/10/30 12:37:11, gary.poster wrote:
> LGTM. Doing QA now.
> https:/
> File lib/views/
https:/
> lib/views/
> Cool :-)
QAOK. landing.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gary Poster (gary) wrote : | # |
On 2013/10/30 12:51:26, gary.poster wrote:
> On 2013/10/30 12:37:11, gary.poster wrote:
> > LGTM. Doing QA now.
> >
> > https:/
> > File lib/views/
> >
> >
https:/
> > lib/views/
> > Cool :-)
> QAOK. landing.
Landed. Thanks!
Preview Diff
1 | === modified file 'Makefile' |
2 | --- Makefile 2013-10-25 22:06:25 +0000 |
3 | +++ Makefile 2013-10-30 05:38:22 +0000 |
4 | @@ -308,18 +308,6 @@ |
5 | app/assets/javascripts/spin.min.js | $(JAVASCRIPT_LIBRARIES) |
6 | rm -f $(BUILD_FILES) |
7 | mkdir -p build-shared/juju-ui/assets/combined-css/ |
8 | - ln -sf \ |
9 | - "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/rail-x.png" \ |
10 | - build-shared/juju-ui/assets/combined-css/rail-x.png |
11 | - ln -sf \ |
12 | - "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/rail-y.png" \ |
13 | - build-shared/juju-ui/assets/combined-css/rail-y.png |
14 | - ln -sf \ |
15 | - "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/thumb-x.png" \ |
16 | - build-shared/juju-ui/assets/combined-css/thumb-x.png |
17 | - ln -sf \ |
18 | - "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/thumb-y.png" \ |
19 | - build-shared/juju-ui/assets/combined-css/thumb-y.png |
20 | bin/merge-files |
21 | mv *.js.map build-shared/juju-ui/assets/ |
22 | |
23 | @@ -339,10 +327,6 @@ |
24 | build-$(1)/juju-ui/assets/juju-gui.css \ |
25 | build-$(1)/juju-ui/assets/sprites.css \ |
26 | build-$(1)/juju-ui/assets/sprites.png \ |
27 | - build-$(1)/juju-ui/assets/combined-css/rail-x.png \ |
28 | - build-$(1)/juju-ui/assets/combined-css/rail-y.png \ |
29 | - build-$(1)/juju-ui/assets/combined-css/thumb-x.png \ |
30 | - build-$(1)/juju-ui/assets/combined-css/thumb-y.png \ |
31 | build-$(1)/juju-ui/assets/all-yui.js |
32 | |
33 | LINK_DEBUG_FILES=$(call shared-link-files-list,debug) \ |
34 | @@ -371,17 +355,6 @@ |
35 | ln -sf \ |
36 | "$(PWD)/build-shared/juju-ui/assets/combined-css/all-static.css" \ |
37 | build-$(1)/juju-ui/assets/combined-css/ |
38 | - ln -sf \ |
39 | - "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-x.png" \ |
40 | - build-$(1)/juju-ui/assets/combined-css/ |
41 | - ln -sf \ |
42 | - "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-y.png" \ |
43 | - build-$(1)/juju-ui/assets/combined-css/ |
44 | - ln -sf \ |
45 | - "$(PWD)/build-shared/juju-ui/assets/combined-css/thumb-x.png" \ |
46 | - build-$(1)/juju-ui/assets/combined-css/ |
47 | - ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/thumb-y.png" \ |
48 | - build-$(1)/juju-ui/assets/combined-css/ |
49 | ln -sf "$(PWD)/build-shared/juju-ui/assets/juju-gui.css" \ |
50 | build-$(1)/juju-ui/assets/ |
51 | ln -sf "$(PWD)/build-shared/juju-ui/assets/sprites.css" \ |
52 | |
53 | === removed file 'app/assets/images/email-click.png' |
54 | Binary files app/assets/images/email-click.png 2013-07-11 20:23:47 +0000 and app/assets/images/email-click.png 1970-01-01 00:00:00 +0000 differ |
55 | === removed file 'app/assets/images/fullscreen_icon.png' |
56 | Binary files app/assets/images/fullscreen_icon.png 2013-07-11 09:47:02 +0000 and app/assets/images/fullscreen_icon.png 1970-01-01 00:00:00 +0000 differ |
57 | === removed file 'app/assets/images/google-click.png' |
58 | Binary files app/assets/images/google-click.png 2013-07-11 20:23:47 +0000 and app/assets/images/google-click.png 1970-01-01 00:00:00 +0000 differ |
59 | === removed file 'app/assets/images/inspector-charm-scale-up.png' |
60 | Binary files app/assets/images/inspector-charm-scale-up.png 2013-07-18 15:37:42 +0000 and app/assets/images/inspector-charm-scale-up.png 1970-01-01 00:00:00 +0000 differ |
61 | === removed file 'app/assets/images/landscape_restart.png' |
62 | Binary files app/assets/images/landscape_restart.png 2013-02-14 00:32:35 +0000 and app/assets/images/landscape_restart.png 1970-01-01 00:00:00 +0000 differ |
63 | === renamed file 'app/assets/images/field-changed.png' => 'app/assets/images/non-sprites/field-changed.png' |
64 | === renamed file 'app/assets/images/field-conflict-14.png' => 'app/assets/images/non-sprites/field-conflict-14.png' |
65 | === renamed file 'app/assets/images/field-conflict.png' => 'app/assets/images/non-sprites/field-conflict.png' |
66 | === renamed file 'app/assets/images/field-resolved.png' => 'app/assets/images/non-sprites/field-resolved.png' |
67 | === renamed file 'app/assets/images/field-saved-finished.png' => 'app/assets/images/non-sprites/field-saved-finished.png' |
68 | === renamed file 'app/assets/images/field-saved.png' => 'app/assets/images/non-sprites/field-saved.png' |
69 | === renamed file 'app/assets/images/form-validation-cross.png' => 'app/assets/images/non-sprites/form-validation-cross.png' |
70 | === renamed file 'app/assets/images/form-validation-tick.png' => 'app/assets/images/non-sprites/form-validation-tick.png' |
71 | === renamed file 'app/assets/images/landscape_restart_menu.png' => 'app/assets/images/non-sprites/landscape_restart_menu.png' |
72 | === renamed file 'app/assets/images/landscape_security_menu.png' => 'app/assets/images/non-sprites/landscape_security_menu.png' |
73 | === renamed file 'app/assets/images/paper-bg.jpg' => 'app/assets/images/non-sprites/paper-bg.jpg' |
74 | === renamed file 'app/assets/images/pattern_tile.png' => 'app/assets/images/non-sprites/pattern_tile.png' |
75 | === removed file 'app/assets/images/sidebar_icon.png' |
76 | Binary files app/assets/images/sidebar_icon.png 2013-07-11 09:47:02 +0000 and app/assets/images/sidebar_icon.png 1970-01-01 00:00:00 +0000 differ |
77 | === removed file 'app/assets/images/twitter-click.png' |
78 | Binary files app/assets/images/twitter-click.png 2013-07-11 20:23:47 +0000 and app/assets/images/twitter-click.png 1970-01-01 00:00:00 +0000 differ |
79 | === modified file 'app/index.html' |
80 | --- app/index.html 2013-10-29 22:30:57 +0000 |
81 | +++ app/index.html 2013-10-30 05:38:22 +0000 |
82 | @@ -64,7 +64,7 @@ |
83 | <!-- This <img> tag is here just to force early loading of the background |
84 | image so it displays more quickly. This makes a large improvement to |
85 | the way the app looks while loading on a slow connection. --> |
86 | - <img src="/juju-ui/assets/images/pattern_tile.png" style="display: none;"> |
87 | + <img src="/juju-ui/assets/images/non-sprites/pattern_tile.png" style="display: none;"> |
88 | |
89 | <div id="full-screen-mask" class="crosshatch-background"> |
90 | <div id="browser-warning" class="centered-column" |
91 | @@ -125,13 +125,13 @@ |
92 | </li> |
93 | <li class="tab"> |
94 | <a class="fullscreen" href=""> |
95 | - <i class="sprite fullscreen_icon"></i> |
96 | + <i class="sprite inspector_status_selected"></i> |
97 | Browse |
98 | </a> |
99 | </li> |
100 | <li class="tab"> |
101 | <a class="sidebar" href=""> |
102 | - <i class="sprite sidebar_icon"></i> |
103 | + <i class="sprite inspector_configuration_selected"></i> |
104 | Build |
105 | </a> |
106 | </li> |
107 | |
108 | === modified file 'app/subapps/browser/templates/browser_charm.handlebars' |
109 | --- app/subapps/browser/templates/browser_charm.handlebars 2013-10-23 21:10:55 +0000 |
110 | +++ app/subapps/browser/templates/browser_charm.handlebars 2013-10-30 05:38:22 +0000 |
111 | @@ -1,8 +1,17 @@ |
112 | -<div class="charm {{#if is_approved}}recommended{{/if}}"> |
113 | +<div class="charm"> |
114 | <div class="content"> |
115 | {{#unless forInspector}} |
116 | <div class="header"> |
117 | - {{#unless isFullscreen}}<a href="" class="back icon"></a>{{/unless}} |
118 | + {{#if is_approved}} |
119 | + <div class="recommended"> |
120 | + <i class="sprite recommended-triangle-large"></i> |
121 | + </div> |
122 | + {{/if}} |
123 | + {{#unless isFullscreen}} |
124 | + <a href="" class="back icon"> |
125 | + <i class="sprite panel_close"></i> |
126 | + </a> |
127 | + {{/unless}} |
128 | <div class="block-icon"> |
129 | <img src="{{charmIconPath storeId}}" alt="{{ name }} icon" class="icon"> |
130 | </div> |
131 | @@ -67,13 +76,16 @@ |
132 | {{#unless forInspector}} |
133 | <span id="sharing"> |
134 | <a href="http://twitter.com/home?status={{ twitterText }}" title="Share on twitter"> |
135 | - <i class="sprite twitter-normal"></i> |
136 | + <i class="sprite twitter-normal normal"></i> |
137 | + <i class="sprite twitter-hover hover"></i> |
138 | </a> |
139 | <a href="https://plus.google.com/share?url={{ link }}" title="Share on G+"> |
140 | - <i class="sprite google-normal"></i> |
141 | + <i class="sprite google-normal normal"></i> |
142 | + <i class="sprite google-hover hover"></i> |
143 | </a> |
144 | <a href="mailto:?subject={{ emailSubject }}&body={{ emailText }}" title="Share with email"> |
145 | - <i class="sprite email-normal"></i> |
146 | + <i class="sprite email-normal normal"></i> |
147 | + <i class="sprite email-hover hover"></i> |
148 | </a> |
149 | </span> |
150 | {{/unless}} |
151 | |
152 | === modified file 'app/subapps/browser/templates/minimized.handlebars' |
153 | --- app/subapps/browser/templates/minimized.handlebars 2013-07-03 22:55:30 +0000 |
154 | +++ app/subapps/browser/templates/minimized.handlebars 2013-10-30 05:38:22 +0000 |
155 | @@ -1,1 +1,3 @@ |
156 | -<a href="" class="bws-icon"></a> |
157 | +<a href="" class="bws-icon"> |
158 | + <i class="sprite browser_icon"></i> |
159 | +</a> |
160 | |
161 | === modified file 'app/subapps/browser/templates/sidebar.handlebars' |
162 | --- app/subapps/browser/templates/sidebar.handlebars 2013-09-23 00:44:11 +0000 |
163 | +++ app/subapps/browser/templates/sidebar.handlebars 2013-10-30 05:38:22 +0000 |
164 | @@ -1,5 +1,7 @@ |
165 | <div class="charmbrowser"> |
166 | - <a href="" class="bws-icon"></a> |
167 | + <a href="" class="bws-icon"> |
168 | + <i class="sprite browser_icon"></i> |
169 | + </a> |
170 | <div id="bws-sidebar"> |
171 | <div class="bws-header"> |
172 | </div> |
173 | |
174 | === modified file 'app/templates/bundle-token.handlebars' |
175 | --- app/templates/bundle-token.handlebars 2013-10-09 22:20:53 +0000 |
176 | +++ app/templates/bundle-token.handlebars 2013-10-30 05:38:22 +0000 |
177 | @@ -2,8 +2,13 @@ |
178 | test/test_charm_running.py. If you change this name, change the other |
179 | one too! }} |
180 | <a href="/bundle/{{id}}" |
181 | - class="token {{size}} {{#if is_approved}}recommended{{/if}}" |
182 | + class="token {{size}}" |
183 | data-charmid="/bundle/{{id}}"> |
184 | + {{#if is_approved}} |
185 | + <span class="recommended"> |
186 | + <i class="sprite recommended-triangle"></i> |
187 | + </span> |
188 | + {{/if}} |
189 | <span class="block-icon"> |
190 | <div class="icon"> |
191 | <img src="{{charmIconPath id true}}" alt="{{ name }} icon"> |
192 | |
193 | === modified file 'app/templates/bundle.handlebars' |
194 | --- app/templates/bundle.handlebars 2013-10-29 22:30:57 +0000 |
195 | +++ app/templates/bundle.handlebars 2013-10-30 05:38:22 +0000 |
196 | @@ -2,7 +2,16 @@ |
197 | <div class="content"> |
198 | {{#unless forInspector}} |
199 | <div class="header"> |
200 | - <a href="" class="back icon"></a> |
201 | + {{#if is_approved}} |
202 | + <div class="recommended"> |
203 | + <i class="sprite recommended-triangle-large"></i> |
204 | + </div> |
205 | + {{/if}} |
206 | + {{#unless isFullscreen}} |
207 | + <a href="" class="back icon"> |
208 | + <i class="sprite panel_close"></i> |
209 | + </a> |
210 | + {{/unless}} |
211 | <div class="block-icon"> |
212 | <img src="{{charmIconPath id true}}" alt="{{ name }} icon" class="icon"> |
213 | </div> |
214 | |
215 | === modified file 'app/templates/charm-token.handlebars' |
216 | --- app/templates/charm-token.handlebars 2013-10-09 13:06:00 +0000 |
217 | +++ app/templates/charm-token.handlebars 2013-10-30 05:38:22 +0000 |
218 | @@ -2,8 +2,13 @@ |
219 | test/test_charm_running.py. If you change this name, change the other |
220 | one too! }} |
221 | <a href="/{{storeId}}" |
222 | - class="token {{size}} {{#if is_approved}}recommended{{/if}}" |
223 | - data-charmid="{{storeId}}"> |
224 | + class="token {{size}}" |
225 | + data-charmid="{{storeId}}"> |
226 | + {{#if is_approved}} |
227 | + <span class="recommended"> |
228 | + <i class="sprite recommended-triangle"></i> |
229 | + </span> |
230 | + {{/if}} |
231 | <span class="block-icon"> |
232 | <div class="icon"> |
233 | {{#unless iconUrl}} |
234 | |
235 | === modified file 'app/templates/left-breakout-panel.handlebars' |
236 | --- app/templates/left-breakout-panel.handlebars 2013-07-26 06:43:11 +0000 |
237 | +++ app/templates/left-breakout-panel.handlebars 2013-10-30 05:38:22 +0000 |
238 | @@ -1,4 +1,6 @@ |
239 | <div> |
240 | - <a href="" class="close-slot" data-slot="left-hand-panel"></a> |
241 | + <a href="" class="close-slot" data-slot="left-hand-panel"> |
242 | + <i class="sprite panel_close"></i> |
243 | + </a> |
244 | <div class="content">{{initial}}</div> |
245 | </div> |
246 | |
247 | === modified file 'lib/views/browser/browser-icon.less' |
248 | --- lib/views/browser/browser-icon.less 2013-10-10 14:12:48 +0000 |
249 | +++ lib/views/browser/browser-icon.less 2013-10-30 05:38:22 +0000 |
250 | @@ -3,14 +3,16 @@ |
251 | display: block; |
252 | left: @bws-sidebar-width; |
253 | top: 114px; |
254 | - width: 40px; |
255 | - height: 40px; |
256 | - background: #bbbbbb url(/juju-ui/assets/images/browser_icon.png) |
257 | - no-repeat center center; |
258 | + padding: 7px; |
259 | + background-color: #bbb; |
260 | box-shadow: 3px 0 2px rgba(0, 0, 0, 0.1); |
261 | border-top-right-radius: 4px; |
262 | border-bottom-right-radius: 4px; |
263 | z-index: 610; |
264 | + |
265 | + i.sprite { |
266 | + display: block; |
267 | + } |
268 | } |
269 | .content-visible .bws-icon { |
270 | left: @bws-sidebar-width + @bws-panel-width; |
271 | |
272 | === modified file 'lib/views/browser/charm-full.less' |
273 | --- lib/views/browser/charm-full.less 2013-10-29 22:30:57 +0000 |
274 | +++ lib/views/browser/charm-full.less 2013-10-30 05:38:22 +0000 |
275 | @@ -1,12 +1,5 @@ |
276 | .bundle, |
277 | .charm { |
278 | - &.recommended { |
279 | - .header { |
280 | - background: |
281 | - url(/juju-ui/assets/images/recommended-triangle-large.png) |
282 | - no-repeat right top, url(/juju-ui/assets/images/paper-bg.jpg) repeat 0 0; |
283 | - } |
284 | - } |
285 | .changelog li, |
286 | .changelog p, |
287 | .details { |
288 | @@ -32,6 +25,17 @@ |
289 | } |
290 | } |
291 | .header { |
292 | + position: relative; |
293 | + |
294 | + .recommended { |
295 | + position: absolute; |
296 | + top: 0; |
297 | + right: 0; |
298 | + |
299 | + i.sprite { |
300 | + display: block; |
301 | + } |
302 | + } |
303 | .block-icon { |
304 | display: inline-block; |
305 | float: left; |
306 | @@ -254,6 +258,7 @@ |
307 | padding: 17px 70px 16px 16px; |
308 | |
309 | a { |
310 | + .sprite-hover; |
311 | padding-right: 5px; |
312 | } |
313 | } |
314 | @@ -264,13 +269,6 @@ |
315 | background-color: #fff; |
316 | background-image: none; |
317 | |
318 | - &.recommended { |
319 | - .header { |
320 | - background: |
321 | - url(/juju-ui/assets/images/recommended-triangle-large.png) |
322 | - no-repeat right top; |
323 | - } |
324 | - } |
325 | .header { |
326 | .type13; |
327 | position: relative; |
328 | @@ -298,7 +296,9 @@ |
329 | } |
330 | } |
331 | } |
332 | - |
333 | + .back.icon { |
334 | + display: none; |
335 | + } |
336 | .block-icon, |
337 | .details { |
338 | display: block; |
339 | |
340 | === modified file 'lib/views/browser/token.less' |
341 | --- lib/views/browser/token.less 2013-10-29 02:29:58 +0000 |
342 | +++ lib/views/browser/token.less 2013-10-30 05:38:22 +0000 |
343 | @@ -9,12 +9,6 @@ |
344 | padding: 20px; |
345 | color: @text-colour; |
346 | |
347 | - &.recommended { |
348 | - margin-top: -1px; |
349 | - background: transparent |
350 | - url(/juju-ui/assets/images/recommended-triangle.png) |
351 | - no-repeat right top; |
352 | - } |
353 | &.tiny { |
354 | min-width: 200px; |
355 | |
356 | @@ -60,6 +54,15 @@ |
357 | height: 96px; |
358 | } |
359 | } |
360 | + .recommended { |
361 | + position: absolute; |
362 | + top: -1px; |
363 | + right: 0; |
364 | + |
365 | + i.sprite { |
366 | + display: block; |
367 | + } |
368 | + } |
369 | .block-icon, |
370 | .title, |
371 | .metadata, |
372 | |
373 | === modified file 'lib/views/browser/vars.less' |
374 | --- lib/views/browser/vars.less 2013-10-29 02:29:58 +0000 |
375 | +++ lib/views/browser/vars.less 2013-10-30 05:38:22 +0000 |
376 | @@ -4,7 +4,7 @@ |
377 | @bws-border: #d9d9d9; |
378 | @bws-panel-width: 750px; |
379 | @bws-sidebar-width: 290px; |
380 | -@bws-background: #ebecee url(/juju-ui/assets/images/paper-bg.jpg) repeat 0 0; |
381 | +@bws-background: #ebecee url(/juju-ui/assets/images/non-sprites/paper-bg.jpg) repeat 0 0; |
382 | @bws-groove-dark: #c9cbc8; |
383 | @bws-groove-light: #f4f2f3; |
384 | @tabview-left-padding: 80px; |
385 | |
386 | === modified file 'lib/views/content-panel.less' |
387 | --- lib/views/content-panel.less 2013-10-29 02:29:58 +0000 |
388 | +++ lib/views/content-panel.less 2013-10-30 05:38:22 +0000 |
389 | @@ -56,8 +56,9 @@ |
390 | right: 30px; |
391 | width: 20px; |
392 | height: 20px; |
393 | - background: transparent |
394 | - url(/juju-ui/assets/images/panel_close.png) |
395 | - left top no-repeat; |
396 | + |
397 | + i.sprite { |
398 | + display: block; |
399 | + } |
400 | } |
401 | } |
402 | |
403 | === modified file 'lib/views/juju-inspector.less' |
404 | --- lib/views/juju-inspector.less 2013-10-29 15:20:45 +0000 |
405 | +++ lib/views/juju-inspector.less 2013-10-30 05:38:22 +0000 |
406 | @@ -21,10 +21,10 @@ |
407 | */ |
408 | .pulse-green-frames-mixin () { |
409 | 0% { |
410 | - background-image: url(/juju-ui/assets/images/field-saved.png); |
411 | + background-image: url(/juju-ui/assets/images/non-sprites/field-saved.png); |
412 | } |
413 | 100% { |
414 | - background-image: url(/juju-ui/assets/images/field-saved-finished.png); |
415 | + background-image: url(/juju-ui/assets/images/non-sprites/field-saved-finished.png); |
416 | } |
417 | } |
418 | |
419 | @@ -129,11 +129,11 @@ |
420 | background-repeat: no-repeat; |
421 | |
422 | &.valid { |
423 | - background-image: url(/juju-ui/assets/images/form-validation-tick.png); |
424 | + background-image: url(/juju-ui/assets/images/non-sprites/form-validation-tick.png); |
425 | } |
426 | |
427 | &.invalid { |
428 | - background-image: url(/juju-ui/assets/images/form-validation-cross.png); |
429 | + background-image: url(/juju-ui/assets/images/non-sprites/form-validation-cross.png); |
430 | } |
431 | } |
432 | input[type=text] { |
433 | @@ -662,6 +662,7 @@ |
434 | margin-bottom: @inspector-controls-height; |
435 | } |
436 | .view-container { |
437 | + overflow-x: hidden; |
438 | overflow-y: auto; |
439 | margin-top: -1px; |
440 | |
441 | @@ -710,7 +711,7 @@ |
442 | } |
443 | .modified { |
444 | background-color: @inspector-changed-field; |
445 | - background-image: url(/juju-ui/assets/images/field-changed.png); |
446 | + background-image: url(/juju-ui/assets/images/non-sprites/field-changed.png); |
447 | background-repeat: no-repeat; |
448 | |
449 | &.boolean { |
450 | @@ -723,11 +724,11 @@ |
451 | } |
452 | .conflict-pending { |
453 | background-color: @inspector-changed-field; |
454 | - background-image: url(/juju-ui/assets/images/field-conflict.png); |
455 | + background-image: url(/juju-ui/assets/images/non-sprites/field-conflict.png); |
456 | |
457 | &.boolean { |
458 | background-color: inherit; |
459 | - background-image: url(/juju-ui/assets/images/field-conflict-14.png); |
460 | + background-image: url(/juju-ui/assets/images/non-sprites/field-conflict-14.png); |
461 | display: inline-block; |
462 | width: 14px; |
463 | height: 14px; |
464 | @@ -738,7 +739,7 @@ |
465 | |
466 | .conflict { |
467 | background-color: @inspector-changed-field; |
468 | - background-image: url(/juju-ui/assets/images/field-resolved.png); |
469 | + background-image: url(/juju-ui/assets/images/non-sprites/field-resolved.png); |
470 | } |
471 | |
472 | /* Inputs does not need to have the background-image */ |
473 | @@ -759,7 +760,7 @@ |
474 | } |
475 | |
476 | .change-saved { |
477 | - background-image: url(/juju-ui/assets/images/field-saved.png); |
478 | + background-image: url(/juju-ui/assets/images/non-sprites/field-saved.png); |
479 | background-position: center right; |
480 | background-repeat: no-repeat; |
481 | .animation(pulse-green 1s); |
482 | |
483 | === modified file 'lib/views/mixins.less' |
484 | --- lib/views/mixins.less 2013-10-29 04:47:09 +0000 |
485 | +++ lib/views/mixins.less 2013-10-30 05:38:22 +0000 |
486 | @@ -59,16 +59,12 @@ |
487 | .create-border-radius(@border-radius); |
488 | .create-linear-gradient(@charm-panel-orange, #c03f11); |
489 | color: #fff; |
490 | - text-decoration:none; |
491 | + text-decoration: none; |
492 | display: inline-block; |
493 | margin: 0; |
494 | padding: 8px 14px; |
495 | border: none; |
496 | font-size: 14px; |
497 | - -webkit-font-smoothing: subpixel-antialiased; |
498 | - -moz-font-smoothing: subpixel-antialiased; |
499 | - -o-font-smoothing: subpixel-antialiased; |
500 | - font-smoothing: subpixel-antialiased; |
501 | |
502 | &:hover { |
503 | background: @charm-panel-orange; |
504 | @@ -77,12 +73,12 @@ |
505 | // Using a variable here because LESS strips commas in mixin args. |
506 | @box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); |
507 | .create-box-shadow(@box-shadow); |
508 | - background: #eeeeee; |
509 | + background: #eee; |
510 | border: none; |
511 | border-bottom: 1px solid rgba(255, 255, 255, 0.1); |
512 | |
513 | &:hover { |
514 | - background: #eeeeee; |
515 | + background: #eee; |
516 | } |
517 | } |
518 | } |
519 | @@ -98,3 +94,17 @@ |
520 | border: 1px solid #a8a8a8; |
521 | } |
522 | } |
523 | +.sprite-hover { |
524 | + &:focus, |
525 | + &:hover { |
526 | + .sprite.hover { |
527 | + display: inline-block; |
528 | + } |
529 | + .sprite.normal { |
530 | + display: none; |
531 | + } |
532 | + } |
533 | + .sprite.hover { |
534 | + display: none; |
535 | + } |
536 | +} |
537 | |
538 | === modified file 'lib/views/stylesheet.less' |
539 | --- lib/views/stylesheet.less 2013-10-29 22:30:57 +0000 |
540 | +++ lib/views/stylesheet.less 2013-10-30 05:38:22 +0000 |
541 | @@ -58,13 +58,19 @@ |
542 | @import "mixins.less"; |
543 | |
544 | /* Common classes and setup */ |
545 | +body, |
546 | +input, |
547 | +button, |
548 | +select, |
549 | +textarea { |
550 | + font-family: @font-family; |
551 | + font-weight: 300; |
552 | +} |
553 | body { |
554 | overflow: hidden; |
555 | height: 100%; |
556 | margin-top: @navbar-height; |
557 | background-color: #302b28; |
558 | - font-family: @font-family; |
559 | - font-weight: 300; |
560 | font-size: 14px; |
561 | line-height: 18px; |
562 | -webkit-font-smoothing: antialiased; |
563 | @@ -77,10 +83,6 @@ |
564 | color: @charm-panel-orange; |
565 | text-decoration: none; |
566 | } |
567 | -input, button, select, textarea { |
568 | - font-family: @font-family; |
569 | - font-weight: 300; |
570 | -} |
571 | button { |
572 | cursor: pointer; |
573 | -webkit-appearance: button; |
574 | @@ -245,6 +247,7 @@ |
575 | padding: 24px 0 0 0; |
576 | |
577 | a { |
578 | + .sprite-hover; |
579 | display: block; |
580 | float: left; |
581 | height: 15px; |
582 | @@ -257,24 +260,15 @@ |
583 | &:last-child { |
584 | border-right: 1px solid @navbar-border-light; |
585 | } |
586 | - // Ugly classes to display the correct sprite for the |
587 | - // state. We might be able to turn this into a mixin |
588 | - // if we need to redo the same thing often. |
589 | + .sprite { |
590 | + display: block; |
591 | + margin: 1px 0 0 0; |
592 | + } |
593 | &:focus, |
594 | &:hover { |
595 | .sprite.hover { |
596 | display: block; |
597 | } |
598 | - .sprite.normal { |
599 | - display: none; |
600 | - } |
601 | - } |
602 | - .sprite.hover { |
603 | - display: none; |
604 | - } |
605 | - .sprite { |
606 | - display: block; |
607 | - margin: 1px 0 0 0; |
608 | } |
609 | } |
610 | #import-trigger { |
611 | @@ -348,7 +342,7 @@ |
612 | overflow: hidden; |
613 | } |
614 | .crosshatch-background { |
615 | - background: url(/juju-ui/assets/images/pattern_tile.png) repeat; |
616 | + background: url(/juju-ui/assets/images/non-sprites/pattern_tile.png) repeat; |
617 | } |
618 | #canvas { |
619 | position: relative; |
620 | @@ -446,19 +440,19 @@ |
621 | .triangle { |
622 | position: absolute; |
623 | top: 22px; |
624 | - width: 0px; |
625 | - height: 0px; |
626 | + width: 0; |
627 | + height: 0; |
628 | border-style: solid; |
629 | } |
630 | &.right .triangle { |
631 | left: -16px; |
632 | border-width: 10px 17.3px 10px 0; |
633 | - border-color: transparent #ffffff transparent transparent; |
634 | + border-color: transparent #fff transparent transparent; |
635 | } |
636 | &.left .triangle { |
637 | right: -16px; |
638 | border-width: 10px 0 10px 17.3px; |
639 | - border-color: transparent transparent transparent #ffffff; |
640 | + border-color: transparent transparent transparent #fff; |
641 | |
642 | } |
643 | .menu-title { |
644 | @@ -492,10 +486,10 @@ |
645 | } |
646 | } |
647 | &.landscape-reboot { |
648 | - background-image: url(/juju-ui/assets/images/landscape_restart_menu.png); |
649 | + background-image: url(/juju-ui/assets/images/non-sprites/landscape_restart_menu.png); |
650 | } |
651 | &.landscape-security { |
652 | - background-image: url(/juju-ui/assets/images/landscape_security_menu.png); |
653 | + background-image: url(/juju-ui/assets/images/non-sprites/landscape_security_menu.png); |
654 | } |
655 | &:last-child { |
656 | border-bottom: none; |
657 | @@ -518,9 +512,6 @@ |
658 | } |
659 | |
660 | } |
661 | -charms.thumbnails.li { |
662 | - height:4em; |
663 | -} |
664 | .subordinate-rel-group { |
665 | display: none; |
666 | |
667 | @@ -560,84 +551,6 @@ |
668 | dominant-baseline: middle; |
669 | } |
670 | } |
671 | -.state-error { |
672 | - stroke: #FF0000; |
673 | -} |
674 | -.state-started { |
675 | - stroke: #000000; |
676 | -} |
677 | -.state-pending { |
678 | - stroke: #6597E8; |
679 | -} |
680 | -div.state-error { |
681 | - @error-color: #c01c20; |
682 | - background-color: @error-color; |
683 | - color: #FFFFFF; |
684 | - |
685 | - &:hover { |
686 | - background-color: lighten(@error-color, 10%); |
687 | - } |
688 | -} |
689 | -div.state-started { |
690 | - @started-color: #d8d8d8; |
691 | - background-color: @started-color; |
692 | - |
693 | - &:hover { |
694 | - background-color: lighten(@started-color, 10%); |
695 | - } |
696 | -} |
697 | -div.state-pending { |
698 | - @pending-color: #fcd305; |
699 | - background-color: @pending-color; |
700 | - |
701 | - &:hover { |
702 | - background-color: lighten(@pending-color, 20%); |
703 | - } |
704 | -} |
705 | - |
706 | -.unit(@min_height: 20px, @border_radius:3px) { |
707 | - .create-border-radius(@border_radius); |
708 | - padding: 5px; |
709 | - margin-bottom: 0px; |
710 | - min-height: @min_height; |
711 | - cursor: pointer; |
712 | - |
713 | - .agent-state { |
714 | - display: none; |
715 | - } |
716 | -} |
717 | -ul#unit-large div.unit { |
718 | - .unit(40px); |
719 | -} |
720 | -ul#unit-medium div.unit { |
721 | - .unit; |
722 | -} |
723 | -ul#unit-small { |
724 | - margin-left: 0px; |
725 | - |
726 | - > li { |
727 | - margin-bottom: 5px; |
728 | - margin-left: 5px; |
729 | - |
730 | - > div.unit { |
731 | - .unit; |
732 | - width: 1.7em; |
733 | - text-align: center; |
734 | - } |
735 | - } |
736 | -} |
737 | -ul#unit-tiny { |
738 | - margin-left: 0px; |
739 | - |
740 | - > li { |
741 | - margin-bottom: 3px; |
742 | - margin-left: 3px; |
743 | - |
744 | - > div.unit { |
745 | - .unit(0px, 1px); |
746 | - } |
747 | - } |
748 | -} |
749 | circle.mouse-down-indicator { |
750 | stroke: #040404; |
751 | stroke-width: 2px; |
752 | @@ -714,16 +627,6 @@ |
753 | path { |
754 | stroke-width: 0; |
755 | fill: #fff; |
756 | - |
757 | - &.status-pending { |
758 | - fill: #fcd305; |
759 | - } |
760 | - &.status-running { |
761 | - fill: rgb(57, 180, 74); |
762 | - } |
763 | - &.status-error { |
764 | - fill: #c01c20; |
765 | - } |
766 | } |
767 | } |
768 | g.unit { |
769 | @@ -732,7 +635,7 @@ |
770 | fill: #1626cf; |
771 | |
772 | .address { |
773 | - fill: #ffffff; font-size: 14px; |
774 | + fill: #fff; font-size: 14px; |
775 | } |
776 | .unit-border { |
777 | stroke-width: 2px; fill: #a0a0a0; |
778 | @@ -831,7 +734,7 @@ |
779 | z-index: 10; |
780 | |
781 | a { |
782 | - color: white; |
783 | + color: #fff; |
784 | background-color: @charm-panel-orange; |
785 | display: block; |
786 | line-height: 30px; |
787 | @@ -942,11 +845,6 @@ |
788 | .unit-button-palette { |
789 | float: right; |
790 | } |
791 | -#service-relations { |
792 | - .btn { |
793 | - float: right; |
794 | - } |
795 | -} |
796 | #destroy-service { |
797 | margin-top: 10px; |
798 | margin-left: 10px; |
Reviewers: mp+193186_ code.launchpad. net,
Message:
Please take a look.
Description:
More sprite and CSS cleanups
Moved images that are only used via background-image out of the sprites
folder.
Changed some images to be used as sprites.
Removed some unused images.
Added a new mixin to handle using sprites for hover.
Removed some CSS that is no longer being used.
Cleaned up a little CSS for the sake of file size.
Removed old slider images from the Makefile as they were no longer being
used.
Drive-by fix for bug #1245907 where extra scrollbars where appearing in
the ghost inspector.
https:/ /code.launchpad .net/~huwshimi/ juju-gui/ more-load- improvements/ +merge/ 193186
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/19700044/
Affected files (+119, -192 lines): images/ email-click. png images/ fullscreen_ icon.png images/ google- click.png images/ inspector- charm-scale- up.png images/ landscape_ restart. png images/ non-sprites/ field-changed. png images/ non-sprites/ field-conflict- 14.png images/ non-sprites/ field-conflict. png images/ non-sprites/ field-resolved. png images/ non-sprites/ field-saved- finished. png images/ non-sprites/ field-saved. png images/ non-sprites/ form-validation -cross. png images/ non-sprites/ form-validation -tick.png images/ non-sprites/ landscape_ restart_ menu.png images/ non-sprites/ landscape_ security_ menu.png images/ non-sprites/ paper-bg. jpg images/ non-sprites/ pattern_ tile.png images/ sidebar_ icon.png images/ twitter- click.png browser/ templates/ browser_ charm.handlebar s browser/ templates/ minimized. handlebars browser/ templates/ sidebar. handlebars bundle- token.handlebar s bundle. handlebars charm-token. handlebars left-breakout- panel.handlebar s browser/ browser- icon.less browser/ charm-full. less browser/ token.less browser/ vars.less content- panel.less juju-inspector. less mixins. less stylesheet. less
M Makefile
A [revision details]
D app/assets/
D app/assets/
D app/assets/
D app/assets/
D app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
M app/assets/
D app/assets/
D app/assets/
M app/index.html
M app/subapps/
M app/subapps/
M app/subapps/
M app/templates/
M app/templates/
M app/templates/
M app/templates/
M lib/views/
M lib/views/
M lib/views/
M lib/views/
M lib/views/
M lib/views/
M lib/views/
M lib/views/