Bootstrap for bool, trool and boolOrExpr (#776)
This commit is contained in:
parent
8668e6ac9f
commit
d0f288fc9e
|
@ -684,6 +684,8 @@ function btext(id) {
|
|||
}
|
||||
function bool(id) {
|
||||
currentId = id;
|
||||
$('#On').removeClass('active');
|
||||
$('#Off').removeClass('active');
|
||||
if (lmdata(id) == 1) {
|
||||
$('#On').addClass('active');
|
||||
} else {
|
||||
|
@ -693,6 +695,9 @@ function bool(id) {
|
|||
}
|
||||
function trool(id) {
|
||||
currentId = id;
|
||||
$('#TrOn').removeClass('active');
|
||||
$('#TrOff').removeClass('active');
|
||||
$('#TrDefault').removeClass('active');
|
||||
if (lmdata(id) == 1) {
|
||||
$('#TrOn').addClass('active');
|
||||
}
|
||||
|
@ -1598,15 +1603,18 @@ function resizeHelp() {
|
|||
/* Boolean or Perl Expression */
|
||||
function boolOrPerlExpr(id) {
|
||||
currentId = id;
|
||||
$('#bopeOn').removeClass('active');
|
||||
$('#bopeOff').removeClass('active');
|
||||
$('#bopeExpr').removeClass('active');
|
||||
$('#bopeValue').val('');
|
||||
$('#bopeValue').hide();
|
||||
if (lmdata(id) == 1) {
|
||||
$('#bopeOn').prop('checked', true);
|
||||
$('#bopeOn').addClass('active');
|
||||
} else {
|
||||
if (lmdata(id) == 0) {
|
||||
$('#bopeOff').prop('checked', true);
|
||||
$('#bopeOff').addClass('active');
|
||||
} else {
|
||||
$('#bopeExpr').prop('checked', true);
|
||||
$('#bopeExpr').addClass('active');
|
||||
$('#bopeValue').val(lmdata(id));
|
||||
$('#bopeValue').show();
|
||||
}
|
||||
|
|
|
@ -402,16 +402,24 @@
|
|||
|
||||
<!-- Boolean or Perl Expr -->
|
||||
<div id="content_boolOrPerlExpr" class="hidden">
|
||||
<input id="bopeOn" type="radio" name="bope" value="1" onclick="setlmdata(currentId,1);$('#bopeValue').hide();"/><label for="bopeOn"><lang en="On" fr="Activé"/></label>
|
||||
<input id="bopeOff" type="radio" name="bope" value="0" onclick="setlmdata(currentId,0);$('#bopeValue').hide();"/><label for="bopeOff"><lang en="Off" fr="Désactivé"/></label>
|
||||
<input id="bopeExpr" type="radio" name="bope" value="-1" onclick="$('#bopeValue').show();"/><label for="bopeExpr"><lang en="Specific rule" fr="Règle spécifique"/></label>
|
||||
<br />
|
||||
<div class="btn-group buttons" data-toggle="buttons">
|
||||
<label id="bopeOn" class="btn btn-info" onclick="setlmdata(currentId,1);$('#bopeValue').hide();">
|
||||
<input type="radio" name="bope" autocomplete="off" /><lang en="On" fr="Activé"/>
|
||||
</label>
|
||||
<label id="bopeOff" class="btn btn-info" onclick="setlmdata(currentId,0);$('#bopeValue').hide();">
|
||||
<input type="radio" name="bope" autocomplete="off" /><lang en="Off" fr="Désactivé"/>
|
||||
</label>
|
||||
<label id="bopeExpr" class="btn btn-info" onclick="$('#bopeValue').show();">
|
||||
<input type="radio" name="bope" autocomplete="off" /><lang en="Specific rule" fr="Règle spécifique"/>
|
||||
</label>
|
||||
</div>
|
||||
<textarea id="bopeValue" cols="30" rows="2" class="form-control"></textarea>
|
||||
<br />
|
||||
<div class="buttons text-center">
|
||||
<button onclick="setlmbope(currentId);return false;" class="btn btn-info">
|
||||
<i class="glyphicon glyphicon-ok"></i>
|
||||
<lang en="Apply" fr="Appliquer" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user