Remove button state "uploading", no longer supported in Bootstrap v4

https://getbootstrap.com/docs/4.3/migration/#buttons
https://getbootstrap.com/docs/3.3/javascript/#buttons-stateful
This commit is contained in:
Norbert Renner 2019-11-12 10:04:13 +01:00
parent 21a8d8b5de
commit b0b8a3d0c0
2 changed files with 2 additions and 9 deletions

View file

@ -710,12 +710,7 @@
></textarea>
<div id="profile_message"></div>
<div class="form-group" id="profile_buttons">
<button
id="upload"
type="button"
class="btn btn-primary btn-sm"
data-uploading-text="Uploading…"
>
<button id="upload" type="button" class="btn btn-primary btn-sm">
<span class="fa fa-cloud-upload"></span>
<span data-i18n="sidebar.profile.upload">Upload</span>
</button>

View file

@ -78,14 +78,12 @@ BR.Profile = L.Evented.extend({
profile = this.editor.getValue();
this.message.hide();
$(button).button('uploading');
evt.preventDefault();
var that = this;
this.fire('update', {
profileText: profile,
callback: function(err, profileId, profileText) {
$(button).button('reset');
$(button).blur();
if (!err) {
that.cache[profileId] = profileText;