@ntlab/sipd-tu-bridge-ui 1.7.3 → 1.7.5

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 CHANGED
@@ -1,3 +1,5 @@
1
1
  # SIPD Penatausahaan Bridge Web Interface
2
2
 
3
- An Express app as user interface of [SIPD Penatausahaan Bridge](https://github.com/tohenk/node-sipd-tu-bridge).
3
+ An Express app as user interface of [SIPD Penatausahaan Bridge](https://github.com/tohenk/node-sipd-tu-bridge).
4
+
5
+ ![SIPD Penatausaan Bridge User Interface](/assets/ui.png)
package/assets/ui.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntlab/sipd-tu-bridge-ui",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "description": "SIPD Penatausahaan Bridge Web Interface",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,7 +63,7 @@ $.uiCon = {
63
63
  }
64
64
  })
65
65
  .on('queue', function() {
66
- $.queue.reload();
66
+ $.theQueue.reload();
67
67
  $.uiRefresh();
68
68
  })
69
69
  .on('error', function() {
@@ -16,7 +16,7 @@
16
16
  <%_ script.create('JQuery')
17
17
  .useDependencies(['SemanticUI/Loader', 'SemanticUI/Dialog/Confirm'])
18
18
  .add(`
19
- $.queue = $.loader($('div[data-tab="queue"] table'), {
19
+ $.theQueue = $.loader($('div[data-tab="queue"] table'), {
20
20
  url: '${route('Ui', {name: 'queue', page: 'PAGE'})}',
21
21
  formatRow(item) {
22
22
  return this.toRow(item);
@@ -31,7 +31,11 @@ $.queue = $.loader($('div[data-tab="queue"] table'), {
31
31
  counter.addClass('hidden');
32
32
  }
33
33
  }
34
- $('[data-status!="processing"] [data-op="delete"]').hide();
34
+ $('[data-status]').each(function() {
35
+ if ($(this).data('status') !== 'processing') {
36
+ $(this).find('[data-op="delete"]').hide();
37
+ }
38
+ });
35
39
  $('a.queue-clicker').on('click', function(e) {
36
40
  e.preventDefault();
37
41
  self.handle($(this));
@@ -41,7 +45,7 @@ $.queue = $.loader($('div[data-tab="queue"] table'), {
41
45
  }
42
46
  }
43
47
  });
44
- $.queue.toRow = function(data) {
48
+ $.theQueue.toRow = function(data) {
45
49
  return $(\`
46
50
  <tr data-status="\${data.status}"><td>\${data.nr}</td>
47
51
  <td>\${$.toStr(data.id)}</td>
@@ -55,7 +59,7 @@ $.queue.toRow = function(data) {
55
59
  </td>
56
60
  </tr>\`);
57
61
  }
58
- $.queue.toStatus = function(data) {
62
+ $.theQueue.toStatus = function(data) {
59
63
  const icon = {
60
64
  new: 'pause circle outline',
61
65
  processing: 'loading spinner',
@@ -67,7 +71,7 @@ $.queue.toStatus = function(data) {
67
71
  return icon ? \`<div data-tooltip="\${data}" data-position="right center"><i class="\${icon} icon"></i></div>\` :
68
72
  $.toStr(data);
69
73
  }
70
- $.queue.handle = function(el) {
74
+ $.theQueue.handle = function(el) {
71
75
  const self = this;
72
76
  switch (el.data('op')) {
73
77
  case 'delete':
@@ -89,7 +93,7 @@ $.queue.handle = function(el) {
89
93
  break;
90
94
  }
91
95
  }
92
- $.queue.reload = function() {
96
+ $.theQueue.reload = function() {
93
97
  const self = this;
94
98
  if (!self.loading) {
95
99
  self.loading = true;
@@ -98,5 +102,5 @@ $.queue.reload = function() {
98
102
  }
99
103
  `)
100
104
  .addInitializer(`
101
- $.queue.load();
105
+ $.theQueue.load();
102
106
  `) -%>