profile upload (requires server update)

This commit is contained in:
Norbert Renner 2014-05-22 11:20:22 +02:00
parent 136a182539
commit 973d8bab75
8 changed files with 129 additions and 27 deletions

View file

@ -1,11 +1,23 @@
BR.Profile = BR.Control.extend({
options: {
heading: ''
options: {
heading: 'Profile',
divId: 'profile_div'
},
onAdd: function (map) {
var container = BR.Control.prototype.onAdd.call(this, map);
container.innerHTML = " ";
return container;
L.DomUtil.get('profile_upload').onsubmit = L.bind(this._submit, this)
return BR.Control.prototype.onAdd.call(this, map);
},
_submit: function(evt) {
var form = evt.target || evt.srcElement,
profile = document.profile_upload.profile.value;
evt.preventDefault();
this.fire('update', { profileText: profile });
}
});
BR.Profile.include(L.Mixin.Events);