* fix bug 28215
This commit is contained in:
@@ -2,24 +2,5 @@ $(function()
|
||||
{
|
||||
var heightType = $("[name='heightType']:checked").val();
|
||||
setCardCount(heightType);
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('onkeyup', 'value=value.match(/^\\d+$/) ? value : ""');
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('maxlength', '3');
|
||||
var fluidBoard = $("#mainContent input[name='fluidBoard'][checked='checked']").val() || 0;
|
||||
$('#colWidth').attr('disabled', fluidBoard == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', fluidBoard == 0);
|
||||
$(document).on('change', "#mainContent input[name='fluidBoard']", function(e)
|
||||
{
|
||||
$('#colWidth').attr('disabled', e.target.value == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', e.target.value == 0);
|
||||
if(e.target.value == 0 && $('#minColWidthLabel, #maxColWidthLabel'))
|
||||
{
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
}
|
||||
else if(e.target.value == 1 && $('#colWidthLabel'))
|
||||
{
|
||||
$('#colWidthLabel').remove();
|
||||
$('#colWidth').removeClass('has-error');
|
||||
}
|
||||
})
|
||||
handleKanbanWidthAttr();
|
||||
});
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-col">
|
||||
<div class="width-radio-row">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', !empty($execution->colWidth) ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', !empty($execution->colWidth) ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div class="radio-col mt10">
|
||||
<div class="width-radio-row mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', !empty($execution->minColWidth) ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', !empty($execution->minColWidth) ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', !empty($execution->maxColWidth) ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', !empty($execution->maxColWidth) ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -49,26 +49,7 @@ $(function()
|
||||
{
|
||||
setCopyKanban($(this).data('id')); $('#copyKanbanModal').modal('hide');
|
||||
});
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('onkeyup', 'value=value.match(/^\\d+$/) ? value : ""');
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('maxlength', '3');
|
||||
var fluidBoard = $("#mainContent input[name='fluidBoard'][checked='checked']").val() || 0;
|
||||
$('#colWidth').attr('disabled', fluidBoard == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', fluidBoard == 0);
|
||||
$(document).on('change', "#mainContent input[name='fluidBoard']", function(e)
|
||||
{
|
||||
$('#colWidth').attr('disabled', e.target.value == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', e.target.value == 0);
|
||||
if(e.target.value == 0 && $('#minColWidthLabel, #maxColWidthLabel'))
|
||||
{
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
}
|
||||
else if(e.target.value == 1 && $('#colWidthLabel'))
|
||||
{
|
||||
$('#colWidthLabel').remove();
|
||||
$('#colWidth').removeClass('has-error');
|
||||
}
|
||||
})
|
||||
handleKanbanWidthAttr();
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,26 +39,7 @@ $(function()
|
||||
return false;
|
||||
}
|
||||
})
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('onkeyup', 'value=value.match(/^\\d+$/) ? value : ""');
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('maxlength', '3');
|
||||
var fluidBoard = $("#mainContent input[name='fluidBoard'][checked='checked']").val() || 0;
|
||||
$('#colWidth').attr('disabled', fluidBoard == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', fluidBoard == 0);
|
||||
$(document).on('change', "#mainContent input[name='fluidBoard']", function(e)
|
||||
{
|
||||
$('#colWidth').attr('disabled', e.target.value == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', e.target.value == 0);
|
||||
if(e.target.value == 0 && $('#minColWidthLabel, #maxColWidthLabel'))
|
||||
{
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
}
|
||||
else if(e.target.value == 1 && $('#colWidthLabel'))
|
||||
{
|
||||
$('#colWidthLabel').remove();
|
||||
$('#colWidth').removeClass('has-error');
|
||||
}
|
||||
})
|
||||
handleKanbanWidthAttr();
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,15 +67,15 @@
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-col">
|
||||
<div class="width-radio-row">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
|
||||
<?php echo html::input('colWidth', !empty($copyKanban->colWidth) ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', !empty($copyKanban->colWidth) ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div class="radio-col mt10">
|
||||
<div class="width-radio-row mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
|
||||
<?php echo html::input('minColWidth', !empty($copyKanban->minColWidth) ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', !empty($copyKanban->minColWidth) ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', !empty($copyKanban->maxColWidth) ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', !empty($copyKanban->maxColWidth) ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div class="radio-col">
|
||||
<div class="width-radio-row">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', !empty($kanban->colWidth) ? $kanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', !empty($kanban->colWidth) ? $kanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div class="radio-col mt10">
|
||||
<div class="width-radio-row mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', !empty($kanban->minColWidth) ? $kanban->minColWidth : $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', !empty($kanban->minColWidth) ? $kanban->minColWidth : $this->config->minColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', !empty($kanban->maxColWidth) ? $kanban->maxColWidth : $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', !empty($kanban->maxColWidth) ? $kanban->maxColWidth : $this->config->maxColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1329,3 +1329,33 @@ function refreshBudgetUnit(data)
|
||||
$('#future').prop('checked', false);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKanbanWidthAttr ()
|
||||
{
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('onkeyup', 'value=value.match(/^\\d+$/) ? value : ""');
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('maxlength', '3');
|
||||
var fluidBoard = $("#mainContent input[name='fluidBoard'][checked='checked']").val() || 0;
|
||||
var addAttrEle = fluidBoard == 0 ? '#colWidth' : '#minColWidth, #maxColWidth';
|
||||
$(addAttrEle).closest('.width-radio-row').addClass('required');
|
||||
$('#colWidth').attr('disabled',fluidBoard == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled',fluidBoard == 0);
|
||||
$(document).on('change', "#mainContent input[name='fluidBoard']", function(e)
|
||||
{
|
||||
$('#colWidth').attr('disabled', e.target.value == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled', e.target.value == 0);
|
||||
if(e.target.value == 0 && $('#minColWidthLabel, #maxColWidthLabel'))
|
||||
{
|
||||
$('#colWidth').closest('.width-radio-row').addClass('required');
|
||||
$('#minColWidth, #maxColWidth').closest('.width-radio-row').removeClass('required');
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
}
|
||||
else if(e.target.value == 1 && $('#colWidthLabel'))
|
||||
{
|
||||
$('#minColWidth, #maxColWidth').closest('.width-radio-row').addClass('required');
|
||||
$('#colWidth').closest('.width-radio-row').removeClass('required');
|
||||
$('#colWidthLabel').remove();
|
||||
$('#colWidth').removeClass('has-error');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -122,7 +122,8 @@ body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-p
|
||||
.input-divider {margin: 0 4px;}
|
||||
.setting-input {width: 64px; height: 20px; margin: 0 4px; text-align: center;}
|
||||
.setting-input.disabled,.setting-input[disabled="disabled"] {color: #C4C4C4;}
|
||||
.radio-col {display: flex;}
|
||||
.width-radio-row {display: flex;}
|
||||
#dataform .width-radio-row.required:after {top: 1px; left: 360px;}
|
||||
.mt10 {margin-top: 10px;}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user