lanes 0.1.9 → 0.1.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/client/fonts/fontawesome-webfont.woff +0 -0
- data/client/fonts/fontawesome-webfont.woff2 +0 -0
- data/client/lanes/Boot.cjsx +9 -0
- data/client/lanes/access/Extension.coffee +18 -4
- data/client/lanes/access/LoginDialog.cjsx +78 -0
- data/client/lanes/access/Roles.coffee +22 -28
- data/client/lanes/access/User.coffee +16 -16
- data/client/lanes/access/index.js +4 -5
- data/client/lanes/access/screens/user-management/Editor.cjsx +20 -0
- data/client/lanes/access/screens/user-management/UserManagement.cjsx +41 -0
- data/client/lanes/access/screens/user-management/index.js +0 -1
- data/client/lanes/components/grid/EditingMixin.cjsx +64 -0
- data/client/lanes/components/grid/Grid.cjsx +139 -0
- data/client/lanes/components/grid/PopOverMixin.cjsx +28 -0
- data/client/lanes/components/grid/PopoverEditor.cjsx +8 -0
- data/client/lanes/components/grid/RowEditor.cjsx +10 -0
- data/client/lanes/components/grid/Toolbar.cjsx +14 -0
- data/client/lanes/components/grid/config.json +1 -1
- data/client/lanes/components/grid/editors.scss +94 -53
- data/client/lanes/components/grid/index.js +2 -7
- data/client/lanes/components/grid/styles.scss +8 -296
- data/client/lanes/components/helpers.coffee +2 -0
- data/client/lanes/components/index.js +2 -1
- data/client/lanes/components/modal/Modal.cjsx +36 -0
- data/client/lanes/components/modal/index.js +1 -2
- data/client/lanes/components/modal/styles.scss +0 -19
- data/client/lanes/components/record-finder/Clause.cjsx +80 -0
- data/client/lanes/components/record-finder/Dialog.cjsx +54 -0
- data/client/lanes/components/record-finder/RecordFinder.cjsx +38 -0
- data/client/lanes/components/record-finder/config.json +1 -1
- data/client/lanes/components/record-finder/index.js +1 -2
- data/client/lanes/components/request-spinner/index.js +1 -0
- data/client/lanes/components/select-field/SelectField.cjsx +78 -0
- data/client/lanes/components/select-field/index.js +2 -1
- data/client/lanes/components/select-field/styles.scss +1 -0
- data/client/lanes/components/shared/CountBadge.cjsx +9 -0
- data/client/lanes/components/shared/ErrorDisplay.cjsx +21 -0
- data/client/lanes/components/shared/FieldMixin.cjsx +71 -0
- data/client/lanes/components/shared/FieldSet.cjsx +58 -0
- data/client/lanes/components/shared/GenericField.cjsx +5 -0
- data/client/lanes/components/shared/Helpers.coffee +9 -0
- data/client/lanes/components/shared/RadioField.cjsx +14 -0
- data/client/lanes/components/shared/Resize.cjsx +152 -0
- data/client/lanes/components/shared/TextArea.cjsx +19 -0
- data/client/lanes/components/shared/TextField.cjsx +25 -0
- data/client/lanes/components/shared/Tooltip.cjsx +10 -0
- data/client/lanes/components/shared/fields.scss +35 -0
- data/client/lanes/components/shared/fieldset.scss +29 -0
- data/client/lanes/components/shared/index.js +3 -0
- data/client/lanes/components/shared/styles.scss +32 -0
- data/client/lanes/components/toolbar/RemoteChangeSets.cjsx +75 -0
- data/client/lanes/components/toolbar/SaveButton.cjsx +3 -0
- data/client/lanes/components/toolbar/Toolbar.cjsx +58 -0
- data/client/lanes/{workspace/styles → components/toolbar}/changes-notification.scss +10 -23
- data/client/lanes/components/toolbar/index.js +3 -0
- data/client/lanes/components/toolbar/styles.scss +51 -0
- data/client/lanes/extension/Extensions.coffee +19 -10
- data/client/lanes/extension/LateLoaded.js.erb +4 -3
- data/client/lanes/index.js +3 -5
- data/client/lanes/index.scss.erb +6 -14
- data/client/lanes/lib/HotReload.coffee +35 -0
- data/client/lanes/lib/MakeBaseClass.coffee +10 -11
- data/client/lanes/lib/development.coffee +3 -0
- data/client/lanes/lib/dom.coffee +49 -0
- data/client/lanes/lib/el.coffee +23 -0
- data/client/lanes/lib/index.js.erb +16 -0
- data/client/lanes/lib/loader.coffee +34 -34
- data/client/lanes/lib/namespace.coffee +1 -1
- data/client/lanes/lib/objToParam.coffee +37 -0
- data/client/lanes/{access/views/.gitkeep → lib/production.coffee} +0 -0
- data/client/lanes/lib/utilFunctions.coffee +44 -26
- data/client/lanes/models/AssociationMap.coffee +51 -38
- data/client/lanes/models/Base.coffee +89 -88
- data/client/lanes/models/ChangeMonitor.coffee +10 -10
- data/client/lanes/models/ChangeSet.coffee +14 -24
- data/client/lanes/models/Collection.coffee +40 -41
- data/client/lanes/models/PubSub.coffee +28 -19
- data/client/lanes/models/Query.coffee +78 -45
- data/client/lanes/models/QueryResults.coffee +93 -0
- data/client/lanes/models/ServerCache.coffee +12 -12
- data/client/lanes/models/Sync.coffee +53 -50
- data/client/lanes/models/User.coffee +31 -17
- data/client/lanes/react/Component.coffee +31 -0
- data/client/lanes/react/DefaultComponentNotFound.cjsx +9 -0
- data/client/lanes/{views → react}/FormBindings.coffee +0 -0
- data/client/lanes/{views → react}/ModelObserver.coffee +0 -0
- data/client/lanes/{views → react}/ModelUpdate.coffee +0 -0
- data/client/lanes/{views → react}/PubSub.coffee +0 -0
- data/client/lanes/react/Root.cjsx +14 -0
- data/client/lanes/react/Router.cjsx +18 -0
- data/client/lanes/react/Screen.coffee +15 -0
- data/client/lanes/{views → react}/TimedHighlight.coffee +0 -0
- data/client/lanes/{views → react}/TimedMask.coffee +0 -0
- data/client/lanes/react/TypeValidators.coffee +21 -0
- data/client/lanes/{lib/create-namespace.js → react/Utils.coffee} +0 -0
- data/client/lanes/react/Viewport.coffee +30 -0
- data/client/lanes/react/index.js +8 -0
- data/client/lanes/react/mixins/Access.coffee +27 -0
- data/client/lanes/react/mixins/Component.coffee +4 -0
- data/client/lanes/react/mixins/Data.coffee +136 -0
- data/client/lanes/react/mixins/MonitorSize.coffee +11 -0
- data/client/lanes/react/mixins/ReadEditingState.coffee +11 -0
- data/client/lanes/react/mixins/RelayEditingState.coffee +17 -0
- data/client/lanes/react/mixins/RelayFieldChange.coffee +11 -0
- data/client/lanes/react/mixins/Screen.coffee +7 -0
- data/client/lanes/react/mixins/Viewport.coffee +11 -0
- data/client/lanes/screens/ChangeListener.coffee +3 -3
- data/client/lanes/screens/Commands.coffee +27 -0
- data/client/lanes/screens/Definitions.coffee +74 -65
- data/client/lanes/screens/all.js.erb +1 -1
- data/client/lanes/screens/index.js +1 -2
- data/client/lanes/screens/mixins/index.js +0 -1
- data/client/lanes/screens/register.js.erb +0 -1
- data/client/lanes/screens/styles.scss +7 -0
- data/client/lanes/styles/bootstrap-custom-grid.scss +67 -37
- data/client/lanes/styles/bootstrap.scss +4 -5
- data/client/lanes/styles/fonts.scss +10 -23
- data/client/lanes/styles/fonts/_animated.scss +34 -0
- data/client/lanes/styles/fonts/_bordered-pulled.scss +16 -0
- data/client/lanes/styles/fonts/_core.scss +13 -0
- data/client/lanes/styles/fonts/_fixed-width.scss +6 -0
- data/client/lanes/styles/fonts/_icons.scss +596 -0
- data/client/lanes/styles/fonts/_larger.scss +13 -0
- data/client/lanes/styles/fonts/_list.scss +19 -0
- data/client/lanes/styles/fonts/_mixins.scss +27 -0
- data/client/lanes/styles/fonts/_path.scss +10 -0
- data/client/lanes/styles/fonts/_rotated-flipped.scss +20 -0
- data/client/lanes/styles/fonts/_stacked.scss +20 -0
- data/client/lanes/styles/fonts/_variables.scss +606 -0
- data/client/lanes/styles/fonts/font-awesome.scss +16 -0
- data/client/lanes/styles/fonts/index.scss +2 -0
- data/client/lanes/styles/global.scss +2 -0
- data/client/lanes/styles/global/fancy-header.scss +14 -0
- data/client/lanes/testing/BeforeEach.coffee +15 -40
- data/client/lanes/testing/Helpers.coffee +27 -0
- data/client/lanes/testing/ModelSaver.coffee +14 -24
- data/client/lanes/testing/StubRouter.coffee +27 -0
- data/client/lanes/testing/TestObjects.coffee +27 -0
- data/client/lanes/testing/index.js +3 -1
- data/client/lanes/vendor/base.js +85256 -0
- data/client/lanes/vendor/commons.js +20579 -0
- data/client/lanes/vendor/development.js +2511 -0
- data/client/lanes/vendor/grid.js +6689 -0
- data/client/lanes/vendor/grid.scss +387 -0
- data/client/lanes/vendor/index.js +3 -0
- data/client/lanes/vendor/message-bus.coffee +264 -0
- data/client/lanes/vendor/widgets.js +8798 -0
- data/client/lanes/vendor/widgets.scss +723 -0
- data/client/lanes/workspace/ActiveScreenSwitcher.cjsx +38 -0
- data/client/lanes/workspace/Extension.coffee +6 -0
- data/client/lanes/workspace/Layout.cjsx +28 -0
- data/client/lanes/workspace/Navbar.cjsx +25 -0
- data/client/lanes/workspace/ScreenView.cjsx +27 -0
- data/client/lanes/workspace/ScreensMenu.cjsx +57 -0
- data/client/lanes/workspace/UIState.coffee +17 -16
- data/client/lanes/workspace/index.js +7 -2
- data/client/lanes/workspace/styles.scss +0 -3
- data/client/lanes/workspace/styles/forms.scss +2 -73
- data/client/lanes/workspace/styles/header.scss +0 -2
- data/client/lanes/workspace/styles/layout.scss +9 -2
- data/client/lanes/workspace/styles/screens.scss +0 -59
- data/client/lanes/workspace/styles/tabs.scss +16 -15
- data/coffeelint.json +49 -0
- data/config.ru +1 -0
- data/config/database.yml +2 -2
- data/config/routes.rb +7 -0
- data/docs/command.md +11 -8
- data/docs/model.md +2 -5
- data/docs/react.md +137 -0
- data/lanes.gemspec +1 -0
- data/lib/lanes.rb +1 -1
- data/lib/lanes/access/authentication_provider.rb +1 -0
- data/lib/lanes/access/config/routes.rb +2 -0
- data/lib/lanes/access/config/screens.rb +15 -12
- data/lib/lanes/access/extension.rb +2 -1
- data/lib/lanes/access/role.rb +8 -4
- data/lib/lanes/api.rb +4 -3
- data/lib/lanes/api/coffeescript_processor.rb +47 -6
- data/lib/lanes/api/controller.rb +4 -3
- data/lib/lanes/api/default_routes.rb +16 -0
- data/lib/lanes/api/javascript_processor.rb +14 -68
- data/lib/lanes/api/pub_sub.rb +17 -3
- data/lib/lanes/api/request_wrapper.rb +2 -2
- data/lib/lanes/api/root.rb +16 -13
- data/lib/lanes/api/routing.rb +0 -18
- data/lib/lanes/api/sprockets_extension.rb +10 -4
- data/lib/lanes/api/test_specs.rb +3 -3
- data/lib/lanes/cli.rb +6 -1
- data/lib/lanes/command/app.rb +7 -11
- data/lib/lanes/command/generate.rb +3 -3
- data/lib/lanes/command/generate_component.rb +28 -0
- data/lib/lanes/command/generate_component.usage +11 -0
- data/lib/lanes/command/generate_screen.rb +24 -7
- data/lib/lanes/command/generate_screen.usage +5 -8
- data/lib/lanes/configuration.rb +3 -2
- data/lib/lanes/extension.rb +12 -18
- data/lib/lanes/extension/definition.rb +20 -8
- data/lib/lanes/guard_tasks.rb +22 -5
- data/lib/lanes/hot_reload_plugin.rb +47 -0
- data/lib/lanes/logger.rb +41 -5
- data/lib/lanes/screen.rb +40 -16
- data/lib/lanes/spec_helper.rb +6 -3
- data/lib/lanes/version.rb +1 -1
- data/lib/lanes/workspace/extension.rb +1 -0
- data/npm-build/{template.js → base.js} +17 -17
- data/{client/lanes/workspace/tab.html → npm-build/common.js} +0 -0
- data/npm-build/compile.coffee +13 -4
- data/npm-build/development.js +7 -0
- data/npm-build/grid.js +11 -0
- data/npm-build/package.json +62 -58
- data/npm-build/react-widgets.js +5 -0
- data/npm-build/react-widgets.less +35 -0
- data/npm-build/webpack.config.js +39 -0
- data/spec/command-reference-files/component/client/appy-app/components/Big.cjsx +4 -0
- data/spec/command-reference-files/component/spec/appy-app/components/BigSpec.coffee +5 -0
- data/spec/command-reference-files/initial/.rubocop.yml +7 -0
- data/spec/command-reference-files/initial/Gemfile +1 -1
- data/spec/command-reference-files/initial/client/appy-app/Extension.coffee +17 -5
- data/spec/command-reference-files/initial/client/appy-app/components/Base.coffee +9 -0
- data/spec/command-reference-files/initial/client/appy-app/index.js +1 -3
- data/spec/command-reference-files/initial/client/appy-app/screens/Base.coffee +8 -2
- data/spec/command-reference-files/initial/coffeelint.json +49 -0
- data/spec/command-reference-files/initial/config.ru +2 -0
- data/spec/command-reference-files/initial/config/screens.rb +10 -0
- data/spec/command-reference-files/initial/lib/appy-app/extension.rb +7 -0
- data/spec/command-reference-files/model/client/appy-app/models/TestTest.coffee +0 -1
- data/spec/command-reference-files/screen/client/appy-app/Extension.coffee +34 -0
- data/spec/command-reference-files/screen/client/appy-app/screens/ready-set-go/ReadySetGo.cjsx +7 -0
- data/spec/command-reference-files/screen/config/screens.rb +19 -9
- data/spec/command-reference-files/screen/spec/appy-app/screens/ready-set-go/ReadySetGoSpec.coffee +3 -3
- data/spec/lanes/components/grid/GridSpec.coffee +26 -26
- data/spec/lanes/models/AssociationMapSpec.coffee +6 -6
- data/spec/lanes/models/BaseSpec.coffee +24 -35
- data/spec/lanes/models/CollectionSpec.coffee +19 -18
- data/spec/lanes/models/EnumMapSpec.coffee +1 -1
- data/spec/lanes/models/PubSubSpec.coffee +17 -15
- data/spec/lanes/models/SyncSpec.coffee +28 -0
- data/spec/lanes/models/UserSpec.coffee +17 -0
- data/spec/lanes/react/mixins/DataSpec.coffee +72 -0
- data/spec/lanes/screens/DefinitionsSpec.coffee +33 -0
- data/spec/lanes/views/BaseSpec.coffee +133 -133
- data/spec/lanes/views/FormBindingsSpec.coffee +30 -30
- data/spec/server/api/coffeescript_processor_spec.rb +2 -2
- data/spec/server/command_spec.rb +3 -3
- data/templates/client/Extension.coffee +17 -5
- data/templates/client/components/BaseComponent.coffee +9 -0
- data/templates/client/components/Component.cjsx +4 -0
- data/templates/client/{views → components}/template.html +0 -0
- data/templates/client/index.js +1 -3
- data/templates/client/models/Model.coffee +0 -1
- data/templates/client/screens/BaseScreen.coffee +9 -0
- data/templates/client/screens/Screen.cjsx +7 -0
- data/templates/config.ru +2 -0
- data/templates/config/screen.rb +10 -10
- data/templates/config/screens.rb +10 -0
- data/templates/lib/namespace/extension.rb +7 -0
- data/templates/spec/client/Screen.coffee +4 -4
- data/templates/spec/client/components/ComponentSpec.coffee +5 -0
- metadata +157 -201
- data/client/fonts/lanes/icomoon.eot +0 -0
- data/client/fonts/lanes/icomoon.svg +0 -160
- data/client/fonts/lanes/icomoon.ttf +0 -0
- data/client/fonts/lanes/icomoon.woff +0 -0
- data/client/fonts/lanes/selection.json +0 -3565
- data/client/lanes/Boot.coffee +0 -50
- data/client/lanes/access/LoginDialog.coffee +0 -46
- data/client/lanes/access/login-dialog.html +0 -16
- data/client/lanes/access/screens/user-management/GridUserEditor.coffee +0 -26
- data/client/lanes/access/screens/user-management/UserManagement.coffee +0 -23
- data/client/lanes/access/screens/user-management/grid-popover-editor.html +0 -33
- data/client/lanes/access/screens/user-management/screen.html +0 -7
- data/client/lanes/components/Base.coffee +0 -39
- data/client/lanes/components/ChoicesInput.coffee +0 -47
- data/client/lanes/components/grid/Editor.coffee +0 -62
- data/client/lanes/components/grid/Grid.coffee +0 -205
- data/client/lanes/components/grid/PopOverEditor.coffee +0 -29
- data/client/lanes/components/grid/RowEditor.coffee +0 -30
- data/client/lanes/components/grid/popover-editor.html +0 -18
- data/client/lanes/components/grid/row-editor.html +0 -16
- data/client/lanes/components/grid/template.html +0 -4
- data/client/lanes/components/grid/vendor/dataTables.scroller.js +0 -1262
- data/client/lanes/components/grid/vendor/index.js +0 -2
- data/client/lanes/components/grid/vendor/jquery.dataTables.js +0 -14839
- data/client/lanes/components/modal/ModalDialog.coffee +0 -68
- data/client/lanes/components/modal/template.html +0 -18
- data/client/lanes/components/multi-select/MultiSelect.coffee +0 -65
- data/client/lanes/components/popover/PopOver.coffee +0 -55
- data/client/lanes/components/popover/index.js +0 -2
- data/client/lanes/components/popover/styles.scss +0 -2
- data/client/lanes/components/popover/template.html +0 -5
- data/client/lanes/components/radio-group/RadioGroup.coffee +0 -47
- data/client/lanes/components/radio-group/index.js +0 -1
- data/client/lanes/components/radio-group/styles.scss +0 -1
- data/client/lanes/components/record-finder/Clause.coffee +0 -37
- data/client/lanes/components/record-finder/Dialog.coffee +0 -45
- data/client/lanes/components/record-finder/RecordFinder.coffee +0 -61
- data/client/lanes/components/record-finder/clause.html +0 -37
- data/client/lanes/components/record-finder/dialog.html +0 -4
- data/client/lanes/components/record-finder/field.html +0 -8
- data/client/lanes/components/select-field/SelectField.coffee +0 -63
- data/client/lanes/components/select2/Select2.coffee +0 -8
- data/client/lanes/components/select2/index.js +0 -2
- data/client/lanes/lib/Templates.coffee +0 -51
- data/client/lanes/lib/debounce.coffee +0 -15
- data/client/lanes/lib/defer.coffee +0 -7
- data/client/lanes/lib/el.js +0 -115
- data/client/lanes/lib/index.js +0 -5
- data/client/lanes/plugins/overlay.coffee +0 -41
- data/client/lanes/screens/Base.coffee +0 -35
- data/client/lanes/screens/Router.coffee +0 -4
- data/client/lanes/screens/mixins/Editing.coffee +0 -38
- data/client/lanes/styles/bootstrap/old/_alerts.scss +0 -68
- data/client/lanes/styles/bootstrap/old/_badges.scss +0 -57
- data/client/lanes/styles/bootstrap/old/_breadcrumbs.scss +0 -26
- data/client/lanes/styles/bootstrap/old/_button-groups.scss +0 -240
- data/client/lanes/styles/bootstrap/old/_buttons.scss +0 -157
- data/client/lanes/styles/bootstrap/old/_carousel.scss +0 -243
- data/client/lanes/styles/bootstrap/old/_close.scss +0 -35
- data/client/lanes/styles/bootstrap/old/_code.scss +0 -68
- data/client/lanes/styles/bootstrap/old/_component-animations.scss +0 -35
- data/client/lanes/styles/bootstrap/old/_dropdowns.scss +0 -215
- data/client/lanes/styles/bootstrap/old/_forms.scss +0 -538
- data/client/lanes/styles/bootstrap/old/_glyphicons.scss +0 -237
- data/client/lanes/styles/bootstrap/old/_grid.scss +0 -84
- data/client/lanes/styles/bootstrap/old/_input-groups.scss +0 -166
- data/client/lanes/styles/bootstrap/old/_jumbotron.scss +0 -48
- data/client/lanes/styles/bootstrap/old/_labels.scss +0 -66
- data/client/lanes/styles/bootstrap/old/_list-group.scss +0 -132
- data/client/lanes/styles/bootstrap/old/_media.scss +0 -56
- data/client/lanes/styles/bootstrap/old/_mixins.scss +0 -39
- data/client/lanes/styles/bootstrap/old/_modals.scss +0 -150
- data/client/lanes/styles/bootstrap/old/_navbar.scss +0 -659
- data/client/lanes/styles/bootstrap/old/_navs.scss +0 -242
- data/client/lanes/styles/bootstrap/old/_normalize.scss +0 -425
- data/client/lanes/styles/bootstrap/old/_pager.scss +0 -55
- data/client/lanes/styles/bootstrap/old/_pagination.scss +0 -88
- data/client/lanes/styles/bootstrap/old/_panels.scss +0 -243
- data/client/lanes/styles/bootstrap/old/_popovers.scss +0 -133
- data/client/lanes/styles/bootstrap/old/_print.scss +0 -101
- data/client/lanes/styles/bootstrap/old/_progress-bars.scss +0 -105
- data/client/lanes/styles/bootstrap/old/_responsive-embed.scss +0 -34
- data/client/lanes/styles/bootstrap/old/_responsive-utilities.scss +0 -174
- data/client/lanes/styles/bootstrap/old/_scaffolding.scss +0 -150
- data/client/lanes/styles/bootstrap/old/_tables.scss +0 -233
- data/client/lanes/styles/bootstrap/old/_theme.scss +0 -258
- data/client/lanes/styles/bootstrap/old/_thumbnails.scss +0 -38
- data/client/lanes/styles/bootstrap/old/_tooltip.scss +0 -95
- data/client/lanes/styles/bootstrap/old/_type.scss +0 -304
- data/client/lanes/styles/bootstrap/old/_utilities.scss +0 -57
- data/client/lanes/styles/bootstrap/old/_variables.scss +0 -850
- data/client/lanes/styles/bootstrap/old/_wells.scss +0 -29
- data/client/lanes/styles/bootstrap/old/bootstrap.scss +0 -50
- data/client/lanes/styles/bootstrap/old/mixins/_alerts.scss +0 -14
- data/client/lanes/styles/bootstrap/old/mixins/_background-variant.scss +0 -11
- data/client/lanes/styles/bootstrap/old/mixins/_border-radius.scss +0 -18
- data/client/lanes/styles/bootstrap/old/mixins/_buttons.scss +0 -50
- data/client/lanes/styles/bootstrap/old/mixins/_center-block.scss +0 -7
- data/client/lanes/styles/bootstrap/old/mixins/_clearfix.scss +0 -22
- data/client/lanes/styles/bootstrap/old/mixins/_forms.scss +0 -84
- data/client/lanes/styles/bootstrap/old/mixins/_gradients.scss +0 -58
- data/client/lanes/styles/bootstrap/old/mixins/_grid-framework.scss +0 -81
- data/client/lanes/styles/bootstrap/old/mixins/_grid.scss +0 -122
- data/client/lanes/styles/bootstrap/old/mixins/_hide-text.scss +0 -21
- data/client/lanes/styles/bootstrap/old/mixins/_image.scss +0 -34
- data/client/lanes/styles/bootstrap/old/mixins/_labels.scss +0 -12
- data/client/lanes/styles/bootstrap/old/mixins/_list-group.scss +0 -31
- data/client/lanes/styles/bootstrap/old/mixins/_nav-divider.scss +0 -10
- data/client/lanes/styles/bootstrap/old/mixins/_nav-vertical-align.scss +0 -9
- data/client/lanes/styles/bootstrap/old/mixins/_opacity.scss +0 -8
- data/client/lanes/styles/bootstrap/old/mixins/_pagination.scss +0 -23
- data/client/lanes/styles/bootstrap/old/mixins/_panels.scss +0 -24
- data/client/lanes/styles/bootstrap/old/mixins/_progress-bar.scss +0 -10
- data/client/lanes/styles/bootstrap/old/mixins/_reset-filter.scss +0 -8
- data/client/lanes/styles/bootstrap/old/mixins/_resize.scss +0 -6
- data/client/lanes/styles/bootstrap/old/mixins/_responsive-visibility.scss +0 -21
- data/client/lanes/styles/bootstrap/old/mixins/_size.scss +0 -10
- data/client/lanes/styles/bootstrap/old/mixins/_tab-focus.scss +0 -9
- data/client/lanes/styles/bootstrap/old/mixins/_table-row.scss +0 -28
- data/client/lanes/styles/bootstrap/old/mixins/_text-emphasis.scss +0 -11
- data/client/lanes/styles/bootstrap/old/mixins/_text-overflow.scss +0 -8
- data/client/lanes/styles/bootstrap/old/mixins/_vendor-prefixes.scss +0 -219
- data/client/lanes/styles/font-definitions.scss +0 -451
- data/client/lanes/testing/TestModels.coffee +0 -23
- data/client/lanes/vendor/bootstrap/affix.js +0 -162
- data/client/lanes/vendor/bootstrap/alert.js +0 -94
- data/client/lanes/vendor/bootstrap/button.js +0 -116
- data/client/lanes/vendor/bootstrap/carousel.js +0 -240
- data/client/lanes/vendor/bootstrap/collapse.js +0 -211
- data/client/lanes/vendor/bootstrap/dropdown.js +0 -161
- data/client/lanes/vendor/bootstrap/modal.js +0 -324
- data/client/lanes/vendor/bootstrap/popover.js +0 -119
- data/client/lanes/vendor/bootstrap/scrollspy.js +0 -175
- data/client/lanes/vendor/bootstrap/tab.js +0 -153
- data/client/lanes/vendor/bootstrap/tooltip.js +0 -478
- data/client/lanes/vendor/bootstrap/transition.js +0 -59
- data/client/lanes/vendor/message-bus.js +0 -285
- data/client/lanes/vendor/modern-stack.js +0 -27
- data/client/lanes/vendor/packaged.js +0 -19533
- data/client/lanes/views/Assets.coffee +0 -9
- data/client/lanes/views/Base.coffee +0 -426
- data/client/lanes/views/Functions.coffee +0 -13
- data/client/lanes/views/Helpers.coffee +0 -76
- data/client/lanes/views/Keys.coffee +0 -59
- data/client/lanes/views/RenderContext.coffee +0 -32
- data/client/lanes/views/SaveNotify.coffee +0 -32
- data/client/lanes/views/Viewport.coffee +0 -18
- data/client/lanes/views/_button.html +0 -3
- data/client/lanes/views/_toolbar.html +0 -23
- data/client/lanes/views/empty-span.html +0 -1
- data/client/lanes/views/index.js +0 -2
- data/client/lanes/views/model-update.html +0 -15
- data/client/lanes/workspace/ActiveScreensSwitcher.coffee +0 -112
- data/client/lanes/workspace/Layout.coffee +0 -29
- data/client/lanes/workspace/Navbar.coffee +0 -31
- data/client/lanes/workspace/Pages.coffee +0 -39
- data/client/lanes/workspace/ScreensMenu.coffee +0 -126
- data/client/lanes/workspace/WorkspaceView.coffee +0 -8
- data/client/lanes/workspace/layout.html +0 -4
- data/client/lanes/workspace/menu.html +0 -356
- data/client/lanes/workspace/menu_toggle.html +0 -9
- data/client/lanes/workspace/navbar.html +0 -17
- data/client/lanes/workspace/pages.html +0 -6
- data/client/lanes/workspace/screens-menu.html +0 -11
- data/client/lanes/workspace/screens-switcher.html +0 -7
- data/docs/view.md +0 -292
- data/lib/lanes/command/generate_view.rb +0 -38
- data/lib/lanes/command/generate_view.usage +0 -13
- data/spec/command-reference-files/initial/client/appy-app/Router.coffee +0 -4
- data/spec/command-reference-files/initial/client/appy-app/controllers/.gitkeep +0 -0
- data/spec/command-reference-files/initial/client/appy-app/views/.gitkeep +0 -0
- data/spec/command-reference-files/initial/client/appy-app/views/Base.coffee +0 -5
- data/spec/command-reference-files/initial/spec/appy-app/screens/Base.coffee +0 -5
- data/spec/command-reference-files/screen/client/appy-app/screens/ready-set-go/ReadySetGo.coffee +0 -6
- data/spec/command-reference-files/screen/client/appy-app/screens/ready-set-go/layout.html +0 -3
- data/spec/command-reference-files/view/client/appy-app/views/BigView.coffee +0 -10
- data/spec/command-reference-files/view/spec/appy-app/views/BigViewSpec.coffee +0 -5
- data/templates/client/Router.coffee +0 -4
- data/templates/client/components/Component.coffee +0 -1
- data/templates/client/screens/Base.coffee +0 -3
- data/templates/client/screens/Screen.coffee +0 -11
- data/templates/client/screens/layout.html +0 -3
- data/templates/client/views/.gitkeep +0 -0
- data/templates/client/views/BaseView.coffee +0 -5
- data/templates/client/views/View.coffee +0 -10
- data/templates/spec/client/views/ViewSpec.coffee +0 -5
@@ -1,119 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.3.1
|
3
|
-
* http://getbootstrap.com/javascript/#popovers
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// POPOVER PUBLIC CLASS DEFINITION
|
14
|
-
// ===============================
|
15
|
-
|
16
|
-
var Popover = function (element, options) {
|
17
|
-
this.init('popover', element, options)
|
18
|
-
}
|
19
|
-
|
20
|
-
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
21
|
-
|
22
|
-
Popover.VERSION = '3.3.1'
|
23
|
-
|
24
|
-
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
25
|
-
placement: 'right',
|
26
|
-
trigger: 'click',
|
27
|
-
content: '',
|
28
|
-
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
29
|
-
})
|
30
|
-
|
31
|
-
|
32
|
-
// NOTE: POPOVER EXTENDS tooltip.js
|
33
|
-
// ================================
|
34
|
-
|
35
|
-
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
|
36
|
-
|
37
|
-
Popover.prototype.constructor = Popover
|
38
|
-
|
39
|
-
Popover.prototype.getDefaults = function () {
|
40
|
-
return Popover.DEFAULTS
|
41
|
-
}
|
42
|
-
|
43
|
-
Popover.prototype.setContent = function () {
|
44
|
-
var $tip = this.tip()
|
45
|
-
var title = this.getTitle()
|
46
|
-
var content = this.getContent()
|
47
|
-
|
48
|
-
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
49
|
-
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
|
50
|
-
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
51
|
-
](content)
|
52
|
-
|
53
|
-
$tip.removeClass('fade top bottom left right in')
|
54
|
-
|
55
|
-
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
56
|
-
// this manually by checking the contents.
|
57
|
-
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
58
|
-
}
|
59
|
-
|
60
|
-
Popover.prototype.hasContent = function () {
|
61
|
-
return this.getTitle() || this.getContent()
|
62
|
-
}
|
63
|
-
|
64
|
-
Popover.prototype.getContent = function () {
|
65
|
-
var $e = this.$element
|
66
|
-
var o = this.options
|
67
|
-
|
68
|
-
return $e.attr('data-content')
|
69
|
-
|| (typeof o.content == 'function' ?
|
70
|
-
o.content.call($e[0]) :
|
71
|
-
o.content)
|
72
|
-
}
|
73
|
-
|
74
|
-
Popover.prototype.arrow = function () {
|
75
|
-
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
76
|
-
}
|
77
|
-
|
78
|
-
Popover.prototype.tip = function () {
|
79
|
-
if (!this.$tip) this.$tip = $(this.options.template)
|
80
|
-
return this.$tip
|
81
|
-
}
|
82
|
-
|
83
|
-
|
84
|
-
// POPOVER PLUGIN DEFINITION
|
85
|
-
// =========================
|
86
|
-
|
87
|
-
function Plugin(option) {
|
88
|
-
return this.each(function () {
|
89
|
-
var $this = $(this)
|
90
|
-
var data = $this.data('bs.popover')
|
91
|
-
var options = typeof option == 'object' && option
|
92
|
-
var selector = options && options.selector
|
93
|
-
|
94
|
-
if (!data && option == 'destroy') return
|
95
|
-
if (selector) {
|
96
|
-
if (!data) $this.data('bs.popover', (data = {}))
|
97
|
-
if (!data[selector]) data[selector] = new Popover(this, options)
|
98
|
-
} else {
|
99
|
-
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
100
|
-
}
|
101
|
-
if (typeof option == 'string') data[option]()
|
102
|
-
})
|
103
|
-
}
|
104
|
-
|
105
|
-
var old = $.fn.popover
|
106
|
-
|
107
|
-
$.fn.popover = Plugin
|
108
|
-
$.fn.popover.Constructor = Popover
|
109
|
-
|
110
|
-
|
111
|
-
// POPOVER NO CONFLICT
|
112
|
-
// ===================
|
113
|
-
|
114
|
-
$.fn.popover.noConflict = function () {
|
115
|
-
$.fn.popover = old
|
116
|
-
return this
|
117
|
-
}
|
118
|
-
|
119
|
-
}(jQuery);
|
@@ -1,175 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.3.1
|
3
|
-
* http://getbootstrap.com/javascript/#scrollspy
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// SCROLLSPY CLASS DEFINITION
|
14
|
-
// ==========================
|
15
|
-
|
16
|
-
function ScrollSpy(element, options) {
|
17
|
-
var process = $.proxy(this.process, this)
|
18
|
-
|
19
|
-
this.$body = $('body')
|
20
|
-
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
21
|
-
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
22
|
-
this.selector = (this.options.target || '') + ' .nav li > a'
|
23
|
-
this.offsets = []
|
24
|
-
this.targets = []
|
25
|
-
this.activeTarget = null
|
26
|
-
this.scrollHeight = 0
|
27
|
-
|
28
|
-
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
29
|
-
this.refresh()
|
30
|
-
this.process()
|
31
|
-
}
|
32
|
-
|
33
|
-
ScrollSpy.VERSION = '3.3.1'
|
34
|
-
|
35
|
-
ScrollSpy.DEFAULTS = {
|
36
|
-
offset: 10
|
37
|
-
}
|
38
|
-
|
39
|
-
ScrollSpy.prototype.getScrollHeight = function () {
|
40
|
-
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
41
|
-
}
|
42
|
-
|
43
|
-
ScrollSpy.prototype.refresh = function () {
|
44
|
-
var offsetMethod = 'offset'
|
45
|
-
var offsetBase = 0
|
46
|
-
|
47
|
-
if (!$.isWindow(this.$scrollElement[0])) {
|
48
|
-
offsetMethod = 'position'
|
49
|
-
offsetBase = this.$scrollElement.scrollTop()
|
50
|
-
}
|
51
|
-
|
52
|
-
this.offsets = []
|
53
|
-
this.targets = []
|
54
|
-
this.scrollHeight = this.getScrollHeight()
|
55
|
-
|
56
|
-
var self = this
|
57
|
-
|
58
|
-
this.$body
|
59
|
-
.find(this.selector)
|
60
|
-
.map(function () {
|
61
|
-
var $el = $(this)
|
62
|
-
var href = $el.data('target') || $el.attr('href')
|
63
|
-
var $href = /^#./.test(href) && $(href)
|
64
|
-
|
65
|
-
return ($href
|
66
|
-
&& $href.length
|
67
|
-
&& $href.is(':visible')
|
68
|
-
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
69
|
-
})
|
70
|
-
.sort(function (a, b) { return a[0] - b[0] })
|
71
|
-
.each(function () {
|
72
|
-
self.offsets.push(this[0])
|
73
|
-
self.targets.push(this[1])
|
74
|
-
})
|
75
|
-
}
|
76
|
-
|
77
|
-
ScrollSpy.prototype.process = function () {
|
78
|
-
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
79
|
-
var scrollHeight = this.getScrollHeight()
|
80
|
-
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
|
81
|
-
var offsets = this.offsets
|
82
|
-
var targets = this.targets
|
83
|
-
var activeTarget = this.activeTarget
|
84
|
-
var i
|
85
|
-
|
86
|
-
if (this.scrollHeight != scrollHeight) {
|
87
|
-
this.refresh()
|
88
|
-
}
|
89
|
-
|
90
|
-
if (scrollTop >= maxScroll) {
|
91
|
-
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
92
|
-
}
|
93
|
-
|
94
|
-
if (activeTarget && scrollTop < offsets[0]) {
|
95
|
-
this.activeTarget = null
|
96
|
-
return this.clear()
|
97
|
-
}
|
98
|
-
|
99
|
-
for (i = offsets.length; i--;) {
|
100
|
-
activeTarget != targets[i]
|
101
|
-
&& scrollTop >= offsets[i]
|
102
|
-
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
103
|
-
&& this.activate(targets[i])
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
ScrollSpy.prototype.activate = function (target) {
|
108
|
-
this.activeTarget = target
|
109
|
-
|
110
|
-
this.clear()
|
111
|
-
|
112
|
-
var selector = this.selector +
|
113
|
-
'[data-target="' + target + '"],' +
|
114
|
-
this.selector + '[href="' + target + '"]'
|
115
|
-
|
116
|
-
var active = $(selector)
|
117
|
-
.parents('li')
|
118
|
-
.addClass('active')
|
119
|
-
|
120
|
-
if (active.parent('.dropdown-menu').length) {
|
121
|
-
active = active
|
122
|
-
.closest('li.dropdown')
|
123
|
-
.addClass('active')
|
124
|
-
}
|
125
|
-
|
126
|
-
active.trigger('activate.bs.scrollspy')
|
127
|
-
}
|
128
|
-
|
129
|
-
ScrollSpy.prototype.clear = function () {
|
130
|
-
$(this.selector)
|
131
|
-
.parentsUntil(this.options.target, '.active')
|
132
|
-
.removeClass('active')
|
133
|
-
}
|
134
|
-
|
135
|
-
|
136
|
-
// SCROLLSPY PLUGIN DEFINITION
|
137
|
-
// ===========================
|
138
|
-
|
139
|
-
function Plugin(option) {
|
140
|
-
return this.each(function () {
|
141
|
-
var $this = $(this)
|
142
|
-
var data = $this.data('bs.scrollspy')
|
143
|
-
var options = typeof option == 'object' && option
|
144
|
-
|
145
|
-
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
146
|
-
if (typeof option == 'string') data[option]()
|
147
|
-
})
|
148
|
-
}
|
149
|
-
|
150
|
-
var old = $.fn.scrollspy
|
151
|
-
|
152
|
-
$.fn.scrollspy = Plugin
|
153
|
-
$.fn.scrollspy.Constructor = ScrollSpy
|
154
|
-
|
155
|
-
|
156
|
-
// SCROLLSPY NO CONFLICT
|
157
|
-
// =====================
|
158
|
-
|
159
|
-
$.fn.scrollspy.noConflict = function () {
|
160
|
-
$.fn.scrollspy = old
|
161
|
-
return this
|
162
|
-
}
|
163
|
-
|
164
|
-
|
165
|
-
// SCROLLSPY DATA-API
|
166
|
-
// ==================
|
167
|
-
|
168
|
-
$(window).on('load.bs.scrollspy.data-api', function () {
|
169
|
-
$('[data-spy="scroll"]').each(function () {
|
170
|
-
var $spy = $(this)
|
171
|
-
Plugin.call($spy, $spy.data())
|
172
|
-
})
|
173
|
-
})
|
174
|
-
|
175
|
-
}(jQuery);
|
@@ -1,153 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: tab.js v3.3.1
|
3
|
-
* http://getbootstrap.com/javascript/#tabs
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// TAB CLASS DEFINITION
|
14
|
-
// ====================
|
15
|
-
|
16
|
-
var Tab = function (element) {
|
17
|
-
this.element = $(element)
|
18
|
-
}
|
19
|
-
|
20
|
-
Tab.VERSION = '3.3.1'
|
21
|
-
|
22
|
-
Tab.TRANSITION_DURATION = 150
|
23
|
-
|
24
|
-
Tab.prototype.show = function () {
|
25
|
-
var $this = this.element
|
26
|
-
var $ul = $this.closest('ul:not(.dropdown-menu)')
|
27
|
-
var selector = $this.data('target')
|
28
|
-
|
29
|
-
if (!selector) {
|
30
|
-
selector = $this.attr('href')
|
31
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
32
|
-
}
|
33
|
-
|
34
|
-
if ($this.parent('li').hasClass('active')) return
|
35
|
-
|
36
|
-
var $previous = $ul.find('.active:last a')
|
37
|
-
var hideEvent = $.Event('hide.bs.tab', {
|
38
|
-
relatedTarget: $this[0]
|
39
|
-
})
|
40
|
-
var showEvent = $.Event('show.bs.tab', {
|
41
|
-
relatedTarget: $previous[0]
|
42
|
-
})
|
43
|
-
|
44
|
-
$previous.trigger(hideEvent)
|
45
|
-
$this.trigger(showEvent)
|
46
|
-
|
47
|
-
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
|
48
|
-
|
49
|
-
var $target = $(selector)
|
50
|
-
|
51
|
-
this.activate($this.closest('li'), $ul)
|
52
|
-
this.activate($target, $target.parent(), function () {
|
53
|
-
$previous.trigger({
|
54
|
-
type: 'hidden.bs.tab',
|
55
|
-
relatedTarget: $this[0]
|
56
|
-
})
|
57
|
-
$this.trigger({
|
58
|
-
type: 'shown.bs.tab',
|
59
|
-
relatedTarget: $previous[0]
|
60
|
-
})
|
61
|
-
})
|
62
|
-
}
|
63
|
-
|
64
|
-
Tab.prototype.activate = function (element, container, callback) {
|
65
|
-
var $active = container.find('> .active')
|
66
|
-
var transition = callback
|
67
|
-
&& $.support.transition
|
68
|
-
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
|
69
|
-
|
70
|
-
function next() {
|
71
|
-
$active
|
72
|
-
.removeClass('active')
|
73
|
-
.find('> .dropdown-menu > .active')
|
74
|
-
.removeClass('active')
|
75
|
-
.end()
|
76
|
-
.find('[data-toggle="tab"]')
|
77
|
-
.attr('aria-expanded', false)
|
78
|
-
|
79
|
-
element
|
80
|
-
.addClass('active')
|
81
|
-
.find('[data-toggle="tab"]')
|
82
|
-
.attr('aria-expanded', true)
|
83
|
-
|
84
|
-
if (transition) {
|
85
|
-
element[0].offsetWidth // reflow for transition
|
86
|
-
element.addClass('in')
|
87
|
-
} else {
|
88
|
-
element.removeClass('fade')
|
89
|
-
}
|
90
|
-
|
91
|
-
if (element.parent('.dropdown-menu')) {
|
92
|
-
element
|
93
|
-
.closest('li.dropdown')
|
94
|
-
.addClass('active')
|
95
|
-
.end()
|
96
|
-
.find('[data-toggle="tab"]')
|
97
|
-
.attr('aria-expanded', true)
|
98
|
-
}
|
99
|
-
|
100
|
-
callback && callback()
|
101
|
-
}
|
102
|
-
|
103
|
-
$active.length && transition ?
|
104
|
-
$active
|
105
|
-
.one('bsTransitionEnd', next)
|
106
|
-
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
|
107
|
-
next()
|
108
|
-
|
109
|
-
$active.removeClass('in')
|
110
|
-
}
|
111
|
-
|
112
|
-
|
113
|
-
// TAB PLUGIN DEFINITION
|
114
|
-
// =====================
|
115
|
-
|
116
|
-
function Plugin(option) {
|
117
|
-
return this.each(function () {
|
118
|
-
var $this = $(this)
|
119
|
-
var data = $this.data('bs.tab')
|
120
|
-
|
121
|
-
if (!data) $this.data('bs.tab', (data = new Tab(this)))
|
122
|
-
if (typeof option == 'string') data[option]()
|
123
|
-
})
|
124
|
-
}
|
125
|
-
|
126
|
-
var old = $.fn.tab
|
127
|
-
|
128
|
-
$.fn.tab = Plugin
|
129
|
-
$.fn.tab.Constructor = Tab
|
130
|
-
|
131
|
-
|
132
|
-
// TAB NO CONFLICT
|
133
|
-
// ===============
|
134
|
-
|
135
|
-
$.fn.tab.noConflict = function () {
|
136
|
-
$.fn.tab = old
|
137
|
-
return this
|
138
|
-
}
|
139
|
-
|
140
|
-
|
141
|
-
// TAB DATA-API
|
142
|
-
// ============
|
143
|
-
|
144
|
-
var clickHandler = function (e) {
|
145
|
-
e.preventDefault()
|
146
|
-
Plugin.call($(this), 'show')
|
147
|
-
}
|
148
|
-
|
149
|
-
$(document)
|
150
|
-
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
|
151
|
-
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
|
152
|
-
|
153
|
-
}(jQuery);
|
@@ -1,478 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: tooltip.js v3.3.1
|
3
|
-
* http://getbootstrap.com/javascript/#tooltip
|
4
|
-
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
|
-
* ========================================================================
|
6
|
-
* Copyright 2011-2014 Twitter, Inc.
|
7
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
8
|
-
* ======================================================================== */
|
9
|
-
|
10
|
-
|
11
|
-
+function ($) {
|
12
|
-
'use strict';
|
13
|
-
|
14
|
-
// TOOLTIP PUBLIC CLASS DEFINITION
|
15
|
-
// ===============================
|
16
|
-
|
17
|
-
var Tooltip = function (element, options) {
|
18
|
-
this.type =
|
19
|
-
this.options =
|
20
|
-
this.enabled =
|
21
|
-
this.timeout =
|
22
|
-
this.hoverState =
|
23
|
-
this.$element = null
|
24
|
-
|
25
|
-
this.init('tooltip', element, options)
|
26
|
-
}
|
27
|
-
|
28
|
-
Tooltip.VERSION = '3.3.1'
|
29
|
-
|
30
|
-
Tooltip.TRANSITION_DURATION = 150
|
31
|
-
|
32
|
-
Tooltip.DEFAULTS = {
|
33
|
-
animation: true,
|
34
|
-
placement: 'top',
|
35
|
-
selector: false,
|
36
|
-
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
37
|
-
trigger: 'hover focus',
|
38
|
-
title: '',
|
39
|
-
delay: 0,
|
40
|
-
html: false,
|
41
|
-
container: false,
|
42
|
-
viewport: {
|
43
|
-
selector: 'body',
|
44
|
-
padding: 0
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
Tooltip.prototype.init = function (type, element, options) {
|
49
|
-
this.enabled = true
|
50
|
-
this.type = type
|
51
|
-
this.$element = $(element)
|
52
|
-
this.options = this.getOptions(options)
|
53
|
-
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
|
54
|
-
|
55
|
-
var triggers = this.options.trigger.split(' ')
|
56
|
-
|
57
|
-
for (var i = triggers.length; i--;) {
|
58
|
-
var trigger = triggers[i]
|
59
|
-
|
60
|
-
if (trigger == 'click') {
|
61
|
-
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
62
|
-
} else if (trigger != 'manual') {
|
63
|
-
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
|
64
|
-
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
|
65
|
-
|
66
|
-
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
67
|
-
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
this.options.selector ?
|
72
|
-
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
73
|
-
this.fixTitle()
|
74
|
-
}
|
75
|
-
|
76
|
-
Tooltip.prototype.getDefaults = function () {
|
77
|
-
return Tooltip.DEFAULTS
|
78
|
-
}
|
79
|
-
|
80
|
-
Tooltip.prototype.getOptions = function (options) {
|
81
|
-
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
|
82
|
-
|
83
|
-
if (options.delay && typeof options.delay == 'number') {
|
84
|
-
options.delay = {
|
85
|
-
show: options.delay,
|
86
|
-
hide: options.delay
|
87
|
-
}
|
88
|
-
}
|
89
|
-
|
90
|
-
return options
|
91
|
-
}
|
92
|
-
|
93
|
-
Tooltip.prototype.getDelegateOptions = function () {
|
94
|
-
var options = {}
|
95
|
-
var defaults = this.getDefaults()
|
96
|
-
|
97
|
-
this._options && $.each(this._options, function (key, value) {
|
98
|
-
if (defaults[key] != value) options[key] = value
|
99
|
-
})
|
100
|
-
|
101
|
-
return options
|
102
|
-
}
|
103
|
-
|
104
|
-
Tooltip.prototype.enter = function (obj) {
|
105
|
-
var self = obj instanceof this.constructor ?
|
106
|
-
obj : $(obj.currentTarget).data('bs.' + this.type)
|
107
|
-
|
108
|
-
if (self && self.$tip && self.$tip.is(':visible')) {
|
109
|
-
self.hoverState = 'in'
|
110
|
-
return
|
111
|
-
}
|
112
|
-
|
113
|
-
if (!self) {
|
114
|
-
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
115
|
-
$(obj.currentTarget).data('bs.' + this.type, self)
|
116
|
-
}
|
117
|
-
|
118
|
-
clearTimeout(self.timeout)
|
119
|
-
|
120
|
-
self.hoverState = 'in'
|
121
|
-
|
122
|
-
if (!self.options.delay || !self.options.delay.show) return self.show()
|
123
|
-
|
124
|
-
self.timeout = setTimeout(function () {
|
125
|
-
if (self.hoverState == 'in') self.show()
|
126
|
-
}, self.options.delay.show)
|
127
|
-
}
|
128
|
-
|
129
|
-
Tooltip.prototype.leave = function (obj) {
|
130
|
-
var self = obj instanceof this.constructor ?
|
131
|
-
obj : $(obj.currentTarget).data('bs.' + this.type)
|
132
|
-
|
133
|
-
if (!self) {
|
134
|
-
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
|
135
|
-
$(obj.currentTarget).data('bs.' + this.type, self)
|
136
|
-
}
|
137
|
-
|
138
|
-
clearTimeout(self.timeout)
|
139
|
-
|
140
|
-
self.hoverState = 'out'
|
141
|
-
|
142
|
-
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
143
|
-
|
144
|
-
self.timeout = setTimeout(function () {
|
145
|
-
if (self.hoverState == 'out') self.hide()
|
146
|
-
}, self.options.delay.hide)
|
147
|
-
}
|
148
|
-
|
149
|
-
Tooltip.prototype.show = function () {
|
150
|
-
var e = $.Event('show.bs.' + this.type)
|
151
|
-
|
152
|
-
if (this.hasContent() && this.enabled) {
|
153
|
-
this.$element.trigger(e)
|
154
|
-
|
155
|
-
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
|
156
|
-
if (e.isDefaultPrevented() || !inDom) return
|
157
|
-
var that = this
|
158
|
-
|
159
|
-
var $tip = this.tip()
|
160
|
-
|
161
|
-
var tipId = this.getUID(this.type)
|
162
|
-
|
163
|
-
this.setContent()
|
164
|
-
$tip.attr('id', tipId)
|
165
|
-
this.$element.attr('aria-describedby', tipId)
|
166
|
-
|
167
|
-
if (this.options.animation) $tip.addClass('fade')
|
168
|
-
|
169
|
-
var placement = typeof this.options.placement == 'function' ?
|
170
|
-
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
171
|
-
this.options.placement
|
172
|
-
|
173
|
-
var autoToken = /\s?auto?\s?/i
|
174
|
-
var autoPlace = autoToken.test(placement)
|
175
|
-
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
|
176
|
-
|
177
|
-
$tip
|
178
|
-
.detach()
|
179
|
-
.css({ top: 0, left: 0, display: 'block' })
|
180
|
-
.addClass(placement)
|
181
|
-
.data('bs.' + this.type, this)
|
182
|
-
|
183
|
-
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
184
|
-
|
185
|
-
var pos = this.getPosition()
|
186
|
-
var actualWidth = $tip[0].offsetWidth
|
187
|
-
var actualHeight = $tip[0].offsetHeight
|
188
|
-
|
189
|
-
if (autoPlace) {
|
190
|
-
var orgPlacement = placement
|
191
|
-
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
|
192
|
-
var containerDim = this.getPosition($container)
|
193
|
-
|
194
|
-
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
|
195
|
-
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
|
196
|
-
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
|
197
|
-
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
|
198
|
-
placement
|
199
|
-
|
200
|
-
$tip
|
201
|
-
.removeClass(orgPlacement)
|
202
|
-
.addClass(placement)
|
203
|
-
}
|
204
|
-
|
205
|
-
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
206
|
-
|
207
|
-
this.applyPlacement(calculatedOffset, placement)
|
208
|
-
|
209
|
-
var complete = function () {
|
210
|
-
var prevHoverState = that.hoverState
|
211
|
-
that.$element.trigger('shown.bs.' + that.type)
|
212
|
-
that.hoverState = null
|
213
|
-
|
214
|
-
if (prevHoverState == 'out') that.leave(that)
|
215
|
-
}
|
216
|
-
|
217
|
-
$.support.transition && this.$tip.hasClass('fade') ?
|
218
|
-
$tip
|
219
|
-
.one('bsTransitionEnd', complete)
|
220
|
-
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
221
|
-
complete()
|
222
|
-
}
|
223
|
-
}
|
224
|
-
|
225
|
-
Tooltip.prototype.applyPlacement = function (offset, placement) {
|
226
|
-
var $tip = this.tip()
|
227
|
-
var width = $tip[0].offsetWidth
|
228
|
-
var height = $tip[0].offsetHeight
|
229
|
-
|
230
|
-
// manually read margins because getBoundingClientRect includes difference
|
231
|
-
var marginTop = parseInt($tip.css('margin-top'), 10)
|
232
|
-
var marginLeft = parseInt($tip.css('margin-left'), 10)
|
233
|
-
|
234
|
-
// we must check for NaN for ie 8/9
|
235
|
-
if (isNaN(marginTop)) marginTop = 0
|
236
|
-
if (isNaN(marginLeft)) marginLeft = 0
|
237
|
-
|
238
|
-
offset.top = offset.top + marginTop
|
239
|
-
offset.left = offset.left + marginLeft
|
240
|
-
|
241
|
-
// $.fn.offset doesn't round pixel values
|
242
|
-
// so we use setOffset directly with our own function B-0
|
243
|
-
$.offset.setOffset($tip[0], $.extend({
|
244
|
-
using: function (props) {
|
245
|
-
$tip.css({
|
246
|
-
top: Math.round(props.top),
|
247
|
-
left: Math.round(props.left)
|
248
|
-
})
|
249
|
-
}
|
250
|
-
}, offset), 0)
|
251
|
-
|
252
|
-
$tip.addClass('in')
|
253
|
-
|
254
|
-
// check to see if placing tip in new offset caused the tip to resize itself
|
255
|
-
var actualWidth = $tip[0].offsetWidth
|
256
|
-
var actualHeight = $tip[0].offsetHeight
|
257
|
-
|
258
|
-
if (placement == 'top' && actualHeight != height) {
|
259
|
-
offset.top = offset.top + height - actualHeight
|
260
|
-
}
|
261
|
-
|
262
|
-
var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
|
263
|
-
|
264
|
-
if (delta.left) offset.left += delta.left
|
265
|
-
else offset.top += delta.top
|
266
|
-
|
267
|
-
var isVertical = /top|bottom/.test(placement)
|
268
|
-
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
|
269
|
-
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
|
270
|
-
|
271
|
-
$tip.offset(offset)
|
272
|
-
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
|
273
|
-
}
|
274
|
-
|
275
|
-
Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
|
276
|
-
this.arrow()
|
277
|
-
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
|
278
|
-
.css(isHorizontal ? 'top' : 'left', '')
|
279
|
-
}
|
280
|
-
|
281
|
-
Tooltip.prototype.setContent = function () {
|
282
|
-
var $tip = this.tip()
|
283
|
-
var title = this.getTitle()
|
284
|
-
|
285
|
-
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
286
|
-
$tip.removeClass('fade in top bottom left right')
|
287
|
-
}
|
288
|
-
|
289
|
-
Tooltip.prototype.hide = function (callback) {
|
290
|
-
var that = this
|
291
|
-
var $tip = this.tip()
|
292
|
-
var e = $.Event('hide.bs.' + this.type)
|
293
|
-
|
294
|
-
function complete() {
|
295
|
-
if (that.hoverState != 'in') $tip.detach()
|
296
|
-
that.$element
|
297
|
-
.removeAttr('aria-describedby')
|
298
|
-
.trigger('hidden.bs.' + that.type)
|
299
|
-
callback && callback()
|
300
|
-
}
|
301
|
-
|
302
|
-
this.$element.trigger(e)
|
303
|
-
|
304
|
-
if (e.isDefaultPrevented()) return
|
305
|
-
|
306
|
-
$tip.removeClass('in')
|
307
|
-
|
308
|
-
$.support.transition && this.$tip.hasClass('fade') ?
|
309
|
-
$tip
|
310
|
-
.one('bsTransitionEnd', complete)
|
311
|
-
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
|
312
|
-
complete()
|
313
|
-
|
314
|
-
this.hoverState = null
|
315
|
-
|
316
|
-
return this
|
317
|
-
}
|
318
|
-
|
319
|
-
Tooltip.prototype.fixTitle = function () {
|
320
|
-
var $e = this.$element
|
321
|
-
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
|
322
|
-
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
323
|
-
}
|
324
|
-
}
|
325
|
-
|
326
|
-
Tooltip.prototype.hasContent = function () {
|
327
|
-
return this.getTitle()
|
328
|
-
}
|
329
|
-
|
330
|
-
Tooltip.prototype.getPosition = function ($element) {
|
331
|
-
$element = $element || this.$element
|
332
|
-
|
333
|
-
var el = $element[0]
|
334
|
-
var isBody = el.tagName == 'BODY'
|
335
|
-
|
336
|
-
var elRect = el.getBoundingClientRect()
|
337
|
-
if (elRect.width == null) {
|
338
|
-
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
339
|
-
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
340
|
-
}
|
341
|
-
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
342
|
-
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
343
|
-
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
344
|
-
|
345
|
-
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
346
|
-
}
|
347
|
-
|
348
|
-
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
349
|
-
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
350
|
-
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
351
|
-
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
352
|
-
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
353
|
-
|
354
|
-
}
|
355
|
-
|
356
|
-
Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
|
357
|
-
var delta = { top: 0, left: 0 }
|
358
|
-
if (!this.$viewport) return delta
|
359
|
-
|
360
|
-
var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
|
361
|
-
var viewportDimensions = this.getPosition(this.$viewport)
|
362
|
-
|
363
|
-
if (/right|left/.test(placement)) {
|
364
|
-
var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
|
365
|
-
var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
|
366
|
-
if (topEdgeOffset < viewportDimensions.top) { // top overflow
|
367
|
-
delta.top = viewportDimensions.top - topEdgeOffset
|
368
|
-
} else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
|
369
|
-
delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
|
370
|
-
}
|
371
|
-
} else {
|
372
|
-
var leftEdgeOffset = pos.left - viewportPadding
|
373
|
-
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
|
374
|
-
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
|
375
|
-
delta.left = viewportDimensions.left - leftEdgeOffset
|
376
|
-
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
|
377
|
-
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
|
378
|
-
}
|
379
|
-
}
|
380
|
-
|
381
|
-
return delta
|
382
|
-
}
|
383
|
-
|
384
|
-
Tooltip.prototype.getTitle = function () {
|
385
|
-
var title
|
386
|
-
var $e = this.$element
|
387
|
-
var o = this.options
|
388
|
-
|
389
|
-
title = $e.attr('data-original-title')
|
390
|
-
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
391
|
-
|
392
|
-
return title
|
393
|
-
}
|
394
|
-
|
395
|
-
Tooltip.prototype.getUID = function (prefix) {
|
396
|
-
do prefix += ~~(Math.random() * 1000000)
|
397
|
-
while (document.getElementById(prefix))
|
398
|
-
return prefix
|
399
|
-
}
|
400
|
-
|
401
|
-
Tooltip.prototype.tip = function () {
|
402
|
-
return (this.$tip = this.$tip || $(this.options.template))
|
403
|
-
}
|
404
|
-
|
405
|
-
Tooltip.prototype.arrow = function () {
|
406
|
-
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
|
407
|
-
}
|
408
|
-
|
409
|
-
Tooltip.prototype.enable = function () {
|
410
|
-
this.enabled = true
|
411
|
-
}
|
412
|
-
|
413
|
-
Tooltip.prototype.disable = function () {
|
414
|
-
this.enabled = false
|
415
|
-
}
|
416
|
-
|
417
|
-
Tooltip.prototype.toggleEnabled = function () {
|
418
|
-
this.enabled = !this.enabled
|
419
|
-
}
|
420
|
-
|
421
|
-
Tooltip.prototype.toggle = function (e) {
|
422
|
-
var self = this
|
423
|
-
if (e) {
|
424
|
-
self = $(e.currentTarget).data('bs.' + this.type)
|
425
|
-
if (!self) {
|
426
|
-
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
|
427
|
-
$(e.currentTarget).data('bs.' + this.type, self)
|
428
|
-
}
|
429
|
-
}
|
430
|
-
|
431
|
-
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
432
|
-
}
|
433
|
-
|
434
|
-
Tooltip.prototype.destroy = function () {
|
435
|
-
var that = this
|
436
|
-
clearTimeout(this.timeout)
|
437
|
-
this.hide(function () {
|
438
|
-
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
439
|
-
})
|
440
|
-
}
|
441
|
-
|
442
|
-
|
443
|
-
// TOOLTIP PLUGIN DEFINITION
|
444
|
-
// =========================
|
445
|
-
|
446
|
-
function Plugin(option) {
|
447
|
-
return this.each(function () {
|
448
|
-
var $this = $(this)
|
449
|
-
var data = $this.data('bs.tooltip')
|
450
|
-
var options = typeof option == 'object' && option
|
451
|
-
var selector = options && options.selector
|
452
|
-
|
453
|
-
if (!data && option == 'destroy') return
|
454
|
-
if (selector) {
|
455
|
-
if (!data) $this.data('bs.tooltip', (data = {}))
|
456
|
-
if (!data[selector]) data[selector] = new Tooltip(this, options)
|
457
|
-
} else {
|
458
|
-
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
459
|
-
}
|
460
|
-
if (typeof option == 'string') data[option]()
|
461
|
-
})
|
462
|
-
}
|
463
|
-
|
464
|
-
var old = $.fn.tooltip
|
465
|
-
|
466
|
-
$.fn.tooltip = Plugin
|
467
|
-
$.fn.tooltip.Constructor = Tooltip
|
468
|
-
|
469
|
-
|
470
|
-
// TOOLTIP NO CONFLICT
|
471
|
-
// ===================
|
472
|
-
|
473
|
-
$.fn.tooltip.noConflict = function () {
|
474
|
-
$.fn.tooltip = old
|
475
|
-
return this
|
476
|
-
}
|
477
|
-
|
478
|
-
}(jQuery);
|