Fix: avoid errors with IE
This commit is contained in:
parent
9d95e8bffb
commit
89b794dcd0
@ -228,16 +228,16 @@ print '<td align="center" valign="top">';
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||||
$filter='s.client in (1,2,3)';
|
$filter='s.client in (1,2,3)';
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print $form->select_company($socid,'socid',$filter,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td align="left">';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_users($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
||||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||||
arsort($arrayyears);
|
arsort($arrayyears);
|
||||||
print $form->selectarray('year',$arrayyears,$year,0);
|
print $form->selectarray('year',$arrayyears,$year,0);
|
||||||
|
|||||||
@ -249,17 +249,17 @@ print '<td align="center" valign="top">';
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print $form->select_company($socid,'socid',$filter,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td align="left">';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_users($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
||||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||||
arsort($arrayyears);
|
arsort($arrayyears);
|
||||||
print $form->selectarray('year',$arrayyears,$year,0);
|
print $form->selectarray('year',$arrayyears,$year,0);
|
||||||
|
|||||||
@ -38,12 +38,17 @@ $(document).ready(function () {
|
|||||||
} else {
|
} else {
|
||||||
dst = "1"; // daylight savings time is observed
|
dst = "1"; // daylight savings time is observed
|
||||||
}
|
}
|
||||||
var tz=new Date().toTimeString().match(/\(.*\)/);
|
var now=new Date();
|
||||||
|
var tz=now.toTimeString().match(/\(.*\)/);
|
||||||
|
//alert('date=' + now + ' string=' + now.toTimeString());
|
||||||
var dst_first=DisplayDstSwitchDates('first');
|
var dst_first=DisplayDstSwitchDates('first');
|
||||||
var dst_second=DisplayDstSwitchDates('second');
|
var dst_second=DisplayDstSwitchDates('second');
|
||||||
//alert(dst);
|
//alert(dst);
|
||||||
$('#tz').val(std_time_offset); // returns TZ
|
$('#tz').val(std_time_offset); // returns TZ
|
||||||
$('#tz_string').val(tz[0].replace('(','').replace(')','')); // returns TZ string
|
// tz is null with IE
|
||||||
|
if (tz != null) {
|
||||||
|
$('#tz_string').val(tz[0].replace('(','').replace(')','')); // returns TZ string
|
||||||
|
}
|
||||||
$('#dst_observed').val(dst); // returns if DST is observed on summer
|
$('#dst_observed').val(dst); // returns if DST is observed on summer
|
||||||
$('#dst_first').val(dst_first); // returns DST first switch in year
|
$('#dst_first').val(dst_first); // returns DST first switch in year
|
||||||
$('#dst_second').val(dst_second); // returns DST second switch in year
|
$('#dst_second').val(dst_second); // returns DST second switch in year
|
||||||
|
|||||||
@ -718,9 +718,10 @@ function delConstant(url, code, input, entity) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton) {
|
function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton) {
|
||||||
|
var boxConfirm = box;
|
||||||
$("#confirm_" + code)
|
$("#confirm_" + code)
|
||||||
.attr("title", box.title)
|
.attr("title", boxConfirm.title)
|
||||||
.html(box.content)
|
.html(boxConfirm.content)
|
||||||
.dialog({
|
.dialog({
|
||||||
resizable: false,
|
resizable: false,
|
||||||
height: 170,
|
height: 170,
|
||||||
@ -737,9 +738,9 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
|
|||||||
}
|
}
|
||||||
// Close dialog
|
// Close dialog
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
// Execute another function
|
// Execute another method
|
||||||
if (box.function) {
|
if (boxConfirm.method) {
|
||||||
var fnName = box.function;
|
var fnName = boxConfirm.method;
|
||||||
if (window.hasOwnProperty(fnName)) {
|
if (window.hasOwnProperty(fnName)) {
|
||||||
window[fnName]();
|
window[fnName]();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user