* Finish task #58554.
This commit is contained in:
@@ -12,7 +12,7 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;}
|
||||
|
||||
#zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;}
|
||||
#zeroTaskStory > label:before {top: 7px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 5px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 7px; left: 5px;}
|
||||
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
|
||||
|
||||
.chosen-results > li.has-task,
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
$(function()
|
||||
{
|
||||
removeDitto();
|
||||
if($('th.c-name').width() < 200) $('th.c-name').width(200);
|
||||
if($('th.c-name').width() < 165) $('th.c-name').width(165);
|
||||
if(taskConsumed > 0) bootbox.alert(addChildTask);
|
||||
$('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')});
|
||||
|
||||
$('#customField').click(function()
|
||||
{
|
||||
disabledRequireFields();
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
/* Implement a custom form without feeling refresh. */
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
@@ -24,8 +24,12 @@ $(function()
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
disabledRequireFields();
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
|
||||
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
|
||||
$('.form-actions').attr('colspan', fieldCount);
|
||||
|
||||
if($('th.c-name').width() < 165) $('th.c-name').width(165);
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
@@ -33,16 +33,17 @@ function checkedShowFields(fields)
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var $field = $('#' + $(this).val());
|
||||
var $fieldBox = $('.' + $(this).val() + 'Box' );
|
||||
if(fieldList.indexOf(field) >= 0)
|
||||
{
|
||||
|
||||
$(this).attr('checked', true);
|
||||
$fieldBox.removeClass('hidden');
|
||||
$field.removeAttr('disabled');
|
||||
}
|
||||
else
|
||||
else if(!$fieldBox.hasClass('hidden'))
|
||||
{
|
||||
if(!$fieldBox.hasClass('hidden')) $fieldBox.addClass('hidden');
|
||||
$fieldBox.addClass('hidden');
|
||||
$field.attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -66,17 +67,17 @@ function checkedShowFields(fields)
|
||||
}
|
||||
|
||||
/**
|
||||
* Disabled require field.
|
||||
* Hidden require field.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function disabledRequireFields()
|
||||
function hiddenRequireFields()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
|
||||
{
|
||||
var field = ',' + $(this).val() + ',';
|
||||
var required = ',' + requiredFields + ',';
|
||||
if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled');
|
||||
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,12 +2,11 @@ $(function()
|
||||
{
|
||||
$('#customField').click(function()
|
||||
{
|
||||
disabledRequireFields();
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
$('#formSettingForm .btn-primary').click(function()
|
||||
{
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled');
|
||||
var fields = '';
|
||||
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
|
||||
{
|
||||
@@ -18,7 +17,6 @@ $(function()
|
||||
$.post(link, {'fields' : fields}, function()
|
||||
{
|
||||
checkedShowFields(fields);
|
||||
disabledRequireFields();
|
||||
$('#formSetting').parent().removeClass('open');
|
||||
});
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ $colspan = count($visibleFields) + 3;
|
||||
?>
|
||||
<?php $pri = 3;?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $i;?></td>
|
||||
<td class='text-left'><?php echo $i;?></td>
|
||||
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
|
||||
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
|
||||
<?php echo html::hidden("parent[$i]", $parent);?>
|
||||
|
||||
Reference in New Issue
Block a user