scrivito_sdk 0.90.0.rc2 → 0.90.0.rc3

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: 6ea90dbf127f55af0ae9341534debf8ffffc7f93
4
- data.tar.gz: ae69af94ec1de457725a4247f3ba8b01ce3772e5
3
+ metadata.gz: a1f4a7aa1ca9b87dfda169c68a328ac3815dde9f
4
+ data.tar.gz: 52eff6fc495d7531658691810c28ccacc7d5b5e9
5
5
  SHA512:
6
- metadata.gz: ed57bf86c2938d0c2ca4b02b4f19158623eceb114ecb73c3f17be22f7dd242fdaf68001db245ff026df4ce198a963d2146d1697da1b902930cb314be69bad704
7
- data.tar.gz: b9e562fb97dcafd9dc1512ef5a3a0243a53aca38fbedd4017f52fc98f5457e2d0df68e74418b957e470056bfe8c60f0d7ff0c8c6c3b82a2d2af5bac24b008a23
6
+ metadata.gz: a580d4ef40f7dc65011db0607628b7f203e7cfe19bfd12e435966cfa979a5b7715b474a7706df891353e3547ba0a34bef570bc34ba658ccca4c5537af3efa2e3
7
+ data.tar.gz: 9ccfa59a0c32cf6d04ebd144da53cff12310735670c335074e37814f5983b4c116398090aba5342b6a65104940bb5b66955fd581646de4eb31d91ae54ef872fb
data/config/ca-bundle.crt CHANGED
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Thu Nov 5 17:17:04 2015
4
+ ## Certificate data from Mozilla as of: Tue Nov 10 10:18:35 2015
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -29118,9 +29118,9 @@ var scrivito = {};
29118
29118
  var promises = scrivito.cms_document.from($(dom_element)).notify_new_content(dom_element);
29119
29119
  if (promises.length) {
29120
29120
  $.when.apply(null, promises)
29121
- .then(function() { run_callbacks('editors', dom_element); });
29121
+ .then(function() { run_callbacks('editor_selection', dom_element); });
29122
29122
  } else {
29123
- run_callbacks('editors', dom_element);
29123
+ run_callbacks('editor_selection', dom_element);
29124
29124
  }
29125
29125
  }
29126
29126
  },
@@ -30381,72 +30381,86 @@ var scrivito = {};
30381
30381
  };
30382
30382
  }());
30383
30383
  (function() {
30384
- var editors = {};
30385
-
30386
30384
  _.extend(scrivito, {
30387
30385
  editor_selection: {
30388
30386
  init: function() {
30389
- scrivito.gui.on('editors', function(content) {
30387
+ scrivito.gui.on('editor_selection', function(content) {
30390
30388
  if (scrivito.in_editable_view()) {
30391
- _.each($(content).find('[data-scrivito-field-type]').addBack(), function(element) {
30392
- scrivito.editor_selection.activate(element);
30389
+ var root_element = $(content);
30390
+ var cms_document = scrivito.cms_document.from(root_element);
30391
+ var dom_elements = root_element.find('[data-scrivito-field-type]')
30392
+ .addBack('[data-scrivito-field-type]');
30393
+ var editor_selection = scrivito.editor_selection.create_instance(cms_document);
30394
+ _.each(dom_elements, function(dom_element) {
30395
+ editor_selection.activate(dom_element);
30393
30396
  });
30394
30397
  }
30395
30398
  });
30396
30399
  },
30397
30400
 
30398
- define: function(name, editor) {
30399
- editors[name] = editor;
30400
- },
30401
+ create_instance: function(cms_document) {
30402
+ var that = {
30403
+ define: function(name, editor) {
30404
+ var editors = cms_document.editors || {};
30405
+ editors[name] = editor;
30406
+ cms_document.editors = editors;
30407
+ },
30401
30408
 
30402
- activate: function(element) {
30403
- var selected_editor, is_disabled;
30404
- var editor_name = $(element).data('scrivito-private-editor');
30409
+ activate: function(dom_element) {
30410
+ var selected_editor, is_disabled;
30411
+ var editors = cms_document.editors || {};
30412
+ var editor_name = $(dom_element).data('scrivito-private-editor');
30405
30413
 
30406
- if (editor_name === false) { return; }
30414
+ if (editor_name === false) { return; }
30407
30415
 
30408
- if (editor_name && can_edit(editor_name, element)) {
30409
- selected_editor = editors[editor_name];
30410
- } else {
30411
- if (scrivito.select_editor) {
30412
- scrivito.select_editor(element, {
30413
- use: function(editor_name) {
30414
- if (!selected_editor && can_edit(editor_name, element)) {
30415
- selected_editor = editors[editor_name];
30416
- }
30417
- },
30418
- disable: function() {
30419
- if (!selected_editor) { is_disabled = true; }
30416
+ if (editor_name && can_edit(editors[editor_name], dom_element)) {
30417
+ selected_editor = editors[editor_name];
30418
+ } else {
30419
+ if (cms_document.select_editor) {
30420
+ cms_document.select_editor(dom_element, {
30421
+ use: function(editor_name) {
30422
+ if (!selected_editor && can_edit(editors[editor_name], dom_element)) {
30423
+ selected_editor = editors[editor_name];
30424
+ }
30425
+ },
30426
+ disable: function() {
30427
+ if (!selected_editor) { is_disabled = true; }
30428
+ }
30429
+ });
30430
+
30431
+ if (is_disabled) { return; }
30420
30432
  }
30421
- });
30422
30433
 
30423
- if (is_disabled) { return; }
30424
- }
30434
+ if (!selected_editor && can_edit(editors['default'], dom_element)) {
30435
+ selected_editor = editors['default'];
30436
+ }
30437
+ }
30425
30438
 
30426
- if (!selected_editor && can_edit('default', element)) {
30427
- selected_editor = editors['default'];
30439
+ if (selected_editor) {
30440
+ scrivito.run_new_event(function() { selected_editor.activate(dom_element); });
30441
+ }
30442
+ },
30443
+
30444
+ // For test purpose only.
30445
+ reset: function() {
30446
+ delete cms_document.editors;
30447
+ delete cms_document.selected_editor;
30428
30448
  }
30429
- }
30449
+ };
30430
30450
 
30431
- if (selected_editor) {
30432
- scrivito.run_new_event(function() { selected_editor.activate(element); });
30433
- }
30434
- },
30451
+ var can_edit = function(editor, dom_element) {
30452
+ if (!editor) { return false; }
30453
+ if (!editor.can_edit) { return true; }
30454
+ try { return editor.can_edit(dom_element); } catch(error) {
30455
+ scrivito.log_error(error);
30456
+ return false;
30457
+ }
30458
+ };
30435
30459
 
30436
- // For test purpose only.
30437
- reset: function() { editors = {}; }
30460
+ return that;
30461
+ }
30438
30462
  }
30439
30463
  });
30440
-
30441
- var can_edit = function(editor_name, element) {
30442
- var editor = editors[editor_name];
30443
- if (!editor) { return false; }
30444
- if (!editor.can_edit) { return true; }
30445
- try { return editor.can_edit(element); } catch(error) {
30446
- scrivito.log_error(error);
30447
- return false;
30448
- }
30449
- };
30450
30464
  }());
30451
30465
  (function() {
30452
30466
  var expando = "scrivito_cms_element";
@@ -30750,8 +30764,11 @@ var scrivito = {};
30750
30764
  default_obj_class_for_content_type: scrivito.default_obj_class_for_content_type,
30751
30765
  upload_binary: scrivito.blob.upload_binary,
30752
30766
  page_menu: function() { return scrivito.page_menu(that); },
30753
- define_editor: scrivito.editor_selection.define,
30754
- select_editor: function(select_editor) { scrivito.select_editor = select_editor; },
30767
+ define_editor: function(name, editor) {
30768
+ scrivito.editor_selection.create_instance(that).define(name, editor);
30769
+ },
30770
+ select_editor: function(select_editor) { that.select_editor = select_editor; },
30771
+
30755
30772
  suggest_completion: scrivito.suggest_completion,
30756
30773
  description_for_editor: scrivito.description_for_editor, // @api protected
30757
30774
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.90.0.rc2
4
+ version: 0.90.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infopark AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable