Commit d2f8c300 authored by Tomáš Peterka's avatar Tomáš Peterka

WWIP

parent 45641950
......@@ -178,31 +178,33 @@
]
)
.push(function (catalog_json) {
var data = catalog_json._embedded.contents,
summary = catalog_json._embedded.sum,
count = catalog_json._embedded.count,
length = data.length,
k,
uri,
item,
result = [];
for (k = 0; k < length; k += 1) {
item = data[k];
uri = new URI(item._links.self.href);
delete item._links;
result.push({
id: uri.segment(2),
doc: {},
value: item
});
}
var data = catalog_json._embedded.contents || [],
summary = catalog_json._embedded.sum || [],
count = catalog_json._embedded.count;
return {
data: {
rows: result,
total_rows: result.length
"data": {
"rows": data.map(function (item) {
var uri = new URI(item._links.self.href);
delete item._links;
return {
"id": uri.segment(2),
"doc": {},
"value": item
};
}),
"total_rows": data.length
},
"sum": {
"rows": summary.map(function (item, index) {
return {
"id": '/#summary' + index, // this is obviously wrong. @Romain help please!
"doc": {},
"value": item
};
}),
"total_rows": summary.length
},
sum: summary,
count: count
"count": count
};
});
})
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.50499.50100.12458</string> </value>
<value> <string>963.59331.40212.55432</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1511939345.58</float>
<float>1512454358.33</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -63,7 +63,7 @@
</a>
{{/if}}
{{else}}
<a href="{{href}}" class="ui-link">{{text}}</a>
<a href="{{href}}" class="ui-link">{{default}}</a>
{{/if}}
</td>
{{/each}}
......@@ -124,7 +124,7 @@
{{#each row_list}}
<tr>
{{#if ../show_anchor}}
<td></td>
<td>Total</td>
{{/if}}
{{#each cell_list}}
<td>
......@@ -142,13 +142,9 @@
</script>
<script id="listbox-nav-template" type="text/x-handlebars-template">
<nav class="ui-bar-inherit ui-controlgroup ui-controlgroup-horizontal ui-corner-all ui-paging-menu">
<div class="ui-controlgroup-controls">
<a class="{{previous_classname}}" data-i18n="Previous" href="{{previous_url}}">Previous</a>
<a class="{{next_classname}}" data-i18n="Next" href="{{next_url}}">Next</a>
<span class="ui-btn ui-disabled" data-i18n="{{record}}">{{record}}</span>
</div>
</nav>
<a class="{{previous_classname}}" data-i18n="Previous" href="{{previous_url}}">Previous</a>
<a class="{{next_classname}}" data-i18n="Next" href="{{next_url}}">Next</a>
<span class="ui-disabled ui-right" data-i18n="{{record}}">{{record}}</span>
</script>
<script id="listbox-template" type="text/x-handlebars-template">
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.50750.47688.32426</string> </value>
<value> <string>963.52015.15055.51592</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1511952124.83</float>
<float>1512039069.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.50757.35572.58794</string> </value>
<value> <string>963.60288.35957.62805</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1511952430.52</float>
<float>1512439237.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1221,6 +1221,9 @@ div[data-gadget-scope='erp5_searchfield'] .ui-input-text div[data-gadget-scope='
div[data-gadget-scope='erp5_searchfield'] button {
padding: 3pt;
}
.document_table {
/* end-of table */
}
.document_table .ui-table-header {
display: flex;
padding-bottom: 6pt;
......@@ -1264,24 +1267,30 @@ div[data-gadget-scope='erp5_searchfield'] button {
.document_table table {
width: 100%;
text-align: left;
/* end-of tbody, tfoot*/
}
.document_table table th,
.document_table table td {
vertical-align: middle;
padding: 3pt;
}
.document_table table thead {
.document_table table thead,
.document_table table tfoot {
background-color: #0E81C2;
color: #FFFFFF;
}
.document_table table thead a {
.document_table table thead a,
.document_table table tfoot a {
color: #FFFFFF;
text-decoration: underline;
}
.document_table table thead tr th {
.document_table table thead tr th,
.document_table table tfoot tr th {
padding: 6pt 3pt;
}
@media not screen and (min-width: 45em) {
.document_table table thead {
.document_table table thead,
.document_table table tfoot {
display: none;
}
}
......@@ -1301,7 +1310,6 @@ div[data-gadget-scope='erp5_searchfield'] button {
@media not screen and (max-width: 85em), only screen and (min-width: 45em) and (max-width: 85em) {
.document_table table tbody a {
display: block;
padding: 3pt;
}
}
@media not screen and (min-width: 45em) {
......@@ -1370,41 +1378,42 @@ div[data-gadget-scope='erp5_searchfield'] button {
content: " ~ ";
}
}
.document_table table tfoot .ui-controlgroup-controls {
.document_table nav {
display: flex;
padding-top: 6pt;
border-top: 2px solid rgba(0, 0, 0, 0.14902);
}
.document_table table tfoot .ui-controlgroup-controls span {
.document_table nav span {
opacity: .3;
flex: 2;
text-align: right;
float: right;
}
.document_table table tfoot .ui-controlgroup-controls a {
.document_table nav a {
padding: 6pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
margin-right: 6pt;
}
.document_table table tfoot .ui-controlgroup-controls a:last-of-type {
.document_table nav a:last-of-type {
margin-right: 0;
}
.document_table table tfoot .ui-controlgroup-controls a:hover,
.document_table table tfoot .ui-controlgroup-controls a:active {
.document_table nav a:hover,
.document_table nav a:active {
background-color: #e0e0e0;
}
@media not screen and (min-width: 45em) {
.document_table table tfoot .ui-controlgroup-controls a {
.document_table nav a {
overflow: hidden;
text-indent: -9999px;
white-space: nowrap;
}
}
.document_table table tfoot .ui-controlgroup-controls a::before {
.document_table nav a::before {
margin-right: 6pt;
}
@media not screen and (min-width: 45em) {
.document_table table tfoot .ui-controlgroup-controls a::before {
.document_table nav a::before {
float: left;
text-indent: 6pt;
}
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.1204.63259.57958</string> </value>
<value> <string>963.54869.55137.61115</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1505133981.01</float>
<float>1512455490.33</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1458,9 +1458,10 @@ div[data-gadget-scope='erp5_searchfield'] {
th, td {
// line-height: 1.5em;
vertical-align: middle;
padding: @half-margin-size;
}
thead {
thead, tfoot {
background-color: @colorsubheaderbackground;
color: @white;
......@@ -1500,7 +1501,6 @@ div[data-gadget-scope='erp5_searchfield'] {
@media @desktop, @tablet {
a {
display: block;
padding: @half-margin-size;
}
}
......@@ -1580,48 +1580,47 @@ div[data-gadget-scope='erp5_searchfield'] {
}
}
}
} /* end-of tbody, tfoot*/
} /* end-of table */
nav {
display: flex;
padding-top: @margin-size;
border-top: 2px solid rgba(0, 0, 0, 0.14902);
span {
opacity: .3;
flex: 2;
text-align: right;
float: right;
}
a {
padding: @margin-size;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: @radius;
margin-right: @margin-size;
&:last-of-type {
margin-right: 0;
}
tfoot .ui-controlgroup-controls {
display: flex;
padding-top: @margin-size;
border-top: 2px solid rgba(0, 0, 0, 0.14902);
&:hover, &:active {
background-color: @colorblocklinkbackground;
}
span {
opacity: .3;
flex: 2;
text-align: right;
@media @smartphone {
.hide_text(@width: initial);
}
a {
padding: @margin-size;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: @radius;
&::before {
margin-right: @margin-size;
&:last-of-type {
margin-right: 0;
}
&:hover, &:active {
background-color: @colorblocklinkbackground;
}
@media @smartphone {
.hide_text(@width: initial);
}
&::before {
margin-right: @margin-size;
@media @smartphone {
float: left;
text-indent: @margin-size;
}
float: left;
text-indent: @margin-size;
}
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment