Browse Source

studio composition improvments, fix #435

Bachir Soussi Chiadmi 4 năm trước cách đây
mục cha
commit
4d89162957

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
web/modules/custom/edlp_studio/assets/dist/scripts/edlp_studio.min.js


+ 1 - 1
web/modules/custom/edlp_studio/assets/scripts/edlp_studio.js

@@ -192,7 +192,7 @@
     $link
     $link
       .removeClass('folded')
       .removeClass('folded')
       .parents('li')
       .parents('li')
-        .before($('<li>').append($new_link).append($delete_link));
+        .after($('<li>').append($new_link).append($delete_link));
     $form.remove();
     $form.remove();
     // open new composition to composer
     // open new composition to composer
     initAjaxCompoLinks();
     initAjaxCompoLinks();

+ 5 - 5
web/modules/custom/edlp_studio/includes/edlp_compositions_list.inc

@@ -20,7 +20,7 @@ function template_preprocess_edlp_compositions_list(&$vars){
 
 
     $title = $entity->getName();
     $title = $entity->getName();
 
 
-    $vars['compositions']['#items'][] = array(
+    array_unshift($vars['compositions']['#items'], array(
       'compo_link' => array(
       'compo_link' => array(
         '#title' => $title,
         '#title' => $title,
         '#type' => 'link',
         '#type' => 'link',
@@ -29,7 +29,7 @@ function template_preprocess_edlp_compositions_list(&$vars){
           'attributes' => array(
           'attributes' => array(
             'data-drupal-link-system-path' => $url->getInternalPath(),
             'data-drupal-link-system-path' => $url->getInternalPath(),
             'cid' => $entity->id(),
             'cid' => $entity->id(),
-            'class' => ['composition-link', $i==0 ? 'is-active':''],
+            'class' => ['composition-link', $i==count($vars['composition_entities'])-1 ? 'is-active':''],
             'title'=>$title,
             'title'=>$title,
           ),
           ),
         ),
         ),
@@ -47,11 +47,11 @@ function template_preprocess_edlp_compositions_list(&$vars){
           ),
           ),
         ),
         ),
       )
       )
-    );
+    ));
     $i++;
     $i++;
   }
   }
 
 
-  $vars['compositions']['#items'][] = array(
+  array_unshift($vars['compositions']['#items'], array(
     '#title' => t('New composition'),
     '#title' => t('New composition'),
     '#type' => 'link',
     '#type' => 'link',
     '#url' => $vars['new_composition_url'],
     '#url' => $vars['new_composition_url'],
@@ -61,5 +61,5 @@ function template_preprocess_edlp_compositions_list(&$vars){
         'class' => ['new-composition-link']
         'class' => ['new-composition-link']
       ),
       ),
     ),
     ),
-  );
+  ));
 }
 }

+ 1 - 1
web/modules/custom/edlp_studio/src/Controller/StudioUIController.php

@@ -187,7 +187,7 @@ class StudioUIController extends ControllerBase {
     $query = \Drupal::entityQuery('composition')
     $query = \Drupal::entityQuery('composition')
       ->condition('user_id', $this->user->id())
       ->condition('user_id', $this->user->id())
       ->range(0,1)
       ->range(0,1)
-      ->sort('created');
+      ->sort('created', 'DESC');
 
 
     $compos_id = $query->execute();
     $compos_id = $query->execute();
     if(count($compos_id)){
     if(count($compos_id)){

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
web/themes/custom/edlptheme/assets/dist/styles/app.min.css


+ 2 - 2
web/themes/custom/edlptheme/assets/styles/app.scss

@@ -1194,7 +1194,7 @@ main[role="main"]{
   } // end mixin
   } // end mixin
 
 
   .chutier_ui{
   .chutier_ui{
-    height: 50%;
+    height: 65%;
     border-bottom: 1px solid red;
     border-bottom: 1px solid red;
     position: relative;
     position: relative;
     &>h2{
     &>h2{
@@ -1251,7 +1251,7 @@ main[role="main"]{
   }
   }
   $compo_square_size:12px;
   $compo_square_size:12px;
   .composition_ui{
   .composition_ui{
-    height:50%;
+    height:35%;
     &>h2{
     &>h2{
       z-index: 10;
       z-index: 10;
       position: absolute;
       position: absolute;

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác