switch product fix
This commit is contained in:
@@ -383,6 +383,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
|
||||
<?php js::set('storyModule', $lang->story->module);?>
|
||||
<?php js::set('storyPlan', $lang->story->plan);?>
|
||||
<?php js::set('storyType', $type);?>
|
||||
<?php js::set('originProductType', !empty($branches) ? 'normal' : 'branch');?>
|
||||
<script>
|
||||
$(function(){parent.$('body.hide-modal-close').removeClass('hide-modal-close');})
|
||||
|
||||
|
||||
@@ -98,8 +98,14 @@ function loadProductBranches(productID)
|
||||
{
|
||||
if(storyType == 'story')
|
||||
{
|
||||
$('.switchBranch').toggleClass('hidden');
|
||||
$('.switchBranch').toggleClass('disable');
|
||||
var newProductType = data ? 'normal' : 'branch';
|
||||
if(originProductType != newProductType)
|
||||
{
|
||||
$('.switchBranch').toggleClass('hidden');
|
||||
$('.switchBranch').toggleClass('disable');
|
||||
}
|
||||
originProductType = newProductType;
|
||||
|
||||
$('tr[class^="addBranchesBox"]').remove();
|
||||
|
||||
if(data)
|
||||
@@ -119,7 +125,7 @@ function loadProductBranches(productID)
|
||||
$('#branches0').next('.picker').remove();
|
||||
$('#branches0').chosen();
|
||||
|
||||
$.get(createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=0' + '&rootModuleID=0&returnType=html&fieldID=0' + '&needManage=true&extra=¤tModuleID=0'), function(moduleData)
|
||||
$.get(createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=story&branch=0' + '&rootModuleID=0&returnType=html&fieldID=0' + '&needManage=false&extra=¤tModuleID=0'), function(moduleData)
|
||||
{
|
||||
if(moduleData)
|
||||
{
|
||||
@@ -131,7 +137,7 @@ function loadProductBranches(productID)
|
||||
});
|
||||
|
||||
var expired = config.currentMethod == 'create' ? 'unexpired' : '';
|
||||
$.get(createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=0' + '&planID=' + $('#plan').val() + '&fieldID=0' + '&needCreate=true&expired='+ expired +'¶m=skipParent,' + config.currentMethod), function(planData)
|
||||
$.get(createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=0' + '&planID=' + $('#plan').val() + '&fieldID=0' + '&needCreate=false&expired='+ expired +'¶m=skipParent,' + config.currentMethod), function(planData)
|
||||
{
|
||||
if(planData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user