Use jTip to show parameter description
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
* Controller for Ajax requests.
|
* Controller for Ajax requests.
|
||||||
*
|
*
|
||||||
* @author Karsten Heiken <karsten@disposed.de>
|
* @author Karsten Heiken <karsten@disposed.de>
|
||||||
|
* @author Eike Foken <kontakt@eikefoken.de>
|
||||||
*/
|
*/
|
||||||
class Ajax extends CI_Controller {
|
class Ajax extends CI_Controller {
|
||||||
|
|
||||||
@@ -64,4 +65,15 @@ class Ajax extends CI_Controller {
|
|||||||
$this->parameter->sort($this->input->post('parameters'));
|
$this->parameter->sort($this->input->post('parameters'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the description of parameters.
|
||||||
|
*/
|
||||||
|
public function parameter_help($parameterId) {
|
||||||
|
$this->load->model('parameter');
|
||||||
|
$this->load->helper('typography');
|
||||||
|
|
||||||
|
$parameter = $this->parameter->getById($parameterId);
|
||||||
|
$this->output->set_output(auto_typography($parameter['description']));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -92,8 +92,20 @@
|
|||||||
foreach($parameters[$program['id']] as $param):
|
foreach($parameters[$program['id']] as $param):
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><abbr title="<?=$param['description']?>"><?=$param['readable']?></abbr></td>
|
<td><?=$param['readable'];?></td>
|
||||||
<td><input type="text" name="<?=$param['fieldname']?>" class="long text" value="<?=set_value($param['fieldname'])?>"><?=form_error($param['fieldname'])?></td>
|
<td>
|
||||||
|
<input type="text" name="<?=$param['name']?>" class="long text" value="<?=set_value($param['name'])?>" />
|
||||||
|
<?php
|
||||||
|
if ($param['description'] != ''):
|
||||||
|
?>
|
||||||
|
<span class="form_info">
|
||||||
|
<a href="<?=site_url('ajax/parameter_help/' . $param['id']);?>" name="<?=_('Description');?>" id="<?=$param['id'];?>" class="jTip"> </a>
|
||||||
|
</span>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<?=form_error($param['name'])?>
|
||||||
|
</td>
|
||||||
<td><?=$param['unit']?></td>
|
<td><?=$param['unit']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
@@ -107,7 +119,7 @@
|
|||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<a class="button save-big big" href="#" onclick="document.forms.newtrial.submit();return false"><?= _('Save') ?></a>
|
<a class="button save-big big" href="#" onclick="document.forms.newtrial.submit();"><?= _('Save') ?></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -563,18 +563,8 @@ html ul.tabs li.active a:hover {
|
|||||||
.form_info a,
|
.form_info a,
|
||||||
.form_info a:active,
|
.form_info a:active,
|
||||||
.form_info a:visited {
|
.form_info a:visited {
|
||||||
background-color: #d2d2d2;
|
background: url(../images/icons/question.png) center center no-repeat;
|
||||||
font-size: 12px;
|
padding: 4px 8px;
|
||||||
font-weight: bold;
|
|
||||||
margin-left: -3px;
|
|
||||||
padding: 4px;
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form_info a:hover {
|
|
||||||
color: #000;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#JT_arrow_left {
|
#JT_arrow_left {
|
||||||
@@ -602,7 +592,7 @@ html ul.tabs li.active a:hover {
|
|||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
font-size: 85%;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#JT_copy {
|
#JT_copy {
|
||||||
@@ -637,7 +627,8 @@ html ul.tabs li.active a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#JT_copy p {
|
#JT_copy p {
|
||||||
margin: 3px 0;
|
margin: 0;
|
||||||
|
line-height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#JT_copy img {
|
#JT_copy img {
|
||||||
|
|||||||
Reference in New Issue
Block a user