Browse Source

personal note display for viewmode cardfull

Bachir Soussi Chiadmi 6 years ago
parent
commit
b20732f9a8

File diff suppressed because it is too large
+ 0 - 0
sites/all/modules/gui/materiobasemod/js/dist/materio_personalnotes.min.js


+ 1 - 1
sites/all/modules/gui/materiobasemod/js/materio_personalnotes.js

@@ -98,7 +98,7 @@ MaterioPersonalNotes = function(){
 
     var $card = $link.parents('.node-materiau');
 
-    if($card.is('.vm-cardmedium') || $card.is('.vm-cardbig')){
+    if($card.is('.vm-cardmedium') || $card.is('.vm-cardbig') || $card.is('.vm-cardfull')){
       var $note = $('<div class="note-wrapper"/>')
         .append($('<div class="close"></i><div>')
           .bind('click', function(){

+ 1 - 1
sites/all/modules/gui/materiobasemod/materio_personalnotes.module

@@ -65,7 +65,7 @@ function materio_personalnotes_menu(){
  */
 function materio_personalnotes_entity_view($entity, $type, $view_mode, $langcode) {
   // dsm($entity, 'entity');
-  if($type == 'node' && $entity->type == "materiau"){
+  if($type == 'node' && $entity->type == "materiau" && in_array($view_mode, array('cardmedium', 'cardbig', 'cardfull'))){
     if(user_access('create own personal notes') && $view_mode != 'print'){
       $entity->content['personalnotelink'] = materio_personalnotes_get_note_link($entity);
 

File diff suppressed because it is too large
+ 9 - 11
sites/all/themes/gui/materiobasetheme/css/styles.css


+ 47 - 20
sites/all/themes/gui/materiobasetheme/scss/styles.scss

@@ -1603,27 +1603,31 @@ $cardmargin:7px;
   }
 
   // NOTES
-  transition: width 0.3s ease-in-out;
-  &.node-materiau.vm-cardmedium.note-opened,
-  &.node-materiau.vm-cardbig.note-opened{
-
-    >div.side{
-      width:$w;
-    }
+  $note_label_h:20px;
+  &.node-materiau.vm-cardmedium,
+  &.node-materiau.vm-cardbig{
+    transition: width 0.3s ease-in-out;
+    &.note-opened{
+      >div.side{
+        width:$w;
+      }
 
-    width:$w*2+$cardmargin*2;
-    nav.nav{
-      border-radius: 0 0 0 3px;
+      width:$w*2+$cardmargin*2;
+      nav.nav{
+        border-radius: 0 0 0 3px;
+      }
     }
+  }
 
+  &.node-materiau.vm-cardmedium.note-opened,
+  &.node-materiau.vm-cardbig.note-opened,
+  &.node-materiau.vm-cardfull.note-opened{
     .note-wrapper{
-      width:$w+$cardmargin*2; height:$h;
-      position :absolute; top:0; right:0;
+      z-index:10; position :absolute;
       .close{
         position: absolute;
-        width:15px; height:15px; top:5px; right:5px;
-        // padding: 3px 3px 0 0;
-        // border-radius: 0 7px 0 0;
+        width:15px; height:15px;
+        top:5px; right:5px;
         background-color: #fff!important;
         background-image: url(../img/close2.png);
         background-size: contain;
@@ -1633,25 +1637,48 @@ $cardmargin:7px;
       .form-item{
         margin:0;
       }
-      $label_h:20px;
       label{
         // display: none;
-        height:$label_h;
+        height:$note_label_h;
         @include fs14;
         margin:0 5px;
         line-height: 1.6;
       }
       textarea{
         border: #ccc 1px solid;
-        border-radius: 0 7px 7px 0;
         resize:none;
         padding:5px; margin:5px;
-        height:$h - 10px - $label_h;
-        width:$w+$cardmargin*2 - 10px;
         @include fs12;
       }
     }
   }
+  &.node-materiau.vm-cardmedium.note-opened,
+  &.node-materiau.vm-cardbig.note-opened{
+    .note-wrapper{
+      width:$w+$cardmargin*2; height:$h;
+      top:0; right:0;
+    }
+    textarea{
+      width:$w+$cardmargin*2 - 10px;
+      border-radius: 0 7px 7px 0;
+      height:$h - 10px - $note_label_h;
+    }
+  }
+  &.node-materiau.vm-cardfull.note-opened{
+    .note-wrapper{
+      width:$w / 2;
+      left:0;
+      height:$h / 2;
+      top:$h / 2;
+      background-color: #fff;
+      border-radius: 0 0 0 7px;
+    }
+    textarea{
+      width:$w / 2 - 10px;
+      border-radius: 0 0 0 7px;
+      height:$h / 2 - 10px - $note_label_h;
+    }
+  }
 }// .card()
 
 /*

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