* [task#130105,doing,0.2h] add load product func.
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
@@ -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'),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user