Lines Matching defs:attributes
6 #attributes = {
23 constructor(attributes, onsubmit, onclose = null) {
25 const fields = DiagramsForm.#getFields(attributes);
28 this.#attributes = {
29 ...this.#attributes,
30 ...attributes
38 this.#onsubmitCB(this.#attributes);
50 this.#getButtonsMediaManager(this.#attributes);
51 this.#getButtonsEditor(this.#attributes);
56 #getButtonsEditor(attributes) {
57 if (attributes.type === 'embed' || attributes.id) {
68 if (attributes.type === 'mediafile') {
69 const diagramsEditor = new DiagramsEditor(this.onSavedMediaFile.bind(this, attributes.id));
70 diagramsEditor.editMediaFile(attributes.id);
73 diagramsEditor.editMemory(attributes.url, this.onSaveEmbed.bind(this));
79 #getButtonsMediaManager(attributes) {
81 if (attributes.type === 'mediafile') {
102 static #getFields(attributes) {
118 if (attributes.type === 'mediafile') {
130 * Updates the form to reflect the current internal attributes
133 for (const [key, value] of Object.entries(this.#attributes)) {
140 * Update the internal attributes to reflect the current form state
143 for (const [key, value] of Object.entries(this.#attributes)) {
146 this.#attributes[key] = $elem.val();
156 if (this.#attributes.type === 'mediafile') {
157 this.#attributes.url = `${DOKU_BASE}lib/exe/fetch.php?media=${this.#attributes.id}`;
180 this.#attributes.url = 'data:image/svg+xml;base64,' + encSvg;
208 this.#attributes.id = mediaid;