More javascript style fixes
This commit is contained in:
parent
6ed755e252
commit
0cef44c986
@ -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
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -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();
|
||||||
|
@ -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 === '') {
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user