sproutcore 0.9.18 → 0.9.19

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.9.19
2
+
3
+ * back out relative-path change which breaks dev mode [Erich Ocean]
4
+
1
5
  == 0.9.18
2
6
 
3
7
  * sc-gen should give warning on incorrect usage (Ticket #52) [Alexei Svitkine]
@@ -21,11 +21,11 @@ config :all do |c|
21
21
 
22
22
  # Set this to false to locate your clients at absolute paths.
23
23
  # (Uncomment and define c[:resources_at] if you set this to false.)
24
- c[:resources_relative] = true
24
+ # c[:resources_relative] = true
25
25
 
26
26
  # This string will be prepended before any URLs that reference JavaScript,
27
27
  # CSS or images in your files.
28
- # c[:resources_at] = 'static'
28
+ c[:resources_at] = 'static'
29
29
 
30
30
  # This string will be prepended before any index.html urls that actually
31
31
  # load your clients. Setting this to an empty string will mount all
@@ -1,3 +1,7 @@
1
+ == sproutcore 0.9.19
2
+
3
+ - SC.Server refresh fix [Evin Grano]
4
+
1
5
  == sproutcore 0.9.18
2
6
 
3
7
  - picker.js bug (Ticket #82) [Alexei Svitkine]
@@ -31,7 +35,7 @@
31
35
  (Ticket #178) [Maurits Lamers, Erich Ocean]
32
36
 
33
37
  - CollectionView doesn't properly redraw contents if it isn't visible at the time of a
34
- content change (Ticket #123) [Christopher Swase]
38
+ content change (Ticket #123) [Christopher Swasey]
35
39
 
36
40
  - Split view can collapse when thickness becomes less than a given value
37
41
  (Ticket #137) [Lawrence Pit]
@@ -464,40 +464,17 @@ SC.Server = SC.Object.extend({
464
464
  // their data.
465
465
  refreshRecordsWithData: function(dataAry,recordType,cacheCode,loaded) {
466
466
  var server = this ;
467
-
468
- // first, prepare each data item in the Ary.
469
- dataAry = dataAry.map(function(data) {
470
-
471
- // camelize the keys received back.
472
- data = server._camelizeData(data) ;
473
-
474
- // convert the 'id' property to 'guid'
475
- if (data.id) { data.guid = data.id; delete data.id; }
476
-
477
- // find the recordType
478
- if (data.type) {
479
- var recordName = data.type.capitalize() ;
480
- if (server.prefix) {
481
- for (var prefixLoc = 0; prefixLoc < server.prefix.length; prefixLoc++) {
482
- var prefixParts = server.prefix[prefixLoc].split('.');
483
- var namespace = window;
484
- for (var prefixPartsLoc = 0; prefixPartsLoc < prefixParts.length; prefixPartsLoc++) {
485
- var namespace = namespace[prefixParts[prefixPartsLoc]] ;
486
- }
487
- if (namespace != window) data.recordType = namespace[recordName] ;
488
- if (data.recordType) break ;
489
- }
490
- } else data.recordType = window[recordName] ;
491
-
492
- if (!data.recordType) console.log('skipping undefined recordType:'+recordName) ;
493
- } else data.recordType = recordType ;
494
-
495
- if (!data.recordType) return null; // could not process.
496
- else return data ;
497
- }).compact() ;
467
+
468
+ // Loop through the data Array and prepare each element
469
+ var prepedDataAry = [];
470
+ for (var idx = 0; idx < dataAry.length; idx++)
471
+ {
472
+ var currElem = server._prepareDataForRecords(dataAry[idx], server, recordType);
473
+ if (currElem !== null) prepedDataAry.push(currElem);
474
+ }
498
475
 
499
476
  // now update.
500
- SC.Store.updateRecords(dataAry,server,recordType,loaded) ;
477
+ SC.Store.updateRecords(prepedDataAry,server,recordType,loaded) ;
501
478
  },
502
479
 
503
480
  // ................................
@@ -2,7 +2,7 @@ module SproutCore #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 18
5
+ TINY = 19
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sproutcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.18
4
+ version: 0.9.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Jolley, Erich Ocean