From 029b0d464fdbf3573db4c2bed857c54bb0b13f1c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 11 Oct 2014 21:46:02 -0400 Subject: [PATCH] add more device options --- dashboard-ui/channelsettings.html | 3 +- dashboard-ui/device.html | 50 +++++++++++++++++++++++++++ dashboard-ui/devicesupload.html | 11 ++++-- dashboard-ui/scripts/device.js | 1 + dashboard-ui/scripts/devices.js | 8 ++++- dashboard-ui/scripts/devicesupload.js | 9 +++++ 6 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 dashboard-ui/device.html create mode 100644 dashboard-ui/scripts/device.js diff --git a/dashboard-ui/channelsettings.html b/dashboard-ui/channelsettings.html index 4c2cdc696..59b5b4240 100644 --- a/dashboard-ui/channelsettings.html +++ b/dashboard-ui/channelsettings.html @@ -50,8 +50,7 @@
  • -
    ${LabelChannelDownloadSizeLimitHelp}
    - +
    ${LabelChannelDownloadSizeLimitHelpText}
  • diff --git a/dashboard-ui/device.html b/dashboard-ui/device.html new file mode 100644 index 000000000..fb99261a5 --- /dev/null +++ b/dashboard-ui/device.html @@ -0,0 +1,50 @@ + + + + ${TitleDevices} + + +
    + +
    +
    + + + +
    + +
    + +
      +
    • + +
      + +
      + +
      ${LabelCameraUploadPathHelp}
      +
    • + +

    +
      +
    • + + +
    • +
    + +
    + +
    +
    +
    +
    + + diff --git a/dashboard-ui/devicesupload.html b/dashboard-ui/devicesupload.html index 1a13b93cd..b4c4ccea7 100644 --- a/dashboard-ui/devicesupload.html +++ b/dashboard-ui/devicesupload.html @@ -31,12 +31,17 @@


    @@ -45,7 +50,7 @@ -
  • diff --git a/dashboard-ui/scripts/device.js b/dashboard-ui/scripts/device.js new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/dashboard-ui/scripts/device.js @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dashboard-ui/scripts/devices.js b/dashboard-ui/scripts/devices.js index e21751c07..fa150733b 100644 --- a/dashboard-ui/scripts/devices.js +++ b/dashboard-ui/scripts/devices.js @@ -34,12 +34,18 @@ var deviceHtml = ''; deviceHtml += '
  • '; - deviceHtml += ''; + deviceHtml += ''; deviceHtml += '

    '; deviceHtml += d.Name; deviceHtml += '

    '; + if (d.AppName) { + deviceHtml += '

    '; + deviceHtml += d.AppName; + deviceHtml += '

    '; + } + if (d.LastUserName) { deviceHtml += '

    '; deviceHtml += Globalize.translate('DeviceLastUsedByUserName', d.LastUserName); diff --git a/dashboard-ui/scripts/devicesupload.js b/dashboard-ui/scripts/devicesupload.js index 9063452f7..bf53f660e 100644 --- a/dashboard-ui/scripts/devicesupload.js +++ b/dashboard-ui/scripts/devicesupload.js @@ -12,6 +12,8 @@ $('#txtUploadPath', page).val(config.CameraUploadPath || ''); + $('#chkSubfolder', page).checked(config.EnableCameraUploadSubfolders).checkboxradio('refresh'); + loadDeviceList(page, devices, config); } @@ -34,6 +36,11 @@ deviceHtml += ''; var isChecked = config.EnabledCameraUploadDevices.indexOf(d.Id) != -1; @@ -88,6 +95,8 @@ }); + config.EnableCameraUploadSubfolders = $('#chkSubfolder', page).checked(); + ApiClient.updateNamedConfiguration("devices", config).done(Dashboard.processServerConfigurationUpdateResult); });