aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/bundle.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-01-30 18:27:20 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-01-30 18:27:20 +0100
commit6edf8919a7ea9718405d3ccd0fed2e93ce1e54cc (patch)
treec23422c676ce5d7f8017a4691c56e3467ca3adb6 /public/javascripts/bundle.js
parent344504782ac628b15229cafada34a9f32d595624 (diff)
Refactor item to user
While item is technically more correct, I still prefer user as i think it makes the code easier to understand.
Diffstat (limited to 'public/javascripts/bundle.js')
-rw-r--r--public/javascripts/bundle.js148
1 files changed, 74 insertions, 74 deletions
diff --git a/public/javascripts/bundle.js b/public/javascripts/bundle.js
index c2d67ee..a64c8a5 100644
--- a/public/javascripts/bundle.js
+++ b/public/javascripts/bundle.js
@@ -828,8 +828,8 @@ var EventEmitter = require('events');
var self = new EventEmitter();
-self._items = [];
-self._selectedItemIndex = -1;
+self._users = [];
+self._selectedUserIndex = -1;
self._nodes = {
search: document.querySelector('#search'),
@@ -837,61 +837,61 @@ self._nodes = {
autocomplete: document.querySelector('.autocomplete')
};
-self.getSelectedItem = function () {
+self.getSelectedUser = function () {
if (self.getItems() === []) return;
- if (self.getSelectedItemIndex() === -1) {
+ if (self.getSelectedUserIndex() === -1) {
return self.getItems()[0];
} else {
- return self.getItems()[self.getSelectedItemIndex()];
+ return self.getItems()[self.getSelectedUserIndex()];
}
};
-self.getSelectedItemIndex = function () {
- return self._selectedItemIndex;
+self.getSelectedUserIndex = function () {
+ return self._selectedUserIndex;
};
self.getItems = function () {
- return self._items;
+ return self._users;
};
self.removeAllItems = function () {
while (self._nodes.autocomplete.firstChild) {
self._nodes.autocomplete.removeChild(self._nodes.autocomplete.firstChild);
}
- self._items = [];
- self._selectedItemIndex = -1;
+ self._users = [];
+ self._selectedUserIndex = -1;
};
-self.addItem = function (item) {
+self.addItem = function (user) {
var listItem = document.createElement('li');
- listItem.textContent = item.value;
+ listItem.textContent = user.value;
self._nodes.autocomplete.appendChild(listItem);
- self._items.push(item);
+ self._users.push(user);
};
self._moveSelected = function (shift) {
- if (self._selectedItemIndex + shift >= self.getItems().length) {
- self._selectedItemIndex = -1;
- } else if (self._selectedItemIndex + shift < -1) {
- self._selectedItemIndex = self.getItems().length - 1;
+ if (self._selectedUserIndex + shift >= self.getItems().length) {
+ self._selectedUserIndex = -1;
+ } else if (self._selectedUserIndex + shift < -1) {
+ self._selectedUserIndex = self.getItems().length - 1;
} else {
- self._selectedItemIndex += shift;
+ self._selectedUserIndex += shift;
}
for (var i = 0; i < self.getItems().length; i++) {
self._nodes.autocomplete.children[i].classList.remove('selected');
}
- if (self._selectedItemIndex >= 0) {
- self._nodes.autocomplete.children[self._selectedItemIndex].classList.add('selected');
+ if (self._selectedUserIndex >= 0) {
+ self._nodes.autocomplete.children[self._selectedUserIndex].classList.add('selected');
}
};
self._handleItemClick = function (event) {
if (!self._nodes.autocomplete.contains(event.target)) return;
- var itemIndex = Array.prototype.indexOf.call(self._nodes.autocomplete.children, event.target);
- self._selectedItemIndex = itemIndex;
- self.emit('select', self.getSelectedItem());
+ var userIndex = Array.prototype.indexOf.call(self._nodes.autocomplete.children, event.target);
+ self._selectedUserIndex = userIndex;
+ self.emit('select', self.getSelectedUser());
};
self._handleKeydown = function (event) {
@@ -1096,54 +1096,54 @@ frontpage.show();
weekSelector.updateCurrentWeek();
scrollSnap.startListening();
-if (url.hasSelectedItem()) {
- state.selectedItem = url.getSelectedItem();
+if (url.hasSelectedUser()) {
+ state.selectedUser = url.getSelectedUser();
- favorite.update(state.selectedItem);
- url.update(state.selectedItem);
- analytics.send.search(state.selectedItem);
+ favorite.update(state.selectedUser);
+ url.update(state.selectedUser);
+ analytics.send.search(state.selectedUser);
- schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedItem);
+ schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedUser);
} else if (favorite.get() != null) {
- state.selectedItem = favorite.get();
+ state.selectedUser = favorite.get();
- favorite.update(state.selectedItem);
- url.push(state.selectedItem, false);
- url.update(state.selectedItem);
- analytics.send.search(state.selectedItem, true);
+ favorite.update(state.selectedUser);
+ url.push(state.selectedUser, false);
+ url.update(state.selectedUser);
+ analytics.send.search(state.selectedUser, true);
- schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedItem);
+ schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedUser);
} else {
search.focus();
}
-search.on('search', function (selectedItem) {
- state.selectedItem = selectedItem;
+search.on('search', function (selectedUser) {
+ state.selectedUser = selectedUser;
- favorite.update(state.selectedItem);
- url.push(state.selectedItem);
- url.update(state.selectedItem);
- analytics.send.search(state.selectedItem);
+ favorite.update(state.selectedUser);
+ url.push(state.selectedUser);
+ url.update(state.selectedUser);
+ analytics.send.search(state.selectedUser);
- schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedItem);
+ schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedUser);
});
-url.on('update', function (selectedItem) {
- state.selectedItem = selectedItem;
+url.on('update', function (selectedUser) {
+ state.selectedUser = selectedUser;
- favorite.update(state.selectedItem);
- url.update(state.selectedItem);
+ favorite.update(state.selectedUser);
+ url.update(state.selectedUser);
- schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedItem);
+ schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedUser);
});
weekSelector.on('weekChanged', function (newWeek) {
- analytics.send.search(state.selectedItem);
- schedule.viewItem(newWeek, state.selectedItem);
+ analytics.send.search(state.selectedUser);
+ schedule.viewItem(newWeek, state.selectedUser);
});
favorite.on('click', function () {
- favorite.toggle(state.selectedItem);
+ favorite.toggle(state.selectedUser);
});
document.body.style.opacity = 1;
@@ -1303,25 +1303,25 @@ self._nodes = {
};
self.submit = function () {
- var selectedItem = autocomplete.getSelectedItem();
- if (selectedItem == null) return;
+ var selectedUser = autocomplete.getSelectedUser();
+ if (selectedUser == null) return;
- console.log(selectedItem);
+ console.log(selectedUser);
self._nodes.input.blur();
document.body.classList.remove('week-selector-not-visible'); // Safari bug
- self.emit('search', selectedItem);
+ self.emit('search', selectedUser);
};
-self.updateDom = function (selectedItem) {
- if (selectedItem == null) {
+self.updateDom = function (selectedUser) {
+ if (selectedUser == null) {
self._nodes.input.value = '';
autocomplete.removeAllItems();
document.body.classList.add('no-input');
document.body.classList.remove('searched');
} else {
- self._nodes.input.value = selectedItem.value;
+ self._nodes.input.value = selectedUser.value;
autocomplete.removeAllItems();
document.body.classList.remove('no-input');
document.body.classList.add('searched');
@@ -1339,8 +1339,8 @@ self._handleSubmit = function (event) {
self._calculate = function (searchTerm) {
var allResults = fuzzy.filter(searchTerm, USERS, {
- extract: function extract(item) {
- return item.value;
+ extract: function extract(user) {
+ return user.value;
}
});
var firstResults = allResults.slice(0, 7);
@@ -1394,40 +1394,40 @@ var EventEmitter = require('events');
var self = new EventEmitter();
-self._getPageTitle = function (selectedItem) {
- if (selectedItem == null) {
+self._getPageTitle = function (selectedUser) {
+ if (selectedUser == null) {
return 'Metis Rooster';
} else {
- return 'Metis Rooster - ' + selectedItem.value;
+ return 'Metis Rooster - ' + selectedUser.value;
}
};
-self._getPageURL = function (selectedItem) {
- return '/' + selectedItem.type + '/' + selectedItem.value;
+self._getPageURL = function (selectedUser) {
+ return '/' + selectedUser.type + '/' + selectedUser.value;
};
-self.push = function (selectedItem, push) {
+self.push = function (selectedUser, push) {
if (push == null) push = true;
- var pageTitle = self._getPageTitle(selectedItem);
- var pageURL = self._getPageURL(selectedItem);
+ var pageTitle = self._getPageTitle(selectedUser);
+ var pageURL = self._getPageURL(selectedUser);
if (push) {
- window.history.pushState(selectedItem, pageTitle, pageURL);
+ window.history.pushState(selectedUser, pageTitle, pageURL);
} else {
- window.history.replaceState(selectedItem, pageTitle, pageURL);
+ window.history.replaceState(selectedUser, pageTitle, pageURL);
}
};
-self.update = function (selectedItem) {
- document.title = self._getPageTitle(selectedItem);
+self.update = function (selectedUser) {
+ document.title = self._getPageTitle(selectedUser);
};
-self.hasSelectedItem = function () {
+self.hasSelectedUser = function () {
var pageUrl = window.location.pathname;
return (/^\/s\/|^\/t\/|^\/r\/|^\/c\//.test(pageUrl)
);
};
-self.getSelectedItem = function () {
+self.getSelectedUser = function () {
var pageUrl = window.location.pathname;
var pageUrlData = pageUrl.split('/');
var type = pageUrlData[1];
@@ -1551,4 +1551,4 @@ self._nodes.nextButton.addEventListener('click', self._handleNextButtonClick);
module.exports = self;
},{"events":1}]},{},[11])
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvZXZlbnRzL2V2ZW50cy5qcyIsIm5vZGVfbW9kdWxlcy9mdXp6eS9saWIvZnV6enkuanMiLCJub2RlX21vZHVsZXMvbGVmdC1wYWQvaW5kZXguanMiLCJub2RlX21vZHVsZXMvc21vb3Roc2Nyb2xsLXBvbHlmaWxsL2Rpc3Qvc21vb3Roc2Nyb2xsLmpzIiwicHVibGljL2phdmFzY3JpcHRzL2FuYWx5dGljcy5qcyIsInB1YmxpYy9qYXZhc2NyaXB0cy9hdXRvY29tcGxldGUuanMiLCJwdWJsaWMvamF2YXNjcmlwdHMvYnJvd3NlckZpeFRvb2xraXQuanMiLCJwdWJsaWMvamF2YXNjcmlwdHMvZmF2b3JpdGUuanMiLCJwdWJsaWMvamF2YXNjcmlwdHMvZmVhdHVyZURldGVjdC5qcyIsInB1YmxpYy9qYXZhc2NyaXB0cy9mcm9udHBhZ2UuanMiLCJwdWJsaWMvamF2YXNjcmlwdHMvbWFpbi5qcyIsInB1YmxpYy9qYXZhc2NyaXB0cy9zY2hlZHVsZS5qcyIsInB1YmxpYy9qYXZhc2NyaXB0cy9zY3JvbGxTbmFwLmpzIiwicHVibGljL2phdmFzY3JpcHRzL3NlYXJjaC5qcyIsInB1YmxpYy9qYXZhc2NyaXB0cy91cmwuanMiLCJwdWJsaWMvamF2Y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