Skip to content

Instantly share code, notes, and snippets.

@rvdsarr
Created February 2, 2016 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvdsarr/62343c3952f1e1d0ed03 to your computer and use it in GitHub Desktop.
Save rvdsarr/62343c3952f1e1d0ed03 to your computer and use it in GitHub Desktop.
success: function(resp) {
$('#' + tableId + ' tbody tr.empty').remove();
var $data = JSON.parse(resp);
var $addedRow = false;
$.each($data.data, function(i,x) {
var $activity = x.activity;
var $status = $fstatus = x.status;
var $message = x.message;
var $url = x.url;
if ($activity === "Printing Labels") {
if ($status === "OK") {
if (dymoStatus != 'DONE' && dymoStatus != 'WORKING') {
runDymo(Poll);
dymoStatus = 'WORKING';
}
}
}
var $tr = $('<tr></tr>');
var $td1 = $('<td></td>');
var $td2 = $('<td></td>');
var $td3 = $('<td></td>');
var $id = 's' + md5($activity);
$id = $id.replace('-', '');
$tr.attr('id', $id);
if ($url) {
this.printUrl = $url;
alert($url);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment