Commit 825a9c2d by Uros Spasojevic

- cleanup

parent 355b02fe
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -70,19 +70,12 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', { ...@@ -70,19 +70,12 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', {
{ {
text: 'Update', text: 'Update',
handler: function() { handler: function() {
// console.log(win.items.items[0].value);
// var description = win.items.items[0].value;
// marker.title = title;
// marker.description = description;
// this.fireEvent('updateData', marker);
// win.close();
console.log('updating'); console.log('updating');
} }
}, },
{ {
text: 'Delete', text: 'Delete',
handler: function() { handler: function() {
console.log('deleting');
var i = markers.length; var i = markers.length;
var newMarkers = []; var newMarkers = [];
while(i) { while(i) {
...@@ -102,11 +95,6 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', { ...@@ -102,11 +95,6 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', {
} }
] ]
} }
/* TODO: remove */
/*
dbref.ref('/data/-KrgOQa42hTw8dK9F547').remove();
*/
] ]
}).show() }).show()
}, },
...@@ -135,29 +123,7 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', { ...@@ -135,29 +123,7 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', {
}, },
updateData: function(marker) { updateData: function(marker) {
var updates = {}; // stub
var newMark = {
access: marker.access,
lat: marker.lat,
lng: marker.lng,
animation: google.maps.Animation.DROP,
title: marker.title,
description: marker.description
};
var i = markers.length;
while(i) {
i--;
if(markers[i].access == marker.access) {
markers[i].title = marker.title;
markers[i].description = marker.description;
}
}
updates['/data/'+marker.access] = newMark;
dbref.ref().update(updates);
}, },
mapready: function() { mapready: function() {
...@@ -175,7 +141,6 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', { ...@@ -175,7 +141,6 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', {
if (info != null) { if (info != null) {
Ext.Object.each(info, function(obj, index) { Ext.Object.each(info, function(obj, index) {
// index.animation = google.maps.Animation.DROP;
markers.push(map.addMarker(index)); markers.push(map.addMarker(index));
}); });
} }
...@@ -186,13 +151,9 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', { ...@@ -186,13 +151,9 @@ Ext.define('Evoksi.view.evoksi.EvoksiController', {
} }
} }
}, },
init: function () { init: function () {
var me = this, var me = this,
map = me.getView(); map = me.getView();
},
doSomething: function() {
console.log('asdasd');
} }
}); });
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
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