Merge pull request #1361 from crazyserver/MOBILE-2430

Mobile 2430
main
Juan Leyva 2018-06-21 09:20:33 +02:00 committed by GitHub
commit c7b38b5d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 75 additions and 42 deletions

View File

@ -11,7 +11,7 @@
<ion-card>
<ion-card-content>
<ion-card-title text-wrap>
<ion-icon *ngIf="!event.moduleIcon" name="{{event.icon}}" item-start></ion-icon>
<core-icon *ngIf="event.icon && !event.moduleIcon" [name]="event.icon" item-start></core-icon>
<core-format-text [text]="event.name"></core-format-text>
</ion-card-title>
<ion-item text-wrap>

View File

@ -23,7 +23,7 @@
<ion-list *ngIf="filteredEvents && filteredEvents.length" no-margin>
<a ion-item text-wrap *ngFor="let event of filteredEvents" [title]="event.name" (click)="gotoEvent(event.id)" [class.core-split-item-selected]="event.id == eventId">
<img *ngIf="event.moduleIcon" src="{{event.moduleIcon}}" item-start class="core-module-icon">
<ion-icon *ngIf="!event.moduleIcon" name="{{event.icon}}" item-start></ion-icon>
<core-icon *ngIf="event.icon && !event.moduleIcon" [name]="event.icon" item-start></core-icon>
<h2><core-format-text [text]="event.name"></core-format-text></h2>
<p>{{ event.timestart | coreToLocaleString }}</p>
</a>

View File

@ -24,11 +24,11 @@ export class AddonCalendarHelperProvider {
protected logger;
protected EVENTICONS = {
course: 'ionic',
course: 'fa-university',
group: 'people',
site: 'globe',
user: 'person',
category: 'albums'
category: 'fa-cubes'
};
constructor(logger: CoreLoggerProvider, private courseProvider: CoreCourseProvider) {

View File

@ -34,20 +34,21 @@ page-addon-mod-data-edit {
vertical-align: top;
}
.item.item-input.item-block .item-inner ion-input,
.item.item-input.item-input-has-focus .item-inner ion-input,
.item.item-input.input-has-focus .item-inner ion-input {
border: 0 !important;
box-shadow: none;
}
.addon-data-lantlong {
display: flex;
}
form, .addon-data-advanced-search {
.addon-data-contents form,
form .addon-data-advanced-search {
background-color: $list-background-color;
.item.item-input .item-block .item-inner ion-input,
.item.item-input.item-input-has-focus .item-inner ion-input,
.item.item-input.input-has-focus .item-inner ion-input {
border: 0 !important;
box-shadow: none;
}
.core-mark-required {
float: right;

View File

@ -2,11 +2,11 @@
<ion-input *ngIf="mode == 'search'" type="text" [placeholder]="field.name" [formControlName]="'f_'+field.id"></ion-input>
<span *ngIf="mode == 'edit'" [core-mark-required]="field.required" class="core-mark-required"></span>
<div class="addon-data-lantlong">
<div *ngIf="mode == 'edit'" class="addon-data-lantlong">
<ion-input type="text" [formControlName]="'f_'+field.id+'_0'" maxlength="10"></ion-input>
<span class="placeholder-icon" item-right>°N</span>
</div>
<div class="addon-data-lantlong">
<div *ngIf="mode == 'edit'" class="addon-data-lantlong">
<ion-input type="text" [formControlName]="'f_'+field.id+'_1'" maxlength="10"></ion-input>
<span class="placeholder-icon" item-right>°E</span>
</div>

View File

@ -10,8 +10,8 @@
</ion-header>
<ion-content>
<div class="fixed-content core-tabs-bar">
<a [attr.aria-selected]="!search.searchingAdvanced" (click)="toggleAdvanced()">{{ 'addon.mod_data.search' | translate}}</a>
<a [attr.aria-selected]="search.searchingAdvanced" (click)="toggleAdvanced()">{{ 'addon.mod_data.advancedsearch' | translate }}</a>
<a class="tab-slide" [attr.aria-selected]="!search.searchingAdvanced" (click)="toggleAdvanced()">{{ 'addon.mod_data.search' | translate}}</a>
<a class="tab-slide" [attr.aria-selected]="search.searchingAdvanced" (click)="toggleAdvanced()">{{ 'addon.mod_data.advancedsearch' | translate }}</a>
</div>
<form (ngSubmit)="searchEntries()" [formGroup]="searchForm">
<ion-list no-margin>

View File

@ -47,14 +47,26 @@ export class AddonModDataSearchPage {
this.data = params.get('data');
const advanced = {};
this.search.advanced.forEach((field) => {
advanced[field.name] = field.value ? this.textUtils.parseJSON(field.value) : '';
});
if (typeof this.search.advanced == 'object') {
Object.keys(this.search.advanced).forEach((index) => {
if (typeof this.search.advanced[index] != 'undefined' && typeof this.search.advanced[index].name != 'undefined') {
advanced[this.search.advanced[index].name] = this.search.advanced[index].value ?
this.textUtils.parseJSON(this.search.advanced[index].value) : '';
} else {
advanced[index] = this.search.advanced[index] ?
this.textUtils.parseJSON(this.search.advanced[index]) : '';
}
});
} else {
this.search.advanced.forEach((field) => {
advanced[field.name] = field.value ? this.textUtils.parseJSON(field.value) : '';
});
}
this.search.advanced = advanced;
this.searchForm = fb.group({
text: [this.search.text],
sortBy: [this.search.sortBy || 0],
sortBy: [this.search.sortBy || '0'],
sortDirection: [this.search.sortDirection || 'DESC'],
firstname: [this.search.advanced['firstname'] || ''],
lastname: [this.search.advanced['lastname'] || '']

View File

@ -64,7 +64,7 @@
</div>
</ion-item>
</ng-container>
<ion-grid>
<ion-grid *ngIf="!preview">
<ion-row align-items-center>
<ion-col *ngIf="hasPrevPage">
<button ion-button block outline icon-start (click)="gotoPage(true)">

View File

@ -49,7 +49,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
wiki: any; // The wiki instance.
isMainPage: boolean; // Whether the user is viewing wiki's main page (just entered the wiki).
canEdit = false; // Whether user can edit the page.
pageStr = this.translate.instant('addon.mod_wiki.page');
pageStr = '';
pageWarning: string; // Message telling that the page was discarded.
loadedSubwikis: any[] = []; // The loaded subwikis.
pageIsOffline: boolean; // Whether the loaded page is an offline page.
@ -83,6 +83,8 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
protected navCtrl: NavController, protected utils: CoreUtilsProvider, protected groupsProvider: CoreGroupsProvider,
protected userProvider: CoreUserProvider, private popoverCtrl: PopoverController) {
super(injector, content);
this.pageStr = this.translate.instant('addon.mod_wiki.page');
}
/**

View File

@ -180,8 +180,8 @@ ion-datetime {
}
/** Format Text */
core-format-text[maxHeight], *[core-format-text][maxHeight],
core-format-text[ng-reflect-max-height], *[core-format-text][ng-reflect-max-height] {
core-format-text[maxHeight],
core-format-text[ng-reflect-max-height] {
display: block;
position: relative;
width: 100%;
@ -254,8 +254,8 @@ core-format-text[ng-reflect-max-height], *[core-format-text][ng-reflect-max-heig
}
}
core-format-text[singleLine="true"], *[core-format-text][singleLine="true"],
core-format-text[ng-reflect-single-line="true"], *[core-format-text][ng-reflect-single-line="true"] {
core-format-text[singleLine="true"],
core-format-text[ng-reflect-single-line="true"] {
cursor: pointer;
pointer-events: auto;
white-space: nowrap;
@ -298,7 +298,7 @@ audio.core-media-adapt-width {
}
}
core-format-text, *[core-format-text] {
core-format-text {
audio, video, a, iframe {
pointer-events: auto;
}
@ -329,12 +329,6 @@ core-format-text, *[core-format-text] {
position: initial !important;
}
// Images in ion-card have width 100% and display block. Remove that when the image is in core-format-text.
img {
width: initial;
display: inline;
}
.core-disable-media-adapt,
.core-disable-media-adapt .core-media-adapt-width {
max-width: none !important;
@ -345,6 +339,12 @@ core-format-text, *[core-format-text] {
}
}
// Images in ion-card have width 100% and display block. Remove that when the image is in core-format-text.
ion-card core-format-text img {
width: initial;
display: inline;
}
// Message item.
.item-message {
core-format-text > p:only-child {

View File

@ -51,9 +51,13 @@ core-course-module {
}
.md core-course-module {
.core-module-description,
.core-module-description .core-show-more {
.core-module-description {
padding-right: $label-md-margin-end;
margin-bottom: $label-md-margin-bottom;
.core-module-description .core-show-more {
padding-right: $label-md-margin-end;
}
}
a.core-course-module-handler .core-module-icon {
@ -77,9 +81,13 @@ core-course-module {
}
.ios core-course-module {
.core-module-description,
.core-module-description .core-show-more {
.core-module-description {
padding-right: $label-ios-margin-end;
margin-bottom: $label-md-margin-bottom;
.core-module-description .core-show-more {
padding-right: $label-ios-margin-end;
}
}
a.core-course-module-handler .core-module-icon {
@ -98,9 +106,13 @@ core-course-module {
}
.wp core-course-module {
.core-module-description,
.core-module-description .core-show-more {
.core-module-description {
padding-right: ($item-wp-padding-end / 2);
margin-bottom: $label-md-margin-bottom;
.core-module-description .core-show-more {
padding-right: ($item-wp-padding-end / 2);
}
}
a.core-course-module-handler .core-module-icon {

View File

@ -61,7 +61,7 @@ export class CoreCoursesMainMenuHandler implements CoreMainMenuHandler {
};
} else {
return {
icon: 'ionic',
icon: 'fa-graduation-cap',
title: 'core.courses.mycourses',
page: 'CoreCoursesMyCoursesPage',
class: 'core-mycourses-handler'

View File

@ -1,3 +1,9 @@
page-core-mainmenu {
.ion-md-fa-graduation-cap,
.ion-ios-fa-graduation-cap,
.ion-wp-fa-graduation-cap,
.ion-fa-graduation-cap {
@extend .fa-graduation-cap;
@extend .fa;
}
}

View File

@ -23,7 +23,7 @@ import { CoreCoursesMyOverviewProvider } from '@core/courses/providers/my-overvi
@Injectable()
export class CoreSiteHomeMainMenuHandler implements CoreMainMenuHandler {
name = 'CoreSiteHome';
priority = 1000;
priority = 1200;
isOverviewEnabled: boolean;
constructor(private siteHomeProvider: CoreSiteHomeProvider, private myOverviewProvider: CoreCoursesMyOverviewProvider) { }