feat: Add auto-start timer configuration for task popup
This commit is contained in:
7
.claude/settings.local.json
Normal file
7
.claude/settings.local.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(git log:*)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,3 +15,6 @@ $imap_tasks['flags'] = '/imap/ssl/novalidate-cert';
|
|||||||
$imap_tasks['folder'] = 'INBOX';
|
$imap_tasks['folder'] = 'INBOX';
|
||||||
$imap_tasks['username'] = 'zadania@project-pro.pl';
|
$imap_tasks['username'] = 'zadania@project-pro.pl';
|
||||||
$imap_tasks['password'] = 'ProjectPro2025!';
|
$imap_tasks['password'] = 'ProjectPro2025!';
|
||||||
|
|
||||||
|
// Auto-start timer when opening task popup (true/false)
|
||||||
|
$settings['tasks_auto_start_timer'] = false;
|
||||||
|
|||||||
@@ -130,6 +130,9 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
let isProgrammaticUpdate = false;
|
let isProgrammaticUpdate = false;
|
||||||
|
|
||||||
|
// Configuration: auto-start timer when opening task popup
|
||||||
|
var TASKS_AUTO_START_TIMER = <?= isset( $GLOBALS['settings']['tasks_auto_start_timer'] ) && $GLOBALS['settings']['tasks_auto_start_timer'] ? 'true' : 'false' ?>;
|
||||||
|
|
||||||
var tasks = [
|
var tasks = [
|
||||||
<?
|
<?
|
||||||
foreach ( $this -> tasks_gantt as $task ) {
|
foreach ( $this -> tasks_gantt as $task ) {
|
||||||
@@ -309,7 +312,7 @@
|
|||||||
stop_task_timer( task_id );
|
stop_task_timer( task_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
function task_popup( task_id, open_works_time = false, auto_start_timer = true ) {
|
function task_popup( task_id, open_works_time = false, auto_start_timer = TASKS_AUTO_START_TIMER ) {
|
||||||
var current_popup_task_id = $( '.task_popup .task_details' ).attr( 'task_id' );
|
var current_popup_task_id = $( '.task_popup .task_details' ).attr( 'task_id' );
|
||||||
var popup_already_open = $( '.task_popup' ).is( ':visible' ) && $( '.task_popup .task_details' ).length;
|
var popup_already_open = $( '.task_popup' ).is( ':visible' ) && $( '.task_popup .task_details' ).length;
|
||||||
var should_auto_start_timer = auto_start_timer && !( popup_already_open && String( current_popup_task_id ) === String( task_id ) );
|
var should_auto_start_timer = auto_start_timer && !( popup_already_open && String( current_popup_task_id ) === String( task_id ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user