Fixes in scripts edit
This commit is contained in:
parent
6220d8a4f0
commit
fbab7917ef
3 changed files with 44 additions and 14 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<div id="scripts_list" class="form">
|
||||
% for script in scripts:
|
||||
|
||||
<p><label>${script['name']}</label>: <span class="position" id="position_${script['id']}">${script['position']}</span></p>
|
||||
<p>${script['name']}<input type="hidden" class="position" id="position_${script['id']}" value="${script['position']}"></p>
|
||||
|
||||
% endfor
|
||||
</div>
|
||||
|
|
@ -29,7 +29,7 @@ $('#change_order').click(function () {
|
|||
|
||||
$('.position').each(function () {
|
||||
|
||||
var item_id=$(this).attr('id').replace('postion_', '');
|
||||
var item_id=$(this).attr('id').replace('position_', '');
|
||||
|
||||
order_id.push(item_id);
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ $('#change_order').click(function () {
|
|||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url:"",
|
||||
url:"${url_for('admin_app.pastafari2_save_positions', server_id=server_data['id'])}",
|
||||
data: {order_id: JSON.stringify(order_id)},
|
||||
success: function (data) {
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ $('#change_order').click(function () {
|
|||
if(!data.error) {
|
||||
|
||||
|
||||
|
||||
alert("${lang('pastafari2', 'positions_updated', 'Positions updated')}");
|
||||
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue