diff --git a/js/control/Message.js b/js/control/Message.js index 4f6243d..9407575 100644 --- a/js/control/Message.js +++ b/js/control/Message.js @@ -29,7 +29,7 @@ BR.Message = L.Class.extend({ } }, - _hide: function (type) { + hide: function () { $('#' + this.id + ' .alert').alert('close'); }, @@ -37,10 +37,6 @@ BR.Message = L.Class.extend({ this._show(err, 'error'); }, - hideError: function () { - this._hide('error'); - }, - showWarning: function (msg) { this._show(msg, 'warning'); } diff --git a/js/control/Profile.js b/js/control/Profile.js index 1ecedb7..c3db755 100644 --- a/js/control/Profile.js +++ b/js/control/Profile.js @@ -57,7 +57,7 @@ BR.Profile = L.Class.extend({ var button = evt.target || evt.srcElement, profile = this.ele.value; - this.message.hideError(); + this.message.hide(); $(button).button('uploading'); evt.preventDefault(); diff --git a/js/index.js b/js/index.js index 2eedcb9..0e7bafb 100644 --- a/js/index.js +++ b/js/index.js @@ -145,7 +145,7 @@ elevation = new BR.Elevation(); profile = new BR.Profile(); profile.on('update', function(evt) { - BR.message.hideError(); + BR.message.hide(); var profileId = routingOptions.getCustomProfile(); router.uploadProfile(profileId, evt.profileText, function(err, profileId) { if (!err) { @@ -172,7 +172,7 @@ }); }); profile.on('clear', function(evt) { - profile.message.hideError(); + profile.message.hide(); routingOptions.setCustomProfile(null); }); trackMessages = new BR.TrackMessages({ @@ -205,7 +205,7 @@ } return; } else { - BR.message.hideError(); + BR.message.hide(); } var track = routing.toPolyline(),