mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Fix browser reminder
This commit is contained in:
@@ -1097,7 +1097,7 @@ if ($action == 'create')
|
|||||||
if (!empty($conf->global->AGENDA_ENABLE_DONEBY))
|
if (!empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
print $form->select_dolusers(GETPOST("doneby") ?GETPOST("doneby") : (!empty($object->userdoneid) && $percent == 100 ? $object->userdoneid : 0), 'doneby', 1);
|
print $form->select_dolusers(GETPOSTISSET("doneby") ? GETPOST("doneby", 'int') : (!empty($object->userdoneid) && $percent == 100 ? $object->userdoneid : 0), 'doneby', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1874,9 +1874,15 @@ class Form
|
|||||||
if ($action != 'view')
|
if ($action != 'view')
|
||||||
{
|
{
|
||||||
$out .= '<input type="hidden" class="removedassignedhidden" name="removedassigned" value="">';
|
$out .= '<input type="hidden" class="removedassignedhidden" name="removedassigned" value="">';
|
||||||
$out .= '<script type="text/javascript" language="javascript">jQuery(document).ready(function () { jQuery(".removedassigned").click(function() { jQuery(".removedassignedhidden").val(jQuery(this).val()); });})</script>';
|
$out .= '<script type="text/javascript" language="javascript">jQuery(document).ready(function () {';
|
||||||
|
$out .= 'jQuery(".removedassigned").click(function() { jQuery(".removedassignedhidden").val(jQuery(this).val()); });';
|
||||||
|
$out .= 'jQuery(".assignedtouser").change(function() { console.log(jQuery(".assignedtouser option:selected").val());';
|
||||||
|
$out .= ' if (jQuery(".assignedtouser option:selected").val() > 0) { jQuery("#'.$action.'assignedtouser").attr("disabled", false); }';
|
||||||
|
$out .= ' else { jQuery("#'.$action.'assignedtouser").attr("disabled", true); }';
|
||||||
|
$out .= '});';
|
||||||
|
$out .= '})</script>';
|
||||||
$out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter);
|
$out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter);
|
||||||
$out .= ' <input type="submit" class="button valignmiddle" name="'.$action.'assignedtouser" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
|
$out .= ' <input type="submit" disabled class="button valignmiddle" id="'.$action.'assignedtouser" name="'.$action.'assignedtouser" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
|
||||||
$out .= '<br>';
|
$out .= '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ if (!($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root.'/' || $_SERVER['HTTP
|
|||||||
data: { time_js_next_test: time_js_next_test, forcechecknow: 1, token: 'notrequired' },
|
data: { time_js_next_test: time_js_next_test, forcechecknow: 1, token: 'notrequired' },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
console.log(result);
|
//console.log(result);
|
||||||
var arrayofpastreminders = Object.values(result.pastreminders);
|
var arrayofpastreminders = Object.values(result.pastreminders);
|
||||||
console.log("arrayofpastreminders.length"+arrayofpastreminders.length);
|
|
||||||
if (arrayofpastreminders && arrayofpastreminders.length > 0) {
|
if (arrayofpastreminders && arrayofpastreminders.length > 0) {
|
||||||
|
console.log("Retreived "+arrayofpastreminders.length+" reminders to do.");
|
||||||
var audio = null;
|
var audio = null;
|
||||||
<?php
|
<?php
|
||||||
if (!empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
if (!empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
||||||
@@ -145,7 +145,7 @@ if (!($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root.'/' || $_SERVER['HTTP
|
|||||||
data: { time_js_next_test: time_js_next_test, token: 'notrequired' }
|
data: { time_js_next_test: time_js_next_test, token: 'notrequired' }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("No past reminder found, next try at "+time_js_next_test);
|
console.log("No reminder to do found, next search at "+time_js_next_test);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -167,4 +167,3 @@ ReminderType=Callback type
|
|||||||
AddReminder=Create an automatic reminder notification for this event
|
AddReminder=Create an automatic reminder notification for this event
|
||||||
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
|
||||||
BrowserPush=Browser Notification
|
BrowserPush=Browser Notification
|
||||||
EventReminder=Event Reminder
|
|
||||||
@@ -1099,3 +1099,4 @@ DateOfBirth=Date of birth
|
|||||||
SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again.
|
SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again.
|
||||||
UpToDate=Up-to-date
|
UpToDate=Up-to-date
|
||||||
OutOfDate=Out-of-date
|
OutOfDate=Out-of-date
|
||||||
|
EventReminder=Event Reminder
|
||||||
Reference in New Issue
Block a user