Merge pull request #3593 from NoelDeMartin/MOBILE-4270

MOBILE-4270: Tweaks
main
Dani Palou 2023-04-03 08:49:38 +02:00 committed by GitHub
commit 3980e6c8ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 7 deletions

View File

@ -16,7 +16,7 @@
[iconAction]="syncIcon" [closeOnClick]="false"> [iconAction]="syncIcon" [closeOnClick]="false">
</core-context-menu-item> </core-context-menu-item>
<core-context-menu-item [hidden]="!event || !event.canedit || event.deleted || (!canEdit && event.id > 0)" [priority]="300" <core-context-menu-item [hidden]="!event || !event.canedit || event.deleted || (!canEdit && event.id > 0)" [priority]="300"
[content]="'core.edit' | translate" (action)="openEdit()" iconAction="fas-pen-to-square"> [content]="'core.edit' | translate" (action)="openEdit()" iconAction="fas-pen">
</core-context-menu-item> </core-context-menu-item>
<core-context-menu-item [hidden]="!event || !event.candelete || event.deleted" [priority]="200" <core-context-menu-item [hidden]="!event || !event.candelete || event.deleted" [priority]="200"
[content]="'core.delete' | translate" (action)="deleteEvent()" iconAction="fas-trash"></core-context-menu-item> [content]="'core.delete' | translate" (action)="deleteEvent()" iconAction="fas-trash"></core-context-menu-item>

View File

@ -3,7 +3,7 @@
</ion-button> </ion-button>
<ion-button size="small" *ngIf="action == 'edit'" fill="clear" (click)="editEntry()" [attr.aria-label]="'core.edit' | translate"> <ion-button size="small" *ngIf="action == 'edit'" fill="clear" (click)="editEntry()" [attr.aria-label]="'core.edit' | translate">
<ion-icon name="fas-gear" slot="icon-only" aria-hidden="true"></ion-icon> <ion-icon name="fas-pen" slot="icon-only" aria-hidden="true"></ion-icon>
</ion-button> </ion-button>
<ion-button size="small" *ngIf="action == 'delete' && !entry.deleted" fill="clear" color="danger" (click)="deleteEntry()" <ion-button size="small" *ngIf="action == 'delete' && !entry.deleted" fill="clear" color="danger" (click)="deleteEntry()"

View File

@ -714,7 +714,9 @@ export class AddonModDataHelperProvider {
courseId = await this.getActivityCourseIdIfNotSet(dataId, courseId, siteId); courseId = await this.getActivityCourseIdIfNotSet(dataId, courseId, siteId);
} }
AddonModData.deleteEntry(dataId, entryId, courseId!, siteId); if (courseId) {
await AddonModData.deleteEntry(dataId, entryId, courseId, siteId);
}
} catch (message) { } catch (message) {
CoreDomUtils.showErrorModalDefault(message, 'addon.mod_data.errordeleting', true); CoreDomUtils.showErrorModalDefault(message, 'addon.mod_data.errordeleting', true);

View File

@ -14,7 +14,7 @@
<core-context-menu> <core-context-menu>
<core-context-menu-item *ngIf="canEdit && (isOnline || pageIsOffline)" [priority]="590" [content]="'core.edit' | translate" <core-context-menu-item *ngIf="canEdit && (isOnline || pageIsOffline)" [priority]="590" [content]="'core.edit' | translate"
iconAction="fas-pen-to-square" (action)="goToEditPage()"> iconAction="fas-pen" (action)="goToEditPage()">
</core-context-menu-item> </core-context-menu-item>
<core-context-menu-item *ngIf="canEdit" [priority]="580" [content]="'addon.mod_wiki.createpage' | translate" iconAction="fas-plus" <core-context-menu-item *ngIf="canEdit" [priority]="580" [content]="'addon.mod_wiki.createpage' | translate" iconAction="fas-plus"
(action)="goToNewPage()"> (action)="goToNewPage()">

View File

@ -220,7 +220,7 @@
</ion-button> </ion-button>
<ion-button expand="block" *ngIf="access.modifyingsubmissionallowed && submission" (click)="gotoSubmit()" <ion-button expand="block" *ngIf="access.modifyingsubmissionallowed && submission" (click)="gotoSubmit()"
class="ion-text-wrap ion-margin"> class="ion-text-wrap ion-margin">
<ion-icon slot="start" name="fas-pen-to-square" aria-hidden="true"></ion-icon> <ion-icon slot="start" name="fas-pen" aria-hidden="true"></ion-icon>
{{ 'addon.mod_workshop.editsubmission' | translate }} {{ 'addon.mod_workshop.editsubmission' | translate }}
</ion-button> </ion-button>
</div> </div>

View File

@ -33,7 +33,7 @@
<ion-item class="ion-text-wrap" *ngIf="canEdit || canDelete"> <ion-item class="ion-text-wrap" *ngIf="canEdit || canDelete">
<ion-label> <ion-label>
<ion-button expand="block" *ngIf="canEdit" (click)="editSubmission()"> <ion-button expand="block" *ngIf="canEdit" (click)="editSubmission()">
<ion-icon name="fas-pen-to-square" slot="start" aria-hidden="true"></ion-icon> <ion-icon name="fas-pen" slot="start" aria-hidden="true"></ion-icon>
{{ 'addon.mod_workshop.editsubmission' | translate }} {{ 'addon.mod_workshop.editsubmission' | translate }}
</ion-button> </ion-button>
<ion-button expand="block" *ngIf="!submission.deleted && canDelete" color="danger" (click)="deleteSubmission()"> <ion-button expand="block" *ngIf="!submission.deleted && canDelete" color="danger" (click)="deleteSubmission()">

View File

@ -139,7 +139,7 @@
"drivers-license": "id-card", "drivers-license": "id-card",
"earth-america": "earth-americas", "earth-america": "earth-americas",
"earth": "earth-americas", "earth": "earth-americas",
"edit": "pen-to-square", "edit": "pen",
"ellipsis-h": "ellipsis", "ellipsis-h": "ellipsis",
"ellipsis-v": "ellipsis-vertical", "ellipsis-v": "ellipsis-vertical",
"envelope-square": "square-envelope", "envelope-square": "square-envelope",