Merge branch 'master' of git.elab.kth.se:davide/ELAB-partsearch
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ def alterLocation(locationID):
|
|||||||
if locationID < 0:
|
if locationID < 0:
|
||||||
# New entry
|
# New entry
|
||||||
s = 'insert into locations (name, container_id) '
|
s = 'insert into locations (name, container_id) '
|
||||||
s += 'values (:name, :container, :userid);'
|
s += 'values (:name, :container);'
|
||||||
s = text(s)
|
s = text(s)
|
||||||
r = db_engine.execute(s,name=request.form['name'],container=request.form['container']);
|
r = db_engine.execute(s,name=request.form['name'],container=request.form['container']);
|
||||||
r.close()
|
r.close()
|
||||||
|
|||||||
@@ -55,11 +55,13 @@ function saveLocation(locationID) {
|
|||||||
|
|
||||||
|
|
||||||
function deleteLocation(locationID) {
|
function deleteLocation(locationID) {
|
||||||
if (locationID < 0)
|
if (locationID < 0){
|
||||||
alert('Congratulations! You found the secret UI bug easter egg! This button should not be here, yet I left it specifically because I wanted an easter egg and not because of any other reasons! Good for you!')
|
alert('Congratulations! You found the secret UI bug easter egg! This button should not be here, yet I left it specifically because I wanted an easter egg and not because of any other reasons! Good for you!')
|
||||||
return;
|
return;
|
||||||
if (!confirm('Delete the selected location? If there are parts there, this will leave a mess in the database and Marek will be very sad.'))
|
}
|
||||||
|
if (!confirm('Delete the selected location? If there are parts there, this will leave a mess in the database and Marek will be very sad.')){
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: rootURL + 'deleteLocation/' + locationID,
|
url: rootURL + 'deleteLocation/' + locationID,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
|
|||||||
Reference in New Issue
Block a user