Skip to content

Commit

Permalink
Merge pull request #215 from dpaloucva/MOBILE-1145
Browse files Browse the repository at this point in the history
MOBILE-1145 formatText: Apply float fix only to certain elements
  • Loading branch information
jleyva committed Sep 10, 2015
2 parents 634ce71 + 4d14f78 commit 4d62590
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion www/addons/calendar/templates/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3>{{ 'mm.core.course' | translate}}</h3>
<img ng-src="{{event.moduleicon}}"> {{event.modulename}}
</li>
<li class="item item-text-wrap" ng-if="event.description">
<mm-format-text watch="true">{{event.description}}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true">{{event.description}}</mm-format-text>
</li>
</ul>
</article>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod_assign/templates/submission.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ion-view>
<ion-nav-title>{{ title }}</ion-nav-title>
<ion-content padding="true">
<p><mm-format-text watch="true">{{ submission.text }}</mm-format-text></p>
<p><mm-format-text class="mm-content-with-float" watch="true">{{ submission.text }}</mm-format-text></p>
<mm-file ng-repeat="attachment in submission.attachments" file="attachment" component="{{component}}" component-id="{{submission.id}}"></mm-file>
</ion-content>
</ion-view>
2 changes: 1 addition & 1 deletion www/addons/mod_book/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<mm-course-mod-description description="description"></mm-course-mod-description>
<mma-mod-book-arrows previous="previousChapter" next="nextChapter" action="loadChapter"></mma-mod-book-arrows>
<div>
<mm-format-text watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
</div>
<mma-mod-book-arrows previous="previousChapter" next="nextChapter" action="loadChapter"></mma-mod-book-arrows>
</mm-loading>
Expand Down
4 changes: 2 additions & 2 deletions www/addons/mod_forum/templates/discussion.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>{{discussion.subject}}</h2>
<p>{{discussion.userfullname}}</p>
</div>
<div class="item item-body">
<mm-format-text watch="true">{{discussion.message}}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true">{{discussion.message}}</mm-format-text>
<mm-file ng-repeat="attachment in discussion.attachments" file="attachment" component="{{component}}" component-id="{{discussion.id}}"></mm-file>
</div>
</article>
Expand All @@ -29,7 +29,7 @@ <h2>{{discussion.subject}}</h2>
<p>{{post.subject}}</p>
</div>
<div class="item item-body">
<mm-format-text watch="true">{{post.message}}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true">{{post.message}}</mm-format-text>
<mm-file ng-repeat="attachment in post.attachments" file="attachment" component="{{component}}" component-id="{{post.id}}"></mm-file>
</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod_imscp/templates/description.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ <h1 class="title">{{ 'mm.core.description' | translate}}</h1>
<button class="button button-icon ion-close-round" ng-click="closeDescription()" aria-label="{{ 'mm.core.close' | translate }}"></button>
</ion-header-bar>
<ion-content class="padding">
<mm-format-text>{{ description }}</mm-format-text>
<mm-format-text class="mm-content-with-float">{{ description }}</mm-format-text>
</ion-content>
</ion-modal-view>
2 changes: 1 addition & 1 deletion www/addons/mod_page/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<mm-loading hide-until="loaded">
<mm-course-mod-description description="description"></mm-course-mod-description>
<article>
<mm-format-text watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
</article>
</mm-loading>
</ion-content>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod_resource/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>

<div ng-if="mode == 'inline'">
<mm-format-text watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
</div>

<div ng-if="mode == 'external'">
Expand Down
2 changes: 1 addition & 1 deletion www/addons/notifications/templates/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h2>{{notification.userfromfullname}}</h2>
<p>{{notification.timecreated | mmDateDayOrTime}}</p>
</div>
<div class="item item-body">
<p><mm-format-text watch="true">{{ notification.mobiletext | mmCreateLinks | mmaNotificationsFormat }}</mm-format-text></p>
<p><mm-format-text class="mm-content-with-float" watch="true">{{ notification.mobiletext | mmCreateLinks | mmaNotificationsFormat }}</mm-format-text></p>
</div>
<mma-notifications-actions contexturl="notification.contexturl" courseid="notification.courseid"></mma-notifications-actions>
</article>
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/course/templates/mod_description.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="card" ng-if="description">
<div class="item item-text-wrap item-body">
<mm-format-text>{{ description }}</mm-format-text>
<mm-format-text class="mm-content-with-float">{{ description }}</mm-format-text>
<p ng-if="note"><span class="item-note">{{ note }}</span></p>
</div>
</div>
4 changes: 2 additions & 2 deletions www/core/components/course/templates/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<section class="card" ng-if="summary">
<!-- Only displayed when 1 section per page. -->
<div class="item item-text-wrap">
<article><mm-format-text>{{ summary }}</mm-format-text></article>
<article><mm-format-text class="mm-content-with-float">{{ summary }}</mm-format-text></article>
</div>
</section>

Expand All @@ -19,7 +19,7 @@ <h2>{{ section.name }}</h2>
</div>

<div class="item item-text-wrap" ng-if="sections.length > 1 && section.summary">
<mm-format-text>{{ section.summary }}</mm-format-text>
<mm-format-text class="mm-content-with-float">{{ section.summary }}</mm-format-text>
</div>

<a class="item item-text-wrap" ng-repeat="module in section.modules" ng-click="action($event)" ng-class="{'item-button-right': buttons && buttons.length > 0, 'item-media': icon, 'item-completion': module.completionstatus}" ng-controller="module._controller" title="{{ title }}">
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/courses/templates/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2><mm-format-text watch="true">{{course.fullname}}</mm-format-text></h2>
<div class="item item-text-wrap" ng-show="course.summary">
<p>
<summary>
<mm-format-text watch="true" shorten="150" expand-on-click="true">{{course.summary}}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true" shorten="150" expand-on-click="true">{{course.summary}}</mm-format-text>
</summary>
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/login/templates/help-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ <h1 class="title">{{ 'mm.login.help' | translate}}</h1>
<button class="button button-icon ion-close-round" ng-click="closeHelp()" aria-label="{{ 'mm.core.close' | translate }}"></button>
</ion-header-bar>
<ion-content class="padding">
<mm-format-text>{{ 'mm.login.helpmelogin' | translate}}</mm-format-text>
<mm-format-text class="mm-content-with-float">{{ 'mm.login.helpmelogin' | translate}}</mm-format-text>
</ion-content>
</ion-modal-view>
2 changes: 1 addition & 1 deletion www/core/components/user/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h2>{{ 'mm.user.details' | translate}}</h2>
<h2>{{ 'mm.user.description' | translate}}</h2>
</div>
<div class="item item-text-wrap" ng-if="user.description">
<mm-format-text watch="true">{{user.description}}</mm-format-text>
<mm-format-text class="mm-content-with-float" watch="true">{{user.description}}</mm-format-text>
</div>

<div ng-repeat="handler in profileHandlers | orderBy:'-priority'" ng-controller="handler.controller">
Expand Down
2 changes: 1 addition & 1 deletion www/core/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ em {
}

// mm-format-text can have elements with float. These styles makes sure height is calculated right.
mm-format-text {
.mm-content-with-float {
display: inline-block;
width: 100%;
}
Expand Down

0 comments on commit 4d62590

Please sign in to comment.