mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Added check to save positions so no POST action is made if there is nothing to save
This commit is contained in:
parent
819602a87e
commit
647509e201
@ -1013,14 +1013,17 @@
|
||||
|
||||
uploadPositions: function() {
|
||||
|
||||
$.ajax( {
|
||||
type: 'POST',
|
||||
url: codiad.active.controller + '?action=save_positions',
|
||||
data: {
|
||||
positions: ( JSON.stringify( codiad.active.positions ) )
|
||||
},
|
||||
success: function( data ) {},
|
||||
});
|
||||
if( Object.keys( codiad.active.positions ).length > 0 ) {
|
||||
|
||||
$.ajax( {
|
||||
type: 'POST',
|
||||
url: codiad.active.controller + '?action=save_positions',
|
||||
data: {
|
||||
positions: ( JSON.stringify( codiad.active.positions ) )
|
||||
},
|
||||
success: function( data ) {},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
savePosition: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user