fix bug nhỏ

This commit is contained in:
dongpd 2020-10-26 14:58:04 +07:00
parent 2b88dbb695
commit 758b8d29c3
2 changed files with 6 additions and 1 deletions

View File

@ -282,7 +282,11 @@ class DeviceController extends Controller {
public function actionSearch() { public function actionSearch() {
if (Yii::$app->request->post()) { if (Yii::$app->request->post()) {
Yii::$app->response->format = "json"; Yii::$app->response->format = "json";
$datas = json_decode(common::requestToCardService("/SearchDevice", ["NetMask" => Yii::$app->request->post("SubnetMask")]), true); $NetMask = "255.255.255.255";
if (Yii::$app->request->post("SubnetMask") != "") {
$NetMask = Yii::$app->request->post("SubnetMask");
}
$datas = json_decode(common::requestToCardService("/SearchDevice", ["NetMask" => $NetMask]), true);
return [ return [
"form" => $this->renderPartial("device-lists", [ "form" => $this->renderPartial("device-lists", [
"datas" => $datas, "datas" => $datas,

View File

@ -2,6 +2,7 @@ $(function () {
$('[data-toggle="tooltip"]').tooltip({ $('[data-toggle="tooltip"]').tooltip({
container: 'body' container: 'body'
}); });
$.fn.modal.Constructor.prototype.enforceFocus = $.noop;
}); });
/** /**