mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
#8252 Move up and down fields
This commit is contained in:
parent
a40efcfee5
commit
90d4cfa0db
@ -45,7 +45,7 @@ if ($default != 0) {
|
|||||||
'token' => 'event_fields',
|
'token' => 'event_fields',
|
||||||
'value' => $event_fields,
|
'value' => $event_fields,
|
||||||
];
|
];
|
||||||
// update 'event_fields' in tconfig table to keep the value at update.
|
// Update 'event_fields' in tconfig table to keep the value at update.
|
||||||
$result = db_process_sql_update(
|
$result = db_process_sql_update(
|
||||||
'tconfig',
|
'tconfig',
|
||||||
$values,
|
$values,
|
||||||
@ -147,7 +147,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
|
|||||||
|
|
||||||
$table->data[0][1] = '';
|
$table->data[0][1] = '';
|
||||||
$table->data[0][2] = '<b>'.__('Fields selected').'</b>';
|
$table->data[0][2] = '<b>'.__('Fields selected').'</b>';
|
||||||
$table->data[1][2] = html_print_select(
|
$table->data[1][2] = '<div class="flex_justify">'.html_print_select(
|
||||||
$result_selected,
|
$result_selected,
|
||||||
'fields_selected[]',
|
'fields_selected[]',
|
||||||
true,
|
true,
|
||||||
@ -162,6 +162,25 @@ $table->data[1][2] = html_print_select(
|
|||||||
'width: 300px'
|
'width: 300px'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->data[1][2] .= '<div id="sort_arrows" class="flex-column">';
|
||||||
|
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
|
||||||
|
'images/darrowup.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'onclick' => 'sortUpDown(\'up\');',
|
||||||
|
'title' => __('Move down selected fields'),
|
||||||
|
]
|
||||||
|
).'</a>';
|
||||||
|
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
|
||||||
|
'images/darrowdown.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'onclick' => 'sortUpDown(\'down\');',
|
||||||
|
'title' => __('Move up selected fields'),
|
||||||
|
]
|
||||||
|
).'</a>';
|
||||||
|
$table->data[1][2] .= '</div></div>';
|
||||||
|
|
||||||
echo '<form id="custom_events" method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=fields&pure='.$config['pure'].'">';
|
echo '<form id="custom_events" method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=fields&pure='.$config['pure'].'">';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
@ -234,4 +253,16 @@ function move_left(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change the order (to up or down).
|
||||||
|
function sortUpDown(mode) {
|
||||||
|
$("#fields_selected option:selected").each(function() {
|
||||||
|
const field = $(this);
|
||||||
|
|
||||||
|
if (field.length) {
|
||||||
|
(mode === 'up') ? field.first().prev().before(field): field.last().next().after(field);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -7483,6 +7483,11 @@ div.graph div.legend table {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex_justify {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.span_priority {
|
.span_priority {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user