sproutit-sproutcore 1.0.20090721145251 → 1.0.20090721145280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +3 -3
- data/VERSION.yml +2 -2
- data/frameworks/sproutcore/Buildfile +0 -1
- data/gen/app/templates/apps/@target_name@/core.js +27 -0
- data/gen/app/templates/apps/@target_name@/english.lproj/loading.rhtml +9 -0
- data/gen/app/templates/apps/@target_name@/english.lproj/main_page.js +22 -0
- data/gen/app/templates/apps/@target_name@/english.lproj/strings.js +15 -0
- data/gen/app/templates/apps/@target_name@/main.js +30 -0
- data/gen/controller/templates/controllers/@filename@.js +18 -0
- data/gen/controller/templates/tests/controllers/@filename@.js +15 -0
- data/gen/framework/templates/frameworks/@target_name@/core.js +21 -0
- data/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +15 -0
- data/gen/language/templates/@filename@/strings.js +14 -0
- data/gen/model/templates/fixtures/@filename@.js +35 -0
- data/gen/model/templates/models/@filename@.js +19 -0
- data/gen/model/templates/tests/models/@filename@.js +15 -0
- data/gen/project/templates/@filename@/Buildfile +7 -0
- data/gen/project/templates/@filename@/README +7 -0
- data/gen/test/templates/tests/@filename@.js +15 -0
- data/gen/theme/templates/themes/@target_name@/english.lproj/strings.js +15 -0
- data/gen/view/templates/tests/views/@filename@.js +15 -0
- data/gen/view/templates/views/@filename@.js +18 -0
- data/lib/sproutcore/models/generator.rb +2 -2
- metadata +21 -33
- data/frameworks/sproutcore/frameworks/deprecated/core.js +0 -59
- data/frameworks/sproutcore/frameworks/deprecated/lib/button_views.rb +0 -330
- data/frameworks/sproutcore/frameworks/deprecated/lib/collection_view.rb +0 -83
- data/frameworks/sproutcore/frameworks/deprecated/lib/core_views.rb +0 -326
- data/frameworks/sproutcore/frameworks/deprecated/lib/form_views.rb +0 -253
- data/frameworks/sproutcore/frameworks/deprecated/lib/index.rhtml +0 -75
- data/frameworks/sproutcore/frameworks/deprecated/lib/menu_views.rb +0 -93
- data/frameworks/sproutcore/frameworks/deprecated/server/rails_server.js +0 -80
- data/frameworks/sproutcore/frameworks/deprecated/server/rest_server.js +0 -178
- data/frameworks/sproutcore/frameworks/deprecated/server/server.js +0 -673
- data/frameworks/sproutcore/frameworks/deprecated/system/animator.js +0 -679
- data/frameworks/sproutcore/frameworks/deprecated/system/binding.js +0 -36
- data/frameworks/sproutcore/frameworks/deprecated/system/browser.js +0 -75
- data/frameworks/sproutcore/frameworks/deprecated/system/classic_responder.js +0 -312
- data/frameworks/sproutcore/frameworks/deprecated/system/event.js +0 -58
- data/frameworks/sproutcore/frameworks/deprecated/system/globals.js +0 -20
- data/frameworks/sproutcore/frameworks/deprecated/system/misc.js +0 -58
- data/frameworks/sproutcore/frameworks/deprecated/system/node_descriptor.js +0 -72
- data/frameworks/sproutcore/frameworks/deprecated/system/object.js +0 -122
- data/frameworks/sproutcore/frameworks/deprecated/system/path_module.js +0 -432
- data/frameworks/sproutcore/frameworks/deprecated/system/string.js +0 -107
- data/frameworks/sproutcore/frameworks/deprecated/tests/application/application.rhtml +0 -125
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/clippingFrame.rhtml +0 -401
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/frame.rhtml +0 -357
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/classic_view/isVisibleInWindow.rhtml +0 -147
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/base.rhtml +0 -298
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/incremental_rendering.rhtml +0 -260
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/collection/source_list_rendering.rhtml +0 -143
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/popup_button.rhtml +0 -128
- data/frameworks/sproutcore/frameworks/deprecated/tests/views/text_field.rhtml +0 -37
- data/frameworks/sproutcore/frameworks/deprecated/views/collection.js +0 -24
@@ -1,59 +0,0 @@
|
|
1
|
-
// ========================================================================
|
2
|
-
// SproutCore -- JavaScript Application Framework
|
3
|
-
// Copyright ©2006-2008, Sprout Systems, Inc. and contributors.
|
4
|
-
// Portions copyright ©2008 Apple, Inc. All rights reserved.
|
5
|
-
// ========================================================================
|
6
|
-
|
7
|
-
/* Core additions to SC */
|
8
|
-
|
9
|
-
SC.mixin(/** @scope SC */ {
|
10
|
-
|
11
|
-
/**
|
12
|
-
@deprecated
|
13
|
-
|
14
|
-
Call this method during setup of your app to queue up methods to be
|
15
|
-
called once the entire document has finished loading. If you call this
|
16
|
-
method once the document has already loaded, then the function will be
|
17
|
-
called immediately.
|
18
|
-
|
19
|
-
Any function you register with this method will be called just before
|
20
|
-
main.
|
21
|
-
|
22
|
-
You should instead use ready(), which takes the same paramters.
|
23
|
-
|
24
|
-
@param target {Object} optional target object. Or just pass a method.
|
25
|
-
@param method {Function} the method to call.
|
26
|
-
@return {void}
|
27
|
-
*/
|
28
|
-
callOnLoad: function(target, method) {
|
29
|
-
return SC.ready(target, method) ;
|
30
|
-
},
|
31
|
-
|
32
|
-
/** @deprecated Use guidFor() instead. */
|
33
|
-
getGUID: SC.guidFor
|
34
|
-
|
35
|
-
|
36
|
-
});
|
37
|
-
|
38
|
-
// Returns the passed item as an array. If the item is already an array,
|
39
|
-
// it is returned as is. If it is not an array, it is placed into one. If
|
40
|
-
// it is null, an empty array is returned.
|
41
|
-
Array.from = SC.$A ;
|
42
|
-
|
43
|
-
// ........................................
|
44
|
-
// GLOBAL EXPORTS
|
45
|
-
//
|
46
|
-
var $type, $I, $A ;
|
47
|
-
$type = SC.typeOf;
|
48
|
-
$I = SC.inspect ;
|
49
|
-
$A = SC.$A ;
|
50
|
-
|
51
|
-
/**
|
52
|
-
Makes the computed property as an outlet. Outlets can be setup en-masse
|
53
|
-
when the object is first instantiated by calling initOutlets(). (This
|
54
|
-
method is defined in SC.Observable).
|
55
|
-
*/
|
56
|
-
Function.prototype.outlet = function(aFlag) {
|
57
|
-
this.autoconfiguredOutlet = (aFlag === undefined) ? YES : aFlag;
|
58
|
-
return this ;
|
59
|
-
} ;
|
@@ -1,330 +0,0 @@
|
|
1
|
-
############################################################
|
2
|
-
# BUTTON VIEW HELPERS
|
3
|
-
#
|
4
|
-
# You can do a lot of different things with buttons: push buttons, switches,
|
5
|
-
# checkboxes, radio buttons and more. This file contains the helpers you can
|
6
|
-
# use to help you build these.
|
7
|
-
#
|
8
|
-
|
9
|
-
require_helpers 'core_views'
|
10
|
-
|
11
|
-
# This is the core button_view helper. Most other helpers in this file
|
12
|
-
# descend from this helper. If a helper is not provided that already
|
13
|
-
# builds the button you want, you can probably use this helper to
|
14
|
-
# construct it yourself.
|
15
|
-
#
|
16
|
-
# :enabled (bindable) =>
|
17
|
-
# If set to true, the button will be enabled.
|
18
|
-
#
|
19
|
-
# :selected (bindable) =>
|
20
|
-
# Set to true, false or :mixed. This will determine if the button
|
21
|
-
# appears selected. You can bind to this option but more often you will
|
22
|
-
# want to bind to :value.
|
23
|
-
#
|
24
|
-
# :default (bindable) =>
|
25
|
-
# Set to true to make this button the default button triggered when
|
26
|
-
# you press return while focused in a panel or form.
|
27
|
-
#
|
28
|
-
# :cancel (bindable) =>
|
29
|
-
# Set to true to make this button the one triggered when you press
|
30
|
-
# return while focused on a panel or form.
|
31
|
-
#
|
32
|
-
# :theme => :regular | :back | :checkbox | :radio | :square |
|
33
|
-
# (your own theme)
|
34
|
-
# Use this to set the theme appearance of the button. The SC theme
|
35
|
-
# comes with built-in support for the ones listed above or you can
|
36
|
-
# name your own. a CSS class name will be assigned to the button with
|
37
|
-
# this theme name.
|
38
|
-
#
|
39
|
-
# :behavior => :push, :toggle, :on, :off
|
40
|
-
# Specify the behavior of the button when pressed. The default is
|
41
|
-
# :push.
|
42
|
-
#
|
43
|
-
# :tag =>
|
44
|
-
# The tag name to use for the button. Defaults to 'a'. If the tag is
|
45
|
-
# 'a', an href="javascript:;" will be added automatically unless you
|
46
|
-
# specify an alternate.
|
47
|
-
#
|
48
|
-
# :href =>
|
49
|
-
# optional href to pass. Generall you don't want to pass this.
|
50
|
-
#
|
51
|
-
# :label =>
|
52
|
-
# The value of the label placed inside the button. You can alternately
|
53
|
-
# specify inner_html which will be used a the label. Note that the
|
54
|
-
# button_view generator automatically wraps your inner_html with a
|
55
|
-
# standard button structure unless you pass :label => false
|
56
|
-
#
|
57
|
-
# :image =>
|
58
|
-
# Renders an image tag on the outside of the label span. If this is
|
59
|
-
# set, then the wrapping tag will also have 'image' css class applied.
|
60
|
-
#
|
61
|
-
# :sprite => [resource_url, x-ofset, y-offset]
|
62
|
-
# Render an image sprite! The expected size of the sprite depends on
|
63
|
-
# the class name of the view. If the x-offset or y-offset are numbers
|
64
|
-
# they will be converted to "px". If this is set, then the wrapping
|
65
|
-
# tag will also have 'sprite' css class applied.
|
66
|
-
#
|
67
|
-
# Alternatively, name the CSS class you want assigned to the img for
|
68
|
-
# the sprite.
|
69
|
-
#
|
70
|
-
view_helper :button_view do
|
71
|
-
# JavaScript
|
72
|
-
property :enabled, :key => 'isEnabled'
|
73
|
-
|
74
|
-
property :action
|
75
|
-
property :target
|
76
|
-
|
77
|
-
#property(:action) { |v| "function(ev) { return #{v}(this, ev); }" }
|
78
|
-
property :default, :key => 'isDefault'
|
79
|
-
property :cancel, :key => 'isCancel'
|
80
|
-
property :value
|
81
|
-
property :theme
|
82
|
-
property :size
|
83
|
-
property :behavior, :key => 'buttonBehavior'
|
84
|
-
property :toggle_on_value
|
85
|
-
property :toggle_off_value
|
86
|
-
|
87
|
-
property :key_equivalent, :key => :keyEquivalent
|
88
|
-
|
89
|
-
|
90
|
-
property(:selected, :key => 'isSelected') do |x|
|
91
|
-
(x == :mixed) ? 'SC.MIXED_STATE' : x
|
92
|
-
end
|
93
|
-
|
94
|
-
view 'SC.ClassicButtonView'
|
95
|
-
|
96
|
-
# HTML
|
97
|
-
var :title
|
98
|
-
var :label, @title || @inner_html || 'Submit'
|
99
|
-
var :tag, 'a'
|
100
|
-
var :theme, :regular
|
101
|
-
var :size, :normal
|
102
|
-
|
103
|
-
attribute(:href) { |x| (x.nil? && (@tag.downcase.to_s == 'a')) ? 'javascript:;' : x }
|
104
|
-
|
105
|
-
# Add the theme to the CSS class.
|
106
|
-
css_class_names << 'sc-button-view'
|
107
|
-
css_class_names << 'button'
|
108
|
-
css_class_names << @theme unless @theme.nil? || @theme == false
|
109
|
-
css_class_names << @size unless @size.nil? || @size == false
|
110
|
-
|
111
|
-
var :image
|
112
|
-
var :sprite
|
113
|
-
|
114
|
-
if @image
|
115
|
-
@image = %(<img src="#{@image}" />)
|
116
|
-
css_class_names << 'image'
|
117
|
-
|
118
|
-
elsif @sprite
|
119
|
-
img_url = self.blank_url
|
120
|
-
|
121
|
-
if @sprite.instance_of?(Array)
|
122
|
-
xoff = @sprite[1]
|
123
|
-
xoff = "#{xoff}px" if xoff.kind_of?(Numeric)
|
124
|
-
|
125
|
-
yoff = @sprite[2]
|
126
|
-
yoff = "#{yoff}px" if yoff.kind_of?(Numeric)
|
127
|
-
|
128
|
-
# render image part
|
129
|
-
@image = %(<img class="sprite" style="background: url(#{@sprite[0]}) no-repeat #{xoff} #{yoff};" src="#{img_url}" />)
|
130
|
-
|
131
|
-
else
|
132
|
-
@image = %(<img class="#{@sprite} sprite" src="#{img_url}" />)
|
133
|
-
end
|
134
|
-
|
135
|
-
end
|
136
|
-
|
137
|
-
# Generate some standard HTML for unless :label => false.
|
138
|
-
unless @label == false
|
139
|
-
# Button Width properties must be set on the inner label. To deal
|
140
|
-
# with this remove any width style properties from the parent element
|
141
|
-
# and append them to the inner label.
|
142
|
-
@label_style = []
|
143
|
-
css_styles.flatten!
|
144
|
-
css_styles.reject! do | part |
|
145
|
-
if part =~ /width:/
|
146
|
-
@label_style << part
|
147
|
-
true
|
148
|
-
else
|
149
|
-
false
|
150
|
-
end
|
151
|
-
end
|
152
|
-
if @label_style.size > 0
|
153
|
-
@label_style = %(style="#{@label_style * ' '}" )
|
154
|
-
else
|
155
|
-
@label_style = ''
|
156
|
-
end
|
157
|
-
|
158
|
-
# Avoid doing the normal thing for anchor tags.
|
159
|
-
@inner_html = %(<span class="button-inner">#{@image}<span #{@label_style}class="label">#{@label}</span></span>)
|
160
|
-
|
161
|
-
else
|
162
|
-
@inner_html = [@image,@inner_html] * ''
|
163
|
-
end
|
164
|
-
|
165
|
-
end
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
view_helper :popup_button_view, :wraps => :button_view do
|
170
|
-
parent_helper
|
171
|
-
property :menu, :key => :menuName
|
172
|
-
view 'SC.PopupButtonView'
|
173
|
-
end
|
174
|
-
|
175
|
-
|
176
|
-
# Renders a disclosure triangle.
|
177
|
-
view_helper :disclosure_view, :wraps => :button_view do
|
178
|
-
opts = { :theme => :disclosure }
|
179
|
-
opts[:label] = false if options[:label].nil?
|
180
|
-
parent_helper(opts)
|
181
|
-
|
182
|
-
view 'SC.DisclosureView'
|
183
|
-
@inner_html = [%(<img class="button" src="#{blank_url}" />)]
|
184
|
-
@inner_html << %(<span #{@label_style}class="label">#{@label}</span>) if @label
|
185
|
-
@inner_html = @inner_html.join('')
|
186
|
-
|
187
|
-
css_class_names << 'sc-disclosure-view'
|
188
|
-
end
|
189
|
-
|
190
|
-
|
191
|
-
# Renders a checkbox. If you pass a label this will render the label
|
192
|
-
# text next to the checkbox. Unlike button_view, passing no :label is
|
193
|
-
# the same as passing :label => false.
|
194
|
-
view_helper :checkbox_view, :wraps => :button_view do
|
195
|
-
opts = { :theme => :checkbox }
|
196
|
-
opts[:label] = false if options[:label].nil?
|
197
|
-
parent_helper(opts)
|
198
|
-
|
199
|
-
# provide some defaults to the JavaScript.
|
200
|
-
view 'SC.CheckboxView'
|
201
|
-
|
202
|
-
# render checkbox HTML.
|
203
|
-
css_class_names << 'sc-checkbox-view'
|
204
|
-
|
205
|
-
img_url = self.blank_url
|
206
|
-
@inner_html = [%(<img class="button" src="#{img_url}" />)]
|
207
|
-
@inner_html << %(<span #{@label_style}class="label">#{@label}</span>) if @label
|
208
|
-
@inner_html = @inner_html.join ''
|
209
|
-
end
|
210
|
-
|
211
|
-
# Renders a radio buton. If you pass a label this will render the label
|
212
|
-
# text next to the checkbox. Unlike button_view, passing no :label is
|
213
|
-
# the same as passing :label => false.
|
214
|
-
view_helper :radio_view, :wraps => :button_view do
|
215
|
-
opts = { :theme => :radio }
|
216
|
-
opts[:label] = false if options[:label].nil?
|
217
|
-
parent_helper(opts)
|
218
|
-
|
219
|
-
view 'SC.RadioView'
|
220
|
-
|
221
|
-
css_class_names << 'sc-radio-button-view'
|
222
|
-
|
223
|
-
# render checkbox HTML.
|
224
|
-
img_url = self.blank_url
|
225
|
-
@inner_html = [%(<img class="button" src="#{img_url}" />)]
|
226
|
-
@inner_html << %(<span #{@label_style}class="label">#{@label}</span>) if @label
|
227
|
-
@inner_html = @inner_html.join ''
|
228
|
-
end
|
229
|
-
|
230
|
-
# This renders a group of radio buttons. The buttons are controlled by
|
231
|
-
# a RadioGroupView that will map the value to a set of selection states.
|
232
|
-
#
|
233
|
-
# :values => [REQ]
|
234
|
-
# Set this to the values you want displayed in the radio buttons. You
|
235
|
-
# can pass an array here of strings or symbols, in which case these will
|
236
|
-
# be used as the values for the buttons and the names will be created
|
237
|
-
# from them. Or you can pass an array of arrays. The first items is
|
238
|
-
# the key value, the second item is the human readable value.
|
239
|
-
# Alternatively, you can set the inner_html of your view to include
|
240
|
-
# radio buttons as outlets. In this case, you must name the outlets
|
241
|
-
# :key_button.
|
242
|
-
#
|
243
|
-
# :layout => :horizontal | :vertical
|
244
|
-
# This will write out horizontal or vertical to the CSS class names so
|
245
|
-
# you can control the layout of your radio buttons.
|
246
|
-
#
|
247
|
-
# :width =>
|
248
|
-
# This will set the width of each item in the view.
|
249
|
-
#
|
250
|
-
# BINDABLE OPTIONS
|
251
|
-
#
|
252
|
-
# :value =>
|
253
|
-
# The current value of the radio buttons.
|
254
|
-
#
|
255
|
-
view_helper :radio_group_view do
|
256
|
-
|
257
|
-
#JavaScript
|
258
|
-
property :value
|
259
|
-
view 'SC.RadioGroupView'
|
260
|
-
|
261
|
-
# HTML
|
262
|
-
|
263
|
-
# get the layout mode.
|
264
|
-
var :layout, :vertical
|
265
|
-
css_class_names << 'sc-radio-group-view'
|
266
|
-
css_class_names << 'radio'
|
267
|
-
css_class_names << @layout if @layout
|
268
|
-
|
269
|
-
var :tag, 'span'
|
270
|
-
|
271
|
-
# If a set of values was passed, build the button views automatically.
|
272
|
-
var :values
|
273
|
-
if @values
|
274
|
-
# Get the width styles out of the main style to put into the
|
275
|
-
# individual radio items.
|
276
|
-
css_styles.flatten!
|
277
|
-
@label_styles = css_styles.reject { |p| !(p =~ /width:/) }
|
278
|
-
css_styles.reject! { |p| @label_styles.include?(p) }
|
279
|
-
|
280
|
-
if @label_styles.size > 0
|
281
|
-
@label_styles = %( style="#{@label_styles * ' '}" )
|
282
|
-
else
|
283
|
-
@label_styles = ''
|
284
|
-
end
|
285
|
-
|
286
|
-
# save off client_builder. The context this is run in later will
|
287
|
-
# not retain the client_builder
|
288
|
-
current_client_builder = self.client_builder
|
289
|
-
html = @values.map do | v |
|
290
|
-
v = [v].flatten
|
291
|
-
key = v.first
|
292
|
-
label = (v.size > 1) ? v[1] : key.to_s.humanize
|
293
|
-
render_source.radio_view(:outlet => true, :label => label, :style => @label_styles, :toggle_on_value => key, :toggle_off_value => nil, :client => self.client_builder)
|
294
|
-
end
|
295
|
-
|
296
|
-
@inner_html = html * "\n"
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
# Renders a slider view.
|
301
|
-
view_helper :slider_view do
|
302
|
-
|
303
|
-
property :minimum
|
304
|
-
property :maximum
|
305
|
-
property :step
|
306
|
-
view 'SC.SliderView'
|
307
|
-
|
308
|
-
css_class_names << 'sc-slider-view'
|
309
|
-
|
310
|
-
@label_style = []
|
311
|
-
css_styles.flatten!
|
312
|
-
css_styles.reject! do | part |
|
313
|
-
if part =~ /width:/
|
314
|
-
@label_style << part
|
315
|
-
true
|
316
|
-
else
|
317
|
-
false
|
318
|
-
end
|
319
|
-
end
|
320
|
-
if @label_style.size > 0
|
321
|
-
# subtract the extra space required
|
322
|
-
@label_style = @label_style.map { |x| x.gsub(/[0-9]+/,($1.to_i-48).to_s)}
|
323
|
-
@label_style = %(style="#{@label_style * ' '}" )
|
324
|
-
else
|
325
|
-
@label_style = ''
|
326
|
-
end
|
327
|
-
|
328
|
-
@inner_html = %(<span class="outer"><span #{@label_style} class="inner"></span><img src="#{self.blank_url}" class="sc-handle" /></span>)
|
329
|
-
|
330
|
-
end
|
@@ -1,83 +0,0 @@
|
|
1
|
-
############################################################
|
2
|
-
# COLLECTION VIEW HELPERS
|
3
|
-
#
|
4
|
-
# Collection views render groups of views such as lists, tables, source lists,
|
5
|
-
# grids and so on. The view helpers here will make that easy.
|
6
|
-
#
|
7
|
-
#
|
8
|
-
|
9
|
-
require_helpers 'core_views'
|
10
|
-
|
11
|
-
# Base Helper for a collection view. Many times you will need
|
12
|
-
# your collection view to actually appear inside of a scroll_view. If
|
13
|
-
# this is the case, just pass :use_scroll_view => true.
|
14
|
-
#
|
15
|
-
# Note that many of the default views will set this to true by default.
|
16
|
-
#
|
17
|
-
view_helper :collection_view do
|
18
|
-
property :content
|
19
|
-
property :selection
|
20
|
-
property :toggle, :key => 'useToggleSelection'
|
21
|
-
property :selectable, :key => 'isSelectable'
|
22
|
-
property :enabled, :key => 'isEnabled'
|
23
|
-
property :act_on_select
|
24
|
-
property(:example_view) { |v| v }
|
25
|
-
property(:example_group_view) { |v| v }
|
26
|
-
property :content_value_key
|
27
|
-
property :group_visible_key
|
28
|
-
property :group_title_key
|
29
|
-
property :content_value_editable, :key => 'contentValueIsEditable'
|
30
|
-
property :accepts_first_responder, true
|
31
|
-
property :can_reorder_content
|
32
|
-
property :can_delete_content
|
33
|
-
|
34
|
-
property :content_icon_key
|
35
|
-
property :content_checkbox_key
|
36
|
-
|
37
|
-
# Unless the developer passes something specific, automatically enable
|
38
|
-
# has_content_icon if either icon property is specified.
|
39
|
-
var :content_icon_key
|
40
|
-
property :has_content_icon, !!@content_icon_key
|
41
|
-
|
42
|
-
# Unless the developer passes something specific, automatically enable
|
43
|
-
# content branc if content_is_branch_property is defined.
|
44
|
-
var :content_is_branch_key
|
45
|
-
property :content_is_branch_key
|
46
|
-
property :has_content_branch, !!@content_is_branch_key
|
47
|
-
|
48
|
-
property :content_unread_count_key
|
49
|
-
property :content_action_key
|
50
|
-
|
51
|
-
property(:group, :key => 'groupBy') do |v|
|
52
|
-
"['#{Array(v) * "','" }']"
|
53
|
-
end
|
54
|
-
|
55
|
-
property(:action) { |v| "function(ev) { return #{v}(this, ev); }" }
|
56
|
-
view 'SC.CollectionView'
|
57
|
-
|
58
|
-
css_class_names << 'sc-collection-view'
|
59
|
-
end
|
60
|
-
|
61
|
-
view_helper :list_view, :extends => :collection_view do
|
62
|
-
property :row_height
|
63
|
-
view 'SC.ListView'
|
64
|
-
css_class_names << 'sc-list-view'
|
65
|
-
end
|
66
|
-
|
67
|
-
view_helper :grid_view, :extends => :collection_view do
|
68
|
-
property :row_height
|
69
|
-
property :column_width
|
70
|
-
view 'SC.GridView'
|
71
|
-
css_class_names << 'sc-grid-view'
|
72
|
-
end
|
73
|
-
|
74
|
-
view_helper :source_list_view, :extends => :collection_view do
|
75
|
-
view 'SC.SourceListView'
|
76
|
-
css_class_names << 'sc-source-list-view'
|
77
|
-
end
|
78
|
-
|
79
|
-
view_helper :table_view, :extends => :collection_view do
|
80
|
-
view 'SC.TableView'
|
81
|
-
css_class_names << 'sc-table-view'
|
82
|
-
end
|
83
|
-
|