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) {
|
function bool(id) {
|
||||||
currentId = id;
|
currentId = id;
|
||||||
|
$('#On').removeClass('active');
|
||||||
|
$('#Off').removeClass('active');
|
||||||
if (lmdata(id) == 1) {
|
if (lmdata(id) == 1) {
|
||||||
$('#On').addClass('active');
|
$('#On').addClass('active');
|
||||||
} else {
|
} else {
|
||||||
@ -693,6 +695,9 @@ function bool(id) {
|
|||||||
}
|
}
|
||||||
function trool(id) {
|
function trool(id) {
|
||||||
currentId = id;
|
currentId = id;
|
||||||
|
$('#TrOn').removeClass('active');
|
||||||
|
$('#TrOff').removeClass('active');
|
||||||
|
$('#TrDefault').removeClass('active');
|
||||||
if (lmdata(id) == 1) {
|
if (lmdata(id) == 1) {
|
||||||
$('#TrOn').addClass('active');
|
$('#TrOn').addClass('active');
|
||||||
}
|
}
|
||||||
@ -1598,15 +1603,18 @@ function resizeHelp() {
|
|||||||
/* Boolean or Perl Expression */
|
/* Boolean or Perl Expression */
|
||||||
function boolOrPerlExpr(id) {
|
function boolOrPerlExpr(id) {
|
||||||
currentId = id;
|
currentId = id;
|
||||||
|
$('#bopeOn').removeClass('active');
|
||||||
|
$('#bopeOff').removeClass('active');
|
||||||
|
$('#bopeExpr').removeClass('active');
|
||||||
$('#bopeValue').val('');
|
$('#bopeValue').val('');
|
||||||
$('#bopeValue').hide();
|
$('#bopeValue').hide();
|
||||||
if (lmdata(id) == 1) {
|
if (lmdata(id) == 1) {
|
||||||
$('#bopeOn').prop('checked', true);
|
$('#bopeOn').addClass('active');
|
||||||
} else {
|
} else {
|
||||||
if (lmdata(id) == 0) {
|
if (lmdata(id) == 0) {
|
||||||
$('#bopeOff').prop('checked', true);
|
$('#bopeOff').addClass('active');
|
||||||
} else {
|
} else {
|
||||||
$('#bopeExpr').prop('checked', true);
|
$('#bopeExpr').addClass('active');
|
||||||
$('#bopeValue').val(lmdata(id));
|
$('#bopeValue').val(lmdata(id));
|
||||||
$('#bopeValue').show();
|
$('#bopeValue').show();
|
||||||
}
|
}
|
||||||
|
@ -402,17 +402,25 @@
|
|||||||
|
|
||||||
<!-- Boolean or Perl Expr -->
|
<!-- Boolean or Perl Expr -->
|
||||||
<div id="content_boolOrPerlExpr" class="hidden">
|
<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>
|
<div class="btn-group buttons" data-toggle="buttons">
|
||||||
<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>
|
<label id="bopeOn" class="btn btn-info" onclick="setlmdata(currentId,1);$('#bopeValue').hide();">
|
||||||
<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>
|
<input type="radio" name="bope" autocomplete="off" /><lang en="On" fr="Activé"/>
|
||||||
<br />
|
</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>
|
<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">
|
<button onclick="setlmbope(currentId);return false;" class="btn btn-info">
|
||||||
<i class="glyphicon glyphicon-ok"></i>
|
<i class="glyphicon glyphicon-ok"></i>
|
||||||
<lang en="Apply" fr="Appliquer" />
|
<lang en="Apply" fr="Appliquer" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="content_btext" class="hidden">
|
<div id="content_btext" class="hidden">
|
||||||
|
Loading…
Reference in New Issue
Block a user