* [task#130105,doing,0.2h] add load product func.

This commit is contained in:
sunguangming
2024-10-15 08:52:02 +08:00
committed by 王怡栋
parent b82cc76525
commit d3be5077d4
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -64,3 +64,13 @@ window.readScriptContent = function(object)
reader.readAsText(object.file, 'UTF-8');
reader.onload = function(evt){$('[name=script]').val(evt.target.result);}
}
window.loadProduct = function(e)
{
const $this = $(e.target);
const productID = $this.val();
const $modal = $this.closest('.modal');
const inModal = $modal.length > 0;
if(inModal) loadModal($.createLink('testcase', 'create', 'productID=' + productID + '&' + createParams), $modal.attr('id'));
if(!inModal) loadPage($.createLink('testcase', 'create', 'productID=' + productID + '&' + createParams));
};
+4
View File
@@ -13,6 +13,9 @@ namespace zin;
include($this->app->getModuleRoot() . 'ai/ui/inputinject.html.php');
$params = $app->getParams();
array_shift($params);
jsVar('createParams', http_build_query($params));
jsVar('tab', $this->app->tab);
if($app->tab == 'execution') jsVar('objectID', $executionID);
if($app->tab == 'project') jsVar('objectID', $projectID);
@@ -34,5 +37,6 @@ formGridPanel
set::loadUrl(helper::createLink('testcase', 'create', "productID={product}&branch={branch}&moduleID={module}")),
!empty($gobackLink) ? set::backUrl($gobackLink) : null,
on::change('#story', 'changeStory'),
on::change('[name=product]', 'loadProduct'),
on::click('#auto', 'checkScript'),
);