Overview
Comment:Fix saving edit of wiki pages in documents
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: cc108197d8c536d955ca8d33bb8008e13e16153931b88dcfda118f3e8fecd4c9
User & Date: bohwaz on 2021-11-29 16:13:45
Other Links: manifest | tags
Context
2021-11-29
16:15
Open text editor after creating a new text file, also resize the iframe correctly check-in: 2e84f0e59a user: bohwaz tags: trunk, stable
16:13
Fix saving edit of wiki pages in documents check-in: cc108197d8 user: bohwaz tags: trunk, stable
15:54
Redirect to new directory after creation check-in: 9e29fe82df user: bohwaz tags: trunk, stable
Changes

Modified src/www/admin/static/scripts/wiki_editor.js from [7a505bf40b] to [7df1c9bd9b].

248
249
250
251
252
253
254

255





256
257
258
259
260
261
262
263
			fetch(t.textarea.form.action + '&js', {
				method: 'post',
				body: data,
			}).then((response) => response.json())
			.then(data => {
				showSaved();
				t.textarea.defaultValue = t.textarea.value;

				t.textarea.form.querySelector('input[name=editing_started]').value = data.modified;





			}).catch(e => t.textarea.form.querySelector('[type=submit]').click() );
			return true;
		};

		let createToolbar = () => {
			appendButton('title', "Titre", applyHeader );
			appendButton('bold', 'Gras', applyBold );
			appendButton('italic', "Italique", applyItalic );







>
|
>
>
>
>
>
|







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
			fetch(t.textarea.form.action + '&js', {
				method: 'post',
				body: data,
			}).then((response) => response.json())
			.then(data => {
				showSaved();
				t.textarea.defaultValue = t.textarea.value;

				let e = t.textarea.form.querySelector('input[name=editing_started]');

				if (e) {
					e.value = data.modified;
				}

			}).catch(e => { console.log(e); t.textarea.form.querySelector('[type=submit]').click(); } );
			return true;
		};

		let createToolbar = () => {
			appendButton('title', "Titre", applyHeader );
			appendButton('bold', 'Gras', applyBold );
			appendButton('italic', "Italique", applyItalic );
310
311
312
313
314
315
316


317
318
		t.shortcuts.push({ctrl: true, key: 'g', callback: applyBold });
		t.shortcuts.push({ctrl: true, key: 'i', callback: applyItalic });
		t.shortcuts.push({ctrl: true, key: 't', callback: applyHeader });
		t.shortcuts.push({ctrl: true, key: 'l', callback: insertURL});
		t.shortcuts.push({ctrl: true, key: 's', callback: save});
		t.shortcuts.push({ctrl: true, shift: true, key: 'p', callback: openPreview});
		t.shortcuts.push({key: 'F1', callback: openSyntaxHelp});


	});
}());







>
>


316
317
318
319
320
321
322
323
324
325
326
		t.shortcuts.push({ctrl: true, key: 'g', callback: applyBold });
		t.shortcuts.push({ctrl: true, key: 'i', callback: applyItalic });
		t.shortcuts.push({ctrl: true, key: 't', callback: applyHeader });
		t.shortcuts.push({ctrl: true, key: 'l', callback: insertURL});
		t.shortcuts.push({ctrl: true, key: 's', callback: save});
		t.shortcuts.push({ctrl: true, shift: true, key: 'p', callback: openPreview});
		t.shortcuts.push({key: 'F1', callback: openSyntaxHelp});

		g.setParentDialogHeight('90%');
	});
}());