Commit d964f991 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #13670 TIME 1 url autocomplete + tinymce + error in reaffect user

parent d058eda2
......@@ -33,4 +33,3 @@ if (is_file($file)) {
unlink($file);
printf("Fichier custom/custom.xml migré en fichier json.\n");
}
......@@ -1316,14 +1316,10 @@ class UserController
if ($data['mode'] == 'reaffect') {
$listInstances = ListInstanceModel::getWithConfidentiality(['select' => ['listinstance.res_id'], 'entityId' => $aArgs['entityId'], 'userId' => $aArgs['id']]);
$resIdsToReplace = [];
foreach ($listInstances as $listInstance) {
$resIdsToReplace[] = $listInstance['res_id'];
}
$resIdsToReplace = array_column($listInstances, 'res_id');
if (!empty($resIdsToReplace)) {
$newUser = UserModel::getByLogin(['login' => $data['newUser'], 'select' => ['id']]);
ListInstanceModel::update([
'set' => ['item_id' => $newUser['id']],
'set' => ['item_id' => $data['newUser']['serialId']],
'where' => ['res_id in (?)', 'item_id = ?', 'process_date is null'],
'data' => [$resIdsToReplace, $aArgs['id']]
]);
......
......@@ -176,11 +176,11 @@ export class CreateAcknowledgementReceiptActionComponent implements OnInit, OnDe
initMce() {
tinymce.init({
selector: "textarea#emailSignature",
base_url: '../../node_modules/tinymce/',
base_url: '../node_modules/tinymce/',
readonly: false,
suffix: '.min',
language: this.lang.langISO.replace('-', '_'),
language_url: `../../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
language_url: `../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
menubar: false,
statusbar: false,
plugins: [
......
......@@ -176,13 +176,13 @@ export class TemplateAdministrationComponent implements OnInit, OnDestroy {
setTimeout(() => {
tinymce.remove('textarea');
// LOAD EDITOR TINYMCE for MAIL SIGN
tinymce.baseURL = '../../node_modules/tinymce';
tinymce.baseURL = '../node_modules/tinymce';
tinymce.suffix = '.min';
tinymce.init({
selector: selectorId,
statusbar: false,
language: this.lang.langISO.replace('-', '_'),
language_url: `../../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
language_url: `../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
height: '200',
plugins: [
'autoresize',
......
......@@ -202,7 +202,7 @@ export class FiltersToolComponent implements OnInit {
},
];
this.http.get('../..' + this.routeDatas + '?init' + this.filtersListService.getUrlFilters())
this.http.get('..' + this.routeDatas + '?init' + this.filtersListService.getUrlFilters())
.subscribe((data: any) => {
data.categories.forEach((element: any) => {
if (this.listProperties.categories.map((category: any) => (category.id)).indexOf(element.id) === -1) {
......
......@@ -226,19 +226,19 @@ export class ProfileComponent implements OnInit {
initMce() {
tinymce.remove('textarea');
// LOAD EDITOR TINYMCE for MAIL SIGN
tinymce.baseURL = '../../node_modules/tinymce';
tinymce.baseURL = '../node_modules/tinymce';
tinymce.suffix = '.min';
tinymce.init({
selector: 'textarea#emailSignature',
statusbar: false,
language: this.lang.langISO.replace('-', '_'),
language_url: `../../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
language_url: `../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
height: '200',
plugins: [
'textcolor'
],
external_plugins: {
'maarch_b64image': '../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js'
'maarch_b64image': '../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js'
},
menubar: false,
toolbar: 'undo | bold italic underline | alignleft aligncenter alignright | maarch_b64image | forecolor',
......
......@@ -143,7 +143,7 @@ export class SentResourcePageComponent implements OnInit {
initMce() {
tinymce.init({
selector: 'textarea#emailSignature',
base_url: '../../node_modules/tinymce/',
base_url: '../node_modules/tinymce/',
setup: (editor: any) => {
editor.on('init', (e: any) => {
this.loading = false;
......@@ -153,7 +153,7 @@ export class SentResourcePageComponent implements OnInit {
height: '400',
suffix: '.min',
language: this.lang.langISO.replace('-', '_'),
language_url: `../../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
language_url: `../node_modules/tinymce-i18n/langs/${this.lang.langISO.replace('-', '_')}.js`,
menubar: false,
statusbar: false,
plugins: [
......
......@@ -172,7 +172,7 @@ export class PluginAutocomplete implements OnInit {
let arrayObs: any = [];
let test: any = [];
this.routeDatas.forEach(element => {
arrayObs.push(this.http.get('../..' + element, { params: { "search": data } }));
arrayObs.push(this.http.get('..' + element, { params: { "search": data } }));
});
return forkJoin(arrayObs).pipe(
......@@ -204,7 +204,7 @@ export class PluginAutocomplete implements OnInit {
initFormValue() {
this.controlAutocomplete.value.forEach((ids: any) => {
this.http.get('../..' + this.manageDatas + '/' + ids).pipe(
this.http.get('..' + this.manageDatas + '/' + ids).pipe(
tap((data) => {
for (var key in data) {
this.valuesToDisplay[data[key].id] = data[key].label;
......@@ -267,7 +267,7 @@ export class PluginAutocomplete implements OnInit {
this.dialogRef.afterClosed().pipe(
filter((data: string) => data === 'ok'),
exhaustMap(() => this.http.post('../..' + this.manageDatas, { label: newElem[this.key] })),
exhaustMap(() => this.http.post('..' + this.manageDatas, { label: newElem[this.key] })),
tap((data: any) => {
for (var key in data) {
newElem['id'] = data[key];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment