mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge pull request #2497 from tigercat2000/html5_stuff
HTML5, IE11, CSS3
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//SECURITY//
|
||||
////////////
|
||||
//debugging, uncomment for viewing topic calls
|
||||
// #define TOPIC_DEBUGGING 1
|
||||
//#define TOPIC_DEBUGGING 1
|
||||
|
||||
#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
|
||||
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
|
||||
@@ -29,6 +29,10 @@
|
||||
|
||||
#if defined(TOPIC_DEBUGGING)
|
||||
world << "[src]'s Topic: [href] destined for [hsrc]."
|
||||
|
||||
if(href_list["nano_err"]) //nano throwing errors
|
||||
world << "## NanoUI, Subject [src]: " + html_decode(href_list["nano_err"]) //NANO DEBUG HOOK
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ datum/preferences
|
||||
dat += "Secondary Language:<br><a href='?_src_=prefs;preference=language;task=input'>[language]</a><br>"
|
||||
dat += "Blood Type: <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
|
||||
if(species == "Human")
|
||||
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
|
||||
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220</a><br>"
|
||||
|
||||
// dat += "Skin pattern: <a href='byond://?src=\ref[user];preference=skin_style;task=input'>Adjust</a><br>"
|
||||
dat += "<br><b>Handicaps</b><br>"
|
||||
@@ -358,11 +358,11 @@ datum/preferences
|
||||
hairname = "Frame Color"
|
||||
dat += "<br><b>[hairname]</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair)]'><tr><td>__</td></tr></table></font> "
|
||||
dat += " Style: <a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a><br>"
|
||||
dat += " <br>Style: <a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a><br>"
|
||||
|
||||
dat += "<br><b>Facial</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial)]'><tr><td>__</td></tr></table></font> "
|
||||
dat += " Style: <a href='?_src_=prefs;preference=f_style;task=input'>[f_style]</a><br>"
|
||||
dat += " <br>Style: <a href='?_src_=prefs;preference=f_style;task=input'>[f_style]</a><br>"
|
||||
|
||||
dat += "<br><b>Eyes</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]'><tr><td>__</td></tr></table></font><br>"
|
||||
@@ -528,12 +528,12 @@ datum/preferences
|
||||
|
||||
if(rank == "Civilian")//Civilian is special
|
||||
if(job_support_low & CIVILIAN)
|
||||
HTML += " <font color=green>\[Yes]</font>"
|
||||
HTML += " <font color=green>\[Yes]</font></a>"
|
||||
else
|
||||
HTML += " <font color=red>\[No]</font>"
|
||||
HTML += " <font color=red>\[No]</font></a>"
|
||||
if(job.alt_titles)
|
||||
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
|
||||
HTML += "</a></td></tr>"
|
||||
HTML += "</td></tr>"
|
||||
continue
|
||||
/*
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
@@ -545,13 +545,13 @@ datum/preferences
|
||||
else
|
||||
HTML += " <font color=red>\[NEVER]</font>"
|
||||
*/
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font></a>"
|
||||
|
||||
if(job.alt_titles)
|
||||
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
|
||||
|
||||
|
||||
HTML += "</a></td></tr>"
|
||||
HTML += "</td></tr>"
|
||||
|
||||
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
else output += "<p><b>You are ready</b> (<a href='byond://?src=\ref[src];ready=2'>Cancel</A>)</p>"
|
||||
|
||||
else
|
||||
output += "<a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A><br><br>"
|
||||
output += "<p><a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A></p>"
|
||||
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
|
||||
|
||||
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/mob/virus_target = null
|
||||
var/datum/disease2/disease/curr_virus = null
|
||||
|
||||
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = admin_state)
|
||||
var/data[0]
|
||||
|
||||
data["virus_target"] = virus_target
|
||||
|
||||
@@ -179,9 +179,11 @@ nanoui is used to open and update nano browser uis
|
||||
* @return /list config data
|
||||
*/
|
||||
/datum/nanoui/proc/get_config_data()
|
||||
var/name = "[src_object]"
|
||||
name = sanitize(name) //jQuery's parseJSON fails with byond formatting characters in the JSON
|
||||
var/list/config_data = list(
|
||||
"title" = title,
|
||||
"srcObject" = list("name" = "[src_object]"),
|
||||
"srcObject" = list("name" = name),
|
||||
"stateKey" = state_key,
|
||||
"status" = status,
|
||||
"autoUpdateLayout" = auto_update_layout,
|
||||
@@ -357,10 +359,11 @@ nanoui is used to open and update nano browser uis
|
||||
var/url_parameters_json = list2json(list("src" = "\ref[src]"))
|
||||
|
||||
return {"
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script type='text/javascript'>
|
||||
function receiveUpdateData(jsonString)
|
||||
{
|
||||
@@ -370,6 +373,10 @@ nanoui is used to open and update nano browser uis
|
||||
{
|
||||
NanoStateManager.receiveUpdateData(jsonString);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('browser.recieveUpdateData failed due to jQuery or NanoStateManager being unavailiable.');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
[head_content]
|
||||
@@ -446,7 +453,7 @@ nanoui is used to open and update nano browser uis
|
||||
|
||||
var/list/send_data = get_send_data(data)
|
||||
|
||||
//user << list2json(data) // used for debugging
|
||||
//user << list2json_usecache(send_data) // used for debugging //NANO DEBUG HOOK
|
||||
user << output(list2params(list(list2json_usecache(send_data))),"[window_id].browser:receiveUpdateData")
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user