luca 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +38 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +27 -0
- data/README.md +45 -42
- data/ROADMAP +6 -29
- data/{assets → app/assets}/images/glyphicons-halflings-white.png +0 -0
- data/{assets → app/assets}/images/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/luca/basic.coffee +8 -0
- data/{src → app/assets/javascripts/luca}/components/application.coffee +153 -40
- data/{src → app/assets/javascripts/luca}/components/base_toolbar.coffee +2 -2
- data/{src → app/assets/javascripts/luca}/components/collection_loader_view.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/collection_view.coffee +45 -104
- data/app/assets/javascripts/luca/components/controller.coffee +99 -0
- data/{src/core/field.coffee → app/assets/javascripts/luca/components/fields/base.coffee} +1 -1
- data/{src → app/assets/javascripts/luca}/components/fields/button_field.coffee +1 -2
- data/{src → app/assets/javascripts/luca}/components/fields/checkbox_array.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/fields/checkbox_field.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/fields/file_upload_field.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/fields/hidden_field.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/fields/label_field.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/fields/select_field.coffee +8 -4
- data/{src → app/assets/javascripts/luca}/components/fields/text_area_field.coffee +3 -2
- data/{src → app/assets/javascripts/luca}/components/fields/text_field.coffee +2 -3
- data/{src → app/assets/javascripts/luca}/components/fields/type_ahead_field.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/form_button_toolbar.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/form_view.coffee +111 -44
- data/{src → app/assets/javascripts/luca}/components/grid_view.coffee +6 -6
- data/{src → app/assets/javascripts/luca}/components/index.coffee +0 -0
- data/app/assets/javascripts/luca/components/load_mask.coffee +8 -0
- data/app/assets/javascripts/luca/components/multi_collection_view.coffee +92 -0
- data/{src → app/assets/javascripts/luca}/components/nav_bar.coffee +5 -1
- data/app/assets/javascripts/luca/components/page_controller.coffee +7 -0
- data/{src → app/assets/javascripts/luca}/components/pagination_control.coffee +13 -13
- data/{src → app/assets/javascripts/luca}/components/record_manager.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/router.coffee +6 -1
- data/app/assets/javascripts/luca/components/table_view.coffee +89 -0
- data/{src → app/assets/javascripts/luca}/components/template.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/components/toolbar_dialog.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/concerns/application_event_bindings.coffee +1 -1
- data/app/assets/javascripts/luca/concerns/collection_event_bindings.coffee +44 -0
- data/{src → app/assets/javascripts/luca}/concerns/deferrable.coffee +1 -2
- data/{src/plugins → app/assets/javascripts/luca/concerns}/development_tool_helpers.coffee +1 -1
- data/{src → app/assets/javascripts/luca}/concerns/dom_helpers.coffee +10 -7
- data/{src → app/assets/javascripts/luca}/concerns/enhanced_properties.coffee +0 -0
- data/app/assets/javascripts/luca/concerns/filterable.coffee +104 -0
- data/{src → app/assets/javascripts/luca}/concerns/grid_layout.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/concerns/loadmaskable.coffee +17 -11
- data/{src → app/assets/javascripts/luca}/concerns/local_storage.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/concerns/modal_view.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/concerns/model_presenter.coffee +0 -0
- data/{src → app/assets/javascripts/luca}/concerns/paginatable.coffee +6 -14
- data/app/assets/javascripts/luca/concerns/query_collection_bindings.coffee +46 -0
- data/app/assets/javascripts/luca/concerns/sortable.coffee +69 -0
- data/app/assets/javascripts/luca/concerns/state_model.coffee +44 -0
- data/{src → app/assets/javascripts/luca}/concerns/templating.coffee +4 -1
- data/app/assets/javascripts/luca/config.coffee +49 -0
- data/{src → app/assets/javascripts/luca}/containers/card_view.coffee +30 -13
- data/{src/core → app/assets/javascripts/luca/containers}/container.coffee +57 -18
- data/app/assets/javascripts/luca/containers/index.coffee +2 -0
- data/{src → app/assets/javascripts/luca}/containers/modal_view.coffee +1 -1
- data/{src → app/assets/javascripts/luca}/containers/panel_toolbar.coffee +1 -1
- data/{src → app/assets/javascripts/luca}/containers/tab_view.coffee +1 -1
- data/{src → app/assets/javascripts/luca}/containers/viewport.coffee +4 -4
- data/{src → app/assets/javascripts/luca}/core/collection.coffee +58 -49
- data/{src/plugins → app/assets/javascripts/luca/core}/events.coffee +34 -2
- data/app/assets/javascripts/luca/core/index.coffee +12 -0
- data/{src → app/assets/javascripts/luca}/core/model.coffee +1 -1
- data/{src → app/assets/javascripts/luca}/core/observer.coffee +0 -0
- data/app/assets/javascripts/luca/core/panel.coffee +112 -0
- data/app/assets/javascripts/luca/core/registry/component_definition.coffee +318 -0
- data/{src → app/assets/javascripts/luca/core/registry}/concerns.coffee +0 -0
- data/app/assets/javascripts/luca/core/registry/index.coffee +4 -0
- data/app/assets/javascripts/luca/core/registry/meta_data.coffee +97 -0
- data/{src/core → app/assets/javascripts/luca/core/registry}/registry.coffee +10 -6
- data/app/assets/javascripts/luca/core/templates.coffee +47 -0
- data/{src → app/assets/javascripts/luca}/core/view.coffee +69 -11
- data/app/assets/javascripts/luca/dependencies.coffee +7 -0
- data/{src/tools → app/assets/javascripts/luca/development}/code_mirror_field.coffee +2 -1
- data/{src/tools → app/assets/javascripts/luca/development}/console.coffee +6 -5
- data/app/assets/javascripts/luca/development/index.coffee +2 -0
- data/{src → app/assets/javascripts/luca}/framework.coffee +74 -90
- data/app/assets/javascripts/luca/index.coffee +8 -0
- data/{src → app/assets/javascripts/luca}/managers/collection_manager.coffee +16 -7
- data/app/assets/javascripts/luca/managers/index.coffee +2 -0
- data/app/assets/javascripts/luca/managers/socket_manager.coffee +66 -0
- data/{src → app/assets/javascripts/luca}/templates/components/bootstrap_form_controls.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/collection_loader_view.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/form_alert.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/grid_view.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/grid_view_empty_text.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/load_mask.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/nav_bar.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/components/pagination.jst.ejs +0 -0
- data/{src/templates → app/assets/javascripts/luca/templates/components}/table_view.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/containers/basic.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/containers/tab_selector_container.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/containers/tab_view.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/containers/toolbar_wrapper.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/button_field.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/button_field_link.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/checkbox_array.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/checkbox_array_item.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/checkbox_field.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/file_upload_field.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/hidden_field.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/select_field.jst.ejs +0 -0
- data/{src → app/assets/javascripts/luca}/templates/fields/text_area_field.jst.ejs +1 -1
- data/{src → app/assets/javascripts/luca}/templates/fields/text_field.jst.ejs +1 -1
- data/app/assets/javascripts/luca/util/deprecations.coffee +18 -0
- data/app/assets/javascripts/luca/util/index.coffee +3 -0
- data/app/assets/javascripts/luca/util/logging.coffee +15 -0
- data/{src/util.coffee → app/assets/javascripts/luca/util/luca.coffee} +20 -4
- data/{src/core → app/assets/javascripts/luca/util}/script_loader.coffee +0 -0
- data/app/assets/javascripts/luca-ui.js +1 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/components/checkbox_array.scss +0 -0
- data/app/assets/stylesheets/luca/components/form_view.scss +7 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/components/grid_view.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/components/load_mask.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/components/viewport.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/containers/container.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/containers/modal_view.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/containers/panels.scss +0 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/containers/tab_view.scss +0 -0
- data/{src/stylesheets/tools → app/assets/stylesheets/luca/development}/console.scss +0 -0
- data/app/assets/stylesheets/luca/development/index.css +3 -0
- data/app/assets/stylesheets/luca/index.css +4 -0
- data/{src/stylesheets → app/assets/stylesheets/luca}/normalize.scss +0 -0
- data/app.rb +2 -4
- data/lib/generators/luca/application/application_generator.rb +12 -8
- data/lib/generators/luca/application/templates/controller.rb +0 -2
- data/lib/generators/luca/application/templates/index.html.erb +12 -0
- data/lib/generators/luca/application/templates/index.html.haml +1 -0
- data/lib/generators/luca/application/templates/javascripts/application.coffee +18 -0
- data/lib/generators/luca/application/templates/javascripts/collection_manager.coffee +2 -0
- data/lib/generators/luca/application/templates/javascripts/config.coffee +3 -0
- data/lib/generators/luca/application/templates/javascripts/{dependencies.js.coffee → dependencies.coffee} +1 -0
- data/lib/generators/luca/application/templates/javascripts/home.jst.ejs +2 -0
- data/lib/generators/luca/application/templates/javascripts/index.coffee +15 -0
- data/lib/generators/luca/application/templates/javascripts/router.coffee +4 -0
- data/lib/luca/component_documentation.rb +72 -0
- data/lib/luca/rails/engine.rb +4 -0
- data/lib/luca/rails/version.rb +1 -1
- data/lib/luca.rb +1 -1
- data/lib/railties/luca/tasks.rake +31 -0
- data/luca.gemspec +1 -0
- data/spec/components/controller_spec.coffee +62 -0
- data/spec/components/form_view_spec.coffee +4 -0
- data/spec/concerns/collection_event_bindings_spec.coffee +15 -0
- data/spec/concerns/dom_helpers_spec.coffee +2 -2
- data/spec/concerns/filterable_spec.coffee +4 -4
- data/spec/concerns/state_model_spec.coffee +50 -0
- data/spec/core/collection_spec.coffee +25 -0
- data/spec/{concerns_spec.coffee → core/concerns_spec.coffee} +0 -0
- data/spec/core/container_spec.coffee +57 -5
- data/spec/core/define_spec.coffee +116 -0
- data/spec/core/events_spec.coffee +26 -0
- data/spec/core/field_spec.coffee +4 -0
- data/spec/{framework_spec.coffee → core/framework_spec.coffee} +31 -2
- data/spec/{util_spec.coffee → core/util_spec.coffee} +2 -2
- data/spec/core/view_spec.coffee +65 -1
- data/spec/dependencies/index.coffee +3 -0
- data/{assets/javascripts → spec}/dependencies/jasmine-html.js +0 -0
- data/{assets/javascripts → spec}/dependencies/jasmine.js +0 -0
- data/{assets/javascripts → spec}/dependencies/sinon.js +0 -0
- data/spec/luca-spec.coffee +9 -0
- data/vendor/assets/javascripts/backbone-ext.js +21 -0
- data/vendor/assets/javascripts/backbone-min.js +38 -0
- data/vendor/assets/javascripts/backbone-query.min.js +1 -0
- data/vendor/assets/javascripts/bootstrap.min.js +7 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-coffeescript.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-css.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-html.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-javascript.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-less.js +0 -0
- data/vendor/assets/javascripts/codemirror-ui.js +503 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror-vim.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/codemirror.js +0 -0
- data/vendor/assets/javascripts/inflections.js +656 -0
- data/vendor/assets/javascripts/jasmine-html.js +190 -0
- data/vendor/assets/javascripts/jasmine.js +2476 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/jquery.js +0 -0
- data/vendor/assets/javascripts/luca-spec.js +11 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/modal.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/modernizr.min.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/prettify.js +0 -0
- data/vendor/assets/javascripts/sinon.js +3469 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/spin-min.js +0 -0
- data/{assets/javascripts/dependencies → vendor/assets/javascripts}/underscore-min.js +0 -0
- data/vendor/assets/javascripts/underscore-string.min.js +1 -0
- data/vendor/assets/stylesheets/bootstrap-responsive.min.css +9 -0
- data/vendor/assets/stylesheets/bootstrap.min.css +9 -0
- data/{assets → vendor/assets}/stylesheets/codemirror-blackboard.css +0 -0
- data/{assets → vendor/assets}/stylesheets/codemirror-monokai.css +0 -0
- data/{assets → vendor/assets}/stylesheets/codemirror.css +0 -0
- data/{assets → vendor/assets}/stylesheets/jasmine.css +0 -0
- data/vendor/assets/stylesheets/luca-ui.css +0 -601
- data/views/jasmine.erb +2 -2
- metadata +190 -299
- data/assets/javascripts/dependencies/backbone-min.js +0 -37
- data/assets/javascripts/dependencies/backbone-query.min.js +0 -1
- data/assets/javascripts/dependencies/bootstrap.min.js +0 -7
- data/assets/javascripts/dependencies/coffee-script.js +0 -12189
- data/assets/javascripts/dependencies/underscore-string.min.js +0 -14
- data/assets/javascripts/dependencies.coffee +0 -5
- data/assets/javascripts/luca/index.coffee +0 -1
- data/assets/javascripts/luca-templates.js +0 -1
- data/assets/javascripts/luca-ui-base.coffee +0 -1
- data/assets/javascripts/luca-ui-bootstrap.js +0 -1
- data/assets/javascripts/luca-ui-development-tools.coffee +0 -9
- data/assets/javascripts/luca-ui-full.js +0 -3
- data/assets/javascripts/luca-ui-spec.coffee +0 -2
- data/assets/javascripts/luca-ui.js +0 -3
- data/assets/javascripts/sandbox/application.coffee +0 -57
- data/assets/javascripts/sandbox/config.coffee +0 -7
- data/assets/javascripts/sandbox/router.coffee +0 -24
- data/assets/javascripts/sandbox/templates/builder/component_list.luca +0 -1
- data/assets/javascripts/sandbox/templates/builder.luca +0 -2
- data/assets/javascripts/sandbox/templates/main.luca +0 -53
- data/assets/javascripts/sandbox/templates/sandbox/docs_index.luca +0 -1
- data/assets/javascripts/sandbox/templates/sandbox/navigation.luca +0 -8
- data/assets/javascripts/sandbox/templates/sandbox/readme.luca +0 -30
- data/assets/javascripts/sandbox/templates/sandbox.luca +0 -1
- data/assets/javascripts/sandbox/views/builder/builder_canvas.coffee +0 -3
- data/assets/javascripts/sandbox/views/builder/builder_editor.coffee +0 -6
- data/assets/javascripts/sandbox/views/builder/component_list.coffee +0 -38
- data/assets/javascripts/sandbox/views/builder/project_browser.coffee +0 -14
- data/assets/javascripts/sandbox/views/builder.coffee +0 -133
- data/assets/javascripts/sandbox/views/docs_controller.coffee +0 -7
- data/assets/javascripts/sandbox/views/inspector/instance_filter.coffee +0 -18
- data/assets/javascripts/sandbox/views/inspector/instance_list.coffee +0 -0
- data/assets/javascripts/sandbox/views/inspector.coffee +0 -11
- data/assets/javascripts/sandbox/views/top_navigation.coffee +0 -4
- data/assets/javascripts/sandbox.coffee +0 -7
- data/assets/javascripts/spec-dependencies.coffee +0 -4
- data/assets/stylesheets/bootstrap-responsive.min.css +0 -2
- data/assets/stylesheets/bootstrap.min.css +0 -727
- data/assets/stylesheets/luca-ui-bootstrap.css +0 -4
- data/assets/stylesheets/luca-ui-development-tools.css +0 -5
- data/assets/stylesheets/luca-ui-full.css +0 -3
- data/assets/stylesheets/luca-ui-spec.css +0 -3
- data/assets/stylesheets/luca-ui.css +0 -3
- data/assets/stylesheets/prettify.css +0 -40
- data/assets/stylesheets/sandbox/builder.scss +0 -79
- data/assets/stylesheets/sandbox/sandbox.scss +0 -18
- data/assets/stylesheets/sandbox.css +0 -3
- data/assets/stylesheets/themes/amelia-bootstrap.css +0 -826
- data/assets/stylesheets/themes/slate-bootstrap.css +0 -797
- data/assets/stylesheets/themes/superhero-bootstrap.css +0 -830
- data/lib/generators/luca/application/templates/javascripts/application.js +0 -28
- data/lib/generators/luca/application/templates/javascripts/application.js.coffee +0 -20
- data/lib/generators/luca/application/templates/javascripts/config.js +0 -15
- data/lib/generators/luca/application/templates/javascripts/config.js.coffee +0 -9
- data/lib/generators/luca/application/templates/javascripts/dependencies.js +0 -5
- data/lib/generators/luca/application/templates/javascripts/index.js +0 -9
- data/lib/generators/luca/application/templates/javascripts/index.js.coffee +0 -9
- data/lib/generators/luca/application/templates/javascripts/main.js +0 -8
- data/lib/generators/luca/application/templates/javascripts/main.js.coffee +0 -3
- data/lib/generators/luca/application/templates/javascripts/main.jst.ejs +0 -1
- data/lib/generators/luca/application/templates/javascripts/router.js +0 -12
- data/lib/generators/luca/application/templates/javascripts/router.js.coffee +0 -7
- data/spec/containers/column_view_spec.coffee +0 -0
- data/spec/containers/split_view_spec.coffee +0 -0
- data/spec/define_spec.coffee +0 -13
- data/src/components/controller.coffee +0 -65
- data/src/components/load_mask.coffee +0 -3
- data/src/components/multi_collection_view.coffee +0 -121
- data/src/components/page_controller.coffee +0 -2
- data/src/components/table_view.coffee +0 -62
- data/src/concerns/collection_event_bindings.coffee +0 -26
- data/src/concerns/filterable.coffee +0 -82
- data/src/concerns/state_model.coffee +0 -16
- data/src/containers/column_view.coffee +0 -42
- data/src/containers/page_view.coffee +0 -2
- data/src/containers/panel_view.coffee +0 -23
- data/src/containers/split_view.coffee +0 -8
- data/src/core/core.coffee +0 -0
- data/src/core/meta_data.coffee +0 -37
- data/src/core/panel.coffee +0 -118
- data/src/define.coffee +0 -170
- data/src/index.coffee +0 -25
- data/src/managers/socket_manager.coffee +0 -54
- data/src/samples/definition.coffee +0 -49
- data/src/stylesheets/base.scss +0 -0
- data/src/stylesheets/components/form_view.scss +0 -59
- data/src/stylesheets/components/toolbar.scss +0 -0
- data/src/stylesheets/tools/class_browser.scss +0 -32
- data/src/stylesheets/tools/code_editor.scss +0 -24
- data/src/stylesheets/tools/component_tester.scss +0 -26
- data/src/tools/application_inspector.coffee +0 -2
- data/src/tools/code_editor.coffee +0 -258
- data/src/tools/coffee_script_editor.coffee +0 -82
- data/src/tools/collection_inspector.coffee +0 -4
- data/src/tools/collections/components.coffee +0 -59
- data/src/tools/collections/instances.coffee +0 -15
- data/src/tools/component_tester.coffee +0 -462
- data/src/tools/models/components.coffee +0 -25
- data/src/tools/models/instance.coffee +0 -2
- data/src/tools/templates/component_tester/help.luca +0 -14
- data/vendor/assets/javascripts/luca-ui-base.js +0 -5304
- data/vendor/assets/javascripts/luca-ui-bootstrap.js +0 -9
- data/vendor/assets/javascripts/luca-ui-development-tools.js +0 -18561
- data/vendor/assets/javascripts/luca-ui-development-tools.min.js +0 -15
- data/vendor/assets/javascripts/luca-ui-full.js +0 -6319
- data/vendor/assets/javascripts/luca-ui-full.min.js +0 -9
- data/vendor/assets/javascripts/luca-ui-spec.js +0 -6815
- data/vendor/assets/javascripts/luca-ui-templates.js +0 -92
- data/vendor/assets/javascripts/luca-ui.js +0 -6234
- data/vendor/assets/javascripts/luca-ui.min.js +0 -5
- data/vendor/assets/luca-ui/base.css +0 -85
- data/vendor/assets/luca-ui/components/application.js +0 -91
- data/vendor/assets/luca-ui/components/base_toolbar.js +0 -23
- data/vendor/assets/luca-ui/components/controller.js +0 -38
- data/vendor/assets/luca-ui/components/fields/button_field.js +0 -45
- data/vendor/assets/luca-ui/components/fields/checkbox_field.js +0 -43
- data/vendor/assets/luca-ui/components/fields/file_upload_field.js +0 -20
- data/vendor/assets/luca-ui/components/fields/hidden_field.js +0 -20
- data/vendor/assets/luca-ui/components/fields/select_field.js +0 -97
- data/vendor/assets/luca-ui/components/fields/text_area_field.js +0 -48
- data/vendor/assets/luca-ui/components/fields/text_field.js +0 -46
- data/vendor/assets/luca-ui/components/fields/type_ahead_field.js +0 -13
- data/vendor/assets/luca-ui/components/form_button_toolbar.js +0 -32
- data/vendor/assets/luca-ui/components/form_view.css +0 -32
- data/vendor/assets/luca-ui/components/form_view.js +0 -207
- data/vendor/assets/luca-ui/components/grid_view.css +0 -76
- data/vendor/assets/luca-ui/components/grid_view.js +0 -202
- data/vendor/assets/luca-ui/components/record_manager.js +0 -207
- data/vendor/assets/luca-ui/components/router.js +0 -36
- data/vendor/assets/luca-ui/components/template.js +0 -26
- data/vendor/assets/luca-ui/components/toolbar.css +0 -11
- data/vendor/assets/luca-ui/containers/card_view.js +0 -98
- data/vendor/assets/luca-ui/containers/column_view.js +0 -52
- data/vendor/assets/luca-ui/containers/container.css +0 -3
- data/vendor/assets/luca-ui/containers/modal_view.css +0 -0
- data/vendor/assets/luca-ui/containers/modal_view.js +0 -87
- data/vendor/assets/luca-ui/containers/panel_view.js +0 -34
- data/vendor/assets/luca-ui/containers/split_view.js +0 -13
- data/vendor/assets/luca-ui/containers/tab_view.css +0 -16
- data/vendor/assets/luca-ui/containers/tab_view.js +0 -80
- data/vendor/assets/luca-ui/containers/viewport.js +0 -18
- data/vendor/assets/luca-ui/core/collection.js +0 -221
- data/vendor/assets/luca-ui/core/container.js +0 -205
- data/vendor/assets/luca-ui/core/field.js +0 -59
- data/vendor/assets/luca-ui/core/observer.js +0 -42
- data/vendor/assets/luca-ui/core/view.js +0 -127
- data/vendor/assets/luca-ui/framework.js +0 -110
- data/vendor/assets/luca-ui/index.js +0 -5
- data/vendor/assets/luca-ui/managers/collection_manager.js +0 -98
- data/vendor/assets/luca-ui/managers/socket_manager.js +0 -52
- data/vendor/assets/luca-ui/modules/deferrable.js +0 -21
- data/vendor/assets/luca-ui/modules/local_storage.js +0 -81
- data/vendor/assets/luca-ui/normalize.css +0 -359
- data/vendor/assets/luca-ui/stylesheets/base.css +0 -85
- data/vendor/assets/luca-ui/stylesheets/components/form_view.css +0 -32
- data/vendor/assets/luca-ui/stylesheets/components/grid_view.css +0 -76
- data/vendor/assets/luca-ui/stylesheets/components/toolbar.css +0 -11
- data/vendor/assets/luca-ui/stylesheets/containers/container.css +0 -3
- data/vendor/assets/luca-ui/stylesheets/containers/modal_view.css +0 -0
- data/vendor/assets/luca-ui/stylesheets/containers/tab_view.css +0 -16
- data/vendor/assets/luca-ui/stylesheets/normalize.css +0 -359
- data/vendor/assets/luca-ui/templates/components/bootstrap_form_controls.js +0 -4
- data/vendor/assets/luca-ui/templates/components/form_view.js +0 -4
- data/vendor/assets/luca-ui/templates/components/grid_view.js +0 -4
- data/vendor/assets/luca-ui/templates/components/grid_view_empty_text.js +0 -4
- data/vendor/assets/luca-ui/templates/containers/basic.js +0 -4
- data/vendor/assets/luca-ui/templates/containers/tab_selector_container.js +0 -4
- data/vendor/assets/luca-ui/templates/containers/tab_view.js +0 -4
- data/vendor/assets/luca-ui/templates/containers/toolbar_wrapper.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/button_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/button_field_link.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/checkbox_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/file_upload_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/hidden_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/select_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/text_area_field.js +0 -4
- data/vendor/assets/luca-ui/templates/fields/text_field.js +0 -4
- data/vendor/assets/luca-ui/templates/sample/contents.js +0 -4
- data/vendor/assets/luca-ui/templates/sample/welcome.js +0 -4
@@ -1,14 +0,0 @@
|
|
1
|
-
(function(k){var o=String.prototype.trim,l=function(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")},d=function(a){return function(){for(var b=Array.prototype.slice.call(arguments),c=0;c<b.length;c++)b[c]=b[c]==null?"":""+b[c];return a.apply(null,b)}},m=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var b=function(){b.cache.hasOwnProperty(arguments[0])||(b.cache[arguments[0]]=b.parse(arguments[0]));return b.format.call(null,b.cache[arguments[0]],arguments)};
|
2
|
-
b.format=function(b,n){var e=1,d=b.length,f="",j=[],h,i,g,k;for(h=0;h<d;h++)if(f=a(b[h]),f==="string")j.push(b[h]);else if(f==="array"){g=b[h];if(g[2]){f=n[e];for(i=0;i<g[2].length;i++){if(!f.hasOwnProperty(g[2][i]))throw m('[_.sprintf] property "%s" does not exist',g[2][i]);f=f[g[2][i]]}}else f=g[1]?n[g[1]]:n[e++];if(/[^s]/.test(g[8])&&a(f)!="number")throw m("[_.sprintf] expecting number but found %s",a(f));switch(g[8]){case "b":f=f.toString(2);break;case "c":f=String.fromCharCode(f);break;case "d":f=
|
3
|
-
parseInt(f,10);break;case "e":f=g[7]?f.toExponential(g[7]):f.toExponential();break;case "f":f=g[7]?parseFloat(f).toFixed(g[7]):parseFloat(f);break;case "o":f=f.toString(8);break;case "s":f=(f=String(f))&&g[7]?f.substring(0,g[7]):f;break;case "u":f=Math.abs(f);break;case "x":f=f.toString(16);break;case "X":f=f.toString(16).toUpperCase()}f=/[def]/.test(g[8])&&g[3]&&f>=0?"+"+f:f;i=g[4]?g[4]=="0"?"0":g[4].charAt(1):" ";k=g[6]-String(f).length;i=g[6]?l(i,k):"";j.push(g[5]?f+i:i+f)}return j.join("")};b.cache=
|
4
|
-
{};b.parse=function(a){for(var b=[],e=[],d=0;a;){if((b=/^[^\x25]+/.exec(a))!==null)e.push(b[0]);else if((b=/^\x25{2}/.exec(a))!==null)e.push("%");else if((b=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))!==null){if(b[2]){d|=1;var f=[],j=b[2],h=[];if((h=/^([a-z_][a-z_\d]*)/i.exec(j))!==null)for(f.push(h[1]);(j=j.substring(h[0].length))!=="";)if((h=/^\.([a-z_][a-z_\d]*)/i.exec(j))!==null)f.push(h[1]);else if((h=/^\[(\d+)\]/.exec(j))!==null)f.push(h[1]);
|
5
|
-
else throw"[_.sprintf] huh?";else throw"[_.sprintf] huh?";b[2]=f}else d|=2;if(d===3)throw"[_.sprintf] mixing positional and named placeholders is not (yet) supported";e.push(b)}else throw"[_.sprintf] huh?";a=a.substring(b[0].length)}return e};return b}(),e={VERSION:"1.2.0",isBlank:d(function(a){return/^\s*$/.test(a)}),stripTags:d(function(a){return a.replace(/<\/?[^>]+>/ig,"")}),capitalize:d(function(a){return a.charAt(0).toUpperCase()+a.substring(1).toLowerCase()}),chop:d(function(a,b){for(var b=
|
6
|
-
b*1||0||a.length,c=[],e=0;e<a.length;)c.push(a.slice(e,e+b)),e+=b;return c}),clean:d(function(a){return e.strip(a.replace(/\s+/g," "))}),count:d(function(a,b){for(var c=0,e,d=0;d<a.length;)e=a.indexOf(b,d),e>=0&&c++,d=d+(e>=0?e:0)+b.length;return c}),chars:d(function(a){return a.split("")}),escapeHTML:d(function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}),unescapeHTML:d(function(a){return a.replace(/</g,"<").replace(/>/g,
|
7
|
-
">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}),escapeRegExp:d(function(a){return a.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")}),insert:d(function(a,b,c){a=a.split("");a.splice(b*1||0,0,c);return a.join("")}),include:d(function(a,b){return a.indexOf(b)!==-1}),join:d(function(a){var b=Array.prototype.slice.call(arguments);return b.join(b.shift())}),lines:d(function(a){return a.split("\n")}),reverse:d(function(a){return Array.prototype.reverse.apply(String(a).split("")).join("")}),
|
8
|
-
splice:d(function(a,b,c,e){a=a.split("");a.splice(b*1||0,c*1||0,e);return a.join("")}),startsWith:d(function(a,b){return a.length>=b.length&&a.substring(0,b.length)===b}),endsWith:d(function(a,b){return a.length>=b.length&&a.substring(a.length-b.length)===b}),succ:d(function(a){var b=a.split("");b.splice(a.length-1,1,String.fromCharCode(a.charCodeAt(a.length-1)+1));return b.join("")}),titleize:d(function(a){for(var a=a.split(" "),b,c=0;c<a.length;c++)b=a[c].split(""),typeof b[0]!=="undefined"&&(b[0]=
|
9
|
-
b[0].toUpperCase()),c+1===a.length?a[c]=b.join(""):a[c]=b.join("")+" ";return a.join("")}),camelize:d(function(a){return e.trim(a).replace(/(\-|_|\s)+(.)?/g,function(a,c,e){return e?e.toUpperCase():""})}),underscored:function(a){return e.trim(a).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/\-|\s+/g,"_").toLowerCase()},dasherize:function(a){return e.trim(a).replace(/([a-z\d])([A-Z]+)/g,"$1-$2").replace(/^([A-Z]+)/,"-$1").replace(/\_|\s+/g,"-").toLowerCase()},humanize:function(a){return e.capitalize(this.underscored(a).replace(/_id$/,
|
10
|
-
"").replace(/_/g," "))},trim:d(function(a,b){if(!b&&o)return o.call(a);b=b?e.escapeRegExp(b):"\\s";return a.replace(RegExp("^["+b+"]+|["+b+"]+$","g"),"")}),ltrim:d(function(a,b){b=b?e.escapeRegExp(b):"\\s";return a.replace(RegExp("^["+b+"]+","g"),"")}),rtrim:d(function(a,b){b=b?e.escapeRegExp(b):"\\s";return a.replace(RegExp("["+b+"]+$","g"),"")}),truncate:d(function(a,b,c){b=b*1||0;return a.length>b?a.slice(0,b)+(c||"..."):a}),prune:d(function(a,b,c){var c=c||"...",b=b*1||0,d="",d=a.substring(b-
|
11
|
-
1,b+1).search(/^\w\w$/)===0?e.rtrim(a.slice(0,b).replace(/([\W][\w]*)$/,"")):e.rtrim(a.slice(0,b)),d=d.replace(/\W+$/,"");return d.length+c.length>a.length?a:d+c}),words:function(a,b){return String(a).split(b||" ")},pad:d(function(a,b,c,e){var d="",d=0,b=b*1||0;c?c.length>1&&(c=c.charAt(0)):c=" ";switch(e){case "right":d=b-a.length;d=l(c,d);a+=d;break;case "both":d=b-a.length;d={left:l(c,Math.ceil(d/2)),right:l(c,Math.floor(d/2))};a=d.left+a+d.right;break;default:d=b-a.length,d=l(c,d),a=d+a}return a}),
|
12
|
-
lpad:function(a,b,c){return e.pad(a,b,c)},rpad:function(a,b,c){return e.pad(a,b,c,"right")},lrpad:function(a,b,c){return e.pad(a,b,c,"both")},sprintf:m,vsprintf:function(a,b){b.unshift(a);return m.apply(null,b)},toNumber:function(a,b){var c;c=(a*1||0).toFixed(b*1||0)*1||0;return!(c===0&&a!=="0"&&a!==0)?c:Number.NaN},strRight:d(function(a,b){var c=!b?-1:a.indexOf(b);return c!=-1?a.slice(c+b.length,a.length):a}),strRightBack:d(function(a,b){var c=!b?-1:a.lastIndexOf(b);return c!=-1?a.slice(c+b.length,
|
13
|
-
a.length):a}),strLeft:d(function(a,b){var c=!b?-1:a.indexOf(b);return c!=-1?a.slice(0,c):a}),strLeftBack:d(function(a,b){var c=a.lastIndexOf(b);return c!=-1?a.slice(0,c):a}),exports:function(){var a={},b;for(b in this)if(this.hasOwnProperty(b)&&!(b=="include"||b=="contains"||b=="reverse"))a[b]=this[b];return a}};e.strip=e.trim;e.lstrip=e.ltrim;e.rstrip=e.rtrim;e.center=e.lrpad;e.ljust=e.lpad;e.rjust=e.rpad;e.contains=e.include;if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)module.exports=
|
14
|
-
e;exports._s=e}else typeof k._!=="undefined"?(k._.string=e,k._.str=k._.string):k._={string:e,str:e}})(this||window);
|
@@ -1 +0,0 @@
|
|
1
|
-
#= require ../luca-ui
|
@@ -1 +0,0 @@
|
|
1
|
-
//= require_tree ./luca-src/templates
|
@@ -1 +0,0 @@
|
|
1
|
-
#= require ./luca
|
@@ -1 +0,0 @@
|
|
1
|
-
//= require ./dependencies/bootstrap.min.js
|
@@ -1,9 +0,0 @@
|
|
1
|
-
#= require ./dependencies/coffee-script
|
2
|
-
#= require ./dependencies/codemirror.js
|
3
|
-
#= require ./dependencies/codemirror-coffeescript.js
|
4
|
-
#= require ./dependencies/codemirror-javascript.js
|
5
|
-
#= require ./dependencies/codemirror-html.js
|
6
|
-
#= require ./dependencies/codemirror-css.js
|
7
|
-
#= require ./dependencies/codemirror-less.js
|
8
|
-
#= require ./dependencies/codemirror-vim.js
|
9
|
-
#= require_tree ./luca-src/tools
|
@@ -1,57 +0,0 @@
|
|
1
|
-
_.def('Sandbox.Application').extends('Luca.Application').with
|
2
|
-
|
3
|
-
autoBoot: true
|
4
|
-
|
5
|
-
name: 'SandboxApp'
|
6
|
-
|
7
|
-
router: "Sandbox.Router"
|
8
|
-
|
9
|
-
el: '#viewport'
|
10
|
-
|
11
|
-
fluid: true
|
12
|
-
|
13
|
-
topNav:'top_navigation'
|
14
|
-
|
15
|
-
useKeyHandler: false
|
16
|
-
|
17
|
-
keyEvents:
|
18
|
-
meta:
|
19
|
-
forwardslash: "developmentConsole"
|
20
|
-
|
21
|
-
collectionManager:
|
22
|
-
initialCollections: ["components"]
|
23
|
-
|
24
|
-
components:[
|
25
|
-
ctype: 'controller'
|
26
|
-
name: 'pages'
|
27
|
-
components:[
|
28
|
-
name: "main"
|
29
|
-
className:"marketing-content"
|
30
|
-
bodyTemplate: 'main'
|
31
|
-
,
|
32
|
-
name: "intro"
|
33
|
-
className:"marketing-content"
|
34
|
-
bodyTemplate: "readme"
|
35
|
-
,
|
36
|
-
name: "build"
|
37
|
-
ctype: "builder"
|
38
|
-
,
|
39
|
-
name: "docs"
|
40
|
-
ctype: "docs_controller"
|
41
|
-
]
|
42
|
-
]
|
43
|
-
|
44
|
-
developmentConsole: ()->
|
45
|
-
@developmentConsole = Luca "coffeescript-console", ()->
|
46
|
-
new Luca.tools.DevelopmentConsole(name:"coffeescript-console")
|
47
|
-
|
48
|
-
unless @consoleContainerAppended
|
49
|
-
container = @make("div",{id:"devtools-console-wrapper",class:"devtools-console-container modal",style:"width:1000px"}, @developmentConsole.el)
|
50
|
-
$('body').append( container )
|
51
|
-
@consoleContainerAppended = true
|
52
|
-
@developmentConsole.render()
|
53
|
-
|
54
|
-
$('#devtools-console-wrapper').modal(backdrop:false,show:true)
|
55
|
-
|
56
|
-
$ ->
|
57
|
-
new Sandbox.Application()
|
@@ -1,24 +0,0 @@
|
|
1
|
-
Sandbox.Router = Luca.Router.extend
|
2
|
-
routes:
|
3
|
-
"" : "default"
|
4
|
-
"build" : "build"
|
5
|
-
"intro" : "intro"
|
6
|
-
"application" : "inspector"
|
7
|
-
"docs" : "docs"
|
8
|
-
"docs/:section" : "docs"
|
9
|
-
|
10
|
-
default: ()->
|
11
|
-
@app.navigate_to("pages").navigate_to "main"
|
12
|
-
|
13
|
-
build: ()->
|
14
|
-
@app.navigate_to("pages").navigate_to "build"
|
15
|
-
|
16
|
-
docs: (section="docs_index")->
|
17
|
-
@app.navigate_to("docs").navigate_to(section)
|
18
|
-
|
19
|
-
intro: ()->
|
20
|
-
@app.navigate_to("pages").navigate_to "intro"
|
21
|
-
|
22
|
-
inspector: ()->
|
23
|
-
inspector = Luca "application_inspector", new Sandbox.views.ApplicationInspector()
|
24
|
-
inspector.toggle()
|
@@ -1 +0,0 @@
|
|
1
|
-
.component
|
@@ -1,53 +0,0 @@
|
|
1
|
-
.container
|
2
|
-
.hero-unit
|
3
|
-
%h1 Want to build apps with Backbone?
|
4
|
-
%p This is a collection of application design components that you should use to build your next large backbone.js application.
|
5
|
-
%p It combines the elegance and simplicity of backbone.js and bootstrap.css, with the experience of developers who have been building single page javascript apps since you were a baby.
|
6
|
-
|
7
|
-
%a.btn.btn-large.btn-primary{:href=>"https://github.com/datapimp/luca/zipball/master"}
|
8
|
-
Download
|
9
|
-
|
10
|
-
%a.btn.btn-success.btn-large{:href=>"#build"}
|
11
|
-
Build an App
|
12
|
-
|
13
|
-
%hr
|
14
|
-
|
15
|
-
#information
|
16
|
-
.row.heading
|
17
|
-
.span12
|
18
|
-
%h2 Composite Application Architecture
|
19
|
-
.row
|
20
|
-
.span4
|
21
|
-
%h3 Component Driven Design
|
22
|
-
%p Luca is a collection of common components needed to build large single page applications. Luca provides base classes for Model, View, and Collection classes which you can choose to extend where needed. Luca also provides an extensive library of application building components and UI elements which you can piece together in a variety of ways to build responsive, and snappy single page apps.
|
23
|
-
|
24
|
-
.span4
|
25
|
-
%h3 Backbone and Luca work together
|
26
|
-
%p Luca is not a replacement for Backbone, it is a smart use of Backbone's core classes. Large apps require layers of abstraction and patterns for communication between various components, Luca provides these for you.
|
27
|
-
%p Like Backbone, you only have to use what you need.
|
28
|
-
|
29
|
-
.span4
|
30
|
-
%h3 Well Tested Patterns
|
31
|
-
%p We have extracted all of the common patterns and optimizations we have learned over the course of a year developing several large applications. Using Luca allows you to leverage the power of Backbone.js but only focus on what makes your app unique.
|
32
|
-
|
33
|
-
%a{href:"https://github.com/datapimp/luca"}
|
34
|
-
%img{style:"position: absolute; top: 0; right: 0; border: 0; z-index:9000;",src:"https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png",alt:"Fork me on GitHub"}
|
35
|
-
|
36
|
-
.row.heading
|
37
|
-
.span12
|
38
|
-
%h2 Develop Apps Faster
|
39
|
-
.row
|
40
|
-
.span4
|
41
|
-
%h3 Development Tools
|
42
|
-
%p Luca's development tools include an in-browser Coffeescript console, a CodeMirror based IDE which performs live updates in the browser.
|
43
|
-
%p Live reloading of your code changes is also supported if you use the ruby gem and make changes in your favorite editor.
|
44
|
-
.span4
|
45
|
-
%h3 Experimentation and Debugging
|
46
|
-
%p The Luca framework was designed encourage developers to define apps mostly using JSON configuration, The structural components and style rules are generated for us, events get bound, and things just work.
|
47
|
-
%p
|
48
|
-
%a{href:"#application"} Take a look at this application in the inspector.
|
49
|
-
|
50
|
-
.span4
|
51
|
-
%h3 Not only for Ruby Developers
|
52
|
-
%p Luca is just javascript and css, and will work with any server backend.
|
53
|
-
%p That being said, Luca was developed against Rails and Sinatra apps and comes with many development helpers which work in these environments. The development environment and sandbox is a Sinatra app, but like everything else in the framework you can only use what you need.
|
@@ -1 +0,0 @@
|
|
1
|
-
%h1 Documentation
|
@@ -1,30 +0,0 @@
|
|
1
|
-
.container
|
2
|
-
%h1 Component Driven Architecture with Luca.JS
|
3
|
-
|
4
|
-
%p Luca is a component architecture framework based on Backbone.js, which includes
|
5
|
-
many development helpers, classes, patterns, and tools needed to build scalable
|
6
|
-
and clean single page applications.
|
7
|
-
|
8
|
-
%p It uses twitter bootstrap compatible markup and css naming conventions,
|
9
|
-
making it possible to generate completely styled user interfaces with JSON alone.
|
10
|
-
|
11
|
-
%p Luca combines the functionality of other open source libraries as well, but you are not
|
12
|
-
required to use any of them if you don't like.
|
13
|
-
|
14
|
-
%h3 Dependencies
|
15
|
-
|
16
|
-
%ul
|
17
|
-
%li
|
18
|
-
%a{href:"https://twitter.github.com/bootstrap"} Bootstrap by Twitter
|
19
|
-
%li
|
20
|
-
%a{href:"https://github.com/davidgtonge/backbone_query"} Backbone-Query by David Tonge
|
21
|
-
%li
|
22
|
-
%a{href:"https://github.com/epeli/underscore.string"} Underscore String by Esa-Matti Suuronen
|
23
|
-
|
24
|
-
%h3 Development Tool Dependencies
|
25
|
-
|
26
|
-
%ul
|
27
|
-
%li
|
28
|
-
%a{href:"https://codemirror.net"} CodeMirror IDE
|
29
|
-
%li
|
30
|
-
%a{href:"https://coffeescript.org"}CoffeeScript Compiler
|
@@ -1 +0,0 @@
|
|
1
|
-
%h1 Hi
|
@@ -1,38 +0,0 @@
|
|
1
|
-
_.def("Sandbox.views.ComponentList").extends("Luca.components.CollectionView").with
|
2
|
-
name: "component_list"
|
3
|
-
id: "component_list"
|
4
|
-
collection: "components"
|
5
|
-
itemTagName: "div"
|
6
|
-
autoBindEventHandlers: true
|
7
|
-
events:
|
8
|
-
"click div.collection-item a" : "clickHandler"
|
9
|
-
|
10
|
-
itemRenderer: (item, model, index)->
|
11
|
-
Luca.util.make("a",{"data-index":index}, model.className() )
|
12
|
-
|
13
|
-
filterByName: (name)->
|
14
|
-
models = @collection.query
|
15
|
-
className:
|
16
|
-
$likeI:name
|
17
|
-
|
18
|
-
@collection.reset( models, silent: true )
|
19
|
-
@refresh()
|
20
|
-
|
21
|
-
if name?.length is 0
|
22
|
-
@resetToDefault()
|
23
|
-
|
24
|
-
resetToDefault: ()->
|
25
|
-
@collection.reset( @initialComponents, silent: true )
|
26
|
-
@refresh()
|
27
|
-
|
28
|
-
beforeRender: ()->
|
29
|
-
success = (collection, response)=>
|
30
|
-
@initialComponents = response
|
31
|
-
|
32
|
-
@collection.fetch(success: success)
|
33
|
-
|
34
|
-
clickHandler: (e)->
|
35
|
-
e.preventDefault()
|
36
|
-
me = my = $( e.target )
|
37
|
-
component = @collection.at( my.data('index') )
|
38
|
-
@trigger "selected", component
|
@@ -1,14 +0,0 @@
|
|
1
|
-
_.def("Sandbox.views.ProjectBrowser").extends("Luca.core.Container").with
|
2
|
-
className: "project-browser"
|
3
|
-
components:[
|
4
|
-
type: "text_field"
|
5
|
-
name: "component_list_filter"
|
6
|
-
additionalClassNames: "well"
|
7
|
-
className: "component-list-filter-form"
|
8
|
-
placeHolder: "Find a component"
|
9
|
-
hideLabel: true
|
10
|
-
prepend: "?"
|
11
|
-
,
|
12
|
-
type: "component_list"
|
13
|
-
name: "component_list"
|
14
|
-
]
|
@@ -1,133 +0,0 @@
|
|
1
|
-
_.def("Sandbox.views.Builder").extends("Luca.core.Container").with
|
2
|
-
name: "builder"
|
3
|
-
id: "builder"
|
4
|
-
defaultCanvasPosition: 'below'
|
5
|
-
componentEvents:
|
6
|
-
"editor_container toggle:search:option" : "toggleSearchOption"
|
7
|
-
|
8
|
-
components:[
|
9
|
-
ctype: "container"
|
10
|
-
name:"editor_container"
|
11
|
-
additionalClassNames: 'row-fluid'
|
12
|
-
className: "builder-editor-container"
|
13
|
-
styles:
|
14
|
-
position: "absolute"
|
15
|
-
|
16
|
-
bottomToolbar:
|
17
|
-
buttons:[
|
18
|
-
group: true
|
19
|
-
align: "left"
|
20
|
-
buttons:[
|
21
|
-
eventId: "toggle:search:option"
|
22
|
-
icon:"search"
|
23
|
-
classes:"search-options component-search"
|
24
|
-
,
|
25
|
-
eventId: "toggle:search:option"
|
26
|
-
icon: "list-alt"
|
27
|
-
classes: "search-options saved-components"
|
28
|
-
]
|
29
|
-
,
|
30
|
-
eventId:"toggle:settings"
|
31
|
-
icon: "cog"
|
32
|
-
align: 'right'
|
33
|
-
]
|
34
|
-
components:[
|
35
|
-
ctype: "builder_editor"
|
36
|
-
name: "builder_editor"
|
37
|
-
className:"builder-editor"
|
38
|
-
styles:
|
39
|
-
position: "relative"
|
40
|
-
width: "100%"
|
41
|
-
top: "0"
|
42
|
-
left: "0"
|
43
|
-
,
|
44
|
-
type: "project_browser"
|
45
|
-
className:"project-browser"
|
46
|
-
name: "project_browser"
|
47
|
-
styles:
|
48
|
-
position: "relative"
|
49
|
-
width: "30%"
|
50
|
-
top: "0"
|
51
|
-
left: "0"
|
52
|
-
]
|
53
|
-
]
|
54
|
-
|
55
|
-
initialize: (@options={})->
|
56
|
-
Luca.core.Container::initialize.apply(@, arguments)
|
57
|
-
|
58
|
-
_.bindAll @, "toggleSearchOption"
|
59
|
-
|
60
|
-
canvas = type: "builder_canvas", className: "builder-canvas"
|
61
|
-
|
62
|
-
@state = new Backbone.Model
|
63
|
-
canvasLayout: "horizontal-split"
|
64
|
-
canvasPosition: (@defaultCanvasPosition || "above")
|
65
|
-
ratio: 0.4
|
66
|
-
|
67
|
-
@state.bind "change:canvasLayout", ()=>
|
68
|
-
@$el.removeClass().addClass @state.get("canvasLayout")
|
69
|
-
|
70
|
-
if @state.get('canvasPosition') is "above"
|
71
|
-
@components.unshift( canvas )
|
72
|
-
else
|
73
|
-
@components.push( canvas )
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
canvas: ()->
|
78
|
-
Luca("builder_canvas")
|
79
|
-
|
80
|
-
editor: ()->
|
81
|
-
Luca("builder_editor")
|
82
|
-
|
83
|
-
componentList: ()->
|
84
|
-
Luca("component_list")
|
85
|
-
|
86
|
-
toggleSearchOption: (button)->
|
87
|
-
button.toggleClass('active')
|
88
|
-
|
89
|
-
# TODO
|
90
|
-
# Find a pure CSS solution this is garbage.
|
91
|
-
fitToScreen: ()->
|
92
|
-
@$el.addClass("canvas-position-#{ @state.get('canvasPosition') }")
|
93
|
-
|
94
|
-
viewportHeight = $(window).height()
|
95
|
-
half = viewportHeight * @state.get('ratio')
|
96
|
-
|
97
|
-
toolbarHeight = 0
|
98
|
-
toolbarHeight += @$('.toolbar-container.top').height() * @$('.toolbar-container.top').length
|
99
|
-
|
100
|
-
filterHeight = 0
|
101
|
-
filterHeight += @$('.component-list-filter-form').height()
|
102
|
-
|
103
|
-
@canvas().$el.height( half - toolbarHeight - 40 )
|
104
|
-
|
105
|
-
@componentList().$el.height( half - filterHeight - 50 )
|
106
|
-
|
107
|
-
@editor().$el.height( half )
|
108
|
-
@editor().setHeight( half )
|
109
|
-
|
110
|
-
activation: ()->
|
111
|
-
@fitToScreen()
|
112
|
-
|
113
|
-
deactivation: ()->
|
114
|
-
# implement
|
115
|
-
|
116
|
-
afterRender: ()->
|
117
|
-
@_super "afterRender", @, arguments
|
118
|
-
componentList = Luca("component_list")
|
119
|
-
componentList.on "selected", (component)->
|
120
|
-
Luca("builder_editor").setValue( component.get('source') )
|
121
|
-
Luca("builder_editor").state.set('currentMode','coffeescript')
|
122
|
-
|
123
|
-
@$('.component-list-filter-form input[type="text"]').on "keydown", ()->
|
124
|
-
componentList.filterByName $(this).val()
|
125
|
-
|
126
|
-
@$('.component-list-filter-form input[type="text"]').on "keyup", ()->
|
127
|
-
val = $(this).val()
|
128
|
-
componentList.filterByName('') if val.length is 0
|
129
|
-
|
130
|
-
beforeRender: ()->
|
131
|
-
Luca.core.Container::beforeRender?.apply(@, arguments)
|
132
|
-
@$el.removeClass().addClass @state.get("canvasLayout")
|
133
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
_.def("Sandbox.views.InstanceFilter").extends("Luca.components.FormView").with
|
2
|
-
name: "instance_filter"
|
3
|
-
well: true
|
4
|
-
horizontal: true
|
5
|
-
inline: true
|
6
|
-
toolbar: false
|
7
|
-
components:[
|
8
|
-
ctype:"type_ahead_field"
|
9
|
-
label:"Find by name"
|
10
|
-
source: ()->
|
11
|
-
names = _( Luca.registry.instances() ).pluck('name')
|
12
|
-
_.uniq _( names ).compact()
|
13
|
-
,
|
14
|
-
ctype: "type_ahead_field"
|
15
|
-
label: "Find by class"
|
16
|
-
source: ()->
|
17
|
-
Luca.registry.classes(true)
|
18
|
-
]
|
File without changes
|
@@ -1,11 +0,0 @@
|
|
1
|
-
_.def("Sandbox.views.ApplicationInspector").extends("Luca.tools.ApplicationInspector").with
|
2
|
-
name: "application_inspector"
|
3
|
-
additionalClassNames: ["modal"]
|
4
|
-
|
5
|
-
toggle:(options=backdrop:false)->
|
6
|
-
@render() unless @rendered is true
|
7
|
-
@$el.modal(options)
|
8
|
-
|
9
|
-
components:[
|
10
|
-
ctype:"instance_filter"
|
11
|
-
]
|
@@ -1,2 +0,0 @@
|
|
1
|
-
.hidden{display:none;visibility:hidden;}
|
2
|
-
@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:768px){.container{width:auto;padding:0 20px;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;}}@media (min-width:768px) and (max-width:980px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .span1{width:42px;} .span2{width:104px;} .span3{width:166px;} .span4{width:228px;} .span5{width:290px;} .span6{width:352px;} .span7{width:414px;} .span8{width:476px;} .span9{width:538px;} .span10{width:600px;} .span11{width:662px;} .span12,.container{width:724px;} .offset1{margin-left:82px;} .offset2{margin-left:144px;} .offset3{margin-left:206px;} .offset4{margin-left:268px;} .offset5{margin-left:330px;} .offset6{margin-left:392px;} .offset7{margin-left:454px;} .offset8{margin-left:516px;} .offset9{margin-left:578px;} .offset10{margin-left:640px;} .offset11{margin-left:702px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.801104972%;} .row-fluid .span2{width:14.364640883%;} .row-fluid .span3{width:22.928176794%;} .row-fluid .span4{width:31.491712705%;} .row-fluid .span5{width:40.055248616%;} .row-fluid .span6{width:48.618784527%;} .row-fluid .span7{width:57.182320438000005%;} .row-fluid .span8{width:65.74585634900001%;} .row-fluid .span9{width:74.30939226%;} .row-fluid .span10{width:82.87292817100001%;} .row-fluid .span11{width:91.436464082%;} .row-fluid .span12{width:99.999999993%;} input.span1,textarea.span1,.uneditable-input.span1{width:32px;} input.span2,textarea.span2,.uneditable-input.span2{width:94px;} input.span3,textarea.span3,.uneditable-input.span3{width:156px;} input.span4,textarea.span4,.uneditable-input.span4{width:218px;} input.span5,textarea.span5,.uneditable-input.span5{width:280px;} input.span6,textarea.span6,.uneditable-input.span6{width:342px;} input.span7,textarea.span7,.uneditable-input.span7{width:404px;} input.span8,textarea.span8,.uneditable-input.span8{width:466px;} input.span9,textarea.span9,.uneditable-input.span9{width:528px;} input.span10,textarea.span10,.uneditable-input.span10{width:590px;} input.span11,textarea.span11,.uneditable-input.span11{width:652px;} input.span12,textarea.span12,.uneditable-input.span12{width:714px;}}@media (max-width:980px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .span1{width:70px;} .span2{width:170px;} .span3{width:270px;} .span4{width:370px;} .span5{width:470px;} .span6{width:570px;} .span7{width:670px;} .span8{width:770px;} .span9{width:870px;} .span10{width:970px;} .span11{width:1070px;} .span12,.container{width:1170px;} .offset1{margin-left:130px;} .offset2{margin-left:230px;} .offset3{margin-left:330px;} .offset4{margin-left:430px;} .offset5{margin-left:530px;} .offset6{margin-left:630px;} .offset7{margin-left:730px;} .offset8{margin-left:830px;} .offset9{margin-left:930px;} .offset10{margin-left:1030px;} .offset11{margin-left:1130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.564102564%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid .span1{width:5.982905983%;} .row-fluid .span2{width:14.529914530000001%;} .row-fluid .span3{width:23.076923077%;} .row-fluid .span4{width:31.623931624%;} .row-fluid .span5{width:40.170940171000005%;} .row-fluid .span6{width:48.717948718%;} .row-fluid .span7{width:57.264957265%;} .row-fluid .span8{width:65.81196581200001%;} .row-fluid .span9{width:74.358974359%;} .row-fluid .span10{width:82.905982906%;} .row-fluid .span11{width:91.45299145300001%;} .row-fluid .span12{width:100%;} input.span1,textarea.span1,.uneditable-input.span1{width:60px;} input.span2,textarea.span2,.uneditable-input.span2{width:160px;} input.span3,textarea.span3,.uneditable-input.span3{width:260px;} input.span4,textarea.span4,.uneditable-input.span4{width:360px;} input.span5,textarea.span5,.uneditable-input.span5{width:460px;} input.span6,textarea.span6,.uneditable-input.span6{width:560px;} input.span7,textarea.span7,.uneditable-input.span7{width:660px;} input.span8,textarea.span8,.uneditable-input.span8{width:760px;} input.span9,textarea.span9,.uneditable-input.span9{width:860px;} input.span10,textarea.span10,.uneditable-input.span10{width:960px;} input.span11,textarea.span11,.uneditable-input.span11{width:1060px;} input.span12,textarea.span12,.uneditable-input.span12{width:1160px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;}}
|