Fix Bug chrome : cannot save operation details
This commit is contained in:
parent
14304f9830
commit
c18d75719b
6 changed files with 27 additions and 17 deletions
|
|
@ -1297,14 +1297,12 @@ function search_letter(obj) {
|
|||
*/
|
||||
function op_save(obj) {
|
||||
try {
|
||||
var queryString = id$(obj).serialize(true);
|
||||
queryString ["gDossier"] = obj.gDossier.value;
|
||||
var rapt2 = "rapt" + obj.whatdiv.value;
|
||||
queryString ["rapt"] = id$(rapt2).value;
|
||||
queryString ["jr_id"] = obj.jr_id.value;
|
||||
var jr_id = obj.jr_id.value;
|
||||
queryString ["div"] = obj.whatdiv.value;
|
||||
var divid = obj.whatdiv.value;
|
||||
var queryString = Form.serialize(obj,true);
|
||||
var divid = queryString['whatdiv'];
|
||||
queryString["div"] = queryString['whatdiv'];
|
||||
queryString["rapt"] = id$("rapt"+divid).value;
|
||||
var jr_id = queryString['jr_id'];
|
||||
|
||||
queryString ["act"] = "save";
|
||||
queryString ["op"] = "ledger";
|
||||
queryString ["jr_note"]=encodeURI(tinyMCE.get("jrn_note"+divid).getContent());
|
||||
|
|
@ -1346,7 +1344,7 @@ function op_save(obj) {
|
|||
}
|
||||
new Ajax.Request('ajax_misc.php', {
|
||||
parameters: {
|
||||
'gDossier': obj.gDossier.value,
|
||||
'gDossier': queryString ["gDossier"],
|
||||
'act': 'de',
|
||||
'op': 'ledger',
|
||||
'jr_id': jr_id,
|
||||
|
|
@ -1359,7 +1357,7 @@ function op_save(obj) {
|
|||
id$(divid).innerHTML = unescape(getNodeText(html[0]));
|
||||
id$(divid).innerHTML.evalScripts();
|
||||
remove_waiting_box();
|
||||
noalyss.refresh_note(jr_id,obj.gDossier.value);
|
||||
noalyss.refresh_note(jr_id,queryString ["gDossier"]);
|
||||
} catch (e) {
|
||||
console.error("D1. op_save")
|
||||
alert_box("1038" + e.message)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,15 @@ if ( ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_
|
|||
$action= NOALYSS_URL."/do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ag_id"=>$ag_id,"ac"=>$menu->get('code_follow'),"sa"=>"detail"));
|
||||
$code='ok';
|
||||
?>
|
||||
<ul class="aligned-block">
|
||||
<li>
|
||||
|
||||
<a href="<?php echo $action?>" target="_blank" class="smallbutton"><?php echo _("Modifier")?> </a>
|
||||
</li>
|
||||
<li>
|
||||
<?php echo HtmlInput::button_close($div)?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
|
@ -52,9 +60,13 @@ else
|
|||
<div style="margin:0px;padding:0px;background-color:red;text-align:center;">
|
||||
<h2 class="error"><?php echo $forbidden ?></h2>;
|
||||
</div>
|
||||
<ul class="aligned-block">
|
||||
<li>
|
||||
<?php echo HtmlInput::button_close($div)?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
echo HtmlInput::button_close($div);
|
||||
$response = ob_get_clean();
|
||||
$html=escape_xml($response);
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ $dossier_id=Dossier::id();
|
|||
?>
|
||||
|
||||
<?php if ($access == 'W') : ?>
|
||||
<form class="print" onsubmit="return op_save(this);">
|
||||
<form class="print" id="<?=$div?>_frm" onsubmit="return op_save('<?=$div?>_frm');">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo HtmlInput::hidden('whatdiv', $div) . HtmlInput::hidden('jr_id', $jr_id) . dossier::hidden(); ?>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ $dossier_id=Dossier::id();
|
|||
|
||||
?>
|
||||
<?php if ( $access=='W') : ?>
|
||||
<form class="print" onsubmit="return op_save(this);">
|
||||
<form class="print" id="<?=$div?>_frm" onsubmit="return op_save('<?=$div?>_frm');">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo HtmlInput::hidden('whatdiv',$div).HtmlInput::hidden('jr_id',$jr_id).dossier::hidden();?>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $dossier_id=Dossier::id();
|
|||
<div class="content">
|
||||
|
||||
<?php if ( $access=='W') : ?>
|
||||
<form class="print" onsubmit="return op_save(this);">
|
||||
<form class="print" id="<?=$div?>_frm" onsubmit="return op_save('<?=$div?>_frm');">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo HtmlInput::hidden('whatdiv',$div).HtmlInput::hidden('jr_id',$jr_id).dossier::hidden();?>
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ $str_anc = "";
|
|||
$owner = new Noalyss_Parameter_Folder($cn);
|
||||
?>
|
||||
|
||||
<?php if ($access == 'W') :
|
||||
echo '<form class="print" onsubmit="return op_save(this);">';
|
||||
endif; ?>
|
||||
<?php if ($access == 'W') :?>
|
||||
<form class="print" id="<?=$div?>_frm" onsubmit="return op_save('<?=$div?>_frm');">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo HtmlInput::hidden('whatdiv', $div) . HtmlInput::hidden('jr_id', $jr_id) . dossier::hidden(); ?>
|
||||
<table style="width:100%">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue