wiser_timezone 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWZlN2E3ODkzZjQwYTVhNGQzZWIwYmUyNjM5NzBjN2EyOWRjYTVjNQ==
5
- data.tar.gz: !binary |-
6
- ODdjNWRmOWMyNTIzNjY2NDNkMzNmMTRjMWE0NGM5YTgwNWQxNzcyOQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YTIxYWNhODY0ZGNiMzg5N2U3M2ZhMWU1YTRlMjA2YWM3MTNlMDg4OTAxYjBm
10
- ZjdhMGE1NmFlZDc1ZjZlY2MyMWUxMzcyZDE0NzAyODY1NGU2NDE4MDk5NmU1
11
- MmM0ZmVjMDA3YTMyYWY2NjgzZWM5MzMzMGIxMTk1NWFjY2NiZjU=
12
- data.tar.gz: !binary |-
13
- MzU4ODdhNGQ3ZDkxNjlmZGJlODE1YmQwZTkzM2I1YzBiNDU3OWZlOWE0N2Ey
14
- Y2Q4NDFmZmNhMDlkMmI3MzcwNjcyMmE0ZWY2ODBiY2MxNjE2NTcyMzAzNTA5
15
- M2Q1OTk5OTA1ZDAwYmI4OTUyNDI0OWQwZDkzZmY4NmRjNzlhYmI=
2
+ SHA1:
3
+ metadata.gz: 6f450eb53067e34f7c3e7919619e8934cb01ec74
4
+ data.tar.gz: 66816706dfb06e8329e4c0407afa209bde97c85f
5
+ SHA512:
6
+ metadata.gz: d55545b46ac756dd9b7363342b2f714d07a274305e5a7af97c07dad664e0744ed4c8999b97008d4e24af7454375a16b4989fc441aaf1d225241a96312cd1557c
7
+ data.tar.gz: 8eee3ec7e982aec385eaa49dcb6f1969bf3484ad96fa2ad0c5f4de7b2c31af6e2b51551bd82fe6c1cb11a2f4822c93214728b89355328607b4a2c332f0ceddc5
data/.DS_Store ADDED
Binary file
data/README.md CHANGED
@@ -16,7 +16,7 @@ You can do normal gem installation for `wiser_timezone` from your terminal:
16
16
 
17
17
  or add this line in your Gemfile:
18
18
 
19
- gem 'wiser_timezone', '~> 0.1.5'
19
+ gem 'wiser_timezone', '~> 0.1.6'
20
20
 
21
21
  Be sure to restart your application if it is already running.
22
22
 
@@ -67,15 +67,15 @@ Render the `wiser_timezone_initialize` view below the `body` of your layout file
67
67
  <%= wiser_timezone_initialize %>
68
68
  <!-- More Codes -->
69
69
  </body>
70
-
71
- You can use the `force` parameter to require the user to set the timezone before using the application.
70
+
71
+ You can use the `force` parameter to require the user to set the timezone before using the application.
72
72
 
73
73
  <body>
74
74
  <%= wiser_timezone_initialize(force: true) %>
75
75
  <!-- More Codes -->
76
76
  </body>
77
-
78
- You can use the `auto_set_guest` parameter to automatically capture the timezone if the user is not logged in. In this way, the guest users will never be asked to set their timezone, the system timezone will automatically detected.
77
+
78
+ You can use the `auto_set_guest` parameter to automatically capture the timezone if the user is not logged in. In this way, the guest users will never be asked to set their timezone, the system timezone will automatically detected.
79
79
 
80
80
  <body>
81
81
  <%= wiser_timezone_initialize(force: true, auto_set_guest: true) %>
@@ -1,10 +1,5 @@
1
1
  $(document).ready(function(){
2
- if($('#wiser_timezone_container').hasClass('no_user')){
3
- $('#wiser_timezone_container #wiser_timezone_link')[0].click()
4
- }else{
5
- wiser_timezone_reload();
6
- }
7
- $(window).resize()
2
+ wiser_timezone_reload();
8
3
  });
9
4
 
10
5
  $(window).resize(function(){
@@ -42,4 +37,14 @@ var wiser_timezone_reload = function(){
42
37
  }
43
38
  }
44
39
  }
40
+ if($('#wiser_timezone_container').hasClass('auto_set')){
41
+ $('#wiser_timezone_container #wiser_timezone_link')[0].click()
42
+ $('#wiser_timezone_container').remove()
43
+ $('html').css('margin-top', '0px')
44
+ }else if($('#wiser_timezone_container').hasClass('no_user')){
45
+ $('#wiser_timezone_container #wiser_timezone_link')[0].click()
46
+ $('#wiser_timezone_container').remove()
47
+ $('html').css('margin-top', '0px')
48
+ }
49
+ $(window).resize()
45
50
  }
@@ -48,7 +48,12 @@ module WiserTimezone
48
48
 
49
49
  def wiser_timezone_initialize(options = {})
50
50
  force = options[:force].present? && options[:force]
51
- auto_set_guest = options[:auto_set_guest].present? && options[:auto_set_guest] && !current_user.present?
51
+ if auto_set_all = options[:auto_set_all].present? && options[:auto_set_all]
52
+ auto_set_all = true
53
+ else
54
+ auto_set_all = false
55
+ auto_set_guest = options[:auto_set_guest].present? && options[:auto_set_guest] && !current_user.present?
56
+ end
52
57
 
53
58
  set_link = link_to('click here', set_timezone_path, :id => 'wiser_timezone_link')
54
59
  close_link = link_to('skip', set_timezone_path(offset: 'skip'), :id => 'wiser_timezone_close', :remote => true)
@@ -58,7 +63,7 @@ module WiserTimezone
58
63
  else
59
64
  msg = "You do not have timezone in your settings, <span class='no_wrap'>#{set_link}</span> to update the timezone to ~TZ~.#{'<br/>' if force}Otherwise, #{close_link} setting your timezone."
60
65
  end
61
- classes = "#{'force' if force} #{'no_user' if auto_set_guest}"
66
+ classes = "#{'force' if force} #{'no_user' if auto_set_guest} #{'auto_set' if auto_set_all}"
62
67
  space = "<div id='wiser_timezone_space' data-offset='#{offset}'>#{msg}</div>"
63
68
  cover = "<div id='wiser_timezone_cover'></div>"
64
69
  html = "<div id='wiser_timezone_container' class='#{classes}' style='display:none;' data-offset-cookie='#{cookies[:wiser_timezone_offset]}'>#{cover} #{space}</div>"
@@ -1,3 +1,3 @@
1
1
  module WiserTimezone
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiser_timezone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth John Balgos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-17 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Allow your Ruby on Rails application to handle timezone dynamically.
@@ -45,44 +45,24 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - !binary |-
49
- LmdpdGlnbm9yZQ==
50
- - !binary |-
51
- R2VtZmlsZQ==
52
- - !binary |-
53
- TElDRU5TRS50eHQ=
54
- - !binary |-
55
- UkVBRE1FLm1k
56
- - !binary |-
57
- UmFrZWZpbGU=
58
- - !binary |-
59
- YXBwL2Fzc2V0cy9qYXZhc2NyaXB0cy93aXNlcl90aW1lem9uZS5qcw==
60
- - !binary |-
61
- YXBwL2Fzc2V0cy9zdHlsZXNoZWV0cy93aXNlcl90aW1lem9uZS5jc3M=
62
- - !binary |-
63
- YXBwL2NvbnRyb2xsZXJzL3dpc2VyX3RpbWV6b25lL3dpc2VyX3RpbWV6b25l
64
- X2NvbnRyb2xsZXIucmI=
65
- - !binary |-
66
- YXBwL2hlbHBlcnMvd2lzZXJfdGltZXpvbmUvd2lzZXJfdGltZXpvbmVfaGVs
67
- cGVyLnJi
68
- - !binary |-
69
- Y29uZmlnL3JvdXRlcy5yYg==
70
- - !binary |-
71
- bGliL2dlbmVyYXRvcnMvd2lzZXJfdGltZXpvbmUucmI=
72
- - !binary |-
73
- bGliL2dlbmVyYXRvcnMvd2lzZXJfdGltZXpvbmUvbWlncmF0aW9uL21pZ3Jh
74
- dGlvbl9nZW5lcmF0b3IucmI=
75
- - !binary |-
76
- bGliL2dlbmVyYXRvcnMvd2lzZXJfdGltZXpvbmUvbWlncmF0aW9uL3RlbXBs
77
- YXRlcy9taWdyYXRpb24ucmI=
78
- - !binary |-
79
- bGliL3dpc2VyX3RpbWV6b25lLnJi
80
- - !binary |-
81
- bGliL3dpc2VyX3RpbWV6b25lL2VuZ2luZS5yYg==
82
- - !binary |-
83
- bGliL3dpc2VyX3RpbWV6b25lL3ZlcnNpb24ucmI=
84
- - !binary |-
85
- d2lzZXJfdGltZXpvbmUuZ2Vtc3BlYw==
48
+ - ".DS_Store"
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - app/assets/javascripts/wiser_timezone.js
55
+ - app/assets/stylesheets/wiser_timezone.css
56
+ - app/controllers/wiser_timezone/wiser_timezone_controller.rb
57
+ - app/helpers/wiser_timezone/wiser_timezone_helper.rb
58
+ - config/routes.rb
59
+ - lib/generators/wiser_timezone.rb
60
+ - lib/generators/wiser_timezone/migration/migration_generator.rb
61
+ - lib/generators/wiser_timezone/migration/templates/migration.rb
62
+ - lib/wiser_timezone.rb
63
+ - lib/wiser_timezone/engine.rb
64
+ - lib/wiser_timezone/version.rb
65
+ - wiser_timezone.gemspec
86
66
  homepage: https://github.com/kennethjohnbalgos/wiser_timezone
87
67
  licenses:
88
68
  - MIT
@@ -93,18 +73,19 @@ require_paths:
93
73
  - lib
94
74
  required_ruby_version: !ruby/object:Gem::Requirement
95
75
  requirements:
96
- - - ! '>='
76
+ - - ">="
97
77
  - !ruby/object:Gem::Version
98
78
  version: '0'
99
79
  required_rubygems_version: !ruby/object:Gem::Requirement
100
80
  requirements:
101
- - - ! '>='
81
+ - - ">="
102
82
  - !ruby/object:Gem::Version
103
83
  version: '0'
104
84
  requirements: []
105
85
  rubyforge_project:
106
- rubygems_version: 2.0.3
86
+ rubygems_version: 2.2.2
107
87
  signing_key:
108
88
  specification_version: 4
109
89
  summary: Friendly Timezone on Steroids
110
90
  test_files: []
91
+ has_rdoc: