Project

General

Profile

« Previous | Next » 

Revision a508c6e4

Added by NOYB NOYB over 9 years ago

HTML Compliance - Dashboard

Rename duplicate id's.
Fix available widgets collapsible section href with id.
Where obsolete replace name attribute with id.

The .panel-footer requires mod to the widgets with config options. So will submit separate commit so it can be handled independently.
Bad value #widget-system_information .panel-footer for attribute href on element a: Illegal character in fragment: not a URL code point.

View differences:

src/usr/local/www/index.php
308 308
<div class="panel panel-default" id="widget-available">
309 309
	<div class="panel-heading"><?=gettext("Available Widgets"); ?>
310 310
		<span class="widget-heading-icon">
311
			<a data-toggle="collapse" href="#widget-available .panel-body" name="widgets-available">
311
			<a data-toggle="collapse" href="#widget-available_panel-body" id="widgets-available">
312 312
				<i class="fa fa-plus-circle"></i>
313 313
			</a>
314 314
		</span>
315 315
	</div>
316
	<div class="panel-body collapse out">
316
	<div id="widget-available_panel-body" class="panel-body collapse out">
317 317
		<div class="content">
318 318
			<div class="row">
319 319
<?php
320 320
foreach ($widgets as $widgetname => $widgetconfig):
321 321
	if ($widgetconfig['display'] == 'none'):
322 322
?>
323
		<div class="col-sm-3"><a href="#" name="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div>
323
		<div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div>
324 324
	<?php endif; ?>
325 325
<?php endforeach; ?>
326 326
			</div>
......
351 351
</div>
352 352

  
353 353
<div class="hidden" id="widgetSequence">
354
	<form action="/" method="post" id="widgetSequence" name="widgetForm">
354
	<form action="/" method="post" id="widgetSequence_form" name="widgetForm">
355 355
		<input type="hidden" name="sequence" value="" />
356 356

  
357 357
		<button type="submit" id="btnstore" class="btn btn-primary">Store widget configuration</button>
......
448 448
	}
449 449

  
450 450
	$('#widgetSequence').removeClass('hidden');
451
	$('input[name=sequence]', $('#widgetSequence')).val(sequence);
451
	$('input[name=sequence]', $('#widgetSequence_form')).val(sequence);
452 452
}
453 453

  
454 454
events.push(function() {
......
470 470
	});
471 471

  
472 472
	// On clicking a widget to install . .
473
	$('[name^=btnadd-]').click(function(event) {
473
	$('[id^=btnadd-]').click(function(event) {
474 474
		// Add the widget name to the list of displayed widgets
475
		updateWidgets(this.name.replace('btnadd-', ''));
475
		updateWidgets(this.id.replace('btnadd-', ''));
476 476

  
477 477
		// We don't want to see the "Store" button because we are doing that automatically
478 478
		$('#btnstore').hide();

Also available in: Unified diff