scrivito_ui 1.8.0 → 1.8.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0be44a37c895d71bbab5651343eeb5722ac028ea
4
- data.tar.gz: cedd87920a4175493053295095fdf8f4019369ca
3
+ metadata.gz: 264c523293b1c8f4ee4cca6bff599863dfaba509
4
+ data.tar.gz: 7b49bc28218a84345bbe8927f70ffb9c17bff484
5
5
  SHA512:
6
- metadata.gz: 2966fcf416365166d07900f53856cf697525e83b0c22c456408c7c75bc7598b05336fa5c7790375e67c547e4e3b9e87fbc6772feafc1e9a7bfac1b6e6e7d811b
7
- data.tar.gz: 3d01f00705c95a7500db3b2b125139be560a4efce2ad40b1eb4aa9c3993bd6d257b708e6359c274ecf41e342b376d90c81007524903d346497967b2394fa9e2a
6
+ metadata.gz: a4368a23677fa4b4f9df43b6b845b42b61476a3a5638462849ed924a46e5b6b01216bed5b03e503e055f53add9df73225c3df3612ceb54cf2e3ff17b403bea6c
7
+ data.tar.gz: d694059719728d2f1b3449acb8af9a792b19556a19ca64de5f74e7a7715962b7f17b4a765c7b70f26bd76708b59c9828400e289f6cc269c95b3dda9f14da7abe
@@ -87503,8 +87503,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
87503
87503
 
87504
87504
  revertWidget: function revertWidget(objData, widgetId) {
87505
87505
  return fetchBaseWidgetData(objData._id, widgetId).then(function (baseWidgetData) {
87506
- var patch = { _widget_pool: _defineProperty({}, widgetId, baseWidgetData) };
87507
- objData.update(patch);
87506
+ var baseDataWithoutWidgetlists = filterOutWidgetlists(baseWidgetData);
87507
+ var currentWidgetData = objData.current._widget_pool[widgetId];
87508
+ var currentDataWithoutWidgetlists = filterOutWidgetlists(currentWidgetData);
87509
+ var revertWidgetPatch = scrivito.ObjPatch.diff(currentDataWithoutWidgetlists, baseDataWithoutWidgetlists);
87510
+
87511
+ objData.update({ _widget_pool: _defineProperty({}, widgetId, revertWidgetPatch) });
87508
87512
 
87509
87513
  return objData.finishSaving();
87510
87514
  });
@@ -87568,6 +87572,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
87568
87572
  return attributeValue;
87569
87573
  }
87570
87574
 
87575
+ function filterOutWidgetlists(data) {
87576
+ return _.omit(data, function (value) {
87577
+ return _.isArray(value) && value[0] === 'widgetlist';
87578
+ });
87579
+ }
87580
+
87571
87581
  scrivito.ModificationRetraction = ModificationRetraction;
87572
87582
  })();
87573
87583
  'use strict';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -64,9 +64,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - ">"
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 1.3.1
70
70
  requirements: []
71
71
  rubyforge_project:
72
72
  rubygems_version: 2.4.8