1var Dialog = (function() { 2 function Dialog(context) { 3 this.context = context; 4 } 5 6 function _updateContent(context) { 7 var btn = document.getElementById('actionBtn'), ctxText = document 8 .querySelector('.stc-context-text'); 9 btn.setAttribute('value', context.buttonText); 10 btn.setAttribute('name', context.buttonText); 11 ctxText.innerHTML = context.contentText; 12 } 13 14 Dialog.prototype.open = function() { 15 _updateContent(this.context); 16 if (!this._featherLight) { 17 this._featherLight = sv_featherlight(document 18 .getElementById(this.context.componentId), 19 this.context.configuration); 20 } else { 21 console.warn('Dialog already opened...'); 22 } 23 }; 24 25 Dialog.prototype.update = function(context) { 26 this.context = context; 27 _updateContent(this.context); 28 }; 29 30 Dialog.prototype.close = function() { 31 if (this._featherLight) { 32 this._featherLight.close(); 33 this._featherLight = null; 34 } 35 }; 36 37 return Dialog; 38})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.