diff --git a/apps/maarch_entreprise/actions/index_mlb.php b/apps/maarch_entreprise/actions/index_mlb.php index 081779b8ce0f9d35f79c8c30a3e07f5939ac290b..0e8b9422b552ea2abbb7d288e3a605ed01231fff 100644 --- a/apps/maarch_entreprise/actions/index_mlb.php +++ b/apps/maarch_entreprise/actions/index_mlb.php @@ -330,7 +330,7 @@ function get_form_txt($values, $pathManageAction, $actionId, $table, $module, $ . 'index.php?display=true&page=get_content_js\');change_category_actions(\'' . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=indexing_searching&page=change_category_actions' - . '&resId=' . $resId . '&collId=' . $collId . '\');'.$hideSelectFile.'">'; + . '&resId=' . $resId . '&collId=' . $collId . '\',\'none\',\''.$collId.'\',this.options[this.selectedIndex].value);'.$hideSelectFile.'">'; $frmStr .= '<option value="">' . _CHOOSE_CATEGORY . '</option>'; foreach (array_keys($_SESSION['coll_categories']['letterbox_coll']) as $catId) { if ($catId <> 'default_category') { @@ -947,7 +947,7 @@ function get_form_txt($values, $pathManageAction, $actionId, $table, $module, $ . 'index.php?display=true&page=get_content_js\');change_category_actions(\'' . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=indexing_searching&page=change_category_actions' - . '&resId=' . $resId . '&collId=' . $collId . '\');' + . '&resId=' . $resId . '&collId=' . $collId . '\',\'none\',\''.$collId.'\',document.getElementById(\'category_id\').options[document.getElementById(\'category_id\').selectedIndex].value);' . 'launch_autocompleter_contacts_v2(\'' . $_SESSION['config']['businessappurl'] . 'index.php?display=true' . '&dir=indexing_searching&page=autocomplete_contacts\', \'contact\', \'show_contacts\', \'\', \'contactid\', \'addressid\');'; diff --git a/apps/maarch_entreprise/actions/process.php b/apps/maarch_entreprise/actions/process.php index e3dfcafc45ba07a06bd839137a3d6eb218318862..d24ffe2b1fa0f43d019abfa46e098a22367d61bf 100644 --- a/apps/maarch_entreprise/actions/process.php +++ b/apps/maarch_entreprise/actions/process.php @@ -462,27 +462,25 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module //ACTIONS $frm_str .= '<hr class="hr_process"/>'; $frm_str .= '<p align="center" style="width:90%;">'; - $frm_str .= '<b>'._ACTIONS.' : </b>'; - $actions = $b->get_actions_from_current_basket($res_id, $coll_id, 'PAGE_USE'); - if (count($actions) > 0) { - $frm_str .='<select name="chosen_action" id="chosen_action">'; - $frm_str .='<option value="">'._CHOOSE_ACTION.'</option>'; - for ($ind_act = 0;$ind_act<count($actions);$ind_act++) { - $frm_str .='<option value="'.functions::xssafe($actions[$ind_act]['VALUE']).'"'; - if ($ind_act==0) { - $frm_str .= 'selected="selected"'; - } - $frm_str .= '>'.functions::xssafe($actions[$ind_act]['LABEL']).'</option>'; - } - $frm_str .='</select><br>'; - $frm_str .= '<input type="button" name="send" id="send" value="' - . _VALIDATE - . '" class="button" onclick="new Ajax.Request(\'' - . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=actions&page=docLocker\',{ method:\'post\', parameters: {\'AJAX_CALL\': true, \'unlock\': true, \'res_id\': ' . $res_id . '} });valid_action_form(\'process\', \'' - . $path_manage_action . '\', \'' . $id_action.'\', \'' - . $res_id . '\', \'' . $table . '\', \'' . $module . '\', \'' - . $coll_id . '\', \'' . $mode . '\');"/> '; - } + + //GET ACTION LIST BY AJAX REQUEST + $frm_str .= '<span id="actionSpan"></span>'; + $frm_str .= '<script>'; + $frm_str .= 'change_category_actions(\'' + . $_SESSION['config']['businessappurl'] + . 'index.php?display=true&dir=indexing_searching&page=change_category_actions' + . '&resId=' . $res_id . '&collId=' . $coll_id . '\',\'' . $res_id . '\',\'' . $coll_id . '\',\''.$data['category_id']['value'].'\');'; + $frm_str .= '</script>'; + // + + $frm_str .= '<input type="button" name="send" id="send" value="' + . _VALIDATE + . '" class="button" onclick="new Ajax.Request(\'' + . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=actions&page=docLocker\',{ method:\'post\', parameters: {\'AJAX_CALL\': true, \'unlock\': true, \'res_id\': ' . $res_id . '} });valid_action_form(\'process\', \'' + . $path_manage_action . '\', \'' . $id_action.'\', \'' + . $res_id . '\', \'' . $table . '\', \'' . $module . '\', \'' + . $coll_id . '\', \'' . $mode . '\');"/> '; + $frm_str .= '<input name="close" id="close" type="button" value="' . _CANCEL . '" class="button" onclick="new Ajax.Request(\'' . $_SESSION['config']['businessappurl'] diff --git a/apps/maarch_entreprise/actions/validate_mail.php b/apps/maarch_entreprise/actions/validate_mail.php index 9e70b0e8c5269c28d2a6f49a8ab39a460ce43f8b..4870d01384440c9580ca2c6ea48a3f023b472d08 100644 --- a/apps/maarch_entreprise/actions/validate_mail.php +++ b/apps/maarch_entreprise/actions/validate_mail.php @@ -342,7 +342,7 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module . $_SESSION['config']['businessappurl'].'index.php?display=true&page=get_content_js\');change_category_actions(\'' . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=indexing_searching&page=change_category_actions' - . '&resId=' . $res_id . '&collId=' . $coll_id . '\');">'; + . '&resId=' . $res_id . '&collId=' . $coll_id . '\',\''.$res_id.'\',\''.$coll_id.'\',this.options[this.selectedIndex].value);">'; $frm_str .='<option value="">'._CHOOSE_CATEGORY.'</option>'; foreach (array_keys($_SESSION['coll_categories']['letterbox_coll']) as $cat_id) { if ($cat_id <> 'default_category') { @@ -1162,7 +1162,7 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module $frm_str .='var type_id = $(\'type_id\');change_category_actions(\'' . $_SESSION['config']['businessappurl'] . 'index.php?display=true&dir=indexing_searching&page=change_category_actions' - . '&resId=' . $res_id . '&collId=' . $coll_id . '\');'; + . '&resId=' . $res_id . '&collId=' . $coll_id . '\',\''.$res_id.'\',\''.$coll_id.'\',document.getElementById(\'category_id\').options[document.getElementById(\'category_id\').selectedIndex].value);'; $frm_str .='if(type_id){change_doctype(type_id.options[type_id.selectedIndex].value, \''.$_SESSION['config']['businessappurl'].'index.php?display=true&dir=indexing_searching&page=change_doctype\', \''._ERROR_DOCTYPE.'\', \''.$id_action.'\', \''.$_SESSION['config']['businessappurl'].'index.php?display=true&page=get_content_js\' , \''.$display_value.'\', '.$res_id.', \''. $coll_id.'\', true);}'; if($data['process_limit_date'] == null){ diff --git a/apps/maarch_entreprise/js/indexing.js b/apps/maarch_entreprise/js/indexing.js index 3f0b6a03aa12925118b20ef8fdd5ec58ccdcd4dd..a067240b5a6443142ac514ba4207fac1f2eddaae 100644 --- a/apps/maarch_entreprise/js/indexing.js +++ b/apps/maarch_entreprise/js/indexing.js @@ -1630,15 +1630,15 @@ function update_contact_type_session(path) }); } -function change_category_actions(path_manage_script, resId, collId) -{ - var category_id = $('category_id'); - if(category_id.value != '') { +function change_category_actions(path_manage_script, resId, collId,category_id) +{ + + if(category_id != '') { if (resId === undefined && collId === undefined) { new Ajax.Request(path_manage_script, { method:'post', - parameters: { category_id : category_id.value + parameters: { category_id : category_id }, onSuccess: function(answer){ eval("response = "+answer.responseText); @@ -1660,7 +1660,7 @@ function change_category_actions(path_manage_script, resId, collId) new Ajax.Request(path_manage_script, { method:'post', - parameters: { category_id : category_id.value, resId : resId, collId : collId + parameters: { category_id : category_id, resId : resId, collId : collId }, onSuccess: function(answer){ eval("response = "+answer.responseText);