From 18e7a8f970fb0a416b9b568b7ce53512c9928716 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Mon, 10 Jun 2013 13:37:43 -0600 Subject: [PATCH 1/2] * Add new mods from June 10 * Attractive slidetoggle for dialog windows --- code/dialog.js | 11 +++++++++-- code/redeeming.js | 25 +++++++++++++++++++++++++ style.css | 1 + 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/code/dialog.js b/code/dialog.js index 81c196d5..c0cdceec 100644 --- a/code/dialog.js +++ b/code/dialog.js @@ -19,6 +19,11 @@ window.DIALOG_COUNT = 0; */ window.DIALOG_FOCUS = null; +/* Controls how quickly the slide toggle animation + * should play for dialog collapsing and expanding. + */ +window.DIALOG_SLIDE_DURATION = 100; + /* Creates a dialog and puts it onscreen. Takes one argument: options, a JS object. * == Common options * (text|html): The text or HTML to display in the dialog. Text is auto-converted to HTML. @@ -127,12 +132,14 @@ window.dialog = function(options) { var dialog = $(this).closest('.ui-dialog'); var selector = dialog.find('.ui-dialog-content,.ui-dialog-buttonpane'); var button = dialog.find('.ui-dialog-titlebar-button-collapse'); + + // Slide toggle + $(selector).slideToggle({duration: window.DIALOG_SLIDE_DURATION}); + if(collapsed) { - $(selector).removeClass('ui-dialog-content-hidden'); $(button).removeClass('ui-dialog-titlebar-button-collapse-collapsed'); $(button).addClass('ui-dialog-titlebar-button-collapse-expanded'); } else { - $(selector).addClass('ui-dialog-content-hidden'); $(button).removeClass('ui-dialog-titlebar-button-collapse-expanded'); $(button).addClass('ui-dialog-titlebar-button-collapse-collapsed'); } diff --git a/code/redeeming.js b/code/redeeming.js index 528aa084..b3a8a3f4 100644 --- a/code/redeeming.js +++ b/code/redeeming.js @@ -18,6 +18,31 @@ window.REDEEM_RESOURCES = { return {long: 'Portal Shield', short: 'S'}; } }, + FORCE_AMP: { + format: function(acquired) { + return {long: 'Force Amp', short: 'FA'}; + } + }, + LINK_AMP: { + format: function(acquired) { + return {long: 'Link Amp', short: 'LA'}; + } + }, + HEATSINK: { + format: function(acquired) { + return {long: 'Heatsink', short: 'H'}; + } + }, + MULTIHACK: { + format: function(acquired) { + return {long: 'Multihack', short: 'M'}; + } + }, + TURRET: { + format: function(acquired) { + return {long: 'Turret', short: 'T'}; + } + }, EMITTER_A: { /* resourceWithLevels */ format: function(acquired) { diff --git a/style.css b/style.css index 69dbbd8c..ea62cedc 100644 --- a/style.css +++ b/style.css @@ -824,6 +824,7 @@ h3 { overflow-x: hidden; max-height: 600px !important; max-width: 700px !important; + position: relative; } .ui-dialog-content-hidden { From 1eb785af1cf5328f20e90deec6930dad33de5d63 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Mon, 10 Jun 2013 13:47:44 -0600 Subject: [PATCH 2/2] * Add unusual XM objects --- code/dialog.js | 4 ++-- code/redeeming.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/dialog.js b/code/dialog.js index c0cdceec..afe1feb7 100644 --- a/code/dialog.js +++ b/code/dialog.js @@ -133,8 +133,8 @@ window.dialog = function(options) { var selector = dialog.find('.ui-dialog-content,.ui-dialog-buttonpane'); var button = dialog.find('.ui-dialog-titlebar-button-collapse'); - // Slide toggle - $(selector).slideToggle({duration: window.DIALOG_SLIDE_DURATION}); + // Slide toggle + $(selector).slideToggle({duration: window.DIALOG_SLIDE_DURATION}); if(collapsed) { $(button).removeClass('ui-dialog-titlebar-button-collapse-collapsed'); diff --git a/code/redeeming.js b/code/redeeming.js index b3a8a3f4..eb613048 100644 --- a/code/redeeming.js +++ b/code/redeeming.js @@ -43,6 +43,11 @@ window.REDEEM_RESOURCES = { return {long: 'Turret', short: 'T'}; } }, + UNUSUAL: { + format: function(acquired) { + return {long: 'Unusual Object', short: 'U'}; + } + }, EMITTER_A: { /* resourceWithLevels */ format: function(acquired) {