rbbt-rest 1.3.32 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/common/forms.rb +1 -1
- data/lib/rbbt/rest/entity/action_controller.rb +2 -2
- data/lib/rbbt/rest/entity/favourites.rb +3 -3
- data/lib/rbbt/rest/main.rb +2 -1
- data/share/views/compass/_rbbt.sass +5 -1
- data/share/views/compass/actions.sass +2 -0
- data/share/views/compass/app.sass +3 -68
- data/share/views/compass/fonts.sass +54 -0
- data/share/views/compass/functions.sass +2 -1
- data/share/views/compass/grid_system.sass +51 -0
- data/share/views/compass/layout.sass +74 -8
- data/share/views/compass/rbbt/form.sass +2 -2
- data/share/views/compass/rbbt/menu.sass +6 -5
- data/share/views/compass/rbbt/reveal.sass +8 -9
- data/share/views/compass/style.sass +44 -2
- data/share/views/compass/theme.sass +14 -9
- data/share/views/compass/top_menu.sass +4 -5
- data/share/views/compass/workflow.sass +7 -5
- data/share/views/layout.haml +2 -2
- data/share/views/public/js/_ajax_replace.js +3 -0
- data/share/views/public/js/helpers.js +71 -60
- data/share/views/public/js/rbbt/favourites.js +398 -398
- data/share/views/public/js/rbbt/reveal.js +6 -0
- data/share/views/public/plugins/jquery/js/jquery-2.1.1.js +9190 -0
- metadata +5 -3
- data/config.ru +0 -102
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf6c08a28e051ad1767c8aea093bd67708841882
|
4
|
+
data.tar.gz: 893924c2c1536c84eaa6d50a4087204bb946131d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184d1329afd7ff57ed384bf3a5744728f63eefb8af19ec23e008f93a8fc32e169bf5da51b2935f95310a317bf3c1a353f88348b13af3fa9a2902b434773c4626
|
7
|
+
data.tar.gz: 4eabaeabdf7abdfbaa8df2303cdcb79dd6fa79a8b89b394fa85cf1817bc25b7d02a31e9ec13f09eb1216c84a6a43eccd8f646fed8c8b70a0181768c71416cdf0
|
@@ -94,7 +94,7 @@ module RbbtRESTHelpers
|
|
94
94
|
input_label(id, name, description, default, extra) +
|
95
95
|
html_tag("input", nil, html_options.merge(:type => input_type, :name => name, :value => value, :id => id, :step => step))
|
96
96
|
|
97
|
-
when :tsv, :array, :text
|
97
|
+
when :tsv, :array, :text, :file
|
98
98
|
value = current.nil? ? default : current
|
99
99
|
value = value * "\n" if Array === value
|
100
100
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class
|
1
|
+
class EntityActionController
|
2
2
|
attr_accessor :entity, :id
|
3
3
|
attr_accessor :actions
|
4
4
|
|
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
module EntityRESTHelpers
|
20
20
|
def default_action_controller(entity, list_id = nil)
|
21
|
-
action_controller =
|
21
|
+
action_controller = EntityActionController.new(entity, list_id)
|
22
22
|
|
23
23
|
case
|
24
24
|
when Array === entity
|
@@ -39,7 +39,7 @@ module EntityRESTHelpers
|
|
39
39
|
entity_type = entity.base_type
|
40
40
|
dir = Path.setup(File.join(settings.favourites_dir, user))
|
41
41
|
|
42
|
-
if (file = dir[entity_type]).exists?
|
42
|
+
if (file = dir[entity_type].find).exists?
|
43
43
|
entities = Annotated.load_tsv(TSV.open(file))
|
44
44
|
entities -= [entity]
|
45
45
|
if entities.any?
|
@@ -70,7 +70,7 @@ module EntityRESTHelpers
|
|
70
70
|
|
71
71
|
dir = Path.setup(File.join(settings.favourite_lists_dir, user))
|
72
72
|
|
73
|
-
if (file = dir[entity_type]).exists?
|
73
|
+
if (file = dir[entity_type].find).exists?
|
74
74
|
lists = Open.read(file.find).split("\n")
|
75
75
|
lists << list
|
76
76
|
Open.write(file, lists.uniq * "\n")
|
@@ -85,7 +85,7 @@ module EntityRESTHelpers
|
|
85
85
|
|
86
86
|
dir = Path.setup(File.join(settings.favourite_lists_dir, user))
|
87
87
|
|
88
|
-
if (file = dir[entity_type]).exists?
|
88
|
+
if (file = dir[entity_type].find).exists?
|
89
89
|
lists = Open.read(file).split("\n")
|
90
90
|
lists -= [list]
|
91
91
|
if lists.any?
|
data/lib/rbbt/rest/main.rb
CHANGED
@@ -10,7 +10,8 @@ require 'json'
|
|
10
10
|
module Sinatra
|
11
11
|
module RbbtRESTMain
|
12
12
|
def add_sass_load_path(path)
|
13
|
-
|
13
|
+
path = path.find if Path === path
|
14
|
+
Sass::Engine::DEFAULT_OPTIONS[:load_paths].unshift path if File.exists? path
|
14
15
|
end
|
15
16
|
|
16
17
|
def self.registered(base)
|
@@ -11,6 +11,8 @@
|
|
11
11
|
ul.actions
|
12
12
|
+rbbt_button_list($color_bg: $color_action_controler_bg, $color_item_bg: $color_action_active_bg, $width: 19%)
|
13
13
|
li
|
14
|
+
@media #{$only-large}
|
15
|
+
+ellipsis_text
|
14
16
|
border: 1px solid $color_action_controler_border
|
15
17
|
&.active > a
|
16
18
|
color: $magenta
|
@@ -1,6 +1,7 @@
|
|
1
|
-
@import "foundation"
|
2
1
|
@import "_rbbt"
|
3
2
|
|
3
|
+
@import "style"
|
4
|
+
|
4
5
|
@import "user"
|
5
6
|
@import "entity_card"
|
6
7
|
@import "workflow"
|
@@ -9,73 +10,7 @@
|
|
9
10
|
@import "actions"
|
10
11
|
@import "top_menu"
|
11
12
|
@import "help"
|
12
|
-
@import "layout"
|
13
13
|
@import "figure"
|
14
14
|
@import "monitor"
|
15
|
-
|
16
|
-
table
|
17
|
-
+rbbt_table
|
18
|
-
|
19
|
-
.table_column_selector
|
20
|
-
+table_column_selector
|
21
|
-
|
22
|
-
.rbbt_reveal_content
|
23
|
-
+rbbt_reveal_content
|
24
|
-
|
25
|
-
.modal
|
26
|
-
+modal
|
27
|
-
|
28
|
-
.action_loader > .action_card > .action_parameters
|
29
|
-
margin-top: 0
|
30
|
-
border-top: none
|
31
|
-
|
32
|
-
.action_parameters
|
33
|
-
+action_parameters
|
34
|
-
|
35
|
-
.entity_card, .entity_list_card, .entity_map_card, .action_card, .workflow_task
|
36
|
-
+card
|
37
|
-
|
38
|
-
& > .card > .sidebar
|
39
|
-
h1, h2, h3, h4, h5, h6
|
40
|
-
margin: $indent
|
41
|
-
p
|
42
|
-
margin: $indent
|
43
|
-
|
44
|
-
& > .card > .sidebar dl
|
45
|
-
margin: $vindent $indent
|
46
|
-
+indented_dl
|
47
|
-
font-weight: normal
|
48
|
-
&.rbbt_accordion
|
49
|
-
margin: 0 0
|
50
|
-
|
51
|
-
|
52
|
-
& > dt, dd
|
53
|
-
border-left: 0
|
54
|
-
border-right: 0
|
55
|
-
dt.next
|
56
|
-
min-height: 3em
|
57
|
-
font-weight: normal
|
58
|
-
&> span.title
|
59
|
-
margin-left: 3em
|
60
|
-
&> a
|
61
|
-
position: absolute
|
62
|
-
left: $indent
|
63
|
-
|
64
|
-
.sidebar
|
65
|
-
overflow-y: hidden
|
66
|
-
overflow-x: hidden
|
67
|
-
p
|
68
|
-
margin-left: $indent
|
69
|
-
ul.entity_list
|
70
|
-
+clean_list
|
71
|
-
margin: $vindent $indent
|
72
|
-
li
|
73
|
-
display: block
|
74
|
-
|
75
|
-
a.fragment
|
76
|
-
+fragment
|
77
|
-
|
78
|
-
.hide_toggle
|
79
|
-
width: 100%
|
80
|
-
width: 2em
|
15
|
+
@import "layout"
|
81
16
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// From: https://medium.com/@amlinarev/using-sass-compass-vertical-rhythm-to-set-up-typography-defaults-in-a-project-34fe2f1d2c02
|
2
|
+
|
3
|
+
@import "compass/typography/vertical_rhythm"
|
4
|
+
|
5
|
+
// The base font size
|
6
|
+
$base-font-size: 18px
|
7
|
+
// Base line height
|
8
|
+
$base-line-height: 30px
|
9
|
+
// Rhythm unit (Compass vertical rhythm)
|
10
|
+
$rhythm-unit: "rem"
|
11
|
+
$base-font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif
|
12
|
+
$base-font-weight: 400
|
13
|
+
|
14
|
+
$tiny-font-size: 10px
|
15
|
+
$tiny-font-leading: 0.75
|
16
|
+
$small-font-size: 14px
|
17
|
+
$small-font-leading: 0.75
|
18
|
+
$base-font-size: 18px
|
19
|
+
$base-font-leading: 1
|
20
|
+
$medium-font-size: 24px
|
21
|
+
$medium-font-leading: 1.25
|
22
|
+
$large-font-size: 32px
|
23
|
+
$large-font-leading: 1.25
|
24
|
+
$xlarge-font-size: 43px
|
25
|
+
$xlarge-font-leading: 1.5
|
26
|
+
|
27
|
+
=typeSize($size)
|
28
|
+
@if ($size == "tiny")
|
29
|
+
+adjust-font-size-to($tiny-font-size)
|
30
|
+
+adjust-leading-to($tiny-font-leading)
|
31
|
+
@if ($size == "small")
|
32
|
+
+adjust-font-size-to($small-font-size)
|
33
|
+
+adjust-leading-to($small-font-leading)
|
34
|
+
@if ($size == "base")
|
35
|
+
+adjust-font-size-to($base-font-size)
|
36
|
+
+adjust-leading-to($base-font-leading)
|
37
|
+
@if ($size == "large")
|
38
|
+
+adjust-font-size-to($large-font-size)
|
39
|
+
+adjust-leading-to($large-font-leading)
|
40
|
+
@if ($size == "xlarge")
|
41
|
+
+adjust-font-size-to($xlarge-font-size)
|
42
|
+
+adjust-leading-to($xlarge-font-leading)
|
43
|
+
|
44
|
+
=typeWeight($size)
|
45
|
+
@if ($size == "ultrastrong")
|
46
|
+
font-weight: 900
|
47
|
+
@if ($size == "strong")
|
48
|
+
font-weight: 700
|
49
|
+
@if ($size == "regular")
|
50
|
+
font-weight: 400
|
51
|
+
@if ($size == "light")
|
52
|
+
font-weight: 300
|
53
|
+
@if ($size == "ultralight")
|
54
|
+
font-weight: 200
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// Make sure the charset is set appropriately
|
2
|
+
@charset "UTF-8"
|
3
|
+
|
4
|
+
// This includes all of the foundation global elements that are needed to work with any of the other files.
|
5
|
+
|
6
|
+
$legacy-support-for-ie7: false !default
|
7
|
+
$legacy-support-for-ie6: false !default
|
8
|
+
|
9
|
+
$breakpoint: 1024px
|
10
|
+
|
11
|
+
$small-screen: 1024px
|
12
|
+
$medium-screen: 1280px
|
13
|
+
$large-screen: 1440px
|
14
|
+
|
15
|
+
$not-small: "only screen and (min-width: #{$small-screen})"
|
16
|
+
$only-small: "only screen and (max-width: #{$small-screen})"
|
17
|
+
|
18
|
+
$only-large: "only screen and (min-width: #{$small-screen})"
|
19
|
+
$not-large: "only screen and (max-width: #{$small-screen})"
|
20
|
+
|
21
|
+
$row-width: auto
|
22
|
+
$column-gutter: 30px
|
23
|
+
$total-columns: 12
|
24
|
+
|
25
|
+
$indent: 15px
|
26
|
+
$vindent: 22px
|
27
|
+
|
28
|
+
=clear_fix()
|
29
|
+
&:before, &:after
|
30
|
+
content: " "
|
31
|
+
display: table
|
32
|
+
&:after
|
33
|
+
clear: both
|
34
|
+
|
35
|
+
|
36
|
+
=css-triangle($a,$b,$c)
|
37
|
+
|
38
|
+
@import "zen"
|
39
|
+
|
40
|
+
|
41
|
+
$zen-column-count: 12
|
42
|
+
$zen-gutter-width: 30px
|
43
|
+
|
44
|
+
=grid_row()
|
45
|
+
@include zen-clear()
|
46
|
+
@include zen-grid-container()
|
47
|
+
overflow: visible !important
|
48
|
+
|
49
|
+
=grid_column($size:1, $float:left, $last_column:false)
|
50
|
+
@include zen-grid-item($size,1,$float)
|
51
|
+
|
@@ -1,11 +1,16 @@
|
|
1
|
+
@import "compass/css3/box-sizing"
|
2
|
+
body *
|
3
|
+
@include box-sizing(border-box)
|
4
|
+
|
5
|
+
.menu_item
|
6
|
+
+_rbbt_menu_item
|
7
|
+
|
1
8
|
$gap: 12px
|
2
9
|
body
|
3
10
|
margin: 0
|
4
|
-
font-size: 14px !important
|
5
|
-
+clearfix
|
6
11
|
|
7
12
|
#content
|
8
|
-
+
|
13
|
+
+clear_fix
|
9
14
|
min-height: 900px
|
10
15
|
margin-left: $indent
|
11
16
|
margin-right: $indent
|
@@ -125,11 +130,6 @@ ul.list_comparison
|
|
125
130
|
display: inline-block
|
126
131
|
color: gray
|
127
132
|
|
128
|
-
a[href]
|
129
|
-
&:not([href^=\/])
|
130
|
-
&:not([href^='#'])
|
131
|
-
&:after
|
132
|
-
content: '\2192'
|
133
133
|
|
134
134
|
|
135
135
|
.action_loader
|
@@ -139,3 +139,69 @@ a[href]
|
|
139
139
|
table.wide, table.flip
|
140
140
|
+responsive_table
|
141
141
|
|
142
|
+
table
|
143
|
+
+rbbt_table
|
144
|
+
|
145
|
+
.table_column_selector
|
146
|
+
+table_column_selector
|
147
|
+
|
148
|
+
.rbbt_reveal_content
|
149
|
+
+rbbt_reveal_content
|
150
|
+
|
151
|
+
.modal
|
152
|
+
+modal
|
153
|
+
|
154
|
+
.action_loader > .action_card > .action_parameters
|
155
|
+
margin-top: 0
|
156
|
+
border-top: none
|
157
|
+
|
158
|
+
.action_parameters
|
159
|
+
+action_parameters
|
160
|
+
|
161
|
+
.entity_card, .entity_list_card, .entity_map_card, .action_card, .workflow_task
|
162
|
+
+card
|
163
|
+
|
164
|
+
& > .card > .sidebar
|
165
|
+
h1, h2, h3, h4, h5, h6
|
166
|
+
margin: $indent
|
167
|
+
p
|
168
|
+
margin: $indent
|
169
|
+
|
170
|
+
& > .card > .sidebar dl
|
171
|
+
margin: $vindent $indent
|
172
|
+
+indented_dl
|
173
|
+
font-weight: normal
|
174
|
+
&.rbbt_accordion
|
175
|
+
margin: 0 0
|
176
|
+
|
177
|
+
|
178
|
+
& > dt, dd
|
179
|
+
border-left: 0
|
180
|
+
border-right: 0
|
181
|
+
dt.next
|
182
|
+
min-height: 3em
|
183
|
+
font-weight: normal
|
184
|
+
&> span.title
|
185
|
+
margin-left: 3em
|
186
|
+
&> a
|
187
|
+
position: absolute
|
188
|
+
left: $indent
|
189
|
+
|
190
|
+
.sidebar
|
191
|
+
overflow-y: hidden
|
192
|
+
overflow-x: hidden
|
193
|
+
p
|
194
|
+
margin-left: $indent
|
195
|
+
ul.entity_list
|
196
|
+
+clean_list
|
197
|
+
margin: $vindent $indent
|
198
|
+
li
|
199
|
+
display: block
|
200
|
+
|
201
|
+
a.fragment
|
202
|
+
+fragment
|
203
|
+
|
204
|
+
.hide_toggle
|
205
|
+
width: 100%
|
206
|
+
width: 2em
|
207
|
+
|
@@ -15,6 +15,7 @@
|
|
15
15
|
margin-top: 0
|
16
16
|
|
17
17
|
.input
|
18
|
+
position: relative
|
18
19
|
min-width: 900px * 0.3
|
19
20
|
max-width: 100% !important
|
20
21
|
+grid-column
|
@@ -52,7 +53,7 @@
|
|
52
53
|
+ellipsis_text
|
53
54
|
max-width: 70%
|
54
55
|
|
55
|
-
&.array, &.tsv, &.text
|
56
|
+
&.array, &.tsv, &.text, &.file
|
56
57
|
width: 99%
|
57
58
|
textarea
|
58
59
|
width: 100%
|
@@ -61,7 +62,6 @@
|
|
61
62
|
&.submit:last-child
|
62
63
|
@media #{$only-large}
|
63
64
|
width: 99%
|
64
|
-
float: right
|
65
65
|
clear: both
|
66
66
|
min-height: 0
|
67
67
|
text-align: right
|
@@ -109,11 +109,12 @@
|
|
109
109
|
|
110
110
|
//{{{ Menus
|
111
111
|
=rbbt_menu($color_bg: $color_menu_bg, $color_text: $color_menu_text, $color_item_bg: $color_menu_item_bg, $color_item_text: $color_menu_item_text, $color_content_bg: $color_menu_content_bg, $color_content_text: $color_menu_content_text, $z-index: $z-index_menu_content)
|
112
|
-
+
|
112
|
+
+clear_fix
|
113
113
|
margin: 0
|
114
114
|
border: 1px solid $color_menu_border
|
115
115
|
background-color: $color_bg
|
116
116
|
position: relative
|
117
|
+
//overflow: visible !important
|
117
118
|
& > dt
|
118
119
|
+rbbt_menu_item($color_item_bg, $color_item_text)
|
119
120
|
float: left
|
@@ -122,7 +123,7 @@
|
|
122
123
|
+rbbt_menu_content($color_content_bg, $color_content_text, $z-index: $z-index)
|
123
124
|
|
124
125
|
=rbbt_vertical_menu($height: 500px, $color_bg: $color_menu_bg, $color_text: $color_menu_text, $color_item_bg: $color_menu_item_bg, $color_item_text: $color_menu_item_text, $color_content_bg: lighten($color_menu_content_bg, 55), $color_content_text: $color_menu_content_text, $z-index: $z-index_menu_content)
|
125
|
-
+
|
126
|
+
+clear_fix
|
126
127
|
margin: 0
|
127
128
|
height: $height
|
128
129
|
background-color: $color_bg
|
@@ -146,7 +147,7 @@
|
|
146
147
|
|
147
148
|
|
148
149
|
=rbbt_accordion($color_bg: $color_menu_bg, $color_text: $color_menu_text, $color_item_bg: $color_menu_item_bg, $color_item_text: $color_menu_item_text, $color_content_bg: lighten($color_menu_content_bg, 55), $color_content_text: $color_menu_content_text, $z-index: $z-index_menu_content)
|
149
|
-
+
|
150
|
+
+clear_fix
|
150
151
|
clear: both
|
151
152
|
margin: 0
|
152
153
|
background-color: $color_bg
|
@@ -157,7 +158,7 @@
|
|
157
158
|
+rbbt_accordion_menu_content($color_content_bg, $color_content_text, $z-index)
|
158
159
|
|
159
160
|
=rbbt_tabs($color_bg: $color_menu_bg, $color_text: $color_menu_text, $color_item_bg: $color_menu_item_bg, $color_item_text: $color_menu_item_text, $color_content_bg: lighten($color_menu_content_bg, 55), $color_content_text: $color_menu_content_text, $color_border: $color_menu_border, $z-index: $z-index_menu_content)
|
160
|
-
+
|
161
|
+
+clear_fix
|
161
162
|
border: 1px solid $color_border
|
162
163
|
background-color: $color_bg
|
163
164
|
position: relative
|
@@ -169,7 +170,7 @@
|
|
169
170
|
|
170
171
|
=rbbt_button_list($color_bg: $color_menu_bg, $color_text: $color_menu_text, $color_item_bg: $color_menu_item_bg, $color_item_text: $color_menu_item_text, $color_item_border: $color_menu_border, $width: auto, $padding: 1px 3px, $margin: 4px)
|
171
172
|
+grid_row
|
172
|
-
+
|
173
|
+
+clear_fix
|
173
174
|
background-color: $color_bg
|
174
175
|
margin: 0
|
175
176
|
padding-top: $margin
|