Skip to content
Snippets Groups Projects
Commit 202ba334 authored by dcz's avatar dcz
Browse files

Slowal frame argument mapping change bugfix.

parent 6ebba997
Branches
No related merge requests found
......@@ -581,26 +581,12 @@ Object.assign(LexicalUnitEdit, {
}
}
},
change_slowal2unified_frame_argument_mapping(slowal_frame_id) {
const argument_ids = [];
$('.argument.active').each(function() {
const id = $(this).data('argument_id').split('-')[1];
if(id.startsWith('_')) {
id = -parseInt(id.split('_')[1])
} else {
id = parseInt(id)
}
argument_ids.push(id);
});
let choosed_slowal_frame_id = null;
$('.frame.active').each(function() {
choosed_slowal_frame_id = $(this).data('frame_id');
});
if(choosed_slowal_frame_id == slowal_frame_id && argument_ids.length == 2) {
change_slowal2unified_frame_argument_mapping(slowal_frame) {
if(slowal_frame === this.active_slowal_frame && this.selectedFrameArguments && this.selectedFrameArguments.length == 2) {
const data = {
'unified_frame_id': this.unified_frame.id,
'slowal_frame_id': choosed_slowal_frame_id,
'slowal_frame_selected_arguments': JSON.stringify(argument_ids)
'slowal_frame_id': slowal_frame.id,
'slowal_frame_selected_arguments': JSON.stringify(this.selectedFrameArguments.map(arg => arg.argument_id))
};
$.ajax({
type: 'post',
......@@ -1036,7 +1022,7 @@ Object.assign(LexicalUnitEdit, {
<br><br>
<button v-if="!isFrameVerified(frame)"
class="btn btn-sm btn-dark" role="button"
@click="change_slowal2unified_frame_argument_mapping(frame.id)"
@click="change_slowal2unified_frame_argument_mapping(frame)"
>Z</button>
</div>
</th>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment