pixl-xyapp 2.1.31 → 2.1.33

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/js/base.js CHANGED
@@ -304,8 +304,10 @@ var app = {
304
304
  opts.headers['X-CSRF-Token'] = app.csrf_token;
305
305
  }
306
306
 
307
- // default 10 sec timeout
308
- var timeout = opts.timeout || 10000;
307
+ // default 10 sec timeout if not configured
308
+ var default_timeout = 10000;
309
+ if (window.config && window.config.api_timeout_ms) default_timeout = window.config.api_timeout_ms;
310
+ var timeout = opts.timeout || default_timeout;
309
311
  delete opts.timeout;
310
312
 
311
313
  // retry delay (w/exp backoff)
@@ -320,7 +322,7 @@ var app = {
320
322
  Debug.trace('api', "HTTP Error: " + err);
321
323
 
322
324
  if (errorCallback) errorCallback({ code: 'http', description: '' + (err.message || err) });
323
- else app.doError( "HTTP Error: " + err.message || err );
325
+ else app.doError( "HTTP Error: " + err.message || err, 8 ); // hide timeout messages after 8s
324
326
  }, timeout );
325
327
 
326
328
  window.fetch( url, opts )
package/js/select.js CHANGED
@@ -118,7 +118,7 @@ var SingleSelect = {
118
118
  $('#d_sel_dialog_scrollarea > div.sel_dialog_item').on('click', function() {
119
119
  // select item, close dialog and update multi-select
120
120
  var $item = $(this);
121
- $this.val( $item.data('value') );
121
+ $this.val( $item.attr('data-value') );
122
122
 
123
123
  Popover.detach();
124
124
  // redraw();
@@ -261,7 +261,7 @@ var SingleSelect = {
261
261
  $('#d_sel_dialog_scrollarea > div.sel_dialog_item').on('click', function() {
262
262
  // select item, close dialog and update state
263
263
  var $item = $(this);
264
- var value = $item.data('value');
264
+ var value = $item.attr('data-value');
265
265
 
266
266
  delete opts.onCancel;
267
267
  Popover.detach();
@@ -487,7 +487,7 @@ var MultiSelect = {
487
487
  var $item = $(this);
488
488
  if ($item.hasClass('inherited')) return; // no clicky on inherited items
489
489
 
490
- var value = $item.data('value');
490
+ var value = $item.attr('data-value');
491
491
  var new_sel_state = !$item.hasClass('selected');
492
492
  var new_sel_idx = -1;
493
493
 
@@ -700,7 +700,7 @@ var MultiSelect = {
700
700
 
701
701
  var values = [];
702
702
  $('#d_sel_dialog_scrollarea > div.sel_dialog_item.selected').each( function() {
703
- values.push( $(this).data('value') );
703
+ values.push( $(this).attr('data-value') );
704
704
  });
705
705
 
706
706
  Popover.detach();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-xyapp",
3
- "version": "2.1.31",
3
+ "version": "2.1.33",
4
4
  "description": "Front-end web application and theme for xyOps.",
5
5
  "author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
6
6
  "homepage": "https://github.com/pixlcore/pixl-xyapp",