tusur_header 0.1.9 → 0.2.0

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: fffeed6e9d9e612e44ed26c7261d0dc42ed1f212
4
- data.tar.gz: bcb9df4f5339e218cc0e07966cc7473efe8cbc38
3
+ metadata.gz: 3ef1c2bb1b3623efa1e6685450b47ae0f6fc81c1
4
+ data.tar.gz: 1a2ba2a621e904a144a39ddf611b354c6498f50d
5
5
  SHA512:
6
- metadata.gz: b4172f5664a41530fb12d47cf507754158cbb08b9f7f85d8060307bf29e9ca8d554b42168a28660f2e86f9a750a8ce429cf67a7119c4c9d97e73327691b268d7
7
- data.tar.gz: 36847fdfda1ca431b1db38c0b40b71560314d3e0b37be4e185aa4f4bb358186454d10882f99627c4cd3e5305934d19f8fa1574135566105e49c9ea249edfb690
6
+ metadata.gz: d353e53f6132b3e12aa209d162156adf7574f2188d4aa59a90fe3902d3925fe95d6322ee5554128ff0fcc0c172e869c23e6bcf43afda8d62676cbd0975cece23
7
+ data.tar.gz: 7158f1e334b115ed0b49f7824d8869913959edf2f02b5546a5948cf62faa54d8cb769162d24adf1362de639823afd111c9690125f14138bb6fdf66068f052c69
data/README.rdoc CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  1 Добавляем в Gemfile
16
16
 
17
- gem 'tusur_header', :git => 'git://github.com/openteam-tusur/tusur_header'
17
+ gem 'tusur_header', '~> 0.2.0'
18
18
 
19
19
  запускаем bundle
20
20
 
@@ -35,7 +35,7 @@
35
35
  :tusur_header_second_menu_right</code>
36
36
 
37
37
  2.2.1
38
- <code>:stop_ie</code>
38
+ <code>:stop_ie</code>
39
39
  подключаем в footer чтобы включить проверку браузера на IE > 8
40
40
 
41
41
  3 Подключаем стили в <code>sass</code>
@@ -63,7 +63,7 @@
63
63
  * добавляем в модель User has_remote_notifications
64
64
  * где нужно используем метод get_notification_count (current_user.get_notification_count, возвращает Integer)
65
65
 
66
- === Tipps
66
+ === Прочее
67
67
 
68
68
  Не забываем добавлять в layout поддержку мобильных устройств:
69
69
 
@@ -1,3 +1,3 @@
1
1
  module TusurHeader
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -0,0 +1,7 @@
1
+ $ ->
2
+ flash_message = $('.flash_message:visible')
3
+
4
+ $(window).on 'click', ->
5
+ flash_message.clearQueue().slideUp('fast')
6
+
7
+ flash_message.delay(15000).slideUp('fast')
@@ -1,5 +1,4 @@
1
- @init_tusur_header_observer = ->
2
-
1
+ $ ->
3
2
  first_menu = $('#menu_first')
4
3
  second_menu = $('#menu_second')
5
4
 
@@ -36,22 +35,16 @@
36
35
  cloud.hide().html('') if cloud.is(':visible')
37
36
 
38
37
  $(window).scroll () ->
39
- footer_height = $('#footer').height()
40
- new_footer_height = footer_height + 40
41
38
 
42
39
  if $(window).scrollTop() > 0
43
40
  first_menu.css('border-bottom', 'solid 1px #ccc')
44
41
  site_menu_caret.show()
45
42
  site_menu_toggle.removeClass('disabled')
46
43
 
47
- $('#wrapper').css('margin-bottom', "0px")
48
-
49
44
  if $(window).scrollTop() == 0
50
45
  first_menu.css('border-bottom', 'none')
51
46
  site_menu_caret.hide()
52
47
  site_menu_toggle.click() if site_menu_toggle.parent().hasClass('open')
53
48
  site_menu_toggle.addClass('disabled')
54
49
 
55
- $('#wrapper').css('margin-bottom', "-#{new_footer_height}px")
56
-
57
50
  true
@@ -0,0 +1,12 @@
1
+ .flash_message
2
+ +border-top-left-radius(0)
3
+ +border-top-right-radius(0)
4
+ border-top: 0
5
+ cursor: pointer
6
+ left: 50%
7
+ margin-left: -210px
8
+ position: fixed
9
+ text-align: center
10
+ top: 0
11
+ width: 420px
12
+ z-index: 99999
@@ -208,9 +208,15 @@
208
208
  +box-sizing(border-box)
209
209
  height: 40px
210
210
  line-height: 20px
211
- padding: 10px 15px 0 15px
211
+ padding: 7px 15px
212
212
  text-decoration: none
213
213
 
214
+ .current_user
215
+ line-height: 24px
216
+
217
+ .caret
218
+ margin: 0
219
+
214
220
  &:hover
215
221
  cursor: pointer
216
222
 
@@ -50,10 +50,12 @@
50
50
  //@import 'bootstrap/utilities'
51
51
  @import 'bootstrap/responsive-utilities'
52
52
 
53
+ // Header wrapper
53
54
  @import 'override'
55
+
56
+ // Commons
54
57
  @import 'buttons'
55
58
  @import 'error_pages'
56
-
57
- @import 'search_form'
59
+ @import 'flash'
58
60
  @import 'pagination'
59
- @import 'alert'
61
+ @import 'search_form'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tusur_header
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Lapin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -202,15 +202,12 @@ files:
202
202
  - vendor/assets/images/502.png
203
203
  - vendor/assets/images/mail.png
204
204
  - vendor/assets/images/tusur_logotype.png
205
- - vendor/assets/javascripts/alert_autoclose/index.js
206
- - vendor/assets/javascripts/alert_autoclose/init.js.coffee
207
- - vendor/assets/javascripts/main.js.coffee
205
+ - vendor/assets/javascripts/flash.js.coffee
206
+ - vendor/assets/javascripts/observer.js.coffee
208
207
  - vendor/assets/javascripts/tusur_header.js
209
- - vendor/assets/javascripts/tusur_header_observer/index.js
210
- - vendor/assets/javascripts/tusur_header_observer/init.js.coffee
211
- - vendor/assets/stylesheets/_alert.sass
212
208
  - vendor/assets/stylesheets/_buttons.sass
213
209
  - vendor/assets/stylesheets/_error_pages.sass
210
+ - vendor/assets/stylesheets/_flash.sass
214
211
  - vendor/assets/stylesheets/_override.sass
215
212
  - vendor/assets/stylesheets/_pagination.sass
216
213
  - vendor/assets/stylesheets/_search_form.sass
@@ -1 +0,0 @@
1
- //= require_tree .
@@ -1,5 +0,0 @@
1
- @init_alert_autoclose = ->
2
- $('.alert').delay(5000).queue(
3
- ->
4
- $(this).remove()
5
- )
@@ -1,3 +0,0 @@
1
- $ ->
2
- init_tusur_header_observer() if $('.tusur_header_wrapper').length
3
- init_alert_autoclose() if $('.alert-container').length
@@ -1,3 +0,0 @@
1
- /*
2
- *= require_tree .
3
- */
@@ -1,13 +0,0 @@
1
- .alert-container
2
- position: fixed
3
- z-index: 100
4
- width: inherit
5
- bottom: 0px
6
-
7
- .alert-notice
8
- background-color: #dff0d8
9
- border-color: #d6e9c6
10
- color: #3c763d
11
-
12
- .alert
13
- padding: 10px