Add refresh button to Videos Table

video-slicer-reencoder
Moe 2022-08-22 12:06:20 -07:00
parent a3048679b7
commit 8d8c619587
4 changed files with 18 additions and 3 deletions

View File

@ -8232,6 +8232,17 @@ module.exports = function(s,config,lang){
},
]
},
{
"fieldType": "btn-group",
"btns": [
{
"fieldType": "btn",
"class": `btn-success fill refresh-data`,
"icon": `refresh`,
"btnContent": `${lang['Refresh']}`,
},
],
},
{
"fieldType": "div",
"id": "videosTable_preview_area",

View File

@ -17,6 +17,7 @@
"deleteSubAccount": "Delete Sub-Account",
"deleteSubAccountText": "Do you want to delete this Sub-Account? You cannot recover it.",
"Accuracy Mode": "Accuracy Mode",
"Refresh": "Refresh",
"Compress": "Compress",
"Tile Size": "Tile Size",
"fieldTextTileSize": "When in Accuracy Mode this is the size of each tile in pixels squared. A lower number will have higher accuracy but more resource use.",
@ -620,8 +621,6 @@
"Not Saved": "Not Saved",
"Not Connected": "Not Connected",
"License Plate Detector": "License Plate Detector",
"OpenCV Cascades": "OpenCV Cascades",
"Refresh List of Cascades": "Refresh List of Cascades",
"\"No Motion\" Detector": "\"No Motion\" Detector",
"Control": "Control",
"Grouping": "Grouping",

View File

@ -274,6 +274,11 @@ $(document).ready(function(e){
drawPreviewVideo(href)
return false;
})
.on('click','.refresh-data',function(e){
e.preventDefault()
drawVideosTableViewElements()
return false;
})
.on('click','.open-snapshot',function(e){
e.preventDefault()
var href = $(this).parents('.video-thumbnail').find('img').click()

View File

@ -171,7 +171,7 @@ drawBlock = function(monitorSettings){
if(btn.attribute){
btnAttributes.push(btn.attribute)
}
fieldBtnContent += `<${btnBaseElement} class="btn ${btnClass.join(' ')}" ${btnAttributes.join(' ')}>${btn.btnContent}</${btnBaseElement}>`
fieldBtnContent += `<${btnBaseElement} class="btn ${btnClass.join(' ')}" ${btnAttributes.join(' ')}>${btn.icon ? `<i class="fa fa-${btn.icon}"></i> ` : ''}${btn.btnContent}</${btnBaseElement}>`
})
fieldElement = `<div class="btn-group ${field.normalWidth ? '' : 'btn-group-justified'} ${fieldClass.join(' ')}" ${attributes.join(' ')}>${fieldBtnContent}</div>`
break;