* Modified the format of the code.

This commit is contained in:
hufangzhou
2020-10-12 10:37:05 +08:00
parent 2aad5c9653
commit 90cfaad761
+3 -3
View File
@@ -239,11 +239,11 @@ $(function()
e.preventDefault();
});
/*Assign value to the manage products by the different request type.*/
/* Assign value to the manage products by the different request type.*/
if(window.config.currentMethod === 'create')
{
var url = window.location.href;
if(window.config.requestType == 'GET')
if(window.config.requestType === 'GET')
{
var paramStr = url.split('?')[1];
var paramArr = paramStr.split('&');
@@ -256,7 +256,7 @@ $(function()
var paramArr = paramStr.split('-');
var productID = paramArr[2] ? paramArr[2].split('.')[0] : 0;
}
var product = $('#productsBox .input-group:last select:first');
var product = $('#products0');
$(product).val(productID);
$(product).trigger("chosen:updated");
loadBranches($(product));