infopark_fiona7 1.1.0.0.6 → 1.1.0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ea7c26aef3bb431180a3d54edee505f4f2bbbd1
4
- data.tar.gz: f444f6d349dff96812144c0278a6a5f956c8e168
3
+ metadata.gz: 0d337ceef900e8141bcba2e73b9b26ddd4d4b7d1
4
+ data.tar.gz: d0984a4ead03ef0b2bbe0b2c9f7c09440ae2c17b
5
5
  SHA512:
6
- metadata.gz: be3bca118713864ff4767e9b53d4dc503b331accc5621edee24435ed288dc848433ea0d743a8a17c462520f9bce1d1e05ad5697106c09f00f9858fabaf992b9a
7
- data.tar.gz: 9603d0a7be4e62d0dd84609ff31a415844ed0082db57045d84c6260d88741a8739542d6d68350c9360a39da851bd6896edf104b62949efad9c65891a560bc611
6
+ metadata.gz: 2fdb619d30af11800806d00f07cf7925b7968317b75c5347b6981d95d40442b9a57c8b08391baf139f28231fd9eec9f5616a95033a3fe5a7e9553c51bddce2c9
7
+ data.tar.gz: bf328e8a7a6a3109331b09c72fb560fbe2ff4a2b42ce0cd05bcaf0b0253b8e334a85163336e136d96bf8a33b96504c4aa4f70fc16ef1df308f4a0a8101a1cb67
@@ -197,6 +197,12 @@
197
197
  },
198
198
 
199
199
  fetch_page_class_selection: function(params) {
200
+ if (!params || params === {}) {
201
+ var current_page = scrivito.application_document().page();
202
+ var path = (typeof current_page.provided_path === 'function') && current_page.provided_path();
203
+ params = {};
204
+ params['_path'] = path;
205
+ }
200
206
  return scrivito.obj.fetch_class_selection('objs/page_class_selection', params);
201
207
  },
202
208
 
@@ -30,7 +30,7 @@ module Fiona7
30
30
 
31
31
  def true_root_path
32
32
  if Fiona7.mode == :standalone
33
- scrivito_root_path
33
+ '/'
34
34
  elsif Fiona7.mode == :legacy
35
35
  root_path
36
36
  else
@@ -202,7 +202,7 @@ module Fiona7
202
202
  end
203
203
  end
204
204
  if outside_objects.length != 0
205
- outsize_paths = outsize_objects.map(&:path).join(" ")
205
+ outside_paths = outside_objects.map(&:path).join(" ")
206
206
  Assert.input(
207
207
  false,
208
208
  "Cannot remove object because #{outside_paths} have links pointing to it"
@@ -31,6 +31,10 @@ module RailsConnector
31
31
  ShadowClasses.const_get(self.name, false)
32
32
  end
33
33
 
34
+ def self.compute_type(type_name)
35
+ try_type { type_name.constantize } || RailsConnector::BasicObj
36
+ end
37
+
34
38
 
35
39
  class << self
36
40
 
@@ -30,6 +30,26 @@ module Scrivito
30
30
  end
31
31
  end
32
32
 
33
+ # patch for handling direct descendants of Scrivito::BasicObj
34
+ def path_or_url_without_editing_context(target, path_or_url, options)
35
+ if target.is_a?(Link)
36
+ path_or_url_for_links(target, path_or_url, options)
37
+ elsif target.is_a?(::Scrivito::BasicObj)
38
+ path_or_url_for_objs(target, path_or_url, options)
39
+ elsif target.respond_to?(:first)
40
+ if target.first.is_a?(Link)
41
+ path_or_url_for_links(target.first, path_or_url, options)
42
+ else
43
+ return LINK_TO_EMPTY_LINKLIST
44
+ end
45
+ elsif target.is_a?(Binary)
46
+ binary_url(target)
47
+ else
48
+ raise "scrivito_path or scrivito_url was called with an instance of #{target.class}. "+
49
+ "It must only be called with an Obj or a Link or a non-empty LinkList."
50
+ end
51
+ end
52
+
33
53
  # Use fiona connector permalinks in legacy mode
34
54
  def path_or_url_for_objs(obj, path_or_url, options)
35
55
  permalink = obj.permalink
@@ -1,3 +1,3 @@
1
1
  module Fiona7
2
- VERSION = "1.1.0.0.6"
2
+ VERSION = "1.1.0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_fiona7
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.0.6
4
+ version: 1.1.0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Przedmojski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-15 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails