MOBILE-3657 core: Remove unnecessary item-content directive
This commit is contained in:
		
							parent
							
								
									4b60e3c3d4
								
							
						
					
					
						commit
						a6574c5b11
					
				| @ -22,7 +22,7 @@ | |||||||
|                 </ion-label> |                 </ion-label> | ||||||
|                 <ion-input type="text" name="name" [placeholder]="'addon.calendar.eventname' | translate" formControlName="name"> |                 <ion-input type="text" name="name" [placeholder]="'addon.calendar.eventname' | translate" formControlName="name"> | ||||||
|                 </ion-input> |                 </ion-input> | ||||||
|                 <core-input-errors item-content [control]="form.controls.name" [errorMessages]="errors"></core-input-errors> |                 <core-input-errors [control]="form.controls.name" [errorMessages]="errors"></core-input-errors> | ||||||
|             </ion-item> |             </ion-item> | ||||||
| 
 | 
 | ||||||
|             <!-- Date. --> |             <!-- Date. --> | ||||||
| @ -34,7 +34,7 @@ | |||||||
|                 </ion-label> |                 </ion-label> | ||||||
|                 <ion-datetime formControlName="timestart" [placeholder]="'core.date' | translate" [displayFormat]="dateFormat"> |                 <ion-datetime formControlName="timestart" [placeholder]="'core.date' | translate" [displayFormat]="dateFormat"> | ||||||
|                 </ion-datetime> |                 </ion-datetime> | ||||||
|                 <core-input-errors item-content [control]="form.controls.timestart" [errorMessages]="errors"></core-input-errors> |                 <core-input-errors [control]="form.controls.timestart" [errorMessages]="errors"></core-input-errors> | ||||||
|             </ion-item> |             </ion-item> | ||||||
| 
 | 
 | ||||||
|             <!-- Type. --> |             <!-- Type. --> | ||||||
| @ -135,7 +135,7 @@ | |||||||
|                     <ion-label position="stacked"> |                     <ion-label position="stacked"> | ||||||
|                         <h2>{{ 'core.description' | translate }}</h2> |                         <h2>{{ 'core.description' | translate }}</h2> | ||||||
|                     </ion-label> |                     </ion-label> | ||||||
|                     <core-rich-text-editor item-content [control]="descriptionControl" |                     <core-rich-text-editor [control]="descriptionControl" | ||||||
|                         [placeholder]="'core.description' | translate" name="description" [component]="component" |                         [placeholder]="'core.description' | translate" name="description" [component]="component" | ||||||
|                         [componentId]="eventId" [autoSave]="false"></core-rich-text-editor> |                         [componentId]="eventId" [autoSave]="false"></core-rich-text-editor> | ||||||
|                 </ion-item> |                 </ion-item> | ||||||
|  | |||||||
| @ -240,7 +240,7 @@ | |||||||
|                         <ion-input *ngIf="!grade.disabled" type="text" [(ngModel)]="grade.grade" min="0" [max]="gradeInfo!.grade" |                         <ion-input *ngIf="!grade.disabled" type="text" [(ngModel)]="grade.grade" min="0" [max]="gradeInfo!.grade" | ||||||
|                             [lang]="grade.lang"> |                             [lang]="grade.lang"> | ||||||
|                         </ion-input> |                         </ion-input> | ||||||
|                         <p item-content *ngIf="grade.disabled">{{ 'addon.mod_assign.gradelocked' | translate }}</p> |                         <p *ngIf="grade.disabled">{{ 'addon.mod_assign.gradelocked' | translate }}</p> | ||||||
|                     </ion-item> |                     </ion-item> | ||||||
| 
 | 
 | ||||||
|                     <!-- Grade using a scale. --> |                     <!-- Grade using a scale. --> | ||||||
| @ -262,7 +262,7 @@ | |||||||
|                                 {{grade.label}} |                                 {{grade.label}} | ||||||
|                             </ion-select-option> |                             </ion-select-option> | ||||||
|                         </ion-select> |                         </ion-select> | ||||||
|                         <p item-content *ngIf="!canSaveGrades || !outcome.itemNumber">{{ outcome.selected }}</p> |                         <p *ngIf="!canSaveGrades || !outcome.itemNumber">{{ outcome.selected }}</p> | ||||||
|                     </ion-item> |                     </ion-item> | ||||||
| 
 | 
 | ||||||
|                     <!-- Gradebook grade for simple grading. --> |                     <!-- Gradebook grade for simple grading. --> | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ | |||||||
| <!-- Edit --> | <!-- Edit --> | ||||||
| <ion-item class="ion-text-wrap" *ngIf="edit && loaded"> | <ion-item class="ion-text-wrap" *ngIf="edit && loaded"> | ||||||
|     <ion-label></ion-label> |     <ion-label></ion-label> | ||||||
|     <core-rich-text-editor item-content [control]="control" [placeholder]="plugin.name" |     <core-rich-text-editor [control]="control" [placeholder]="plugin.name" | ||||||
|         name="assignfeedbackcomments_editor" [component]="component" [componentId]="assign.cmid" [autoSave]="true" |         name="assignfeedbackcomments_editor" [component]="component" [componentId]="assign.cmid" [autoSave]="true" | ||||||
|         contextLevel="module" [contextInstanceId]="assign.cmid" elementId="assignfeedbackcomments_editor" |         contextLevel="module" [contextInstanceId]="assign.cmid" elementId="assignfeedbackcomments_editor" | ||||||
|         [draftExtraParams]="{userid: userId, action: 'grade'}"> |         [draftExtraParams]="{userid: userId, action: 'grade'}"> | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ | |||||||
|                     </ion-label> |                     </ion-label> | ||||||
|                     <ion-checkbox slot="end" name="submissionstatement" [(ngModel)]="submissionStatementAccepted"></ion-checkbox> |                     <ion-checkbox slot="end" name="submissionstatement" [(ngModel)]="submissionStatementAccepted"></ion-checkbox> | ||||||
|                     <!-- ion-checkbox doesn't use an input. Create a hidden input to hold the value. --> |                     <!-- ion-checkbox doesn't use an input. Create a hidden input to hold the value. --> | ||||||
|                     <input item-content type="hidden" [ngModel]="submissionStatementAccepted" name="submissionstatement"> |                     <input type="hidden" [ngModel]="submissionStatementAccepted" name="submissionstatement"> | ||||||
|                 </ion-item> |                 </ion-item> | ||||||
| 
 | 
 | ||||||
|                 <addon-mod-assign-submission-plugin *ngFor="let plugin of userSubmission.plugins" [assign]="assign" |                 <addon-mod-assign-submission-plugin *ngFor="let plugin of userSubmission.plugins" [assign]="assign" | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
|     <ion-input *ngIf="searchMode" type="text" [placeholder]="field.name" [formControlName]="'f_'+field.id"></ion-input> |     <ion-input *ngIf="searchMode" type="text" [placeholder]="field.name" [formControlName]="'f_'+field.id"></ion-input> | ||||||
| 
 | 
 | ||||||
|     <span *ngIf="editMode" [core-mark-required]="field.required" class="core-mark-required"></span> |     <span *ngIf="editMode" [core-mark-required]="field.required" class="core-mark-required"></span> | ||||||
|     <core-rich-text-editor *ngIf="editMode" item-content [control]="form.controls['f_'+field.id]" [placeholder]="field.name" |     <core-rich-text-editor *ngIf="editMode" [control]="form.controls['f_'+field.id]" [placeholder]="field.name" | ||||||
|         [formControlName]="'f_'+field.id" [component]="component" [componentId]="componentId" [autoSave]="true" |         [formControlName]="'f_'+field.id" [component]="component" [componentId]="componentId" [autoSave]="true" | ||||||
|         contextLevel="module" [contextInstanceId]="componentId" [elementId]="'field_'+field.id" ngDefaultControl> |         contextLevel="module" [contextInstanceId]="componentId" [elementId]="'field_'+field.id" ngDefaultControl> | ||||||
|     </core-rich-text-editor> |     </core-rich-text-editor> | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ | |||||||
|         </ion-item> |         </ion-item> | ||||||
|         <ion-item> |         <ion-item> | ||||||
|             <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> |             <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> | ||||||
|             <core-rich-text-editor item-content elementId="message" |             <core-rich-text-editor elementId="message" | ||||||
|                 [name]="'mod_forum_reply_' + replyData.id" [control]="messageControl" |                 [name]="'mod_forum_reply_' + replyData.id" [control]="messageControl" | ||||||
|                 [placeholder]="'addon.mod_forum.replyplaceholder' | translate" [autoSave]="true" |                 [placeholder]="'addon.mod_forum.replyplaceholder' | translate" [autoSave]="true" | ||||||
|                 [component]="component" [componentId]="componentId" [draftExtraParams]="{edit: replyData.id}" |                 [component]="component" [componentId]="componentId" [draftExtraParams]="{edit: replyData.id}" | ||||||
|  | |||||||
| @ -108,7 +108,7 @@ | |||||||
|         </ion-item> |         </ion-item> | ||||||
|         <ion-item> |         <ion-item> | ||||||
|             <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> |             <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> | ||||||
|             <core-rich-text-editor item-content elementId="message" contextLevel="module" |             <core-rich-text-editor elementId="message" contextLevel="module" | ||||||
|                 [control]="messageControl" [placeholder]="'addon.mod_forum.replyplaceholder' | translate" |                 [control]="messageControl" [placeholder]="'addon.mod_forum.replyplaceholder' | translate" | ||||||
|                 [name]="'mod_forum_reply_' + post.id" [component]="component" [componentId]="componentId" [autoSave]="true" |                 [name]="'mod_forum_reply_' + post.id" [component]="component" [componentId]="componentId" [autoSave]="true" | ||||||
|                 [contextInstanceId]="forum && forum.cmid" [draftExtraParams]="{reply: post.id}" |                 [contextInstanceId]="forum && forum.cmid" [draftExtraParams]="{reply: post.id}" | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ | |||||||
|             </ion-item> |             </ion-item> | ||||||
|             <ion-item> |             <ion-item> | ||||||
|                 <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> |                 <ion-label position="stacked">{{ 'addon.mod_forum.message' | translate }}</ion-label> | ||||||
|                 <core-rich-text-editor item-content name="addon_mod_forum_new_discussion" contextLevel="module" elementId="message" |                 <core-rich-text-editor name="addon_mod_forum_new_discussion" contextLevel="module" elementId="message" | ||||||
|                     [control]="messageControl" [placeholder]="'addon.mod_forum.message' | translate" [component]="component" |                     [control]="messageControl" [placeholder]="'addon.mod_forum.message' | translate" [component]="component" | ||||||
|                     [componentId]="forum.cmid" [autoSave]="true" [contextInstanceId]="forum.cmid" |                     [componentId]="forum.cmid" [autoSave]="true" [contextInstanceId]="forum.cmid" | ||||||
|                     (contentChanged)="onMessageChange($event)"> |                     (contentChanged)="onMessageChange($event)"> | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ | |||||||
|         <span [core-mark-required]="required">{{ field.name }}</span> |         <span [core-mark-required]="required">{{ field.name }}</span> | ||||||
|         <core-input-errors [control]="control"></core-input-errors> |         <core-input-errors [control]="control"></core-input-errors> | ||||||
|     </ion-label> |     </ion-label> | ||||||
|     <core-rich-text-editor item-content [control]="control" [placeholder]="field.name" [autoSave]="true" |     <core-rich-text-editor [control]="control" [placeholder]="field.name" [autoSave]="true" | ||||||
|         [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [elementId]="modelName"> |         [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [elementId]="modelName"> | ||||||
|     </core-rich-text-editor> |     </core-rich-text-editor> | ||||||
| </ion-item> | </ion-item> | ||||||
|  | |||||||
| @ -27,15 +27,12 @@ import { Translate } from '@singletons'; | |||||||
|  * |  * | ||||||
|  * Please notice that the inputs need to have a FormControl to make it work. That FormControl needs to be passed to this component. |  * Please notice that the inputs need to have a FormControl to make it work. That FormControl needs to be passed to this component. | ||||||
|  * |  * | ||||||
|  * If this component is placed in the same ion-item as a ion-label or ion-input, then it should have the attribute "item-content", |  | ||||||
|  * otherwise Ionic will remove it. |  | ||||||
|  * |  | ||||||
|  * Example usage: |  * Example usage: | ||||||
|  * |  * | ||||||
|  * <ion-item class="ion-text-wrap"> |  * <ion-item class="ion-text-wrap"> | ||||||
|  *     <ion-label stacked core-mark-required="true">{{ 'core.login.username' | translate }}</ion-label> |  *     <ion-label stacked core-mark-required="true">{{ 'core.login.username' | translate }}</ion-label> | ||||||
|  *     <ion-input type="text" name="username" formControlName="username"></ion-input> |  *     <ion-input type="text" name="username" formControlName="username"></ion-input> | ||||||
|  *     <core-input-errors item-content [control]="myForm.controls.username" [errorMessages]="usernameErrors"></core-input-errors> |  *     <core-input-errors [control]="myForm.controls.username" [errorMessages]="usernameErrors"></core-input-errors> | ||||||
|  * </ion-item> |  * </ion-item> | ||||||
|  */ |  */ | ||||||
| @Component({ | @Component({ | ||||||
|  | |||||||
| @ -44,7 +44,7 @@ import { CoreEditorOffline } from '../../services/editor-offline'; | |||||||
|  * If enabled, this component will show a rich text editor. Otherwise it'll show a regular textarea. |  * If enabled, this component will show a rich text editor. Otherwise it'll show a regular textarea. | ||||||
|  * |  * | ||||||
|  * Example: |  * Example: | ||||||
|  * <core-rich-text-editor item-content [control]="control" [placeholder]="field.name"></core-rich-text-editor> |  * <core-rich-text-editor [control]="control" [placeholder]="field.name"></core-rich-text-editor> | ||||||
|  */ |  */ | ||||||
| @Component({ | @Component({ | ||||||
|     selector: 'core-rich-text-editor', |     selector: 'core-rich-text-editor', | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ | |||||||
|         <ion-label> |         <ion-label> | ||||||
|             <h2>{{ 'core.settings.fontsize' | translate }}</h2> |             <h2>{{ 'core.settings.fontsize' | translate }}</h2> | ||||||
|         </ion-label> |         </ion-label> | ||||||
|         <ion-segment [(ngModel)]="selectedZoomLevel" (ionChange)="zoomLevelChanged()" color="primary" item-content> |         <ion-segment [(ngModel)]="selectedZoomLevel" (ionChange)="zoomLevelChanged()" color="primary"> | ||||||
|             <ion-segment-button *ngFor="let zoomLevel of zoomLevels" [value]="zoomLevel.value" |             <ion-segment-button *ngFor="let zoomLevel of zoomLevels" [value]="zoomLevel.value" | ||||||
|                 [ngStyle]="{'font-size.px': zoomLevel.style}"> |                 [ngStyle]="{'font-size.px': zoomLevel.style}"> | ||||||
|                 <ion-label> |                 <ion-label> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user