lanes 0.1.9.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Rakefile +1 -1
- data/client/lanes/Boot.cjsx +3 -3
- data/client/lanes/Config.coffee +38 -3
- data/client/lanes/access/Extension.coffee +1 -1
- data/client/lanes/access/LoginDialog.cjsx +57 -47
- data/client/lanes/access/Roles.coffee +2 -2
- data/client/lanes/access/User.coffee +4 -3
- data/client/lanes/access/screens/user-management/UserManagement.cjsx +12 -11
- data/client/lanes/components/calendar/Calendar.cjsx +16 -0
- data/client/lanes/components/calendar/index.js +3 -0
- data/client/lanes/components/calendar/styles.scss +3 -0
- data/client/lanes/components/grid/Body.cjsx +86 -0
- data/client/lanes/components/grid/CellStyles.coffee +20 -0
- data/client/lanes/components/grid/EditingMixin.cjsx +84 -24
- data/client/lanes/components/grid/Editor.cjsx +45 -0
- data/client/lanes/components/grid/Grid.cjsx +62 -104
- data/client/lanes/components/grid/Header.cjsx +35 -0
- data/client/lanes/components/grid/PopOverMixin.cjsx +19 -9
- data/client/lanes/components/grid/PopoverEditor.cjsx +7 -1
- data/client/lanes/components/grid/RowEditor.cjsx +1 -1
- data/client/lanes/components/grid/Selections.cjsx +39 -0
- data/client/lanes/components/grid/Toolbar.cjsx +24 -5
- data/client/lanes/components/grid/editors.scss +22 -50
- data/client/lanes/components/grid/index.js +0 -1
- data/client/lanes/components/grid/row-editor.scss +68 -0
- data/client/lanes/components/grid/styles.scss +79 -3
- data/client/lanes/components/modal/Modal.cjsx +64 -24
- data/client/lanes/components/modal/styles.scss +12 -0
- data/client/lanes/components/record-finder/Clause.cjsx +11 -4
- data/client/lanes/components/record-finder/Dialog.cjsx +23 -24
- data/client/lanes/components/record-finder/RecordFinder.cjsx +45 -14
- data/client/lanes/components/record-finder/styles.scss +9 -6
- data/client/lanes/components/select-field/SelectField.cjsx +108 -53
- data/client/lanes/components/select-field/styles.scss +19 -0
- data/client/lanes/components/shared/ControlLabel.cjsx +45 -0
- data/client/lanes/components/shared/DateTime.cjsx +48 -0
- data/client/lanes/components/shared/DisplayValue.cjsx +16 -0
- data/client/lanes/components/shared/FieldMixin.cjsx +54 -23
- data/client/lanes/components/shared/FieldSet.cjsx +12 -35
- data/client/lanes/components/shared/FieldWrapper.cjsx +13 -0
- data/client/lanes/components/shared/FormGroup.cjsx +37 -0
- data/client/lanes/components/shared/Icon.cjsx +20 -0
- data/client/lanes/components/shared/ImageSaver.cjsx +33 -0
- data/client/lanes/components/shared/Input.cjsx +19 -0
- data/client/lanes/components/shared/InputFieldMixin.cjsx +48 -0
- data/client/lanes/components/shared/JobProgress.cjsx +27 -0
- data/client/lanes/components/shared/NetworkActivityOverlay.cjsx +58 -0
- data/client/lanes/components/shared/NumberInput.cjsx +29 -0
- data/client/lanes/components/shared/ResizeSensor.cjsx +11 -0
- data/client/lanes/components/shared/ScreenWrapper.cjsx +13 -0
- data/client/lanes/components/shared/Throbber.cjsx +3 -0
- data/client/lanes/components/shared/ToggleField.cjsx +33 -0
- data/client/lanes/components/shared/Tooltip.cjsx +2 -2
- data/client/lanes/components/shared/fields.scss +75 -13
- data/client/lanes/components/shared/fieldset.scss +3 -5
- data/client/lanes/components/shared/image-saver.scss +38 -0
- data/client/lanes/components/shared/index.js +2 -0
- data/client/lanes/{styles/plugins → components/shared}/overlay.scss +17 -4
- data/client/lanes/components/shared/resize-sensor.scss +30 -0
- data/client/lanes/components/shared/styles.scss +13 -0
- data/client/lanes/components/shared/throbber.scss +53 -0
- data/client/lanes/components/toolbar/RemoteChangeSets.cjsx +21 -48
- data/client/lanes/components/toolbar/SaveButton.cjsx +24 -0
- data/client/lanes/components/toolbar/Toolbar.cjsx +24 -37
- data/client/lanes/components/toolbar/changes-notification.scss +10 -6
- data/client/lanes/components/toolbar/styles.scss +29 -9
- data/client/lanes/extension/Base.coffee +4 -5
- data/client/lanes/index.js +0 -1
- data/client/lanes/index.scss.erb +10 -1
- data/client/lanes/lib/HotReload.coffee +13 -15
- data/client/lanes/lib/MakeBaseClass.coffee +6 -1
- data/client/lanes/lib/development.coffee +2 -0
- data/client/lanes/lib/dom-polyfills.coffee +5 -0
- data/client/lanes/lib/dom.coffee +38 -9
- data/client/lanes/lib/format.coffee +11 -0
- data/client/lanes/lib/index.js.erb +2 -0
- data/client/lanes/lib/production.coffee +6 -0
- data/client/lanes/lib/utilFunctions.coffee +50 -15
- data/client/lanes/models/AssociationMap.coffee +122 -46
- data/client/lanes/models/AssociationProxy.coffee +147 -0
- data/client/lanes/models/Base.coffee +97 -85
- data/client/lanes/models/ChangeMonitor.coffee +7 -3
- data/client/lanes/models/ChangeSet.coffee +2 -2
- data/client/lanes/models/Collection.coffee +49 -6
- data/client/lanes/models/JobStatus.coffee +32 -0
- data/client/lanes/models/PubSub.coffee +7 -5
- data/client/lanes/models/Query.coffee +115 -34
- data/client/lanes/models/ServerCache.coffee +67 -52
- data/client/lanes/models/State.coffee +97 -0
- data/client/lanes/models/Sync.coffee +18 -13
- data/client/lanes/models/SystemSettings.coffee +0 -0
- data/client/lanes/models/index.js +1 -0
- data/client/lanes/models/mixins/FileSupport.coffee +60 -0
- data/client/lanes/models/mixins/HasCodeField.coffee +13 -6
- data/client/lanes/models/query/ArrayResult.coffee +188 -0
- data/client/lanes/models/query/CollectionResult.coffee +71 -0
- data/client/lanes/models/query/Result.coffee +9 -0
- data/client/lanes/react/Component.coffee +7 -3
- data/client/lanes/react/PubSub.coffee +7 -7
- data/client/lanes/react/Root.cjsx +1 -4
- data/client/lanes/react/Screen.coffee +1 -0
- data/client/lanes/react/TypeValidators.coffee +3 -3
- data/client/lanes/react/Viewport.coffee +41 -7
- data/client/lanes/react/index.js +0 -1
- data/client/lanes/react/mixins/Access.coffee +4 -1
- data/client/lanes/react/mixins/Data.coffee +40 -25
- data/client/lanes/react/mixins/FieldErrors.coffee +27 -0
- data/client/lanes/react/mixins/RelayEditingState.coffee +4 -0
- data/client/lanes/react/mixins/Screen.coffee +14 -0
- data/client/lanes/react/mixins/Viewport.coffee +9 -3
- data/client/lanes/screens/ChangeListener.coffee +3 -3
- data/client/lanes/screens/Commands.coffee +14 -7
- data/client/lanes/screens/CommonComponents.cjsx +20 -0
- data/client/lanes/screens/Definitions.coffee +64 -20
- data/client/lanes/screens/SystemSettings.cjsx +56 -0
- data/client/lanes/screens/UserPreferences.cjsx +38 -0
- data/client/lanes/screens/index.js +3 -0
- data/client/lanes/screens/styles.scss +2 -1
- data/client/lanes/styles/fonts.scss +1 -0
- data/client/lanes/styles/global.scss +2 -1
- data/client/lanes/styles/global/flexbox.scss +16 -0
- data/client/lanes/styles/global/styles.scss +1 -0
- data/client/lanes/styles/mixins/_dropdown.scss +21 -0
- data/client/lanes/styles/mixins/_flexbox.scss +394 -0
- data/client/lanes/styles/mixins/all.scss +2 -0
- data/client/lanes/styles/variables.scss +28 -0
- data/client/lanes/testing/BeforeEach.coffee +15 -14
- data/client/lanes/testing/Helpers.coffee +14 -5
- data/client/lanes/testing/TestObjects.coffee +10 -2
- data/client/lanes/testing/index.js +1 -0
- data/client/lanes/testing/jasmine-react.js +125 -0
- data/client/lanes/vendor/base.js +56049 -74987
- data/client/lanes/vendor/calendar.js +17301 -0
- data/client/lanes/vendor/calendar.scss +303 -0
- data/client/lanes/vendor/commons.js +14990 -15847
- data/client/lanes/vendor/development.js +4912 -1952
- data/client/lanes/vendor/grid.js +14246 -5551
- data/client/lanes/vendor/grid.scss +876 -335
- data/client/lanes/vendor/index.js +1 -0
- data/client/lanes/vendor/message-bus-ajax.js +44 -0
- data/client/lanes/vendor/message-bus.js +414 -0
- data/client/lanes/vendor/rw-widgets.eot +0 -0
- data/client/lanes/vendor/rw-widgets.svg +18 -0
- data/client/lanes/vendor/rw-widgets.ttf +0 -0
- data/client/lanes/vendor/rw-widgets.woff +0 -0
- data/client/lanes/vendor/toggle.js +345 -0
- data/client/lanes/vendor/toggle.scss +138 -0
- data/client/lanes/vendor/widgets.js +21245 -6839
- data/client/lanes/vendor/widgets.scss +83 -67
- data/client/lanes/workspace/Layout.cjsx +18 -8
- data/client/lanes/workspace/Modal.cjsx +47 -0
- data/client/lanes/workspace/Navbar.cjsx +16 -2
- data/client/lanes/workspace/ScreenView.cjsx +10 -3
- data/client/lanes/workspace/ScreensMenu.cjsx +23 -7
- data/client/lanes/workspace/Tabs.cjsx +55 -0
- data/client/lanes/workspace/UIState.coffee +7 -8
- data/client/lanes/workspace/index.js +2 -1
- data/client/lanes/workspace/mixin.coffee +11 -0
- data/client/lanes/workspace/mixins/UIState.coffee +8 -0
- data/client/lanes/workspace/mixins/index.js +3 -0
- data/client/lanes/workspace/styles.scss +2 -1
- data/client/lanes/workspace/styles/header.scss +23 -1
- data/client/lanes/workspace/styles/layout.scss +26 -24
- data/client/lanes/workspace/styles/screens.scss +0 -4
- data/client/lanes/workspace/styles/tabs.scss +3 -10
- data/config/routes.rb +10 -4
- data/config/screens.rb +25 -0
- data/db/migrate/01_create_system_settings.rb +10 -0
- data/docs/todo-example-part-1.md +18 -20
- data/lanes.gemspec +15 -6
- data/lib/lanes.rb +4 -2
- data/lib/lanes/access/config/routes.rb +5 -3
- data/lib/lanes/access/config/screens.rb +1 -0
- data/lib/lanes/access/db/migrate/20140615031600_create_lanes_users.rb +1 -1
- data/lib/lanes/access/user.rb +1 -1
- data/lib/lanes/api.rb +2 -1
- data/lib/lanes/api/controller.rb +32 -71
- data/lib/lanes/api/default_routes.rb +10 -8
- data/lib/lanes/api/formatted_reply.rb +53 -0
- data/lib/lanes/api/handlers/file.rb +26 -0
- data/lib/lanes/api/helper_methods.rb +29 -5
- data/lib/lanes/api/javascript_processor.rb +36 -17
- data/lib/lanes/api/pub_sub.rb +6 -9
- data/lib/lanes/api/request_wrapper.rb +1 -2
- data/lib/lanes/api/root.rb +11 -43
- data/lib/lanes/api/routing.rb +63 -0
- data/lib/lanes/api/sprockets_extension.rb +15 -7
- data/lib/lanes/api/updates.rb +1 -2
- data/lib/lanes/command.rb +0 -1
- data/lib/lanes/command/app.rb +6 -5
- data/lib/lanes/command/console.rb +1 -0
- data/lib/lanes/command/generate.rb +3 -0
- data/lib/lanes/command/generate_migration.rb +33 -0
- data/lib/lanes/command/generate_model.rb +4 -26
- data/lib/lanes/command/migration_support.rb +29 -0
- data/lib/lanes/command/update_model.rb +14 -5
- data/lib/lanes/concerns/all.rb +2 -0
- data/lib/lanes/concerns/api_path.rb +4 -2
- data/lib/lanes/concerns/association_extensions.rb +1 -1
- data/lib/lanes/concerns/attr_accessor_with_default.rb +3 -1
- data/lib/lanes/concerns/code_identifier.rb +1 -1
- data/lib/lanes/concerns/image_uploader.rb +42 -0
- data/lib/lanes/concerns/pub_sub.rb +0 -1
- data/lib/lanes/concerns/queries.rb +2 -2
- data/lib/lanes/concerns/set_attribute_data.rb +4 -13
- data/lib/lanes/concerns/sorting_expressions.rb +34 -0
- data/lib/lanes/configuration.rb +48 -9
- data/lib/lanes/extension.rb +16 -7
- data/lib/lanes/extension/definition.rb +8 -2
- data/lib/lanes/job.rb +78 -0
- data/lib/lanes/job/failure_logger.rb +33 -0
- data/lib/lanes/model.rb +4 -0
- data/lib/lanes/rake_tasks.rb +6 -0
- data/lib/lanes/redis.rb +13 -0
- data/lib/lanes/screen.rb +34 -18
- data/lib/lanes/system_settings.rb +66 -0
- data/lib/lanes/version.rb +1 -1
- data/lib/lanes/workspace/extension.rb +1 -1
- data/npm-build/base.js +10 -3
- data/npm-build/calendar.js +6 -0
- data/npm-build/development.js +4 -5
- data/npm-build/grid.js +3 -5
- data/npm-build/package.json +40 -29
- data/npm-build/react-toggle.js +5 -0
- data/npm-build/react-widgets.js +6 -0
- data/npm-build/update-dayz +14 -0
- data/npm-build/webpack.config.js +5 -2
- data/spec/command-reference-files/initial/Gemfile +1 -1
- data/spec/command-reference-files/initial/config/routes.rb +2 -0
- data/spec/command-reference-files/initial/lib/appy-app.rb +4 -0
- data/spec/command-reference-files/initial/lib/appy-app/extension.rb +2 -0
- data/spec/command-reference-files/initial/spec/server/{spec_helpers.rb → spec_helper.rb} +0 -0
- data/spec/command-reference-files/model/config/routes.rb +2 -0
- data/spec/command-reference-files/model/spec/server/test_test_spec.rb +1 -1
- data/spec/command-reference-files/screen/client/appy-app/screens/ready-set-go/ReadySetGo.cjsx +6 -4
- data/spec/command-reference-files/screen/client/appy-app/screens/ready-set-go/index.scss +4 -3
- data/spec/command-reference-files/screen/config/screens.rb +4 -2
- data/spec/command-reference-files/screen/spec/appy-app/screens/ready-set-go/ReadySetGoSpec.coffee +1 -1
- data/spec/fixtures/system_settings.yml +1 -0
- data/spec/lanes/components/grid/GridSpec.coffee +56 -31
- data/spec/lanes/components/grid/RowEditorSpec.coffee +96 -0
- data/spec/lanes/components/select-field/SelectFieldSpec.coffee +99 -0
- data/spec/lanes/components/shared/NetworkActivityOverlaySpec.coffee +34 -0
- data/spec/lanes/models/AssociationMapSpec.coffee +36 -2
- data/spec/lanes/models/AssociationProxySpec.coffee +77 -0
- data/spec/lanes/models/BaseSpec.coffee +37 -4
- data/spec/lanes/models/CollectionSpec.coffee +11 -17
- data/spec/lanes/models/PubSubSpec.coffee +1 -1
- data/spec/lanes/models/ServerCacheSpec.coffee +65 -0
- data/spec/server/api/coffeescript_processor_spec.rb +1 -1
- data/spec/server/concerns/pub_sub_spec.rb +9 -10
- data/spec/server/concerns/sorting_expressions_spec.rb +34 -0
- data/spec/server/configuration_spec.rb +3 -3
- data/spec/server/job_spec.rb +54 -0
- data/spec/server/spec_helper.rb +0 -5
- data/spec/server/system_settings_spec.rb +23 -0
- data/templates/client/screens/Screen.cjsx +6 -4
- data/templates/client/screens/styles.scss +4 -3
- data/templates/config/routes.rb +2 -0
- data/templates/config/screen.rb +4 -2
- data/templates/lib/namespace.rb +4 -0
- data/templates/lib/namespace/extension.rb +2 -0
- data/templates/spec/client/Screen.coffee +1 -1
- data/templates/spec/server/model_spec.rb +1 -1
- data/templates/spec/server/{spec_helpers.rb → spec_helper.rb} +0 -0
- data/views/lanes_root_view.erb +70 -0
- data/views/specs.erb +2 -2
- metadata +207 -68
- data/client/images/lanes/dataTables/Sorting icons.psd +0 -0
- data/client/images/lanes/dataTables/back_disabled.png +0 -0
- data/client/images/lanes/dataTables/back_enabled.png +0 -0
- data/client/images/lanes/dataTables/back_enabled_hover.png +0 -0
- data/client/images/lanes/dataTables/favicon.ico +0 -0
- data/client/images/lanes/dataTables/forward_disabled.png +0 -0
- data/client/images/lanes/dataTables/forward_enabled.png +0 -0
- data/client/images/lanes/dataTables/forward_enabled_hover.png +0 -0
- data/client/images/lanes/dataTables/loading-background.png +0 -0
- data/client/images/lanes/dataTables/sort_asc.png +0 -0
- data/client/images/lanes/dataTables/sort_asc_disabled.png +0 -0
- data/client/images/lanes/dataTables/sort_both.png +0 -0
- data/client/images/lanes/dataTables/sort_desc.png +0 -0
- data/client/images/lanes/dataTables/sort_desc_disabled.png +0 -0
- data/client/lanes/components/shared/Resize.cjsx +0 -152
- data/client/lanes/components/shared/TextArea.cjsx +0 -19
- data/client/lanes/components/shared/TextField.cjsx +0 -25
- data/client/lanes/models/Bootstrap.coffee +0 -5
- data/client/lanes/models/QueryResults.coffee +0 -93
- data/client/lanes/react/FormBindings.coffee +0 -103
- data/client/lanes/react/Router.cjsx +0 -18
- data/client/lanes/styles/dataTables.scss +0 -4
- data/client/lanes/styles/plugins/all.scss +0 -2
- data/client/lanes/styles/plugins/resize-sensor.scss +0 -24
- data/client/lanes/vendor/jquery-2.js +0 -9190
- data/client/lanes/vendor/jquery.tap.js +0 -401
- data/client/lanes/vendor/magicsuggest.js +0 -1565
- data/client/lanes/vendor/message-bus.coffee +0 -264
- data/client/lanes/workspace/ActiveScreenSwitcher.cjsx +0 -38
- data/client/lanes/workspace/styles/toolbar.scss +0 -4
- data/lib/lanes/api/eco.js +0 -516
- data/lib/lanes/api/sprockets_compressor.rb +0 -39
- data/spec/command-reference-files/model/lib/appy-app.rb +0 -11
- data/views/index.erb +0 -19
@@ -0,0 +1,30 @@
|
|
1
|
+
.lanes-resize-sensor {
|
2
|
+
|
3
|
+
position: relative;
|
4
|
+
|
5
|
+
.resize-triggers {
|
6
|
+
visibility: hidden;
|
7
|
+
|
8
|
+
&,
|
9
|
+
> div,
|
10
|
+
.contract-trigger:before {
|
11
|
+
content: " ";
|
12
|
+
display: block;
|
13
|
+
position: absolute;
|
14
|
+
top: 0;
|
15
|
+
left: 0;
|
16
|
+
height: 100%;
|
17
|
+
width: 100%;
|
18
|
+
overflow: hidden;
|
19
|
+
}
|
20
|
+
|
21
|
+
> div {
|
22
|
+
overflow: auto;
|
23
|
+
}
|
24
|
+
|
25
|
+
.contract-trigger:before {
|
26
|
+
width: 200%;
|
27
|
+
height: 200%;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
@import "./fields";
|
2
2
|
@import "./fieldset";
|
3
|
+
@import "./resize-sensor";
|
4
|
+
@import "./overlay";
|
5
|
+
@import "./image-saver";
|
6
|
+
@import "./throbber";
|
7
|
+
@import "lanes/vendor/toggle";
|
3
8
|
|
4
9
|
.record-finder {
|
5
10
|
.icon { cursor: pointer; }
|
@@ -30,3 +35,11 @@
|
|
30
35
|
display: inline;
|
31
36
|
}
|
32
37
|
}
|
38
|
+
|
39
|
+
.job-executing {
|
40
|
+
display: flex;
|
41
|
+
flex-direction: column;
|
42
|
+
align-items: center;
|
43
|
+
justify-content: center;
|
44
|
+
.progress { width: 100%; }
|
45
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
$throbber-color: #dde2e7 !default;
|
2
|
+
$throbber-highlight-color: #6b9dc8 !default;
|
3
|
+
$throbber-height: 1.5em !default;
|
4
|
+
$throbber-segment-width: 0.9em !default;
|
5
|
+
$throbber-spacing: 0.7em !default;
|
6
|
+
|
7
|
+
@mixin keyframes($name) {
|
8
|
+
@-webkit-keyframes #{$name} { @content }
|
9
|
+
@-moz-keyframes #{$name} { @content }
|
10
|
+
@-o-keyframes #{$name} { @content }
|
11
|
+
@keyframes #{$name} { @content }
|
12
|
+
}
|
13
|
+
|
14
|
+
@include keyframes(throbber) {
|
15
|
+
0% { background: $throbber-color }
|
16
|
+
10% { background: $throbber-highlight-color }
|
17
|
+
40% { background: $throbber-color }
|
18
|
+
}
|
19
|
+
|
20
|
+
/* Styles for old versions of IE */
|
21
|
+
.throbber {
|
22
|
+
font-family: sans-serif;
|
23
|
+
font-weight: 100;
|
24
|
+
animation: throbber 2000ms 300ms infinite ease-out;
|
25
|
+
background: $throbber-color;
|
26
|
+
display: inline-block;
|
27
|
+
position: relative;
|
28
|
+
text-indent: -9999px;
|
29
|
+
width: $throbber-segment-width;
|
30
|
+
height: $throbber-height;
|
31
|
+
margin: 0 ($throbber-segment-width + $throbber-spacing);
|
32
|
+
|
33
|
+
&:before,
|
34
|
+
&:after {
|
35
|
+
background: $throbber-color;
|
36
|
+
content: '\x200B';
|
37
|
+
display: inline-block;
|
38
|
+
width: $throbber-segment-width;
|
39
|
+
height: $throbber-height;
|
40
|
+
position: absolute;
|
41
|
+
top: 0;
|
42
|
+
}
|
43
|
+
|
44
|
+
&:before {
|
45
|
+
animation: throbber 2000ms 150ms infinite ease-out;
|
46
|
+
left: -($throbber-segment-width + $throbber-spacing);
|
47
|
+
}
|
48
|
+
|
49
|
+
&:after {
|
50
|
+
animation: throbber 2000ms 450ms infinite ease-out;
|
51
|
+
right: -($throbber-segment-width + $throbber-spacing);
|
52
|
+
}
|
53
|
+
}
|
@@ -1,23 +1,31 @@
|
|
1
1
|
class Change extends Lanes.React.Component
|
2
2
|
|
3
3
|
renderField: (field) ->
|
4
|
-
<
|
5
|
-
<
|
6
|
-
<
|
7
|
-
|
4
|
+
<div className='change' key={field.name}>
|
5
|
+
<div className="field">{@model.record_name} {_.field2title field.name}:</div>
|
6
|
+
<div className="from">{field.from}</div>
|
7
|
+
<div className='to'>{field.to}</div>
|
8
|
+
</div>
|
8
9
|
|
9
10
|
render: ->
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
11
|
+
user =
|
12
|
+
if @model.by?.email
|
13
|
+
<a href={"mailto:#{@model.by.email}"}>{@model.by.name}</a>
|
14
|
+
else if @model?.by.name
|
15
|
+
@model.by.name
|
16
|
+
else
|
17
|
+
'Unknown User'
|
18
|
+
|
19
|
+
user =
|
20
|
+
<LC.Tooltip id='user-email' placement='left'
|
21
|
+
content={Lanes.Vendor.Moment( @model.created_at ).fromNow()}
|
22
|
+
>{user}</LC.Tooltip>
|
14
23
|
|
15
24
|
<div className="update">
|
16
25
|
{user}
|
17
|
-
<
|
18
|
-
<p className="changes">
|
26
|
+
<div className="changes">
|
19
27
|
{@renderField(change) for change in @model.displayed_changes }
|
20
|
-
</
|
28
|
+
</div>
|
21
29
|
</div>
|
22
30
|
|
23
31
|
class Lanes.Components.Toolbar.RemoteChangeSets extends Lanes.React.Component
|
@@ -31,45 +39,10 @@ class Lanes.Components.Toolbar.RemoteChangeSets extends Lanes.React.Component
|
|
31
39
|
<i className="icon icon-cloud-download icon-lg" />
|
32
40
|
<LC.CountBadge superScript count={@model.changes.length} />
|
33
41
|
</span>
|
34
|
-
<BS.Nav navbar
|
35
|
-
<BS.DropdownButton
|
42
|
+
<BS.Nav navbar pullRight className="changes-notification">
|
43
|
+
<BS.DropdownButton id="record-changes" title={title}>
|
36
44
|
<div className="scroller">
|
37
45
|
{@model.changes.map (ch) -> <Change key={ch.cid} model={ch} />}
|
38
46
|
</div>
|
39
47
|
</BS.DropdownButton>
|
40
48
|
</BS.Nav>
|
41
|
-
|
42
|
-
# <ul className="nav navbar-nav navbar-right">
|
43
|
-
# <li className="dropdown">
|
44
|
-
# <a href="#" className="dropdown-toggle"
|
45
|
-
# data-toggle="dropdown" role="button"
|
46
|
-
# aria-haspopup="true" aria-expanded="false"
|
47
|
-
# >
|
48
|
-
# <i className="icon icon-cloud-download" /> Changes {@props.model.changes.length}
|
49
|
-
# </a>
|
50
|
-
# <ul className="dropdown-menu">
|
51
|
-
# <li><a href="#">Action</a></li>
|
52
|
-
# <li><a href="#">Another action</a></li>
|
53
|
-
# <li><a href="#">Something else here</a></li>
|
54
|
-
# <li role="separator" className="divider"></li>
|
55
|
-
# <li><a href="#">Separated link</a></li>
|
56
|
-
# </ul>
|
57
|
-
# </li>
|
58
|
-
# </ul>
|
59
|
-
|
60
|
-
|
61
|
-
# title = <span>
|
62
|
-
# <i className="icon icon-cloud-download" /> Changes {@props.model.changes.length}
|
63
|
-
# </span>
|
64
|
-
# <BS.SplitButton bsStyle="default" title={title}
|
65
|
-
# navItem
|
66
|
-
# componentClass="button"
|
67
|
-
# onClick={@props.onSave}
|
68
|
-
# className="changes navbar-btn"
|
69
|
-
# >
|
70
|
-
# <BS.MenuItem eventKey='1'>Action</BS.MenuItem>
|
71
|
-
# <BS.MenuItem eventKey='2'>Another action</BS.MenuItem>
|
72
|
-
# <BS.MenuItem eventKey='3'>Something else here</BS.MenuItem>
|
73
|
-
# <BS.MenuItem divider />
|
74
|
-
# <BS.MenuItem eventKey='4'>Separated link</BS.MenuItem>
|
75
|
-
# </BS.SplitButton>
|
@@ -1,3 +1,27 @@
|
|
1
1
|
class Lanes.Components.Toolbar.SaveButton extends Lanes.React.Component
|
2
2
|
|
3
|
+
propTypes:
|
4
|
+
commands: React.PropTypes.object.isRequired
|
5
|
+
|
6
|
+
onSave: ->
|
7
|
+
model = @props.commands.getModel()
|
8
|
+
if @isSavable(model)
|
9
|
+
@props.commands.saveModel()
|
10
|
+
else
|
11
|
+
model.unmaskInvalidField('all')
|
12
|
+
|
13
|
+
isSavable: (model) ->
|
14
|
+
if @props.commands.saveModel
|
15
|
+
@props.commands.isEditing() and model.isSavable
|
16
|
+
else
|
17
|
+
false
|
18
|
+
|
3
19
|
render: ->
|
20
|
+
return null unless @props.commands.canEditModel()
|
21
|
+
model = @props.commands.getModel()
|
22
|
+
text = if model.isNew() then 'Create' else 'Save'
|
23
|
+
classNames = _.classnames('save', 'navbar-btn', 'control', {disabled: !@isSavable(model)})
|
24
|
+
<BS.Button navItem componentClass="button"
|
25
|
+
onClick={@onSave} className={classNames} >
|
26
|
+
<LC.Icon type="cloud-upload" />{text}
|
27
|
+
</BS.Button>
|
@@ -1,7 +1,9 @@
|
|
1
|
+
##= require_self
|
2
|
+
##= require ./SaveButton
|
3
|
+
|
1
4
|
class Lanes.Components.Toolbar extends Lanes.React.Component
|
2
5
|
|
3
6
|
propTypes:
|
4
|
-
onSave: React.PropTypes.func
|
5
7
|
toggleEdit: Lanes.PropTypes.Model
|
6
8
|
commands: React.PropTypes.object.isRequired
|
7
9
|
|
@@ -9,50 +11,35 @@ class Lanes.Components.Toolbar extends Lanes.React.Component
|
|
9
11
|
changedModel: -> @props.commands.getModel()
|
10
12
|
|
11
13
|
bindDataEvents:
|
12
|
-
changedModel: 'remote-update'
|
13
|
-
|
14
|
-
renderSaveButton: ->
|
15
|
-
<BS.Button navItem componentClass="button" disabled={!@isSavable()}
|
16
|
-
onClick={@props.commands.saveModel} className="save navbar-btn control">
|
17
|
-
<i className="icon icon-cloud-upload" />Save
|
18
|
-
</BS.Button>
|
14
|
+
changedModel: 'remote-update isSavable'
|
19
15
|
|
20
16
|
renderResetButton: ->
|
21
17
|
<BS.Button navItem componentClass="button"
|
22
|
-
onClick={@props.commands.resetModel} className="
|
23
|
-
<
|
18
|
+
onClick={@props.commands.resetModel} className="reset navbar-btn control">
|
19
|
+
<LC.Icon type="undo" />Reset
|
24
20
|
</BS.Button>
|
25
21
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</
|
36
|
-
</
|
37
|
-
|
38
|
-
isSavable: ->
|
39
|
-
if @props.commands.saveModel
|
40
|
-
if @props.commands.toggleEdit
|
41
|
-
@props.commands.isEditing()
|
42
|
-
else
|
43
|
-
true
|
44
|
-
else
|
45
|
-
false
|
22
|
+
EditToggle: ->
|
23
|
+
return null unless @props.commands.canEditModel()
|
24
|
+
<li navItem className="toggle control">
|
25
|
+
<label>
|
26
|
+
<Lanes.Vendor.ReactToggle
|
27
|
+
aria-labelledby="Editing"
|
28
|
+
onChange={@props.commands.toggleEdit}
|
29
|
+
defaultChecked={@props.commands.isEditing()} />
|
30
|
+
<span>Edit</span>
|
31
|
+
</label>
|
32
|
+
</li>
|
46
33
|
|
47
34
|
renderSpacer: ->
|
48
35
|
<span className="control spacer" />
|
49
36
|
|
50
37
|
render: ->
|
51
|
-
<BS.
|
52
|
-
|
53
|
-
{@renderSaveButton()}
|
38
|
+
<BS.Nav bsStyle="pills" className="lanes-toolbar">
|
39
|
+
<Lanes.Components.Toolbar.SaveButton commands={@props.commands} />
|
54
40
|
{@renderResetButton()}
|
55
|
-
{@
|
56
|
-
|
57
|
-
|
58
|
-
|
41
|
+
{@props.children}
|
42
|
+
<div className="spacer"/>
|
43
|
+
<@EditToggle />
|
44
|
+
<LC.Toolbar.RemoteChangeSets model=@changedModel />
|
45
|
+
</BS.Nav>
|
@@ -5,9 +5,9 @@
|
|
5
5
|
font-size: 28px;
|
6
6
|
}
|
7
7
|
.badge {
|
8
|
-
top: -
|
8
|
+
top: -11px;
|
9
9
|
position: relative;
|
10
|
-
left: -
|
10
|
+
left: -11px;
|
11
11
|
padding: 3px 7px;
|
12
12
|
font-size: 75%;
|
13
13
|
}
|
@@ -25,12 +25,16 @@
|
|
25
25
|
.update {
|
26
26
|
border-bottom: 1px solid $table-border-color;
|
27
27
|
padding: 0.75rem;
|
28
|
-
|
29
|
-
margin: 0;
|
28
|
+
.change > div {
|
30
29
|
margin-bottom: 2px;
|
31
30
|
}
|
32
|
-
.
|
33
|
-
|
31
|
+
.from, .to {
|
32
|
+
margin-left: 0.5rem;
|
33
|
+
white-space: nowrap;
|
34
|
+
text-overflow: ellipsis;
|
35
|
+
max-width: 180px;
|
36
|
+
overflow: hidden;
|
37
|
+
}
|
34
38
|
}
|
35
39
|
.scroller {
|
36
40
|
max-height: 350px;
|
@@ -1,19 +1,32 @@
|
|
1
1
|
.lanes-toolbar {
|
2
2
|
|
3
|
-
|
3
|
+
background-color: $navbar-default-bg;
|
4
|
+
|
5
|
+
border: 1px solid transparent;
|
6
|
+
border-radius: $border-radius-base;
|
7
|
+
border-color: $navbar-default-border;
|
8
|
+
margin-bottom: $navbar-margin-bottom;
|
9
|
+
padding-right: $navbar-padding-horizontal;
|
10
|
+
padding-left: $navbar-padding-horizontal;
|
11
|
+
|
12
|
+
display: flex;
|
13
|
+
flex-direction: row;
|
14
|
+
justify-content: flex-start;
|
15
|
+
align-items: center;
|
16
|
+
flex-wrap: wrap;
|
4
17
|
|
5
18
|
.btn {
|
6
19
|
&.save {
|
7
20
|
@extend .btn-primary;
|
21
|
+
// the save button needs to be clicable even if disabled
|
22
|
+
&.disabled {
|
23
|
+
pointer-events: all;
|
24
|
+
cursor: pointer;
|
25
|
+
}
|
8
26
|
}
|
9
27
|
}
|
10
|
-
// not sure why bootstrap doesn't set this properly?
|
11
|
-
.navbar-form { margin-top: 15px; }
|
12
|
-
.form-control { height: inherit; }
|
13
28
|
.spacer {
|
14
|
-
|
15
|
-
display: block;
|
16
|
-
float: left;
|
29
|
+
flex: 1;
|
17
30
|
}
|
18
31
|
.control {
|
19
32
|
width: 100px;
|
@@ -26,7 +39,7 @@
|
|
26
39
|
border-right-color: transparent;
|
27
40
|
|
28
41
|
border-bottom-color: $popover-title-bg;
|
29
|
-
border-top-color: $popover-title-bg !important;
|
42
|
+
border-top-color: $popover-title-bg !important;
|
30
43
|
|
31
44
|
border-width: 0 9px 9px;
|
32
45
|
height: 0;
|
@@ -46,6 +59,13 @@
|
|
46
59
|
input {
|
47
60
|
margin: 0 0.25rem 0 0;
|
48
61
|
}
|
49
|
-
|
62
|
+
.toggle {
|
63
|
+
label {
|
64
|
+
display: flex;
|
65
|
+
flex-direction: row;
|
66
|
+
align-items: center;
|
67
|
+
justify-content: space-around;
|
68
|
+
}
|
69
|
+
}
|
50
70
|
@import "./changes-notification";
|
51
71
|
}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
class BaseExtension
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
@extended:(klass)->
|
3
|
+
@extended: (klass) ->
|
6
4
|
Lanes.Extensions.register(klass)
|
7
5
|
|
8
|
-
|
9
|
-
Lanes.
|
6
|
+
Lanes.Extensions.Base = Lanes.lib.MakeBaseClass(
|
7
|
+
Lanes.Vendor.Ampersand.State, BaseExtension
|
8
|
+
)
|
data/client/lanes/index.js
CHANGED
data/client/lanes/index.scss.erb
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
+
@import "styles/variables";
|
1
2
|
@import "styles/fonts";
|
3
|
+
@import "styles/mixins/all";
|
4
|
+
|
5
|
+
html { height: 100%; }
|
6
|
+
body { margin: 0; height: 100%; }
|
7
|
+
.lanes-root {
|
8
|
+
height: 100%;
|
9
|
+
.lanes > div { height: 100%; }
|
10
|
+
}
|
2
11
|
|
3
12
|
.lanes {
|
13
|
+
height: 100%;
|
4
14
|
@import "styles/global";
|
5
15
|
|
6
16
|
<% Lanes::Extensions.each_asset(phase: :all, type: :css) do | asset | %>
|
@@ -18,5 +28,4 @@
|
|
18
28
|
@import "<%= screen.css.remove(/\.css$/) + "/index.scss" %>";
|
19
29
|
<% end %>
|
20
30
|
|
21
|
-
@import "styles/plugins/all";
|
22
31
|
}
|