Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin McFadden committed Dec 19, 2024
2 parents 7b12d3e + 996f1df commit 2ca8e3e
Show file tree
Hide file tree
Showing 19 changed files with 95 additions and 49 deletions.
1 change: 1 addition & 0 deletions application/models/filehandlers/Filehandlerbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ public function priority() {
}

public function mungedSidecarData($sidecarData=null, $sidecarType=null) {

if(isset($sidecarType) && isset($sidecarData) && isset($sidecarData[$sidecarType])) {
$sidecarData = $sidecarData[$sidecarType];
return $sidecarData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<div class="form-group">
<label for="<?=$formFieldRoot?>_captions" class="col-sm-3 control-label">Captions</label>
<div class="col-sm-5">
<textarea class="form-control" id="<?=$formFieldRoot?>_captions"name="<?=$formFieldRoot?>[captions]" placeholder="Captions (WebVTT or SRT)"><?=isset($sidecarData['captions'])?$sidecarData['captions']:null?></textarea>
<textarea class="form-control" id="<?=$formFieldRoot?>_captions" name="<?=$formFieldRoot?>[captions]" placeholder="Captions (WebVTT or SRT)"><?=isset($sidecarData['captions'])?$sidecarData['captions']:null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[captions]" />
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<div class="col-sm-5">
<textarea class="form-control" id="<?=$formFieldRoot?>_dendro" name="<?=$formFieldRoot?>[dendro]" placeholder=""><?=json_encode($sidecarData['dendro'])?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[dendro]" />
</div>
</div>
<?endif?>

Expand All @@ -39,5 +43,9 @@
<div class="col-sm-5">
<textarea class="form-control" id="<?=$formFieldRoot?>_svs" name="<?=$formFieldRoot?>[svs]" placeholder=""><?=json_encode($sidecarData['svs'])?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[svs]" />
</div>
</div>
<?endif?>
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<div class="form-group">
<label for="<?=$formFieldRoot?>_captions" class="col-sm-3 control-label">Captions</label>
<div class="col-sm-5">
<textarea class="form-control" id="<?=$formFieldRoot?>_captions"name="<?=$formFieldRoot?>[captions]" placeholder="Captions (WebVTT or SRT)"><?=isset($sidecarData['captions'])?$sidecarData['captions']:null?></textarea>
<textarea class="form-control" id="<?=$formFieldRoot?>_captions" name="<?=$formFieldRoot?>[captions]" placeholder="Captions (WebVTT or SRT)"><?=isset($sidecarData['captions'])?$sidecarData['captions']:null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[captions]" />
</div>
</div>

Expand All @@ -10,4 +14,9 @@
<div class="col-sm-5">
<textarea class="form-control" id="<?=$formFieldRoot?>_captions"name="<?=$formFieldRoot?>[chapters]" placeholder="Chapter Markers (WebVTT)"><?=isset($sidecarData['chapters'])?$sidecarData['chapters']:null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[chapters]" />
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
<div class="col-sm-5">
<textarea class="form-control" name="<?=$formFieldRoot?>[svx]" placeholder="SVX"><?=isset($sidecarData['svx'])?$sidecarData['svx']:null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[svx]" />
</div>
</div>
<?else:?>
<div class="form-group">
<label for="<?=$fileDescriptionId?>" class="col-sm-3 control-label">3D Points</label>
<div class="col-sm-5">
<textarea class="form-control" name="<?=$formFieldRoot?>[3dpoints]" placeholder="3D points"><?=isset($sidecarData['3dpoints'])?$sidecarData['3dpoints']:null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[3dpoints]" />
</div>
</div>
<?endif?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<div class="col-sm-5">
<textarea class="form-control" name="<?=$formFieldRoot?>[svx]" placeholder="SVX"><?=isset($sidecarData['svx'])?json_encode($sidecarData['svx']):null?></textarea>
</div>
<div class="col-sm-3">
<label for="file-upload" class="btn btn-default">Load from File</label>
<input id="file-upload" type="file" class="importTextForSidecar" style="display: none;" data-target="<?=$formFieldRoot?>[svx]" />
</div>
</div>
<?else:?>
<div class="form-group">
Expand Down
2 changes: 0 additions & 2 deletions assets/elevator-ui/dist/assets/MapMarker-4aa8063f.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/elevator-ui/dist/assets/MapMarker-4aa8063f.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions assets/elevator-ui/dist/assets/MapMarker-fedc2b03.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/elevator-ui/dist/assets/MapMarker-fedc2b03.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/elevator-ui/dist/assets/main-5bb47230.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/elevator-ui/dist/assets/main-b22632d0.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions assets/elevator-ui/dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"src": "node_modules/@knight-lab/timelinejs/src/css/icons/tl-icons.woff2"
},
"src/components/MapMarker/MapMarker.vue": {
"file": "assets/MapMarker-4aa8063f.js",
"file": "assets/MapMarker-fedc2b03.js",
"imports": [
"src/main.ts"
],
Expand All @@ -199,7 +199,7 @@
"css": [
"assets/MapPopup-56628758.css"
],
"file": "assets/MapPopup-e04fb427.js",
"file": "assets/MapPopup-43f7a537.js",
"imports": [
"src/main.ts"
],
Expand Down Expand Up @@ -279,7 +279,7 @@
"src/components/MapMarker/MapMarker.vue",
"src/components/MapPopup/MapPopup.vue"
],
"file": "assets/main-b22632d0.js",
"file": "assets/main-5bb47230.js",
"isEntry": true,
"src": "src/main.ts"
}
Expand Down
14 changes: 13 additions & 1 deletion assets/js/widgetHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,16 @@ $(document).ready(function() {

function nextResultLink(targetId) {
window.location = basePath + "assetManager/editAsset/" + targetId;
}
}

$(document).on('change', '.importTextForSidecar', function(e) {
var target = $(this).data('target');
var selectedFile = e.target.files[0];
var reader = new FileReader();
reader.onload = function(e) {
$('[name="' + target + '"]').val(e.target.result);
};

reader.readAsText(selectedFile);

});
2 changes: 1 addition & 1 deletion assets/minifiedjs/widgetHelpers.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/minifiedjs/widgetHelpers.min.js.map

Large diffs are not rendered by default.

0 comments on commit 2ca8e3e

Please sign in to comment.