Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
7 changed files with 388 additions and 333 deletions
Showing only changes of commit 48076eedcd - Show all commits

View File

@ -73,7 +73,7 @@ _.on('body.anime.list', 'click', '.plus-one', (e) => {
const displayMessage = (type, message) => {
_.hide('#loading-shadow');
_.showMessage(type, `${message} ${title}.`);
_.showMessage(type, `${message} ${title}`);
_.scrollToTop();
}

View File

@ -55,7 +55,7 @@ _.on('.manga.list', 'click', '.edit-buttons button', (e) => {
const displayMessage = (type, message) => {
_.hide('#loading-shadow');
_.showMessage(type, `${message} ${title}.`);
_.showMessage(type, `${message} ${title}`);
_.scrollToTop();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAA,MAAM,iBAAmB,AAAC,CAAA,IAAM,CAC/B,IAAI,GAAK,IAAI,CACb,IAAI,UAAY,IAAI,CACpB,IAAI,MAAQ,GACZ,MAAM,KAAO,AAAC,KAAQ,IAAI,KAAK,CAAC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,CAC3B,GAAI,IAAO,YAAc,EAAE,MAAM,CAAC,SAAS,CAC1C,OACA,CACD,GAAK,EAAE,MAAM,CACb,GAAI,GAAG,QAAQ,CAAC,WAAW,KAAO,KAAM,CACvC,UAAY,GAAG,SAAS,CACxB,MAAM,MAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAC9D,IAAI,KAAO,MAAM,IAAI,CAAC,MAAM,IAAI,EAChC,GAAI,KAAM,CACT,KAAK,IAAI,CAAC,MACV,GAAI,QAAU,cACb,KAAK,OAAO,EACZ,CACD,QACA,CAAA,MAAM,SAAS,CAAG,GAElB,KAAK,OAAO,CAAC,KAAO,CACnB,MAAM,WAAW,CAAC,IACnB,EACD,CAAC,AACF,CAAC,AACF,EACA,MAAO,CACN,KAAM,IAAM,CACX,IAAI,IAAM,SAAS,oBAAoB,CAAC,MACxC,IAAI,QAAU,EAAE,CAChB,IAAK,IAAI,EAAI,EAAG,IAAM,IAAI,MAAM,CAAE,EAAI,IAAK,IAAK,CAC/C,IAAI,GAAK,GAAG,CAAC,EAAE,CACf,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,QAAQ,IAAI,CAAC,GAAG,OAAO,CAAG,aAC3B,CACA,OAAO,OACR,CACD,CACD,CAAA,IAEA,iBAAiB,IAAI"}
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAA,MAAM,iBAAmB,AAAC,CAAA,KACzB,IAAI,GAAK,KACT,IAAI,UAAY,KAChB,IAAI,MAAQ,GACZ,MAAM,KAAO,AAAC,KAAQ,IAAI,MAAM,KAAK,WAAW,YAAY,cAC5D,MAAM,KAAO,CAAC,EAAG,KAChB,IAAI,MAAQ,KAAK,GACjB,IAAI,MAAQ,KAAK,GACjB,QAAQ,IAAI,aAAe,MAAQ,QAAU,OAE7C,GAAG,GAAG,UAAU,SAAS,WAAW,CACnC,IAAI,OAAS,MAAM,QAAQ,cAAc,IAAI,QAAQ,IAAI,GAAG,MAAM,KAClE,IAAI,OAAS,MAAM,QAAQ,cAAc,IAAI,QAAQ,IAAI,GAAG,MAAM,KAClE,GAAG,OAAO,OAAS,EAAG,CACrB,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,IACpD,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,GACrD,KACI,CACH,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAC3B,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,GAC5B,CACD,MACK,GAAI,SAAS,MAAO,IAAK,CAC7B,MAAQ,SAAS,MAAO,IACxB,MAAQ,SAAS,MAAO,GACzB,CACA,GAAI,MAAQ,MACX,OAAO,EAER,GAAI,MAAQ,MACX,OAAO,GAER,OAAO,CACR,EACA,MAAM,OAAS,KACd,MAAM,EAAI,QAAU,cAAgB,cAAgB,cACpD,CAAA,GAAG,UAAY,AAAC,CAAA,GAAG,UAAU,QAAQ,MAAO,IAAM,IAA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