Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f92cfdade | ||
|
|
fa4feddd35 |
@@ -95,7 +95,8 @@
|
||||
var info = el('button', { type: 'button', 'class': 'sg-info', 'aria-label': T.coverInfoLabel || 'What does this mean?', 'aria-expanded': 'false', 'aria-controls': uid + '-tip', text: 'i' });
|
||||
var pinnedOpen = false;
|
||||
function showTip(open) { tip.hidden = !open; info.setAttribute('aria-expanded', String(open)); }
|
||||
info.addEventListener('click', function () { pinnedOpen = tip.hidden; showTip(pinnedOpen); });
|
||||
// Click toggles a "pinned" state independent of hover (a tap fires hover first, so reading tip.hidden would undo itself).
|
||||
info.addEventListener('click', function () { pinnedOpen = !pinnedOpen; showTip(pinnedOpen); });
|
||||
info.addEventListener('mouseenter', function () { showTip(true); });
|
||||
info.addEventListener('mouseleave', function () { if (!pinnedOpen) { showTip(false); } });
|
||||
info.addEventListener('blur', function () { pinnedOpen = false; showTip(false); });
|
||||
@@ -105,8 +106,8 @@
|
||||
tip
|
||||
]));
|
||||
root.appendChild(row([total]));
|
||||
root.appendChild(status); // messages sit above the PayPal buttons, next to the form fields
|
||||
root.appendChild(buttons);
|
||||
root.appendChild(status);
|
||||
|
||||
function say(text, cls) { status.textContent = text || ''; status.className = 'sg-msg' + (cls ? ' ' + cls : ''); }
|
||||
function amountStr() { return amount.value.trim().replace(',', '.'); }
|
||||
|
||||
Reference in new issue
Block a user