Browse Source

Dashboard : correctifs mineurs

idleman 2 years ago
parent
commit
718b202fdb

+ 1 - 0
plugin/dashboard/DashboardWidget.class.php

@@ -153,6 +153,7 @@ class DashboardWidget extends Entity{
 			if(empty($model->label)) $model->label = 'Sans titre';
 			$models[$model->model] = $model;
 		}
+		
 		if(!isset($slug)) return $models;
 
 		return isset($models[$slug]) ? $models[$slug] : $model;

+ 19 - 1
plugin/dashboard/css/component.css

@@ -145,10 +145,15 @@
 .dashboard-container .dashboard-widget .dashboard-widget-header .widget-header-title{
 	padding-left: 5px;
 	flex-grow: 1;
+	overflow: hidden;
+    text-overflow: ellipsis;
 }
 .dashboard-container .dashboard-widget.widget-draggable .ui-draggable-handle{
 	cursor: move;
 }
+
+
+
 .dashboard-container .dashboard-widget .dashboard-widget-header .widget-header-options{
 	list-style-type: none;
 	margin: 0;
@@ -231,6 +236,20 @@
     list-style-type: none;
 }
 
+ul.widget-models li[data-model="new"]{
+	background-color: #dfdfdf!important;
+}
+.widget-models li[data-model="new"] h3,
+.widget-models li[data-model="new"] .widget-model-info{
+	display: none;
+}
+.widget-models li[data-model="new"] p{
+	margin-top:60px;
+	padding-top: 10px;
+    border-top: 1px solid rgba(0,0,0,.1);
+	color: #8d8c8c;
+}
+
 .widget-types li h3{
 	font-size: 20px;
 	text-transform: uppercase;
@@ -252,7 +271,6 @@
 
 .dashboard-modal .widget-models li.active {
 	opacity: 1;
-	box-shadow: inset 0 0 1px 3px #7ca728!important;
 }
 .dashboard-modal .widget-models li {
 	position: relative;

+ 1 - 2
plugin/dashboard/js/dashboard.js

@@ -386,12 +386,11 @@ class Dashboard {
 		var firstPlaceHolder = $('.dashboard-placeholder:eq(0)');
 		var placeholderWidth = firstPlaceHolder.width();
 		var placeholderHeight = firstPlaceHolder.height();
-		
+
 		for(var k in this.widgets){
 			var widget = this.widgets[k];
 		
 			var cell = $('[data-row="'+widget.row+'"][data-column="'+widget.column+'"]').position();
-			console.log($('[data-row="'+widget.row+'"][data-column="'+widget.column+'"]'),cell,placeholderWidth)
 			if(!cell) continue;
 			widget.element.css({
 				width: ((widget.width * placeholderWidth)-(this.options.placeHolderPadding*2))+'px',