Skip to content

Commit af751db

Browse files
committed
Merge branch 'master' into gdpr
2 parents 2fc2f10 + 0284171 commit af751db

File tree

2 files changed

+63
-7
lines changed
  • plugins
    • reports/frontend/public/stylesheets
    • slipping-away-users/api

2 files changed

+63
-7
lines changed

plugins/reports/frontend/public/stylesheets/main.css

+55
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,61 @@
2626
#reports-widget-drawer.editing #create-widget { display: none; }
2727
#reports-widget-drawer.editing #save-widget { display: block; }
2828

29+
#reports-table .options-item .edit { display: block; right: 10px; top: 0; font-size: 17px; cursor: pointer; color: #a7a7a7; padding: 7px 10px; line-height: 15px; background-color: rgba(255,255,255,0.03); transition: background-color 1s; }
30+
#reports-table .options-item .edit:before { font-size:20px; font-family: 'Ionicons'; content: "\f396"; }
31+
#reports-table .options-item .edit:hover { color: #6B6B6B; background-color: rgba(255,255,255,0.06); transition: background-color 1s; }
32+
#reports-table .options-item :hover .edit { display: block; }
33+
#reports-table .options-item .edit-menu {
34+
margin: -6px -80px;
35+
display: none;
36+
float:left;
37+
z-index: 10;
38+
position:absolute;
39+
font-size: 13px;
40+
white-space: nowrap;
41+
background-color: #fff;
42+
border-radius: 2px;
43+
width: 106px;
44+
padding:10px 0 10px 0;
45+
border: 1px solid #d0d0d0;
46+
}
47+
#reports-table .options-item .edit-menu .item {
48+
cursor: pointer;
49+
padding: 8px 20px;
50+
font-size: 24px;
51+
white-space: nowrap;
52+
cursor:pointer; font-size: 13px; white-space: nowrap; color:#474747; }
53+
#reports-table .options-item .edit-menu .item:hover { background-color: #f3f3f3; }
54+
55+
#reports-table .options-item .edit-menu:before {
56+
border: 4px solid rgba(194, 225, 245, 0);
57+
border-bottom-color: #FFF;
58+
right: 7px;
59+
top: -8px;
60+
content: " ";
61+
height: 0;
62+
width: 0;
63+
position: absolute;
64+
pointer-events: none;
65+
z-index: 2;
66+
}
67+
68+
#reports-table .options-item .edit-menu:after {
69+
border: 5px solid rgba(194, 225, 245, 0);
70+
border-bottom-color: #d0d0d0;
71+
right: 6px;
72+
top: -10px;
73+
content: " ";
74+
height: 0;
75+
width: 0;
76+
position: absolute;
77+
pointer-events: none;
78+
z-index: 1;
79+
}
80+
81+
82+
83+
2984
#reports-table th:nth-child(1) {
3085
width:15%;
3186
}

plugins/slipping-away-users/api/api.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ const plugin = {},
4646
BPromise.all(tasks).spread(function() {
4747
const result = [];
4848
periods.forEach((p,index) => {
49-
const percentage = (arguments[index] / arguments[periods.length]) * 100;
50-
result.push({
51-
period: p,
52-
count: arguments[index],
53-
percentage: `${ percentage.toFixed(2) }`,
54-
timeStamp: timeList[p],
55-
})
49+
let percentage = (arguments[index] / arguments[periods.length]) * 100;
50+
percentage = isNaN(percentage) ? 0 : percentage;
51+
result.push({
52+
period: p,
53+
count: arguments[index],
54+
percentage: `${ percentage.toFixed(2) }`,
55+
timeStamp: timeList[p],
56+
})
5657
});
5758
common.returnOutput(params, result);
5859
});

0 commit comments

Comments
 (0)