cambium 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/Rakefile +0 -1
- data/bin/cambium +20 -0
- data/cambium.gemspec +24 -1
- data/lib/cambium/engine.rb +6 -0
- data/lib/cambium/version.rb +1 -1
- data/lib/cambium.rb +1 -1
- data/lib/docs/notes.md +4 -0
- data/lib/generators/cambium/setup/config_generator.rb +185 -0
- data/lib/generators/cambium/setup/controllers_generator.rb +95 -0
- data/lib/generators/cambium/setup/devise_generator.rb +78 -0
- data/lib/generators/cambium/setup/helpers_generator.rb +71 -0
- data/lib/generators/cambium/setup/javascripts_generator.rb +111 -0
- data/lib/generators/cambium/setup/models_generator.rb +116 -0
- data/lib/generators/cambium/setup/stylesheets_generator.rb +86 -0
- data/lib/generators/cambium/setup/utilities_generator.rb +87 -0
- data/lib/generators/cambium/setup/views_generator.rb +86 -0
- data/lib/generators/cambium/templates/Gemfile.erb +41 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/.DS_Store +0 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/admin.js +12 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/admin.js.coffee +22 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/models/.gitkeep +0 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/routers/router.js.coffee +12 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/templates/paginator_controls.jst.ejs +8 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/templates/paginator_nav.jst.ejs +11 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/accordion.js.coffee +33 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/counter.js.coffee +25 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/dropdown_toggle.js.coffee +16 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/init_counter.js.coffee +13 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/paginator.js.coffee +86 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/publishable.js.coffee +12 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/backbone/views/wysiwyg.js.coffee +10 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/admin/wysihtml5.js +9521 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/application.js +7 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/backbone/app.js.coffee +22 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/backbone/routers/router.js.coffee +23 -0
- data/lib/generators/cambium/templates/app/assets/javascripts/backbone/views/default_helpers.js.coffee +16 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/admin.scss +14 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/__default.scss +14 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_buttons.scss +21 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_colors.scss +93 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_components.scss +4 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_forms.scss +28 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_helpers.scss +31 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_images.scss +23 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_nav.scss +117 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_tables.scss +12 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_typography.scss +83 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones-config/_wireframe.scss +18 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/bones/bones.scss +68 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_content.scss +88 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_form.scss +470 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_globals.scss +39 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_header.scss +121 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_icons.scss +5194 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_nav.scss +45 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_wireframe.scss +24 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/admin/wysihtml5.css +7 -0
- data/lib/generators/cambium/templates/app/assets/stylesheets/application.scss +9 -0
- data/lib/generators/cambium/templates/app/controllers/admin/users_controller.rb +13 -0
- data/lib/generators/cambium/templates/app/controllers/admin_controller.rb +88 -0
- data/lib/generators/cambium/templates/app/controllers/application_controller.rb +15 -0
- data/lib/generators/cambium/templates/app/helpers/admin_helper.rb +120 -0
- data/lib/generators/cambium/templates/app/models/concerns/idx.rb +28 -0
- data/lib/generators/cambium/templates/app/models/concerns/name.rb +7 -0
- data/lib/generators/cambium/templates/app/models/concerns/publishable.rb +50 -0
- data/lib/generators/cambium/templates/app/models/concerns/slug.rb +52 -0
- data/lib/generators/cambium/templates/app/models/concerns/tags.rb +28 -0
- data/lib/generators/cambium/templates/app/models/concerns/title.rb +7 -0
- data/lib/generators/cambium/templates/app/models/user.rb +14 -0
- data/lib/generators/cambium/templates/app/views/admin/_buttons.html.erb +5 -0
- data/lib/generators/cambium/templates/app/views/admin/_form.html.erb +11 -0
- data/lib/generators/cambium/templates/app/views/admin/_title.html.erb +1 -0
- data/lib/generators/cambium/templates/app/views/admin/edit.html.erb +2 -0
- data/lib/generators/cambium/templates/app/views/admin/index.html.erb +50 -0
- data/lib/generators/cambium/templates/app/views/admin/new.html.erb +2 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/_footer.html.erb +2 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/_header.html.erb +2 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/_nav.html.erb +12 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/_status.html.erb +3 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_editor.html.erb +54 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_left.html.erb +9 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_right.html.erb +9 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_page.html.erb +18 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_section.html.erb +8 -0
- data/lib/generators/cambium/templates/app/views/admin/shared/forms/_publishable.html.erb +33 -0
- data/lib/generators/cambium/templates/app/views/admin/users/_form.html.erb +11 -0
- data/lib/generators/cambium/templates/app/views/application/_status.html.erb +3 -0
- data/lib/generators/cambium/templates/app/views/layouts/.DS_Store +0 -0
- data/lib/generators/cambium/templates/app/views/layouts/admin.html.erb +44 -0
- data/lib/generators/cambium/templates/app/views/layouts/application.html.erb +24 -0
- data/lib/generators/cambium/templates/config/application.rb +15 -0
- data/lib/generators/cambium/templates/config/database.mysql2.yml.erb +15 -0
- data/lib/generators/cambium/templates/config/database.pg.yml.erb +14 -0
- data/lib/generators/cambium/templates/config/database.sqlite3.yml.erb +18 -0
- data/lib/generators/cambium/templates/config/initializers/_settings.rb +11 -0
- data/lib/generators/cambium/templates/config/initializers/assets.rb +1 -0
- data/lib/generators/cambium/templates/config/routes.rb.erb +33 -0
- data/lib/generators/cambium/templates/config/settings.yml +15 -0
- data/lib/generators/cambium/templates/config/settings_private.sample.yml +15 -0
- data/lib/generators/cambium/templates/config/settings_private.yml +13 -0
- data/lib/generators/cambium/templates/db/seeds.rb +25 -0
- data/lib/generators/cambium/templates/gitignore +29 -0
- data/lib/generators/cambium/templates/lib/.DS_Store +0 -0
- data/lib/generators/cambium/templates/lib/tasks/db.rake +22 -0
- data/lib/generators/cambium/templates/lib/tasks/rename.rake +28 -0
- data/lib/generators/cambium/templates/vendor/assets/javascripts/modernizr.js +4 -0
- data/lib/generators/cambium/templates/vendor/assets/stylesheets/normalize.scss +406 -0
- data/lib/help/cambium +7 -0
- metadata +375 -4
@@ -0,0 +1,54 @@
|
|
1
|
+
<div id="wysihtml5-toolbar-<%= idx %>" class="wysihtml5-toolbar">
|
2
|
+
<div class="group">
|
3
|
+
<%= wysihtml5_link 'formatBlock', 'P', { :cmd => 'p' } %>
|
4
|
+
<%= wysihtml5_link 'formatBlock', 'H1', { :cmd => 'h1' } %>
|
5
|
+
<%= wysihtml5_link 'formatBlock', 'H2', { :cmd => 'h2' } %>
|
6
|
+
<%= wysihtml5_link 'formatBlock', 'H3', { :cmd => 'h3' } %>
|
7
|
+
<%= wysihtml5_link 'formatBlock', 'H4', { :cmd => 'h4' } %>
|
8
|
+
<%#= wysihtml5_link 'formatBlock', 'H5', 'h5' %>
|
9
|
+
<%#= wysihtml5_link 'formatBlock', 'H6', 'h6' %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="group">
|
13
|
+
<%= wysihtml5_icon 'bold' %>
|
14
|
+
<%= wysihtml5_icon 'italic' %>
|
15
|
+
<%= wysihtml5_icon 'underline' %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="group">
|
19
|
+
<%= wysihtml5_icon 'justifyLeft', 'paragraph-left' %>
|
20
|
+
<%= wysihtml5_icon 'justifyCenter', 'paragraph-center' %>
|
21
|
+
<%= wysihtml5_icon 'justifyRight', 'paragraph-right' %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="group">
|
25
|
+
<%= wysihtml5_icon 'insertUnorderedList', 'list2' %>
|
26
|
+
<%= wysihtml5_icon 'insertOrderedList', 'numbered-list' %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="group">
|
30
|
+
<%= wysihtml5_icon 'createLink', 'link' %>
|
31
|
+
<%#= wysihtml5_icon 'insertImage', 'image', { :id => 'wysihtml5-insert-image' } %>
|
32
|
+
|
33
|
+
<div class="dialog" data-wysihtml5-dialog="createLink" style="display: none;">
|
34
|
+
<input type="text" data-wysihtml5-dialog-field="href" value="http://" class="text">
|
35
|
+
<a class="margin-right-medium" data-wysihtml5-dialog-action="save">Insert</a>
|
36
|
+
<a data-wysihtml5-dialog-action="cancel">Cancel</a>
|
37
|
+
</div>
|
38
|
+
<!-- <div class="dialog" data-wysihtml5-dialog="insertImage" style="display: none; margin-left: 36px;">
|
39
|
+
<input type="text" data-wysihtml5-dialog-field="src" value="http://" class="insert-image">
|
40
|
+
<a class="insert-image" class="margin-right-medium" data-wysihtml5-dialog-action="save">Insert</a>
|
41
|
+
<a class="browse-images">Browse Images</a>
|
42
|
+
<a data-wysihtml5-dialog-action="cancel">Cancel</a>
|
43
|
+
</div> -->
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="group right">
|
47
|
+
<a data-wysihtml5-action="change_view">HTML</a>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<%= f.input field, :label => false, :input_html => {
|
53
|
+
:id => "wysihtml5-textarea-#{idx}", :class => 'wysihtml5-textarea' },
|
54
|
+
:wrapper_html => { :class => "wysihtml5" } %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div id="form">
|
2
|
+
|
3
|
+
<header class="intro">
|
4
|
+
<div class="breadcrumbs">
|
5
|
+
<% index_label ||= classname.downcase %>
|
6
|
+
<%= link_to index_label, index %>
|
7
|
+
<span>/</span>
|
8
|
+
<%= link_to title.downcase, "#", :class => "disabled title" %>
|
9
|
+
</div>
|
10
|
+
<h1 class="title"><%= title %></h1>
|
11
|
+
</header>
|
12
|
+
|
13
|
+
<section class="form-container">
|
14
|
+
<%= render :partial => 'admin/shared/status' %>
|
15
|
+
<%= render :partial => 'form' %>
|
16
|
+
</section>
|
17
|
+
|
18
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<% if @item.new_record? or !@item.published? %>
|
2
|
+
<p class="item-status">
|
3
|
+
<span class="status">Status:</span>
|
4
|
+
<span class="draft">
|
5
|
+
<i class="icon-cancel-circle2"></i> DRAFT
|
6
|
+
</span>
|
7
|
+
</p>
|
8
|
+
<hr>
|
9
|
+
<% else %>
|
10
|
+
<p class="item-status">
|
11
|
+
<span class="status">Status:</span>
|
12
|
+
<span class="published">
|
13
|
+
<i class="icon-checkmark-circle2"></i> PUBLISHED
|
14
|
+
</span>
|
15
|
+
</p>
|
16
|
+
<hr>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<label>Publish</label>
|
20
|
+
<%= f.input :active_date, :as => :string, :label => false, :input_html => {
|
21
|
+
:placeholder => 'Date', :class => 'active-date date-js',
|
22
|
+
:value => @item.formatted_active_date } %>
|
23
|
+
<%= f.input :active_time, :as => :string, :label => false, :input_html => {
|
24
|
+
:placeholder => 'Time', :class => 'active-time time-js',
|
25
|
+
:value => @item.formatted_active_time } %>
|
26
|
+
|
27
|
+
<label>Unpublish</label>
|
28
|
+
<%= f.input :inactive_date, :as => :string, :label => false, :input_html => {
|
29
|
+
:placeholder => 'Date', :class => 'inactive-date date-js',
|
30
|
+
:value => @item.formatted_inactive_date } %>
|
31
|
+
<%= f.input :inactive_time, :as => :string, :label => false, :input_html => {
|
32
|
+
:placeholder => 'Time', :class => 'inactive-time time-js',
|
33
|
+
:value => @item.formatted_inactive_time } %>
|
Binary file
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
3
|
+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
4
|
+
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
5
|
+
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
6
|
+
<head>
|
7
|
+
<meta charset="utf-8">
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
9
|
+
<meta name="description" content="">
|
10
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0">
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
12
|
+
<meta name="format-detection" content="telephone=no">
|
13
|
+
|
14
|
+
<title>Patience</title>
|
15
|
+
|
16
|
+
<%%= stylesheet_link_tag "admin/admin", :media => "all" %>
|
17
|
+
<%%= javascript_include_tag "modernizr" %>
|
18
|
+
|
19
|
+
<script type="text/javascript">
|
20
|
+
var WYSIWYG_BASE_STYLES = "<%%= stylesheet_path('wysiwyg') %>";
|
21
|
+
var WYSIWYG_CUSTOM_STYLES = "<%%= stylesheet_path('admin/wysihtml5') %>";
|
22
|
+
</script>
|
23
|
+
|
24
|
+
<%%= csrf_meta_tags %>
|
25
|
+
</head>
|
26
|
+
<body>
|
27
|
+
|
28
|
+
<div id="admin" class="row">
|
29
|
+
|
30
|
+
<aside class="nav">
|
31
|
+
<%%= render partial: "admin/shared/nav" %>
|
32
|
+
</aside>
|
33
|
+
|
34
|
+
<section class="container">
|
35
|
+
<div class="content">
|
36
|
+
<%%= yield %>
|
37
|
+
</div>
|
38
|
+
</section>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<%%= javascript_include_tag "admin/admin" %>
|
43
|
+
</body>
|
44
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="public">
|
3
|
+
<head>
|
4
|
+
<title>Cambium</title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
|
+
<!-- <meta name="description" content="<%%#= @meta[:description] %>"> -->
|
8
|
+
<!-- <meta name="robots" content="noindex, nofollow"> -->
|
9
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0">
|
10
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
11
|
+
<meta name="format-detection" content="telephone=no">
|
12
|
+
<%%= stylesheet_link_tag 'application', :media => 'all' %>
|
13
|
+
<%%= javascript_include_tag "modernizr" %>
|
14
|
+
<%%= csrf_meta_tags %>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<%%= render :partial => 'status' %>
|
19
|
+
|
20
|
+
<%%= yield %>
|
21
|
+
|
22
|
+
<%%= javascript_include_tag 'application' %>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
config.generators do |g|
|
3
|
+
# g.fixture true
|
4
|
+
# g.fixture_replacement "factory_girl"
|
5
|
+
# g.test_framework :rspec
|
6
|
+
g.assets false
|
7
|
+
g.view_specs false
|
8
|
+
g.controller_specs false
|
9
|
+
g.helper_specs false
|
10
|
+
g.routing_specs false
|
11
|
+
g.request_specs false
|
12
|
+
g.stylesheets false
|
13
|
+
g.javascripts false
|
14
|
+
g.helper false
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
default: &default
|
2
|
+
adapter: mysql2
|
3
|
+
encoding: utf8
|
4
|
+
pool: 5
|
5
|
+
<%= "username: #{@config[:db][:user]}" if @config[:db][:user].present? %>
|
6
|
+
<%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
|
7
|
+
socket: /tmp/mysql.sock
|
8
|
+
|
9
|
+
development:
|
10
|
+
<<: *default
|
11
|
+
database: <%= @config[:db][:name] %>_development
|
12
|
+
|
13
|
+
test:
|
14
|
+
<<: *default
|
15
|
+
database: <%= @config[:db][:name] %>_test
|
@@ -0,0 +1,14 @@
|
|
1
|
+
default: &default
|
2
|
+
adapter: postgresql
|
3
|
+
encoding: unicode
|
4
|
+
pool: 5
|
5
|
+
<%= "user: #{@config[:db][:user]}" if @config[:db][:user].present? %>
|
6
|
+
<%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
|
7
|
+
|
8
|
+
development:
|
9
|
+
<<: *default
|
10
|
+
database: <%= @config[:db][:name] %>_development
|
11
|
+
|
12
|
+
test:
|
13
|
+
<<: *default
|
14
|
+
database: <%= @config[:db][:name] %>_test
|
@@ -0,0 +1,18 @@
|
|
1
|
+
default: &default
|
2
|
+
adapter: sqlite3
|
3
|
+
pool: 5
|
4
|
+
timeout: 5000
|
5
|
+
<%= "user: #{@config[:db][:user]}" if @config[:db][:user].present? %>
|
6
|
+
<%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
|
7
|
+
|
8
|
+
development:
|
9
|
+
<<: *default
|
10
|
+
database: db/development.sqlite3
|
11
|
+
|
12
|
+
test:
|
13
|
+
<<: *default
|
14
|
+
database: db/test.sqlite3
|
15
|
+
|
16
|
+
production:
|
17
|
+
<<: *default
|
18
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Loads config/settings.yml into SETTINGS[]
|
2
|
+
config_file = File.join(Rails.root,'config','settings.yml')
|
3
|
+
if File.exists?(config_file)
|
4
|
+
SETTINGS = YAML.load_file(config_file)[Rails.env]
|
5
|
+
end
|
6
|
+
|
7
|
+
# Loads config/settings_private.yml (sensitive settings) into PRIVATE[]
|
8
|
+
private_file = File.join(Rails.root,'config','settings_private.yml')
|
9
|
+
if File.exists?(private_file)
|
10
|
+
PRIVATE = YAML.load_file(private_file)[Rails.env]
|
11
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( admin/admin.css admin/admin.js wysiwyg.css admin/wysihtml5.css modernizr.js )
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= Rails.application.class.parent_name %>::Application.routes.draw do
|
2
|
+
|
3
|
+
# ------------------------------------------ Devise
|
4
|
+
|
5
|
+
devise_for :users, skip: [:sessions, :registrations]
|
6
|
+
devise_scope :user do
|
7
|
+
get '/login' => 'devise/sessions#new', :as => :new_user_session
|
8
|
+
post '/login' => 'devise/sessions#create', :as => :user_session
|
9
|
+
get '/logout' => 'devise/sessions#destroy', :as => :destroy_user_session
|
10
|
+
end
|
11
|
+
|
12
|
+
# ------------------------------------------ Admin
|
13
|
+
|
14
|
+
get '/admin' => 'admin#dashboard', :as => :admin_dashboard
|
15
|
+
namespace :admin do
|
16
|
+
resources :users, :except => [:show]
|
17
|
+
end
|
18
|
+
|
19
|
+
# ------------------------------------------ Public
|
20
|
+
|
21
|
+
# resources :posts
|
22
|
+
|
23
|
+
# ------------------------------------------ JSON
|
24
|
+
|
25
|
+
# scope 'json' do
|
26
|
+
# 'posts' => 'posts#index'
|
27
|
+
# end
|
28
|
+
|
29
|
+
# ------------------------------------------ Root
|
30
|
+
|
31
|
+
root :to => 'pages#index'
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#
|
2
|
+
# This file is for storing NON-SENSITIVE settings.
|
3
|
+
#
|
4
|
+
# Values here are loaded into the SETTINGS constant. For example, below you can
|
5
|
+
# access "Hello" through SETTINGS['say']['hello']
|
6
|
+
#
|
7
|
+
development: &default
|
8
|
+
say:
|
9
|
+
hello: "Hello"
|
10
|
+
|
11
|
+
test:
|
12
|
+
<<: *default
|
13
|
+
|
14
|
+
production:
|
15
|
+
<<: *default
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copy this file to config/settings_private.yml then input all your settings
|
2
|
+
# here. This file is tracked by Git and is used as a starting point for
|
3
|
+
# sensitive data.
|
4
|
+
#
|
5
|
+
# Values here are loaded into the PRIVATE constant. For example, below you can
|
6
|
+
# access "ABC123" through PRIVATE['my_special_key']
|
7
|
+
#
|
8
|
+
development: &default
|
9
|
+
my_special_key: "ABC123"
|
10
|
+
|
11
|
+
test:
|
12
|
+
<<: *default
|
13
|
+
|
14
|
+
production:
|
15
|
+
<<: *default
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This file is for storing SENSITIVE settings. This file is not tracked.
|
2
|
+
#
|
3
|
+
# Values here are loaded into the PRIVATE constant. For example, below you can
|
4
|
+
# access "ABC123" through PRIVATE['my_special_key']
|
5
|
+
#
|
6
|
+
development: &default
|
7
|
+
my_special_key: "ABC123"
|
8
|
+
|
9
|
+
test:
|
10
|
+
<<: *default
|
11
|
+
|
12
|
+
production:
|
13
|
+
<<: *default
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'csv'
|
2
|
+
Dir.glob("#{Rails.root}/app/models/*.rb").each { |file| require file }
|
3
|
+
|
4
|
+
ActiveRecord::Base.descendants.each do |model|
|
5
|
+
filename = "#{Rails.root}/db/csv/#{model.to_s.tableize}.csv"
|
6
|
+
if File.exist?(filename)
|
7
|
+
CSV.foreach(filename, :headers => true) do |row|
|
8
|
+
attrs = {}
|
9
|
+
row.to_hash.each do |k,v|
|
10
|
+
if k =~ /.*\:file/
|
11
|
+
unless v.blank?
|
12
|
+
attrs[k.split(':')[0]] = File.open("#{Rails.root}/lib/assets/seeds/#{v}")
|
13
|
+
end
|
14
|
+
else
|
15
|
+
attrs[k] = v
|
16
|
+
end
|
17
|
+
end
|
18
|
+
item = model.create!(attrs.to_hash.symbolize_keys)
|
19
|
+
puts "CREATED #{model.to_s.upcase} >> #{model.to_s} ##{item.id}"
|
20
|
+
end
|
21
|
+
if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL'
|
22
|
+
ActiveRecord::Base.connection.reset_pk_sequence!(model.to_s.tableize)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
17
|
+
sass-cache
|
18
|
+
esproj
|
19
|
+
|
20
|
+
# Sensitive Data
|
21
|
+
config/database.yml
|
22
|
+
config/settings_private.yml
|
23
|
+
|
24
|
+
# Public Uploads
|
25
|
+
public/uploads/
|
26
|
+
public/files/
|
27
|
+
|
28
|
+
# Stupid Files
|
29
|
+
*.DS_Store
|
Binary file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
namespace :db do
|
2
|
+
|
3
|
+
namespace :seed do
|
4
|
+
|
5
|
+
desc "Create CSV Files for Models"
|
6
|
+
task :create_files => :environment do
|
7
|
+
Dir.glob("#{Rails.root}/app/models/*.rb").each { |file| require file }
|
8
|
+
dir = "#{Rails.root}/db/csv"
|
9
|
+
FileUtils.mkdir(dir) unless File.exists?(dir)
|
10
|
+
ActiveRecord::Base.descendants.each do |model|
|
11
|
+
unless File.exists?("#{dir}/#{model.to_s.tableize}.csv")
|
12
|
+
File.open("#{dir}/#{model.to_s.tableize}.csv", 'w+') do |f|
|
13
|
+
f.write(model.columns.collect(&:name).join(','))
|
14
|
+
end
|
15
|
+
puts "CREATED FILE >> #{model.to_s.tableize}.csv"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
namespace :rename do
|
2
|
+
|
3
|
+
desc 'Rename Rails App'
|
4
|
+
task :app, [:new_name] do |t, args|
|
5
|
+
filenames = [
|
6
|
+
'Rakefile',
|
7
|
+
'app/views/layouts/admin.html.erb',
|
8
|
+
'app/views/layouts/application.html.erb',
|
9
|
+
'app/views/layouts/devise.html.erb',
|
10
|
+
'config/application.rb',
|
11
|
+
'config/environment.rb',
|
12
|
+
'config/routes.rb',
|
13
|
+
'config/environments/development.rb',
|
14
|
+
'config/environments/test.rb',
|
15
|
+
'config/environments/production.rb',
|
16
|
+
'config/initializers/secret_token.rb',
|
17
|
+
'config/initializers/session_store.rb',
|
18
|
+
]
|
19
|
+
filenames.each do |filename|
|
20
|
+
text = File.read(filename)
|
21
|
+
File.open(filename, "w") do |file|
|
22
|
+
file << text.gsub(/Roots/, args[:new_name])
|
23
|
+
end
|
24
|
+
puts "CHECKED FILE >> #{filename}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
|
2
|
+
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
3
|
+
*/
|
4
|
+
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.flexboxlegacy=function(){return J("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
|