outdatedbrowser_rails 1.0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +85 -0
- data/Rakefile +63 -0
- data/app/assets/javascripts/outdatedbrowser/outdatedBrowser.js +141 -0
- data/app/assets/javascripts/outdatedbrowser/require_outdatedbrowser.js +21 -0
- data/app/assets/stylesheets/outdatedbrowser/outdatedBrowser.css +25 -0
- data/app/assets/stylesheets/outdatedbrowser_rails/application.css +13 -0
- data/app/views/layouts/outdatedbrowser_rails/application.html.erb +14 -0
- data/app/views/outdatedbrowser/_outdatedbrowser.html.erb +14 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +2 -0
- data/lib/outdatedbrowser_rails/engine.rb +5 -0
- data/lib/outdatedbrowser_rails/version.rb +3 -0
- data/lib/outdatedbrowser_rails.rb +4 -0
- data/lib/tasks/outdatedbrowser_rails_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/app/assets/stylesheets/application.css +14 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/dummy_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/dummy/index.html.erb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +584 -0
- data/spec/dummy/log/test.log +305 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/assets/C27/370/sprockets%2F04e4c95438f7072ab694153214746f74 +0 -0
- data/spec/dummy/tmp/cache/assets/C87/AA0/sprockets%2Fcf432698f09f51e19134ba8c17745253 +0 -0
- data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/CED/EF0/sprockets%2F9b4914459dfa241685c0c958356afdb6 +0 -0
- data/spec/dummy/tmp/cache/assets/D0A/4E0/sprockets%2F5074c6afc1bd9e231b663c0690577da5 +0 -0
- data/spec/dummy/tmp/cache/assets/D0C/EF0/sprockets%2F0601770e556abcc0ad74f542f2ed9963 +0 -0
- data/spec/dummy/tmp/cache/assets/D1A/140/sprockets%2F5700ff9d76f7204a03bf74e546f8a76b +0 -0
- data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/770/sprockets%2F60908e881ddca08f757df7c335cc539e +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/260/sprockets%2F3d8ca1585ee95c5efb388645d66cf377 +0 -0
- data/spec/dummy/tmp/cache/assets/D6C/FA0/sprockets%2Fb65717c2ea586a33367c3bf6ecdf141c +0 -0
- data/spec/dummy/tmp/cache/assets/D6E/400/sprockets%2Fe6412cb74f03a5dc2e495863d7ba82ec +0 -0
- data/spec/dummy/tmp/cache/assets/D77/A80/sprockets%2Fe22d705d0c889ec4837f183a9beec0f3 +0 -0
- data/spec/dummy/tmp/cache/assets/D89/AE0/sprockets%2Fdf3a3ca074e4fdfbc034304a2519e3c4 +0 -0
- data/spec/dummy/tmp/cache/assets/DA9/8D0/sprockets%2F9628521d9c47e12f8fd15fedd34ccbf3 +0 -0
- data/spec/dummy/tmp/cache/assets/DCE/840/sprockets%2F1dbccd35bf63a8eed444fa7e0274c846 +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/E04/320/sprockets%2Fa9ee9a4f24c3be57552effdc5cc234e4 +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/features/asset_integration_spec.rb +23 -0
- data/spec/spec_helper.rb +20 -0
- metadata +235 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1fab95341f820a8510300a0efb3f7d045ec380b5
|
4
|
+
data.tar.gz: 4358848091e2201a1e52db4b7a5219553de344c2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2cf231f6675216c4ed19f9b3713c9a588f2404231b1915dc4abd750e3f0c1c2c7523c1a01962b3980c05fe14e0212cdd6f8cc6244a215f551e7d04008db2a229
|
7
|
+
data.tar.gz: 03b6b9fc2506540b126f54a44a3e0da528890d0f2dd4c25bf31d1e0cf6c37793377a1c9081ff5b0762274412c28d1da447c4aab57f88e86453f379d17f43ee2e
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# OutdatedbrowserRails
|
2
|
+
|
3
|
+
This project bundles the excellent Burocratik's
|
4
|
+
[Outdated Browser](https://github.com/burocratik/outdated-browser)
|
5
|
+
detector for use with the rails 3.1+ asset pipeline.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'outdatedbrowser_rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
### Including Outdated Browser assets
|
18
|
+
|
19
|
+
Add this line to your `application.js`:
|
20
|
+
|
21
|
+
```js
|
22
|
+
//= require outdatedbrowser/outdatedBrowser
|
23
|
+
```
|
24
|
+
|
25
|
+
Add this line to your `application.css` || `application.scss`:
|
26
|
+
|
27
|
+
```css
|
28
|
+
//= require outdatedbrowser/outdatedBrowser
|
29
|
+
```
|
30
|
+
### Using the gem's strategy to require Outdated Browser
|
31
|
+
|
32
|
+
In the view where you want to use this, add:
|
33
|
+
|
34
|
+
```erb
|
35
|
+
<%= render 'outdatedbrowser/outdatedbrowser' %>
|
36
|
+
```
|
37
|
+
|
38
|
+
At the **bottom** of the body (make sure it's included **after**
|
39
|
+
_application.js_), add:
|
40
|
+
|
41
|
+
```erb
|
42
|
+
<%= javascript_include_tag 'outdatedbrowser/require_outdatedbrowser' %>
|
43
|
+
```
|
44
|
+
|
45
|
+
The gem uses `i18n` for the message strings, you can use other strings
|
46
|
+
in your application by
|
47
|
+
[looking at the keys](https://github.com/luisalima/outdatedbrowser_rails/blob/master/config/locales/en.yml)
|
48
|
+
and overriding them.
|
49
|
+
|
50
|
+
### Manual approach to require Outdated Browser
|
51
|
+
|
52
|
+
See the [Outdated Browser usage guide](https://github.com/burocratik/outdated-browser#how-to-use-it).
|
53
|
+
|
54
|
+
#### Testing the integration in your app
|
55
|
+
|
56
|
+
* Of course, ideally use an outdated browser to test.
|
57
|
+
* With an up-to-date browser:
|
58
|
+
* In the view where you included the partial, check that `#outdated`
|
59
|
+
is present.
|
60
|
+
* See how it looks: `$('#outdated').show()
|
61
|
+
|
62
|
+
## Contributing
|
63
|
+
|
64
|
+
Feel free to open an issue if you find something that could be improved.
|
65
|
+
|
66
|
+
Here are a couple of things worth noting:
|
67
|
+
|
68
|
+
* This is a mountable rails engine tested with `rspec` and `capybara`.
|
69
|
+
For more info or a good reference to make your own, see
|
70
|
+
[this good tutorial](http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl).
|
71
|
+
* The rake task `rake generate:assets` copies the assets from the
|
72
|
+
`vendor/outdated-browser` folder (which is a git submodule) to the
|
73
|
+
engine `app` folder.
|
74
|
+
* The rake task `clean` cleans the copied assets.
|
75
|
+
* To run tests, use `rspec spec`.
|
76
|
+
|
77
|
+
Finally, to contribute:
|
78
|
+
|
79
|
+
1. Fork it
|
80
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
81
|
+
3. Run tests using `rspec spec`, and make sure they are green!
|
82
|
+
4. Add tests to `spec/features`, if necessary.
|
83
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
84
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
85
|
+
7. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'OutdatedbrowserRails'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
Bundler::GemHelper.install_tasks
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
31
|
+
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
|
32
|
+
task :default => :spec
|
33
|
+
|
34
|
+
dependencies = {
|
35
|
+
javascripts: ['outdatedBrowser.js'],
|
36
|
+
stylesheets: ['outdatedBrowser.css']
|
37
|
+
}
|
38
|
+
|
39
|
+
origin = 'vendor/outdated-browser/outdatedbrowser'
|
40
|
+
|
41
|
+
desc "Clean assets"
|
42
|
+
task :clean do
|
43
|
+
dependencies.each do |filetype, filenames|
|
44
|
+
filenames.each do |filename|
|
45
|
+
rm_rf "app/assets/#{filetype}/outdatedbrowser/#{filename}"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
namespace :generate do
|
51
|
+
desc "Generate assets"
|
52
|
+
task :assets do
|
53
|
+
Rake.rake_output_message "Copying javascripts"
|
54
|
+
target_dir = "app/assets/javascripts/outdatedbrowser"
|
55
|
+
mkdir_p target_dir
|
56
|
+
puts FileUtils.cp(Dir.glob("#{origin}/outdatedBrowser.js"), target_dir)
|
57
|
+
|
58
|
+
Rake.rake_output_message "Copying css files"
|
59
|
+
target_dir = "app/assets/stylesheets/outdatedbrowser"
|
60
|
+
mkdir_p target_dir
|
61
|
+
puts FileUtils.cp(Dir.glob("#{origin}/outdatedBrowser.css"), target_dir)
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
/*!--------------------------------------------------------------------
|
2
|
+
JAVASCRIPT "Outdated Browser"
|
3
|
+
Version: 1.0.2 - 2014
|
4
|
+
author: Burocratik
|
5
|
+
website: http://www.burocratik.com
|
6
|
+
* @preserve
|
7
|
+
-----------------------------------------------------------------------*/
|
8
|
+
var outdatedBrowser = function(options) {
|
9
|
+
|
10
|
+
//Variable definition
|
11
|
+
var outdated = document.getElementById("outdated");
|
12
|
+
var btnClose = document.getElementById("btnCloseUpdateBrowser");
|
13
|
+
var btnUpdate = document.getElementById("btnUpdateBrowser");
|
14
|
+
|
15
|
+
// Default settings
|
16
|
+
this.defaultOpts = {
|
17
|
+
bgColor: '#F25648',
|
18
|
+
color: '#FFFFFF',
|
19
|
+
lowerThan: 'transform'
|
20
|
+
};
|
21
|
+
|
22
|
+
if (options) {
|
23
|
+
this.defaultOpts.bgColor = options.bgColor;
|
24
|
+
this.defaultOpts.color = options.color;
|
25
|
+
|
26
|
+
//assign css3 property to IE browser version
|
27
|
+
if(options.lowerThan == 'IE8' || options.lowerThan == 'borderSpacing') {
|
28
|
+
options.lowerThan = 'borderSpacing';
|
29
|
+
} else if (options.lowerThan == 'IE9' || options.lowerThan == 'boxShadow') {
|
30
|
+
options.lowerThan = 'boxShadow';
|
31
|
+
} else if (options.lowerThan == 'IE10' || options.lowerThan == 'transform' || options.lowerThan == '' || typeof options.lowerThan === "undefined") {
|
32
|
+
options.lowerThan = 'transform';
|
33
|
+
} else if (options.lowerThan == 'IE11' || options.lowerThan == 'borderImage') {
|
34
|
+
options.lowerThan = 'borderImage';
|
35
|
+
}
|
36
|
+
|
37
|
+
this.defaultOpts.lowerThan = options.lowerThan;
|
38
|
+
|
39
|
+
bkgColor = this.defaultOpts.bgColor;
|
40
|
+
txtColor = this.defaultOpts.color;
|
41
|
+
cssProp = this.defaultOpts.lowerThan;
|
42
|
+
} else {
|
43
|
+
bkgColor = this.defaultOpts.bgColor;
|
44
|
+
txtColor = this.defaultOpts.color;
|
45
|
+
cssProp = this.defaultOpts.lowerThan;
|
46
|
+
}
|
47
|
+
|
48
|
+
//Define opacity and fadeIn/fadeOut functions
|
49
|
+
var done = true;
|
50
|
+
|
51
|
+
function function_opacity(opacity_value) {
|
52
|
+
outdated.style.opacity = opacity_value / 100;
|
53
|
+
outdated.style.filter = 'alpha(opacity=' + opacity_value + ')';
|
54
|
+
}
|
55
|
+
|
56
|
+
function function_fade_out(opacity_value) {
|
57
|
+
function_opacity(opacity_value);
|
58
|
+
if (opacity_value == 1) {
|
59
|
+
outdated.style.display = 'none';
|
60
|
+
done = true;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
function function_fade_in(opacity_value) {
|
65
|
+
function_opacity(opacity_value);
|
66
|
+
if (opacity_value == 1) {
|
67
|
+
outdated.style.display = 'block';
|
68
|
+
}
|
69
|
+
if (opacity_value == 100) {
|
70
|
+
done = true;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
//check if element has a particular class
|
75
|
+
function hasClass(element, cls) {
|
76
|
+
return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
77
|
+
}
|
78
|
+
|
79
|
+
var supports = (function() {
|
80
|
+
var div = document.createElement('div'),
|
81
|
+
vendors = 'Khtml Ms O Moz Webkit'.split(' '),
|
82
|
+
len = vendors.length;
|
83
|
+
|
84
|
+
return function(prop) {
|
85
|
+
if ( prop in div.style ) return true;
|
86
|
+
|
87
|
+
prop = prop.replace(/^[a-z]/, function(val) {
|
88
|
+
return val.toUpperCase();
|
89
|
+
});
|
90
|
+
|
91
|
+
while(len--) {
|
92
|
+
if ( vendors[len] + prop in div.style ) {
|
93
|
+
return true;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
return false;
|
97
|
+
};
|
98
|
+
})();
|
99
|
+
|
100
|
+
//check for css3 property support (transform=default)
|
101
|
+
if ( !supports(''+ cssProp +'') ) {
|
102
|
+
if (done && outdated.style.opacity !== '1') {
|
103
|
+
done = false;
|
104
|
+
for (var i = 1; i <= 100; i++) {
|
105
|
+
setTimeout((function (x) {
|
106
|
+
return function () {
|
107
|
+
function_fade_in(x);
|
108
|
+
};
|
109
|
+
})(i), i * 10);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
//close button
|
113
|
+
btnClose.onmousedown = function() {
|
114
|
+
outdated.style.display = 'none';
|
115
|
+
return false;
|
116
|
+
};
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
//check settings attributes
|
121
|
+
outdated.style.backgroundColor = bkgColor;
|
122
|
+
//way too hard to put !important on IE6
|
123
|
+
outdated.style.color = txtColor;
|
124
|
+
outdated.children[0].style.color = txtColor;
|
125
|
+
outdated.children[1].style.color = txtColor;
|
126
|
+
|
127
|
+
//check settings attributes
|
128
|
+
btnUpdate.style.color = txtColor;
|
129
|
+
btnUpdate.style.borderColor = txtColor;
|
130
|
+
btnClose.style.color = txtColor;
|
131
|
+
|
132
|
+
//Override the update button color to match the background color
|
133
|
+
btnUpdate.onmouseover = function() {
|
134
|
+
this.style.color = bkgColor;
|
135
|
+
this.style.backgroundColor = txtColor;
|
136
|
+
};
|
137
|
+
btnUpdate.onmouseout = function() {
|
138
|
+
this.style.color = txtColor;
|
139
|
+
this.style.backgroundColor = bkgColor;
|
140
|
+
};
|
141
|
+
};//end of function
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
//event listener: DOM ready
|
3
|
+
function addLoadEvent(func) {
|
4
|
+
var oldonload = window.onload;
|
5
|
+
if (typeof window.onload != 'function') {
|
6
|
+
window.onload = func;
|
7
|
+
} else {
|
8
|
+
window.onload = function() {
|
9
|
+
oldonload();
|
10
|
+
func();
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
//call plugin function after DOM ready
|
15
|
+
addLoadEvent(
|
16
|
+
outdatedBrowser({
|
17
|
+
bgColor: '#f25648',
|
18
|
+
color: '#ffffff',
|
19
|
+
lowerThan: 'transform'
|
20
|
+
})
|
21
|
+
);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/*!--------------------------------------------------------------------
|
2
|
+
STYLES "Outdated Browser"
|
3
|
+
Version: 1.0.2 - 2014
|
4
|
+
author: Burocratik
|
5
|
+
website: http://www.burocratik.com
|
6
|
+
* @preserve
|
7
|
+
-----------------------------------------------------------------------*/
|
8
|
+
#outdated{
|
9
|
+
display: none; position: fixed; top: 0; left: 0; width: 100%; height: 170px;
|
10
|
+
text-align: center; text-transform: uppercase; z-index:1500;
|
11
|
+
background-color: #f25648; color: #ffffff;
|
12
|
+
}
|
13
|
+
* html #outdated{position: absolute;}
|
14
|
+
#outdated h6{font-size: 25px; line-height: 25px; margin: 30px 0 10px;}
|
15
|
+
#outdated p{font-size: 12px; line-height: 12px;}
|
16
|
+
#outdated #btnUpdateBrowser{
|
17
|
+
display: block; position: relative; padding: 10px 20px; margin: 30px auto 0; width: 180px;
|
18
|
+
color: #ffffff; text-decoration: none; border: 2px solid #ffffff; cursor: pointer;
|
19
|
+
}
|
20
|
+
#outdated #btnUpdateBrowser:hover{color: #f25648; background-color:#ffffff;}
|
21
|
+
#outdated .last{position: absolute; top: 20px; right: 30px; width: 15px; height: 15px;}
|
22
|
+
#outdated #btnCloseUpdateBrowser{
|
23
|
+
display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
|
24
|
+
text-decoration: none; color: #ffffff; font-size: 36px;
|
25
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>OutdatedbrowserRails</title>
|
5
|
+
<%= stylesheet_link_tag "outdatedbrowser_rails/application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "outdatedbrowser_rails/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="outdated">
|
2
|
+
<h6>
|
3
|
+
<%= t('outdatedbrowser.out_of_date') %>
|
4
|
+
</h6>
|
5
|
+
<p>
|
6
|
+
<%= t('outdatedbrowser.suggest_update') %>
|
7
|
+
<a id="btnUpdateBrowser" href="http://outdatedbrowser.com/">
|
8
|
+
<%= t('outdatedbrowser.update_now') %>
|
9
|
+
</a>
|
10
|
+
</p>
|
11
|
+
<p class="last">
|
12
|
+
<a href="#" id="btnCloseUpdateBrowser" title="Close">×</a>
|
13
|
+
</p>
|
14
|
+
</div>
|
data/config/routes.rb
ADDED