diff --git a/module/doc/control.php b/module/doc/control.php index 106f9f8ccf..1a9218b5b0 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -803,6 +803,8 @@ class doc extends control */ public function ajaxGetModules($objectType, $objectID, $docType = 'doc') { + if(empty($objectID)) return print(html::select('module', array(), '', "class='form-control'")); + if($docType == 'doc') { $unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : ''; diff --git a/module/doc/js/common.js b/module/doc/js/common.js index 6ccf395459..0f9b60583d 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -10,6 +10,7 @@ function loadObjectModules(objectType, objectID, docType) { if(typeof docType == 'undefined') docType = 'doc'; var link = createLink('doc', 'ajaxGetModules', 'objectType=' + objectType + '&objectID=' + objectID + '&type=' + docType); + if(objectType == 'execution' && objectID == 0) var link = createLink('doc', 'ajaxGetModules', 'objectType=project&objectID=' + $('#project').val() + '&type=' + docType); $('#moduleBox').load(link, function(){$('#moduleBox').find('select').picker(); $('#moduleLabel').remove();}); } diff --git a/module/doc/view/selectlibtype.html.php b/module/doc/view/selectlibtype.html.php index fdbd6539f9..2908cc27f8 100644 --- a/module/doc/view/selectlibtype.html.php +++ b/module/doc/view/selectlibtype.html.php @@ -100,6 +100,11 @@ function changeApiType() if(apiType == 'project') $('#project').change(); if(apiType == 'product') $('#product').change(); if(apiType == 'nolink') loadDocLibs('api', 'api'); + if(apiType == '') + { + $('#moduleBox').html(""); + $('#moduleBox #module').picker(); + } } /**