mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
tinymce auto save
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
{{Document.Assunto}}
|
{{Document.Assunto}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right cursor-pointer" (click)="openOptions()">
|
<!-- <div class="right cursor-pointer" (click)="openOptions()">
|
||||||
<fa-icon icon="ellipsis-v" class="menu-icon font-awesome-1"></fa-icon>
|
<fa-icon icon="ellipsis-v" class="menu-icon font-awesome-1"></fa-icon>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
@@ -26,13 +26,16 @@ apiKey="wr5dk69kive0qr9ig6y5spqvlj3a0tsiwnzdsexnz241k69p"
|
|||||||
plugins: [
|
plugins: [
|
||||||
'advlist autolink lists link image charmap print preview anchor',
|
'advlist autolink lists link image charmap print preview anchor',
|
||||||
'searchreplace visualblocks code fullscreen',
|
'searchreplace visualblocks code fullscreen',
|
||||||
'insertdatetime media table paste code help wordcount print'
|
'insertdatetime media table paste code help wordcount print autosave'
|
||||||
],
|
],
|
||||||
|
autosave_ask_before_unload: false,
|
||||||
|
autosave_interval: '30s',
|
||||||
toolbar:
|
toolbar:
|
||||||
'undo redo | formatselect | bold italic backcolor | \
|
'undo redo | formatselect | bold italic backcolor | \
|
||||||
alignleft aligncenter alignright alignjustify | \
|
alignleft aligncenter alignright alignjustify | \
|
||||||
bullist numlist outdent indent | removeformat | print | help' }"
|
bullist numlist outdent indent | removeformat | print | help' }"
|
||||||
initialValue='{{content}}'
|
initialValue='{{content}}'
|
||||||
[(ngModel)]="content"
|
[(ngModel)]="content"
|
||||||
(onSaveContent)="somefunction()"
|
(onSaveContent)="saveDraft()"
|
||||||
|
|
||||||
></editor>
|
></editor>
|
||||||
@@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { NavParams } from '@ionic/angular';
|
import { NavParams } from '@ionic/angular';
|
||||||
import { EventDetailsDocumentsOptionsPage } from '../shared/popover/event-details-documents-options/event-details-documents-options.page';
|
import { EventDetailsDocumentsOptionsPage } from '../shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||||
import { AlertController, ModalController } from '@ionic/angular';
|
import { AlertController, ModalController } from '@ionic/angular';
|
||||||
|
import { ProcessesService } from '../services/processes.service';
|
||||||
|
import { HttpErrorHandle } from '../services/http-error-handle.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-tiny-mce',
|
selector: 'app-tiny-mce',
|
||||||
templateUrl: './tiny-mce.page.html',
|
templateUrl: './tiny-mce.page.html',
|
||||||
@@ -22,6 +24,8 @@ export class TinyMCEPage implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
|
private processService: ProcessesService,
|
||||||
|
private erroHandler: HttpErrorHandle
|
||||||
|
|
||||||
) {
|
) {
|
||||||
this.Document = this.navParams.get('Document')
|
this.Document = this.navParams.get('Document')
|
||||||
@@ -36,9 +40,23 @@ export class TinyMCEPage implements OnInit {
|
|||||||
this.modalController.dismiss()
|
this.modalController.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
somefunction() {
|
saveDraft() {
|
||||||
console.log(this.content)
|
console.log(document)
|
||||||
}
|
let objectDraft = {
|
||||||
|
"status": false,
|
||||||
|
"description": this.Document.Assunto,
|
||||||
|
"content": this.content,
|
||||||
|
"path": this.Document.path,
|
||||||
|
"ownerId": this.Document.ownerId
|
||||||
|
}
|
||||||
|
this.processService.SaveDraftByID(this.Document.DocId, objectDraft).subscribe((res) => [
|
||||||
|
this.erroHandler.httpsSucessMessagge('Draft Save'),
|
||||||
|
this.modalController.dismiss()
|
||||||
|
],(error) => {
|
||||||
|
this.erroHandler.httpStatusHandle(error)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async openOptions() {
|
async openOptions() {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "59928bd49",
|
"shortSHA": "451b38f18",
|
||||||
"SHA": "59928bd49f0fafaa6a515fc0f33001b0160a5083",
|
"SHA": "451b38f18d50434a76982f87291ee761607505b2",
|
||||||
"branch": "developer-catch-merge",
|
"branch": "developer-catch-merge",
|
||||||
"lastCommitAuthor": "'Eudes Inácio'",
|
"lastCommitAuthor": "'Eudes Inácio'",
|
||||||
"lastCommitTime": "'Sun Jul 16 22:17:23 2023 +0100'",
|
"lastCommitTime": "'Mon Jul 17 10:52:44 2023 +0100'",
|
||||||
"lastCommitMessage": "pull made",
|
"lastCommitMessage": "Git verson update",
|
||||||
"lastCommitNumber": "5085",
|
"lastCommitNumber": "5087",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch developer-catch-merge\nYour branch and 'origin/developer-catch-merge' have diverged,\nand have 3 and 1 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)",
|
"changeStatus": "On branch developer-catch-merge\nYour branch and 'origin/developer-catch-merge' have diverged,\nand have 4 and 3 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/tiny-mce/tiny-mce.page.html\n\tmodified: src/app/tiny-mce/tiny-mce.page.ts\n\tnew file: src/assets/images/error_circle_warning.png",
|
||||||
"changeAuthor": "eudes.inacio"
|
"changeAuthor": "eudes.inacio"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user