Removes tgui fancy mode as a preference, we're only fancy now (#94389)

## About The Pull Request
This defaults every tgui to fancy mode and removes the preference
entirely.
## Why It's Good For The Game
If you look through the code you'll find comments like these 
> //some browsers (IE8) have trouble with unsupported css3 elements that
break the panel's functionality, so we won't load those if a user is in
no frills tgui mode since that's for similar compatability support

We're far and away from IE8, therefore our need for compatibility
support, so I think it's valid to remove this so called 'no frills tgui
mode'. It's tied into the event message system with every backend
update, so there's a tad less overhead.
## Changelog
🆑
del: TGUI now defaults to fancy mode, there is only fancy mode. Welcome
to the future.
/🆑
This commit is contained in:
Jeremiah
2025-12-09 13:54:13 -07:00
committed by GitHub
parent 98463cd658
commit c771360e00
13 changed files with 32 additions and 116 deletions
+2 -4
View File
@@ -229,8 +229,7 @@
output += "<hr style='background:#000000; border:0; height:3px'>"
var/datum/browser/panel = new(usr, "pmpanel", "Poll Management Panel", 780, 640)
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
if(usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.set_content(jointext(output, ""))
panel.open()
@@ -527,8 +526,7 @@
panel_height = 320
var/datum/browser/panel = new(usr, "popanel", "Poll Option Panel", 370, panel_height)
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
if(usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)) //some browsers (IE8) have trouble with unsupported css3 elements that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.set_content(jointext(output, ""))
panel.open()
+7 -8
View File
@@ -194,10 +194,8 @@
var/datum/browser/panel = new(usr, "banpanel", "Banning Panel", 910, panel_height)
panel.add_stylesheet("admin_panelscss", 'html/admin/admin_panels.css')
panel.add_stylesheet("banpanelcss", 'html/admin/banpanel.css')
var/tgui_fancy = usr.client.prefs.read_preference(/datum/preference/toggle/tgui_fancy)
if(tgui_fancy) //some browsers (IE8) have trouble with unsupported css3 elements and DOM methods that break the panel's functionality, so we won't load those if a user is in no frills tgui mode since that's for similar compatability support
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.add_script("banpaneljs", 'html/admin/banpanel.js')
panel.add_stylesheet("admin_panelscss3", 'html/admin/admin_panels_css3.css')
panel.add_script("banpaneljs", 'html/admin/banpanel.js')
var/list/output = list("<form method='get' action='?src=[REF(src)]'>[HrefTokenFormField()]")
output += {"<input type='hidden' name='src' value='[REF(src)]'>
<label class='inputlabel checkbox'>Key:
@@ -324,7 +322,7 @@
for(var/datum/job_department/department as anything in SSjob.joinable_departments)
var/label_class = department.label_class
var/department_name = department.department_name
output += "<div class='column'><label class='rolegroup [label_class]'>[tgui_fancy ? "<input type='checkbox' name='[label_class]' class='hidden' onClick='header_click_all_checkboxes(this)'>" : ""] \
output += "<div class='column'><label class='rolegroup [label_class]'><input type='checkbox' name='[label_class]' class='hidden' onClick='header_click_all_checkboxes(this)'> \
[department_name]</label><div class='content'>"
for(var/datum/job/job_datum as anything in department.get_jobban_jobs())
if(break_counter > 0 && (break_counter % 3 == 0))
@@ -337,7 +335,8 @@
if(!department_index)
stack_trace("Failed to find a department index for [department.type] in the departments_list of [job_datum.type]")
output += {"<label class='inputlabel checkbox'>[job_name]
<input type='checkbox' id='[job_name]_[department_index]' name='[job_name]' class='[label_class]' value='1'[tgui_fancy ? " onClick='toggle_other_checkboxes(this, \"[length(job_datum.departments_list)]\", \"[department_index]\")'" : ""]>
<input type='checkbox' id='[job_name]_[department_index]' name='[job_name]' class='[label_class]' value='1'
onClick='toggle_other_checkboxes(this, \"[length(job_datum.departments_list)]\", \"[department_index]\")'">
<div class='inputbox[(job_name in banned_from) ? " banned" : ""]'></div></label>
"}
else
@@ -352,7 +351,7 @@
"Abstract" = list("Appearance", "Emote", "Deadchat", "OOC", "Urgent Adminhelp"),
)
for(var/department in other_job_lists)
output += "<div class='column'><label class='rolegroup [ckey(department)]'>[tgui_fancy ? "<input type='checkbox' name='[department]' class='hidden' onClick='header_click_all_checkboxes(this)'>" : ""][department]</label><div class='content'>"
output += "<div class='column'><label class='rolegroup [ckey(department)]'><input type='checkbox' name='[department]' class='hidden' onClick='header_click_all_checkboxes(this)'>[department]</label><div class='content'>"
break_counter = 0
for(var/job in other_job_lists[department])
if(break_counter > 0 && (break_counter % 3 == 0))
@@ -401,7 +400,7 @@
),
)
for(var/department in long_job_lists)
output += "<div class='column'><label class='rolegroup long [ckey(department)]'>[tgui_fancy ? "<input type='checkbox' name='[department]' class='hidden' onClick='header_click_all_checkboxes(this)'>" : ""][department]</label><div class='content'>"
output += "<div class='column'><label class='rolegroup long [ckey(department)]'><input type='checkbox' name='[department]' class='hidden' onClick='header_click_all_checkboxes(this)'>[department]</label><div class='content'>"
break_counter = 0
for(var/job in long_job_lists[department])
if(break_counter > 0 && (break_counter % 10 == 0))