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)
|
if(!option)
|
||||||
return
|
return
|
||||||
option = sanitizeSQL(option)
|
option = sanitizeSQL(option)
|
||||||
var/default_percentage_calc
|
var/default_percentage_calc = 0
|
||||||
if(polltype != POLLTYPE_IRV)
|
if(polltype != POLLTYPE_IRV)
|
||||||
switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel"))
|
switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel"))
|
||||||
if("Yes")
|
if("Yes")
|
||||||
|
|||||||
@@ -467,7 +467,12 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
|||||||
/datum/asset/simple/IRV
|
/datum/asset/simple/IRV
|
||||||
assets = list(
|
assets = list(
|
||||||
"jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js',
|
"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
|
/datum/asset/simple/changelog
|
||||||
|
|||||||
@@ -234,6 +234,7 @@
|
|||||||
if(POLLTYPE_IRV)
|
if(POLLTYPE_IRV)
|
||||||
if (!href_list["IRVdata"])
|
if (!href_list["IRVdata"])
|
||||||
to_chat(src, "<span class='danger'>No ordering data found. Please try again or contact an administrator.</span>")
|
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"], ",")
|
var/list/votelist = splittext(href_list["IRVdata"], ",")
|
||||||
if (!vote_on_irv_poll(pollid, votelist))
|
if (!vote_on_irv_poll(pollid, votelist))
|
||||||
to_chat(src, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
|
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(null ,"window=playerpolllist")
|
||||||
src << browse(output,"window=playerpoll;size=500x250")
|
src << browse(output,"window=playerpoll;size=500x250")
|
||||||
if(POLLTYPE_IRV)
|
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)
|
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]'")
|
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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<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>
|
<script src="jquery-ui.custom-core-widgit-mouse-sortable-min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
#sortable { list-style-type: none; margin: 0; padding: 2em; }
|
#sortable { list-style-type: none; margin: 0; padding: 2em; }
|
||||||
|
|||||||
Vendored
-6
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user