Issue #72 work. Still needs some adjustments.

This commit is contained in:
WrinklyNinja
2013-09-29 18:07:34 +01:00
parent 74aa0450e1
commit daa913736d
2 changed files with 56 additions and 64 deletions
+22 -53
View File
@@ -62,40 +62,19 @@ noscript div {
#summary, #plugins {
padding:1em;
}
table {
margin:0 auto;
border-radius:10px;
#summary > table {
border-collapse:separate;
border-spacing:0;
}
td {
padding:0.5em;
line-height:1.5;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
text-align:right;
padding-left:3em;
}
table tr:first-child td {
border-top: 1px solid #ccc;
}
table td:first-child {
text-align:left;
padding-left:0.5em;
border-left: 1px solid #ccc;
border-right: none;
}
table tr:first-child td:first-child {
border-top-left-radius: 5px;
}
table tr:first-child td:last-child {
border-top-right-radius: 5px;
}
table tr:last-child td:first-child {
border-bottom-left-radius: 5px;
}
table tr:last-child td:last-child {
border-bottom-right-radius: 5px;
}
#noChanges {
font-weight:bold;
@@ -132,47 +111,37 @@ input[type='checkbox'] {
margin-right:0.5em;
}
ul {margin-top:0.5em; margin-bottom:1em;}
li {margin:0.75em 0;}
ul {margin-top:0.5em;list-style:none;padding-left:0;}
#plugins > ul > li, #summary > div {background:white; overflow:hidden; margin:1em; box-shadow:0 0 3px 0px rgba(0,0,0,0.5); padding:1em;}
.mod {font-size:1.5em; display:block; font-weight:normal; margin-bottom:0.5em; margin-top:0; }
.meta {padding-left:0; display:block;}
.crc, .version, .tagAdd, .tagRemove {display:list-item;}
.version{color:#6394F8;}
.crc{color:#BC8923;}
.tagAdd {color:green;}
.tagRemove {color:red;}
.meta + ul {margin-top:1em;}
#plugins > ul {list-style:none;}
.hidden, li.hidden, #summary.hidden, #plugins.hidden {
display:none;
}
/* Old BOSS Log CSS */
ul{list-style:none;padding-left:0;}
#summary div {
float:left;}
#summary li, li > ul > li {padding:0.5em 1em;list-style:disc inside;}
ul li{margin-left:0;margin-bottom:1em;}
.error{background:#ff9090;padding:0.5em 1em;list-style:disc inside;}
li ul{margin-top:.5em;padding-left:2.5em;margin-bottom:2em;}
.warn{background:#FFDD55;display:table;padding:0.5em 1em;border-radius:5px;}
li.error{background:#ff9090;display:table;padding:0.3em 0.5em;border-radius:0.5em;}
.good > td {background: #90ff90;}
li.warn{background:#FFDD55;display:table;padding:0.3em 0.5em;border-radius:0.5em;}
.warn > td {background: #FFDD55;}
li.success{background:#90ff90;display:table;padding:0.3em 0.5em;border-radius:0.5em;}
.error > td {background:#ff9090;}
.version{color:#6394F8;margin-right:1em;}
.crc{color:#BC8923;margin-right:1em;}
.mod{margin-right:1em;}
tr.good td {background: #90ff90;}
tr.warn td {background: #FFDD55;}
tr.error td {background:#ff9090;}
th {text-align:left; padding:1em; background:lightblue;}
.message {color:#880088;}
#summary li {border-radius:0.5em;padding:0.5em 1em;display:table;background:#DDD;}
#summary li.error{background:#ff9090;}
#summary li.warn{background:#FFDD55;}
h2 {font-weight: normal; margin:0; display:block;}
+34 -11
View File
@@ -206,7 +206,7 @@ namespace boss {
div = nav.append_child();
div.set_name("div");
div.append_attribute("class").set_value("button");
div.append_attribute("class").set_value("button hidden");
div.append_attribute("id").set_value("filtersToggle");
div.text().set(boost::locale::translate("Filters").str().c_str());
}
@@ -254,7 +254,14 @@ namespace boss {
summary.set_name("div");
summary.append_attribute("id").set_value("summary");
pugi::xml_node table = summary.append_child();
pugi::xml_node div = summary.append_child();
div.set_name("div");
pugi::xml_node heading = div.append_child();
heading.set_name("h2");
heading.text().set(boost::locale::translate("Summary").str().c_str());
pugi::xml_node table = div.append_child();
table.set_name("table");
table = table.append_child();
table.set_name("tbody");
@@ -299,8 +306,17 @@ namespace boss {
note.text().set(boost::locale::translate("No change in details since last run.").str().c_str());
}
AppendMessages(summary, messages, warnNo, errorNo);
messageNo += messages.size();
div = summary.append_child();
div.set_name("div");
if (!messages.empty()) {
heading = div.append_child();
heading.set_name("h2");
heading.text().set(boost::locale::translate("General Messages").str().c_str());
AppendMessages(div, messages, warnNo, errorNo);
messageNo += messages.size();
}
row = table.append_child();
row.set_name("tr");
@@ -356,14 +372,14 @@ namespace boss {
if (it->Crc() != 0) {
node = plugin.append_child();
node.set_name("span");
node.set_name("div");
node.append_attribute("class").set_value("crc");
node.text().set(("CRC: " + IntToHexString(it->Crc())).c_str());
}
if (!it->Version().empty()) {
node = plugin.append_child();
node.set_name("span");
node.set_name("div");
node.append_attribute("class").set_value("version");
node.text().set((boost::locale::translate("Version:").str() + " " + it->Version()).c_str());
}
@@ -381,11 +397,18 @@ namespace boss {
else
remove += ", " + jt->Name();
}
if (!add.empty())
content += (boost::format(boost::locale::translate("Add %1%.")) % add.substr(2)).str() + " ";
if (!remove.empty())
content += (boost::format(boost::locale::translate("Remove")) % remove.substr(2)).str() + " ";
messages.push_back(Message(g_message_tag, content)); //Special type just for tag suggestions.
if (!add.empty()) {
node = plugin.append_child();
node.set_name("div");
node.append_attribute("class").set_value("tagAdd");
node.text().set((boost::locale::translate("Add:").str() + " " + add.substr(2)).c_str());
}
if (!remove.empty()) {
node = plugin.append_child();
node.set_name("div");
node.append_attribute("class").set_value("tagRemove");
node.text().set((boost::locale::translate("Remove:").str() + " " + add.substr(2)).c_str());
}
}
AppendMessages(plugin, messages, warnNo, errorNo);