* Add new mods from June 10
* Attractive slidetoggle for dialog windows
This commit is contained in:
parent
81f5c04ac8
commit
18e7a8f970
@ -19,6 +19,11 @@ window.DIALOG_COUNT = 0;
|
|||||||
*/
|
*/
|
||||||
window.DIALOG_FOCUS = null;
|
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.
|
/* Creates a dialog and puts it onscreen. Takes one argument: options, a JS object.
|
||||||
* == Common options
|
* == Common options
|
||||||
* (text|html): The text or HTML to display in the dialog. Text is auto-converted to HTML.
|
* (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 dialog = $(this).closest('.ui-dialog');
|
||||||
var selector = dialog.find('.ui-dialog-content,.ui-dialog-buttonpane');
|
var selector = dialog.find('.ui-dialog-content,.ui-dialog-buttonpane');
|
||||||
var button = dialog.find('.ui-dialog-titlebar-button-collapse');
|
var button = dialog.find('.ui-dialog-titlebar-button-collapse');
|
||||||
|
|
||||||
|
// Slide toggle
|
||||||
|
$(selector).slideToggle({duration: window.DIALOG_SLIDE_DURATION});
|
||||||
|
|
||||||
if(collapsed) {
|
if(collapsed) {
|
||||||
$(selector).removeClass('ui-dialog-content-hidden');
|
|
||||||
$(button).removeClass('ui-dialog-titlebar-button-collapse-collapsed');
|
$(button).removeClass('ui-dialog-titlebar-button-collapse-collapsed');
|
||||||
$(button).addClass('ui-dialog-titlebar-button-collapse-expanded');
|
$(button).addClass('ui-dialog-titlebar-button-collapse-expanded');
|
||||||
} else {
|
} else {
|
||||||
$(selector).addClass('ui-dialog-content-hidden');
|
|
||||||
$(button).removeClass('ui-dialog-titlebar-button-collapse-expanded');
|
$(button).removeClass('ui-dialog-titlebar-button-collapse-expanded');
|
||||||
$(button).addClass('ui-dialog-titlebar-button-collapse-collapsed');
|
$(button).addClass('ui-dialog-titlebar-button-collapse-collapsed');
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,31 @@ window.REDEEM_RESOURCES = {
|
|||||||
return {long: 'Portal Shield', short: 'S'};
|
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: {
|
EMITTER_A: {
|
||||||
/* resourceWithLevels */
|
/* resourceWithLevels */
|
||||||
format: function(acquired) {
|
format: function(acquired) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user