Skip to content

Commit a4d3335

Browse files
committed
BlogML import button not firing event without type attribute set.
1 parent aa7dcfe commit a4d3335

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

BlogEngine/BlogEngine.NET/admin/app/settings/advancedView.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ <h4> {{lbl.securitySettings}}</h4>
4646
<div ng-if="settings.AllowServerToDownloadRemoteFiles" class="form-group">
4747
<div class="form-group">
4848
<label class="control-label" for="txtRemoteFileDownloadTimeout">{{lbl.remoteTimeout}}</label>
49-
<input type="text" class=" form-control" id="txtRemoteFileDownloadTimeout" name="txtRemoteFileDownloadTimeout" data-ng-model="settings.RemoteFileDownloadTimeout" />
49+
<input type="text" class="form-control" id="txtRemoteFileDownloadTimeout" name="txtRemoteFileDownloadTimeout" data-ng-model="settings.RemoteFileDownloadTimeout" />
5050
</div>
5151
<div class="form-group">
5252
<label class="control-label" for="txtRemoteMaxFileSize">{{lbl.maximumRemoteFileSize}}</label>
53-
<input type="text" class=" form-control" id="txtRemoteMaxFileSize" name="txtRemoteMaxFileSize" data-ng-model="settings.RemoteMaxFileSize" />
53+
<input type="text" class="form-control" id="txtRemoteMaxFileSize" name="txtRemoteMaxFileSize" data-ng-model="settings.RemoteMaxFileSize" />
5454
</div>
5555
</div>
5656
<h4>{{lbl.tools}}</h4>
5757
<div class="form-group">
5858
<p>{{lbl.selectSavedBlogMlFle}}</p>
59-
<button class="btn btn-default btn-input-file next">{{lbl.import}}</button>
59+
<button type="button" class="btn btn-default btn-input-file next">{{lbl.import}}</button>
6060
<input type="file" class="input-file-hidden" onchange="angular.element(this).scope().uploadFile(this.files)" />
6161
</div>
6262
<div class="form-group">

BlogEngine/BlogEngine.NET/admin/app/settings/settingController.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@
8282
}
8383

8484
$scope.uploadFile = function (files) {
85+
spinOn();
8586
var fd = new FormData();
8687
fd.append("file", files[0]);
87-
8888
dataService.uploadFile("/api/upload?action=import", fd)
8989
.success(function (data) {
9090
toastr.success($rootScope.lbl.importedFromBlogML);
91+
spinOff();
9192
})
92-
.error(function () { toastr.error($rootScope.lbl.importFailed); });
93+
.error(function () { toastr.error($rootScope.lbl.importFailed); spinOff(); });
9394
}
9495

9596
$scope.testEmail = function () {

0 commit comments

Comments
 (0)