This commit is contained in:
@@ -155,7 +155,7 @@ module.exports = function(__runtime__, scope){
|
|||||||
builder.input(wrapNonNullString(properties.inputHint), wrapNonNullString(properties.inputPrefill),
|
builder.input(wrapNonNullString(properties.inputHint), wrapNonNullString(properties.inputPrefill),
|
||||||
function(dialog, input){
|
function(dialog, input){
|
||||||
input = input.toString();
|
input = input.toString();
|
||||||
dialog.emit("input_change", dialog, input);
|
builder.dialog.emit("input_change", builder.dialog, input);
|
||||||
})
|
})
|
||||||
.alwaysCallInputCallback();
|
.alwaysCallInputCallback();
|
||||||
}
|
}
|
||||||
@@ -163,23 +163,23 @@ module.exports = function(__runtime__, scope){
|
|||||||
var itemsSelectMode = properties.itemsSelectMode;
|
var itemsSelectMode = properties.itemsSelectMode;
|
||||||
if(itemsSelectMode == undefined || itemsSelectMode == 'select'){
|
if(itemsSelectMode == undefined || itemsSelectMode == 'select'){
|
||||||
builder.itemsCallback(function(dialog, view, position, text){
|
builder.itemsCallback(function(dialog, view, position, text){
|
||||||
dialog.emit("item_select", position, text.toString(), dialog);
|
builder.dialog.emit("item_select", position, text.toString(), builder.dialog);
|
||||||
});
|
});
|
||||||
}else if(itemsSelectMode == 'single'){
|
}else if(itemsSelectMode == 'single'){
|
||||||
builder.itemsCallbackSingleChoice(properties.itemsSelectedIndex == undefined ? -1 : properties.itemsSelectedIndex,
|
builder.itemsCallbackSingleChoice(properties.itemsSelectedIndex == undefined ? -1 : properties.itemsSelectedIndex,
|
||||||
function(dialog, view, which, text){
|
function(dialog, view, which, text){
|
||||||
dialog.emit("single_choice", which, text.toString(), dialog);
|
builder.dialog.emit("single_choice", which, text.toString(), builder.dialog);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}else if(itemsSelectMode == 'multi'){
|
}else if(itemsSelectMode == 'multi'){
|
||||||
builder.itemsCallbackMultiChoice(properties.itemsSelectedIndex == undefined ? null : properties.itemsSelectedIndex,
|
builder.itemsCallbackMultiChoice(properties.itemsSelectedIndex == undefined ? null : properties.itemsSelectedIndex,
|
||||||
function(dialog, view, indices, texts){
|
function(dialog, view, indices, texts){
|
||||||
dialog.emit("multi_choice", toJsArray(indices, (l, i)=> parseInt(l.get(i)),
|
builder.dialog.emit("multi_choice", toJsArray(indices, (l, i)=> parseInt(l.get(i)),
|
||||||
toJsArray(texts, (l, i)=> l.get(i).toString())), dialog);
|
toJsArray(texts, (l, i)=> l.get(i).toString())), builder.dialog);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
throw new Error("unknown itemsSelecteMode " + itemsSelectMode);
|
throw new Error("unknown itemsSelectMode " + itemsSelectMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(properties.progress != undefined){
|
if(properties.progress != undefined){
|
||||||
|
|||||||
Reference in New Issue
Block a user