Commit da398cc6 da398cc61153045acc0d3841a95eeba03e52f7e6 by root

save

1 parent 6b37c21e
...@@ -40,10 +40,7 @@ public class DownloadFileController { ...@@ -40,10 +40,7 @@ public class DownloadFileController {
40 40
41 41
42 @ResponseBody 42 @ResponseBody
43 @RequestMapping(value = "/settings", 43 @RequestMapping(value = "/settings.json",
44
45 //produces={"application/json", "application/xml"},
46 produces={"application/xml"},
47 method = RequestMethod.GET) 44 method = RequestMethod.GET)
48 public SettingsBean getStudent(HttpServletRequest request, HttpServletResponse response) { 45 public SettingsBean getStudent(HttpServletRequest request, HttpServletResponse response) {
49 46
......
...@@ -8,6 +8,25 @@ Ext.define('App.view.ToolsXml', { ...@@ -8,6 +8,25 @@ Ext.define('App.view.ToolsXml', {
8 type: 'toolsxmlform' 8 type: 'toolsxmlform'
9 }, 9 },
10 10
11 bbar: {
12
13 items: [
14 {
15 xtype:'button',
16 iconCls:'save',
17 text: 'Сохранить',
18 handler: function() {
19
20 var a = document.createElement("a");
21 a.href = 'settings.json';
22 a.download = 'settings.json';
23 document.body.appendChild(a);
24 a.click();
25 }
26 }
27 ]
28 },
29
11 items:[{ xtype: 'filefield', 30 items:[{ xtype: 'filefield',
12 name: 'fileSettings', 31 name: 'fileSettings',
13 fieldLabel: 'Конфиг', 32 fieldLabel: 'Конфиг',
...@@ -36,4 +55,8 @@ Ext.define('App.view.ToolsXml', { ...@@ -36,4 +55,8 @@ Ext.define('App.view.ToolsXml', {
36 } 55 }
37 ] 56 ]
38 57
39 });
...\ No newline at end of file ...\ No newline at end of file
58 });
59
60
61
62
......