sproutcore 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/frameworks/sproutcore/CHANGELOG.md +212 -11
  3. data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +17 -17
  4. data/lib/frameworks/sproutcore/frameworks/ajax/tests/system/request.js +103 -86
  5. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -1
  6. data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +33 -21
  7. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +3 -1
  8. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +7 -2
  9. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +5 -2
  10. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +7 -0
  11. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +1 -1
  12. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +36 -30
  13. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/many_array/core_methods.js +84 -42
  14. data/lib/frameworks/sproutcore/frameworks/desktop/{resources/debug → debug/resources}/a_sample_image.jpg +0 -0
  15. data/lib/frameworks/sproutcore/frameworks/desktop/{resources/debug → debug/resources}/iframe.html +1 -1
  16. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/responder.js +68 -68
  17. data/lib/frameworks/sproutcore/frameworks/desktop/resources/list_item.css +1 -0
  18. data/lib/frameworks/sproutcore/frameworks/desktop/resources/menu_item_view.css +1 -0
  19. data/lib/frameworks/sproutcore/frameworks/desktop/resources/slider.css +6 -5
  20. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +1 -1
  21. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +1 -1
  22. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/web/ui.js +2 -0
  23. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +45 -36
  24. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/{gestureable.js → gesturable.js} +0 -0
  25. data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +2 -4
  26. data/lib/frameworks/sproutcore/frameworks/foundation/resources/benchmark.css +1 -0
  27. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +13 -0
  28. data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +4 -33
  29. data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +31 -17
  30. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +59 -1
  31. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
  32. data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +4 -0
  33. data/lib/gen/app/templates/apps/@target_name@/Buildfile +3 -1
  34. data/lib/gen/app/templates/apps/@target_name@/core.js +3 -3
  35. data/lib/gen/app/templates/apps/@target_name@/main.js +7 -5
  36. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.css +20 -0
  37. data/lib/gen/app/templates/apps/@target_name@/resources/main_page.js +7 -7
  38. data/lib/gen/controller/templates/controllers/@filename@_controller.js +2 -2
  39. data/lib/gen/data-source/templates/data_sources/@filename@_data_source.js +21 -21
  40. data/lib/gen/design/templates/resources/@filename@.css +12 -0
  41. data/lib/gen/framework/templates/frameworks/@target_name@/core.js +3 -3
  42. data/lib/gen/framework/templates/frameworks/@target_name@/english.lproj/strings.js +1 -1
  43. data/lib/gen/language/templates/@filename@/strings.js +1 -1
  44. data/lib/gen/model/templates/models/@filename@_model.js +1 -1
  45. data/lib/gen/page/templates/pages/@target_name@/core.js +3 -3
  46. data/lib/gen/project/templates/@filename@/Buildfile +29 -5
  47. data/lib/gen/{responder → state}/Buildfile +3 -2
  48. data/lib/gen/state/README +1 -0
  49. data/lib/gen/state/USAGE +15 -0
  50. data/lib/gen/state/templates/states/@filename@_state.js +24 -0
  51. data/lib/gen/state/templates/tests/states/@filename@_test.js +12 -0
  52. data/lib/gen/statechart_app/templates/apps/@target_name@/Buildfile +3 -1
  53. data/lib/gen/statechart_app/templates/apps/@target_name@/core.js +3 -3
  54. data/lib/gen/statechart_app/templates/apps/@target_name@/main.js +3 -10
  55. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.css +20 -0
  56. data/lib/gen/statechart_app/templates/apps/@target_name@/resources/main_page.js +7 -7
  57. data/lib/gen/statechart_app/templates/apps/@target_name@/statechart.js +3 -3
  58. data/lib/sproutcore/models/generator.rb +1 -1
  59. data/spec/lib/models/generator/snake_case_spec.rb +26 -0
  60. data/sproutcore.gemspec +16 -16
  61. data/vendor/chance/lib/chance/instance/spriting.rb +32 -30
  62. metadata +30 -26
  63. data/lib/frameworks/sproutcore/frameworks/desktop/resources/debug/apple-logo1.jpeg +0 -0
  64. data/lib/gen/responder/README +0 -1
  65. data/lib/gen/responder/USAGE +0 -15
  66. data/lib/gen/responder/templates/states/@filename@_state.js +0 -36
