Merge pull request #37944 from AutomaticFrenzy/patch/irv-jquery
Remove second copy of jQuery used only by IRV polls
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
if(!option)
|
||||
return
|
||||
option = sanitizeSQL(option)
|
||||
var/default_percentage_calc
|
||||
var/default_percentage_calc = 0
|
||||
if(polltype != POLLTYPE_IRV)
|
||||
switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel"))
|
||||
if("Yes")
|
||||
|
||||
@@ -467,7 +467,12 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
/datum/asset/simple/IRV
|
||||
assets = list(
|
||||
"jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js',
|
||||
"jquery-1.10.2.min.js" = 'html/IRV/jquery-1.10.2.min.js'
|
||||
)
|
||||
|
||||
/datum/asset/group/IRV
|
||||
children = list(
|
||||
/datum/asset/simple/jquery,
|
||||
/datum/asset/simple/IRV
|
||||
)
|
||||
|
||||
/datum/asset/simple/changelog
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
if(POLLTYPE_IRV)
|
||||
if (!href_list["IRVdata"])
|
||||
to_chat(src, "<span class='danger'>No ordering data found. Please try again or contact an administrator.</span>")
|
||||
return
|
||||
var/list/votelist = splittext(href_list["IRVdata"], ",")
|
||||
if (!vote_on_irv_poll(pollid, votelist))
|
||||
to_chat(src, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
src << browse(null ,"window=playerpolllist")
|
||||
src << browse(output,"window=playerpoll;size=500x250")
|
||||
if(POLLTYPE_IRV)
|
||||
var/datum/asset/irv_assets = get_asset_datum(/datum/asset/simple/IRV)
|
||||
var/datum/asset/irv_assets = get_asset_datum(/datum/asset/group/IRV)
|
||||
irv_assets.send(src)
|
||||
|
||||
var/datum/DBQuery/query_irv_get_votes = SSdbcore.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
|
||||
@@ -267,7 +267,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<script src="jquery-1.10.2.min.js"></script>
|
||||
<script src="jquery.min.js"></script>
|
||||
<script src="jquery-ui.custom-core-widgit-mouse-sortable-min.js"></script>
|
||||
<style>
|
||||
#sortable { list-style-type: none; margin: 0; padding: 2em; }
|
||||
|
||||
6
html/IRV/jquery-1.10.2.min.js
vendored
6
html/IRV/jquery-1.10.2.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user