pixl-xyapp 2.1.5 → 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 +29 -24
- package/css/normalize.css +2 -16
- package/js/base.js +18 -8
- package/js/calendar.js +2 -2
- package/js/datetime.js +3 -5
- package/js/misc.js +1 -1
- package/js/page.js +6 -6
- package/js/tools.js +2 -8
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
/* Copyright (c) 2019 Joseph Huckaby -
|
|
1
|
+
/* xyOps Base Theme */
|
|
2
|
+
/* Copyright (c) 2019 Joseph Huckaby - MIT License */
|
|
3
3
|
|
|
4
4
|
* {
|
|
5
5
|
box-sizing: border-box;
|
|
@@ -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
|
}
|
|
@@ -2642,6 +2646,7 @@ body.dark .color_label {
|
|
|
2642
2646
|
.color_label.green { background: var(--green); }
|
|
2643
2647
|
.color_label.yellow { background: var(--yellow); text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.75); }
|
|
2644
2648
|
.color_label.red { background: var(--red); }
|
|
2649
|
+
.color_label.orange { background: var(--orange); }
|
|
2645
2650
|
.color_label.purple { background: var(--purple); }
|
|
2646
2651
|
.color_label.gray { background: var(--gray); }
|
|
2647
2652
|
|
package/css/normalize.css
CHANGED
|
@@ -157,7 +157,6 @@ img {
|
|
|
157
157
|
* 2. Remove the margin in Firefox and Safari.
|
|
158
158
|
*/
|
|
159
159
|
|
|
160
|
-
button,
|
|
161
160
|
input,
|
|
162
161
|
optgroup,
|
|
163
162
|
select,
|
|
@@ -173,7 +172,6 @@ textarea {
|
|
|
173
172
|
* 1. Show the overflow in Edge.
|
|
174
173
|
*/
|
|
175
174
|
|
|
176
|
-
button,
|
|
177
175
|
input { /* 1 */
|
|
178
176
|
overflow: visible;
|
|
179
177
|
}
|
|
@@ -183,7 +181,6 @@ input { /* 1 */
|
|
|
183
181
|
* 1. Remove the inheritance of text transform in Firefox.
|
|
184
182
|
*/
|
|
185
183
|
|
|
186
|
-
button,
|
|
187
184
|
select { /* 1 */
|
|
188
185
|
text-transform: none;
|
|
189
186
|
}
|
|
@@ -192,18 +189,17 @@ select { /* 1 */
|
|
|
192
189
|
* Correct the inability to style clickable types in iOS and Safari.
|
|
193
190
|
*/
|
|
194
191
|
|
|
195
|
-
button,
|
|
196
192
|
[type="button"],
|
|
197
193
|
[type="reset"],
|
|
198
194
|
[type="submit"] {
|
|
199
195
|
-webkit-appearance: button;
|
|
196
|
+
appearance: button;
|
|
200
197
|
}
|
|
201
198
|
|
|
202
199
|
/**
|
|
203
200
|
* Remove the inner border and padding in Firefox.
|
|
204
201
|
*/
|
|
205
202
|
|
|
206
|
-
button::-moz-focus-inner,
|
|
207
203
|
[type="button"]::-moz-focus-inner,
|
|
208
204
|
[type="reset"]::-moz-focus-inner,
|
|
209
205
|
[type="submit"]::-moz-focus-inner {
|
|
@@ -215,7 +211,6 @@ button::-moz-focus-inner,
|
|
|
215
211
|
* Restore the focus styles unset by the previous rule.
|
|
216
212
|
*/
|
|
217
213
|
|
|
218
|
-
button:-moz-focusring,
|
|
219
214
|
[type="button"]:-moz-focusring,
|
|
220
215
|
[type="reset"]:-moz-focusring,
|
|
221
216
|
[type="submit"]:-moz-focusring {
|
|
@@ -289,6 +284,7 @@ textarea {
|
|
|
289
284
|
|
|
290
285
|
[type="search"] {
|
|
291
286
|
-webkit-appearance: textfield; /* 1 */
|
|
287
|
+
appearance: textfield;
|
|
292
288
|
outline-offset: -2px; /* 2 */
|
|
293
289
|
}
|
|
294
290
|
|
|
@@ -300,16 +296,6 @@ textarea {
|
|
|
300
296
|
-webkit-appearance: none;
|
|
301
297
|
}
|
|
302
298
|
|
|
303
|
-
/**
|
|
304
|
-
* 1. Correct the inability to style clickable types in iOS and Safari.
|
|
305
|
-
* 2. Change font properties to `inherit` in Safari.
|
|
306
|
-
*/
|
|
307
|
-
|
|
308
|
-
::-webkit-file-upload-button {
|
|
309
|
-
-webkit-appearance: button; /* 1 */
|
|
310
|
-
font: inherit; /* 2 */
|
|
311
|
-
}
|
|
312
|
-
|
|
313
299
|
/* Interactive
|
|
314
300
|
========================================================================== */
|
|
315
301
|
|
package/js/base.js
CHANGED
|
@@ -199,9 +199,15 @@ var app = {
|
|
|
199
199
|
if (msg && args) msg = substitute(msg, args);
|
|
200
200
|
|
|
201
201
|
if (id.match(/^\w+$/)) id = '#' + id;
|
|
202
|
-
$(id)
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
var $elem = $(id);
|
|
203
|
+
|
|
204
|
+
if ($elem[0] && ($elem[0].nodeName == 'SELECT') && $elem.next().hasClass('multiselect')) {
|
|
205
|
+
$elem = $elem.next();
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
$elem.removeClass('invalid').width(); // trigger reflow to reset css animation
|
|
209
|
+
$elem.addClass('invalid');
|
|
210
|
+
try { $elem.focus(); } catch (e) {;}
|
|
205
211
|
|
|
206
212
|
if (msg) return this.doError(msg);
|
|
207
213
|
else return false;
|
|
@@ -219,9 +225,11 @@ var app = {
|
|
|
219
225
|
var icon = '';
|
|
220
226
|
switch (type) {
|
|
221
227
|
case 'success': icon = 'check-circle'; break;
|
|
222
|
-
case 'warning': icon = 'alert-
|
|
228
|
+
case 'warning': icon = 'alert-rhombus'; break;
|
|
223
229
|
case 'error': icon = 'alert-decagram'; break;
|
|
224
230
|
case 'info': icon = 'information-outline'; break;
|
|
231
|
+
case 'critical': icon = 'fire-alert'; break;
|
|
232
|
+
case 'suspended': icon = 'motion-pause-outline'; break;
|
|
225
233
|
|
|
226
234
|
default:
|
|
227
235
|
if (type.match(/^(\w+)\/(.+)$/)) { type = RegExp.$1; icon = RegExp.$2; }
|
|
@@ -253,7 +261,11 @@ var app = {
|
|
|
253
261
|
$toast.on('click', function() {
|
|
254
262
|
if (timer) clearTimeout(timer);
|
|
255
263
|
$toast.fadeOut( 250, function() { $(this).remove(); } );
|
|
256
|
-
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
|
+
}
|
|
257
269
|
} );
|
|
258
270
|
|
|
259
271
|
if ((type == 'success') || (type == 'info') || lifetime) {
|
|
@@ -265,9 +277,7 @@ var app = {
|
|
|
265
277
|
},
|
|
266
278
|
|
|
267
279
|
hideMessage: function(animate) {
|
|
268
|
-
//
|
|
269
|
-
// else $('#d_message').hide();
|
|
270
|
-
|
|
280
|
+
// hide all toasts
|
|
271
281
|
if (animate) $('div.toast').fadeOut( animate, function() { $(this).remove(); } );
|
|
272
282
|
else $('div.toast').remove();
|
|
273
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/datetime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Joe's Date/Time Tools
|
|
2
2
|
// Copyright (c) 2004 - 2025 Joseph Huckaby
|
|
3
|
-
// Released under the
|
|
3
|
+
// Released under the MIT License
|
|
4
4
|
|
|
5
5
|
var _months = [
|
|
6
6
|
[ 1, 'January' ], [ 2, 'February' ], [ 3, 'March' ], [ 4, 'April' ],
|
|
@@ -29,14 +29,12 @@ var _hour_names = ['12am', '1am', '2am', '3am', '4am', '5am', '6am', '7am', '8am
|
|
|
29
29
|
|
|
30
30
|
function time_now() {
|
|
31
31
|
// return the Epoch seconds for like right now
|
|
32
|
-
|
|
33
|
-
return Math.floor( now.getTime() / 1000 );
|
|
32
|
+
return Math.floor( Date.now() / 1000 );
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
function hires_time_now() {
|
|
37
36
|
// return the Epoch seconds for like right now
|
|
38
|
-
|
|
39
|
-
return ( now.getTime() / 1000 );
|
|
37
|
+
return Date.now() / 1000;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
function format_date(thingy, template) {
|
package/js/misc.js
CHANGED
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
////
|
|
2
2
|
// Joe's Misc JavaScript Tools
|
|
3
3
|
// Copyright (c) 2004 - 2025 Joseph Huckaby
|
|
4
|
-
// Released under the
|
|
4
|
+
// Released under the MIT License
|
|
5
5
|
////
|
|
6
6
|
|
|
7
7
|
var months = [
|
|
@@ -306,12 +306,6 @@ function get_scroll_max(dom) {
|
|
|
306
306
|
return { width: myWidth, height: myHeight };
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
function hires_time_now() {
|
|
310
|
-
// return the Epoch seconds for like right now
|
|
311
|
-
var now = new Date();
|
|
312
|
-
return ( now.getTime() / 1000 );
|
|
313
|
-
}
|
|
314
|
-
|
|
315
309
|
function str_value(str) {
|
|
316
310
|
// Get friendly string value for display purposes.
|
|
317
311
|
if (typeof(str) == 'undefined') str = '';
|
|
@@ -566,7 +560,7 @@ function expando_text(text, max, link) {
|
|
|
566
560
|
var after = text.substring(max);
|
|
567
561
|
|
|
568
562
|
return before +
|
|
569
|
-
'<span>... <a href="javascript:void(0)"
|
|
563
|
+
'<span>... <a href="javascript:void(0)" onClick="$(this).parent().hide().next().show()">'+link+'</a></span>' +
|
|
570
564
|
'<span style="display:none">' + after + '</span>';
|
|
571
565
|
};
|
|
572
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"
|