Skip to content

Commit 9430c06

Browse files
committed
MOBILE-1987 folder: Fix file download size confirm
1 parent abb361a commit 9430c06

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

www/addons/mod/folder/templates/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<mm-context-menu-item priority="500" ng-if="size" content="size" icon-description="'ion-cube'" icon-action="'ion-trash-a'" action="removeFiles()"></mm-context-menu-item>
1010
</mm-context-menu>
1111
</ion-nav-buttons>
12-
<ion-content padding="true" mm-state-class>
12+
<ion-content mm-state-class>
1313
<ion-refresher pulling-text="{{ 'mm.core.pulltorefresh' | translate }}" ng-if="canReload" on-refresh="refreshFolder()"></ion-refresher>
1414
<mm-loading hide-until="folderLoaded">
1515
<mm-course-mod-description description="description" component="{{component}}" component-id="{{componentId}}" watch="true"></mm-course-mod-description>
@@ -22,7 +22,7 @@
2222
</a>
2323
</li>
2424
</ul>
25-
<div ng-if="!contents || contents.length == 0">
25+
<div class="padding" ng-if="!contents || contents.length == 0">
2626
<p>{{ 'mma.mod_folder.emptyfilelist' | translate}}</p>
2727
</div>
2828
</mm-loading>

www/core/directives/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ angular.module('mm.core')
233233
});
234234
} else {
235235
// File doesn't need to be opened (it's a prefetch). Show confirm modal if file size is defined and it's big.
236-
promise = fileSize ? $mmUtil.confirmDownloadSize(fileSize) : $q.when();
236+
promise = fileSize ? $mmUtil.confirmDownloadSize({size: fileSize, total: true}) : $q.when();
237237
promise.then(function() {
238238
// User confirmed, add the file to queue.
239239
$mmFilepool.invalidateFileByUrl(siteId, fileUrl).finally(function() {

www/core/scss/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ mm-timer {
688688

689689
.popover.mm-context-menu {
690690
width: 320px;
691+
max-width: 100%;
691692
}
692693

693694
.popup-container.mm-nohead .popup-head {

0 commit comments

Comments
 (0)