mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Commits from @MartB and more ...
- Commit: 1d9165f403
- New default QT capture implementation
- UploadHandler added to Effects Configurator to allow uploading GIF files
- Docker compile script and instruction
- Travis Fix
This commit is contained in:
@@ -2,6 +2,7 @@ $(document).ready( function() {
|
||||
performTranslation();
|
||||
var oldDelList = [];
|
||||
var effectName = "";
|
||||
var imageData = "";
|
||||
var effects_editor = null;
|
||||
var effectPy = "";
|
||||
var testrun;
|
||||
@@ -31,9 +32,30 @@ $(document).ready( function() {
|
||||
function triggerTestEffect() {
|
||||
testrun = true;
|
||||
var args = effects_editor.getEditor('root.args');
|
||||
requestTestEffect(effectName, ":/effects/" + effectPy.slice(1), JSON.stringify(args.getValue()));
|
||||
requestTestEffect(effectName, ":/effects/" + effectPy.slice(1), JSON.stringify(args.getValue()), imageData);
|
||||
};
|
||||
|
||||
// Specify upload handler for image files
|
||||
JSONEditor.defaults.options.upload = function(type, file, cbs) {
|
||||
var fileReader = new FileReader();
|
||||
|
||||
//check file
|
||||
if (!file.type.startsWith('image')) {
|
||||
imageData = "";
|
||||
cbs.failure('File upload error');
|
||||
// TODO clear file dialog.
|
||||
showInfoDialog('error', "", $.i18n('infoDialog_writeimage_error_text', file.name));
|
||||
return;
|
||||
}
|
||||
|
||||
fileReader.onload = function () {
|
||||
imageData = this.result.split(',')[1];
|
||||
console.log(imageData);
|
||||
cbs.success(file.name);
|
||||
};
|
||||
|
||||
fileReader.readAsDataURL(file);
|
||||
};
|
||||
|
||||
$("#effectslist").off().on("change", function(event) {
|
||||
if(effects_editor != null)
|
||||
@@ -48,6 +70,7 @@ $(document).ready( function() {
|
||||
|
||||
effectPy = ':';
|
||||
effectPy += effects[idx].schemaContent.script;
|
||||
imageData = "";
|
||||
$("#name-input").trigger("change");
|
||||
|
||||
$("#eff_desc").html(createEffHint($.i18n(effects[idx].schemaContent.title),$.i18n(effects[idx].schemaContent.title+'_desc')));
|
||||
@@ -84,7 +107,7 @@ $(document).ready( function() {
|
||||
|
||||
// Save Effect
|
||||
$('#btn_write').off().on('click',function() {
|
||||
requestWriteEffect(effectName,effectPy,JSON.stringify(effects_editor.getValue()));
|
||||
requestWriteEffect(effectName,effectPy,JSON.stringify(effects_editor.getValue()),imageData);
|
||||
$(hyperion).one("cmd-create-effect", function(event) {
|
||||
if (event.response.success)
|
||||
showInfoDialog('success', "", $.i18n('infoDialog_effconf_created_text', effectName));
|
||||
@@ -163,9 +186,9 @@ $(document).ready( function() {
|
||||
//create basic effect list
|
||||
var effects = serverSchema.properties.effectSchemas.internal
|
||||
for(var idx=0; idx<effects.length; idx++)
|
||||
{
|
||||
$("#effectslist").append(createSelOpt(effects[idx].schemaContent.script, $.i18n(effects[idx].schemaContent.title)));
|
||||
}
|
||||
{
|
||||
$("#effectslist").append(createSelOpt(effects[idx].schemaContent.script, $.i18n(effects[idx].schemaContent.title)));
|
||||
}
|
||||
$("#effectslist").trigger("change");
|
||||
|
||||
updateDelEffectlist();
|
||||
|
Reference in New Issue
Block a user