luca 0.9.42 → 0.9.65
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +50 -9
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/README.md +5 -0
- data/assets/javascripts/dependencies/underscore-min.js +5 -31
- data/lib/generators/luca/application/application_generator.rb +71 -0
- data/lib/generators/luca/application/templates/controller.rb +6 -0
- data/lib/generators/luca/application/templates/index.html.erb +7 -0
- data/lib/generators/luca/application/templates/index.html.haml +6 -0
- data/lib/generators/luca/application/templates/javascripts/application.js +28 -0
- data/lib/generators/luca/application/templates/javascripts/application.js.coffee +20 -0
- data/lib/generators/luca/application/templates/javascripts/config.js +15 -0
- data/lib/generators/luca/application/templates/javascripts/config.js.coffee +9 -0
- data/lib/generators/luca/application/templates/javascripts/dependencies.js +5 -0
- data/lib/generators/luca/application/templates/javascripts/dependencies.js.coffee +5 -0
- data/lib/generators/luca/application/templates/javascripts/index.js +9 -0
- data/lib/generators/luca/application/templates/javascripts/index.js.coffee +9 -0
- data/lib/generators/luca/application/templates/javascripts/main.js +8 -0
- data/lib/generators/luca/application/templates/javascripts/main.js.coffee +3 -0
- data/lib/generators/luca/application/templates/javascripts/main.jst.ejs +1 -0
- data/lib/generators/luca/application/templates/javascripts/router.js +12 -0
- data/lib/generators/luca/application/templates/javascripts/router.js.coffee +7 -0
- data/lib/luca/rails/version.rb +1 -1
- data/spec/components/collection_view_spec.coffee +59 -0
- data/spec/components/multi_collection_view_spec.coffee +5 -0
- data/{src/templates/components/form_alert → spec/components/pagination_control_spec.coffee} +0 -0
- data/spec/components/table_view_spec.coffee +17 -0
- data/spec/core/container_spec.coffee +127 -5
- data/spec/core/model_spec.coffee +21 -3
- data/spec/define_spec.coffee +19 -0
- data/spec/mixin_spec.coffee +49 -0
- data/spec/modules/filterable_spec.coffee +25 -0
- data/spec/modules/paginatable_spec.coffee +0 -0
- data/spec/modules/state_model_spec.coffee +0 -0
- data/src/components/application.coffee +52 -38
- data/src/components/collection_view.coffee +118 -45
- data/src/components/fields/checkbox_field.coffee +2 -2
- data/src/components/fields/file_upload_field.coffee +0 -3
- data/src/components/fields/hidden_field.coffee +0 -3
- data/src/components/fields/label_field.coffee +1 -4
- data/src/components/fields/select_field.coffee +6 -6
- data/src/components/fields/text_area_field.coffee +1 -0
- data/src/components/fields/text_field.coffee +4 -0
- data/src/components/fields/type_ahead_field.coffee +5 -9
- data/src/components/form_view.coffee +28 -23
- data/src/components/multi_collection_view.coffee +121 -0
- data/src/components/pagination_control.coffee +106 -0
- data/src/components/table_view.coffee +22 -13
- data/src/containers/card_view.coffee +44 -11
- data/src/containers/panel_toolbar.coffee +88 -82
- data/src/containers/tab_view.coffee +3 -3
- data/src/core/collection.coffee +11 -4
- data/src/core/container.coffee +206 -122
- data/src/core/field.coffee +13 -10
- data/src/core/model.coffee +23 -27
- data/src/core/registry.coffee +42 -29
- data/src/core/view.coffee +63 -149
- data/src/define.coffee +91 -19
- data/src/framework.coffee +11 -9
- data/src/managers/collection_manager.coffee +24 -8
- data/src/modules/application_event_bindings.coffee +19 -0
- data/src/modules/collection_event_bindings.coffee +26 -0
- data/src/modules/deferrable.coffee +3 -1
- data/src/modules/dom_helpers.coffee +49 -0
- data/src/modules/enhanced_properties.coffee +23 -0
- data/src/modules/filterable.coffee +82 -0
- data/src/modules/grid_layout.coffee +13 -1
- data/src/modules/{load_mask.coffee → loadmaskable.coffee} +10 -4
- data/src/modules/modal_view.coffee +38 -0
- data/src/modules/paginatable.coffee +87 -0
- data/src/modules/state_model.coffee +16 -0
- data/src/modules/templating.coffee +8 -0
- data/src/plugins/events.coffee +30 -2
- data/src/templates/components/bootstrap_form_controls.jst.ejs +10 -0
- data/src/templates/components/collection_loader_view.jst.ejs +6 -0
- data/src/templates/components/form_alert.jst.ejs +4 -0
- data/src/templates/components/grid_view.jst.ejs +11 -0
- data/src/templates/components/grid_view_empty_text.jst.ejs +3 -0
- data/src/templates/components/load_mask.jst.ejs +5 -0
- data/src/templates/components/nav_bar.jst.ejs +4 -0
- data/src/templates/components/pagination.jst.ejs +10 -0
- data/src/templates/containers/basic.jst.ejs +1 -0
- data/src/templates/containers/tab_selector_container.jst.ejs +12 -0
- data/src/templates/containers/tab_view.jst.ejs +2 -0
- data/src/templates/containers/toolbar_wrapper.jst.ejs +1 -0
- data/src/templates/fields/button_field.jst.ejs +2 -0
- data/src/templates/fields/button_field_link.jst.ejs +6 -0
- data/src/templates/fields/checkbox_array.jst.ejs +4 -0
- data/src/templates/fields/checkbox_array_item.jst.ejs +3 -0
- data/src/templates/fields/checkbox_field.jst.ejs +10 -0
- data/src/templates/fields/file_upload_field.jst.ejs +10 -0
- data/src/templates/fields/hidden_field.jst.ejs +1 -0
- data/src/templates/fields/select_field.jst.ejs +11 -0
- data/src/templates/fields/text_area_field.jst.ejs +11 -0
- data/src/templates/fields/text_field.jst.ejs +16 -0
- data/src/templates/table_view.jst.ejs +4 -0
- data/src/tools/console.coffee +51 -21
- data/src/util.coffee +17 -4
- data/vendor/assets/javascripts/luca-ui-base.js +5304 -0
- data/vendor/assets/javascripts/luca-ui-bootstrap.js +9 -0
- data/vendor/assets/javascripts/luca-ui-development-tools.js +52 -24
- data/vendor/assets/javascripts/luca-ui-development-tools.min.js +1 -1
- data/vendor/assets/javascripts/luca-ui-full.js +1700 -595
- data/vendor/assets/javascripts/luca-ui-full.min.js +7 -6
- data/vendor/assets/javascripts/luca-ui-spec.js +6815 -0
- data/vendor/assets/javascripts/luca-ui-templates.js +92 -24
- data/vendor/assets/javascripts/luca-ui.js +1695 -564
- data/vendor/assets/javascripts/luca-ui.min.js +4 -4
- metadata +69 -28
- data/src/templates/components/bootstrap_form_controls.luca +0 -7
- data/src/templates/components/collection_loader_view.luca +0 -5
- data/src/templates/components/form_alert.luca +0 -3
- data/src/templates/components/grid_view.luca +0 -7
- data/src/templates/components/grid_view_empty_text.luca +0 -3
- data/src/templates/components/load_mask.luca +0 -3
- data/src/templates/components/nav_bar.luca +0 -2
- data/src/templates/containers/basic.luca +0 -1
- data/src/templates/containers/tab_selector_container.luca +0 -8
- data/src/templates/containers/tab_view.luca +0 -2
- data/src/templates/containers/toolbar_wrapper.luca +0 -1
- data/src/templates/fields/button_field.luca +0 -2
- data/src/templates/fields/button_field_link.luca +0 -5
- data/src/templates/fields/checkbox_array.luca +0 -4
- data/src/templates/fields/checkbox_array_item.luca +0 -4
- data/src/templates/fields/checkbox_field.luca +0 -9
- data/src/templates/fields/file_upload_field.luca +0 -8
- data/src/templates/fields/hidden_field.luca +0 -1
- data/src/templates/fields/select_field.luca +0 -8
- data/src/templates/fields/text_area_field.luca +0 -8
- data/src/templates/fields/text_field.luca +0 -17
- data/src/templates/sample/contents.luca +0 -1
- data/src/templates/sample/welcome.luca +0 -1
- data/src/templates/table_view.luca +0 -4
@@ -0,0 +1,23 @@
|
|
1
|
+
Luca.modules.EnhancedProperties =
|
2
|
+
__initializer: ()->
|
3
|
+
return unless Luca.config.enhancedViewProperties is true
|
4
|
+
|
5
|
+
# The @collection property.
|
6
|
+
#
|
7
|
+
# If the @collection property is a string, then upon initialization
|
8
|
+
# of the view, that @collection property will be swapped out
|
9
|
+
# with the instance of the collection of that name in the main
|
10
|
+
# Luca.CollectionManager
|
11
|
+
if _.isString(@collection) and Luca.CollectionManager.get()
|
12
|
+
@collection = Luca.CollectionManager.get().getOrCreate(@collection)
|
13
|
+
|
14
|
+
# The @template property.
|
15
|
+
#
|
16
|
+
# For simple views which only need a template, you can specify the
|
17
|
+
# template by its name, and we will render it for you.
|
18
|
+
if @template?
|
19
|
+
@$template(@template, @)
|
20
|
+
|
21
|
+
# The @collectionManager property is also configurable by string
|
22
|
+
if _.isString( @collectionManager )
|
23
|
+
@collectionManager = Luca.CollectionManager.get( @collectionManager )
|
@@ -0,0 +1,82 @@
|
|
1
|
+
Luca.modules.Filterable =
|
2
|
+
__included: (component, module)->
|
3
|
+
_.extend(Luca.Collection::, __filters:{})
|
4
|
+
|
5
|
+
__initializer: (component, module)->
|
6
|
+
if @filterable is false
|
7
|
+
return
|
8
|
+
|
9
|
+
# TEMP HACK
|
10
|
+
unless Luca.isBackboneCollection(@collection)
|
11
|
+
@collection = Luca.CollectionManager.get?()?.getOrCreate(@collection)
|
12
|
+
|
13
|
+
unless Luca.isBackboneCollection(@collection)
|
14
|
+
@debug "Skipping Filterable due to no collection being present on #{ @name || @cid }"
|
15
|
+
@debug "Collection", @collection
|
16
|
+
return
|
17
|
+
|
18
|
+
@getCollection ||= ()-> @collection
|
19
|
+
|
20
|
+
filter = @getFilterState()
|
21
|
+
|
22
|
+
@querySources ||= []
|
23
|
+
@optionsSources ||= []
|
24
|
+
@query ||= {}
|
25
|
+
@queryOptions ||= {}
|
26
|
+
|
27
|
+
@querySources.push (()=> filter.toQuery())
|
28
|
+
@optionsSources.push (()=> filter.toOptions())
|
29
|
+
|
30
|
+
if @debugMode is true
|
31
|
+
console.log "Filterable"
|
32
|
+
console.log @querySources
|
33
|
+
console.log @optionsSources
|
34
|
+
|
35
|
+
filter.on "change", ()=>
|
36
|
+
if @isRemote()
|
37
|
+
merged = _.extend(@getQuery(), @getQueryOptions())
|
38
|
+
@collection.applyFilter(merged, @getQueryOptions())
|
39
|
+
else
|
40
|
+
@trigger "refresh"
|
41
|
+
|
42
|
+
module
|
43
|
+
|
44
|
+
isRemote: ()->
|
45
|
+
@getQueryOptions().remote is true
|
46
|
+
|
47
|
+
getFilterState: ()->
|
48
|
+
@collection.__filters[ @cid ] ||= new FilterModel(@filterable)
|
49
|
+
|
50
|
+
setSortBy: (sortBy, options={})->
|
51
|
+
@getFilterState().setOption('sortBy', sortBy, options)
|
52
|
+
|
53
|
+
applyFilter: (query={}, options={})->
|
54
|
+
options = _.defaults(options, @getQueryOptions())
|
55
|
+
query = _.defaults(query, @getQuery())
|
56
|
+
|
57
|
+
@getFilterState().set({query,options}, options)
|
58
|
+
|
59
|
+
class FilterModel extends Backbone.Model
|
60
|
+
defaults:
|
61
|
+
options: {}
|
62
|
+
query: {}
|
63
|
+
|
64
|
+
setOption: (option, value, options)->
|
65
|
+
payload = {}
|
66
|
+
payload[option] = value
|
67
|
+
@set 'options', _.extend(@toOptions(), payload), options
|
68
|
+
|
69
|
+
setQueryOption: (option, value, options)->
|
70
|
+
payload = {}
|
71
|
+
payload[option] = value
|
72
|
+
@set 'query', _.extend(@toQuery(), payload), options
|
73
|
+
|
74
|
+
toOptions: ()->
|
75
|
+
@toJSON().options
|
76
|
+
|
77
|
+
toQuery: ()->
|
78
|
+
@toJSON().query
|
79
|
+
|
80
|
+
toRemote: ()->
|
81
|
+
options = @toOptions()
|
82
|
+
_.extend( @toQuery(), limit: options.limit, page: options.page, sortBy: options.sortBy )
|
@@ -1,3 +1,15 @@
|
|
1
1
|
Luca.modules.GridLayout =
|
2
|
-
|
2
|
+
_initializer: ()->
|
3
|
+
if @gridSpan
|
4
|
+
@$el.addClass "span#{ @gridSpan }"
|
5
|
+
|
6
|
+
if @gridOffset
|
7
|
+
@$el.addClass "offset#{ @gridOffset }"
|
8
|
+
|
9
|
+
if @gridRowFluid
|
10
|
+
@$el.addClass "row-fluid"
|
11
|
+
|
12
|
+
if @gridRow
|
13
|
+
@$el.addClass "row"
|
14
|
+
|
3
15
|
# implement
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Luca.modules.LoadMaskable =
|
2
|
-
|
3
|
-
|
2
|
+
__initializer: ()->
|
3
|
+
return unless @loadMask is true
|
4
4
|
|
5
5
|
if @loadMask is true
|
6
6
|
@defer ()=>
|
@@ -11,8 +11,14 @@ Luca.modules.LoadMaskable =
|
|
11
11
|
@$('.load-mask').hide()
|
12
12
|
.until("after:render")
|
13
13
|
|
14
|
-
@on (@loadmaskEnableEvent || "enable:loadmask"), @applyLoadMask
|
15
|
-
@on (@loadmaskDisableEvent || "disable:loadmask"), @applyLoadMask
|
14
|
+
@on (@loadmaskEnableEvent || "enable:loadmask"), @applyLoadMask, @
|
15
|
+
@on (@loadmaskDisableEvent || "disable:loadmask"), @applyLoadMask, @
|
16
|
+
|
17
|
+
showLoadMask: ()->
|
18
|
+
@trigger("enable:loadmask")
|
19
|
+
|
20
|
+
hideLoadMask: ()->
|
21
|
+
@trigger("disable:loadmask")
|
16
22
|
|
17
23
|
loadMaskTarget: ()->
|
18
24
|
if @loadMaskEl? then @$(@loadMaskEl) else @$bodyEl()
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Luca.modules.ModalView =
|
2
|
+
closeOnEscape: true
|
3
|
+
|
4
|
+
showOnInitialize: false
|
5
|
+
|
6
|
+
backdrop: false
|
7
|
+
|
8
|
+
__initializer: ()->
|
9
|
+
@$el.addClass("modal")
|
10
|
+
|
11
|
+
@on "before:render", applyModalConfig, @
|
12
|
+
|
13
|
+
@
|
14
|
+
|
15
|
+
container: ()->
|
16
|
+
$('body')
|
17
|
+
|
18
|
+
toggle: ()->
|
19
|
+
@$el.modal('toggle')
|
20
|
+
|
21
|
+
show: ()->
|
22
|
+
@$el.modal('show')
|
23
|
+
|
24
|
+
hide: ()->
|
25
|
+
@$el.modal('hide')
|
26
|
+
|
27
|
+
applyModalConfig = ()->
|
28
|
+
@$el.addClass 'modal'
|
29
|
+
@$el.addClass 'fade' if @fade is true
|
30
|
+
|
31
|
+
$('body').append( @$el )
|
32
|
+
|
33
|
+
@$el.modal
|
34
|
+
backdrop: @backdrop is true
|
35
|
+
keyboard: @closeOnEscape is true
|
36
|
+
show: @showOnInitialize is true
|
37
|
+
|
38
|
+
@
|
@@ -0,0 +1,87 @@
|
|
1
|
+
Luca.modules.Paginatable =
|
2
|
+
paginatorViewClass: 'Luca.components.PaginationControl'
|
3
|
+
paginationSelector: ".toolbar.bottom"
|
4
|
+
|
5
|
+
__included: ()->
|
6
|
+
_.extend(Luca.Collection::, __paginators: {})
|
7
|
+
|
8
|
+
__initializer:()->
|
9
|
+
if @paginatable is false
|
10
|
+
return
|
11
|
+
|
12
|
+
# TEMP HACK
|
13
|
+
unless Luca.isBackboneCollection(@collection)
|
14
|
+
@collection = Luca.CollectionManager.get?()?.getOrCreate(@collection)
|
15
|
+
|
16
|
+
unless Luca.isBackboneCollection(@collection)
|
17
|
+
@debug "Skipping Paginatable due to no collection being present on #{ @name || @cid }"
|
18
|
+
@debug "collection", @collection
|
19
|
+
return
|
20
|
+
|
21
|
+
_.bindAll @, "paginationControl", "pager"
|
22
|
+
|
23
|
+
@getCollection ||= ()->
|
24
|
+
@collection
|
25
|
+
|
26
|
+
collection = @getCollection()
|
27
|
+
|
28
|
+
paginationState = @getPaginationState()
|
29
|
+
|
30
|
+
@optionsSources ||= []
|
31
|
+
@queryOptions ||= {}
|
32
|
+
|
33
|
+
@optionsSources.push ()=>
|
34
|
+
options = _( paginationState.toJSON() ).pick('limit','page','sortBy')
|
35
|
+
_.extend(options, pager: @pager)
|
36
|
+
|
37
|
+
paginationState.on "change:page", (state)=>
|
38
|
+
if @isRemote()
|
39
|
+
filter = _.extend(@toQuery(), @toQueryOptions())
|
40
|
+
@collection.applyFilter(filter, remote: true)
|
41
|
+
else
|
42
|
+
@trigger "refresh"
|
43
|
+
|
44
|
+
@on "before:render", @renderPaginationControl, @
|
45
|
+
|
46
|
+
pager: (numberOfPages, models)->
|
47
|
+
@getPaginationState().set(numberOfPages: numberOfPages, itemCount: models.length)
|
48
|
+
@paginationControl().updateWithPageCount( numberOfPages, models )
|
49
|
+
|
50
|
+
isRemote: ()->
|
51
|
+
@getQueryOptions().remote is true
|
52
|
+
|
53
|
+
getPaginationState: ()->
|
54
|
+
@collection.__paginators[ @cid ] ||= @paginationControl().state
|
55
|
+
|
56
|
+
paginationContainer: ()->
|
57
|
+
@$(">#{ @paginationSelector }")
|
58
|
+
|
59
|
+
setCurrentPage: (page=1, options={})->
|
60
|
+
@getPaginationState().set('page', page, options)
|
61
|
+
|
62
|
+
setPage: (page=1, options={})->
|
63
|
+
@getPaginationState().set('page', page, options)
|
64
|
+
|
65
|
+
setLimit: (limit=0,options={})->
|
66
|
+
@getPaginationState().set('limit', limit, options)
|
67
|
+
|
68
|
+
paginationControl: ()->
|
69
|
+
return @paginator if @paginator?
|
70
|
+
|
71
|
+
_.defaults(@paginatable ||= {}, page: 1, limit: 20)
|
72
|
+
|
73
|
+
@paginator = Luca.util.lazyComponent
|
74
|
+
type: "pagination_control"
|
75
|
+
collection: @getCollection()
|
76
|
+
defaultState: @paginatable
|
77
|
+
parent: (@name || @cid)
|
78
|
+
debugMode: @debugMode
|
79
|
+
|
80
|
+
@paginator
|
81
|
+
|
82
|
+
renderPaginationControl: ()->
|
83
|
+
control = @paginationControl()
|
84
|
+
@paginationContainer().append( control.render().$el )
|
85
|
+
control
|
86
|
+
|
87
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Luca.modules.StateModel =
|
2
|
+
__initializer: ()->
|
3
|
+
return unless @stateful is true
|
4
|
+
return if @state? and not Luca.isBackboneModel(@state)
|
5
|
+
|
6
|
+
@state = new Backbone.Model(@defaultState || {})
|
7
|
+
|
8
|
+
@set ||= ()=> @state.set.apply(@state, arguments)
|
9
|
+
@get ||= ()=> @state.get.apply(@state, arguments)
|
10
|
+
|
11
|
+
@state.on "change", (state)=>
|
12
|
+
@trigger "state:change", state
|
13
|
+
previousValues = state.previousAttributes()
|
14
|
+
for changed, value in state.changedAttributes
|
15
|
+
@trigger "state:change:#{ changed }", value, state.previous(changed)
|
16
|
+
|
data/src/plugins/events.coffee
CHANGED
@@ -21,10 +21,11 @@ class DeferredBindingProxy
|
|
21
21
|
throw "Must pass a function or a string representing one"
|
22
22
|
|
23
23
|
if wrapWithUnderscore is true
|
24
|
-
@fn = ()
|
24
|
+
@fn = _.bind ()->
|
25
25
|
_.defer(fn)
|
26
|
+
, @object
|
26
27
|
else
|
27
|
-
@fn = fn
|
28
|
+
@fn = _.bind(fn,@object)
|
28
29
|
|
29
30
|
@
|
30
31
|
|
@@ -41,6 +42,7 @@ class DeferredBindingProxy
|
|
41
42
|
@object
|
42
43
|
|
43
44
|
Luca.Events =
|
45
|
+
|
44
46
|
defer: (operation, wrapWithUnderscore=true)->
|
45
47
|
new DeferredBindingProxy(@, operation, wrapWithUnderscore)
|
46
48
|
|
@@ -52,3 +54,29 @@ Luca.Events =
|
|
52
54
|
@unbind(trigger, onceFn)
|
53
55
|
|
54
56
|
@bind trigger, onceFn
|
57
|
+
|
58
|
+
|
59
|
+
Luca.EventsExt =
|
60
|
+
waitUntil:(trigger, context)->
|
61
|
+
@waitFor.call(@, trigger, context )
|
62
|
+
|
63
|
+
waitFor: (trigger, context)->
|
64
|
+
self = @
|
65
|
+
proxy =
|
66
|
+
on:(target)->
|
67
|
+
target.waitFor.call(target,trigger,context)
|
68
|
+
and:(runList...)->
|
69
|
+
for fn in runList
|
70
|
+
fn = if _.isFunction(fn) then fn else self[fn]
|
71
|
+
self.once(trigger, fn, context)
|
72
|
+
andThen: ()->
|
73
|
+
self.and.apply(self, arguments)
|
74
|
+
|
75
|
+
relayEvent: (trigger)->
|
76
|
+
on: (components...)=>
|
77
|
+
to: (targets...)=>
|
78
|
+
for target in targets
|
79
|
+
for component in components
|
80
|
+
component.on trigger, (args...)=>
|
81
|
+
args.unshift(trigger)
|
82
|
+
target.trigger.apply(target,args)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="luca-ui-g-view-wrapper">
|
2
|
+
<div class="g-view-header"></div>
|
3
|
+
<div class="luca-ui-g-view-body">
|
4
|
+
<table class="luca-ui-g-view scrollable-table" width="100%" cellpadding=0 cellspacing=0>
|
5
|
+
<thead class="fixed"></thead>
|
6
|
+
<tbody class="scrollable"></tbody>
|
7
|
+
<tfoot></tfoot>
|
8
|
+
</table>
|
9
|
+
</div>
|
10
|
+
<div class="luca-ui-g-view-header"></div>
|
11
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div id="<%= id %>" class="<%= classes %>" style="<%= style %>"></div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div id="<%= cid %>-tab-selector" class="tab-selector-container">
|
2
|
+
<ul id="<%= cid %>-tabs-nav" class="nav nav-tabs">
|
3
|
+
<% for(var i = 0; i < components.length; i++ ) { %>
|
4
|
+
<% var component = components[i];%>
|
5
|
+
<li class="tab-selector" data-target="<%= i %>">
|
6
|
+
<a data-target="<%= i %>">
|
7
|
+
<%= component.title %>
|
8
|
+
</a>
|
9
|
+
</li>
|
10
|
+
<% } %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="luca-ui-toolbar-wrapper" id="<%= id %>"></div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<label for="<%= input_id %>">
|
2
|
+
<%= label %>
|
3
|
+
<input type="checkbox" name="<%= input_name %>" value="<%= input_value %>" style="<%= inputStyles %>" />
|
4
|
+
</label>
|
5
|
+
|
6
|
+
<% if(helperText) { %>
|
7
|
+
<p class="helper-text help-block">
|
8
|
+
<%= helperText %>
|
9
|
+
</p>
|
10
|
+
<% } %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<input type="hidden" name="<%= input_name %>" value="<%= input_value %>" style="<%= inputStyles %>" />
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<label for="<%= input_id %>">
|
2
|
+
<%= label %>
|
3
|
+
</label>
|
4
|
+
<div class="controls">
|
5
|
+
<select name="<%= input_name %>" value="<%= input_value %>" style="<%= inputStyles %>" ></select>
|
6
|
+
<% if(helperText) { %>
|
7
|
+
<p class="helper-text help-block">
|
8
|
+
<%= helperText %>
|
9
|
+
</p>
|
10
|
+
<% } %>
|
11
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<label for="<%= input_id %>">
|
2
|
+
<%= label %>
|
3
|
+
</label>
|
4
|
+
<div class="controls">
|
5
|
+
<textarea name="<%= input_name %>" style="<%= inputStyles %>" ><%= input_value %></textarea>
|
6
|
+
<% if(helperText) { %>
|
7
|
+
<p class="helper-text help-block">
|
8
|
+
<%= helperText %>
|
9
|
+
</p>
|
10
|
+
<% } %>
|
11
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% if(typeof(label)!=="undefined" && (typeof(hideLabel) !== "undefined" && !hideLabel) || (typeof(hideLabel)==="undefined")) {%>
|
2
|
+
<label class="control-label" for="<%= input_id %>"><%= label %></label>
|
3
|
+
<% } %>
|
4
|
+
|
5
|
+
<div class="controls">
|
6
|
+
<% if( typeof(addOn) !== "undefined" ) { %>
|
7
|
+
<span class="add-on"><%= addOn %></span>
|
8
|
+
<% } %>
|
9
|
+
<input type="text" name="<%= input_name %>" style="<%= inputStyles %>" value="<%= input_value %>" />
|
10
|
+
<% if(helperText) { %>
|
11
|
+
<p class="helper-text help-block">
|
12
|
+
<%= helperText %>
|
13
|
+
</p>
|
14
|
+
<% } %>
|
15
|
+
|
16
|
+
</div>
|