@financial-times/n-myft-ui 30.2.0 → 30.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/myft/ui/lists.js +8 -1
- package/package.json +1 -1
package/myft/ui/lists.js
CHANGED
@@ -87,6 +87,11 @@ async function openSaveArticleToList (contentId, options = {}) {
|
|
87
87
|
class: 'myft-ui-create-list',
|
88
88
|
});
|
89
89
|
|
90
|
+
function addCloseButtonDataTrackable () {
|
91
|
+
const closeBtn = document.querySelector('.o-overlay__close');
|
92
|
+
closeBtn.setAttribute('data-trackable', 'close-button');
|
93
|
+
}
|
94
|
+
|
90
95
|
function outsideClickHandler (e) {
|
91
96
|
const overlayContent = document.querySelector('.o-overlay__content');
|
92
97
|
const overlayContainer = document.querySelector('.o-overlay');
|
@@ -150,6 +155,8 @@ async function openSaveArticleToList (contentId, options = {}) {
|
|
150
155
|
|
151
156
|
document.body.removeEventListener('click', outsideClickHandler);
|
152
157
|
});
|
158
|
+
|
159
|
+
addCloseButtonDataTrackable();
|
153
160
|
}
|
154
161
|
|
155
162
|
function getScrollHandler (target) {
|
@@ -192,7 +199,7 @@ function FormElement (createList, attachDescription, onListCreated, onCancel, mo
|
|
192
199
|
<button class="o-buttons o-buttons--primary o-buttons--inverse o-buttons--big" type="button" data-trackable="cancel-link" text="cancel">
|
193
200
|
Cancel
|
194
201
|
</button>
|
195
|
-
<button class="o-buttons o-buttons--big o-buttons--secondary" type="submit">
|
202
|
+
<button class="o-buttons o-buttons--big o-buttons--secondary" type="submit" data-trackable="add-button">
|
196
203
|
Add
|
197
204
|
</button>
|
198
205
|
</div>
|