easy_menu 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d487df8a9a64414036d134da144d31370d3b8c6
4
- data.tar.gz: 5a77584b843bf38439aa7b92275aa767f2a4478b
3
+ metadata.gz: c303be0f9c4637e4540b1849b11cba3223d412f1
4
+ data.tar.gz: f76059dd22aefd6983d5c57b3f34bc58add4f7a6
5
5
  SHA512:
6
- metadata.gz: c7ac520b051771c54c55bc17877e73dceb176d0386cc4c6030db90acc2925924de970f630155c8047deff70f65c6e5c475a1c0c0035cd17587b64468d2e63d67
7
- data.tar.gz: 690d1cbb2feae2d153f3bb5ce70b27c0cf170bf141ac9642795a63c923e8d0770e54206972a4cc55b718086764809b7f07fc20e5b9a4d0835403d7d3ad7d9a96
6
+ metadata.gz: 6a79eeb30d8c39ffc1ef398da0507c2c2437a4589cb1aa475205f4c68ee4613771976c0818eba0e003a09d9f7b4d1c8295696e02b72c6b4fbf8abe3bffc8e63b
7
+ data.tar.gz: 23e75e9f90b6730e564dfa222c1a42826f62ed2528d8e08e277a219945051e78eebfd99a6d5c40e2a09062a746d8a188ef97d5c88ad63d6fff6f96d97e88a6cc
Binary file
@@ -219,7 +219,7 @@ $menu-bar-item-pressed-zindex: 3;
219
219
  padding: $menu-item-vertical-padding $menu-item-horizontal-padding;
220
220
  cursor: pointer;
221
221
 
222
- a {
222
+ > * {
223
223
  color: $menu-bar-item-text-color;
224
224
  padding: $menu-item-vertical-padding $menu-item-horizontal-padding;
225
225
  margin: (-$menu-item-vertical-padding) (-$menu-item-horizontal-padding);
@@ -228,25 +228,34 @@ $menu-bar-item-pressed-zindex: 3;
228
228
  }
229
229
  }
230
230
  @mixin menu_item_hover {
231
- &.selected a {
232
- background: asset_url("checkbox_selected.png") no-repeat 5px center;
231
+ &.selected > * {
232
+ @include icon(9, 5px);
233
233
 
234
234
  &:hover {
235
- background: asset_url("checkbox_selected_hovered.png") no-repeat 5px center;
235
+ @include icon(10, 5px);
236
236
  }
237
237
  }
238
238
  &:hover {
239
- background: #08C;
239
+ background: #3675ca;
240
240
  color: white;
241
+ // Make the highlight cover the borders
242
+ // Keep the text from shifting due to the margin change
243
+ margin: 0 -1px;
244
+ border: solid #3675ca;
245
+ border-width: 0 1px;
241
246
 
242
- a {
247
+ > * {
243
248
  color: inherit;
244
249
  }
245
250
  }
246
251
  }
247
252
  @mixin menu_item_disabled{
248
- &.disabled, &.disabled a{
253
+ &.disabled, &.disabled > *{
249
254
  cursor: default;
250
255
  color: $menu-item-disabled-text-color;
251
256
  }
252
257
  }
258
+
259
+ @mixin icon($iconNumber, $indent:center){
260
+ background: asset_url('icons.png') $indent -24px * ($iconNumber - 1) no-repeat;
261
+ }
@@ -83,6 +83,7 @@
83
83
  padding: $menu-vertical-padding 0;
84
84
  position: absolute;
85
85
  display: none;
86
+ min-width: 100%; // Don't be narrower than the menu bar trigger
86
87
 
87
88
  .menu_content{
88
89
  display: block;
@@ -122,11 +123,12 @@
122
123
  }
123
124
  &.with_menu {
124
125
  .menu_bar_item .arrow{
125
- background: asset_url('arrows.png') center 87px;
126
- display: inline-block;
127
- margin-left: 3px;
128
- height: 10px;
126
+ @include icon(5, center);
127
+ margin: -12px -9px -12px -4px;
128
+ padding: 24px 14px 0 0;
129
+ vertical-align: middle;
129
130
  width: 10px;
131
+ display: inline-block;
130
132
  vertical-align: middle;
131
133
  }
132
134
  }
data/lib/menu_bar.rb CHANGED
@@ -224,7 +224,7 @@ class MenuBar
224
224
  end
225
225
 
226
226
  def click_blocker_html_options
227
- html_opts = @click_blocker_html_options
227
+ html_opts = @click_blocker_html_options.dup
228
228
  html_opts.reverse_merge! :title => @options[:title] # Default the title text to be the same as the unblocked title text
229
229
 
230
230
  merge_class(html_opts, config[:click_blocker_class])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_menu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-08 00:00:00.000000000 Z
12
+ date: 2014-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,9 +34,7 @@ files:
34
34
  - Gemfile
35
35
  - MIT-LICENSE
36
36
  - README
37
- - app/assets/images/arrows.png
38
- - app/assets/images/checkbox_selected.png
39
- - app/assets/images/checkbox_selected_hovered.png
37
+ - app/assets/images/icons.png
40
38
  - app/assets/javascripts/easy_menu_jquery.js
41
39
  - app/assets/javascripts/easy_menu_prototype.js
42
40
  - app/assets/stylesheets/_easy_menu_mixins.scss
Binary file