roojs-all.js
[roojs1] / examples / bootstrap / Dialog.Login.bjs
1 {
2  "name" : "Dialog.Login",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/roojs1/examples/bootstrap/Dialog.Login.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "dc647eb65e6711e155375218212b3964" : "Password",
10   "01a569ddc6cf67ddec2a683f0a5f5956" : "Forgot your password?",
11   "d837cc5a72556c5e2abf4b9fe10ddef8" : "Login ",
12   "5047040b025ce0295b58d42250014417" : "<div id=\"login-err\" class=\"dialog-err\" style=\"color:red\"></div>",
13   "643a860f992333b8600ea264aca7c4fc" : "Email Address"
14  },
15  "items" : [
16   {
17    "listeners" : {
18     "btnclick" : "function (e)\n{\n    if(e == 'cancel'){\n        _this.dialog.hide();\n        return;\n    }\n    \n    _this.form.doAction('submit');\n}",
19     "|render" : "function (_self) {\n\n    Roo.get('login-err').dom.innerHTML = \"\";\n    \n}\n    ",
20     "show" : "function (_self)\n{\n    Roo.get('login-err').dom.innerHTML = \"\";\n}"
21    },
22    "title" : "Login ",
23    "xtype" : "Modal",
24    "buttonPosition" : "center",
25    "$ buttons" : "Roo.bootstrap.Modal.OKCANCEL",
26    "$ xns" : "Roo.bootstrap",
27    "items" : [
28     {
29      "xtype" : "Row",
30      "$ xns" : "Roo.bootstrap",
31      "String style" : "margin-top:20px;",
32      "items" : [
33       {
34        "xtype" : "Container",
35        "cls" : "col-md-12",
36        "$ xns" : "Roo.bootstrap",
37        "items" : [
38         {
39          "listeners" : {
40           "|actionfailed" : "function (_self, action) {\n    Roo.log('action failed?!');\n    Roo.log(action);\n    \n    if (typeof(action) != 'undefined' && action.failureType == 'server') {    \n\n        Roo.get('login-err').dom.innerHTML = action.result.errorMsg;\n        return;\n    }\n    \n    Roo.get('login-err').dom.innerHTML = \"Fill in all the required fields\";\n}",
41           "|actioncomplete" : "function (_self, action) {\n    \n    if (action.type =='submit') {\n        Roo.log(action);\n        _this.dialog.hide();\n    \n        if (_this.callback) {\n            _this.callback.call(_this, action.result);\n         }\n         \n         _this.form.reset();\n         \n         return;\n    }\n}",
42           "|render" : "function (_self) {\n    _this.form = _self;\n}"
43          },
44          "$ url" : "baseURL + '/Login'",
45          "labelAlign" : "left",
46          "xtype" : "Form",
47          "method" : "POST",
48          "$ xns" : "Roo.bootstrap",
49          "items" : [
50           {
51            "xtype" : "Container",
52            "cls" : "col-sm-12",
53            "$ xns" : "Roo.bootstrap",
54            "items" : [
55             {
56              "listeners" : {
57               "specialkey" : "function (_self, e)\n{\n    if(e.getKey() == 13){\n        _this.form.doAction('submit');\n    }\n    \n}"
58              },
59              "inputType" : "email",
60              "xtype" : "Input",
61              "vtype" : "email",
62              "placeholder" : "Email Address",
63              "allowBlank" : false,
64              "$ xns" : "Roo.bootstrap",
65              "name" : "email"
66             },
67             {
68              "listeners" : {
69               "specialkey" : "function (_self, e)\n{\n    if(e.getKey() == 13){\n        _this.form.doAction('submit');\n    }\n}"
70              },
71              "inputType" : "password",
72              "xtype" : "Input",
73              "placeholder" : "Password",
74              "allowBlank" : false,
75              "$ xns" : "Roo.bootstrap",
76              "name" : "password"
77             }
78            ]
79           }
80          ]
81         }
82        ]
83       }
84      ]
85     },
86     {
87      "xtype" : "Row",
88      "$ xns" : "Roo.bootstrap",
89      "String style" : "margin-top:20px;",
90      "items" : [
91       {
92        "xtype" : "Container",
93        "cls" : "col-md-12",
94        "$ xns" : "Roo.bootstrap",
95        "items" : [
96         {
97          "listeners" : {
98           "|click" : "function () {\n    _this.dialog.hide();\n    \n    Hydra.Dialog.ForgotPassword.show({}, function(){\n        Roo.bootstrap.MessageBox.alert('Notice', 'The password has been sent to your email');\n    });\n}"
99          },
100          "tag" : "a",
101          "xtype" : "Button",
102          "html" : "Forgot your password?",
103          "Boolean removeClass" : true,
104          "$ xns" : "Roo.bootstrap",
105          "weight" : "link",
106          "href" : "#"
107         }
108        ]
109       }
110      ]
111     },
112     {
113      "xtype" : "Row",
114      "$ xns" : "Roo.bootstrap",
115      "items" : [
116       {
117        "xtype" : "Container",
118        "cls" : "col-md-12",
119        "$ xns" : "Roo.bootstrap",
120        "items" : [
121         {
122          "xtype" : "Container",
123          "style" : "margin-top:20px;",
124          "cls" : "bg-danger",
125          "html" : "<div id=\"login-err\" class=\"dialog-err\" style=\"color:red\"></div>",
126          "$ xns" : "Roo.bootstrap"
127         }
128        ]
129       }
130      ]
131     }
132    ]
133   }
134  ]
135 }