Add second UI element behavior for new video screen.

This commit is contained in:
mmcwilliams 2019-02-26 21:58:26 -05:00
parent 7a901b31c4
commit 1612d737a1
1 changed files with 33 additions and 27 deletions

View File

@ -63,7 +63,7 @@ devices.ready = function (event, arg) {
$(`#${i}_device`).append(opt); $(`#${i}_device`).append(opt);
} }
if (notify !== 'Connected to ') { if (notify !== 'Connected to ') {
gui.notify('DEVICES', notify) gui.notify('DEVICES', notify);
} }
if (devs.length > 0) { if (devs.length > 0) {
$('#devices').empty(); $('#devices').empty();
@ -76,10 +76,14 @@ devices.ready = function (event, arg) {
} }
if (arg && arg.profile) { if (arg && arg.profile) {
$('#profile').val(arg.profile) $('#profile').val(arg.profile)
log.info(`Using configuration profile "${profile}"`, 'DEVICES', true, true);
//devices.profile(arg.profile) //devices.profile(arg.profile)
} }
if (arg.projector_second) { if (arg.projector_second) {
//add second row of projector pads to grid
}
if (arg.camera_second) {
//add second row of camera pads to grid
} }
return event.returnValue = true; return event.returnValue = true;
}; };
@ -137,8 +141,7 @@ devices.digitalSelect = function () {
title : `Select video or image sequence`, title : `Select video or image sequence`,
properties : [`openFile`], // openDirectory, multiSelection, openFile properties : [`openFile`], // openDirectory, multiSelection, openFile
defaultPath: 'c:/', defaultPath: 'c:/',
filters : filters : [
[
{ {
name: 'Videos', name: 'Videos',
extensions extensions
@ -151,7 +154,8 @@ devices.digitalSelect = function () {
}, (files) => { }, (files) => {
let valid = false; let valid = false;
console.dir(files) console.dir(files)
let path = files[0] let path = files[0];
let displayName;
if (path && path !== '') { if (path && path !== '') {
for (let ext of extensions) { for (let ext of extensions) {
if (path.toLowerCase().indexOf(`.${ext}`) !== -1) { if (path.toLowerCase().indexOf(`.${ext}`) !== -1) {
@ -161,7 +165,9 @@ devices.digitalSelect = function () {
if (!valid) return false; if (!valid) return false;
log.info(`Selected video ${path.split('/').pop()}`, 'DIGITAL', true); log.info(`Selected video ${path.split('/').pop()}`, 'DIGITAL', true);
elem.attr('data-file', path); elem.attr('data-file', path);
elem.val(path.split('/').pop()); displayName = path.split('/').pop()
elem.val(displayName);
$('#video_file').val(displayName);
} }
}) })
} }