1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-09-01 17:12:43 +02:00

Fix counter link

This commit is contained in:
Luis
2017-04-08 13:14:25 +02:00
parent ee6e0045e5
commit 78ababde67
4 changed files with 41 additions and 13 deletions

View File

@@ -1661,9 +1661,7 @@ var Navigation = function () {
* Counter Element.
* @type {Element}
*/
this.counter = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].createNode('a', ELEMENT_ID.COUNTER);
this.counter.href = '#';
this.counter.title = 'View all slides';
this.counter = Navigation.createCounter(ELEMENT_ID.COUNTER);
/**
* @type {WebSlides}
* @private
@@ -1702,7 +1700,7 @@ var Navigation = function () {
}, {
key: 'updateCounter',
value: function updateCounter(current, max) {
this.counter.textContent = current + ' / ' + max;
this.counter.childNodes[0].textContent = current + ' / ' + max;
}
/**
@@ -1752,6 +1750,24 @@ var Navigation = function () {
return arrow;
}
/**
* Creates the navigation counter.
* @param {!String} id Desired ID for the counter.
* @return {Element} The arrow element.
*/
}, {
key: 'createCounter',
value: function createCounter(id) {
var counter = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].createNode('span', id);
var link = document.createElement('a');
link.href = '#';
link.title = 'View all slides';
counter.appendChild(link);
return counter;
}
}]);
return Navigation;

File diff suppressed because one or more lines are too long