diff --git a/module/doc/js/common.js b/module/doc/js/common.js index 0f9b60583d..5b6fb6e1ed 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -343,25 +343,35 @@ function locateNewLib(type, objectID, libID) */ function setSavePath() { + var getSubPath = function($obj) + { + var $td = $obj.parent(); + var usePicker = $td.find('.picker').length == 1; + var subPath = $obj.find('option:checked').text(); + if(usePicker) subPath = $td.find('.picker .picker-selection-text').text(); + return subPath; + } + savePath = defaultSave; if($('#modalBasicInfo #product').length == 1) { - savePath += $('#modalBasicInfo #product option:checked').text() + '/'; + savePath += getSubPath($('#modalBasicInfo #product')) + '/'; } else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 0) { - savePath += $('#modalBasicInfo #project option:checked').text() + '/'; + savePath += getSubPath($('#modalBasicInfo #project')) + '/'; } else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 1) { - if($('#modalBasicInfo #execution').val() == '') savePath += $('#modalBasicInfo #project option:checked').text() + '/'; - if($('#modalBasicInfo #execution').val() != '') savePath += $('#modalBasicInfo #execution option:checked').text() + '/'; + var executionID = $('#modalBasicInfo #execution').val(); + if(executionID == '0' || executionID == '') savePath += getSubPath($('#modalBasicInfo #project')) + '/'; + if(executionID != '0' && executionID != '') savePath += getSubPath($('#modalBasicInfo #execution')) + '/'; } else if($('#modalBasicInfo #execution').length == 1) { - savePath += $('#modalBasicInfo #execution option:checked').text() + '/'; + savePath += getSubPath($('#modalBasicInfo #execution')) + '/'; } - savePath += $('#modalBasicInfo #module option:checked').text(); + savePath += getSubPath($('#modalBasicInfo #module')); $('#savePath').html(savePath).attr('title', savePath); } diff --git a/module/doc/view/createtexttype.html.php b/module/doc/view/createtexttype.html.php index 29fef3b581..079f223b97 100644 --- a/module/doc/view/createtexttype.html.php +++ b/module/doc/view/createtexttype.html.php @@ -68,7 +68,7 @@ doc->project;?> - project : $objectID, "class='form-control chosen' onchange=loadExecutions(this.value)");?> + project : $objectID, "class='form-control picker-select' onchange=loadExecutions(this.value)");?> app->tab == 'doc'):?> doc->execution?> doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?> @@ -77,17 +77,17 @@ doc->execution;?> - + doc->product;?> - + doc->libAndModule?> - + doc->keywords;?> diff --git a/module/doc/view/edittexttype.html.php b/module/doc/view/edittexttype.html.php index fe019995e1..272ce6ca7a 100644 --- a/module/doc/view/edittexttype.html.php +++ b/module/doc/view/edittexttype.html.php @@ -70,12 +70,12 @@ doc->project;?> - + doc->libAndModule?> - lib . '_' . $doc->module, "class='form-control chosen'");?> + lib . '_' . $doc->module, "class='form-control picker-select'");?> doc->keywords;?>