#se-img-prop-dialog embed radio button set changes modified
This commit is contained in:
@@ -144,7 +144,7 @@ export class SeImgPropDialog extends HTMLElement {
|
|||||||
* @returns {any} observed
|
* @returns {any} observed
|
||||||
*/
|
*/
|
||||||
static get observedAttributes () {
|
static get observedAttributes () {
|
||||||
return ['title', 'width', 'height', 'save', 'dialog'];
|
return ['title', 'width', 'height', 'save', 'dialog', 'embed'];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @function attributeChangedCallback
|
* @function attributeChangedCallback
|
||||||
@@ -195,6 +195,16 @@ export class SeImgPropDialog extends HTMLElement {
|
|||||||
this.$imageOptRef.setAttribute('checked', false);
|
this.$imageOptRef.setAttribute('checked', false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'embed':
|
||||||
|
if (newValue.includes('one')) {
|
||||||
|
const data = newValue.split('|');
|
||||||
|
if (data.length > 1) {
|
||||||
|
this._shadowRoot.querySelector('#image_opt_embed').setAttribute('title', data[1]);
|
||||||
|
this._shadowRoot.querySelector('#image_opt_embed').setAttribute('disabled', 'disabled');
|
||||||
|
this._shadowRoot.querySelector('#image_opt_embed').style.color = '#666';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
super.attributeChangedCallback(name, oldValue, newValue);
|
super.attributeChangedCallback(name, oldValue, newValue);
|
||||||
break;
|
break;
|
||||||
@@ -271,6 +281,20 @@ export class SeImgPropDialog extends HTMLElement {
|
|||||||
set dialog (value) {
|
set dialog (value) {
|
||||||
this.setAttribute('dialog', value);
|
this.setAttribute('dialog', value);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @function get
|
||||||
|
* @returns {any}
|
||||||
|
*/
|
||||||
|
get embed () {
|
||||||
|
return this.hasAttribute('embed');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @function set
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
set embed (value) {
|
||||||
|
this.setAttribute('embed', value);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @function connectedCallback
|
* @function connectedCallback
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
|
|||||||
@@ -4254,10 +4254,7 @@ editor.init = () => {
|
|||||||
const $imgDialog = document.getElementById('se-img-prop');
|
const $imgDialog = document.getElementById('se-img-prop');
|
||||||
editor.pref('img_save', 'ref');
|
editor.pref('img_save', 'ref');
|
||||||
$imgDialog.setAttribute('save', 'ref');
|
$imgDialog.setAttribute('save', 'ref');
|
||||||
const $imageSaveOpts = $imgDialog.shadowRoot.querySelector('#image_save_opts');
|
$imgDialog.setAttribute('embed', 'one|' + uiStrings.notification.featNotSupported);
|
||||||
$imageSaveOpts.querySelector('[value=embed]').setAttribute('disabled', 'disabled');
|
|
||||||
$imageSaveOpts.querySelector('#image_opt_embed').style.color = "#666";
|
|
||||||
$imageSaveOpts.querySelector('#image_opt_embed').setAttribute('title', uiStrings.notification.featNotSupported);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user