Browse Source

test config keditor wysiwyg

ouidade 7 months ago
parent
commit
bee5442486

+ 1 - 2
config/sync/block.block.subheading.yml

@@ -1,10 +1,9 @@
 uuid: b76a822c-5dc5-4ce5-b4ef-5388d8a77308
 langcode: en
-status: true
+status: false
 dependencies:
   module:
     - context
-    - ctools_block
   theme:
     - rorschach
 id: subheading

+ 9 - 1
config/sync/core.entity_form_display.paragraph.tablefield.default.yml

@@ -3,6 +3,7 @@ langcode: en
 status: true
 dependencies:
   config:
+    - field.field.paragraph.tablefield.field_rowspan_cell_row1col1
     - field.field.paragraph.tablefield.field_tablefield
     - paragraphs.paragraphs_type.tablefield
   module:
@@ -19,12 +20,19 @@ targetEntityType: paragraph
 bundle: tablefield
 mode: default
 content:
+  field_rowspan_cell_row1col1:
+    type: boolean_checkbox
+    weight: 11
+    region: content
+    settings:
+      display_label: true
+    third_party_settings: {  }
   field_tablefield:
     type: tablefield
     weight: 0
     region: content
     settings:
-      input_type: textfield
+      input_type: textarea
     third_party_settings: {  }
   translation:
     weight: 10

+ 12 - 1
config/sync/core.entity_view_display.paragraph.tablefield.default.yml

@@ -3,6 +3,7 @@ langcode: en
 status: true
 dependencies:
   config:
+    - field.field.paragraph.tablefield.field_rowspan_cell_row1col1
     - field.field.paragraph.tablefield.field_tablefield
     - paragraphs.paragraphs_type.tablefield
   module:
@@ -12,9 +13,19 @@ targetEntityType: paragraph
 bundle: tablefield
 mode: default
 content:
+  field_rowspan_cell_row1col1:
+    type: boolean
+    label: visually_hidden
+    settings:
+      format: yes-no
+      format_custom_false: ''
+      format_custom_true: ''
+    third_party_settings: {  }
+    weight: 1
+    region: content
   field_tablefield:
     type: tablefield
-    label: visually_hidden
+    label: above
     settings:
       row_header: true
       column_header: false

+ 42 - 0
config/sync/core.entity_view_display.paragraph.tablefield.preview.yml

@@ -0,0 +1,42 @@
+uuid: 03cffc26-8793-4af8-a181-f1509111816b
+langcode: en
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.paragraph.preview
+    - field.field.paragraph.tablefield.field_rowspan_cell_row1col1
+    - field.field.paragraph.tablefield.field_tablefield
+    - paragraphs.paragraphs_type.tablefield
+  module:
+    - layout_builder
+    - tablefield
+third_party_settings:
+  layout_builder:
+    enabled: false
+    allow_custom: false
+id: paragraph.tablefield.preview
+targetEntityType: paragraph
+bundle: tablefield
+mode: preview
+content:
+  field_rowspan_cell_row1col1:
+    type: boolean
+    label: visually_hidden
+    settings:
+      format: yes-no
+      format_custom_false: ''
+      format_custom_true: ''
+    third_party_settings: {  }
+    weight: 1
+    region: content
+  field_tablefield:
+    type: tablefield
+    label: visually_hidden
+    settings:
+      row_header: true
+      column_header: false
+    third_party_settings: {  }
+    weight: 0
+    region: content
+hidden:
+  search_api_excerpt: true

+ 4 - 1
config/sync/editor.editor.tablecell.yml

@@ -15,6 +15,7 @@ settings:
         -
           name: Formatting
           items:
+            - Styles
             - Bold
             - Italic
         -
@@ -37,8 +38,10 @@ settings:
           items:
             - Source
   plugins:
+    stylescombo:
+      styles: 'p.rowspan | Rowspan'
     drupallink:
-      linkit_enabled: false
+      linkit_enabled: true
       linkit_profile: default
 image_upload:
   status: false

+ 1 - 1
config/sync/editor.editor.wysiwyg.yml

@@ -66,7 +66,7 @@ settings:
     language:
       language_list: un
     stylescombo:
-      styles: "h4.title-niv4|title niv4\r\nh5.title-niv5|title niv5\r\nh6.title-niv6|title niv6\r\nh7.intertitre-niv7|Intertitre niv7\r\np.quote|Quote\r\np.psychologist-instruction|Psychologist Instruction\r\np.note | Note\r\nh8.note-title | Note Title\r\np.caution | Caution\r\nh9.caution-title | Caution Title\r\n\r\np.liste-tiret | Liste tiret"
+      styles: "h4.title-niv4|title niv4\r\nh5.title-niv5|title niv5\r\nh6.title-niv6|title niv6\r\nh7.intertitre-niv7|Intertitre niv7\r\np.quote|Quote\r\np.psychologist-instruction|Psychologist Instruction\r\np.note | Note\r\np.note-title | Note Title\r\nh8.note-title | h8 Note Title\r\np.caution | Caution\r\nh9.caution-title | Caution Title\r\np.rowspan | Rowspan\r\np.liste-tiret | Liste tiret"
     drupallink:
       linkit_enabled: true
       linkit_profile: default

+ 23 - 0
config/sync/field.field.paragraph.tablefield.field_rowspan_cell_row1col1.yml

@@ -0,0 +1,23 @@
+uuid: 5a810452-e557-4266-a066-6d6fb3b54164
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.storage.paragraph.field_rowspan_cell_row1col1
+    - paragraphs.paragraphs_type.tablefield
+id: paragraph.tablefield.field_rowspan_cell_row1col1
+field_name: field_rowspan_cell_row1col1
+entity_type: paragraph
+bundle: tablefield
+label: 'rowspan cell row1col1'
+description: 'à cocher si besoin de fusionner les cellules'
+required: false
+translatable: false
+default_value:
+  -
+    value: 0
+default_value_callback: ''
+settings:
+  on_label: 'On'
+  off_label: 'Off'
+field_type: boolean

+ 18 - 0
config/sync/field.storage.paragraph.field_rowspan_cell_row1col1.yml

@@ -0,0 +1,18 @@
+uuid: 0c251cf3-de00-4dd7-aff8-022e86566155
+langcode: en
+status: true
+dependencies:
+  module:
+    - paragraphs
+id: paragraph.field_rowspan_cell_row1col1
+field_name: field_rowspan_cell_row1col1
+entity_type: paragraph
+type: boolean
+settings: {  }
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 3 - 3
config/sync/filter.format.tablecell.yml

@@ -15,8 +15,8 @@ filters:
     status: true
     weight: -10
     settings:
-      allowed_html: '<em> <strong> <br> <a href> <ul> <li> <ol> <blockquote> <img src alt data-entity-type data-entity-uuid>'
-      filter_html_help: false
+      allowed_html: '<em> <strong> <br> <a href> <ul> <li> <ol> <blockquote> <img src alt data-entity-type data-entity-uuid> <rowspan> <p class="rowspan">'
+      filter_html_help: true
       filter_html_nofollow: false
   filter_autop:
     id: filter_autop
@@ -40,5 +40,5 @@ filters:
     settings:
       youtube: '1'
       youtube_webp_preview: '0'
-      autoload: '0'
       vimeo: '1'
+      autoload: '0'

File diff suppressed because it is too large
+ 0 - 0
config/sync/filter.format.wysiwyg.yml


+ 0 - 58
config/sync/views.view.content.yml

@@ -2,8 +2,6 @@ uuid: 786e4799-0ec6-4293-bbfb-5e1ed6c7d7a6
 langcode: fr
 status: true
 dependencies:
-  config:
-    - taxonomy.vocabulary.book
   module:
     - book
     - node
@@ -716,62 +714,6 @@ display:
           expose:
             operator_limit_selection: false
             operator_list: {  }
-        field_parent_book_target_id:
-          id: field_parent_book_target_id
-          table: node__field_parent_book
-          field: field_parent_book_target_id
-          relationship: none
-          group_type: group
-          admin_label: ''
-          plugin_id: taxonomy_index_tid
-          operator: or
-          value: null
-          group: 1
-          exposed: true
-          expose:
-            operator_id: field_parent_book_target_id_op
-            label: 'Parent Book (field_parent_book)'
-            description: ''
-            use_operator: false
-            operator: field_parent_book_target_id_op
-            operator_limit_selection: false
-            operator_list: {  }
-            identifier: field_parent_book_target_id
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-              anonymous: '0'
-              admin: '0'
-              root: '0'
-              editor: '0'
-              translator: '0'
-            reduce: false
-          is_grouped: false
-          group_info:
-            label: ''
-            description: ''
-            identifier: ''
-            optional: true
-            widget: select
-            multiple: false
-            remember: false
-            default_group: All
-            default_group_multiple: {  }
-            group_items: {  }
-          reduce_duplicates: false
-          vid: book
-          type: cshs
-          hierarchy: false
-          limit: true
-          error_message: true
-          save_lineage: false
-          force_deepest: false
-          parent: 0
-          level_labels: ''
-          hierarchy_depth: 0
-          required_depth: 0
       filter_groups:
         operator: AND
         groups:

+ 5 - 64
config/sync/views.view.viewed_by_book.yml

@@ -24,65 +24,6 @@ display:
     display_options:
       title: 'viewed by book'
       fields:
-        node_bulk_form:
-          id: node_bulk_form
-          table: node
-          field: node_bulk_form
-          relationship: none
-          group_type: group
-          admin_label: ''
-          entity_type: node
-          plugin_id: node_bulk_form
-          label: 'Node operations bulk form'
-          exclude: false
-          alter:
-            alter_text: false
-            text: ''
-            make_link: false
-            path: ''
-            absolute: false
-            external: false
-            replace_spaces: false
-            path_case: none
-            trim_whitespace: false
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: false
-            max_length: 0
-            word_boundary: true
-            ellipsis: true
-            more_link: false
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: false
-            trim: false
-            preserve_tags: ''
-            html: false
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: true
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          action_title: Action
-          include_exclude: exclude
-          selected_actions:
-            - node_break_lock_action
-            - node_delete_action
-            - node_edit_action
-            - node_publish_action
-            - node_save_action
-            - node_unpublish_action
         title:
           id: title
           table: node_field_data
@@ -150,12 +91,12 @@ display:
           id: depth
           table: book
           field: depth
-          relationship: pid
+          relationship: none
           group_type: group
           admin_label: ''
           plugin_id: numeric
           label: Depth
-          exclude: false
+          exclude: true
           alter:
             alter_text: false
             text: ''
@@ -643,7 +584,7 @@ display:
       footer: {  }
       display_extenders: {  }
     cache_metadata:
-      max-age: 0
+      max-age: -1
       contexts:
         - 'languages:language_content'
         - 'languages:language_interface'
@@ -661,7 +602,7 @@ display:
     display_options:
       display_extenders: {  }
     cache_metadata:
-      max-age: 0
+      max-age: -1
       contexts:
         - 'languages:language_content'
         - 'languages:language_interface'
@@ -691,7 +632,7 @@ display:
         parent: ''
         context: '0'
     cache_metadata:
-      max-age: 0
+      max-age: -1
       contexts:
         - 'languages:language_content'
         - 'languages:language_interface'

+ 0 - 6
web/themes/custom/rorschach/css-compiled/styles.css

@@ -31,12 +31,6 @@ table {
 #paragraph-id--227 td {
   text-align: start; }
 
-#tablefield-wrapper-paragraph-240-field_tablefield-0 {
-  margin-bottom: 2rem; }
-
-#tablefield-paragraph-240-field_tablefield-0 {
-  caption-side: bottom; }
-
 .note {
   display: block;
   border: 1px solid #333;

+ 0 - 46
web/themes/custom/rorschach/rorschach.theme

@@ -84,49 +84,3 @@ function rorschach_preprocess_field(&$variables) {
 
 
 ///////////////////////////////////////////////////
-
-
-
-
-///////////////////////////////////////////////////
-
-// counter pour id
-
-            // function rorschach_preprocess_field(&$variables) {
-            //   // static $counter = 0;
-            //   // $variables['counter'] = $counter++;
-            //   $variables['elements']['#paragraph']->item_id;
-            // }
-// la fonction suivante ne fonctionne pas
-// function rorschach_preprocess_field(&$variables) {
-
-//   $paragraph = &$variables['paragraph'];
-//   $variables['attributes']['class'][] = 'paragraph-type-' . $paragraph->id();
-//   $hook_id = $paragraph->get('paragraph-id--')->getString();
-//   $variables['attributes']['class'][] = 'hook-id-' . $hook_id;
-// }
-                  //might be useful for if-clause: $variables['field_name'] and $variables['field_type']
-                  // if ($paragraph && $paragraph->getEntityTypeId() == 'paragraph' . $paragraph->id() ) {
-                    //whatever logic you need goes here, e.g. something like
-                    //$variables['attributes']['data-from-parent-paragraph'] = $parentEntity->getYourStuff();
-                  // }
-
-
-
-                // function yourtheme_preprocess_field(&$variables, $hook) {
-                //   $element = $variables['element'];
-                //   $parentEntity = $element['#object'];
-                //   //might be useful for if-clause: $variables['field_name'] and $variables['field_type']
-                //   if ($parentEntity && $parentEntity->getEntityTypeId() == 'paragraph' ) {
-                //     //whatever logic you need goes here, e.g. something like
-                //     //$variables['attributes']['data-from-parent-paragraph'] = $parentEntity->getYourStuff();
-                //   }
-                // }
-
-                // $variables['elements']['#entity']->item_id;
-
-                // function MYTHEME_preprocess_views_view_fields__view_machine_name(&$vars) {
-                //   static $counter = 0;
-                //   $vars['counter'] = $counter++;
-                // }
-

+ 40 - 9
web/themes/custom/rorschach/scripts/main.js

@@ -2,15 +2,46 @@ console.log('salut');
 
 // fusion cellules dans tableau
 
-var table1cell1 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_1.col_1');
-var table1cell2 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_2.col_1');
-var table1cell3 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_3.col_1');
-var table1cell4 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_4.col_1');
-
-table1cell1.setAttribute('rowspan', '4');
-table1cell2.style.display ="none";
-table1cell3.style.display ="none";
-table1cell4.style.display ="none";
+function tableOne(){
+  var table1cell1 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_1.col_1');
+  var table1cell2 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_2.col_1');
+  var table1cell3 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_3.col_1');
+  var table1cell4 = document.querySelector('#tablefield-paragraph-34-field_tablefield-0.tablefield tbody tr td.row_4.col_1');
+
+  table1cell1.setAttribute('rowspan', '4');
+  table1cell2.style.display ="none";
+  table1cell3.style.display ="none";
+  table1cell4.style.display ="none";
+}
+
+
+// function tableTwo(){
+//   var table2cell1 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_1.col_1');
+//   var table2cell2 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_2.col_1');
+//   var table2cell3 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_3.col_1');
+//   var table2cell4 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_4.col_1');
+  
+//   table2cell1.setAttribute('rowspan', '4');
+//   table2cell2.style.display ="none";
+//   table2cell3.style.display ="none";
+//   table2cell4.style.display ="none";
+  
+// }
+
+tableOne();
+// tableTwo();
+
+// var table2cell1 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_1.col_1');
+// var table2cell2 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_2.col_1');
+// var table2cell3 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_3.col_1');
+// var table2cell4 = document.querySelector('#tablefield-paragraph-29-field_tablefield-0.tablefield tbody tr td.row_4.col_1');
+
+// table2cell1.setAttribute('rowspan', '4');
+// table2cell2.style.display ="none";
+// table2cell3.style.display ="none";
+// table2cell4.style.display ="none";
+
+
 
 
 

+ 20 - 20
web/themes/custom/rorschach/scss/components/_tablefields.scss

@@ -50,29 +50,29 @@ table{
 
 // tableau collpase cell within column
 
-#tablefield-wrapper-paragraph-240-field_tablefield-0{
-    margin-bottom: 2rem;
+// #tablefield-wrapper-paragraph-240-field_tablefield-0{
+//     margin-bottom: 2rem;
 
-}
-#tablefield-paragraph-240-field_tablefield-0{
-    caption-side:bottom;
-    // display: flex;
-    // flex-direction: column;
-    // empty-cells:hide;
+// }
+// #tablefield-paragraph-240-field_tablefield-0{
+//     caption-side:bottom;
+//     // display: flex;
+//     // flex-direction: column;
+//     // empty-cells:hide;
 
-    tbody{
+//     tbody{
 
-        // td.row_2.col_1{
-        //     display: none;
-        // }
-        // td.row_3.col_1{
-        //     display: none;
-        // }
-        // td.row_4.col_1{
-        //     display: none;
-        // }
+//         // td.row_2.col_1{
+//         //     display: none;
+//         // }
+//         // td.row_3.col_1{
+//         //     display: none;
+//         // }
+//         // td.row_4.col_1{
+//         //     display: none;
+//         // }
     
-    }
+//     }
 
 
-}
+// }

Some files were not shown because too many files changed in this diff