Browse Source

ergonomie

idleman 7 years ago
parent
commit
f784b8e734
4 changed files with 49 additions and 9 deletions
  1. 4 1
      action.php
  2. 4 4
      component.php
  3. 35 2
      css/main.css
  4. 6 2
      index.php

+ 4 - 1
action.php

@@ -165,6 +165,8 @@ switch ($_['action']){
 			$sketchs = Sketch::loadAll($filters);
 			foreach($sketchs as $sketch){
 				$sketch->label = html_entity_decode($sketch->label);
+				$sketch->owner = User::getById($sketch->owner)->login;
+				$sketch->public = $sketch->public==1?true:false;
 				$response['rows'][] = $sketch->toArray();
 			}
 		});
@@ -289,7 +291,8 @@ switch ($_['action']){
 			foreach($resources as $resource){
 				$resource->label = html_entity_decode($resource->label);
 				$resource->content = null;
-				$response['rows'][] = $resource->toArray();
+				$resource = $resource->toArray();
+				$response['rows'][] = $resource;
 			}
 				
 		});

+ 4 - 4
component.php

@@ -2,9 +2,9 @@
 
 	<?php if($myUser->connected()): ?>
 
-			<div class="jumbotron">
+			<div class="jumbotron" id="componentBlock">
 			<div class="jumbotron-contents">
-				<h2>Mes composants</h2>
+				<h2><i class="fa fa-qrcode"></i> Mes composants</h2>
 				<a  onclick="edit_component();" class="btn btn-success"><i class="fa fa-plus"></i> Ajouter</a>
 				<table class="table table-striped table-hover" id="components">
 					<thead>
@@ -25,8 +25,8 @@
 							<td>{{brand}}</td>
 							<td>{{price}}</td>
 							<td>
-								<div onclick="edit_component(this);" class="btn btn-primary"><i class="fa fa-pencil"></i></div>
-								<div onclick="delete_component(this);" class="btn btn-danger"><i class="fa fa-times"></i></div>
+								<div onclick="edit_component(this);" class="btn btn-primary btn-mini btn-rounded pulse"><i class="fa fa-pencil"></i></div>
+								<div onclick="delete_component(this);" class="btn btn-danger btn-mini btn-rounded pulse"><i class="fa fa-times"></i></div>
 							</td>
 						</tr>
 					</tbody>

+ 35 - 2
css/main.css

@@ -55,7 +55,7 @@ display:none;
 	cursor:pointer;
 }
 
-#sketchBlock h2{
+#sketchBlock h2,#componentBlock h2{
 	margin:0 10px 0 0;
 	display:inline-block;
 	vertical-align:top;
@@ -94,6 +94,7 @@ div.CodeMirror{
 #sketchTitle{
 	margin-bottom:0;
 }
+
 #sketchTitle input{
 	border:none;
 	border-bottom: 1px solid #cecece;
@@ -175,6 +176,9 @@ div.CodeMirror{
 #resource{
 	transition:all 0.5s linear;
 }
+#sketchs{
+	margin-bottom:0;
+}
 #sketchs.table tbody tr td{
 	vertical-align:middle;
 }
@@ -262,7 +266,18 @@ div.CodeMirror{
 	margin:10% auto;
 }
 
-
+.pulse:hover {
+    -webkit-animation: pop-in 0.3s;
+    -moz-animation: pop-in 0.3s;
+    -ms-animation: pop-in 0.3s;
+}
+.btn.btn-rounded {
+    border-radius: 40px;
+}
+.btn-mini {
+    padding: 0 4px;
+    border-radius: 4px;
+}
 
 .dz-preview{
 	display:none;
@@ -280,3 +295,21 @@ a.navbar-brand {
     padding-left: 45px;
     background: url('../img/icon.png') no-repeat 5px center !important;
 }
+
+/* ANIMATIONS */
+
+@-webkit-keyframes pop-in {
+0% {  -webkit-transform: scale(1); }
+50% {  -webkit-transform: scale(1.3); }
+100% {  -webkit-transform: scale(1); }
+}
+@-moz-keyframes pop-in {
+0% {  -moz-transform: scale(1); }
+50% {  -moz-transform: scale(1.3); }
+100% {  -moz-transform: scale(1); }
+}
+@keyframes pop-in {
+0% {  transform: scale(1); }
+50% {  transform: scale(1.3); }
+100% { transform: scale(1); }
+}

+ 6 - 2
index.php

@@ -4,7 +4,7 @@
 
 			<div class="jumbotron" id="sketchBlock">
 			<div class="jumbotron-contents">
-				<h2>Sketch(s)</h2>
+				<h2><i class="fa fa-inbox"></i> Sketch(s)</h2>
 				
 				<?php if ($myUser->connected()): ?>
 				<div class="btn-group">
@@ -26,6 +26,8 @@
 						<tr>
 							<th>#</th>
 							<th>Libellé</th>
+							<th>Propriétaire</th>
+							<th>Visibilité</th>
 							<th style="width:100px;">Options</th>
 						</tr>
 					</thead>
@@ -33,8 +35,10 @@
 						<tr data-id="{{id}}" style="display:none;">
 							<td><a href="sketch.php?id={{id}}">{{id}}</a></td>
 							<td><a href="sketch.php?id={{id}}">{{label}}</a></td>
+							<td>{{owner}}</td>
+							<td>{{#public}}<i class="fa fa-eye"></i> Publique{{/public}}{{^public}}<i class="fa fa-eye-slash"></i> Privé{{/public}}</td>
 							<td>
-								<div onclick="delete_sketch(this);" class="btn btn-danger"><i class="fa fa-times"></i></div>
+								<div onclick="delete_sketch(this);" class="btn btn-danger btn-mini btn-rounded pulse"><i class="fa fa-times"></i></div>
 							</td>
 						</tr>
 					</tbody>