Răsfoiți Sursa

Stat tree edit (wip)

Vijayakrishnan 3 ani în urmă
părinte
comite
1eaee0c8ec

+ 3 - 0
public/css/style.css

@@ -2761,6 +2761,9 @@ table.stag-compact-grid>tbody>tr>td [if-grid-view] {
     height: 100%;
     border-radius: 0;
 }
+.tree-column-header.has-changes {
+    background: #ffeeee !important;
+}
 .stat-tree-view .stat-tree-node {
     padding: 0.1rem 0.3rem;
 }

+ 4 - 2
resources/views/app/stat-tree/stat-trees/sub/edit.blade.php

@@ -270,7 +270,7 @@
                         <div class="row m-0 h-100">
                             <div class="{{$multiProView ? 'col-12' : 'col-6'}} tree-lhs-column border-right h-100 p-0">
                                 <div class="d-flex flex-column h-100">
-                                    <div class="d-flex align-items-center pl-2 height-35px border-bottom bg-light">
+                                    <div class="d-flex align-items-center pl-2 height-35px border-bottom bg-light tree-column-header">
                                         <h6 class="font-weight-bold m-0 text-secondary">{{$statTree->name}}</h6>
                                         <span class="text-danger d-none if-changed ml-2 text-sm">(modified *)</span>
                                         @if($multiProView)
@@ -294,7 +294,7 @@
                                         <a href="#" class="tree-collapse-all ml-2" title="Collapse All"><i class="fa fa-angle-double-up text-secondary"></i></a>
                                         <div class="ml-auto mr-2 d-none if-changed">
                                             <a href="#" class="btn btn-sm btn-primary text-white" id="btn-save-tree">Save</a>
-                                            <a href="#" class="ml-2 btn btn-sm btn-default border text-dark" onclick="return fastReload()">Reset</a>
+                                            <a href="#" class="ml-1 btn btn-sm btn-default border text-dark bg-white" onclick="return fastReload()">Reset</a>
                                         </div>
                                     </div>
                                     <div class="flex-grow-1 overflow-overlay-on-hover">
@@ -538,9 +538,11 @@
                                     this.changed = _changed;
                                     if(_changed) {
                                         $('.if-changed').removeClass('d-none');
+                                        $('.tree-column-header').addClass('has-changes');
                                     }
                                     else {
                                         $('.if-changed').addClass('d-none');
+                                        $('.tree-column-header').removeClass('has-changes');
                                     }
                                 },