comparison core/modules/quickedit/js/theme.es6.js @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
142 button.type = 'button'; 142 button.type = 'button';
143 } 143 }
144 // Attributes. 144 // Attributes.
145 const attributes = []; 145 const attributes = [];
146 const attrMap = settings.buttons[i].attributes || {}; 146 const attrMap = settings.buttons[i].attributes || {};
147 for (const attr in attrMap) { 147 Object.keys(attrMap).forEach((attr) => {
148 if (attrMap.hasOwnProperty(attr)) { 148 attributes.push(attr + ((attrMap[attr]) ? `="${attrMap[attr]}"` : ''));
149 attributes.push(attr + ((attrMap[attr]) ? `="${attrMap[attr]}"` : '')); 149 });
150 } 150 html += `<button type="${button.type}" class="${button.classes}" ${attributes.join(' ')}>${button.label}</button>`;
151 }
152 html += `<button type="${button.type}" class="${button.classes}"` + ` ${attributes.join(' ')}>`;
153 html += button.label;
154 html += '</button>';
155 } 151 }
156 return html; 152 return html;
157 }; 153 };
158 154
159 /** 155 /**