Projet

Général

Profil

0001-orleans-highlight-widgets-with-errors-50565.patch

Serghei Mihai (congés, retour 15/05), 27 janvier 2021 12:44

Télécharger (2,12 ko)

Voir les différences:

Subject: [PATCH] orleans: highlight widgets with errors (#50565)

 static/orleans/_custom.scss | 55 +++++++++++++++++++++++++++++++++++++
 static/orleans/extra.js     |  4 +++
 2 files changed, 59 insertions(+)
static/orleans/_custom.scss
288 288
		}
289 289
	}
290 290
}
291

  
292
input[type=checkbox], input[type=radio] {
293
	-webkit-appearance: none;
294
	-moz-appearance: none;
295
	-ms-appearance: none;
296
}
297

  
298
input[type=radio] {
299
	border: $widget-border;
300
	height: 15px;
301
	width: 15px;
302
	padding: 0;
303
	border-radius: 50%;
304
	position: relative;
305
	margin-top: 0.7em;
306
	margin-bottom: 0;
307
	&:checked {
308
		&:before {
309
			font-family: FontAwesome;
310
			content: '\f111'; /* fa-circle */
311
			display: block;
312
			color: grey;
313
			font-size: 12px;
314
			position: absolute;
315
			left: 1px;
316
		}
317
	}
318
}
319

  
320
input[type=checkbox] {
321
	border-radius: $widget-border-radius;
322
	height: 15px;
323
	width: 15px;
324
	border: $widget-border;
325
	padding: 0;
326
	&:checked {
327
		&:before {
328
			font-family: FontAwesome;
329
			content: '\f00c';
330
			display: block;
331
			color: grey;
332
			font-size: 13px;
333
			position: absolute;
334
		}
335
	}
336
}
337

  
338
div.widget-with-error {
339
	.content {
340
		input, textarea, select, div.file-button {
341
			background-color: $notification_error_color;
342
			border: 1px solid darken($notification_error_color, 25%);
343
		}
344
	}
345
}
static/orleans/extra.js
2 2
  $('div.wcsformsofcategorycell').delegate('h2', 'click', function() {
3 3
    $(this).parents('div.wcsformsofcategorycell').toggleClass('toggled');
4 4
  });
5
  /* reset error class when contents is changed */
6
  $('input, select, textarea').on('change', function() {
7
    $(this).parents('.widget-with-error').removeClass('widget-with-error');
8
  });
5 9
});
6
-