* code for task #3819.
This commit is contained in:
@@ -1,62 +1,62 @@
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog w-800px">
|
||||
<div id="importLinesModal" class="modal fade">
|
||||
<div class="modal-dialog modal-lg modal-simple load-indicator">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><i class="icon-file-text"></i> <?php echo $lang->pasteText?></h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><?php echo $lang->pasteText;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo html::textarea('pasteText', '', "class='form-control mgb-10' rows='10' placeholder='$lang->pasteTextInfo'")?>
|
||||
<?php echo html::submitButton()?>
|
||||
<?php echo html::textarea('importLines', '', "class='form-control mgb-10' rows='10' placeholder='$lang->pasteTextInfo'")?>
|
||||
</div>
|
||||
<div class="modal-footer text-left">
|
||||
<button type="button" class="btn btn-primary btn-wide" id="importLinesBtn"><?php $lang->save;?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("button[data-toggle='myModal']").click(function(){$('#myModal').modal('show')})
|
||||
$("#myModal button[type='submit']").click(function()
|
||||
$(function()
|
||||
{
|
||||
var pasteText = $('#myModal #pasteText').val();
|
||||
|
||||
$('#myModal').modal('hide')
|
||||
$('#myModal #pasteText').val('');
|
||||
|
||||
var dataList = pasteText.split("\n");
|
||||
|
||||
if(typeof(mainField) == 'undefined') mainField = 'title';
|
||||
var index = 0;
|
||||
for(i in dataList)
|
||||
$("button[data-toggle='importLinesModal']").click(function(){$('#importLinesModal').modal('show')})
|
||||
$form = $('#batchCreateForm');
|
||||
var batchForm = $form.data('zui.batchActionForm');
|
||||
|
||||
var $importLines = $('#importLines');
|
||||
$('#importLinesBtn').on('click', function()
|
||||
{
|
||||
var data = dataList[i].replace(/(^\s*)|(\s*$)/g, "");;
|
||||
|
||||
if(data.length == 0) continue;
|
||||
while(true)
|
||||
var $modal = $('#importLinesModal');
|
||||
var $dialog = $modal.find('.modal-dialog').addClass('loading');
|
||||
setTimeout(function()
|
||||
{
|
||||
var title = $('form tbody tr').eq(index).find("input[id*='" + mainField + "']");
|
||||
if($(title).size() == 0)
|
||||
var importText = $importLines.val();
|
||||
var lines = importText.split('\n');
|
||||
var $lastRow;
|
||||
$.each(lines, function(index, line)
|
||||
{
|
||||
if(index == 0) break;
|
||||
cloneTr = $('#trTemp tbody').html();
|
||||
cloneTr = cloneTr.replace(/%s/g, index);
|
||||
$('form tbody tr').eq(index - 1).after(cloneTr);
|
||||
$('form tbody tr').eq(index).find('td:first').html(index + 1);
|
||||
$('form tbody tr').eq(index - 1).find('td').each(function()
|
||||
line = $.trim(line);
|
||||
if (!line.length) return;
|
||||
if (!$lastRow) $row = $form.find('tbody>tr:first');
|
||||
else $row = $lastRow.next();
|
||||
while ($row.length && $row.find('.input-story-title').val().length)
|
||||
{
|
||||
if($(this).find('div.chosen-container').size() != 0)
|
||||
{
|
||||
$('form tbody tr').eq(index).find("td").eq($(this).index()).find('select').chosen(defaultChosenOptions);
|
||||
}
|
||||
});
|
||||
title = $('form tbody tr').eq(index).find("input[id*='" + mainField + "']");
|
||||
$('#color\\[' + index + '\\]').colorPicker();//Update color picker.
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if($(title).val() != '') continue;
|
||||
if($(title).val() == '')$(title).val(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$row = $row.next();
|
||||
}
|
||||
if (!$row || !$row.length)
|
||||
{
|
||||
$row = batchForm.createRow();
|
||||
}
|
||||
$row.find('.input-story-title').val(line);
|
||||
$lastRow = $row;
|
||||
});
|
||||
$importLines.val('');
|
||||
$dialog.removeClass('loading');
|
||||
$modal.modal('hide');
|
||||
}, 200);
|
||||
});
|
||||
|
||||
$importLines.on('scroll', function()
|
||||
{
|
||||
$importLines.css('background-position-y', -$importLines.scrollTop() + 6);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,3 @@
|
||||
$(document).ready(removeDitto());//Remove 'ditto' in first row.
|
||||
|
||||
$(document).on('click', '.chosen-with-drop', function()
|
||||
{
|
||||
var select = $(this).prev('select');
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->story->create = "提需求";
|
||||
$lang->story->batchCreate = "批量提需求";
|
||||
$lang->story->batchCreate = "批量添加";
|
||||
$lang->story->change = "变更";
|
||||
$lang->story->changed = '需求变更';
|
||||
$lang->story->review = '评审';
|
||||
|
||||
@@ -11,139 +11,122 @@
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['story']);?></span>
|
||||
<strong>
|
||||
<small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small>
|
||||
<?php echo $storyID ? $lang->story->subdivide : $lang->story->batchCreate;?>
|
||||
<?php if($product->type !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
|
||||
</strong>
|
||||
<div class='actions'>
|
||||
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story¶ms=' . helper::safe64Encode("productID=$productID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
|
||||
<?php echo html::commonButton($lang->pasteText, "data-toggle='myModal'", 'btn btn-primary')?>
|
||||
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->story->batchCreate;?></h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?>
|
||||
<?php include '../../common/view/dropdowncustomfield.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->story->create->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->story->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
?>
|
||||
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchCreateForm">
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='col-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='col-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='col-module required'><?php echo $lang->story->module;?></th>
|
||||
<th class='col-plan<?php echo zget($visibleFields, 'plan', ' hidden'); echo isset($requiredFields['plan']) ? ' required' : ''?>'><?php echo $lang->story->plan;?></th>
|
||||
<th class='col-name required has-btn'>
|
||||
<?php echo $lang->story->title;?>
|
||||
<button type='button' data-toggle="importLinesModal" class="btn btn-info"><?php echo $lang->pasteText;?></button>
|
||||
</th>
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'spec', ' hidden'); echo isset($requiredFields['spec']) ? ' required' : ''?>'><?php echo $lang->story->spec;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'source', ' hidden'); echo isset($requiredFields['source']) ? ' required' : ''?>'><?php echo $lang->story->source;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'verify', ' hidden'); echo isset($requiredFields['verify']) ? ' required' : ''?>'><?php echo $lang->story->verify;?></th>
|
||||
<th class='col-pri<?php echo zget($visibleFields, 'pri', ' hidden'); echo isset($requiredFields['pri']) ? ' required' : ''?>'><?php echo $lang->story->pri;?></th>
|
||||
<th class='col-estimate<?php echo zget($visibleFields, 'estimate', ' hidden'); echo isset($requiredFields['estimate']) ? ' required' : ''?>'><?php echo $lang->story->estimate;?></th>
|
||||
<th class='col-review<?php echo zget($visibleFields, 'review', ' hidden'); echo isset($requiredFields['review']) ? ' required' : ''?>'><?php echo $lang->story->review;?></th>
|
||||
<th class='col-keywords<?php echo zget($visibleFields, 'keywords', ' hidden'); echo isset($requiredFields['keywords']) ? ' required' : ''?>'><?php echo $lang->story->keywords;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="template">
|
||||
<td class="col-id">$idPlus</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select('branch[$id]', $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, \$id)'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select('module[$id]', $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select('plan[$id]', $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class="input-group">
|
||||
<div class="input-control has-icon-right">
|
||||
<input type="text" name="title[$id]" id="title$id" value="" class="form-control input-story-title" autocomplete="off">
|
||||
<div class="colorpicker">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
|
||||
<ul class="dropdown-menu clearfix">
|
||||
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
|
||||
</ul>
|
||||
<input type="hidden" class="colorpicker" id="color$id" name="color[$id]" value="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#title$id">
|
||||
</div>
|
||||
</div>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-link btn-icon btn-copy" data-copy-from="#title$id" data-copy-to="#spec$id" title="<?php echo $lang->story->copyTitle;?>"><i class="icon icon-arrow-right"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'><textarea name="spec[$id]" id="spec$id" rows="1" class="form-control autosize"></textarea></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select('source[$id]', $sourceList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', 'hidden')?>'><textarea name="verify[$id]" id="verify$id" rows="1" class="form-control autosize"></textarea></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select('pri[$id]', $priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', 'hidden')?>'><?php echo html::input('estimate[$id]', $estimate, "class='form-control' autocomplete='off'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select('needReview[$id]', $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input('keywords[$id]', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="<?php echo count($visibleFields) + 2?>" class="text-center">
|
||||
<?php echo html::submitButton($lang->save, '', 'btn btn-wide btn-primary') . ' ' . html::backButton('', '', "btn btn-wide");?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
?>
|
||||
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-p15'><?php echo $lang->story->module;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'plan', ' hidden')?>'><?php echo $lang->story->plan;?></th>
|
||||
<th <?php if(count($visibleFields) >= 9) echo "class='w-150px'"?>><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo $lang->story->spec;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo $lang->story->source;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'verify', ' hidden')?>'><?php echo $lang->story->verify;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->story->pri;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'estimate', ' hidden')?>'><?php echo $lang->story->estimate;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'review', ' hidden')?>'><?php echo $lang->story->review;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo $lang->story->keywords;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $i = 0; ?>
|
||||
<?php if(!empty($titles)):?>
|
||||
<?php foreach($titles as $storyTitle => $fileName):?>
|
||||
<?php $moduleID = $i == 0 ? $moduleID : 'ditto';?>
|
||||
<?php $planID = $i == 0 ? $planID : 'ditto';?>
|
||||
<?php $pri = $i == 0 ? '' : 'ditto';?>
|
||||
<?php $source = $i == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", $storyTitle, "class='form-control' autocomplete='off'") . html::hidden("uploadImage[$i]", $fileName);?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(<?php echo $i;?>)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'><?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[$i]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', 'hidden')?>'><?php echo html::textarea("verify[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[$i]", $priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', 'hidden')?>'><?php echo html::input("estimate[$i]", $estimate, "class='form-control' autocomplete='off'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select("needReview[$i]", $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php $storyTitle = '';?>
|
||||
<?php endif;?>
|
||||
<?php $nextStart = $i;?>
|
||||
<?php for($i = $nextStart; $i < $config->story->batchCreate; $i++):?>
|
||||
<?php $moduleID = $i - $nextStart == 0 ? $moduleID : 'ditto';?>
|
||||
<?php $planID = $i - $nextStart == 0 ? $planID : 'ditto';?>
|
||||
<?php $pri = $i - $nextStart == 0 ? '' : 'ditto';?>
|
||||
<?php $source = $i - $nextStart == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control chosen' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", $storyTitle, "class='form-control' autocomplete='off'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(<?php echo $i;?>)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'><?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[$i]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', 'hidden')?>'><?php echo html::textarea("verify[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[$i]", $priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', 'hidden')?>'><?php echo html::input("estimate[$i]", $estimate, "class='form-control' autocomplete='off'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', 'hidden')?>'><?php echo html::select("needReview[$i]", $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr><td colspan='<?php echo count($visibleFields) + 2?>' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<table class='hide' id='trTemp'>
|
||||
<tbody>
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branch[%s]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[%s]", '', "data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[%s\\]'");?>
|
||||
<?php echo html::input("title[%s]", $storyTitle, "class='form-control' autocomplete='off'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(%s)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo html::textarea("spec[%s]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[%s]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', ' hidden')?>'><?php echo html::textarea("verify[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[%s]", $priList, $pri, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'estimate', ' hidden')?>'><?php echo html::input("estimate[%s]", $estimate, "class='form-control autocomplete='off''");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'review', ' hidden')?>'><?php echo html::select("needReview[%s]", $lang->story->reviewList, $needReview, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control autocomplete='off''");?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
$('#batchCreateForm').batchActionForm(
|
||||
{
|
||||
colorPicker:
|
||||
{
|
||||
updateBtn: function(color, $btn)
|
||||
{
|
||||
$btn.find('.color-bar').css('background', color || '');
|
||||
}
|
||||
},
|
||||
rowCreator: function($row, index)
|
||||
{
|
||||
$row.find('select').each(function()
|
||||
{
|
||||
var $select = $(this);
|
||||
if(index == 0) $select.find("option[value='ditto']").remove();
|
||||
if(index > 0) $select.val('ditto');
|
||||
$select.chosen(defaultChosenOptions);
|
||||
setTimeout(function()
|
||||
{
|
||||
$select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50);
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/pastetext.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user