hippo-fw 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc.js +0 -3
- data/.nvmrc +1 -2
- data/.ruby-version +1 -1
- data/Rakefile +1 -1
- data/client/hippo/access/login-dialog.jsx +2 -0
- data/client/hippo/boot.jsx +12 -0
- data/client/hippo/components/asset.jsx +5 -1
- data/client/hippo/components/asset.scss +1 -0
- data/client/hippo/components/data-list.jsx +6 -4
- data/client/hippo/components/data-table.jsx +7 -6
- data/client/hippo/components/data-table/header-cell.jsx +2 -0
- data/client/hippo/components/date-time.jsx +12 -2
- data/client/hippo/components/form/api.js +12 -0
- data/client/hippo/components/form/fields.jsx +8 -1
- data/client/hippo/components/form/fields/checkbox-wrapper.jsx +2 -0
- data/client/hippo/components/form/fields/date-wrapper.jsx +2 -0
- data/client/hippo/components/form/fields/form-field.scss +2 -0
- data/client/hippo/components/form/fields/label.jsx +2 -0
- data/client/hippo/components/form/fields/react-tags.scss +170 -0
- data/client/hippo/components/form/fields/select-wrapper.jsx +2 -0
- data/client/hippo/components/form/fields/tags-wrapper.jsx +46 -0
- data/client/hippo/components/form/fields/text-wrapper.jsx +9 -1
- data/client/hippo/components/form/fields/textarea-wrapper.jsx +15 -0
- data/client/hippo/components/form/wrapper.jsx +21 -1
- data/client/hippo/components/help.jsx +21 -0
- data/client/hippo/components/master-detail.jsx +2 -0
- data/client/hippo/components/network-activity-overlay.jsx +3 -1
- data/client/hippo/components/popout-window.jsx +126 -0
- data/client/hippo/components/query-builder.jsx +9 -117
- data/client/hippo/components/query-builder/boolean-picker.jsx +28 -0
- data/client/hippo/components/query-builder/clause-filter.jsx +58 -0
- data/client/hippo/components/query-builder/clause.jsx +98 -0
- data/client/hippo/components/query-builder/date-picker.jsx +23 -0
- data/client/hippo/components/query-builder/query-builder.scss +7 -0
- data/client/hippo/components/record-finder.jsx +2 -0
- data/client/hippo/components/record-finder/query-layer.jsx +5 -1
- data/client/hippo/components/save-button.jsx +7 -1
- data/client/hippo/components/screen.jsx +2 -0
- data/client/hippo/components/text-editor.jsx +4 -5
- data/client/hippo/components/text-editor/display-modes/Button.jsx +5 -2
- data/client/hippo/components/text-editor/display-modes/ToggleEdit.jsx +2 -1
- data/client/hippo/components/text-editor/display-modes/ToggleInsert.jsx +2 -1
- data/client/hippo/components/text-editor/display-modes/ToggleLayout.jsx +2 -1
- data/client/hippo/components/text-editor/display-modes/TogglePreview.jsx +2 -1
- data/client/hippo/components/text-editor/display-modes/ToggleResize.jsx +2 -1
- data/client/hippo/components/text-editor/display-modes/index.js +7 -7
- data/client/hippo/components/text-editor/image-plugin/Component/Display/index.js +4 -2
- data/client/hippo/components/text-editor/image-plugin/Component/Form/index.js +2 -0
- data/client/hippo/components/text-editor/renderer.jsx +2 -0
- data/client/hippo/components/text-editor/text-editor.scss +13 -4
- data/client/hippo/components/time-zone-select.jsx +2 -0
- data/client/hippo/components/tool-tip.jsx +2 -0
- data/client/hippo/extensions/base.js +2 -0
- data/client/hippo/extensions/hippo.js +2 -0
- data/client/hippo/lib/__mocks__/request-assets.js +1 -2
- data/client/hippo/lib/bootstrap.js +2 -0
- data/client/hippo/lib/computed-properties.js +24 -0
- data/client/hippo/lib/date-range.js +13 -2
- data/client/hippo/lib/request-assets.js +3 -2
- data/client/hippo/lib/smooth-scroll.js +2 -0
- data/client/hippo/lib/util.js +1 -2
- data/client/hippo/models/asset.js +2 -0
- data/client/hippo/models/base.js +5 -2
- data/client/hippo/models/collection.js +2 -0
- data/client/hippo/models/config.js +3 -1
- data/client/hippo/models/pub_sub.js +2 -0
- data/client/hippo/models/pub_sub/channel.js +2 -0
- data/client/hippo/models/pub_sub/map.js +2 -0
- data/client/hippo/models/query.js +21 -12
- data/client/hippo/models/query/array-result.js +52 -16
- data/client/hippo/models/query/clause.js +11 -4
- data/client/hippo/models/query/field.js +2 -1
- data/client/hippo/models/query/info.js +7 -1
- data/client/hippo/models/query/operator.js +2 -0
- data/client/hippo/models/query/result.js +2 -0
- data/client/hippo/models/query/types.js +4 -0
- data/client/hippo/models/sync.js +2 -0
- data/client/hippo/models/system-setting.js +1 -15
- data/client/hippo/models/tenant.js +23 -7
- data/client/hippo/react/Root.jsx +2 -0
- data/client/hippo/react/component-not-found.jsx +2 -0
- data/client/hippo/screens/definition.js +2 -0
- data/client/hippo/screens/group.js +2 -0
- data/client/hippo/screens/instance.js +5 -1
- data/client/hippo/screens/system-settings.jsx +19 -5
- data/client/hippo/screens/system-settings/mailer-config.jsx +4 -2
- data/client/hippo/screens/system-settings/system-settings.scss +1 -1
- data/client/hippo/screens/system-settings/tenant.jsx +4 -2
- data/client/hippo/screens/user-management.jsx +2 -0
- data/client/hippo/screens/user-management/edit-form.jsx +2 -0
- data/client/hippo/testing/screens.js +10 -2
- data/client/hippo/user.js +4 -0
- data/client/hippo/workspace/index.jsx +3 -1
- data/client/hippo/workspace/menu-group.jsx +2 -0
- data/client/hippo/workspace/menu-option.jsx +2 -0
- data/client/hippo/workspace/menu.jsx +6 -3
- data/client/hippo/workspace/navbar.jsx +2 -0
- data/client/hippo/workspace/screen.jsx +2 -0
- data/client/hippo/workspace/styles.scss +5 -1
- data/command-reference-files/initial/.eslintrc.js +0 -3
- data/command-reference-files/initial/Gemfile +1 -1
- data/config/routes.rb +3 -1
- data/db/seed.rb +1 -1
- data/hippo-fw.gemspec +2 -2
- data/lib/hippo/api/controller_base.rb +2 -1
- data/lib/hippo/api/handlers/asset.rb +3 -2
- data/lib/hippo/api/handlers/tenant.rb +4 -6
- data/lib/hippo/api/helper_methods.rb +5 -7
- data/lib/hippo/api/route_set.rb +3 -2
- data/lib/hippo/asset.rb +4 -0
- data/lib/hippo/command/console.rb +1 -1
- data/lib/hippo/concerns/asset_uploader.rb +9 -4
- data/lib/hippo/concerns/queries.rb +3 -3
- data/lib/hippo/extension.rb +14 -4
- data/lib/hippo/extension/definition.rb +5 -1
- data/lib/hippo/logger.rb +26 -27
- data/lib/hippo/mailer.rb +19 -7
- data/lib/hippo/system_settings.rb +10 -4
- data/lib/hippo/templates/liquid.rb +1 -0
- data/lib/hippo/templates/liquid/pluralize.rb +16 -0
- data/lib/hippo/tenant.rb +17 -1
- data/lib/hippo/user.rb +10 -9
- data/lib/hippo/version.rb +1 -1
- data/lib/hippo/webpack.rb +22 -2
- data/package-lock.json +5462 -883
- data/package.json +9 -11
- data/spec/client/access/login-dialog.spec.jsx +2 -2
- data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +1 -1
- data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +1 -1
- data/spec/client/components/master-detail.spec.jsx +2 -1
- data/spec/client/components/query-builder.spec.jsx +3 -3
- data/spec/client/extension/base.spec.js +2 -0
- data/spec/client/models/base.spec.js +5 -3
- data/spec/client/models/query.spec.js +18 -6
- data/spec/client/models/sync.spec.js +2 -1
- data/spec/client/models/system-setting.spec.js +0 -12
- data/spec/client/screens/user-management.spec.jsx +1 -2
- data/spec/client/test-models.js +10 -0
- data/spec/server/api/tenant_change_spec.rb +1 -2
- data/spec/server/asset_spec.rb +2 -2
- data/templates/js/config-data.js +1 -1
- data/templates/spec/factories/model.rb +1 -1
- data/views/hippo_root_view.erb +1 -3
- metadata +17 -6
- data/client/hippo/components/text-editor/display-modes/SaveState.jsx +0 -17
@@ -15,11 +15,13 @@ import SaveButton from '../components/save-button';
|
|
15
15
|
import ScreenInstance from '../screens/instance';
|
16
16
|
import Extensions from '../extensions';
|
17
17
|
import MailerConfig from './system-settings/mailer-config';
|
18
|
+
import Config from '../config';
|
18
19
|
import TenantSettings from './system-settings/tenant';
|
19
20
|
import './system-settings/system-settings.scss';
|
20
21
|
|
21
22
|
@observer
|
22
23
|
export default class SystemSettings extends React.PureComponent {
|
24
|
+
|
23
25
|
@observable settings = new Settings();
|
24
26
|
extensionPanelRefs = new Map();
|
25
27
|
|
@@ -53,9 +55,20 @@ export default class SystemSettings extends React.PureComponent {
|
|
53
55
|
|
54
56
|
@action.bound
|
55
57
|
onSave() {
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
const saves = [];
|
59
|
+
['logo', 'print_logo'].forEach((attr) => {
|
60
|
+
if (this.settings[attr] && this.settings[attr].isDirty) {
|
61
|
+
saves.push(this.settings[attr].save());
|
62
|
+
}
|
63
|
+
});
|
64
|
+
Promise.all(saves).then(() => {
|
65
|
+
if (saves.length) {
|
66
|
+
Config.logo = this.settings.logo.file_data;
|
67
|
+
}
|
68
|
+
this.extensionPanelRefs.forEach(panel => invoke(panel, 'onSave'));
|
69
|
+
this.tenantSettings.onSave();
|
70
|
+
this.settings.save();
|
71
|
+
});
|
59
72
|
}
|
60
73
|
|
61
74
|
@action.bound
|
@@ -77,10 +90,10 @@ export default class SystemSettings extends React.PureComponent {
|
|
77
90
|
<TenantSettings ref={this.setTenantRef} />
|
78
91
|
<Heading tag="h3">Images</Heading>
|
79
92
|
<Row>
|
80
|
-
<Col sm={
|
93
|
+
<Col sm={6} xs={12}>
|
81
94
|
<Asset model={this.settings} name="logo" />
|
82
95
|
</Col>
|
83
|
-
<Col sm={
|
96
|
+
<Col sm={6} xs={12}>
|
84
97
|
<Asset model={this.settings} name="print_logo" />
|
85
98
|
</Col>
|
86
99
|
</Row>
|
@@ -92,4 +105,5 @@ export default class SystemSettings extends React.PureComponent {
|
|
92
105
|
</Screen>
|
93
106
|
);
|
94
107
|
}
|
108
|
+
|
95
109
|
}
|
@@ -8,6 +8,7 @@ import { Form, Field, FormState, nonBlank, validEmail } from 'hippo/components/
|
|
8
8
|
|
9
9
|
@observer
|
10
10
|
export default class MailerConfig extends React.PureComponent {
|
11
|
+
|
11
12
|
formState = new FormState()
|
12
13
|
|
13
14
|
@action.bound
|
@@ -32,11 +33,12 @@ export default class MailerConfig extends React.PureComponent {
|
|
32
33
|
<Heading tag="h3">Email settings</Heading>
|
33
34
|
<Form state={this.formState}>
|
34
35
|
<Row className="section">
|
35
|
-
<Field
|
36
|
-
<Field
|
36
|
+
<Field xs={6} name="from_email" label="From Email" validate={validEmail} />
|
37
|
+
<Field xs={6} name="from_name" label="From Name" validate={nonBlank} />
|
37
38
|
</Row>
|
38
39
|
</Form>
|
39
40
|
</div>
|
40
41
|
);
|
41
42
|
}
|
43
|
+
|
42
44
|
}
|
@@ -34,6 +34,7 @@ function TenantSlugChange({ oldSlug }) {
|
|
34
34
|
|
35
35
|
@observer
|
36
36
|
export default class TenantConfig extends React.PureComponent {
|
37
|
+
|
37
38
|
formState = new FormState()
|
38
39
|
|
39
40
|
@observable slugChangedFrom;
|
@@ -74,14 +75,15 @@ export default class TenantConfig extends React.PureComponent {
|
|
74
75
|
<Heading tag="h3">Account</Heading>
|
75
76
|
<Row>
|
76
77
|
<Field
|
77
|
-
|
78
|
+
xs={6} name="slug"
|
78
79
|
label="Identifier"
|
79
80
|
validate={nonBlank}
|
80
81
|
/>
|
81
|
-
<Field
|
82
|
+
<Field xs={6} name="name" validate={nonBlank} />
|
82
83
|
</Row>
|
83
84
|
{this.renderIdChangeWarning()}
|
84
85
|
</Form>
|
85
86
|
);
|
86
87
|
}
|
88
|
+
|
87
89
|
}
|
@@ -15,6 +15,7 @@ import Editor from './user-management/edit-form';
|
|
15
15
|
|
16
16
|
@observer
|
17
17
|
export default class UserManagement extends React.PureComponent {
|
18
|
+
|
18
19
|
@observable editingId;
|
19
20
|
|
20
21
|
static contextTypes = {
|
@@ -63,4 +64,5 @@ export default class UserManagement extends React.PureComponent {
|
|
63
64
|
</Screen>
|
64
65
|
);
|
65
66
|
}
|
67
|
+
|
66
68
|
}
|
@@ -15,6 +15,7 @@ import { Form, Field, FormState, nonBlank, validEmail, booleanValue } from '../.
|
|
15
15
|
|
16
16
|
@observer
|
17
17
|
export default class EditForm extends React.PureComponent {
|
18
|
+
|
18
19
|
static propTypes = {
|
19
20
|
query: PropTypes.instanceOf(Query).isRequired,
|
20
21
|
rowIndex: PropTypes.number.isRequired,
|
@@ -82,4 +83,5 @@ export default class EditForm extends React.PureComponent {
|
|
82
83
|
</Form>
|
83
84
|
);
|
84
85
|
}
|
86
|
+
|
85
87
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/* global jest */
|
2
2
|
|
3
3
|
import React from 'react';
|
4
|
+
import PropTypes from 'prop-types';
|
4
5
|
import SnapShot from 'react-test-renderer';
|
5
6
|
|
6
7
|
import Screens from 'hippo/screens';
|
@@ -14,6 +15,7 @@ export function getScreenInstance(screenId) {
|
|
14
15
|
|
15
16
|
|
16
17
|
class TestRouter {
|
18
|
+
|
17
19
|
constructor() {
|
18
20
|
Object.assign(this, {
|
19
21
|
isActive: jest.fn(),
|
@@ -26,6 +28,7 @@ class TestRouter {
|
|
26
28
|
}),
|
27
29
|
});
|
28
30
|
}
|
31
|
+
|
29
32
|
}
|
30
33
|
|
31
34
|
function makeContext() {
|
@@ -36,28 +39,33 @@ function makeContext() {
|
|
36
39
|
|
37
40
|
function childContextTypes() {
|
38
41
|
return {
|
39
|
-
router:
|
42
|
+
router: PropTypes.object,
|
40
43
|
};
|
41
44
|
}
|
42
45
|
|
43
46
|
export class Context {
|
47
|
+
|
44
48
|
constructor() {
|
45
49
|
this.childContextTypes = childContextTypes();
|
46
50
|
this.context = makeContext();
|
47
51
|
}
|
52
|
+
|
48
53
|
}
|
49
54
|
|
50
55
|
export function Snapshot(el) {
|
51
56
|
class Wrapper extends React.Component {
|
57
|
+
|
52
58
|
static childContextTypes = childContextTypes();
|
53
59
|
|
54
60
|
getChildContext() {
|
55
|
-
|
61
|
+
if (!this._childContext) { this._childContext = makeContext(); }
|
62
|
+
return this._childContext;
|
56
63
|
}
|
57
64
|
|
58
65
|
render() {
|
59
66
|
return el;
|
60
67
|
}
|
68
|
+
|
61
69
|
}
|
62
70
|
const snapshot = SnapShot.create(React.createElement(Wrapper, {}, el));
|
63
71
|
return snapshot.toJSON();
|
data/client/hippo/user.js
CHANGED
@@ -10,6 +10,7 @@ import Config from './config';
|
|
10
10
|
|
11
11
|
@identifiedBy('hippo/user-session')
|
12
12
|
class Session extends BaseModel {
|
13
|
+
|
13
14
|
@identifier id;
|
14
15
|
@field login;
|
15
16
|
@field password;
|
@@ -21,12 +22,14 @@ class Session extends BaseModel {
|
|
21
22
|
get syncData() {
|
22
23
|
return this.serialize();
|
23
24
|
}
|
25
|
+
|
24
26
|
}
|
25
27
|
|
26
28
|
const ADMIN = 'administrator';
|
27
29
|
|
28
30
|
@identifiedBy('hippo/user')
|
29
31
|
export class UserModel extends BaseModel {
|
32
|
+
|
30
33
|
@identifier({ type: 'number' }) id;
|
31
34
|
@field login;
|
32
35
|
@field name;
|
@@ -83,6 +86,7 @@ export class UserModel extends BaseModel {
|
|
83
86
|
toJSON() {
|
84
87
|
return merge(this.serialize(), { is_admin: this.is_admin });
|
85
88
|
}
|
89
|
+
|
86
90
|
}
|
87
91
|
|
88
92
|
const current_user = new UserModel();
|
@@ -35,6 +35,7 @@ function NoMatch({ match: { path } }) {
|
|
35
35
|
|
36
36
|
@observer
|
37
37
|
class Workspace extends React.Component {
|
38
|
+
|
38
39
|
@observable sidebarOpen = true;
|
39
40
|
@observable sidebarDocked = false;
|
40
41
|
|
@@ -69,7 +70,7 @@ class Workspace extends React.Component {
|
|
69
70
|
<App centered={false}>
|
70
71
|
<LoginDialog />
|
71
72
|
<Sidebar
|
72
|
-
styles={{ sidebar: { zIndex:
|
73
|
+
styles={{ sidebar: { zIndex: 60 }, overlay: { zIndex: 59 } }}
|
73
74
|
sidebar={<Menu
|
74
75
|
isOpen={this.sidebarOpen}
|
75
76
|
isDocked={this.sidebarDocked}
|
@@ -94,6 +95,7 @@ class Workspace extends React.Component {
|
|
94
95
|
</App>
|
95
96
|
);
|
96
97
|
}
|
98
|
+
|
97
99
|
}
|
98
100
|
|
99
101
|
export default function WorkspaceRoot() {
|
@@ -11,6 +11,7 @@ import Icon from '../components/icon';
|
|
11
11
|
|
12
12
|
@observer
|
13
13
|
export default class Group extends React.PureComponent {
|
14
|
+
|
14
15
|
static propTypes = {
|
15
16
|
group: PropTypes.shape({
|
16
17
|
active: PropTypes.bool.isRequired,
|
@@ -33,4 +34,5 @@ export default class Group extends React.PureComponent {
|
|
33
34
|
</Menu>
|
34
35
|
);
|
35
36
|
}
|
37
|
+
|
36
38
|
}
|
@@ -7,6 +7,7 @@ import Icon from '../components/icon';
|
|
7
7
|
|
8
8
|
@observer
|
9
9
|
export default class MenuOption extends React.Component {
|
10
|
+
|
10
11
|
static propTypes = {
|
11
12
|
screen: PropTypes.shape({
|
12
13
|
title: PropTypes.string.isRequired,
|
@@ -33,4 +34,5 @@ export default class MenuOption extends React.Component {
|
|
33
34
|
</Anchor>
|
34
35
|
);
|
35
36
|
}
|
37
|
+
|
36
38
|
}
|
@@ -4,7 +4,6 @@ import { action } from 'mobx';
|
|
4
4
|
import { isEmpty, get } from 'lodash';
|
5
5
|
import PropTypes from 'prop-types';
|
6
6
|
import Box from 'grommet/components/Box';
|
7
|
-
import Sidebar from 'grommet/components/Sidebar';
|
8
7
|
import Button from 'grommet/components/Button';
|
9
8
|
import CloseIcon from 'grommet/components/icons/base/Close';
|
10
9
|
import Header from 'grommet/components/Header';
|
@@ -20,6 +19,7 @@ import Asset from '../models/asset';
|
|
20
19
|
|
21
20
|
@observer
|
22
21
|
class Logout extends React.PureComponent {
|
22
|
+
|
23
23
|
static contextTypes = {
|
24
24
|
router: PropTypes.object,
|
25
25
|
}
|
@@ -43,6 +43,7 @@ class Logout extends React.PureComponent {
|
|
43
43
|
</Menu>
|
44
44
|
);
|
45
45
|
}
|
46
|
+
|
46
47
|
}
|
47
48
|
|
48
49
|
const Logo = observer(() => {
|
@@ -59,6 +60,7 @@ const Logo = observer(() => {
|
|
59
60
|
|
60
61
|
@observer
|
61
62
|
export default class WorkspaceMenu extends React.PureComponent {
|
63
|
+
|
62
64
|
renderUnGrouped() {
|
63
65
|
if (!User.isLoggedIn || isEmpty(Screens.unGrouped)) { return null; }
|
64
66
|
return (
|
@@ -77,7 +79,7 @@ export default class WorkspaceMenu extends React.PureComponent {
|
|
77
79
|
|
78
80
|
render() {
|
79
81
|
return (
|
80
|
-
<
|
82
|
+
<Box
|
81
83
|
full size="small" separator="right"
|
82
84
|
colorIndex="brand"
|
83
85
|
className="screen-selection-menu"
|
@@ -89,7 +91,8 @@ export default class WorkspaceMenu extends React.PureComponent {
|
|
89
91
|
{Screens.activeGroups.map(g => <Group key={g.id} group={g} />)}
|
90
92
|
{this.renderUnGrouped()}
|
91
93
|
<Logout />
|
92
|
-
</
|
94
|
+
</Box>
|
93
95
|
);
|
94
96
|
}
|
97
|
+
|
95
98
|
}
|
@@ -13,6 +13,7 @@ function Logo() {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
export default class Navbar extends React.Component {
|
16
|
+
|
16
17
|
static contextTypes = {
|
17
18
|
uistate: PropTypes.object.isRequired,
|
18
19
|
}
|
@@ -42,4 +43,5 @@ export default class Navbar extends React.Component {
|
|
42
43
|
</div>
|
43
44
|
);
|
44
45
|
}
|
46
|
+
|
45
47
|
}
|
@@ -15,6 +15,7 @@ ScreenView.displayName = 'ScreenView';
|
|
15
15
|
|
16
16
|
@observer
|
17
17
|
export default class Screen extends React.Component {
|
18
|
+
|
18
19
|
static propTypes = {
|
19
20
|
match: PropTypes.shape({
|
20
21
|
params: PropTypes.shape({
|
@@ -46,4 +47,5 @@ export default class Screen extends React.Component {
|
|
46
47
|
|
47
48
|
);
|
48
49
|
}
|
50
|
+
|
49
51
|
}
|
@@ -6,7 +6,10 @@
|
|
6
6
|
flex-direction: column;
|
7
7
|
padding: 0.5rem;
|
8
8
|
display: none;
|
9
|
+
|
10
|
+
|
9
11
|
min-height: min-content; min-height: -moz-min-content; min-height: -webkit-min-content;
|
12
|
+
|
10
13
|
&.is-active {
|
11
14
|
display: flex;
|
12
15
|
}
|
@@ -30,11 +33,12 @@
|
|
30
33
|
}
|
31
34
|
|
32
35
|
.screen-selection-menu {
|
36
|
+
min-width: 250px;
|
33
37
|
.grommetux-anchor > .icon {
|
34
38
|
margin-right: 0.5rem;
|
35
39
|
}
|
36
40
|
}
|
37
41
|
|
38
42
|
.screens-wrapper {
|
39
|
-
overflow:
|
43
|
+
overflow: auto
|
40
44
|
}
|
data/config/routes.rb
CHANGED
data/db/seed.rb
CHANGED
@@ -3,7 +3,7 @@ system.perform do
|
|
3
3
|
Hippo::User.seed_admin_account
|
4
4
|
end
|
5
5
|
|
6
|
-
testing = Hippo::Tenant.find_or_create_by(slug: '
|
6
|
+
testing = Hippo::Tenant.find_or_create_by(slug: 'dev', name: 'dev testing tenant', email: 'test@test.com')
|
7
7
|
|
8
8
|
testing.perform do
|
9
9
|
Hippo::User.seed_admin_account
|
data/hippo-fw.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.license = "MIT"
|
19
19
|
|
20
20
|
spec.files = `git ls-files`.split($/)
|
21
|
-
spec.executables =
|
21
|
+
spec.executables = ['hippo']
|
22
22
|
spec.test_files = spec.files.grep(%r{^test/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
@@ -72,7 +72,7 @@ Gem::Specification.new do |spec|
|
|
72
72
|
spec.add_dependency "require_all", "~> 1.3"
|
73
73
|
spec.add_dependency "resque", "~> 1.27"
|
74
74
|
spec.add_dependency "sanitize", "~> 3.0"
|
75
|
-
spec.add_dependency "webpack_driver", "~> 0.
|
75
|
+
spec.add_dependency "webpack_driver", "~> 0.4.1"
|
76
76
|
spec.add_dependency "knitter", "~> 0.2.2"
|
77
77
|
|
78
78
|
spec.add_dependency "thor", "~> 0.19"
|
@@ -132,7 +132,7 @@ module Hippo
|
|
132
132
|
|
133
133
|
# Should the result include the total number of available records
|
134
134
|
def should_include_total_count?
|
135
|
-
requested_limit && params[:
|
135
|
+
requested_limit && params[:id].blank?
|
136
136
|
end
|
137
137
|
|
138
138
|
# Extract options that are suitable for use in 'as_json'
|
@@ -291,6 +291,7 @@ module Hippo
|
|
291
291
|
when 'lt' then field.lt(value)
|
292
292
|
when 'in' then field.in(Range.new(*value))
|
293
293
|
when 'gt' then field.gt(value)
|
294
|
+
when 'between' then field.between(Range.new(*value.split('...')))
|
294
295
|
else
|
295
296
|
value =~ /%/ ? field.matches(value) : field.eq(value)
|
296
297
|
end
|