add two keywords & a sukebei rule (#1231)
* add two keywords * move keywords_flags vartiable outside of function no point in creating it every single time * Update en-us.all.json * add sukebei rule * Update main.css * Update upload.jet.html * Update upload.jet.html * Update main.css * Update main.css * Update en-us.all.json * whoopsies * add keywords for categories * fix display on firefox & older browsers
Cette révision appartient à :
Parent
43874b462c
révision
e92527748c
4 fichiers modifiés avec 52 ajouts et 22 suppressions
|
@ -993,11 +993,22 @@ input.nav-btn {
|
|||
.download {
|
||||
padding: 0.3em;
|
||||
}
|
||||
.refine-drop {
|
||||
display: inline-block;
|
||||
.rules-drop {
|
||||
display: flex;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
vertical-align: bottom;
|
||||
width: 432px;
|
||||
}
|
||||
.rules-drop > div {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: 429px;
|
||||
border: 1px solid black;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
}
|
||||
.rules-drop > div > ul { margin-top: 11px; margin-right: 13px; }
|
||||
.refine-btn {
|
||||
width: 10%;
|
||||
}
|
||||
|
|
|
@ -106,12 +106,14 @@ var Kilo = function (params) {
|
|||
var el = e.target
|
||||
self.setName(el.value)
|
||||
addKeywordFlags(el.value);
|
||||
addKeywordCategories(el.value);
|
||||
}
|
||||
|
||||
var addKeywordFlags = debounce(function(e) {
|
||||
var Keywords_flags= [
|
||||
["vostfr","vosfr", "[ita]", "[eng]", " eng ", "[english]", "[jp]", "[jpn]"],
|
||||
["fr","fr", "it", "en", "en", "en", "ja", "ja"] ];
|
||||
var Keywords_flags= [
|
||||
["vostfr","vosfr", "[ita]", "[eng]", " eng ","[english]","[english sub]", "[jp]","[jpn]","[japanese]"],
|
||||
["fr","fr", "it", "en","en","en","en", "ja","ja","ja"] ];
|
||||
|
||||
var addKeywordFlags = debounce(function(e) {
|
||||
|
||||
var torrentLowerCaseName = e.toLowerCase(),
|
||||
updateLang = false;
|
||||
|
@ -125,10 +127,31 @@ var Kilo = function (params) {
|
|||
if(updateLang) updateTorrentLang();
|
||||
}, 300);
|
||||
|
||||
var Keywords_categories = [
|
||||
[ ["[jav]"], [7] ],
|
||||
[ [""], [0] ]
|
||||
];
|
||||
|
||||
var addKeywordCategories = debounce(function(e) {
|
||||
if(document.getElementsByClassName('form-torrent-category')[0].selectedIndex != 0)
|
||||
return;
|
||||
|
||||
var torrentLowerCaseName = e.toLowerCase(),
|
||||
IsOnSukebei = params.sukebei ? 0 : 1;
|
||||
|
||||
for(var KeywordIndex = 0; KeywordIndex < Keywords_categories[IsOnSukebei][0].length; KeywordIndex++)
|
||||
if(torrentLowerCaseName.includes(Keywords_categories[IsOnSukebei][0][KeywordIndex])) {
|
||||
document.getElementsByClassName('form-torrent-category')[0].selectedIndex = Keywords_categories[IsOnSukebei][1][KeywordIndex];
|
||||
break;
|
||||
}
|
||||
|
||||
}, 300);
|
||||
|
||||
var updateHidden = function (e) {
|
||||
var el = e.target
|
||||
self.setHidden(el.checked)
|
||||
}
|
||||
|
||||
var updatePreviewCategory = function (e) {
|
||||
var el = e.target
|
||||
self.setCategory(el.selectedIndex)
|
||||
|
|
|
@ -5,24 +5,16 @@
|
|||
{{block title()}}{{ T("upload")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: left;" class="box">
|
||||
<details>
|
||||
<summary class="form-input refine-drop" style="
|
||||
vertical-align: bottom;
|
||||
width: 429px;
|
||||
">Rules</summary>
|
||||
<div class="form-input" style="
|
||||
display: inline-block;
|
||||
min-height: 74px;
|
||||
min-width: 429px;
|
||||
border: 1px solid black;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
">
|
||||
<ul style="margin-top: 11px;margin-right: 9px;">
|
||||
<details>
|
||||
<summary class="form-input rules-drop">{{ T("rules")}}</summary>
|
||||
<div class="form-input">
|
||||
<ul>
|
||||
<li>{{ T("no_cp")}}</li>
|
||||
<li>{{ T("asia")}}</li>
|
||||
<li>{{ T("rules_spam")}}</li>
|
||||
</ul></div>
|
||||
<li>{{ T("rules_sukebei")}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</details>
|
||||
<form enctype="multipart/form-data" role="upload" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
},
|
||||
{
|
||||
"id": "no_cp",
|
||||
"translation": "No child pornography"
|
||||
"translation": "No child pornography (lolicon doesn't count)"
|
||||
},
|
||||
{
|
||||
"id": "asia",
|
||||
|
@ -15,6 +15,10 @@
|
|||
"id": "rules_spam",
|
||||
"translation": "No spam"
|
||||
},
|
||||
{
|
||||
"id": "rules_sukebei",
|
||||
"translation": "NSFW content belongs in sukebei.pantsu.cat"
|
||||
},
|
||||
{
|
||||
"id": "verify_email_title",
|
||||
"translation": "Verify your email address for Nyaapantsu."
|
||||
|
|
Référencer dans un nouveau ticket