Revision 16f556c5
Added by Scott Dale about 18 years ago
usr/local/www/index.php | ||
---|---|---|
351 | 351 |
?> |
352 | 352 |
<div id="widgetcontainer" style="display:none"> |
353 | 353 |
<div id="content1"><h1>Available Widgets</h1><p><?php |
354 |
foreach($widgetfiles as $widget) { |
|
354 |
$widgetfiles_add = $widgetfiles; |
|
355 |
sort($widgetfiles_add); |
|
356 |
foreach($widgetfiles_add as $widget) { |
|
355 | 357 |
if(!stristr($widget, "widget.php")) |
356 | 358 |
continue; |
357 | 359 |
|
... | ... | |
360 | 362 |
$nicename = $widgetname; |
361 | 363 |
$nicename = str_replace("_", " ", $nicename); |
362 | 364 |
//make the title look nice |
363 |
$nicename = ucwords($nicename);?> |
|
364 |
<span style="cursor: pointer;" onclick='return addDiv("<?php echo $widgetname; ?>")'><u><?php echo $nicename; ?></u></span><br><?php |
|
365 |
$nicename = ucwords($nicename); |
|
366 |
|
|
367 |
$widgettitle = $widgetname . "_title"; |
|
368 |
$widgettitlelink = $widgetname . "_title_link"; |
|
369 |
if ($$widgettitle != "") |
|
370 |
{ |
|
371 |
//echo widget title ?> |
|
372 |
<span style="cursor: pointer;" onclick='return addDiv("<?php echo $widgetname; ?>")'> |
|
373 |
<u><?php echo $$widgettitle; ?></u></span><br> |
|
374 |
<?php |
|
375 |
} |
|
376 |
else {?> |
|
377 |
<span style="cursor: pointer;" onclick='return addDiv("<?php echo $widgetname; ?>")'> |
|
378 |
<u><?php echo $nicename; ?></u></span><br><?php |
|
379 |
} |
|
365 | 380 |
} |
366 | 381 |
?> |
367 | 382 |
</p> |
... | ... | |
371 | 386 |
<div id="welcomecontainer" style="display:none"> |
372 | 387 |
<div id="welcome-div"> |
373 | 388 |
<h1> |
374 |
<div style="float:left;padding: 2px"> |
|
389 |
<div style="float:left;width:80%;padding: 2px">
|
|
375 | 390 |
Welcome to the New Dashboard page! |
376 | 391 |
</div> |
377 |
<div onclick="domTT_close(this);showAllWidgets(); " style="float:right; cursor:pointer;padding: 5px;" >
|
|
392 |
<div onclick="domTT_close(this);showAllWidgets();" style="float:right;width:8%; cursor:pointer;padding: 5px;" >
|
|
378 | 393 |
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_close.gif" /> |
379 | 394 |
</div> |
380 | 395 |
<div style="clear:both;"></div> |
... | ... | |
511 | 526 |
<div id="col2" style="float:right;width:49%;padding: 2px;padding-bottom:40px"> |
512 | 527 |
<?php |
513 | 528 |
} |
514 |
|
|
515 |
?>
|
|
529 |
|
|
530 |
?> |
|
516 | 531 |
<div style="clear:both;"></div> |
517 | 532 |
<div id="<?php echo $widgetname;?>-div" class="widgetdiv" style="display:<?php echo $divdisplay; ?>;"> |
518 | 533 |
<input type="hidden" value="<?php echo $inputdisplay;?>" id="<?php echo $widgetname;?>-div-input" name="<?php echo $widgetname;?>-div-input"> |
519 | 534 |
<div id="<?php echo $widgetname;?>topic" class="widgetheader" style="cursor:move"> |
520 | 535 |
<div style="float:left;"> |
521 |
<?php echo $nicename;?> |
|
536 |
<?php |
|
537 |
|
|
538 |
$widgettitle = $widgetname . "_title"; |
|
539 |
$widgettitlelink = $widgetname . "_title_link"; |
|
540 |
if ($$widgettitle != "") |
|
541 |
{ |
|
542 |
//only show link if defined |
|
543 |
if ($$widgettitlelink != "") {?> |
|
544 |
<u><span onClick="location.href='/<?php echo $$widgettitlelink;?>'" style="cursor:pointer"> |
|
545 |
<?php } |
|
546 |
//echo widget title |
|
547 |
echo $$widgettitle; |
|
548 |
if ($$widgettitlelink != "") { ?> |
|
549 |
</span></u> |
|
550 |
<?php } |
|
551 |
} |
|
552 |
else{ |
|
553 |
if ($$widgettitlelink != "") {?> |
|
554 |
<u><span onClick="location.href='/<?php echo $$widgettitlelink;?>'" style="cursor:pointer"> |
|
555 |
<?php } |
|
556 |
echo $nicename; |
|
557 |
if ($$widgettitlelink != "") { ?> |
|
558 |
</span></u> |
|
559 |
<?php } |
|
560 |
} |
|
561 |
?> |
|
522 | 562 |
</div> |
523 | 563 |
<div align="right" style="float:right;"> |
524 | 564 |
<div id="<?php echo $widgetname;?>-configure" onclick='return configureDiv("<?php echo $widgetname;?>")' style="display:none; cursor:pointer" ><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_configure.gif" /></div> |
Also available in: Unified diff
various fixes, add support to change widget titles and add links.