forked from CIT/Vmeda.Online
		
	MOBILE-2430 core: Add fab-icons to add actions
This commit is contained in:
		
							parent
							
								
									19269f36f9
								
							
						
					
					
						commit
						d1076eb794
					
				| @ -3,7 +3,7 @@ | |||||||
|         <ion-title><core-format-text [text]="title"></core-format-text></ion-title> |         <ion-title><core-format-text [text]="title"></core-format-text></ion-title> | ||||||
|     </ion-navbar> |     </ion-navbar> | ||||||
| </ion-header> | </ion-header> | ||||||
| <ion-content> | <ion-content [class.has-fab]="showUpload && root != 'site' && !path"> | ||||||
|     <ion-refresher [enabled]="filesLoaded && (showPrivateFiles || showSiteFiles)" (ionRefresh)="refreshData($event)"> |     <ion-refresher [enabled]="filesLoaded && (showPrivateFiles || showSiteFiles)" (ionRefresh)="refreshData($event)"> | ||||||
|         <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> |         <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> | ||||||
|     </ion-refresher> |     </ion-refresher> | ||||||
|  | |||||||
| @ -95,5 +95,10 @@ | |||||||
|         <a (click)="searchReset()">{{ 'addon.mod_data.resetsettings' | translate}}</a> |         <a (click)="searchReset()">{{ 'addon.mod_data.resetsettings' | translate}}</a> | ||||||
|     </core-empty-box> |     </core-empty-box> | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| </core-loading> | </core-loading> | ||||||
|  | 
 | ||||||
|  | <ion-fab bottom right *ngIf="canAdd"> | ||||||
|  |     <button ion-fab (click)="gotoAddEntries($event)" [attr.aria-label]="'addon.mod_data.addentries' | translate"> | ||||||
|  |         <ion-icon name="add"></ion-icon> | ||||||
|  |     </button> | ||||||
|  | </ion-fab> | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ | |||||||
| 
 | 
 | ||||||
| <!-- Content. --> | <!-- Content. --> | ||||||
| <core-split-view> | <core-split-view> | ||||||
|     <ion-content> |     <ion-content [class.has-fab]="forum && forum.cancreatediscussions"> | ||||||
|         <ion-refresher [enabled]="loaded" (ionRefresh)="doRefresh($event)"> |         <ion-refresher [enabled]="loaded" (ionRefresh)="doRefresh($event)"> | ||||||
|             <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> |             <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> | ||||||
|         </ion-refresher> |         </ion-refresher> | ||||||
| @ -25,11 +25,6 @@ | |||||||
|             </ion-card> |             </ion-card> | ||||||
| 
 | 
 | ||||||
|             <ng-container *ngIf="forum && discussions.length > 0"> |             <ng-container *ngIf="forum && discussions.length > 0"> | ||||||
|                 <div padding-horizontal margin-vertical *ngIf="forum.cancreatediscussions"> |  | ||||||
|                     <button ion-button block (click)="openNewDiscussion()"> |  | ||||||
|                         {{addDiscussionText}} |  | ||||||
|                     </button> |  | ||||||
|                 </div> |  | ||||||
|                 <ion-card *ngFor="let discussion of offlineDiscussions" (click)="openNewDiscussion(discussion.timecreated)" [class.addon-forum-discussion-selected]="discussion.timecreated == -selectedDiscussion"> |                 <ion-card *ngFor="let discussion of offlineDiscussions" (click)="openNewDiscussion(discussion.timecreated)" [class.addon-forum-discussion-selected]="discussion.timecreated == -selectedDiscussion"> | ||||||
|                     <ion-item text-wrap> |                     <ion-item text-wrap> | ||||||
|                         <ion-avatar item-start core-user-link [userId]="discussion.userid" [courseId]="courseId"> |                         <ion-avatar item-start core-user-link [userId]="discussion.userid" [courseId]="courseId"> | ||||||
| @ -97,5 +92,11 @@ | |||||||
|                 <ion-infinite-scroll-content></ion-infinite-scroll-content> |                 <ion-infinite-scroll-content></ion-infinite-scroll-content> | ||||||
|             </ion-infinite-scroll> |             </ion-infinite-scroll> | ||||||
|         </core-loading> |         </core-loading> | ||||||
|  | 
 | ||||||
|  |         <ion-fab bottom right *ngIf="forum && forum.cancreatediscussions"> | ||||||
|  |             <button ion-fab (click)="openNewDiscussion()" [attr.aria-label]="addDiscussionText"> | ||||||
|  |                 <ion-icon name="add"></ion-icon> | ||||||
|  |             </button> | ||||||
|  |         </ion-fab> | ||||||
|     </ion-content> |     </ion-content> | ||||||
| </core-split-view> | </core-split-view> | ||||||
|  | |||||||
| @ -677,6 +677,16 @@ canvas[core-chart] { | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .has-fab .scroll-content{ | ||||||
|  |   padding-bottom: 56px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .scroll-content ion-fab { | ||||||
|  |   position: fixed; | ||||||
|  |   margin-bottom: 56px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| // For some reason, in iOS the pages don't inherit the background-color from ion-app, set it explicitly. | // For some reason, in iOS the pages don't inherit the background-color from ion-app, set it explicitly. | ||||||
| .ion-page { | .ion-page { | ||||||
|   background-color: $background-color; |   background-color: $background-color; | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ core-empty-box { | |||||||
|       display: table-cell; |       display: table-cell; | ||||||
|       text-align: center; |       text-align: center; | ||||||
|       vertical-align: middle; |       vertical-align: middle; | ||||||
|  |       pointer-events: auto; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     &.core-empty-box-inline { |     &.core-empty-box-inline { | ||||||
|  | |||||||
| @ -1,6 +1,8 @@ | |||||||
| <ion-card *ngIf="description"> | <ion-card *ngIf="description"> | ||||||
|     <ion-item text-wrap> |     <ion-item text-wrap> | ||||||
|         <core-format-text [text]="description" [component]="component" [componentId]="componentId" [maxHeight]="showFull && showFull !== 'false' ? 0 : 120" fullOnClick="true"></core-format-text> |         <core-format-text [text]="description" [component]="component" [componentId]="componentId" [maxHeight]="showFull && showFull !== 'false' ? 0 : 120" fullOnClick="true"></core-format-text> | ||||||
|         <ion-note *ngIf="note" item-end>{{ note }}</ion-note> |     </ion-item> | ||||||
|  |     <ion-item text-wrap *ngIf="note"> | ||||||
|  |         <ion-note item-end>{{ note }}</ion-note> | ||||||
|     </ion-item> |     </ion-item> | ||||||
| </ion-card> | </ion-card> | ||||||
| @ -9,7 +9,7 @@ | |||||||
|         </ion-buttons> |         </ion-buttons> | ||||||
|     </ion-navbar> |     </ion-navbar> | ||||||
| </ion-header> | </ion-header> | ||||||
| <ion-content> | <ion-content class="has-fab"> | ||||||
|     <ion-list> |     <ion-list> | ||||||
|         <ion-item (click)="login(site.id)" *ngFor="let site of sites; let idx = index"> |         <ion-item (click)="login(site.id)" *ngFor="let site of sites; let idx = index"> | ||||||
|             <ion-avatar item-start> |             <ion-avatar item-start> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user