Skip to content

Commit

Permalink
Merge pull request #359 from dpalou/MOBILE-1390
Browse files Browse the repository at this point in the history
MOBILE-1390 iframe: Fix iframes in old Android versions
  • Loading branch information
jleyva committed Jan 21, 2016
2 parents fc03771 + 071cb70 commit 5963e34
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 33 deletions.
15 changes: 4 additions & 11 deletions www/addons/mod_imscp/scss/styles.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@

.mma-imscp-container {
display: flex;
flex-flow: column;
height: 100%;
}

.mma-imscp-iframe-container {
flex: 1 1 auto;
position: relative;
.iframe-wrapper {
position: absolute;
}
top: 0;
right: 0;
left: 0;
bottom: 0;
}
6 changes: 2 additions & 4 deletions www/addons/mod_imscp/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
<ion-content>
<ion-refresher pulling-text="{{ 'mm.core.pulltorefresh' | translate }}" on-refresh="doRefresh()" ng-if="loaded"></ion-refresher>
<mm-loading hide-until="loaded">
<div class="mma-imscp-container">
<mm-navigation-bar previous="previousItem" next="nextItem" action="loadItem" info="description" title="{{ 'mm.core.description' | translate }}"></mm-navigation-bar>
<mm-iframe src="src" class="mma-imscp-iframe-container"></mm-iframe>
</div>
<mm-navigation-bar previous="previousItem" next="nextItem" action="loadItem" info="description" title="{{ 'mm.core.description' | translate }}"></mm-navigation-bar>
<mm-iframe src="src" class="mma-imscp-iframe-container"></mm-iframe>
</mm-loading>
</ion-content>
</ion-view>
15 changes: 4 additions & 11 deletions www/addons/mod_scorm/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ $mma-mod-scorm-warning-color: #c00 !default;
color: $mma-mod-scorm-warning-color;
}

.mma-mod-scorm-container {
display: flex;
flex-flow: column;
height: 100%;
}

.mma-mod-scorm-iframe-container {
flex: 1 1 auto;
position: relative;
.iframe-wrapper {
position: absolute;
}
top: 0;
right: 0;
left: 0;
bottom: 0;
}

ion-popover-view {
Expand Down
10 changes: 4 additions & 6 deletions www/addons/mod_scorm/templates/player.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
</button>
<ion-spinner ng-if="showToc && loadingToc"></ion-spinner>
</ion-nav-buttons>
<ion-content padding="true">
<ion-content>
<mm-loading hide-until="loaded">
<div class="mma-mod-scorm-container">
<mm-navigation-bar previous="previousSco" next="nextSco" action="loadSco" info="description" title="{{ 'mm.core.description' | translate }}"></mm-navigation-bar>
<mm-iframe ng-if="src" src="src" class="mma-mod-scorm-iframe-container" iframe-width="{{scorm.popup ? scorm.width : undefined}}" iframe-height="{{scorm.popup ? scorm.height : undefined}}"></mm-iframe>
<p ng-if="!src && errorMessage">{{ errorMessage | translate }}</p>
</div>
<mm-navigation-bar previous="previousSco" next="nextSco" action="loadSco" info="description" title="{{ 'mm.core.description' | translate }}"></mm-navigation-bar>
<mm-iframe ng-if="src" src="src" class="mma-mod-scorm-iframe-container" iframe-width="{{scorm.popup ? scorm.width : undefined}}" iframe-height="{{scorm.popup ? scorm.height : undefined}}"></mm-iframe>
<p ng-if="!src && errorMessage">{{ errorMessage | translate }}</p>
</mm-loading>
</ion-content>
</ion-view>
2 changes: 1 addition & 1 deletion www/core/templates/navigationbar.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="row">
<div class="row" ng-if="previous || info || next">
<div class="col">
<a class="button button-icon icon ion-arrow-left-b" ng-if="previous" ng-click="action(previous)" title="{{ 'mm.core.previous' | translate }}"></a>
</div>
Expand Down

0 comments on commit 5963e34

Please sign in to comment.