fix #8131 - chinese translations
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
1 {
2  "name" : "Pman.Dialog.CoreAutoSavePreview",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/johns/gitlive/Pman.Core/Pman.Dialog.CoreAutoSavePreview.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "53e5aa2c97fef1555d2511de8218c544" : "By",
10   "87f9f735a1d36793ceaecd4e47124b63" : "Events",
11   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12   "bd88a20b53a47f7b5704a83a15ff5506" : "Saved Version",
13   "44749712dbec183e983dcd78a7736c41" : "Date",
14   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
15  },
16  "items" : [
17   {
18    "listeners" : {
19     "show" : "function (_self)\n{\n    if(typeof(_this.data) != 'undefined'){\n        _this.grid.footer.onClick('first');\n    }\n    \n}"
20    },
21    "modal" : true,
22    "collapsible" : false,
23    "background" : false,
24    "title" : "Saved Version",
25    "xtype" : "LayoutDialog",
26    "width" : 800,
27    "$ xns" : "Roo",
28    "closable" : false,
29    "resizable" : false,
30    "height" : 500,
31    "items" : [
32     {
33      "xtype" : "LayoutRegion",
34      "$ xns" : "Roo",
35      "* prop" : "center"
36     },
37     {
38      "xtype" : "LayoutRegion",
39      "$ xns" : "Roo",
40      "width" : 200,
41      "split" : true,
42      "* prop" : "west"
43     },
44     {
45      "listeners" : {
46       "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
47      },
48      "fitToframe" : true,
49      "background" : false,
50      "region" : "west",
51      "title" : "Events",
52      "xtype" : "GridPanel",
53      "fitContainer" : true,
54      "$ xns" : "Roo",
55      "tableName" : "Events",
56      "items" : [
57       {
58        "listeners" : {
59         "|render" : "function() \n{\n    _this.grid = this; \n    \n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
60        },
61        "autoExpandColumn" : "event_when",
62        "xtype" : "Grid",
63        "loadMask" : true,
64        "$ xns" : "Roo.grid",
65        "* prop" : "grid",
66        "items" : [
67         {
68          "listeners" : {
69           "afterselectionchange" : "function (_self)\n{\n    var selected = this.getSelected();\n    \n    _this.source = '';\n    \n    if(!selected){\n       _this.viewPanel.setContent(\"Please select an saved version on the left\"); \n       return;\n    }\n    \n    _this.viewPanel.load( { url : baseURL + \"/Roo/Events\", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){\n        \n        var res = Roo.decode(oResponse.responseText);\n        \n        if(!bSuccess || !res.success){\n            _this.viewPanel.setContent(\"Load data failed?!\");\n        }\n        \n        if(typeof(res.data) === 'string'){\n            _this.viewPanel.setContent(res.data);\n            return;\n        }\n        \n        if(!_this.data.successFn){\n            Roo.MessageBox.alert('Error', 'Please setup the successFn');\n            return;\n        }\n        \n        _this.source = _this.data.successFn(res);\n\n        _this.viewPanel.setContent(_this.source);\n        \n    });\n}"
70          },
71          "xtype" : "RowSelectionModel",
72          "singleSelect" : true,
73          "$ xns" : "Roo.grid",
74          "* prop" : "sm"
75         },
76         {
77          "listeners" : {
78           "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    \n    if(typeof(_this.data) == 'undefined'){\n        this.removeAll();\n        return false;\n    }\n\n    var d = Roo.apply({}, _this.data);\n    delete d.successFn;\n\n    Roo.apply(o.params, d);\n    \n}",
79           "load" : "function (_self, records, options)\n{\n    var sm = _this.grid.getSelectionModel();\n    if (!sm.getSelections().length) {\n        sm.selectFirstRow();\n        \n        sm.fireEvent('afterselectionchange', sm);\n    }\n}"
80          },
81          "xtype" : "Store",
82          "remoteSort" : true,
83          "$ sortInfo" : "{ field : 'event_when', direction: 'DESC' }",
84          "$ xns" : "Roo.data",
85          "* prop" : "dataSource",
86          "items" : [
87           {
88            "$ url" : "baseURL + '/Roo/Events.php'",
89            "method" : "GET",
90            "xtype" : "HttpProxy",
91            "$ xns" : "Roo.data",
92            "* prop" : "proxy"
93           },
94           {
95            "id" : "id",
96            "root" : "data",
97            "xtype" : "JsonReader",
98            "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_when',\n        'type': 'string'\n    }\n]",
99            "$ xns" : "Roo.data",
100            "* prop" : "reader",
101            "totalProperty" : "total"
102           }
103          ]
104         },
105         {
106          "pageSize" : 25,
107          "xtype" : "PagingToolbar",
108          "$ xns" : "Roo",
109          "displayInfo" : false,
110          "* prop" : "footer"
111         },
112         {
113          "xtype" : "ColumnModel",
114          "header" : "Date",
115          "width" : 100,
116          "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }",
117          "$ xns" : "Roo.grid",
118          "* prop" : "colModel[]",
119          "dataIndex" : "event_when"
120         },
121         {
122          "xtype" : "ColumnModel",
123          "width" : 100,
124          "header" : "By",
125          "$ renderer" : "function(v) { return String.format('{0}', v ); }",
126          "$ xns" : "Roo.grid",
127          "* prop" : "colModel[]",
128          "dataIndex" : "person_id_name"
129         }
130        ]
131       }
132      ]
133     },
134     {
135      "listeners" : {
136       "render" : "function (_self)\n{\n    _this.viewPanel = _self;\n}"
137      },
138      "autoScroll" : true,
139      "fitToFrame" : true,
140      "background" : false,
141      "region" : "center",
142      "xtype" : "ContentPanel",
143      "fitContainer" : true,
144      "$ xns" : "Roo"
145     },
146     {
147      "listeners" : {
148       "|click" : "function() {\n    _this.dialog.hide();\n}"
149      },
150      "text" : "Cancel",
151      "xtype" : "Button",
152      "$ xns" : "Roo",
153      "* prop" : "buttons[]"
154     },
155     {
156      "listeners" : {
157       "|click" : "function() {\n\n    _this.dialog.hide();\n    \n    if (_this.callback && _this.source != '') {\n        _this.callback.call(this, _this.source);\n    }\n}"
158      },
159      "text" : "OK",
160      "xtype" : "Button",
161      "$ xns" : "Roo",
162      "* prop" : "buttons[]"
163     }
164    ]
165   }
166  ]
167 }