Sha256: dedcb7e0fad1a5ad2a5930b55241c745a5e578966021ae9a37757cba58f9f407
Contents?: true
Size: 1.52 KB
Versions: 43
Compression:
Stored size: 1.52 KB
Contents
(function() { var COEXISTING_EDITORS, PRIMARY_EDITORS, default_editor; PRIMARY_EDITORS = ['date_editor', 'enum_editor', 'html_editor', 'image_editor', 'link_editor', 'linklist_editor', 'multienum_editor', 'permalink_editor', 'reference_editor', 'referencelist_editor', 'string_editor', 'stringlist_editor']; COEXISTING_EDITORS = ['binary_editor', 'image_drop_editor']; default_editor = { can_edit: function() { return true; }, activate: function(element) { var editor, i, j, legacyApiEditor, len, len1, ref; legacyApiEditor = $(element).data('editor'); if (legacyApiEditor) { editor = legacyApiEditor + "_editor"; console.warn("data-editor is deprecated, please use scrivito_tag(tag, obj, field_name, html_options, editor: '" + legacyApiEditor + "')"); if ((ref = scrivito.editors[editor]) != null) { ref.activate(element); } return; } for (i = 0, len = COEXISTING_EDITORS.length; i < len; i++) { editor = COEXISTING_EDITORS[i]; if (scrivito.editors[editor].can_edit(element)) { scrivito.editors[editor].activate(element); } } for (j = 0, len1 = PRIMARY_EDITORS.length; j < len1; j++) { editor = PRIMARY_EDITORS[j]; if (scrivito.editors[editor].can_edit(element)) { scrivito.editors[editor].activate(element); return; } } } }; scrivito.on('load', function() { return scrivito.define_editor('default', default_editor); }); }).call(this);
Version data entries
43 entries across 43 versions & 1 rubygems