update
This commit is contained in:
22
.vscode/ftp-kr.sync.cache.json
vendored
22
.vscode/ftp-kr.sync.cache.json
vendored
@@ -333,6 +333,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
".gitignore": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 14,
|
||||||
|
"lmtime": 1773532569285,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
".htaccess": {
|
".htaccess": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1055,
|
"size": 1055,
|
||||||
@@ -503,8 +509,8 @@
|
|||||||
"cron": {
|
"cron": {
|
||||||
"main-view.php": {
|
"main-view.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2995,
|
"size": 3332,
|
||||||
"lmtime": 0,
|
"lmtime": 1773602150426,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -643,9 +649,9 @@
|
|||||||
"site": {
|
"site": {
|
||||||
"layout-cron.php": {
|
"layout-cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 6400,
|
"size": 3723,
|
||||||
"lmtime": 1770653884637,
|
"lmtime": 1773602132022,
|
||||||
"modified": true
|
"modified": false
|
||||||
},
|
},
|
||||||
"layout-logged.php": {
|
"layout-logged.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
@@ -839,12 +845,6 @@
|
|||||||
"size": 230708,
|
"size": 230708,
|
||||||
"lmtime": 1771920013460,
|
"lmtime": 1771920013460,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
|
||||||
".gitignore": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 14,
|
|
||||||
"lmtime": 1773532569285,
|
|
||||||
"modified": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
$checklist_count = is_array( $this -> task['actions'] ) ? count( $this -> task['actions'] ) : 0;
|
$checklist_count = is_array( $this -> task['actions'] ) ? count( $this -> task['actions'] ) : 0;
|
||||||
$comments_count = is_array( $this -> task['comments'] ) ? count( $this -> task['comments'] ) : 0;
|
$comments_count = is_array( $this -> task['comments'] ) ? count( $this -> task['comments'] ) : 0;
|
||||||
$attachments_count = is_array( $this -> task_attachments ) ? count( $this -> task_attachments ) : 0;
|
$attachments_count = is_array( $this -> task_attachments ) ? count( $this -> task_attachments ) : 0;
|
||||||
|
$image_extensions = [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'svg' ];
|
||||||
$popup_wiki_data = \factory\Tasks::task_wiki_entries_for_user( (int)$this -> task['id'], (int)$this -> user['id'] );
|
$popup_wiki_data = \factory\Tasks::task_wiki_entries_for_user( (int)$this -> task['id'], (int)$this -> user['id'] );
|
||||||
$task_wiki_entries = isset( $popup_wiki_data['entries'] ) && is_array( $popup_wiki_data['entries'] ) ? $popup_wiki_data['entries'] : [];
|
$task_wiki_entries = isset( $popup_wiki_data['entries'] ) && is_array( $popup_wiki_data['entries'] ) ? $popup_wiki_data['entries'] : [];
|
||||||
$wiki_visible_count = isset( $popup_wiki_data['visible_count'] ) ? (int)$popup_wiki_data['visible_count'] : 0;
|
$wiki_visible_count = isset( $popup_wiki_data['visible_count'] ) ? (int)$popup_wiki_data['visible_count'] : 0;
|
||||||
@@ -167,11 +168,24 @@
|
|||||||
<ul class="attachments_list">
|
<ul class="attachments_list">
|
||||||
<? if ( is_array( $this -> task_attachments ) and count( $this -> task_attachments ) ):?>
|
<? if ( is_array( $this -> task_attachments ) and count( $this -> task_attachments ) ):?>
|
||||||
<? foreach ( $this -> task_attachments as $attachment ):?>
|
<? foreach ( $this -> task_attachments as $attachment ):?>
|
||||||
|
<? $attachment_ext = strtolower( pathinfo( (string)$attachment['title_effective'], PATHINFO_EXTENSION ) );?>
|
||||||
|
<? $is_image_attachment = in_array( $attachment_ext, $image_extensions, true );?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?= $attachment['url'];?>" target="_blank" rel="noopener noreferrer" class="attachment-link" download="<?= htmlspecialchars( $attachment['title_effective'] );?>">
|
<? if ( $is_image_attachment ):?>
|
||||||
<?= htmlspecialchars( $attachment['title_effective'] );?>
|
<a href="<?= htmlspecialchars( $attachment['url'] );?>" class="attachment-link attachment-preview-link" data-image-src="<?= htmlspecialchars( $attachment['url'] );?>" data-image-title="<?= htmlspecialchars( $attachment['title_effective'] );?>">
|
||||||
</a>
|
<?= htmlspecialchars( $attachment['title_effective'] );?>
|
||||||
|
</a>
|
||||||
|
<? else:?>
|
||||||
|
<a href="<?= htmlspecialchars( $attachment['url'] );?>" target="_blank" rel="noopener noreferrer" class="attachment-link" download="<?= htmlspecialchars( $attachment['title_effective'] );?>">
|
||||||
|
<?= htmlspecialchars( $attachment['title_effective'] );?>
|
||||||
|
</a>
|
||||||
|
<? endif;?>
|
||||||
<small>(<?= $attachment['size_human'];?>)</small>
|
<small>(<?= $attachment['size_human'];?>)</small>
|
||||||
|
<? if ( $is_image_attachment ):?>
|
||||||
|
<a href="<?= htmlspecialchars( $attachment['url'] );?>" target="_blank" rel="noopener noreferrer" class="attachment-download" download="<?= htmlspecialchars( $attachment['title_effective'] );?>" title="Pobierz">
|
||||||
|
<i class="fa fa-download"></i>
|
||||||
|
</a>
|
||||||
|
<? endif;?>
|
||||||
<a href="#" class="attachment-rename" attachment_id="<?= $attachment['id'];?>" title_current="<?= htmlspecialchars( $attachment['title_effective'] );?>"><i class="fa fa-pencil"></i></a>
|
<a href="#" class="attachment-rename" attachment_id="<?= $attachment['id'];?>" title_current="<?= htmlspecialchars( $attachment['title_effective'] );?>"><i class="fa fa-pencil"></i></a>
|
||||||
<a href="#" class="attachment-delete" attachment_id="<?= $attachment['id'];?>"><i class="fa fa-trash"></i></a>
|
<a href="#" class="attachment-delete" attachment_id="<?= $attachment['id'];?>"><i class="fa fa-trash"></i></a>
|
||||||
</li>
|
</li>
|
||||||
@@ -494,6 +508,22 @@
|
|||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
transition: opacity .2s ease;
|
transition: opacity .2s ease;
|
||||||
}
|
}
|
||||||
|
.task_popup .task_details .attachments_list li .attachment-download {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-left: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #1f3d72;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: background .2s ease, color .2s ease;
|
||||||
|
}
|
||||||
|
.task_popup .task_details .attachments_list li .attachment-download:hover {
|
||||||
|
background: #eef3fb;
|
||||||
|
color: #16305b;
|
||||||
|
}
|
||||||
.task_popup .task_details .description img:hover {
|
.task_popup .task_details .description img:hover {
|
||||||
opacity: .85;
|
opacity: .85;
|
||||||
}
|
}
|
||||||
@@ -522,6 +552,21 @@
|
|||||||
box-shadow: 0 0 40px rgba(0,0,0,.5);
|
box-shadow: 0 0 40px rgba(0,0,0,.5);
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
.task-img-lightbox .lightbox-content {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
max-width: 90vw;
|
||||||
|
max-height: 90vh;
|
||||||
|
}
|
||||||
|
.task-img-lightbox .lightbox-title {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
.task-img-lightbox .lightbox-close {
|
.task-img-lightbox .lightbox-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 16px;
|
top: 16px;
|
||||||
@@ -908,6 +953,30 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
popup.on( 'click', '.attachment-preview-link', function( e ) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
var src = $( this ).attr( 'data-image-src' );
|
||||||
|
if ( !src ) return;
|
||||||
|
|
||||||
|
var $overlay = $( '<div class="task-img-lightbox">' +
|
||||||
|
'<span class="lightbox-close">×</span>' +
|
||||||
|
'<img src="' + src + '">' +
|
||||||
|
'</div>' );
|
||||||
|
|
||||||
|
$( 'body' ).append( $overlay );
|
||||||
|
|
||||||
|
$overlay.on( 'click', function() {
|
||||||
|
$overlay.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
$( document ).one( 'keydown.taskLightbox', function( ev ) {
|
||||||
|
if ( ev.key === 'Escape' ) {
|
||||||
|
$overlay.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
popup.on( 'click', '.js-save-task-users', function( e ) {
|
popup.on( 'click', '.js-save-task-users', function( e ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var btn = $( this );
|
var btn = $( this );
|
||||||
|
|||||||
Reference in New Issue
Block a user