pixl-xyapp 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/css/base.css +26 -22
- package/js/base.js +9 -5
- package/js/calendar.js +2 -2
- package/js/page.js +6 -6
- package/js/tools.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -355,7 +355,7 @@ The pagination links work by constructing self-referencing URL to the current pa
|
|
|
355
355
|
|
|
356
356
|
Since the `limit` is set to 5 items per page, and `offset` starts at `0`, then the next page (page 2) will be at offset `5`. This link is simply a hashtag anchor tag, which doesn't reload the browser page, but will instead be caught by the navigation system, and call your page's `onDeactivate()` then its `onActivate()` with the new values. It is up to your page code to redraw the table with the new data chunk and new `offset` value.
|
|
357
357
|
|
|
358
|
-
Instead of generating hashtag anchor links, you can optionally provide a custom JavaScript function in a `pagination_link` property, which will be written into the HTML as an `
|
|
358
|
+
Instead of generating hashtag anchor links, you can optionally provide a custom JavaScript function in a `pagination_link` property, which will be written into the HTML as an `onClick` handler on each link, and called instead of a standard link. Note that it must be a string and globally accessible, so remember the `$P()` shortcut to get access to the current page. Example:
|
|
359
359
|
|
|
360
360
|
```javascript
|
|
361
361
|
pagination_link: '$P().tableNavClick'
|
|
@@ -370,7 +370,7 @@ Notification messages are shown in a fixed bar at the top of the screen, regardl
|
|
|
370
370
|
To use the notification system in your app, make sure this markup is in your main HTML page:
|
|
371
371
|
|
|
372
372
|
```html
|
|
373
|
-
<div id="d_message" class="message" style="display:none"
|
|
373
|
+
<div id="d_message" class="message" style="display:none" onClick="app.hideMessage(250)">
|
|
374
374
|
<div id="d_message_inner" class="message_inner"></div>
|
|
375
375
|
</div>
|
|
376
376
|
```
|
package/css/base.css
CHANGED
|
@@ -112,22 +112,22 @@ body.dark {
|
|
|
112
112
|
--gray: rgb(98, 107, 115);
|
|
113
113
|
--gray-highlight: color-mix(in srgb, rgb(98, 107, 115) 80%, white);
|
|
114
114
|
|
|
115
|
-
--border-color: rgb(50,
|
|
115
|
+
--border-color: rgb(50, 50, 58);
|
|
116
116
|
--shadow-color: rgba(0, 0, 0, 0.0);
|
|
117
|
-
--background-color: rgb(24,
|
|
118
|
-
--header-background-color: rgb(32,
|
|
119
|
-
--header-text-color: rgb(125,
|
|
120
|
-
--box-background-color: rgb(32,
|
|
121
|
-
--form-background-color: rgb(40,
|
|
117
|
+
--background-color: rgb(24, 24, 32);
|
|
118
|
+
--header-background-color: rgb(32, 32, 38);
|
|
119
|
+
--header-text-color: rgb(125, 125, 150);
|
|
120
|
+
--box-background-color: rgb(32, 32, 38);
|
|
121
|
+
--form-background-color: rgb(40, 40, 48);
|
|
122
122
|
--table-header-background-color: rgba(200, 225, 255, 0.03);
|
|
123
123
|
|
|
124
|
-
--sidebar-background-color: rgb(32,
|
|
125
|
-
--sidebar-text-color: rgb(125,
|
|
124
|
+
--sidebar-background-color: rgb(32, 32, 38);
|
|
125
|
+
--sidebar-text-color: rgb(125, 125, 150);
|
|
126
126
|
|
|
127
|
-
--body-text-color: rgb(170,
|
|
128
|
-
--link-color: rgb(145,
|
|
129
|
-
--label-color: rgb(145,
|
|
130
|
-
--alt-label-color: rgb(120,
|
|
127
|
+
--body-text-color: rgb(170, 170, 200);
|
|
128
|
+
--link-color: rgb(145, 145, 170);
|
|
129
|
+
--label-color: rgb(145, 145, 170);
|
|
130
|
+
--alt-label-color: rgb(120, 120, 130);
|
|
131
131
|
--icon-color: rgb(115, 115, 130);
|
|
132
132
|
--icon-color-half: rgba(115, 115, 130, 0.5);
|
|
133
133
|
}
|
|
@@ -695,17 +695,12 @@ div.toast > span {
|
|
|
695
695
|
word-break: break-word;
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
div.toast.success { background:
|
|
699
|
-
div.toast.warning { background:
|
|
698
|
+
div.toast.success { background: var(--green); }
|
|
699
|
+
div.toast.warning { background: var(--yellow); }
|
|
700
700
|
div.toast.error { background: var(--red); }
|
|
701
|
-
div.toast.critical { background:
|
|
702
|
-
div.toast.info { background:
|
|
703
|
-
|
|
704
|
-
body.dark div.toast.success { background: rgb(20, 128, 20); }
|
|
705
|
-
body.dark div.toast.warning { background: rgb(128, 128, 20); }
|
|
706
|
-
body.dark div.toast.error { background-color:var(--red); }
|
|
707
|
-
body.dark div.toast.critical { background: rgb(128, 20, 128); }
|
|
708
|
-
body.dark div.toast.info { background: rgb(28, 84, 160); }
|
|
701
|
+
div.toast.critical { background: var(--purple); }
|
|
702
|
+
div.toast.info { background: var(--theme-color); }
|
|
703
|
+
div.toast.suspended { background: var(--orange); }
|
|
709
704
|
|
|
710
705
|
div.toast.channel {
|
|
711
706
|
background: var(--box-background-color);
|
|
@@ -787,6 +782,7 @@ div.message.error { background: var(--red); }
|
|
|
787
782
|
div.message.critical { background: var(--purple); }
|
|
788
783
|
div.message.abort { background: var(--red); }
|
|
789
784
|
div.message.info { background: var(--blue); }
|
|
785
|
+
div.message.suspended { background: var(--orange); }
|
|
790
786
|
|
|
791
787
|
/* body.dark div.message.success { background: rgb(20, 128, 20); }
|
|
792
788
|
body.dark div.message.warning { background: rgb(128, 128, 20); }
|
|
@@ -1911,6 +1907,10 @@ div.progress_bar_label.second_half {
|
|
|
1911
1907
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
|
|
1912
1908
|
}
|
|
1913
1909
|
|
|
1910
|
+
.progress_bar_label i.mdi:before {
|
|
1911
|
+
transform: scale(1.5);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
1914
|
div.progress_bar_container.indeterminate div.progress_bar_label {
|
|
1915
1915
|
display: none;
|
|
1916
1916
|
}
|
|
@@ -2587,6 +2587,10 @@ body.dark .data_grid > ul.grid_row_header > div {
|
|
|
2587
2587
|
padding-right: 1px;
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
+
.data_grid > ul > div .progress_bar_container {
|
|
2591
|
+
margin: 1px 0 2px 0; /* Nudge height from 18px to 21px to match std grid units */
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2590
2594
|
.data_grid ul.disabled div {
|
|
2591
2595
|
opacity: 0.6;
|
|
2592
2596
|
}
|
package/js/base.js
CHANGED
|
@@ -225,9 +225,11 @@ var app = {
|
|
|
225
225
|
var icon = '';
|
|
226
226
|
switch (type) {
|
|
227
227
|
case 'success': icon = 'check-circle'; break;
|
|
228
|
-
case 'warning': icon = 'alert-
|
|
228
|
+
case 'warning': icon = 'alert-rhombus'; break;
|
|
229
229
|
case 'error': icon = 'alert-decagram'; break;
|
|
230
230
|
case 'info': icon = 'information-outline'; break;
|
|
231
|
+
case 'critical': icon = 'fire-alert'; break;
|
|
232
|
+
case 'suspended': icon = 'motion-pause-outline'; break;
|
|
231
233
|
|
|
232
234
|
default:
|
|
233
235
|
if (type.match(/^(\w+)\/(.+)$/)) { type = RegExp.$1; icon = RegExp.$2; }
|
|
@@ -259,7 +261,11 @@ var app = {
|
|
|
259
261
|
$toast.on('click', function() {
|
|
260
262
|
if (timer) clearTimeout(timer);
|
|
261
263
|
$toast.fadeOut( 250, function() { $(this).remove(); } );
|
|
262
|
-
if (loc)
|
|
264
|
+
if (loc) {
|
|
265
|
+
$toast.addClass('clicky');
|
|
266
|
+
if (typeof(loc) == 'function') loc();
|
|
267
|
+
else if (typeof(loc) == 'string') Nav.go(loc);
|
|
268
|
+
}
|
|
263
269
|
} );
|
|
264
270
|
|
|
265
271
|
if ((type == 'success') || (type == 'info') || lifetime) {
|
|
@@ -271,9 +277,7 @@ var app = {
|
|
|
271
277
|
},
|
|
272
278
|
|
|
273
279
|
hideMessage: function(animate) {
|
|
274
|
-
//
|
|
275
|
-
// else $('#d_message').hide();
|
|
276
|
-
|
|
280
|
+
// hide all toasts
|
|
277
281
|
if (animate) $('div.toast').fadeOut( animate, function() { $(this).remove(); } );
|
|
278
282
|
else $('div.toast').remove();
|
|
279
283
|
},
|
package/js/calendar.js
CHANGED
|
@@ -46,9 +46,9 @@ var Calendar = {
|
|
|
46
46
|
|
|
47
47
|
html += '<div class="calendar">';
|
|
48
48
|
html += '<div class="cal_header">';
|
|
49
|
-
html += '<div class="ch_nav ch_prev"
|
|
49
|
+
html += '<div class="ch_nav ch_prev" onClick="Calendar.prevMonth()" title="Previous Month"><i class="mdi mdi-chevron-double-left"></i></div>';
|
|
50
50
|
html += '<div class="ch_title"></div>';
|
|
51
|
-
html += '<div class="ch_nav ch_next"
|
|
51
|
+
html += '<div class="ch_nav ch_next" onClick="Calendar.nextMonth()" title="Next Month"><i class="mdi mdi-chevron-double-right"></i></div>';
|
|
52
52
|
html += '</div>';
|
|
53
53
|
html += '<div class="cal_days">';
|
|
54
54
|
_short_day_names.forEach( function(ddd) {
|
package/js/page.js
CHANGED
|
@@ -557,7 +557,7 @@ window.Page = class Page {
|
|
|
557
557
|
// html += 'Page: ';
|
|
558
558
|
if (current_page > 1) {
|
|
559
559
|
if (cpl) {
|
|
560
|
-
html += '<span class="link"
|
|
560
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((current_page - 2) * results.limit)+')">« Prev</span>';
|
|
561
561
|
}
|
|
562
562
|
else {
|
|
563
563
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
|
@@ -587,7 +587,7 @@ window.Page = class Page {
|
|
|
587
587
|
}
|
|
588
588
|
else {
|
|
589
589
|
if (cpl) {
|
|
590
|
-
html += '<span class="link"
|
|
590
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((idx - 1) * results.limit)+')">' + commify(idx) + '</span>';
|
|
591
591
|
}
|
|
592
592
|
else {
|
|
593
593
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
|
@@ -601,7 +601,7 @@ window.Page = class Page {
|
|
|
601
601
|
html += ' ';
|
|
602
602
|
if (current_page < num_pages) {
|
|
603
603
|
if (cpl) {
|
|
604
|
-
html += '<span class="link"
|
|
604
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((current_page + 0) * results.limit)+')">Next »</span>';
|
|
605
605
|
}
|
|
606
606
|
else {
|
|
607
607
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
|
@@ -717,7 +717,7 @@ window.Page = class Page {
|
|
|
717
717
|
// html += 'Page: ';
|
|
718
718
|
if (current_page > 1) {
|
|
719
719
|
if (cpl) {
|
|
720
|
-
html += '<span class="link"
|
|
720
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((current_page - 2) * results.limit)+')">« Prev</span>';
|
|
721
721
|
}
|
|
722
722
|
else {
|
|
723
723
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
|
@@ -748,7 +748,7 @@ window.Page = class Page {
|
|
|
748
748
|
}
|
|
749
749
|
else {
|
|
750
750
|
if (cpl) {
|
|
751
|
-
html += '<span class="link"
|
|
751
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((idx - 1) * results.limit)+')">' + commify(idx) + '</span>';
|
|
752
752
|
}
|
|
753
753
|
else {
|
|
754
754
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
|
@@ -763,7 +763,7 @@ window.Page = class Page {
|
|
|
763
763
|
|
|
764
764
|
if (current_page < num_pages) {
|
|
765
765
|
if (cpl) {
|
|
766
|
-
html += '<span class="link"
|
|
766
|
+
html += '<span class="link" onClick="'+cpl+'('+Math.floor((current_page + 0) * results.limit)+')">Next »</span>';
|
|
767
767
|
}
|
|
768
768
|
else {
|
|
769
769
|
html += '<a href="#' + this.ID + compose_query_string(merge_objects(this.args, {
|
package/js/tools.js
CHANGED
|
@@ -560,7 +560,7 @@ function expando_text(text, max, link) {
|
|
|
560
560
|
var after = text.substring(max);
|
|
561
561
|
|
|
562
562
|
return before +
|
|
563
|
-
'<span>... <a href="javascript:void(0)"
|
|
563
|
+
'<span>... <a href="javascript:void(0)" onClick="$(this).parent().hide().next().show()">'+link+'</a></span>' +
|
|
564
564
|
'<span style="display:none">' + after + '</span>';
|
|
565
565
|
};
|
|
566
566
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixl-xyapp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "A theme for xyOps.",
|
|
5
5
|
"author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
|
|
6
6
|
"homepage": "https://github.com/pixlcore/pixl-xyapp",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/pixlcore/pixl-xyapp"
|
|
10
|
+
"url": "git+https://github.com/pixlcore/pixl-xyapp.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/pixlcore/pixl-xyapp/issues"
|