* finish task #2291.

This commit is contained in:
wangyidong
2015-09-01 16:06:47 +08:00
parent 68891fa0cf
commit 8274afc8da
2 changed files with 17 additions and 9 deletions

View File

@@ -43,8 +43,16 @@ function syncProductOrProject(obj, type)
$('#copyModule').bind('click', function(){syncModule(obj.value, viewType)});
}
function toggleCopy()
{
var $copy = $('table.copy');
if($copy.size() == 0) return false;
$copy.toggle();
}
$(document).ready(function()
{
toggleCopy();
// $("#submenucreate").modalTrigger({type: 'iframe', width: 500});
// $("#submenuedit").modalTrigger({type: 'iframe', width: 500});
});

View File

@@ -38,6 +38,9 @@
<i class='icon-sitemap'></i>
<?php $manageChild = 'manage' . ucfirst($viewType) . 'Child';?>
<?php echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
<?php if($viewType == 'story' and $allProduct):?>
<div class='panel-actions pull-right'><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm'")?></div>
<?php endif;?>
</div>
<div class='panel-body'>
<table class='table table-form'>
@@ -57,16 +60,13 @@
</td>
<td id='moduleBox'>
<?php
if($viewType == 'story')
if($viewType == 'story' and $allProduct)
{
if($allProduct)
{
echo "<table class='copy w-p100'><tr>";
echo "<td class='w-260px'>" . html::select('allProduct', $allProduct, '', "class='form-control chosen' onchange=\"syncProductOrProject(this,'product')\"") . '</td>';
echo "<td class='w-200px'>" . html::select('productModule', $productModules, '', "class='form-control chosen'") . '</td>';
echo "<td class=''>" . html::commonButton($lang->tree->syncFromProduct, "id='copyModule' onclick='syncModule($currentProduct, \"story\")'") . '</td>';
echo '</tr></table>';
}
echo "<table class='copy w-p100'><tr>";
echo "<td class='w-260px'>" . html::select('allProduct', $allProduct, '', "class='form-control chosen' onchange=\"syncProductOrProject(this,'product')\"") . '</td>';
echo "<td class='w-200px'>" . html::select('productModule', $productModules, '', "class='form-control chosen'") . '</td>';
echo "<td class=''>" . html::commonButton($lang->tree->syncFromProduct, "id='copyModule' onclick='syncModule($currentProduct, \"story\")'") . '</td>';
echo '</tr></table>';
}
$maxOrder = 0;
echo '<div id="sonModule">';