Commit 8e4c0c16b1e0f6c8470f45fbd44dd43686d8eb14
1 parent
471be0f8
Exists in
master
and in
5 other branches
Issue #250
Showing
13 changed files
with
995 additions
and
12 deletions
Show diff stats
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +@font-face{font-family:footable;src:url(../fonts/footable.eot);src:url(../fonts/footable.eot?#iefix) format('embedded-opentype'),url(../fonts/footable.woff) format('woff'),url(../fonts/footable.ttf) format('truetype'),url(../fonts/footable.svg#footable) format('svg');font-weight:400;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:footable;src:url(../fonts/footable.svg#footable) format('svg');font-weight:400;font-style:normal}}.footable{width:100%}.footable.breakpoint>tbody>tr.footable-detail-show>td{border-bottom:none}.footable.breakpoint>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e001"}.footable.breakpoint>tbody>tr:hover:not(.footable-row-detail){cursor:pointer}.footable.breakpoint>tbody>tr>td.footable-cell-detail{background:#eee;border-top:none}.footable.breakpoint>tbody>tr>td>span.footable-toggle{display:inline-block;font-family:footable;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-right:5px;font-size:14px;color:#888}.footable.breakpoint>tbody>tr>td>span.footable-toggle:before{content:"\e000"}.footable.breakpoint.toggle-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e005"}.footable.breakpoint.toggle-circle>tbody>tr>td>span.footable-toggle:before{content:"\e004"}.footable.breakpoint.toggle-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e003"}.footable.breakpoint.toggle-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e002"}.footable.breakpoint.toggle-square>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e007"}.footable.breakpoint.toggle-square>tbody>tr>td>span.footable-toggle:before{content:"\e006"}.footable.breakpoint.toggle-square-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e009"}.footable.breakpoint.toggle-square-filled>tbody>tr>td>span.footable-toggle:before{content:"\e008"}.footable.breakpoint.toggle-arrow>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00f"}.footable.breakpoint.toggle-arrow>tbody>tr>td>span.footable-toggle:before{content:"\e011"}.footable.breakpoint.toggle-arrow-small>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e013"}.footable.breakpoint.toggle-arrow-small>tbody>tr>td>span.footable-toggle:before{content:"\e015"}.footable.breakpoint.toggle-arrow-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01b"}.footable.breakpoint.toggle-arrow-circle>tbody>tr>td>span.footable-toggle:before{content:"\e01d"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00b"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e00d"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01f"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr>td>span.footable-toggle:before{content:"\e021"}.footable.breakpoint.toggle-arrow-alt>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e017"}.footable.breakpoint.toggle-arrow-alt>tbody>tr>td>span.footable-toggle:before{content:"\e019"}.footable.breakpoint.toggle-medium>tbody>tr>td>span.footable-toggle{font-size:18px}.footable.breakpoint.toggle-large>tbody>tr>td>span.footable-toggle{font-size:24px}.footable>thead>tr>th{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.footable>thead>tr>th.footable-sortable:hover{cursor:pointer}.footable>thead>tr>th.footable-sorted>span.footable-sort-indicator:before{content:"\e013"}.footable>thead>tr>th.footable-sorted-desc>span.footable-sort-indicator:before{content:"\e012"}.footable>thead>tr>th>span.footable-sort-indicator{display:inline-block;font-family:footable;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-left:5px}.footable>thead>tr>th>span.footable-sort-indicator:before{content:"\e022"}.footable>tfoot .pagination{margin:0}.footable.no-paging .hide-if-no-paging{display:none}.footable-row-detail-inner{display:table}.footable-row-detail-row{display:table-row;line-height:1.5em}.footable-row-detail-group{display:block;line-height:2em;font-size:1.2em;font-weight:700}.footable-row-detail-name{display:table-cell;font-weight:700;padding-right:.5em}.footable-row-detail-value{display:table-cell}.footable-odd{background-color:#f7f7f7} | |
| 0 | 2 | \ No newline at end of file | ... | ... |
No preview for this file type
| ... | ... | @@ -0,0 +1,78 @@ |
| 1 | +<?xml version="1.0" standalone="no"?> | |
| 2 | +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | |
| 3 | +<svg xmlns="http://www.w3.org/2000/svg"> | |
| 4 | +<metadata> | |
| 5 | +This is a custom SVG font generated by IcoMoon. | |
| 6 | +<iconset grid="16"></iconset> | |
| 7 | +</metadata> | |
| 8 | +<defs> | |
| 9 | +<font id="footable" horiz-adv-x="512" > | |
| 10 | +<font-face units-per-em="512" ascent="480" descent="-32" /> | |
| 11 | +<missing-glyph horiz-adv-x="512" /> | |
| 12 | +<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" /> | |
| 13 | +<glyph unicode="" d="M 496,288L 320,288 L 320,464 c0,8.836-7.164,16-16,16l-96,0 c-8.836,0-16-7.164-16-16l0-176 L 16,288 c-8.836,0-16-7.164-16-16l0-96 | |
| 14 | + c0-8.836, 7.164-16, 16-16l 176,0 l0-176 c0-8.836, 7.164-16, 16-16l 96,0 c 8.836,0, 16,7.164, 16,16L 320,160 l 176,0 c 8.836,0, 16,7.164, 16,16l0,96 | |
| 15 | + C 512,280.836, 504.836,288, 496,288z" /> | |
| 16 | +<glyph unicode="" d="M0,272l0-96 c0-8.836, 7.164-16, 16-16l 480,0 c 8.836,0, 16,7.164, 16,16l0,96 c0,8.836-7.164,16-16,16L 16,288 C 7.164,288,0,280.836,0,272z" /> | |
| 17 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 288,192l0-128 l-64,0 L 224,192 L 96,192 l0,64 | |
| 18 | + l 128,0 L 224,384 l 64,0 l0-128 l 128,0 l0-64 L 288,192 z" /> | |
| 19 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 416,192L 96,192 l0,64 l 320,0 L 416,192 z" /> | |
| 20 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,32 | |
| 21 | + c-106.039,0-192,85.961-192,192c0,106.039, 85.961,192, 192,192c 106.039,0, 192-85.961, 192-192C 448,117.961, 362.039,32, 256,32zM 384,192 L 288,192 L 288,96 L 224,96 L 224,192 L 128,192 L 128,256 L 224,256 L 224,352 L 288,352 L 288,256 L 384,256 Z" /> | |
| 22 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,32 | |
| 23 | + c-106.039,0-192,85.961-192,192c0,106.039, 85.961,192, 192,192c 106.039,0, 192-85.961, 192-192C 448,117.961, 362.039,32, 256,32zM 128,256L 384,256L 384,192L 128,192z" /> | |
| 24 | +<glyph unicode="" d="M 256,214.857l0-18.286 q0-4 -2.571-6.571t-6.571-2.571l-64,0 l0-64 q0-4 -2.571-6.571t-6.571-2.571l-18.286,0 q-4,0 -6.571,2.571t-2.571,6.571l0,64 l-64,0 q-4,0 -6.571,2.571t-2.571,6.571l0,18.286 q0,4 2.571,6.571t 6.571,2.571l 64,0 l0,64 q0,4 2.571,6.571t 6.571,2.571l 18.286,0 q 4,0 6.571-2.571t 2.571-6.571l0-64 l 64,0 q 4,0 6.571-2.571t 2.571-6.571zM 292.571,105.143l0,201.143 q0,11.429 -8,19.429t-19.429,8l-201.143,0 q-11.429,0 -19.429-8 t-8-19.429l0-201.143 q0-11.429 8-19.429t 19.429-8l 201.143,0 q 11.429,0 19.429,8t 8,19.429zM 329.143,306.286l0-201.143 q0-26.286 -18.714-45.143t-45.286-18.857l-201.143,0 q-26.571,0 -45.286,18.857t-18.714,45.143l0,201.143 q0,26.571 18.714,45.286t 45.286,18.714l 201.143,0 q 26.571,0 45.286-18.714t 18.714-45.286z" horiz-adv-x="329.143" /> | |
| 25 | +<glyph unicode="" d="M 265.143,370.286q 26.571,0 45.286-18.714t 18.714-45.286l0-201.143 q0-26.286 -18.714-45.143t-45.286-18.857l-201.143,0 q-26.571,0 -45.286,18.857t-18.714,45.143l0,201.143 q0,26.571 18.714,45.286t 45.286,18.714l 201.143,0 zM 292.571,105.143l0,201.143 q0,11.429 -8,19.429t-19.429,8l-201.143,0 q-11.429,0 -19.429-8t-8-19.429l0-201.143 q0-11.429 8-19.429t 19.429-8l 201.143,0 q 11.429,0 19.429,8t 8,19.429z M 246.857,224q 4,0 6.571-2.571t 2.571-6.571l0-18.286 q0-4 -2.571-6.571t-6.571-2.571l-164.571,0 q-4,0 -6.571,2.571t-2.571,6.571l0,18.286 q0,4 2.571,6.571t 6.571,2.571l 164.571,0 z" horiz-adv-x="329.143" /> | |
| 26 | +<glyph unicode="" d="M 365.714,205.714l0,36.571 q0,7.429 -5.429,12.857t-12.857,5.429l-91.429,0 l0,91.429 q0,7.429 -5.429,12.857t-12.857,5.429l-36.571,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-91.429 l-91.429,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-36.571 q0-7.429 5.429-12.857t 12.857-5.429l 91.429,0 l0-91.429 q0-7.429 5.429-12.857t 12.857-5.429l 36.571,0 q 7.429,0 12.857,5.429t 5.429,12.857l0,91.429 l 91.429,0 q 7.429,0 12.857,5.429t 5.429,12.857zM 438.857,361.143l0-274.286 q0-34 -24.143-58.143t-58.143-24.143l-274.286,0 q-34,0 -58.143,24.143t-24.143,58.143l0,274.286 q0,34 24.143,58.143t 58.143,24.143l 274.286,0 q 34,0 58.143-24.143t 24.143-58.143z" horiz-adv-x="438.857" /> | |
| 27 | +<glyph unicode="" d="M 365.714,205.714l0,36.571 q0,7.429 -5.429,12.857t-12.857,5.429l-256,0 q-7.429,0 -12.857-5.429t-5.429-12.857l0-36.571 q0-7.429 5.429-12.857t 12.857-5.429l 256,0 q 7.429,0 12.857,5.429t 5.429,12.857zM 438.857,361.143l0-274.286 q0-34 -24.143-58.143t-58.143-24.143l-274.286,0 q-34,0 -58.143,24.143t-24.143,58.143l0,274.286 q0,34 24.143,58.143t 58.143,24.143l 274.286,0 q 34,0 58.143-24.143 t 24.143-58.143z" horiz-adv-x="438.857" /> | |
| 28 | +<glyph unicode="" d="M 512,224C 512,82.615, 397.385-32, 256-32s -256,114.615, -256,256s 114.615,256, 256,256S 512,365.385, 512,224z M 233.372,374.628 | |
| 29 | + l -128-128.001C 99.124,240.379, 96,232.189, 96,224s 3.124-16.379 9.372-22.627c 12.497-12.497 32.759-12.497, 45.256,0L 224,274.745 | |
| 30 | + L 224,96 c 0-17.673 14.327-32 32-32c 17.673,0, 32,14.327, 32,32l0,178.745 l 73.373-73.373c 12.497-12.497 32.758-12.497, 45.255,0 | |
| 31 | + c 12.497,12.497, 12.497,32.758, 0,45.254l -128,128.001C 266.131,387.124, 245.869,387.124, 233.372,374.628z" /> | |
| 32 | +<glyph unicode="" d="M 512,224C 512,365.385, 397.385,480, 256,480s -256-114.615, -256-256s 114.615-256, 256-256S 512,82.615, 512,224z M 233.372,73.372 | |
| 33 | + l -128,128.001C 99.124,207.621, 96,215.811, 96,224s 3.124,16.379 9.372,22.627c 12.497,12.497 32.759,12.497, 45.256,0L 224,173.255 | |
| 34 | + L 224,352 c 0,17.673 14.327,32 32,32c 17.673,0, 32-14.327, 32-32l0-178.745 l 73.373,73.373c 12.497,12.497 32.758,12.497, 45.255,0 | |
| 35 | + c 12.497-12.497, 12.497-32.758, 0-45.254l -128-128.001C 266.131,60.876, 245.869,60.876, 233.372,73.372z" /> | |
| 36 | +<glyph unicode="" d="M 256,480C 397.385,480, 512,365.385, 512,224s -114.615-256, -256-256s -256,114.615, -256,256S 114.615,480, 256,480z M 105.372,201.372 | |
| 37 | + l 128.001-128C 239.621,67.124, 247.811,64, 256,64s 16.379,3.124 22.627,9.372c 12.497,12.497 12.497,32.759,0,45.256L 205.255,192 | |
| 38 | + L 384,192 c 17.673,0 32,14.327 32,32c0,17.673, -14.327,32, -32,32l-178.745,0 l 73.373,73.373c 12.497,12.497 12.497,32.758,0,45.255 | |
| 39 | + c -12.497,12.497, -32.758,12.497, -45.254,0l -128.001-128C 92.876,234.131, 92.876,213.869, 105.372,201.372z" /> | |
| 40 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 406.628,201.372 | |
| 41 | + l-128.001-128C 272.379,67.124, 264.189,64, 256,64s-16.379,3.124-22.627,9.372c-12.497,12.497-12.497,32.759,0,45.256L 306.745,192 | |
| 42 | + L 128,192 c-17.673,0-32,14.327-32,32c0,17.673, 14.327,32, 32,32l 178.745,0 l-73.373,73.373c-12.497,12.497-12.497,32.758,0,45.255 | |
| 43 | + c 12.497,12.497, 32.758,12.497, 45.254,0l 128.001-128C 419.124,234.131, 419.124,213.869, 406.628,201.372z" /> | |
| 44 | +<glyph unicode="" d="M0,160L 96,64L 256,224L 416,64L 512,160L 256.001,416 z" /> | |
| 45 | +<glyph unicode="" d="M 512,288L 416,384L 256,224L 96,384L0,288L 256,32.001 z" /> | |
| 46 | +<glyph unicode="" d="M 320-32L 416,64L 256,224L 416,384L 320,480L 64,224 z" /> | |
| 47 | +<glyph unicode="" d="M 192,480L 96,384L 256,224L 96,64L 192-32L 448,224 z" /> | |
| 48 | +<glyph unicode="" d="M 292.571,132.571q0-7.429 -5.429-12.857t-12.857-5.429l-256,0 q-7.429,0 -12.857,5.429t-5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="292.571" /> | |
| 49 | +<glyph unicode="" d="M 292.571,278.857q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857t 12.857,5.429l 256,0 q 7.429,0 12.857-5.429t 5.429-12.857z" horiz-adv-x="292.571" /> | |
| 50 | +<glyph unicode="" d="M 182.857,352l0-256 q0-7.429 -5.429-12.857t-12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429t 5.429-12.857z" horiz-adv-x="182.857" /> | |
| 51 | +<glyph unicode="" d="M 164.571,224q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429t-5.429,12.857l0,256 q0,7.429 5.429,12.857t 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="182.857" /> | |
| 52 | +<glyph unicode="" d="M 256,480L 32-32L 256,64L 480-32 z" /> | |
| 53 | +<glyph unicode="" d="M 256-32L 480,480L 256,384L 32,480 z" /> | |
| 54 | +<glyph unicode="" d="M0,224L 512,0L 416,224L 512,448 z" /> | |
| 55 | +<glyph unicode="" d="M 512,224L0,448L 96,224L0,0 z" /> | |
| 56 | +<glyph unicode="" d="M 512,224C 512,82.615, 397.385-32, 256-32s -256,114.615, -256,256s 114.615,256, 256,256S 512,365.385, 512,224z M 48,224 | |
| 57 | + c 0-114.875 93.125-208 208-208S 464,109.125, 464,224s -93.125,208, -208,208S 48,338.875, 48,224zM 278.627,374.628l 128-128.001c 12.497-12.496 12.497-32.757 0-45.254c -12.497-12.497 -32.758-12.497,-45.255,0L 288,274.745 | |
| 58 | + L 288,96 c 0-17.673 -14.327-32 -32-32c-17.673,0, -32,14.327, -32,32l0,178.745 l -73.372-73.373c -12.497-12.497 -32.759-12.497,-45.256,0 | |
| 59 | + C 99.124,207.621, 96,215.811, 96,224s 3.124,16.379, 9.372,22.627l 128,128.001C 245.869,387.124, 266.131,387.124, 278.627,374.628z" /> | |
| 60 | +<glyph unicode="" d="M 512,224C 512,365.385, 397.385,480, 256,480s -256-114.615, -256-256s 114.615-256, 256-256S 512,82.615, 512,224z M 48,224 | |
| 61 | + c 0,114.875 93.125,208 208,208S 464,338.875, 464,224s -93.125-208, -208-208S 48,109.125, 48,224zM 278.627,73.372l 128,128.001c 12.497,12.496 12.497,32.757 0,45.254c -12.497,12.497 -32.758,12.497,-45.255,0L 288,173.255 | |
| 62 | + L 288,352 c 0,17.673 -14.327,32 -32,32c-17.673,0, -32-14.327, -32-32l0-178.745 l -73.372,73.373c -12.497,12.497 -32.759,12.497,-45.256,0 | |
| 63 | + C 99.124,240.379, 96,232.189, 96,224s 3.124-16.379, 9.372-22.627l 128-128.001C 245.869,60.876, 266.131,60.876, 278.627,73.372z" /> | |
| 64 | +<glyph unicode="" d="M 256,480C 397.385,480, 512,365.385, 512,224s -114.615-256, -256-256s -256,114.615, -256,256S 114.615,480, 256,480z M 256,16 | |
| 65 | + c 114.875,0 208,93.125 208,208S 370.875,432, 256,432s -208-93.125, -208-208S 141.125,16, 256,16zM 105.372,246.627l 128.001,128c 12.496,12.497 32.757,12.497 45.254,0c 12.497-12.497 12.497-32.758,0-45.255L 205.255,256 | |
| 66 | + L 384,256 c 17.673,0 32-14.327 32-32c0-17.673, -14.327-32, -32-32l-178.745,0 l 73.373-73.372c 12.497-12.497 12.497-32.759,0-45.256 | |
| 67 | + C 272.379,67.124, 264.189,64, 256,64s -16.379,3.124, -22.627,9.372l -128.001,128C 92.876,213.869, 92.876,234.131, 105.372,246.627z" /> | |
| 68 | +<glyph unicode="" d="M 256,480C 114.615,480,0,365.385,0,224s 114.615-256, 256-256s 256,114.615, 256,256S 397.385,480, 256,480z M 256,16 | |
| 69 | + c-114.875,0-208,93.125-208,208S 141.125,432, 256,432s 208-93.125, 208-208S 370.875,16, 256,16zM 406.628,246.627l-128.001,128c-12.496,12.497-32.757,12.497-45.254,0c-12.497-12.497-12.497-32.758,0-45.255L 306.745,256 | |
| 70 | + L 128,256 c-17.673,0-32-14.327-32-32c0-17.673, 14.327-32, 32-32l 178.745,0 l-73.373-73.372c-12.497-12.497-12.497-32.759,0-45.256 | |
| 71 | + C 239.621,67.124, 247.811,64, 256,64s 16.379,3.124, 22.627,9.372l 128.001,128C 419.124,213.869, 419.124,234.131, 406.628,246.627z" /> | |
| 72 | +<glyph unicode="" d="M 307.143,141.714q0-3.714 -2.857-6.571l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-112.286,112.286l-112.286-112.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571z" horiz-adv-x="329.143" /> | |
| 73 | +<glyph unicode="" d="M 307.143,269.714q0-3.714 -2.857-6.571l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 112.286-112.286l 112.286,112.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571z" horiz-adv-x="329.143" /> | |
| 74 | +<glyph unicode="" d="M 179.143,324.571q0-3.714 -2.857-6.571l-112.286-112.286l 112.286-112.286q 2.857-2.857 2.857-6.571t-2.857-6.571l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571z" horiz-adv-x="182.857" /> | |
| 75 | +<glyph unicode="" d="M 170,205.714q0-3.714 -2.857-6.571l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 112.286,112.286l-112.286,112.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571z" horiz-adv-x="182.857" /> | |
| 76 | +<glyph unicode="" d="M 292.571,169.143q0-7.429 -5.429-12.857l-128-128q-5.429-5.429 -12.857-5.429t-12.857,5.429l-128,128q-5.429,5.429 -5.429,12.857t 5.429,12.857t 12.857,5.429l 256,0 q 7.429,0 12.857-5.429t 5.429-12.857zM 292.571,278.857q0-7.429 -5.429-12.857t-12.857-5.429l-256,0 q-7.429,0 -12.857,5.429t-5.429,12.857t 5.429,12.857l 128,128q 5.429,5.429 12.857,5.429t 12.857-5.429l 128-128q 5.429-5.429 5.429-12.857z" horiz-adv-x="292.571" /> | |
| 77 | +<glyph unicode=" " horiz-adv-x="256" /> | |
| 78 | +</font></defs></svg> | |
| 0 | 79 | \ No newline at end of file | ... | ... |
No preview for this file type
No preview for this file type
1.94 KB
2.03 KB
index.html
| ... | ... | @@ -48,6 +48,7 @@ |
| 48 | 48 | 'css/bootstrap.min.css', |
| 49 | 49 | 'css/bootstrap-alert.min.css', |
| 50 | 50 | 'css/hover.custom.css', |
| 51 | + 'css/footable.core.min.css', | |
| 51 | 52 | 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', |
| 52 | 53 | 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700', |
| 53 | 54 | 'http://fonts.googleapis.com/css?family=Asap:400,700', |
| ... | ... | @@ -323,15 +324,18 @@ |
| 323 | 324 | <span>Última atualização </span> |
| 324 | 325 | <span class="timeago" title="{{updated_at}}"></span> |
| 325 | 326 | </div> |
| 326 | - <div class="table-responsive border"> | |
| 327 | - <table class="table"> | |
| 328 | - <tr class="header"> | |
| 329 | - <th class="position">Posição <a href="#"><span class="fa fa-question"></span></a></th> | |
| 330 | - <th class="abstract-text">Propostas</th> | |
| 331 | - <th class="views">Exibições</th> | |
| 332 | - <th class="votes-for"><span class="fa fa-check"></span></th> | |
| 333 | - <th class="votes-against"><span class="fa fa-times"></span></th> | |
| 334 | - </tr> | |
| 327 | + <div class="border"> | |
| 328 | + <table class="footable"> | |
| 329 | + <thead> | |
| 330 | + <tr class="header"> | |
| 331 | + <th class="position">Posição <a href="#" class="hidden-xs"><span class="fa fa-question"></span></a></th> | |
| 332 | + <th class="abstract-text" data-toggle="true">Propostas</th> | |
| 333 | + <th class="views" data-hide="phone">Exibições</th> | |
| 334 | + <th class="votes-for" data-hide="phone"><span class="sr-only">A favor</span><span class="fa fa-check"></span></th> | |
| 335 | + <th class="votes-against" data-hide="phone"><span class="sr-only">Contra</span><span class="fa fa-times"></span></th> | |
| 336 | + </tr> | |
| 337 | + </thead> | |
| 338 | + <tbody> | |
| 335 | 339 | {{#each proposals}} |
| 336 | 340 | <tr> |
| 337 | 341 | <td class="">{{calcPosition @index ../pagination.per_page ../pagination.page}}°</td> |
| ... | ... | @@ -341,6 +345,7 @@ |
| 341 | 345 | <td class="votes-against value">{{votes_against}}</td> |
| 342 | 346 | </tr> |
| 343 | 347 | {{/each}} |
| 348 | + </tbody> | |
| 344 | 349 | </table> |
| 345 | 350 | </div> |
| 346 | 351 | <div class="paging"></div> | ... | ... |
| ... | ... | @@ -0,0 +1,824 @@ |
| 1 | +/*! | |
| 2 | + * FooTable - Awesome Responsive Tables | |
| 3 | + * Version : 2.0.3 | |
| 4 | + * http://fooplugins.com/plugins/footable-jquery/ | |
| 5 | + * | |
| 6 | + * Requires jQuery - http://jquery.com/ | |
| 7 | + * | |
| 8 | + * Copyright 2014 Steven Usher & Brad Vincent | |
| 9 | + * Released under the MIT license | |
| 10 | + * You are free to use FooTable in commercial projects as long as this copyright header is left intact. | |
| 11 | + * | |
| 12 | + * Date: 11 Nov 2014 | |
| 13 | + */ | |
| 14 | +(function ($, w, undefined) { | |
| 15 | + w.footable = { | |
| 16 | + options: { | |
| 17 | + delay: 100, // The number of millseconds to wait before triggering the react event | |
| 18 | + breakpoints: { // The different screen resolution breakpoints | |
| 19 | + phone: 480, | |
| 20 | + tablet: 1024 | |
| 21 | + }, | |
| 22 | + parsers: { // The default parser to parse the value out of a cell (values are used in building up row detail) | |
| 23 | + alpha: function (cell) { | |
| 24 | + return $(cell).data('value') || $.trim($(cell).text()); | |
| 25 | + }, | |
| 26 | + numeric: function (cell) { | |
| 27 | + var val = $(cell).data('value') || $(cell).text().replace(/[^0-9.\-]/g, ''); | |
| 28 | + val = parseFloat(val); | |
| 29 | + if (isNaN(val)) val = 0; | |
| 30 | + return val; | |
| 31 | + } | |
| 32 | + }, | |
| 33 | + addRowToggle: true, | |
| 34 | + calculateWidthOverride: null, | |
| 35 | + toggleSelector: ' > tbody > tr:not(.footable-row-detail)', //the selector to show/hide the detail row | |
| 36 | + columnDataSelector: '> thead > tr:last-child > th, > thead > tr:last-child > td', //the selector used to find the column data in the thead | |
| 37 | + detailSeparator: ':', //the separator character used when building up the detail row | |
| 38 | + toggleHTMLElement: '<span />', // override this if you want to insert a click target rather than use a background image. | |
| 39 | + createGroupedDetail: function (data) { | |
| 40 | + var groups = { '_none': { 'name': null, 'data': [] } }; | |
| 41 | + for (var i = 0; i < data.length; i++) { | |
| 42 | + var groupid = data[i].group; | |
| 43 | + if (groupid !== null) { | |
| 44 | + if (!(groupid in groups)) | |
| 45 | + groups[groupid] = { 'name': data[i].groupName || data[i].group, 'data': [] }; | |
| 46 | + | |
| 47 | + groups[groupid].data.push(data[i]); | |
| 48 | + } else { | |
| 49 | + groups._none.data.push(data[i]); | |
| 50 | + } | |
| 51 | + } | |
| 52 | + return groups; | |
| 53 | + }, | |
| 54 | + createDetail: function (element, data, createGroupedDetail, separatorChar, classes) { | |
| 55 | + /// <summary>This function is used by FooTable to generate the detail view seen when expanding a collapsed row.</summary> | |
| 56 | + /// <param name="element">This is the div that contains all the detail row information, anything could be added to it.</param> | |
| 57 | + /// <param name="data"> | |
| 58 | + /// This is an array of objects containing the cell information for the current row. | |
| 59 | + /// These objects look like the below: | |
| 60 | + /// obj = { | |
| 61 | + /// 'name': String, // The name of the column | |
| 62 | + /// 'value': Object, // The value parsed from the cell using the parsers. This could be a string, a number or whatever the parser outputs. | |
| 63 | + /// 'display': String, // This is the actual HTML from the cell, so if you have images etc you want moved this is the one to use and is the default value used. | |
| 64 | + /// 'group': String, // This is the identifier used in the data-group attribute of the column. | |
| 65 | + /// 'groupName': String // This is the actual name of the group the column belongs to. | |
| 66 | + /// } | |
| 67 | + /// </param> | |
| 68 | + /// <param name="createGroupedDetail">The grouping function to group the data</param> | |
| 69 | + /// <param name="separatorChar">The separator charactor used</param> | |
| 70 | + /// <param name="classes">The array of class names used to build up the detail row</param> | |
| 71 | + | |
| 72 | + var groups = createGroupedDetail(data); | |
| 73 | + for (var group in groups) { | |
| 74 | + if (groups[group].data.length === 0) continue; | |
| 75 | + if (group !== '_none') element.append('<div class="' + classes.detailInnerGroup + '">' + groups[group].name + '</div>'); | |
| 76 | + | |
| 77 | + for (var j = 0; j < groups[group].data.length; j++) { | |
| 78 | + var separator = (groups[group].data[j].name) ? separatorChar : ''; | |
| 79 | + element.append($('<div></div>').addClass(classes.detailInnerRow).append($('<div></div>').addClass(classes.detailInnerName) | |
| 80 | + .append(groups[group].data[j].name + separator)).append($('<div></div>').addClass(classes.detailInnerValue) | |
| 81 | + .attr('data-bind-value', groups[group].data[j].bindName).append(groups[group].data[j].display))); | |
| 82 | + } | |
| 83 | + } | |
| 84 | + }, | |
| 85 | + classes: { | |
| 86 | + main: 'footable', | |
| 87 | + loading: 'footable-loading', | |
| 88 | + loaded: 'footable-loaded', | |
| 89 | + toggle: 'footable-toggle', | |
| 90 | + disabled: 'footable-disabled', | |
| 91 | + detail: 'footable-row-detail', | |
| 92 | + detailCell: 'footable-row-detail-cell', | |
| 93 | + detailInner: 'footable-row-detail-inner', | |
| 94 | + detailInnerRow: 'footable-row-detail-row', | |
| 95 | + detailInnerGroup: 'footable-row-detail-group', | |
| 96 | + detailInnerName: 'footable-row-detail-name', | |
| 97 | + detailInnerValue: 'footable-row-detail-value', | |
| 98 | + detailShow: 'footable-detail-show' | |
| 99 | + }, | |
| 100 | + triggers: { | |
| 101 | + initialize: 'footable_initialize', //trigger this event to force FooTable to reinitialize | |
| 102 | + resize: 'footable_resize', //trigger this event to force FooTable to resize | |
| 103 | + redraw: 'footable_redraw', //trigger this event to force FooTable to redraw | |
| 104 | + toggleRow: 'footable_toggle_row', //trigger this event to force FooTable to toggle a row | |
| 105 | + expandFirstRow: 'footable_expand_first_row', //trigger this event to force FooTable to expand the first row | |
| 106 | + expandAll: 'footable_expand_all', //trigger this event to force FooTable to expand all rows | |
| 107 | + collapseAll: 'footable_collapse_all' //trigger this event to force FooTable to collapse all rows | |
| 108 | + }, | |
| 109 | + events: { | |
| 110 | + alreadyInitialized: 'footable_already_initialized', //fires when the FooTable has already been initialized | |
| 111 | + initializing: 'footable_initializing', //fires before FooTable starts initializing | |
| 112 | + initialized: 'footable_initialized', //fires after FooTable has finished initializing | |
| 113 | + resizing: 'footable_resizing', //fires before FooTable resizes | |
| 114 | + resized: 'footable_resized', //fires after FooTable has resized | |
| 115 | + redrawn: 'footable_redrawn', //fires after FooTable has redrawn | |
| 116 | + breakpoint: 'footable_breakpoint', //fires inside the resize function, when a breakpoint is hit | |
| 117 | + columnData: 'footable_column_data', //fires when setting up column data. Plugins should use this event to capture their own info about a column | |
| 118 | + rowDetailUpdating: 'footable_row_detail_updating', //fires before a detail row is updated | |
| 119 | + rowDetailUpdated: 'footable_row_detail_updated', //fires when a detail row is being updated | |
| 120 | + rowCollapsed: 'footable_row_collapsed', //fires when a row is collapsed | |
| 121 | + rowExpanded: 'footable_row_expanded', //fires when a row is expanded | |
| 122 | + rowRemoved: 'footable_row_removed', //fires when a row is removed | |
| 123 | + reset: 'footable_reset' //fires when FooTable is reset | |
| 124 | + }, | |
| 125 | + debug: false, // Whether or not to log information to the console. | |
| 126 | + log: null | |
| 127 | + }, | |
| 128 | + | |
| 129 | + version: { | |
| 130 | + major: 0, minor: 5, | |
| 131 | + toString: function () { | |
| 132 | + return w.footable.version.major + '.' + w.footable.version.minor; | |
| 133 | + }, | |
| 134 | + parse: function (str) { | |
| 135 | + var version = /(\d+)\.?(\d+)?\.?(\d+)?/.exec(str); | |
| 136 | + return { | |
| 137 | + major: parseInt(version[1], 10) || 0, | |
| 138 | + minor: parseInt(version[2], 10) || 0, | |
| 139 | + patch: parseInt(version[3], 10) || 0 | |
| 140 | + }; | |
| 141 | + } | |
| 142 | + }, | |
| 143 | + | |
| 144 | + plugins: { | |
| 145 | + _validate: function (plugin) { | |
| 146 | + ///<summary>Simple validation of the <paramref name="plugin"/> to make sure any members called by FooTable actually exist.</summary> | |
| 147 | + ///<param name="plugin">The object defining the plugin, this should implement a string property called "name" and a function called "init".</param> | |
| 148 | + | |
| 149 | + if (!$.isFunction(plugin)) { | |
| 150 | + if (w.footable.options.debug === true) console.error('Validation failed, expected type "function", received type "{0}".', typeof plugin); | |
| 151 | + return false; | |
| 152 | + } | |
| 153 | + var p = new plugin(); | |
| 154 | + if (typeof p['name'] !== 'string') { | |
| 155 | + if (w.footable.options.debug === true) console.error('Validation failed, plugin does not implement a string property called "name".', p); | |
| 156 | + return false; | |
| 157 | + } | |
| 158 | + if (!$.isFunction(p['init'])) { | |
| 159 | + if (w.footable.options.debug === true) console.error('Validation failed, plugin "' + p['name'] + '" does not implement a function called "init".', p); | |
| 160 | + return false; | |
| 161 | + } | |
| 162 | + if (w.footable.options.debug === true) console.log('Validation succeeded for plugin "' + p['name'] + '".', p); | |
| 163 | + return true; | |
| 164 | + }, | |
| 165 | + registered: [], // An array containing all registered plugins. | |
| 166 | + register: function (plugin, options) { | |
| 167 | + ///<summary>Registers a <paramref name="plugin"/> and its default <paramref name="options"/> with FooTable.</summary> | |
| 168 | + ///<param name="plugin">The plugin that should implement a string property called "name" and a function called "init".</param> | |
| 169 | + ///<param name="options">The default options to merge with the FooTable's base options.</param> | |
| 170 | + | |
| 171 | + if (w.footable.plugins._validate(plugin)) { | |
| 172 | + w.footable.plugins.registered.push(plugin); | |
| 173 | + if (typeof options === 'object') $.extend(true, w.footable.options, options); | |
| 174 | + } | |
| 175 | + }, | |
| 176 | + load: function(instance){ | |
| 177 | + var loaded = [], registered, i; | |
| 178 | + for(i = 0; i < w.footable.plugins.registered.length; i++){ | |
| 179 | + try { | |
| 180 | + registered = w.footable.plugins.registered[i]; | |
| 181 | + loaded.push(new registered(instance)); | |
| 182 | + } catch (err) { | |
| 183 | + if (w.footable.options.debug === true) console.error(err); | |
| 184 | + } | |
| 185 | + } | |
| 186 | + return loaded; | |
| 187 | + }, | |
| 188 | + init: function (instance) { | |
| 189 | + ///<summary>Loops through all registered plugins and calls the "init" method supplying the current <paramref name="instance"/> of the FooTable as the first parameter.</summary> | |
| 190 | + ///<param name="instance">The current instance of the FooTable that the plugin is being initialized for.</param> | |
| 191 | + | |
| 192 | + for (var i = 0; i < instance.plugins.length; i++) { | |
| 193 | + try { | |
| 194 | + instance.plugins[i]['init'](instance); | |
| 195 | + } catch (err) { | |
| 196 | + if (w.footable.options.debug === true) console.error(err); | |
| 197 | + } | |
| 198 | + } | |
| 199 | + } | |
| 200 | + } | |
| 201 | + }; | |
| 202 | + | |
| 203 | + var instanceCount = 0; | |
| 204 | + | |
| 205 | + $.fn.footable = function (options) { | |
| 206 | + ///<summary>The main constructor call to initialize the plugin using the supplied <paramref name="options"/>.</summary> | |
| 207 | + ///<param name="options"> | |
| 208 | + ///<para>A JSON object containing user defined options for the plugin to use. Any options not supplied will have a default value assigned.</para> | |
| 209 | + ///<para>Check the documentation or the default options object above for more information on available options.</para> | |
| 210 | + ///</param> | |
| 211 | + | |
| 212 | + options = options || {}; | |
| 213 | + var o = $.extend(true, {}, w.footable.options, options); //merge user and default options | |
| 214 | + return this.each(function () { | |
| 215 | + instanceCount++; | |
| 216 | + var footable = new Footable(this, o, instanceCount); | |
| 217 | + $(this).data('footable', footable); | |
| 218 | + }); | |
| 219 | + }; | |
| 220 | + | |
| 221 | + //helper for using timeouts | |
| 222 | + function Timer() { | |
| 223 | + ///<summary>Simple timer object created around a timeout.</summary> | |
| 224 | + var t = this; | |
| 225 | + t.id = null; | |
| 226 | + t.busy = false; | |
| 227 | + t.start = function (code, milliseconds) { | |
| 228 | + ///<summary>Starts the timer and waits the specified amount of <paramref name="milliseconds"/> before executing the supplied <paramref name="code"/>.</summary> | |
| 229 | + ///<param name="code">The code to execute once the timer runs out.</param> | |
| 230 | + ///<param name="milliseconds">The time in milliseconds to wait before executing the supplied <paramref name="code"/>.</param> | |
| 231 | + | |
| 232 | + if (t.busy) { | |
| 233 | + return; | |
| 234 | + } | |
| 235 | + t.stop(); | |
| 236 | + t.id = setTimeout(function () { | |
| 237 | + code(); | |
| 238 | + t.id = null; | |
| 239 | + t.busy = false; | |
| 240 | + }, milliseconds); | |
| 241 | + t.busy = true; | |
| 242 | + }; | |
| 243 | + t.stop = function () { | |
| 244 | + ///<summary>Stops the timer if its runnning and resets it back to its starting state.</summary> | |
| 245 | + | |
| 246 | + if (t.id !== null) { | |
| 247 | + clearTimeout(t.id); | |
| 248 | + t.id = null; | |
| 249 | + t.busy = false; | |
| 250 | + } | |
| 251 | + }; | |
| 252 | + } | |
| 253 | + | |
| 254 | + function Footable(t, o, id) { | |
| 255 | + ///<summary>Inits a new instance of the plugin.</summary> | |
| 256 | + ///<param name="t">The main table element to apply this plugin to.</param> | |
| 257 | + ///<param name="o">The options supplied to the plugin. Check the defaults object to see all available options.</param> | |
| 258 | + ///<param name="id">The id to assign to this instance of the plugin.</param> | |
| 259 | + | |
| 260 | + var ft = this; | |
| 261 | + ft.id = id; | |
| 262 | + ft.table = t; | |
| 263 | + ft.options = o; | |
| 264 | + ft.breakpoints = []; | |
| 265 | + ft.breakpointNames = ''; | |
| 266 | + ft.columns = {}; | |
| 267 | + ft.plugins = w.footable.plugins.load(ft); | |
| 268 | + | |
| 269 | + var opt = ft.options, | |
| 270 | + cls = opt.classes, | |
| 271 | + evt = opt.events, | |
| 272 | + trg = opt.triggers, | |
| 273 | + indexOffset = 0; | |
| 274 | + | |
| 275 | + // This object simply houses all the timers used in the FooTable. | |
| 276 | + ft.timers = { | |
| 277 | + resize: new Timer(), | |
| 278 | + register: function (name) { | |
| 279 | + ft.timers[name] = new Timer(); | |
| 280 | + return ft.timers[name]; | |
| 281 | + } | |
| 282 | + }; | |
| 283 | + | |
| 284 | + ft.init = function () { | |
| 285 | + var $window = $(w), $table = $(ft.table); | |
| 286 | + | |
| 287 | + w.footable.plugins.init(ft); | |
| 288 | + | |
| 289 | + if ($table.hasClass(cls.loaded)) { | |
| 290 | + //already loaded FooTable for the table, so don't init again | |
| 291 | + ft.raise(evt.alreadyInitialized); | |
| 292 | + return; | |
| 293 | + } | |
| 294 | + | |
| 295 | + //raise the initializing event | |
| 296 | + ft.raise(evt.initializing); | |
| 297 | + | |
| 298 | + $table.addClass(cls.loading); | |
| 299 | + | |
| 300 | + // Get the column data once for the life time of the plugin | |
| 301 | + $table.find(opt.columnDataSelector).each(function () { | |
| 302 | + var data = ft.getColumnData(this); | |
| 303 | + ft.columns[data.index] = data; | |
| 304 | + }); | |
| 305 | + | |
| 306 | + // Create a nice friendly array to work with out of the breakpoints object. | |
| 307 | + for (var name in opt.breakpoints) { | |
| 308 | + ft.breakpoints.push({ 'name': name, 'width': opt.breakpoints[name] }); | |
| 309 | + ft.breakpointNames += (name + ' '); | |
| 310 | + } | |
| 311 | + | |
| 312 | + // Sort the breakpoints so the smallest is checked first | |
| 313 | + ft.breakpoints.sort(function (a, b) { | |
| 314 | + return a['width'] - b['width']; | |
| 315 | + }); | |
| 316 | + | |
| 317 | + $table | |
| 318 | + .unbind(trg.initialize) | |
| 319 | + //bind to FooTable initialize trigger | |
| 320 | + .bind(trg.initialize, function () { | |
| 321 | + //remove previous "state" (to "force" a resize) | |
| 322 | + $table.removeData('footable_info'); | |
| 323 | + $table.data('breakpoint', ''); | |
| 324 | + | |
| 325 | + //trigger the FooTable resize | |
| 326 | + $table.trigger(trg.resize); | |
| 327 | + | |
| 328 | + //remove the loading class | |
| 329 | + $table.removeClass(cls.loading); | |
| 330 | + | |
| 331 | + //add the FooTable and loaded class | |
| 332 | + $table.addClass(cls.loaded).addClass(cls.main); | |
| 333 | + | |
| 334 | + //raise the initialized event | |
| 335 | + ft.raise(evt.initialized); | |
| 336 | + }) | |
| 337 | + .unbind(trg.redraw) | |
| 338 | + //bind to FooTable redraw trigger | |
| 339 | + .bind(trg.redraw, function () { | |
| 340 | + ft.redraw(); | |
| 341 | + }) | |
| 342 | + .unbind(trg.resize) | |
| 343 | + //bind to FooTable resize trigger | |
| 344 | + .bind(trg.resize, function () { | |
| 345 | + ft.resize(); | |
| 346 | + }) | |
| 347 | + .unbind(trg.expandFirstRow) | |
| 348 | + //bind to FooTable expandFirstRow trigger | |
| 349 | + .bind(trg.expandFirstRow, function () { | |
| 350 | + $table.find(opt.toggleSelector).first().not('.' + cls.detailShow).trigger(trg.toggleRow); | |
| 351 | + }) | |
| 352 | + .unbind(trg.expandAll) | |
| 353 | + //bind to FooTable expandFirstRow trigger | |
| 354 | + .bind(trg.expandAll, function () { | |
| 355 | + $table.find(opt.toggleSelector).not('.' + cls.detailShow).trigger(trg.toggleRow); | |
| 356 | + }) | |
| 357 | + .unbind(trg.collapseAll) | |
| 358 | + //bind to FooTable expandFirstRow trigger | |
| 359 | + .bind(trg.collapseAll, function () { | |
| 360 | + $table.find('.' + cls.detailShow).trigger(trg.toggleRow); | |
| 361 | + }); | |
| 362 | + | |
| 363 | + //trigger a FooTable initialize | |
| 364 | + $table.trigger(trg.initialize); | |
| 365 | + | |
| 366 | + //bind to window resize | |
| 367 | + $window | |
| 368 | + .bind('resize.footable', function () { | |
| 369 | + ft.timers.resize.stop(); | |
| 370 | + ft.timers.resize.start(function () { | |
| 371 | + ft.raise(trg.resize); | |
| 372 | + }, opt.delay); | |
| 373 | + }); | |
| 374 | + }; | |
| 375 | + | |
| 376 | + ft.addRowToggle = function () { | |
| 377 | + if (!opt.addRowToggle) return; | |
| 378 | + | |
| 379 | + var $table = $(ft.table), | |
| 380 | + hasToggleColumn = false; | |
| 381 | + | |
| 382 | + //first remove all toggle spans | |
| 383 | + $table.find('span.' + cls.toggle).remove(); | |
| 384 | + | |
| 385 | + for (var c in ft.columns) { | |
| 386 | + var col = ft.columns[c]; | |
| 387 | + if (col.toggle) { | |
| 388 | + hasToggleColumn = true; | |
| 389 | + var selector = '> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > td:nth-child(' + (parseInt(col.index, 10) + 1) + '),' + | |
| 390 | + '> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > th:nth-child(' + (parseInt(col.index, 10) + 1) + ')'; | |
| 391 | + $table.find(selector).not('.' + cls.detailCell).prepend($(opt.toggleHTMLElement).addClass(cls.toggle)); | |
| 392 | + return; | |
| 393 | + } | |
| 394 | + } | |
| 395 | + //check if we have an toggle column. If not then add it to the first column just to be safe | |
| 396 | + if (!hasToggleColumn) { | |
| 397 | + $table | |
| 398 | + .find('> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > td:first-child') | |
| 399 | + .add('> tbody > tr:not(.' + cls.detail + ',.' + cls.disabled + ') > th:first-child') | |
| 400 | + .not('.' + cls.detailCell) | |
| 401 | + .prepend($(opt.toggleHTMLElement).addClass(cls.toggle)); | |
| 402 | + } | |
| 403 | + }; | |
| 404 | + | |
| 405 | + ft.setColumnClasses = function () { | |
| 406 | + var $table = $(ft.table); | |
| 407 | + for (var c in ft.columns) { | |
| 408 | + var col = ft.columns[c]; | |
| 409 | + if (col.className !== null) { | |
| 410 | + var selector = '', first = true; | |
| 411 | + $.each(col.matches, function (m, match) { //support for colspans | |
| 412 | + if (!first) selector += ', '; | |
| 413 | + selector += '> tbody > tr:not(.' + cls.detail + ') > td:nth-child(' + (parseInt(match, 10) + 1) + ')'; | |
| 414 | + first = false; | |
| 415 | + }); | |
| 416 | + //add the className to the cells specified by data-class="blah" | |
| 417 | + $table.find(selector).not('.' + cls.detailCell).addClass(col.className); | |
| 418 | + } | |
| 419 | + } | |
| 420 | + }; | |
| 421 | + | |
| 422 | + //moved this out into it's own function so that it can be called from other add-ons | |
| 423 | + ft.bindToggleSelectors = function () { | |
| 424 | + var $table = $(ft.table); | |
| 425 | + | |
| 426 | + if (!ft.hasAnyBreakpointColumn()) return; | |
| 427 | + | |
| 428 | + $table.find(opt.toggleSelector).unbind(trg.toggleRow).bind(trg.toggleRow, function (e) { | |
| 429 | + var $row = $(this).is('tr') ? $(this) : $(this).parents('tr:first'); | |
| 430 | + ft.toggleDetail($row); | |
| 431 | + }); | |
| 432 | + | |
| 433 | + $table.find(opt.toggleSelector).unbind('click.footable').bind('click.footable', function (e) { | |
| 434 | + if ($table.is('.breakpoint') && $(e.target).is('td,th,.'+ cls.toggle)) { | |
| 435 | + $(this).trigger(trg.toggleRow); | |
| 436 | + } | |
| 437 | + }); | |
| 438 | + }; | |
| 439 | + | |
| 440 | + ft.parse = function (cell, column) { | |
| 441 | + var parser = opt.parsers[column.type] || opt.parsers.alpha; | |
| 442 | + return parser(cell); | |
| 443 | + }; | |
| 444 | + | |
| 445 | + ft.getColumnData = function (th) { | |
| 446 | + var $th = $(th), hide = $th.data('hide'), index = $th.index(); | |
| 447 | + hide = hide || ''; | |
| 448 | + hide = jQuery.map(hide.split(','), function (a) { | |
| 449 | + return jQuery.trim(a); | |
| 450 | + }); | |
| 451 | + var data = { | |
| 452 | + 'index': index, | |
| 453 | + 'hide': { }, | |
| 454 | + 'type': $th.data('type') || 'alpha', | |
| 455 | + 'name': $th.data('name') || $.trim($th.text()), | |
| 456 | + 'ignore': $th.data('ignore') || false, | |
| 457 | + 'toggle': $th.data('toggle') || false, | |
| 458 | + 'className': $th.data('class') || null, | |
| 459 | + 'matches': [], | |
| 460 | + 'names': { }, | |
| 461 | + 'group': $th.data('group') || null, | |
| 462 | + 'groupName': null, | |
| 463 | + 'isEditable': $th.data('editable') | |
| 464 | + }; | |
| 465 | + | |
| 466 | + if (data.group !== null) { | |
| 467 | + var $group = $(ft.table).find('> thead > tr.footable-group-row > th[data-group="' + data.group + '"], > thead > tr.footable-group-row > td[data-group="' + data.group + '"]').first(); | |
| 468 | + data.groupName = ft.parse($group, { 'type': 'alpha' }); | |
| 469 | + } | |
| 470 | + | |
| 471 | + var pcolspan = parseInt($th.prev().attr('colspan') || 0, 10); | |
| 472 | + indexOffset += pcolspan > 1 ? pcolspan - 1 : 0; | |
| 473 | + var colspan = parseInt($th.attr('colspan') || 0, 10), curindex = data.index + indexOffset; | |
| 474 | + if (colspan > 1) { | |
| 475 | + var names = $th.data('names'); | |
| 476 | + names = names || ''; | |
| 477 | + names = names.split(','); | |
| 478 | + for (var i = 0; i < colspan; i++) { | |
| 479 | + data.matches.push(i + curindex); | |
| 480 | + if (i < names.length) data.names[i + curindex] = names[i]; | |
| 481 | + } | |
| 482 | + } else { | |
| 483 | + data.matches.push(curindex); | |
| 484 | + } | |
| 485 | + | |
| 486 | + data.hide['default'] = ($th.data('hide') === "all") || ($.inArray('default', hide) >= 0); | |
| 487 | + | |
| 488 | + var hasBreakpoint = false; | |
| 489 | + for (var name in opt.breakpoints) { | |
| 490 | + data.hide[name] = ($th.data('hide') === "all") || ($.inArray(name, hide) >= 0); | |
| 491 | + hasBreakpoint = hasBreakpoint || data.hide[name]; | |
| 492 | + } | |
| 493 | + data.hasBreakpoint = hasBreakpoint; | |
| 494 | + var e = ft.raise(evt.columnData, { 'column': { 'data': data, 'th': th } }); | |
| 495 | + return e.column.data; | |
| 496 | + }; | |
| 497 | + | |
| 498 | + ft.getViewportWidth = function () { | |
| 499 | + return window.innerWidth || (document.body ? document.body.offsetWidth : 0); | |
| 500 | + }; | |
| 501 | + | |
| 502 | + ft.calculateWidth = function ($table, info) { | |
| 503 | + if (jQuery.isFunction(opt.calculateWidthOverride)) { | |
| 504 | + return opt.calculateWidthOverride($table, info); | |
| 505 | + } | |
| 506 | + if (info.viewportWidth < info.width) info.width = info.viewportWidth; | |
| 507 | + if (info.parentWidth < info.width) info.width = info.parentWidth; | |
| 508 | + return info; | |
| 509 | + }; | |
| 510 | + | |
| 511 | + ft.hasBreakpointColumn = function (breakpoint) { | |
| 512 | + for (var c in ft.columns) { | |
| 513 | + if (ft.columns[c].hide[breakpoint]) { | |
| 514 | + if (ft.columns[c].ignore) { | |
| 515 | + continue; | |
| 516 | + } | |
| 517 | + return true; | |
| 518 | + } | |
| 519 | + } | |
| 520 | + return false; | |
| 521 | + }; | |
| 522 | + | |
| 523 | + ft.hasAnyBreakpointColumn = function () { | |
| 524 | + for (var c in ft.columns) { | |
| 525 | + if (ft.columns[c].hasBreakpoint) { | |
| 526 | + return true; | |
| 527 | + } | |
| 528 | + } | |
| 529 | + return false; | |
| 530 | + }; | |
| 531 | + | |
| 532 | + ft.resize = function () { | |
| 533 | + var $table = $(ft.table); | |
| 534 | + | |
| 535 | + if (!$table.is(':visible')) { | |
| 536 | + return; | |
| 537 | + } //we only care about FooTables that are visible | |
| 538 | + | |
| 539 | + if (!ft.hasAnyBreakpointColumn()) { | |
| 540 | + $table.trigger(trg.redraw); | |
| 541 | + return; | |
| 542 | + } //we only care about FooTables that have breakpoints | |
| 543 | + | |
| 544 | + var info = { | |
| 545 | + 'width': $table.width(), //the table width | |
| 546 | + 'viewportWidth': ft.getViewportWidth(), //the width of the viewport | |
| 547 | + 'parentWidth': $table.parent().width() //the width of the parent | |
| 548 | + }; | |
| 549 | + | |
| 550 | + info = ft.calculateWidth($table, info); | |
| 551 | + | |
| 552 | + var pinfo = $table.data('footable_info'); | |
| 553 | + $table.data('footable_info', info); | |
| 554 | + ft.raise(evt.resizing, { 'old': pinfo, 'info': info }); | |
| 555 | + | |
| 556 | + // This (if) statement is here purely to make sure events aren't raised twice as mobile safari seems to do | |
| 557 | + if (!pinfo || (pinfo && pinfo.width && pinfo.width !== info.width)) { | |
| 558 | + | |
| 559 | + var current = null, breakpoint; | |
| 560 | + for (var i = 0; i < ft.breakpoints.length; i++) { | |
| 561 | + breakpoint = ft.breakpoints[i]; | |
| 562 | + if (breakpoint && breakpoint.width && info.width <= breakpoint.width) { | |
| 563 | + current = breakpoint; | |
| 564 | + break; | |
| 565 | + } | |
| 566 | + } | |
| 567 | + | |
| 568 | + var breakpointName = (current === null ? 'default' : current['name']), | |
| 569 | + hasBreakpointFired = ft.hasBreakpointColumn(breakpointName), | |
| 570 | + previousBreakpoint = $table.data('breakpoint'); | |
| 571 | + | |
| 572 | + $table | |
| 573 | + .data('breakpoint', breakpointName) | |
| 574 | + .removeClass('default breakpoint').removeClass(ft.breakpointNames) | |
| 575 | + .addClass(breakpointName + (hasBreakpointFired ? ' breakpoint' : '')); | |
| 576 | + | |
| 577 | + //only do something if the breakpoint has changed | |
| 578 | + if (breakpointName !== previousBreakpoint) { | |
| 579 | + //trigger a redraw | |
| 580 | + $table.trigger(trg.redraw); | |
| 581 | + //raise a breakpoint event | |
| 582 | + ft.raise(evt.breakpoint, { 'breakpoint': breakpointName, 'info': info }); | |
| 583 | + } | |
| 584 | + } | |
| 585 | + | |
| 586 | + ft.raise(evt.resized, { 'old': pinfo, 'info': info }); | |
| 587 | + }; | |
| 588 | + | |
| 589 | + ft.redraw = function () { | |
| 590 | + //add the toggler to each row | |
| 591 | + ft.addRowToggle(); | |
| 592 | + | |
| 593 | + //bind the toggle selector click events | |
| 594 | + ft.bindToggleSelectors(); | |
| 595 | + | |
| 596 | + //set any cell classes defined for the columns | |
| 597 | + ft.setColumnClasses(); | |
| 598 | + | |
| 599 | + var $table = $(ft.table), | |
| 600 | + breakpointName = $table.data('breakpoint'), | |
| 601 | + hasBreakpointFired = ft.hasBreakpointColumn(breakpointName); | |
| 602 | + | |
| 603 | + $table | |
| 604 | + .find('> tbody > tr:not(.' + cls.detail + ')').data('detail_created', false).end() | |
| 605 | + .find('> thead > tr:last-child > th') | |
| 606 | + .each(function () { | |
| 607 | + var data = ft.columns[$(this).index()], selector = '', first = true; | |
| 608 | + $.each(data.matches, function (m, match) { | |
| 609 | + if (!first) { | |
| 610 | + selector += ', '; | |
| 611 | + } | |
| 612 | + var count = match + 1; | |
| 613 | + selector += '> tbody > tr:not(.' + cls.detail + ') > td:nth-child(' + count + ')'; | |
| 614 | + selector += ', > tfoot > tr:not(.' + cls.detail + ') > td:nth-child(' + count + ')'; | |
| 615 | + selector += ', > colgroup > col:nth-child(' + count + ')'; | |
| 616 | + first = false; | |
| 617 | + }); | |
| 618 | + | |
| 619 | + selector += ', > thead > tr[data-group-row="true"] > th[data-group="' + data.group + '"]'; | |
| 620 | + var $column = $table.find(selector).add(this); | |
| 621 | + if (breakpointName !== '') { | |
| 622 | + if (data.hide[breakpointName] === false) $column.addClass('footable-visible').show(); | |
| 623 | + else $column.removeClass('footable-visible').hide(); | |
| 624 | + } | |
| 625 | + | |
| 626 | + if ($table.find('> thead > tr.footable-group-row').length === 1) { | |
| 627 | + var $groupcols = $table.find('> thead > tr:last-child > th[data-group="' + data.group + '"]:visible, > thead > tr:last-child > th[data-group="' + data.group + '"]:visible'), | |
| 628 | + $group = $table.find('> thead > tr.footable-group-row > th[data-group="' + data.group + '"], > thead > tr.footable-group-row > td[data-group="' + data.group + '"]'), | |
| 629 | + groupspan = 0; | |
| 630 | + | |
| 631 | + $.each($groupcols, function () { | |
| 632 | + groupspan += parseInt($(this).attr('colspan') || 1, 10); | |
| 633 | + }); | |
| 634 | + | |
| 635 | + if (groupspan > 0) $group.attr('colspan', groupspan).show(); | |
| 636 | + else $group.hide(); | |
| 637 | + } | |
| 638 | + }) | |
| 639 | + .end() | |
| 640 | + .find('> tbody > tr.' + cls.detailShow).each(function () { | |
| 641 | + ft.createOrUpdateDetailRow(this); | |
| 642 | + }); | |
| 643 | + | |
| 644 | + $table.find("[data-bind-name]").each(function () { | |
| 645 | + ft.toggleInput(this); | |
| 646 | + }); | |
| 647 | + | |
| 648 | + $table.find('> tbody > tr.' + cls.detailShow + ':visible').each(function () { | |
| 649 | + var $next = $(this).next(); | |
| 650 | + if ($next.hasClass(cls.detail)) { | |
| 651 | + if (!hasBreakpointFired) $next.hide(); | |
| 652 | + else $next.show(); | |
| 653 | + } | |
| 654 | + }); | |
| 655 | + | |
| 656 | + // adding .footable-first-column and .footable-last-column to the first and last th and td of each row in order to allow | |
| 657 | + // for styling if the first or last column is hidden (which won't work using :first-child or :last-child) | |
| 658 | + $table.find('> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column').removeClass('footable-last-column'); | |
| 659 | + $table.find('> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column').removeClass('footable-first-column'); | |
| 660 | + $table.find('> thead > tr, > tbody > tr') | |
| 661 | + .find('> th.footable-visible:last, > td.footable-visible:last') | |
| 662 | + .addClass('footable-last-column') | |
| 663 | + .end() | |
| 664 | + .find('> th.footable-visible:first, > td.footable-visible:first') | |
| 665 | + .addClass('footable-first-column'); | |
| 666 | + | |
| 667 | + ft.raise(evt.redrawn); | |
| 668 | + }; | |
| 669 | + | |
| 670 | + ft.toggleDetail = function (row) { | |
| 671 | + var $row = (row.jquery) ? row : $(row), | |
| 672 | + $next = $row.next(); | |
| 673 | + | |
| 674 | + //check if the row is already expanded | |
| 675 | + if ($row.hasClass(cls.detailShow)) { | |
| 676 | + $row.removeClass(cls.detailShow); | |
| 677 | + | |
| 678 | + //only hide the next row if it's a detail row | |
| 679 | + if ($next.hasClass(cls.detail)) $next.hide(); | |
| 680 | + | |
| 681 | + ft.raise(evt.rowCollapsed, { 'row': $row[0] }); | |
| 682 | + | |
| 683 | + } else { | |
| 684 | + ft.createOrUpdateDetailRow($row[0]); | |
| 685 | + $row.addClass(cls.detailShow) | |
| 686 | + .next().show(); | |
| 687 | + | |
| 688 | + ft.raise(evt.rowExpanded, { 'row': $row[0] }); | |
| 689 | + } | |
| 690 | + }; | |
| 691 | + | |
| 692 | + ft.removeRow = function (row) { | |
| 693 | + var $row = (row.jquery) ? row : $(row); | |
| 694 | + if ($row.hasClass(cls.detail)) { | |
| 695 | + $row = $row.prev(); | |
| 696 | + } | |
| 697 | + var $next = $row.next(); | |
| 698 | + if ($row.data('detail_created') === true) { | |
| 699 | + //remove the detail row | |
| 700 | + $next.remove(); | |
| 701 | + } | |
| 702 | + $row.remove(); | |
| 703 | + | |
| 704 | + //raise event | |
| 705 | + ft.raise(evt.rowRemoved); | |
| 706 | + }; | |
| 707 | + | |
| 708 | + ft.appendRow = function (row) { | |
| 709 | + var $row = (row.jquery) ? row : $(row); | |
| 710 | + $(ft.table).find('tbody').append($row); | |
| 711 | + | |
| 712 | + //redraw the table | |
| 713 | + ft.redraw(); | |
| 714 | + }; | |
| 715 | + | |
| 716 | + ft.getColumnFromTdIndex = function (index) { | |
| 717 | + /// <summary>Returns the correct column data for the supplied index taking into account colspans.</summary> | |
| 718 | + /// <param name="index">The index to retrieve the column data for.</param> | |
| 719 | + /// <returns type="json">A JSON object containing the column data for the supplied index.</returns> | |
| 720 | + var result = null; | |
| 721 | + for (var column in ft.columns) { | |
| 722 | + if ($.inArray(index, ft.columns[column].matches) >= 0) { | |
| 723 | + result = ft.columns[column]; | |
| 724 | + break; | |
| 725 | + } | |
| 726 | + } | |
| 727 | + return result; | |
| 728 | + }; | |
| 729 | + | |
| 730 | + ft.createOrUpdateDetailRow = function (actualRow) { | |
| 731 | + var $row = $(actualRow), $next = $row.next(), $detail, values = []; | |
| 732 | + if ($row.data('detail_created') === true) return true; | |
| 733 | + | |
| 734 | + if ($row.is(':hidden')) return false; //if the row is hidden for some reason (perhaps filtered) then get out of here | |
| 735 | + ft.raise(evt.rowDetailUpdating, { 'row': $row, 'detail': $next }); | |
| 736 | + $row.find('> td:hidden').each(function () { | |
| 737 | + var index = $(this).index(), column = ft.getColumnFromTdIndex(index), name = column.name; | |
| 738 | + if (column.ignore === true) return true; | |
| 739 | + | |
| 740 | + if (index in column.names) name = column.names[index]; | |
| 741 | + | |
| 742 | + var bindName = $(this).attr("data-bind-name"); | |
| 743 | + if (bindName != null && $(this).is(':empty')) { | |
| 744 | + var bindValue = $('.' + cls.detailInnerValue + '[' + 'data-bind-value="' + bindName + '"]'); | |
| 745 | + $(this).html($(bindValue).contents().detach()); | |
| 746 | + } | |
| 747 | + var display; | |
| 748 | + if (column.isEditable !== false && (column.isEditable || $(this).find(":input").length > 0)) { | |
| 749 | + if(bindName == null) { | |
| 750 | + bindName = "bind-" + $.now() + "-" + index; | |
| 751 | + $(this).attr("data-bind-name", bindName); | |
| 752 | + } | |
| 753 | + display = $(this).contents().detach(); | |
| 754 | + } | |
| 755 | + if (!display) display = $(this).contents().clone(true, true); | |
| 756 | + values.push({ 'name': name, 'value': ft.parse(this, column), 'display': display, 'group': column.group, 'groupName': column.groupName, 'bindName': bindName }); | |
| 757 | + return true; | |
| 758 | + }); | |
| 759 | + if (values.length === 0) return false; //return if we don't have any data to show | |
| 760 | + var colspan = $row.find('> td:visible').length; | |
| 761 | + var exists = $next.hasClass(cls.detail); | |
| 762 | + if (!exists) { // Create | |
| 763 | + $next = $('<tr class="' + cls.detail + '"><td class="' + cls.detailCell + '"><div class="' + cls.detailInner + '"></div></td></tr>'); | |
| 764 | + $row.after($next); | |
| 765 | + } | |
| 766 | + $next.find('> td:first').attr('colspan', colspan); | |
| 767 | + $detail = $next.find('.' + cls.detailInner).empty(); | |
| 768 | + opt.createDetail($detail, values, opt.createGroupedDetail, opt.detailSeparator, cls); | |
| 769 | + $row.data('detail_created', true); | |
| 770 | + ft.raise(evt.rowDetailUpdated, { 'row': $row, 'detail': $next }); | |
| 771 | + return !exists; | |
| 772 | + }; | |
| 773 | + | |
| 774 | + ft.raise = function (eventName, args) { | |
| 775 | + | |
| 776 | + if (ft.options.debug === true && $.isFunction(ft.options.log)) ft.options.log(eventName, 'event'); | |
| 777 | + | |
| 778 | + args = args || { }; | |
| 779 | + var def = { 'ft': ft }; | |
| 780 | + $.extend(true, def, args); | |
| 781 | + var e = $.Event(eventName, def); | |
| 782 | + if (!e.ft) { | |
| 783 | + $.extend(true, e, def); | |
| 784 | + } //pre jQuery 1.6 which did not allow data to be passed to event object constructor | |
| 785 | + $(ft.table).trigger(e); | |
| 786 | + return e; | |
| 787 | + }; | |
| 788 | + | |
| 789 | + //reset the state of FooTable | |
| 790 | + ft.reset = function() { | |
| 791 | + var $table = $(ft.table); | |
| 792 | + $table.removeData('footable_info') | |
| 793 | + .data('breakpoint', '') | |
| 794 | + .removeClass(cls.loading) | |
| 795 | + .removeClass(cls.loaded); | |
| 796 | + | |
| 797 | + $table.find(opt.toggleSelector).unbind(trg.toggleRow).unbind('click.footable'); | |
| 798 | + | |
| 799 | + $table.find('> tbody > tr').removeClass(cls.detailShow); | |
| 800 | + | |
| 801 | + $table.find('> tbody > tr.' + cls.detail).remove(); | |
| 802 | + | |
| 803 | + ft.raise(evt.reset); | |
| 804 | + }; | |
| 805 | + | |
| 806 | + //Switch between row-detail and detail-show. | |
| 807 | + ft.toggleInput = function (column) { | |
| 808 | + var bindName = $(column).attr("data-bind-name"); | |
| 809 | + if(bindName != null) { | |
| 810 | + var bindValue = $('.' + cls.detailInnerValue + '[' + 'data-bind-value="' + bindName + '"]'); | |
| 811 | + if(bindValue != null) { | |
| 812 | + if($(column).is(":visible")) { | |
| 813 | + if(!$(bindValue).is(':empty')) $(column).html($(bindValue).contents().detach()); | |
| 814 | + } else if(!$(column).is(':empty')) { | |
| 815 | + $(bindValue).html($(column).contents().detach()); | |
| 816 | + } | |
| 817 | + } | |
| 818 | + } | |
| 819 | + }; | |
| 820 | + | |
| 821 | + ft.init(); | |
| 822 | + return ft; | |
| 823 | + } | |
| 824 | +})(jQuery, window); | ... | ... |
js/main.js
| ... | ... | @@ -164,6 +164,8 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 164 | 164 | $(".timeago").timeago(); |
| 165 | 165 | $resultsContainer.show(); |
| 166 | 166 | |
| 167 | + $('.footable').footable(); | |
| 168 | + | |
| 167 | 169 | if(data.pagination.total > data.pagination.per_page) { |
| 168 | 170 | $resultsContainer.find('.paging').pagination({ |
| 169 | 171 | items: data.pagination.total, | ... | ... |
js/requirejs-config.js
| ... | ... | @@ -15,6 +15,7 @@ requirejs.config({ |
| 15 | 15 | jquery_timeago: 'jquery.timeago', |
| 16 | 16 | jquery_timeago_pt: 'jquery.timeago.pt-br', |
| 17 | 17 | jquery_simplePagination: 'jquery.simplePagination', |
| 18 | + jquery_simplePagination: 'footable', | |
| 18 | 19 | handlebars: 'handlebars-v3.0.1', |
| 19 | 20 | handlebars_helpers: 'handlebars-helpers', |
| 20 | 21 | jquery_maxlength: 'jquery.maxlength.min', |
| ... | ... | @@ -41,6 +42,9 @@ requirejs.config({ |
| 41 | 42 | 'jquery_simplePagination': { |
| 42 | 43 | deps: ['jquery'] |
| 43 | 44 | }, |
| 45 | + 'footable': { | |
| 46 | + deps: ['jquery'] | |
| 47 | + }, | |
| 44 | 48 | 'jquery_ui': { |
| 45 | 49 | deps: ['jquery'] |
| 46 | 50 | }, |
| ... | ... | @@ -66,5 +70,5 @@ requirejs.config({ |
| 66 | 70 | } |
| 67 | 71 | }); |
| 68 | 72 | |
| 69 | -requirejs(['jquery', 'proposal_app', 'jquery_ui', 'jquery_xdomainrequest', 'jquery_timeago_pt', 'jquery_simplePagination', 'handlebars_helpers']); | |
| 73 | +requirejs(['jquery', 'proposal_app', 'jquery_ui', 'jquery_xdomainrequest', 'jquery_timeago_pt', 'jquery_simplePagination', 'footable', 'handlebars_helpers']); | |
| 70 | 74 | requirejs(['slick', 'fastclick', 'jquery_maxlength', 'layout','main']); | ... | ... |
sass/_proposal_detail.scss
| ... | ... | @@ -283,7 +283,7 @@ |
| 283 | 283 | } |
| 284 | 284 | td { |
| 285 | 285 | background-color: #eeeff1; |
| 286 | - padding: 10px 20px; | |
| 286 | + padding: 10px; | |
| 287 | 287 | border: 1px solid #fff; |
| 288 | 288 | text-align: center; |
| 289 | 289 | &.abstract-text { |
| ... | ... | @@ -388,7 +388,7 @@ |
| 388 | 388 | .truncate { |
| 389 | 389 | display: table; |
| 390 | 390 | table-layout: fixed; |
| 391 | - width: 100%; | |
| 391 | + width: 90%; | |
| 392 | 392 | } |
| 393 | 393 | .truncated { |
| 394 | 394 | overflow-x: hidden; | ... | ... |
sass/style.scss
| ... | ... | @@ -224,3 +224,72 @@ form { |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | + | |
| 228 | +.footable { | |
| 229 | + &-loaded { | |
| 230 | + td { | |
| 231 | + font-weight: 500 !important; | |
| 232 | + } | |
| 233 | + } | |
| 234 | + &-detail { | |
| 235 | + &-show { | |
| 236 | + td { | |
| 237 | + background-color: #ddd !important; | |
| 238 | + } | |
| 239 | + } | |
| 240 | + } | |
| 241 | + &-row { | |
| 242 | + &-detail { | |
| 243 | + &-cell { | |
| 244 | + border-top: 1px solid #ccc !important; | |
| 245 | + padding: 0 !important; | |
| 246 | + } | |
| 247 | + &-inner { | |
| 248 | + background-color: #ccc; | |
| 249 | + display: block; | |
| 250 | + padding: 10px; | |
| 251 | + width: 100%; | |
| 252 | + } | |
| 253 | + &-row { | |
| 254 | + display: inline-block; | |
| 255 | + } | |
| 256 | + &-row:nth-child(2) { | |
| 257 | + div:nth-child(1) { | |
| 258 | + background: url(images/icons/icon-afavor.png) no-repeat center top; | |
| 259 | + text-indent: -99999px; | |
| 260 | + } | |
| 261 | + } | |
| 262 | + &-row:nth-child(3) { | |
| 263 | + div:nth-child(1) { | |
| 264 | + background: url(images/icons/icon-contra.png) no-repeat center top; | |
| 265 | + text-indent: -99999px; | |
| 266 | + } | |
| 267 | + } | |
| 268 | + &-name { | |
| 269 | + display: block; | |
| 270 | + padding: 2px 15px; | |
| 271 | + text-transform: uppercase; | |
| 272 | + font-size: 16px; | |
| 273 | + } | |
| 274 | + &-value { | |
| 275 | + display: block; | |
| 276 | + } | |
| 277 | + } | |
| 278 | + } | |
| 279 | + &.breakpoint { | |
| 280 | + > tbody { | |
| 281 | + > tr { | |
| 282 | + > td { | |
| 283 | + > span { | |
| 284 | + &.footable-toggle { | |
| 285 | + background-color: #ccc; | |
| 286 | + float: right; | |
| 287 | + margin: -10px; | |
| 288 | + padding: 12px; | |
| 289 | + } | |
| 290 | + } | |
| 291 | + } | |
| 292 | + } | |
| 293 | + } | |
| 294 | + } | |
| 295 | +} | ... | ... |