mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #4971 from monster860/datum_browserify
Makes a bunch of UI's use /datum/browser
This commit is contained in:
@@ -76,7 +76,9 @@
|
||||
var/dat = text("<TT><B>Health Sensor</B> <A href='?src=\ref[src];scanning=1'>[scanning?"On":"Off"]</A>")
|
||||
if(scanning && health_scan)
|
||||
dat += "<BR>Health: [health_scan]"
|
||||
user << browse(dat, "window=hscan")
|
||||
var/datum/browser/popup = new(user, "hscan", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "hscan")
|
||||
return
|
||||
|
||||
|
||||
@@ -139,7 +139,9 @@
|
||||
</TT>
|
||||
<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>
|
||||
<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"}
|
||||
user << browse(dat, "window=infra")
|
||||
var/datum/browser/popup = new(user, "infra", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "infra")
|
||||
|
||||
/obj/item/device/assembly/infra/Topic(href, href_list)
|
||||
|
||||
@@ -114,7 +114,9 @@
|
||||
dat += "<BR><A href='?src=\ref[src];scanning=1'>[scanning?"Armed":"Unarmed"]</A> (Movement sensor active when armed!)"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=prox")
|
||||
var/datum/browser/popup = new(user, "prox", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "prox")
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@
|
||||
[t1]
|
||||
</TT>
|
||||
"}
|
||||
user << browse(dat, "window=radio")
|
||||
var/datum/browser/popup = new(user, "radio", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
@@ -96,7 +96,9 @@
|
||||
<A href='?src=\ref[src];refresh=1'>Refresh</A>
|
||||
<BR><BR>
|
||||
<A href='?src=\ref[src];close=1'>Close</A>"}
|
||||
user << browse(dat, "window=timer")
|
||||
var/datum/browser/popup = new(user, "timer", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "timer")
|
||||
return
|
||||
|
||||
|
||||
@@ -209,7 +209,9 @@ log transactions
|
||||
dat += "<span class='warning'>Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support.</span>"
|
||||
reconnect_database()
|
||||
|
||||
user << browse(dat,"window=atm;size=550x650")
|
||||
var/datum/browser/popup = new(user, "atm", name, 550, 650)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
else
|
||||
user << browse(null,"window=atm")
|
||||
|
||||
|
||||
@@ -79,7 +79,9 @@
|
||||
dat += text("Bluespace crystals: [amt_bluespace]<br>")
|
||||
|
||||
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
|
||||
user << browse("[dat]", "window=orebox")
|
||||
var/datum/browser/popup = new(user, "orebox", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
return
|
||||
|
||||
/obj/structure/ore_box/Topic(href, href_list)
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
for(var/obj/item/P in src)
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=filingcabinet;size=350x300")
|
||||
var/datum/browser/popup = new(user, "filingcabinet", name, 350, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
|
||||
return
|
||||
|
||||
@@ -83,7 +85,7 @@
|
||||
|
||||
/obj/structure/filingcabinet/Topic(href, href_list)
|
||||
if(href_list["retrieve"])
|
||||
usr << browse("", "window=filingcabinet") // Close the menu
|
||||
usr << browse(null, "window=filingcabinet") // Close the menu
|
||||
|
||||
//var/retrieveindex = text2num(href_list["retrieve"])
|
||||
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
dat += "Current toner level: [toner]"
|
||||
if(!toner)
|
||||
dat +="<BR>Please insert a new toner cartridge!"
|
||||
user << browse(dat, "window=copier")
|
||||
var/datum/browser/popup = new(user, "copier", name, 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "copier")
|
||||
return
|
||||
|
||||
|
||||
@@ -265,7 +265,9 @@
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject beaker</A>[((R.total_volume&&R.reagent_list.len) ? "-- <A href='?src=\ref[src];empty_beaker=1'>Empty beaker</A>":"")]<BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
|
||||
user << browse("<TITLE>[src.name]</TITLE><BR>[dat]", "window=pandemic;size=575x400")
|
||||
var/datum/browser/popup = new(user, "pandemic", name, 575, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "pandemic")
|
||||
return
|
||||
|
||||
|
||||
@@ -319,9 +319,8 @@
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=\ref[src];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
dat = {"
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
@@ -335,21 +334,19 @@
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
</head><body>
|
||||
<body>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #ccc;' id='queue'>
|
||||
<td style='width: 35%; background: #000;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=mecha_fabricator;size=1000x430")
|
||||
</table>"}
|
||||
var/datum/browser/popup = new(user, "mecha_fabricator", name, 1000, 430)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user