Feature #2355 ยป 2355.diff
gui/admin_portal/list_table.cxx (working copy) | ||
---|---|---|
226 | 226 |
boost::ref(*progress)); |
227 | 227 |
} |
228 | 228 | |
229 |
m_table.load(m_where, "", "count(*) as total_count").next(); |
|
230 |
const uint64_t total_count = boost::lexical_cast<uint64_t>(m_table["total_count"]); |
|
231 | ||
229 | 232 |
std::ostringstream os; |
230 | 233 |
if(m_data_widget.m_ordering_enabled) |
231 | 234 |
os << "order by priority asc "; |
... | ... | |
634 | 637 | |
635 | 638 |
new Wt::WBreak(p); |
636 | 639 | |
637 |
TrackedTable* table = new TrackedTable(p);
|
|
638 |
table->setStyleClass("report");
|
|
639 |
table->resize(Wt::WLength(100,Wt::WLength::Percentage), 0);
|
|
640 |
Wt::WContainerWidget* c = new Wt::WContainerWidget(p);
|
|
641 |
c->setWidth(Wt::WLength(100,Wt::WLength::Percentage));
|
|
642 |
c->setContentAlignment(Wt::AlignCenter);
|
|
640 | 643 | |
644 |
TrackedTable* table = new TrackedTable(c); |
|
645 |
table->setInline(true); |
|
646 | ||
641 | 647 |
m_prev_button = new ImageButton("prev", "Previous", table->currentCell()); |
642 | 648 |
m_prev_button->setMargin(Wt::WLength(2, Wt::WLength::Pixel), Wt::Right); |
643 |
table->currentCell()->setContentAlignment(Wt::AlignMiddle | Wt::AlignRight); |
|
644 |
table->currentCell()->setWidth(Wt::WLength(50, Wt::WLength::Percentage)); |
|
649 |
table->currentCell()->setWidth(Wt::WLength(1, Wt::WLength::Percentage)); |
|
645 | 650 | |
651 |
for(unsigned i = 0; i <= total_count / m_limit; i++) |
|
652 |
{ |
|
653 |
table->nextCellOfCurrentRow()->setWidth(Wt::WLength(1, Wt::WLength::Percentage)); |
|
654 |
Wt::WContainerWidget* page = new Wt::WContainerWidget(table->currentCell()); |
|
655 |
if(i == m_offset / m_limit) |
|
656 |
page->setStyleClass("page_num_selected"); |
|
657 |
else |
|
658 |
page->setStyleClass("page_num"); |
|
659 |
new Wt::WText(boost::lexical_cast<std::string>(i + 1), page); |
|
660 |
} |
|
661 | ||
646 | 662 |
m_next_button = new ImageButton("next", "Next", table->nextCellOfCurrentRow()); |
647 | 663 |
m_next_button->setMargin(Wt::WLength(2, Wt::WLength::Pixel), Wt::Left); |
648 |
table->currentCell()->setContentAlignment(Wt::AlignMiddle | Wt::AlignLeft); |
|
649 |
table->currentCell()->setWidth(Wt::WLength(50, Wt::WLength::Percentage)); |
|
664 |
table->currentCell()->setWidth(Wt::WLength(1, Wt::WLength::Percentage)); |
|
650 | 665 |
} |
651 | 666 | |
652 | 667 |
m_prev_button->clicked().disconnect(m_prev_button_connection); |
gui/css/style.css (working copy) | ||
---|---|---|
1116 | 1116 |
height: 210px; |
1117 | 1117 |
background-color: #aaffaa; |
1118 | 1118 |
margin: 5px; |
1119 |
border: 1px solid #CFCFCF; */
|
|
1119 |
border: 1px solid #CFCFCF; |
|
1120 | 1120 |
padding: 2px; |
1121 | 1121 |
cursor: pointer; |
1122 | 1122 |
text-align: center; |
... | ... | |
1330 | 1330 |
div.headset_connected { |
1331 | 1331 |
background-image: url('/images/headset_connected.gif'); |
1332 | 1332 |
} |
1333 | ||
1334 |
div.page_num { |
|
1335 |
position: relative; |
|
1336 |
width: 27px; |
|
1337 |
height: 22px; |
|
1338 |
background-color: #909090; |
|
1339 |
color: white; |
|
1340 |
/* font-weight: bold;*/ |
|
1341 |
font-size: 14px; |
|
1342 |
margin-left: 2px; |
|
1343 |
margin-right: 2px; |
|
1344 |
border: 0px solid #444444; |
|
1345 |
border-radius: 2px; |
|
1346 |
cursor: pointer; |
|
1347 |
text-align: center; |
|
1348 |
} |
|
1349 | ||
1350 |
div.page_num:hover { |
|
1351 |
background-color: #bbbbbb; |
|
1352 |
} |
|
1353 | ||
1354 |
div.page_num_selected { |
|
1355 |
position: relative; |
|
1356 |
width: 25px; |
|
1357 |
height: 20px; |
|
1358 |
background-color: white; |
|
1359 |
color: #909090; |
|
1360 |
/* font-weight: bold; */ |
|
1361 |
font-size: 14px; |
|
1362 |
margin-left: 2px; |
|
1363 |
margin-right: 2px; |
|
1364 |
border: 1px solid #aaaaaa; |
|
1365 |
border-radius: 2px; |
|
1366 |
cursor: pointer; |
|
1367 |
text-align: center; |
|
1368 |
} |
|
1369 | ||
1370 |
div.page_num_selected:hover { |
|
1371 |
background-color: #bbbbbb; |
|
1372 |
} |
|
1373 | ||
1374 |
div.page_num span.dialpad-numeric { |
|
1375 |
font-size: 30px; |
|
1376 |
display: block; |
|
1377 |
color: white; |
|
1378 |
} |