Explorar el Código

search entries foldable

Bachir Soussi Chiadmi hace 6 años
padre
commit
13e1af6f8e

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css


+ 19 - 0
sites/all/themes/custom/edlptheme/assets/scripts/main.js

@@ -317,6 +317,10 @@
         initEnregistrementTranscript();
       }
 
+      if(state.sys_path == "search"){
+        initSearch();
+      }
+
       // update the language switcher block if it comes in the response
       if(typeof data.translations_links != 'undefined'){
         console.log('state',state);
@@ -1507,6 +1511,21 @@
       }
     }
 
+
+    //  ___                  _
+    // / __| ___ __ _ _ _ __| |_
+    // \__ \/ -_) _` | '_/ _| ' \
+    // |___/\___\__,_|_| \__|_||_|
+    function initSearch(){
+      // if($('#edit-entries input:checked', '#edlp-search-form').length){
+      //   $('#edit-entries--wrapper', '#edlp-search-form').toggleClass('opened');
+      // }
+      $('#edit-entries--wrapper legend', '#edlp-search-form').on('click', function(){
+        $(this).parent().toggleClass('opened');
+      });
+    };
+
+
     //  ___                   _    _                         _
     // | __|_ _  _ _ ___ __ _(_)__| |_ _ _ ___ _ __  ___ _ _| |_
     // | _|| ' \| '_/ -_) _` | (_-<  _| '_/ -_) '  \/ -_) ' \  _|

+ 42 - 0
sites/all/themes/custom/edlptheme/assets/styles/app.scss

@@ -1154,6 +1154,47 @@ main[role="main"]{
     width:90%;
   }
 
+  #edit-entries--wrapper{
+    legend{
+      cursor: pointer;
+      display: block;
+      width:100%;
+      &:after{
+        content: '\2304';
+        font-size: 2em;
+        font-weight: 200;
+        display:inline-block;
+        line-height: 0;
+        letter-spacing: 0;
+        // width:15px;
+        height:13px;
+        overflow: hidden;
+        // text-align: center;
+        // outline: 1px solid orange;
+        float: right;
+        margin-top: 0.5em 0 0 0;
+      }
+    }
+    #edit-entries{
+      overflow: hidden;
+      height:1px;
+      margin:0;
+      transition: height 0.4s ease-in-out;
+    }
+    &.opened{
+      legend:after{
+        // content: '\2303';
+        transform: rotateZ(180deg);
+        transform-origin: center;
+        margin-top: 0 0 0.5em 0;
+      }
+      #edit-entries{
+        height:362px;
+      }
+
+    }
+  }
+
   #edit-entries{
     .form-item{
       label, input{
@@ -1249,6 +1290,7 @@ main[role="main"]{
           &:checked{background-color: var(--e-col-123);}
         }
       }
+
     }
   }
 

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio