thredded_create_app 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thredded_create_app/generator.rb +0 -2
- data/lib/thredded_create_app/tasks/add_thredded.rb +0 -2
- data/lib/thredded_create_app/tasks/setup_app_skeleton/application.body.html.erb +2 -1
- data/lib/thredded_create_app/tasks/setup_app_skeleton/javascripts/app/theme.js +9 -6
- data/lib/thredded_create_app/tasks/setup_app_skeleton/javascripts/app/time_ago.js +15 -12
- data/lib/thredded_create_app/version.rb +1 -1
- metadata +2 -3
- data/lib/thredded_create_app/tasks/add_thredded/javascripts/thredded/dependencies/ujs.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3781d88ef7fa272c8f7c4e534978ac43ac8123b
|
4
|
+
data.tar.gz: 29aa6258e78cd211d52bf3589aebf09f276f1632
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05fe3a2f93a6ef740ac94d196cea7fd6668564ef68f22f34b9d4e40f023733cbed62e2b816a98589dcd197515e83c503bdb952ce67de87f81e10d44a67765f3e
|
7
|
+
data.tar.gz: c91ff781d8b83c803b4b7c6a5ceb93a53d6f3501d95d44ebd1ac4961a7b413c3d4661933f693ddae65a726ef5c99282c597a462981766a905e332c4734f3d1f6
|
@@ -9,7 +9,6 @@ require 'thredded_create_app/tasks/add_simple_form'
|
|
9
9
|
require 'thredded_create_app/tasks/add_devise'
|
10
10
|
require 'thredded_create_app/tasks/add_roadie'
|
11
11
|
require 'thredded_create_app/tasks/add_rails_email_preview'
|
12
|
-
require 'thredded_create_app/tasks/add_jquery'
|
13
12
|
require 'thredded_create_app/tasks/add_thredded'
|
14
13
|
require 'thredded_create_app/tasks/add_display_name_to_users'
|
15
14
|
require 'thredded_create_app/tasks/setup_database'
|
@@ -70,7 +69,6 @@ module ThreddedCreateApp
|
|
70
69
|
Tasks::AddDevise,
|
71
70
|
Tasks::AddRailsEmailPreview,
|
72
71
|
Tasks::AddRoadie,
|
73
|
-
Tasks::AddJquery,
|
74
72
|
Tasks::AddThredded,
|
75
73
|
Tasks::AddDisplayNameToUsers,
|
76
74
|
Tasks::SetupAppSkeleton,
|
@@ -71,8 +71,6 @@ module ThreddedCreateApp
|
|
71
71
|
def add_thredded_javascripts
|
72
72
|
copy 'add_thredded/myapp_thredded.js',
|
73
73
|
"app/assets/javascripts/#{app_name}_thredded.js"
|
74
|
-
copy 'add_thredded/javascripts/thredded/dependencies/ujs.js',
|
75
|
-
'app/assets/javascripts/thredded/dependencies/ujs.js'
|
76
74
|
end
|
77
75
|
|
78
76
|
def add_admin_column_to_users
|
@@ -2,7 +2,8 @@
|
|
2
2
|
<% is_thredded = content_for?(:thredded_page_id) %>
|
3
3
|
<%= content_tag :div,
|
4
4
|
class: 'app-container',
|
5
|
-
id: ('app-page-container' unless is_thredded)
|
5
|
+
id: ('app-page-container' unless is_thredded),
|
6
|
+
'data-locale' => I18n.locale do %>
|
6
7
|
<%= render 'shared/header' %>
|
7
8
|
<%= render 'shared/flash_messages' unless is_thredded %>
|
8
9
|
<div class="app-content-container"><%= yield %></div>
|
@@ -1,10 +1,13 @@
|
|
1
1
|
window.App.onPageLoad(function () {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
Array.prototype.forEach.call(document.querySelectorAll('.app-nav-theme li button'), function(button) {
|
3
|
+
button.addEventListener('click', function(evt) {
|
4
|
+
var expiresAt = new Date();
|
5
|
+
expiresAt.setMonth(expiresAt.getMonth() + 12);
|
6
|
+
document.cookie = 'app-theme=' +
|
7
|
+
evt.currentTarget.parentNode.getAttribute('data-theme') +
|
8
|
+
';expires=' + expiresAt + ';path=/';
|
9
|
+
document.location.reload();
|
10
|
+
});
|
8
11
|
});
|
9
12
|
});
|
10
13
|
|
@@ -1,13 +1,16 @@
|
|
1
|
-
//= require
|
2
|
-
(function
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
//= require timeago
|
2
|
+
(function() {
|
3
|
+
window.App.onPageLoad(function() {
|
4
|
+
if (!window.App.isAppPage()) {
|
5
|
+
return;
|
6
|
+
}
|
7
|
+
var COMPONENT_SELECTOR = '[data-time-ago]';
|
8
|
+
window.timeago().render(
|
9
|
+
document.querySelectorAll(COMPONENT_SELECTOR),
|
10
|
+
document.querySelector('#app-page-container')
|
11
|
+
.getAttribute('data-locale'));
|
12
12
|
});
|
13
|
-
|
13
|
+
document.addEventListener('turbolinks:before-cache', function() {
|
14
|
+
timeago.cancel();
|
15
|
+
});
|
16
|
+
})();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thredded_create_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Mazovetskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -138,7 +138,6 @@ files:
|
|
138
138
|
- lib/thredded_create_app/tasks/add_thredded.rb
|
139
139
|
- lib/thredded_create_app/tasks/add_thredded/_thredded-custom.scss
|
140
140
|
- lib/thredded_create_app/tasks/add_thredded/_thredded-variables.scss
|
141
|
-
- lib/thredded_create_app/tasks/add_thredded/javascripts/thredded/dependencies/ujs.js
|
142
141
|
- lib/thredded_create_app/tasks/add_thredded/myapp_thredded.js
|
143
142
|
- lib/thredded_create_app/tasks/add_thredded/spec/features/thredded_spec.rb
|
144
143
|
- lib/thredded_create_app/tasks/add_thredded/thredded.en.yml
|
@@ -1 +0,0 @@
|
|
1
|
-
//= require rails-ujs
|