Commit 0ddccb7c authored by Franco Fichtner's avatar Franco Fichtner

ui: tooltip placement and button alignment; closes #959

parent 9def0e38
...@@ -2820,10 +2820,10 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false) ...@@ -2820,10 +2820,10 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false)
$output = ""; $output = "";
if (get_service_status($service)) { if (get_service_status($service)) {
$statustext = gettext("Running"); $statustext = gettext("Running");
$output .= '<span class="btn btn-success"><span class="glyphicon glyphicon-play" title="'.sprintf(gettext('%s Service is'),$service['name']).' '.$statustext.'" data-toggle="tooltip" data-placement="bottom" ></span></span>&nbsp;'; $output .= '<span class="btn btn-success glyphicon glyphicon-play" title="'.sprintf(gettext('%s Service is'),$service['name']).' '.$statustext.'" data-toggle="tooltip"></span>' . PHP_EOL;
} else { } else {
$statustext = gettext("Stopped") ; $statustext = gettext("Stopped") ;
$output .= '<span class="btn btn-danger"><span class="glyphicon glyphicon-stop" title="'.sprintf(gettext('%s Service is'),$service['name']).' '.$statustext.'" data-toggle="tooltip" data-placement="bottom" ></span></span>&nbsp;'; $output .= '<span class="btn btn-danger glyphicon glyphicon-stop" title="'.sprintf(gettext('%s Service is'),$service['name']).' '.$statustext.'" data-toggle="tooltip"></span>' . PHP_EOL;
} }
return $output; return $output;
} }
...@@ -2834,8 +2834,7 @@ function get_service_control_links($service, $addname = false) ...@@ -2834,8 +2834,7 @@ function get_service_control_links($service, $addname = false)
$service_title = $addname ? $service['name'] . ' ' : ''; $service_title = $addname ? $service['name'] . ' ' : '';
$template = '<span data-service_id="%s" data-service_action="%s" data-service="%s" '; $template = '<span data-service_id="%s" data-service_action="%s" data-service="%s" ';
$template .= 'data-toggle="tooltip" data-placement="bottom" title="%s" '; $template .= 'data-toggle="tooltip" title="%s" class="btn btn-default %s %s"></span>' . PHP_EOL;
$template .= 'class="btn btn-default %s %s"></span>' . PHP_EOL;
$output = ''; $output = '';
......
...@@ -138,17 +138,15 @@ function mapDataToFormUI(data_get_map) { ...@@ -138,17 +138,15 @@ function mapDataToFormUI(data_get_map) {
*/ */
function updateServiceStatusUI(status) { function updateServiceStatusUI(status) {
var status_html = ''; var status_html = '<span class="glyphicon glyphicon-play btn ';
if (status == "running") { if (status == "running") {
status_html += '<span class="btn btn-success">' ; status_html += 'btn-success' ;
} else if (status == "stopped") { } else if (status == "stopped") {
status_html += '<span class="btn btn-danger">' ; status_html += 'btn-danger' ;
} else {
status_html += '<span class="btn">' ;
} }
status_html += '<span class="glyphicon glyphicon-play" data-placement="bottom"></span> </span>&nbsp;'; status_html += '"></span>';
$('#service_status_container').html(status_html); $('#service_status_container').html(status_html);
} }
......
...@@ -1896,7 +1896,7 @@ include("head.inc"); ...@@ -1896,7 +1896,7 @@ include("head.inc");
endforeach; endforeach;
endif;?> endif;?>
</select> </select>
<button type="button" class="btn btn-sm" id="btn_show_add_gateway" title="<?=gettext("add a new one.");?>" data-toggle="tooltip" data-placement="right" ><span class="glyphicon glyphicon-plus"></span></button> <button type="button" class="btn btn-sm" id="btn_show_add_gateway" title="<?=gettext("add a new one.");?>" data-toggle="tooltip"><span class="glyphicon glyphicon-plus"></span></button>
<div class="hidden" id="addgateway"> <div class="hidden" id="addgateway">
<br/> <br/>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">
...@@ -2476,7 +2476,7 @@ include("head.inc"); ...@@ -2476,7 +2476,7 @@ include("head.inc");
endforeach; endforeach;
endif;?> endif;?>
</select> </select>
<button type="button" class="btn btn-sm" id="btn_show_add_gatewayv6" title="<?=gettext("add a new one.");?>" data-toggle="tooltip" data-placement="right" ><span class="glyphicon glyphicon-plus"></span></button> <button type="button" class="btn btn-sm" id="btn_show_add_gatewayv6" title="<?=gettext("add a new one.");?>" data-toggle="tooltip"><span class="glyphicon glyphicon-plus"></span></button>
<div class="hidden" for="help_for_gatewayv6"> <div class="hidden" for="help_for_gatewayv6">
<?=gettext("If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the link above."); ?><br /> <?=gettext("If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the link above."); ?><br />
<?=gettext("On local LANs the upstream gateway should be \"none\"."); ?> <?=gettext("On local LANs the upstream gateway should be \"none\"."); ?>
......
...@@ -238,7 +238,6 @@ include("head.inc"); ...@@ -238,7 +238,6 @@ include("head.inc");
data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>" data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>"
data-service_name="<?=$service['name'];?>" data-service_name="<?=$service['name'];?>"
data-toggle="tooltip" data-toggle="tooltip"
data-placement="bottom"
title="<?=sprintf(gettext('Restart %sService'), $service['name']);?>" title="<?=sprintf(gettext('Restart %sService'), $service['name']);?>"
class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-refresh"> class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-refresh">
</span> </span>
...@@ -247,7 +246,6 @@ include("head.inc"); ...@@ -247,7 +246,6 @@ include("head.inc");
data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>" data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>"
data-service_name="<?=$service['name'];?>" data-service_name="<?=$service['name'];?>"
data-toggle="tooltip" data-toggle="tooltip"
data-placement="bottom"
title="<?=sprintf(gettext('Stop %sService'), $service['name']);?>" title="<?=sprintf(gettext('Stop %sService'), $service['name']);?>"
class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-stop"> class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-stop">
</span> </span>
...@@ -258,7 +256,6 @@ include("head.inc"); ...@@ -258,7 +256,6 @@ include("head.inc");
data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>" data-service_id="<?=!empty($service['id']) ? $service['id'] : "";?>"
data-service_name="<?=$service['name'];?>" data-service_name="<?=$service['name'];?>"
data-toggle="tooltip" data-toggle="tooltip"
data-placement="bottom"
title="<?=sprintf(gettext('Start %sService'), $service['name']);?>" title="<?=sprintf(gettext('Start %sService'), $service['name']);?>"
class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-play"> class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-play">
</span> </span>
...@@ -298,7 +295,6 @@ include("head.inc"); ...@@ -298,7 +295,6 @@ include("head.inc");
data-service_action="restart_all" data-service_action="restart_all"
data-service_name="all" data-service_name="all"
data-toggle="tooltip" data-toggle="tooltip"
data-placement="bottom"
title="<?=gettext('Restart all services');?>" title="<?=gettext('Restart all services');?>"
class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-refresh"> class="btn btn-xs btn-default xmlrpc_srv_status_act glyphicon glyphicon-refresh">
</span> </span>
......
...@@ -1273,19 +1273,19 @@ $( document ).ready(function() { ...@@ -1273,19 +1273,19 @@ $( document ).ready(function() {
<?php <?php
endif; ?> endif; ?>
<a href="#" class="btn btn-default btn-xs act_info" data-id="<?=$i;?>" data-toggle="tooltip" data-placement="left" title="<?=gettext("show certificate info");?>"> <a href="#" class="btn btn-default btn-xs act_info" data-id="<?=$i;?>" data-toggle="tooltip" title="<?=gettext("show certificate info");?>">
<span class="glyphicon glyphicon-info-sign"></span> <span class="glyphicon glyphicon-info-sign"></span>
</a> </a>
<a href="system_certmanager.php?act=exp&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca");?>"> <a href="system_certmanager.php?act=exp&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("export ca");?>">
<span class="glyphicon glyphicon-download"></span> <span class="glyphicon glyphicon-download"></span>
</a> </a>
<a href="system_certmanager.php?act=key&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export key");?>"> <a href="system_certmanager.php?act=key&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("export key");?>">
<span class="glyphicon glyphicon-download"></span> <span class="glyphicon glyphicon-download"></span>
</a> </a>
<a href="system_certmanager.php?act=p12&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("export ca cert+user cert+user cert key in .p12 format");?>"> <a href="system_certmanager.php?act=p12&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("export ca cert+user cert+user cert key in .p12 format");?>">
<span class="glyphicon glyphicon-download"></span> <span class="glyphicon glyphicon-download"></span>
</a> </a>
<?php <?php
...@@ -1297,7 +1297,7 @@ $( document ).ready(function() { ...@@ -1297,7 +1297,7 @@ $( document ).ready(function() {
<?php <?php
endif; endif;
if (isset($cert['csr'])) :?> if (isset($cert['csr'])) :?>
<a href="system_certmanager.php?act=csr&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("update csr");?>"> <a href="system_certmanager.php?act=csr&amp;id=<?=$i;?>" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("update csr");?>">
<span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-edit"></span>
</a> </a>
<?php <?php
......
...@@ -662,11 +662,11 @@ $( document ).ready(function() { ...@@ -662,11 +662,11 @@ $( document ).ready(function() {
</td> </td>
<td class="text-center"> <td class="text-center">
<br /> <br />
<a href="javascript:move_selected('notgroups','groups')" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("add groups"); ?>"> <a href="javascript:move_selected('notgroups','groups')" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("Add groups"); ?>">
<span class="glyphicon glyphicon-arrow-right"></span> <span class="glyphicon glyphicon-arrow-right"></span>
</a> </a>
<br /><br /> <br /><br />
<a href="javascript:move_selected('groups','notgroups')" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("remove groups"); ?>"> <a href="javascript:move_selected('groups','notgroups')" class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("Remove groups"); ?>">
<span class="glyphicon glyphicon-arrow-left"></span> <span class="glyphicon glyphicon-arrow-left"></span>
</a> </a>
</td> </td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment