Skip to content
Snippets Groups Projects
Commit 959bb05e authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #5959 conserver retour chariot lorsqu'on écrit une note en redirigeant

parent d2b0acaf
No related branches found
No related tags found
No related merge requests found
......@@ -176,7 +176,6 @@ function change_diff_list(
category,
specific_role
) {
console.log('test change_diff_list');
if(category === undefined){
category = '';
......@@ -200,10 +199,8 @@ function change_diff_list(
},
onSuccess: function(answer){
eval("response = "+answer.responseText);
//alert(answer.responseText);
if(response.status == 0 )
{
//alert(window.opener.document);
var diff_list_tr = window.opener.$(list_tr);
var diff_list_div = window.opener.$(list_div);
var diff_list_div_from_action = window.opener.$(list_div_from_action);
......@@ -252,8 +249,6 @@ function isIdToken(value)
}
function validate_difflist_type() {
console.log('test validate_difflist_type');
var main_error = $('main_error');
main_error.innerHTML = '';
......@@ -303,7 +298,6 @@ function validate_difflist_type() {
}
function saveListDiff(mode, table, collId, resId, userId, concatList, onlyCC) {
new Ajax.Request(
'index.php?display=true&module=entities&page=save_list_diff',
......@@ -333,4 +327,9 @@ function saveListDiff(mode, table, collId, resId, userId, concatList, onlyCC) {
}
}
);
}
\ No newline at end of file
}
function setNoteRedirect(){
$j('#note_content_to_dep').val($j('#notes').val().replace(/\n/g, "___"));
$j('#note_content_to_user').val($j('#notes').val().replace(/\n/g, "___"));
}
......@@ -137,7 +137,7 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
}
$frm_str .= '</select><br />';
$frm_str .= '<textarea style="width:98%;height:60px;resize:none;" name="notes" id="notes" onblur="document.getElementById(\'note_content_to_dep\').value=document.getElementById(\'notes\').value;document.getElementById(\'note_content_to_user\').value=document.getElementById(\'notes\').value;"></textarea>';
$frm_str .= '<textarea style="width:98%;height:60px;resize:none;" name="notes" id="notes" onblur="setNoteRedirect()"></textarea>';
//var_dump($allEntitiesTree);
$frm_str .= '<hr />';
$frm_str .='<div id="form2" style="border:none;">';
......@@ -363,7 +363,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
$content_note = $formValues['note_content_to_user'];
$content_note = str_replace(";", ".", $content_note);
$content_note = str_replace("--", "-", $content_note);
$content_note = $content_note;
$content_note = str_replace("___", "\n", $content_note);
$stmt = $db->query(
"INSERT INTO notes (identifier, tablename, user_id, "
......@@ -391,7 +391,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
$content_note = $formValues['note_content_to_dep'];
$content_note = str_replace(";", ".", $content_note);
$content_note = str_replace("--", "-", $content_note);
$content_note = $content_note;
$content_note = str_replace("___", "\n", $content_note);
$stmt = $db->query(
"INSERT INTO notes (identifier, tablename, user_id, "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment