#se-img-prop-dialog embed radio button set changes modified
parent
dbe84d8dc7
commit
cb9c75671a
|
@ -144,7 +144,7 @@ export class SeImgPropDialog extends HTMLElement {
|
|||
* @returns {any} observed
|
||||
*/
|
||||
static get observedAttributes () {
|
||||
return ['title', 'width', 'height', 'save', 'dialog'];
|
||||
return ['title', 'width', 'height', 'save', 'dialog', 'embed'];
|
||||
}
|
||||
/**
|
||||
* @function attributeChangedCallback
|
||||
|
@ -195,6 +195,16 @@ export class SeImgPropDialog extends HTMLElement {
|
|||
this.$imageOptRef.setAttribute('checked', false);
|
||||
}
|
||||
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:
|
||||
super.attributeChangedCallback(name, oldValue, newValue);
|
||||
break;
|
||||
|
@ -271,6 +281,20 @@ export class SeImgPropDialog extends HTMLElement {
|
|||
set 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
|
||||
* @returns {void}
|
||||
|
|
|
@ -4254,10 +4254,7 @@ editor.init = () => {
|
|||
const $imgDialog = document.getElementById('se-img-prop');
|
||||
editor.pref('img_save', 'ref');
|
||||
$imgDialog.setAttribute('save', 'ref');
|
||||
const $imageSaveOpts = $imgDialog.shadowRoot.querySelector('#image_save_opts');
|
||||
$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);
|
||||
$imgDialog.setAttribute('embed', 'one|' + uiStrings.notification.featNotSupported);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
|
Loading…
Reference in New Issue