Deleted:
/trunk/charmgrjs/Untitled-2
Modified:
/trunk/charmgrjs/main.js
=======================================
--- /trunk/charmgrjs/Untitled-2 Mon Oct 12 19:13:54 2009
+++ /dev/null
@@ -1,25 +0,0 @@
-A malevolent darkness surrounds the subjects, protecting them from
attacks, granting them resistance to spells cast by good
-creatures, and weakening good creatures
-when they strike the subjects. This abjura
-tion has four effects.
-First, each warded creature gains a +4
-deflection bonus to AC and a +4 resistance
-bonus on saves. Unlike the effect of
-protection from good, this benefit applies
-against all attacks, not just against attacks
-by good creatures.
-Second, a warded creature gains spell
-resistance 25 against good spells and spells
-cast by good creatures.
-Third, the abjuration blocks possession
-and mental influence, just as protection from
-good does.
-Finally, if a good creature succeeds on a
-melee attack against a warded creature, the
-offending attacker takes 1d6 points of
-temporary Strength damage (Fortitude
-negates).
-Focus: A tiny reliquary containing some
-sacred relic, such as a piece of parchment
-from an unholy text. The reliquary costs at
-least 500 gp.
=======================================
--- /trunk/charmgrjs/main.js Wed Oct 14 14:50:27 2009
+++ /trunk/charmgrjs/main.js Wed Oct 14 19:26:16 2009
@@ -323,6 +323,7 @@
$('#log_hp').text($('#hp_input') != null && $('#hp_input').val().length
> 0 ? $('#hp_input').val() : chardata.hp);
sav(chardata, 'chardata');
+ $('#history:hidden').show();
$('#history').html(populate_log_history(chardata));
$('#log_note').val('');
}
@@ -334,10 +335,9 @@
chardata.log = [];
}
var title = "Log";
- var content = "";
- if(chardata.log.length > 0) {
- content += "<div id='history' class='box' style='max-height: 150px;
overflow: auto; border-color: #D0D0D0;'>" + populate_log_history(chardata)
+ "</div>";
- }
+ // hide this bit if there are no entries
+ var hidden = chardata.log.length == 0 ? "display: none;" : "";
+ var content = "<div id='history' class='box' style='max-height: 150px;
overflow: auto; border-color: #D0D0D0;" + hidden + "'>" +
populate_log_history(chardata) + "</div>";
// use the "live" hp value if it's populated
var log_hp = ($('#hp_input').val().length > 0 ? $('#hp_input').val() :
(chardata.hp == null ? 0 : chardata.hp));
content += "<div id='new_entry' style='height: 50%'><input
id='entry_id' type='hidden' value='' /><table style='width: 100%'>";
@@ -385,8 +385,11 @@
var entry_idx = jQuery.inArray(entry, chardata.log);
chardata.log.splice(entry_idx, 1);
document.cookie = 'chardata_log_' + entry + '=foo;expires=Fri, 31 Dec
1999 23:00:00 GMT;';
- sav(chardata);
+ sav(chardata, 'chardata');
$('#history').html(populate_log_history(chardata));
+ if(chardata.log.length > 0) {
+ $('#history').hide();
+ }
}
function edit_log_entry(chardata, entry) {