Item Preview Done. Todo: Stat Rendering

This commit is contained in:
color.diff=auto
2021-05-02 05:35:38 -06:00
parent 65b3980c44
commit efa7f8f28e
987 changed files with 816 additions and 122 deletions

View File

@@ -139,8 +139,13 @@ $(document).ready(function () {
// cmd = getUniqueItem
$('.uniqueitems-select').change(function () {
$(".item").attr("src", "/img/items/1.png");
$.get("/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value, function (data) {
$.each(data, function (i, v) {
invImg = "/img/items/" + data.invfile + ".png";
$(".item").attr("src", invImg);
$.each(data, function (i, v) {
$('*[name="' + i.replace(/\s/g, '') + '"]').val(v);
if (i == 'code') {
$('select[name="code[]"]').val(v);
@@ -151,6 +156,14 @@ $(document).ready(function () {
});
// cmd = sortBy
$('input[name="sort"]').change(function () {
$.get("/ajax/uniqueitems.php?cmd=sortBy&sort=" + this.value, function (data) {
@@ -169,13 +182,13 @@ $(document).ready(function () {
searchbox.addEventListener('input', search);
$('input[name="theme"]').change(function(){
$('input[name="theme"]').change(function () {
modname = $('input[name="modname"]').val();
$.get("/res/css.php?theme="+this.value+"&modname="+modname, function(data){
$.get("/res/css.php?theme=" + this.value + "&modname=" + modname, function (data) {
location.reload();
});
// $('body').toggleClass("body-dark");
// $('.container-top').toggleClass("container-top-dark");
// $('input').toggleClass("input-dark");

View File

@@ -1,5 +1,5 @@
body {
background-color: #222 !important;
background-color: #333 !important;
color: #eee;
}
.container-top {
@@ -10,11 +10,14 @@ body {
input, select{
background: url(/img/button.png) !important;
background-size: contain;
color: #eee;
color: #eee !important;
font-weight: bold;
text-align: center !important;
}
option {
background: #333;
color: #eee;
text-align: center;
}
.row {
background: none;
@@ -41,10 +44,13 @@ option {
.props input {
margin: 15px 0;
width: 178px;
background-color: #222 !important;
color: #ddd !important;
font-weight: bold;
}
.props {
background: #222;
background: transparent;
color: white;
font-weight: bold;
}

View File

@@ -163,4 +163,9 @@ option {
.props input {
margin: 15px 0;
}
}
.item {
}