Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs
authorEdward <edward@roojs.com>
Wed, 19 Dec 2018 09:34:48 +0000 (17:34 +0800)
committerEdward <edward@roojs.com>
Wed, 19 Dec 2018 09:34:48 +0000 (17:34 +0800)
Pman.Dialog.BAdminStaffTwoFactorQRCode.js

Pman.Dialog.BAdminStaffTwoFactorQRCode.bjs
Pman.Dialog.BAdminStaffTwoFactorQRCode.js

index 4e9509e..3d12429 100644 (file)
@@ -25,7 +25,7 @@
  "items" : [
   {
    "listeners" : {
-    "show" : "function (_self)\n{\n    if(!Pman.Login.authUser) {\n        Roo.bootstrap.MessageBox.alert('Error', 'Please login again');\n        return;\n    }\n    \n    if(\n        !_this.data.id ||\n        _this.data.id.length == 0\n    ) {\n        Roo.bootstrap.MessageBox.alert('Error', 'Please select a person again');\n        return;\n    }\n    \n    _this.dialog.closeEl.hide();\n    _this.skipBtn.hide();\n    _this.cancelBtn.hide();\n    \n    if(_this.data.allow_close) {\n        _this.dialog.closeEl.show();\n        _this.skipBtn.show();\n    }\n    \n    if(_this.data.allow_cancel) {\n        _this.cancelBtn.show();\n    }\n    \n    _this.desktopView.hide();\n    _this.mobileView.hide();\n    \n    new Pman.Request({\n        url: baseURL + '/Roo/Core_person.php',\n        method : 'GET',\n        mask : 'Loading...',\n        params : {\n            _to_qr_code : 1,\n            id: _this.data.id\n        },\n        \n        success : function(res) {\n            _this.qrcode_image.setSrc(res.data.image);\n            _this.secret.setValue(res.data.secret);\n            _this.issuer_notify.el.dom.innerHTML = String.format(_this.issuer_notify._html, res.data.issuer);\n            \n            _this.desktopView.show();\n            _this.mobileView.hide();\n            \n            if(Roo.isTouch) {\n                _this.desktopView.hide();\n                _this.mobileView.show();\n            }\n        },\n        \n        failure : function(res) {\n            Roo.log(res);\n        }\n    });\n}",
+    "show" : "function (_self)\n{\n    if(!Pman.Login.authUser) {\n        Roo.bootstrap.MessageBox.alert('Error', 'Please login again');\n        return;\n    }\n    \n    if(\n        !_this.data.id ||\n        _this.data.id.length == 0\n    ) {\n        Roo.bootstrap.MessageBox.alert('Error', 'Please select a person again');\n        return;\n    }\n    \n    _this.dialog.closeEl.hide();\n    _this.skipBtn.hide();\n    _this.cancelBtn.hide();\n    \n    if(_this.data.allow_close) {\n        _this.dialog.closeEl.show();\n        _this.skipBtn.show();\n    }\n    \n    if(_this.data.allow_cancel) {\n        _this.cancelBtn.show();\n    }\n    \n    _this.desktopView.hide();\n    _this.mobileView.hide();\n    \n    new Pman.Request({\n        url: baseURL + '/Roo/Core_person.php',\n        method : 'GET',\n        mask : 'Loading...',\n        params : {\n            _to_qr_code : 1,\n            id: _this.data.id\n        },\n        \n        success : function(res) {\n            _this.qrcode_image.setSrc(res.data.image);\n            _this.secret.setValue(res.data.secret);\n            _this.issuer_notify.el.dom.innerHTML = String.format(_this.issuer_notify._html, res.data.issuer);\n            \n            _this.desktopView.show();\n            _this.mobileView.hide();\n            \n            if(Roo.isTouch) {\n                _this.desktopView.hide();\n                _this.mobileView.show();\n            }\n            \n        },\n        \n        failure : function(res) {\n            Roo.log(res);\n        }\n    });\n}",
     "hide" : "function (_self)\n{\n    if(_this.callback){\n        _this.callback.call(_this, false);\n    }\n    \n}"
    },
    "String cls" : "enable-overflow coba-qr-dialog",
index 5b44ccf..fee2570 100644 (file)
@@ -114,6 +114,7 @@ Roo.apply(Pman.Dialog.BAdminStaffTwoFactorQRCode.prototype, {
                       _this.desktopView.hide();
                       _this.mobileView.show();
                   }
+                  
               },
               
               failure : function(res) {