[Labels] Added form to choose which label to start at
这个提交包含在:
父节点
37281f8fe6
当前提交
aa051f7ffd
共有 4 个文件被更改,包括 59 次插入 和 26 次删除
|
|
@ -285,4 +285,8 @@ class Labels extends CI_Controller {
|
||||||
$this->labels_model->saveDefaultLabel($id);
|
$this->labels_model->saveDefaultLabel($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function startAtLabel() {
|
||||||
|
$data['stationid'] = xss_clean(json_decode($this->input->post('stationid')));
|
||||||
|
$this->load->view('labels/startatform', $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
echo '<td>' . $qso->station_gridsquare . '</td>';
|
echo '<td>' . $qso->station_gridsquare . '</td>';
|
||||||
echo '<td>' . $qso->count . '</td>';
|
echo '<td>' . $qso->count . '</td>';
|
||||||
echo '<td><a href="'. site_url('qslprint') . '" class="btn btn-outline-info btn-sm"><i class="fas fa-search"></i></a></td>';
|
echo '<td><a href="'. site_url('qslprint') . '" class="btn btn-outline-info btn-sm"><i class="fas fa-search"></i></a></td>';
|
||||||
echo '<td><a href="'. site_url('labels/print/' . $qso->station_id) . '" class="btn btn-outline-success btn-sm"><i class="fas fa-print"></i></a></td>';
|
echo '<td><button class="btn btn-outline-success btn-sm printbutton" onclick="printat('.$qso->station_id.')"><i class="fas fa-print"></i></button></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
} ?>
|
} ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<form method="post" action="<?php echo site_url('labels/print/'.$stationid) ?>" class="form-inline">
|
||||||
|
<input class="form-control input-group-sm" type="number" id="startat" name="startat" value="1">
|
||||||
|
<button type="submit" id="button1id" name="button1id" class="btn btn-primary ld-ext-right">Print</button>
|
||||||
|
</form>
|
||||||
|
|
@ -14,3 +14,28 @@ function saveDefault(id) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function printat(stationid) {
|
||||||
|
$.ajax({
|
||||||
|
url: base_url + 'index.php/labels/startAtLabel',
|
||||||
|
type: 'post',
|
||||||
|
data: {'stationid': stationid},
|
||||||
|
success: function (html) {
|
||||||
|
BootstrapDialog.show({
|
||||||
|
title: 'Start printing at which label?',
|
||||||
|
size: BootstrapDialog.SIZE_NORMAL,
|
||||||
|
cssClass: 'qso-dialog',
|
||||||
|
nl2br: false,
|
||||||
|
message: html,
|
||||||
|
onshown: function(dialog) {
|
||||||
|
},
|
||||||
|
buttons: [{
|
||||||
|
label: 'Close',
|
||||||
|
action: function (dialogItself) {
|
||||||
|
dialogItself.close();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用