Browse Source

studio composition improvments, fix #435

Bachir Soussi Chiadmi 4 years ago
parent
commit
4d89162957

File diff suppressed because it is too large
+ 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
       .removeClass('folded')
       .parents('li')
-        .before($('<li>').append($new_link).append($delete_link));
+        .after($('<li>').append($new_link).append($delete_link));
     $form.remove();
     // open new composition to composer
     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();
 
-    $vars['compositions']['#items'][] = array(
+    array_unshift($vars['compositions']['#items'], array(
       'compo_link' => array(
         '#title' => $title,
         '#type' => 'link',
@@ -29,7 +29,7 @@ function template_preprocess_edlp_compositions_list(&$vars){
           'attributes' => array(
             'data-drupal-link-system-path' => $url->getInternalPath(),
             'cid' => $entity->id(),
-            'class' => ['composition-link', $i==0 ? 'is-active':''],
+            'class' => ['composition-link', $i==count($vars['composition_entities'])-1 ? 'is-active':''],
             'title'=>$title,
           ),
         ),
@@ -47,11 +47,11 @@ function template_preprocess_edlp_compositions_list(&$vars){
           ),
         ),
       )
-    );
+    ));
     $i++;
   }
 
-  $vars['compositions']['#items'][] = array(
+  array_unshift($vars['compositions']['#items'], array(
     '#title' => t('New composition'),
     '#type' => 'link',
     '#url' => $vars['new_composition_url'],
@@ -61,5 +61,5 @@ function template_preprocess_edlp_compositions_list(&$vars){
         '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')
       ->condition('user_id', $this->user->id())
       ->range(0,1)
-      ->sort('created');
+      ->sort('created', 'DESC');
 
     $compos_id = $query->execute();
     if(count($compos_id)){

File diff suppressed because it is too large
+ 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
 
   .chutier_ui{
-    height: 50%;
+    height: 65%;
     border-bottom: 1px solid red;
     position: relative;
     &>h2{
@@ -1251,7 +1251,7 @@ main[role="main"]{
   }
   $compo_square_size:12px;
   .composition_ui{
-    height:50%;
+    height:35%;
     &>h2{
       z-index: 10;
       position: absolute;

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