@@ -18,6 +18,6 @@
18
18
  <p>Duis tincidunt. Aliquam vitae dui. Mauris sit amet ante. In suscipit, arcu nec consequat bibendum, nulla tellus commodo dolor, sed egestas metus nibh in libero. Nunc et dolor. Cras et tellus ac massa lacinia egestas. Curabitur at mauris. Vivamus placerat, sapien ut porttitor vestibulum, ligula sapien venenatis est, vitae posuere purus tortor non urna. Sed justo. Morbi venenatis, mauris ut dignissim mollis, massa enim venenatis velit, in feugiat libero neque a quam. Nulla fermentum mattis tellus. Vestibulum dignissim arcu ut risus vulputate congue. Fusce ornare, justo malesuada tempus tristique, sapien tellus interdum orci, nec elementum erat sem nec nisl. Aenean eu nunc. Duis eu quam id diam tempus interdum. Nulla et massa quis nulla euismod vulputate. Curabitur auctor.</p>
19
19
  <p>Ut metus. Morbi gravida, urna quis egestas vulputate, odio nisl bibendum neque, ac malesuada purus enim sed orci. Ut vulputate sem eu nunc. Suspendisse at nisl. Fusce egestas arcu at orci. Mauris lectus nibh, commodo vitae, fringilla ac, euismod vel, sem. Ut tempor turpis eget nisi. Quisque ornare volutpat urna. Nam velit felis, blandit et, tempus quis, iaculis ac, mauris. Nunc a tortor eu est rutrum rutrum. Suspendisse odio leo, egestas id, pulvinar vitae, volutpat id, erat. Donec vehicula porta dolor. Cras dictum placerat leo. Maecenas commodo elementum tellus. Quisque non est et nunc auctor iaculis. Nam elementum, felis a consectetur tincidunt, tellus turpis interdum diam, vel luctus leo diam vel erat. Integer ipsum enim, sagittis ut, mattis in, facilisis at, quam. Duis non erat.</p>
20
20
  </div>
21
- <img src='/static/sproutcore/desktop/en/current/debug/a_sample_image.jpg'>
21
+ <img src='/static/sproutcore/desktop/en/current/source/debug/resources/a_sample_image.jpg'><!-- /static/sproutcore/desktop/en/current/source/resources/debug -->
22
22
  </body>
23
23
  </html>
@@ -8,294 +8,294 @@
8
8
 
9
9
  /** @static
10
10
 
11
- This protocol defines the allowable responder methods. To implement a
11
+ This protocol defines the allowable responder methods. To implement a
12
12
  specific responder method, and a method with the correct signature to your
13
13
  class.
14
-
14
+
15
15
  **DO NOT INCLUDE THIS MIXIN**.
16
-
16
+
17
17
  If you try and include this mixin, an error will be raised on startup.
18
-
18
+
19
19
  @author Erich Ocean
20
20
  @since SproutCore 1.0
21
21
  */
22
22
  SC.ResponderProtocol = {
23
-
23
+
24
24
  // .......................................................................
25
25
  // Mouse Event Handlers
26
26
  //
27
-
27
+
28
28
  /**
29
29
  Called when the mouse is pressed. You must return `YES` to receive
30
30
  mouseDragged and mouseUp in the future.
31
-
31
+
32
32
  @param evt {SC.Event} the mousedown event
33
33
  @returns {Boolean} YES to receive additional mouse events, NO otherwise
34
34
  */
35
35
  mouseDown: function(evt) {},
36
-
36
+
37
37
  /**
38
38
  Called when the mouse is released.
39
-
39
+
40
40
  @param evt {SC.Event} the mouseup event
41
41
  @returns {Boolean} YES to handle the mouseUp, NO to allow click() and doubleClick() to be called
42
42
  */
43
43
  mouseUp: function(evt) {},
44
-
44
+
45
45
  /**
46
46
  Called when the mouse is dragged, after responding `YES` to a previous `mouseDown`:
47
47
  call.
48
-
48
+
49
49
  @param evt {SC.Event} the mousemove event
50
50
  @returns {void}
51
51
  */
52
52
  mouseDragged: function(evt) {},
53
-
53
+
54
54
  /**
55
55
  Called when the mouse exits the view and the root responder is not in a
56
56
  drag session.
57
-
57
+
58
58
  @param evt {SC.Event} the mousemove event
59
59
  @returns {void}
60
60
  */
61
61
  mouseExited: function(evt) {},
62
-
62
+
63
63
  /**
64
64
  Called when the mouse enters the view and the root responder is not in a
65
65
  drag session.
66
-
66
+
67
67
  @param evt {SC.Event} the mousemove event
68
68
  @returns {void}
69
69
  */
70
70
  mouseEntered: function(evt) {},
71
-
71
+
72
72
  /**
73
73
  Called when the mouse moves within the view and the root responder is not in a
74
74
  drag session.
75
-
75
+
76
76
  @param evt {SC.Event} the mousemove event
77
77
  @returns {void}
78
78
  */
79
79
  mouseMoved: function(evt) {},
80
-
81
-
80
+
81
+
82
82
  /**
83
83
  Called when a selectstart event in IE is triggered. **ONLY IE**
84
84
  We use it to disable IE accelerators and text selection
85
-
85
+
86
86
  @param evt {SC.Event} the selectstart event
87
87
  @returns {void}
88
88
  */
89
89
  selectStart: function(evt) {},
90
-
90
+
91
91
  /**
92
92
  Called when a contextmenu event is triggered. Used to disable contextmenu
93
93
  per view.
94
-
95
- @param evt {SC.Event} the selectstart event
94
+
95
+ @param evt {SC.Event} the contextmenu event
96
96
  @returns {void}
97
97
  */
98
98
  contextMenu: function(evt) {},
99
-
99
+
100
100
  // .......................................................................
101
101
  // Event Handlers
102
102
  //
103
103
  // These methods are called by the input manager in response to keyboard
104
104
  // events. Most of these methods are defined here for you, but not actually
105
105
  // implemented in code.
106
-
106
+
107
107
  /**
108
108
  Insert the text or act on the key.
109
-
109
+
110
110
  @param {String} the text to insert or respond to
111
111
  @returns {Boolean} YES if you handled the method; NO otherwise
112
112
  */
113
113
  insertText: function(text) {},
114
-
114
+
115
115
  /**
116
116
  When the user presses a key-combination event, this will be called so you
117
117
  can run the command.
118
-
118
+
119
119
  @param charCode {String} the character code
120
120
  @param evt {SC.Event} the keydown event
121
121
  @returns {Boolean} YES if you handled the method; NO otherwise
122
122
  */
123
123
  performKeyEquivalent: function(charCode, evt) { return false; },
124
-
124
+
125
125
  /**
126
126
  This method is called if no other view in the current view hierarchy is
127
- bound to the escape or command-. key equivalent. You can use this to
127
+ bound to the escape or command-. key equivalent. You can use this to
128
128
  cancel whatever operation is running.
129
-
129
+
130
130
  @param sender {Object} the object that triggered; may be null
131
131
  @param evt {SC.Event} the event that triggered the method
132
132
  @returns {Boolean} YES if you handle the event; NO otherwise
133
133
  */
134
134
  cancel: function(sender, evt) {},
135
-
135
+
136
136
  /**
137
137
  Delete the current selection or delete one element backward from the
138
138
  current selection.
139
-
139
+
140
140
  @param sender {Object} the object that triggered the method; may be null
141
141
  @param evt {SC.Event} the event that triggered the method; may be null
142
142
  @returns {Boolean} YES if you handle the event; NO otherwise
143
143
  */
144
144
  deleteBackward: function(sender, evt) {},
145
-
145
+
146
146
  /**
147
147
  Delete the current selection or delete one element forward from the
148
148
  current selection.
149
-
149
+
150
150
  @param sender {Object} the object that triggered the method; may be null
151
151
  @param evt {SC.Event} the event that triggered the method; may be null
152
152
  @returns {Boolean} YES if you handle the event; NO otherwise
153
153
  */
154
154
  deleteForward: function(sender, evt) {},
155
-
155
+
156
156
  /**
157
157
  A field editor might respond by selecting the field before it.
158
-
158
+
159
159
  @param sender {Object} the object that triggered the method; may be null
160
160
  @param evt {SC.Event} the event that triggered the method; may be null
161
161
  @returns {Boolean} YES if you handle the event; NO otherwise
162
162
  */
163
163
  insertBacktab: function(sender, evt) {},
164
-
164
+
165
165
  /**
166
166
  Insert a newline character or end editing of the receiver.
167
-
167
+
168
168
  @param sender {Object} the object that triggered the method; may be null
169
169
  @param evt {SC.Event} the event that triggered the method; may be null
170
170
  @returns {Boolean} YES if you handle the event; NO otherwise
171
171
  */
172
172
  insertNewline: function(sender, evt) {},
173
-
173
+
174
174
  /**
175
175
  Insert a tab or move forward to the next field.
176
-
176
+
177
177
  @param sender {Object} the object that triggered the method; may be null
178
178
  @param evt {SC.Event} the event that triggered the method; may be null
179
179
  @returns {Boolean} YES if you handle the event; NO otherwise
180
180
  */
181
181
  insertTab: function(sender, evt) {},
182
-
182
+
183
183
  /**
184
184
  Move insertion point/selection backward one. (i.e. left arrow key)
185
-
185
+
186
186
  @param sender {Object} the object that triggered the method; may be null
187
187
  @param evt {SC.Event} the event that triggered the method; may be null
188
188
  @returns {Boolean} YES if you handle the event; NO otherwise
189
189
  */
190
190
  moveLeft: function(sender, evt) {},
191
-
191
+
192
192
  /**
193
193
  Move the insertion point/selection forward one (i.e. right arrow key)
194
194
  in left-to-right text, this could be the left arrow key.
195
-
195
+
196
196
  @param sender {Object} the object that triggered the method; may be null
197
197
  @param evt {SC.Event} the event that triggered the method; may be null
198
198
  @returns {Boolean} YES if you handle the event; NO otherwise
199
199
  */
200
200
  moveRight: function(sender, evt) {},
201
-
201
+
202
202
  /**
203
203
  Move the insertion point/selection up one (i.e. up arrow key)
204
-
204
+
205
205
  @param sender {Object} the object that triggered the method; may be null
206
206
  @param evt {SC.Event} the event that triggered the method; may be null
207
207
  @returns {Boolean} YES if you handle the event; NO otherwise
208
208
  */
209
209
  moveUp: function(sender, evt) {},
210
-
210
+
211
211
  /**
212
212
  Move the insertion point/selection down one (i.e. down arrow key)
213
-
213
+
214
214
  @param sender {Object} the object that triggered the method; may be null
215
215
  @param evt {SC.Event} the event that triggered the method; may be null
216
216
  @returns {Boolean} YES if you handle the event; NO otherwise
217
217
  */
218
218
  moveDown: function(sender, evt) {},
219
-
219
+
220
220
  /**
221
221
  Move left, extending the selection. - shift || alt
222
-
222
+
223
223
  @param sender {Object} the object that triggered the method; may be null
224
224
  @param evt {SC.Event} the event that triggered the method; may be null
225
225
  @returns {Boolean} YES if you handle the event; NO otherwise
226
226
  */
227
227
  moveLeftAndModifySelection: function(sender, evt) {},
228
-
228
+
229
229
  /**
230
230
  Move right, extending the seleciton - shift || alt
231
-
231
+
232
232
  @param sender {Object} the object that triggered the method; may be null
233
233
  @param evt {SC.Event} the event that triggered the method; may be null
234
234
  @returns {Boolean} YES if you handle the event; NO otherwise
235
235
  */
236
236
  moveRightAndModifySelection: function(sender, evt) {},
237
-
237
+
238
238
  /**
239
239
  Move up, extending the selection - shift || alt
240
-
240
+
241
241
  @param sender {Object} the object that triggered the method; may be null
242
242
  @param evt {SC.Event} the event that triggered the method; may be null
243
243
  @returns {Boolean} YES if you handle the event; NO otherwise
244
244
  */
245
245
  moveUpAndModifySelection: function(sender, evt) {},
246
-
246
+
247
247
  /**
248
248
  Move down, extending selection - shift || alt
249
-
249
+
250
250
  @param sender {Object} the object that triggered the method; may be null
251
251
  @param evt {SC.Event} the event that triggered the method; may be null
252
252
  @returns {Boolean} YES if you handle the event; NO otherwise
253
253
  */
254
254
  moveDownAndModifySelection: function(sender, evt) {},
255
-
255
+
256
256
  /**
257
257
  Move insertion point/selection to beginning of document.
258
-
258
+
259
259
  @param sender {Object} the object that triggered the method; may be null
260
260
  @param evt {SC.Event} the event that triggered the method; may be null
261
261
  @returns {Boolean} YES if you handle the event; NO otherwise
262
262
  */
263
263
  moveToBeginningOfDocument: function(sender, evt) {},
264
-
264
+
265
265
  /**
266
266
  Move insertion point/selection to end of document.
267
-
267
+
268
268
  @param sender {Object} the object that triggered the method; may be null
269
269
  @param evt {SC.Event} the event that triggered the method; may be null
270
270
  @returns {Boolean} YES if you handle the event; NO otherwise
271
271
  */
272
272
  moveToEndOfDocument: function(sender, evt) {},
273
-
273
+
274
274
  /**
275
275
  Page down
276
-
276
+
277
277
  @param sender {Object} the object that triggered the method; may be null
278
278
  @param evt {SC.Event} the event that triggered the method; may be null
279
279
  @returns {Boolean} YES if you handle the event; NO otherwise
280
280
  */
281
281
  pageDown: function(sender, evt) {},
282
-
282
+
283
283
  /**
284
284
  Page up
285
-
285
+
286
286
  @param sender {Object} the object that triggered the method; may be null
287
287
  @param evt {SC.Event} the event that triggered the method; may be null
288
288
  @returns {Boolean} YES if you handle the event; NO otherwise
289
289
  */
290
290
  pageUp: function(sender, evt) {},
291
-
291
+
292
292
  /**
293
293
  Select all
294
-
294
+
295
295
  @param sender {Object} the object that triggered the method; may be null
296
296
  @param evt {SC.Event} the event that triggered the method; may be null
297
297
  @returns {Boolean} YES if you handle the event; NO otherwise
298
298
  */
299
299
  selectAll: function(sender, evt) {}
300
-
300
+
301
301
  };
@@ -129,6 +129,7 @@
129
129
  font-weight: bold;
130
130
  border: 1px #888 solid;
131
131
  letter-spacing: -1px;
132
+ border-radius: 7px;
132
133
  -webkit-border-radius: 7px;
133
134
  -moz-border-radius: 7px;
134
135
  }
@@ -62,6 +62,7 @@
62
62
  height: 12px;
63
63
  left: 6px;
64
64
  top: 5px;
65
+ border-radius: 2px;
65
66
  -webkit-border-radius: 2px;
66
67
  -moz-border-radius: 2px;
67
68
  &.inactive {
@@ -8,10 +8,10 @@
8
8
  right: 8px;
9
9
  height: 5px;
10
10
  top: 6px;
11
- background: gray ;
11
+ background: gray;
12
+ border-radius: 3px;
12
13
  -webkit-border-radius: 3px;
13
14
  -moz-border-radius: 3px;
14
- border-radius: 3px;
15
15
  .sc-leftcap{
16
16
  display: none;
17
17
  }
@@ -24,9 +24,10 @@
24
24
  width: 12px;
25
25
  margin-left: -9px;
26
26
  top: -4px;
27
- position: absolute ;
27
+ position: absolute;
28
28
  background: black;
29
- border-radius:6px;
30
- -moz-border-radius:6px;
29
+ border-radius: 6px;
30
+ -webkit-border-radius: 6px;
31
+ -moz-border-radius: 6px;
31
32
  }
32
33
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  /*global module test htmlbody ok equals same stop start */
9
9
 
10
- var iconURL= "http://www.freeiconsweb.com/Icons/16x16_people_icons/People_046.gif";
10
+ var iconURL= sc_static('sc-icon-info-16.png');
11
11
  var pane, view;
12
12
 
13
13
  module("SC.SegmentedView", {
@@ -10,7 +10,7 @@
10
10
 
11
11
  var pane;
12
12
  (function() {
13
- var iconURL= "http://www.freeiconsweb.com/Icons/16x16_people_icons/People_046.gif";
13
+ var iconURL= sc_static('sc-icon-info-16.png');
14
14
 
15
15
  pane = SC.ControlTestPane.design()
16
16
 
@@ -23,6 +23,7 @@
23
23
  }
24
24
  }).add("auto resize", SC.WebView, {
25
25
  value: sc_static('iframe'),
26
+ includeImage: sc_static('a_sample_image.jpg'), // this simply ensures that the image is added to the build
26
27
  shouldAutoResize: YES,
27
28
  layout: {
28
29
  width: 250,
@@ -107,4 +108,5 @@
107
108
  start();
108
109
  });
109
110
  });
111
+
110
112
  })();