More javascript style fixes

This commit is contained in:
Timothy Warren 2017-02-16 13:22:26 -05:00
parent 672aa287dc
commit 23d78c3b28
4 changed files with 7 additions and 7 deletions

View File

@ -226,7 +226,7 @@ var AnimeClient = (function(w) {
}); });
return pairs.join('&'); return pairs.join('&');
}; }
/** /**
* Make an ajax request * Make an ajax request
@ -308,7 +308,7 @@ var AnimeClient = (function(w) {
} }
return _.ajax(url, { return _.ajax(url, {
data: data, data,
success: callback success: callback
}); });
}; };

View File

@ -12,7 +12,7 @@
// Confirm deleting of list or library items // Confirm deleting of list or library items
ac.on('form.js-delete', 'submit', (event) => { ac.on('form.js-delete', 'submit', (event) => {
const proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?"); const proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?');
if (proceed === false) { if (proceed === false) {
event.preventDefault(); event.preventDefault();

View File

@ -4,7 +4,7 @@
const search = (tempHtml, query) => { const search = (tempHtml, query) => {
_.$('.cssload-loader')[0].removeAttribute('hidden'); _.$('.cssload-loader')[0].removeAttribute('hidden');
_.get(_.url('/manga/search'), {'query':query,}, (searchResults, status) => { _.get(_.url('/manga/search'), {query}, (searchResults, status) => {
searchResults = JSON.parse(searchResults); searchResults = JSON.parse(searchResults);
_.$('.cssload-loader')[0].setAttribute('hidden', 'hidden'); _.$('.cssload-loader')[0].setAttribute('hidden', 'hidden');
@ -13,7 +13,7 @@
}); });
}; };
_.get('/public/templates/manga-ajax-search-results.html', tempHtml => { _.get('/public/templates/manga-ajax-search-results.html', (tempHtml) => {
_.on('#search', 'keyup', _.throttle(250, function(e) { _.on('#search', 'keyup', _.throttle(250, function(e) {
let query = encodeURIComponent(this.value); let query = encodeURIComponent(this.value);
if (query === '') { if (query === '') {

View File

@ -8,8 +8,8 @@
_.on('.manga.list', 'click', '.edit_buttons button', (e) => { _.on('.manga.list', 'click', '.edit_buttons button', (e) => {
let thisSel = e.target; let thisSel = e.target;
let parentSel = _.closestParent(e.target, 'article'); let parentSel = _.closestParent(e.target, 'article');
let mangaId = parentSel.id.replace("manga-", ""); let mangaId = parentSel.id.replace('manga-', '');
let type = thisSel.classList.contains("plus_one_chapter") ? 'chapter' : 'volume'; let type = thisSel.classList.contains('plus_one_chapter') ? 'chapter' : 'volume';
let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10); let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10);
let total = parseInt(_.$(`.${type}_count`, parentSel)[0].textContent, 10); let total = parseInt(_.$(`.${type}_count`, parentSel)[0].textContent, 10);
let mangaName = _.$('.name', parentSel)[0].textContent; let mangaName = _.$('.name', parentSel)[0].textContent;