New Software: Difference between revisions

From Tech Tangents
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 28: Line 28:
a.appendChild(text);
a.appendChild(text);
         a.href="https://wiki.techtangents.net/wiki/"+page_title.replace(" ", "_");
         a.href="https://wiki.techtangents.net/wiki/"+page_title.replace(" ", "_");
       
 
li = document.createElement('li');
li = document.createElement('li');
li.appendChild(a);
li.appendChild(a);
Line 41: Line 41:
input.value = "";
input.value = "";
});
});
 
// Media type default
// Media type default
document.getElementById("sc-Media_Type-data").value = "Software";
document.getElementById("sc-Media_Type").value = "Software";


// Number inputs
// Number inputs
Line 50: Line 50:
input.value = "";
input.value = "";
});
});
 
// Year default
// Year default
document.getElementById("sc-Release_Year").value = 1999;
document.getElementById("sc-Release_Year").value = 1999;
       
 
         // Condition
         // Condition
document.getElementById("sc-Box_Condition").value = "";
document.getElementById("sc-Box_Condition").value = "";
document.getElementById("sc-Box_Type").value = "";
 
         // Photo file
         // Photo file
document.getElementById("sc-file").value = "";
document.getElementById("sc-file").value = "";
 
// Standad format checkboxes
// Standad format checkboxes
const inputsc = document.querySelectorAll("#page-create input[type='checkbox']");
const inputsc = document.querySelectorAll("#page-create input[type='checkbox']");
Line 65: Line 66:
input.checked = false;
input.checked = false;
});
});
 
// Re-enable reset
// Re-enable reset
document.getElementById("sc-reset").checked = true;
document.getElementById("sc-reset").checked = true;
Line 168: Line 169:
"Location",
"Location",
"Box Condition",
"Box Condition",
"Box Type",
"Media Format",
"Media Format",
"Platform",
"Platform",
Line 176: Line 178:
parameters.forEach(parameter => {
parameters.forEach(parameter => {
value = get_paramter(parameter)
value = get_paramter(parameter)
if (parameter == "Photo")
{
value = value.replace(":", "-")
}
if (value)
if (value)
{
{
Line 202: Line 208:
api.postWithToken( 'csrf', params ).done( function ( data ) {
api.postWithToken( 'csrf', params ).done( function ( data ) {
console.log( data );
console.log( data );
 
 
if (document.getElementById("sc-reset").checked)
if (document.getElementById("sc-reset").checked)
{
{
Line 210: Line 216:
return;
return;
}
}
 
// Redirect to new page after creating it
// Redirect to new page after creating it
window.location.replace("https://wiki.techtangents.net/wiki/"+get_paramter("Title").replace(" ", "_"));
window.location.replace("https://wiki.techtangents.net/wiki/"+get_paramter("Title").replace(" ", "_"));
Line 249: Line 255:
.done(make_page) // Make page after upload finished
.done(make_page) // Make page after upload finished
.fail(function (data) {
.fail(function (data) {
console.log(data);
if ( data = "fileexists-no-change" )
{
make_page();
}
console.log(data);
});
});
}
}
Line 316: Line 326:
<option value="2 - Corner tears, bad crushing, bad fading">2 - Corner tears, bad crushing, bad fading</option>
<option value="2 - Corner tears, bad crushing, bad fading">2 - Corner tears, bad crushing, bad fading</option>
<option value="1 - Water damage, missing parts, bleached">1 - Water damage, missing parts, bleached</option>
<option value="1 - Water damage, missing parts, bleached">1 - Water damage, missing parts, bleached</option>
</select>
</div>
<div>
<label for="sc-Box_Type">Box Type:</label>
<select id="sc-Box_Type">
<option value="">Select Package Type...</option>
<option value="Big Box">Big Box</option>
<option value="Small Box">Small Box</option>
<option value="DVD Case">DVD Case</option>
<option value="Jewel Case">Jewel Case</option>
<option value="Collector's Edition">Collector's Edition</option>
<option value="Binder">Binder</option>
<option value="Clamshell">Clamshell</option>
<option value="Other">Other</option>
</select>
</select>



Latest revision as of 19:17, 27 September 2024

Photo
Software Info
Media Format:
Platform: