chr 0.4.13 → 0.4.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/chr/view.coffee +7 -0
- data/app/assets/javascripts/chr/view_tabs.coffee +51 -0
- data/app/assets/javascripts/stores/object.coffee +3 -2
- data/app/assets/stylesheets/chr/layout.scss +13 -0
- data/app/assets/stylesheets/chr/themes/basic.scss +25 -0
- data/lib/chr/app_builder.rb +1 -1
- data/lib/chr/version.rb +1 -1
- data/templates/bin_setup.erb +2 -3
- data/templates/{development_seeds.rb → dev.rake} +0 -0
- data/templates/puma.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e17c570888d2652d32bce1a7735271077be4209
|
4
|
+
data.tar.gz: a751e96a3132dd42d96990fb32b2380f84039477
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd8018b063db8d922b99215764de74064919f0f68a9473d72df5edae7be18378b2f4ae641e195da163460669a587774689bd285b8a875587bac6d2306f1d4d3d
|
7
|
+
data.tar.gz: c05d08fdd10382d47fa18c3396d5dcc38437e03ebc23a8814d772b0ad26653e3a57f9476a95f8fc56394535fd907e54635d0ca60a18dd4e011de3077a6d8838f
|
@@ -26,6 +26,9 @@
|
|
26
26
|
# showSpinner()
|
27
27
|
# hideSpinner()
|
28
28
|
#
|
29
|
+
# Dependencies:
|
30
|
+
#= require ./view_tabs
|
31
|
+
#
|
29
32
|
# -----------------------------------------------------------------------------
|
30
33
|
class @View
|
31
34
|
constructor: (@module, @config, @closePath, @listName) ->
|
@@ -149,6 +152,8 @@ class @View
|
|
149
152
|
@form.initializePlugins()
|
150
153
|
|
151
154
|
@_add_delete_button()
|
155
|
+
if @config.viewTabs
|
156
|
+
@_build_tabs()
|
152
157
|
@config.onViewShow?(@)
|
153
158
|
|
154
159
|
|
@@ -194,6 +199,8 @@ class @View
|
|
194
199
|
else
|
195
200
|
@store.loadObject(objectId, callbacks)
|
196
201
|
|
202
|
+
include(View, viewTabs)
|
203
|
+
|
197
204
|
|
198
205
|
|
199
206
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# -----------------------------------------------------------------------------
|
2
|
+
# VIEW TABS
|
3
|
+
# -----------------------------------------------------------------------------
|
4
|
+
|
5
|
+
@viewTabs =
|
6
|
+
|
7
|
+
# PRIVATE ===============================================
|
8
|
+
|
9
|
+
_build_tabs: ->
|
10
|
+
@$title.addClass 'title-with-tabs'
|
11
|
+
|
12
|
+
@_create_tabs()
|
13
|
+
@_activate_tab(0)
|
14
|
+
|
15
|
+
|
16
|
+
_create_tabs: ->
|
17
|
+
@tabGroups = []
|
18
|
+
groupsHash = {}
|
19
|
+
|
20
|
+
for g in @form.groups
|
21
|
+
groupsHash[g.klassName] = g
|
22
|
+
|
23
|
+
@$tabs =$ "<aside class='header-tabs'></aside>"
|
24
|
+
@$title.after @$tabs
|
25
|
+
|
26
|
+
for tab_id, tab_title of @config.viewTabs
|
27
|
+
@tabGroups.push(groupsHash[tab_id])
|
28
|
+
@$tabs.append(@_create_button(tab_title))
|
29
|
+
|
30
|
+
|
31
|
+
_create_button: (name) ->
|
32
|
+
$tabButton =$ "<a href='#'>#{ name }</a>"
|
33
|
+
$tabButton.on 'click', (e) =>
|
34
|
+
@_on_tab_click($(e.currentTarget))
|
35
|
+
e.preventDefault()
|
36
|
+
return $tabButton
|
37
|
+
|
38
|
+
|
39
|
+
_on_tab_click: ($link) ->
|
40
|
+
index = @$tabs.children().index($link)
|
41
|
+
@_activate_tab(index)
|
42
|
+
|
43
|
+
|
44
|
+
_activate_tab: (index) ->
|
45
|
+
@$tabs.children().removeClass('active')
|
46
|
+
@$tabs.find(":nth-child(#{ index + 1 })").addClass('active')
|
47
|
+
|
48
|
+
for g in @tabGroups
|
49
|
+
g.$el.hide()
|
50
|
+
|
51
|
+
@tabGroups[index].$el.show()
|
@@ -115,6 +115,19 @@ a { text-decoration: none; }
|
|
115
115
|
.view-saving .save { visibility : hidden; }
|
116
116
|
.view-saving .spinner { visibility : visible; }
|
117
117
|
|
118
|
+
.title.title-with-tabs { display: none; }
|
119
|
+
|
120
|
+
.header-tabs {
|
121
|
+
@include position(relative, 0.45em null null null);
|
122
|
+
border-radius : 4px;
|
123
|
+
overflow : hidden;
|
124
|
+
display : inline-block;
|
125
|
+
z-index : 1;
|
126
|
+
|
127
|
+
a { display : inline-block; }
|
128
|
+
}
|
129
|
+
|
130
|
+
|
118
131
|
|
119
132
|
/* Mobile ------------------------------------------------------------------ */
|
120
133
|
.header {
|
@@ -92,6 +92,31 @@ a {
|
|
92
92
|
}
|
93
93
|
}
|
94
94
|
|
95
|
+
.header-tabs {
|
96
|
+
border : 1px solid $positive-color;
|
97
|
+
|
98
|
+
a {
|
99
|
+
border-right : 1px solid $positive-color;
|
100
|
+
font-weight : $regular;
|
101
|
+
line-height : 1;
|
102
|
+
font-size : .8em;
|
103
|
+
padding : .45em .75em .55em;
|
104
|
+
color : $positive-color;
|
105
|
+
|
106
|
+
&:last-child {
|
107
|
+
border-right : none;
|
108
|
+
}
|
109
|
+
|
110
|
+
&.active {
|
111
|
+
background-color : $positive-color;
|
112
|
+
color : white;
|
113
|
+
&:hover {
|
114
|
+
color : white;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
95
120
|
/* Sign in ----------------------------------------------------------------- */
|
96
121
|
|
97
122
|
.signin-modal {
|
data/lib/chr/app_builder.rb
CHANGED
data/lib/chr/version.rb
CHANGED
data/templates/bin_setup.erb
CHANGED
@@ -16,7 +16,7 @@ if [ ! -f .env ]; then
|
|
16
16
|
fi
|
17
17
|
|
18
18
|
# Set up database and add any development seed data
|
19
|
-
|
19
|
+
bin/rake dev:prime
|
20
20
|
|
21
21
|
# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv
|
22
22
|
mkdir -p .git/safe
|
@@ -27,8 +27,7 @@ if ! grep --quiet --no-messages --fixed-strings 'port' .foreman; then
|
|
27
27
|
fi
|
28
28
|
|
29
29
|
if ! command -v foreman > /dev/null; then
|
30
|
-
|
31
|
-
printf 'See https://github.com/ddollar/foreman for install instructions.\n'
|
30
|
+
gem install foreman
|
32
31
|
fi
|
33
32
|
|
34
33
|
# Only if this isn't CI
|
File without changes
|
data/templates/puma.rb
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
# The environment variable WEB_CONCURRENCY may be set to a default value based
|
4
4
|
# on dyno size. To manually configure this value use heroku config:set
|
5
5
|
# WEB_CONCURRENCY.
|
6
|
-
workers Integer(ENV.fetch("WEB_CONCURRENCY",
|
7
|
-
threads_count = Integer(ENV.fetch("MAX_THREADS",
|
6
|
+
workers Integer(ENV.fetch("WEB_CONCURRENCY", 2))
|
7
|
+
threads_count = Integer(ENV.fetch("MAX_THREADS", 2))
|
8
8
|
threads(threads_count, threads_count)
|
9
9
|
|
10
10
|
preload_app!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kravets
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -297,6 +297,7 @@ files:
|
|
297
297
|
- app/assets/javascripts/chr/module.coffee
|
298
298
|
- app/assets/javascripts/chr/utils.coffee
|
299
299
|
- app/assets/javascripts/chr/view.coffee
|
300
|
+
- app/assets/javascripts/chr/view_tabs.coffee
|
300
301
|
- app/assets/javascripts/stores/array.coffee
|
301
302
|
- app/assets/javascripts/stores/object.coffee
|
302
303
|
- app/assets/javascripts/stores/rails-array.coffee
|
@@ -345,7 +346,7 @@ files:
|
|
345
346
|
- templates/character_admin_index.html.erb
|
346
347
|
- templates/character_admin_layout.html.erb.erb
|
347
348
|
- templates/character_base_controller.rb
|
348
|
-
- templates/
|
349
|
+
- templates/dev.rake
|
349
350
|
- templates/devise_overrides_passwords_controller.rb
|
350
351
|
- templates/devise_overrides_passwords_edit.html.erb
|
351
352
|
- templates/devise_overrides_passwords_new.html.erb
|