1 |
03a2d08f
|
Michal Horký
|
import java.io.File;
|
2 |
|
|
|
3 |
7e0b699a
|
horkmi
|
import io.Database.DB_Messenger;
|
4 |
49fd8648
|
Michal Horký
|
import io.FileWorker;
|
5 |
03a2d08f
|
Michal Horký
|
import javafx.application.Application;
|
6 |
49fd8648
|
Michal Horký
|
import javafx.application.Platform;
|
7 |
7e0b699a
|
horkmi
|
import javafx.collections.FXCollections;
|
8 |
03a2d08f
|
Michal Horký
|
import javafx.geometry.Insets;
|
9 |
|
|
import javafx.geometry.Pos;
|
10 |
49fd8648
|
Michal Horký
|
import javafx.scene.Node;
|
11 |
03a2d08f
|
Michal Horký
|
import javafx.scene.Parent;
|
12 |
|
|
import javafx.scene.Scene;
|
13 |
|
|
import javafx.scene.control.Button;
|
14 |
5ae26965
|
horkmi
|
import javafx.scene.control.ComboBox;
|
15 |
03a2d08f
|
Michal Horký
|
import javafx.scene.control.Label;
|
16 |
49fd8648
|
Michal Horký
|
import javafx.scene.control.Menu;
|
17 |
|
|
import javafx.scene.control.MenuBar;
|
18 |
|
|
import javafx.scene.control.MenuItem;
|
19 |
7e0b699a
|
horkmi
|
import javafx.scene.control.PasswordField;
|
20 |
49fd8648
|
Michal Horký
|
import javafx.scene.control.Separator;
|
21 |
|
|
import javafx.scene.control.SeparatorMenuItem;
|
22 |
5ae26965
|
horkmi
|
import javafx.scene.control.Tab;
|
23 |
|
|
import javafx.scene.control.TabPane;
|
24 |
|
|
import javafx.scene.control.TabPane.TabClosingPolicy;
|
25 |
7e0b699a
|
horkmi
|
import javafx.scene.control.TextField;
|
26 |
49fd8648
|
Michal Horký
|
import javafx.scene.image.Image;
|
27 |
|
|
import javafx.scene.image.ImageView;
|
28 |
|
|
import javafx.scene.input.KeyCode;
|
29 |
|
|
import javafx.scene.input.KeyCodeCombination;
|
30 |
|
|
import javafx.scene.input.KeyCombination;
|
31 |
|
|
import javafx.scene.layout.BorderPane;
|
32 |
03a2d08f
|
Michal Horký
|
import javafx.scene.layout.HBox;
|
33 |
49fd8648
|
Michal Horký
|
import javafx.scene.layout.Priority;
|
34 |
03a2d08f
|
Michal Horký
|
import javafx.scene.layout.VBox;
|
35 |
|
|
import javafx.stage.FileChooser;
|
36 |
|
|
import javafx.stage.Stage;
|
37 |
|
|
|
38 |
49fd8648
|
Michal Horký
|
/**
|
39 |
|
|
* VM arguments for Java 11: --module-path libs\javafx-sdk-11.0.2\lib --add-modules=javafx.controls
|
40 |
|
|
*/
|
41 |
|
|
public class Deserializer extends Application implements IConversionResults {
|
42 |
03a2d08f
|
Michal Horký
|
|
43 |
|
|
private Stage stage;
|
44 |
49fd8648
|
Michal Horký
|
private Label fullScreen;
|
45 |
a5d16f0a
|
horkmi
|
|
46 |
5ae26965
|
horkmi
|
private Editor editor;
|
47 |
49fd8648
|
Michal Horký
|
private VBox outputLayout;
|
48 |
03a2d08f
|
Michal Horký
|
|
49 |
49fd8648
|
Michal Horký
|
private Converter converter;
|
50 |
03a2d08f
|
Michal Horký
|
|
51 |
|
|
@Override
|
52 |
|
|
public void init() throws Exception {
|
53 |
|
|
super.init();
|
54 |
49fd8648
|
Michal Horký
|
converter = new Converter(this);
|
55 |
|
|
converter.start();
|
56 |
|
|
}
|
57 |
|
|
|
58 |
|
|
@Override
|
59 |
|
|
public void stop() throws Exception {
|
60 |
|
|
super.stop();
|
61 |
|
|
converter.end();
|
62 |
|
|
converter.join();
|
63 |
efc1d63e
|
@havlijan17
|
Platform.exit();
|
64 |
03a2d08f
|
Michal Horký
|
}
|
65 |
|
|
|
66 |
|
|
@Override
|
67 |
|
|
public void start(Stage stage) throws Exception {
|
68 |
|
|
this.stage = stage;
|
69 |
a5d16f0a
|
horkmi
|
stage.getIcons().add(new Image(getResource("logo.png")));
|
70 |
49fd8648
|
Michal Horký
|
stage.setTitle("Java Object Universal Deserializer");
|
71 |
03a2d08f
|
Michal Horký
|
stage.setScene(createScene());
|
72 |
|
|
stage.show();
|
73 |
5ae26965
|
horkmi
|
|
74 |
|
|
stage.setMinWidth(stage.getWidth());
|
75 |
|
|
stage.setMinHeight(stage.getHeight());
|
76 |
efc1d63e
|
@havlijan17
|
|
77 |
49fd8648
|
Michal Horký
|
stage.fullScreenProperty().addListener((obs, oldState, newState) -> {
|
78 |
|
|
changeFullScreenMenuItem();
|
79 |
|
|
});
|
80 |
03a2d08f
|
Michal Horký
|
}
|
81 |
|
|
|
82 |
|
|
private Scene createScene() {
|
83 |
49fd8648
|
Michal Horký
|
createMenu();
|
84 |
|
|
Scene scene = new Scene(createLayout());
|
85 |
a5d16f0a
|
horkmi
|
scene.getStylesheets().add(getResource("main.css"));
|
86 |
49fd8648
|
Michal Horký
|
return scene;
|
87 |
03a2d08f
|
Michal Horký
|
}
|
88 |
|
|
|
89 |
|
|
private Parent createLayout() {
|
90 |
49fd8648
|
Michal Horký
|
BorderPane layout = new BorderPane();
|
91 |
|
|
|
92 |
|
|
layout.setTop(createMenu());
|
93 |
|
|
layout.setCenter(createBodyLayout());
|
94 |
03a2d08f
|
Michal Horký
|
|
95 |
49fd8648
|
Michal Horký
|
return layout;
|
96 |
|
|
}
|
97 |
|
|
|
98 |
5ae26965
|
horkmi
|
private Node createBodyLayout() {
|
99 |
|
|
TabPane header = new TabPane();
|
100 |
|
|
header.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
|
101 |
|
|
header.getTabs().add(createInputFileTab());
|
102 |
7e0b699a
|
horkmi
|
header.getTabs().add(createQueryTab());
|
103 |
5ae26965
|
horkmi
|
|
104 |
|
|
|
105 |
|
|
editor = new Editor();
|
106 |
|
|
|
107 |
|
|
ComboBox<String> modeBox = new ComboBox<String>();
|
108 |
|
|
modeBox.setItems(FileWorker.getAceModes());
|
109 |
|
|
modeBox.getSelectionModel().select(Editor.DEFAULT_MODE);
|
110 |
|
|
modeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
111 |
|
|
if (newValue != null && oldValue != newValue) {
|
112 |
|
|
editor.setMode(modeBox.getValue());
|
113 |
|
|
}
|
114 |
|
|
});
|
115 |
|
|
|
116 |
|
|
ComboBox<String> themeBox = new ComboBox<String>();
|
117 |
|
|
themeBox.setItems(FileWorker.getAceThemes());
|
118 |
|
|
themeBox.getSelectionModel().select(Editor.DEFAULT_THEME);
|
119 |
|
|
themeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
120 |
|
|
if (newValue != null && oldValue != newValue) {
|
121 |
|
|
editor.setTheme(themeBox.getValue());
|
122 |
|
|
}
|
123 |
|
|
});
|
124 |
|
|
|
125 |
|
|
HBox aceSettings = new HBox();
|
126 |
|
|
aceSettings.setPadding(new Insets(0, 10, 0, 0));
|
127 |
|
|
aceSettings.setSpacing(10.0);
|
128 |
|
|
aceSettings.setAlignment(Pos.CENTER_RIGHT);
|
129 |
|
|
aceSettings.getChildren().addAll(new Label("Nastavení editoru (režim / téma):"), modeBox, new Label("/"), themeBox);
|
130 |
|
|
|
131 |
|
|
VBox editorLayout = new VBox();
|
132 |
|
|
editorLayout.setSpacing(5.0);
|
133 |
|
|
editorLayout.getChildren().addAll(editor.getView(), aceSettings);
|
134 |
|
|
|
135 |
|
|
|
136 |
49fd8648
|
Michal Horký
|
Label forOutputFile = new Label("Výstupní soubor:");
|
137 |
5ae26965
|
horkmi
|
Label outputFile = new Label(" Ještě nebyl vybrán žádný soubor...");
|
138 |
|
|
outputFile.setStyle("-fx-font-style: italic;");
|
139 |
49fd8648
|
Michal Horký
|
|
140 |
5ae26965
|
horkmi
|
Button save = new Button("Uložit");
|
141 |
|
|
save.setOnAction(event -> {
|
142 |
49fd8648
|
Michal Horký
|
File jsonFile = null;
|
143 |
|
|
|
144 |
5ae26965
|
horkmi
|
FileChooser fCh = new FileChooser();
|
145 |
|
|
fCh.setInitialDirectory(new File("."));
|
146 |
|
|
fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("JSON Files", "*.json"));
|
147 |
|
|
File file = fCh.showSaveDialog(stage);
|
148 |
|
|
if (file != null) {
|
149 |
|
|
jsonFile = file;
|
150 |
|
|
outputFile.setText(file.getAbsolutePath());
|
151 |
|
|
outputFile.setStyle("-fx-font-weight: bold;");
|
152 |
49fd8648
|
Michal Horký
|
}
|
153 |
|
|
|
154 |
5ae26965
|
horkmi
|
if (jsonFile != null) {
|
155 |
49fd8648
|
Michal Horký
|
String title = "Uložení JSON";
|
156 |
|
|
try {
|
157 |
5ae26965
|
horkmi
|
FileWorker.saveJson(jsonFile, editor.getJson());
|
158 |
49fd8648
|
Michal Horký
|
Report.info(title, null, "Uložení JSON souboru proběhlo v pořádku.");
|
159 |
|
|
} catch (Exception e) {
|
160 |
|
|
Report.error(title, null, "Při ukládání JSON souboru nastala chyba.");
|
161 |
|
|
}
|
162 |
03a2d08f
|
Michal Horký
|
}
|
163 |
|
|
});
|
164 |
|
|
|
165 |
49fd8648
|
Michal Horký
|
HBox bOF = new HBox();
|
166 |
|
|
bOF.setAlignment(Pos.CENTER_RIGHT);
|
167 |
5ae26965
|
horkmi
|
bOF.getChildren().add(save);
|
168 |
49fd8648
|
Michal Horký
|
|
169 |
|
|
outputLayout = new VBox();
|
170 |
5ae26965
|
horkmi
|
outputLayout.setPadding(new Insets(0, 10, 10, 10));
|
171 |
49fd8648
|
Michal Horký
|
outputLayout.setSpacing(5.0);
|
172 |
|
|
outputLayout.getChildren().add(forOutputFile);
|
173 |
|
|
outputLayout.getChildren().add(outputFile);
|
174 |
|
|
outputLayout.getChildren().add(bOF);
|
175 |
|
|
setOutputLayoutDisabled(true);
|
176 |
|
|
|
177 |
|
|
|
178 |
5ae26965
|
horkmi
|
VBox layout = new VBox();
|
179 |
|
|
layout.setSpacing(10.0);
|
180 |
|
|
VBox.setVgrow(editor.getView(), Priority.ALWAYS);
|
181 |
|
|
layout.getChildren().addAll(header, new Separator(), editorLayout, new Separator(), outputLayout);
|
182 |
49fd8648
|
Michal Horký
|
|
183 |
5ae26965
|
horkmi
|
return layout;
|
184 |
|
|
}
|
185 |
|
|
|
186 |
7e0b699a
|
horkmi
|
private Tab createQueryTab() {
|
187 |
|
|
String promptTexts[] = new String[] { "jdbc:mysql://server/nazevDB", "jdbc:oracle:thin:@server:port:nazevDB" };
|
188 |
|
|
|
189 |
|
|
Label rdbmsLabel = new Label("Typ DB");
|
190 |
|
|
Label urlLabel = new Label("URL");
|
191 |
|
|
ComboBox<String> rdbms = new ComboBox<String>(FXCollections.observableArrayList(new String[] { "MySQL", "ORACLE" }));
|
192 |
|
|
TextField url = new TextField();
|
193 |
|
|
|
194 |
|
|
rdbms.setOnAction(event -> {
|
195 |
|
|
url.setPromptText(promptTexts[rdbms.getSelectionModel().getSelectedIndex()]);
|
196 |
|
|
});
|
197 |
|
|
|
198 |
|
|
rdbms.getSelectionModel().selectFirst();
|
199 |
|
|
url.setPromptText(promptTexts[0]);
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
Label userLabel = new Label("Uživatel");
|
203 |
|
|
Label passwordLabel = new Label("Heslo");
|
204 |
|
|
TextField user = new TextField();
|
205 |
|
|
PasswordField password = new PasswordField();
|
206 |
|
|
|
207 |
|
|
VBox rdbmsLayout = new VBox();
|
208 |
|
|
rdbmsLayout.getChildren().addAll(rdbmsLabel, rdbms);
|
209 |
|
|
VBox urlLayout = new VBox();
|
210 |
|
|
urlLayout.getChildren().addAll(urlLabel, url);
|
211 |
|
|
VBox userLayout = new VBox();
|
212 |
|
|
userLayout.getChildren().addAll(userLabel, user);
|
213 |
|
|
VBox passwordLayout = new VBox();
|
214 |
|
|
passwordLayout.getChildren().addAll(passwordLabel, password);
|
215 |
|
|
|
216 |
|
|
rdbmsLabel.setStyle("-fx-font-weight: bold;");
|
217 |
|
|
urlLabel.setStyle("-fx-font-weight: bold;");
|
218 |
|
|
userLabel.setStyle("-fx-font-weight: bold;");
|
219 |
|
|
passwordLabel.setStyle("-fx-font-weight: bold;");
|
220 |
|
|
|
221 |
|
|
url.setMinWidth(400);
|
222 |
|
|
user.setMinWidth(100);
|
223 |
|
|
user.setPrefWidth(200);
|
224 |
|
|
user.setMaxWidth(300);
|
225 |
|
|
password.setMinWidth(100);
|
226 |
|
|
password.setPrefWidth(200);
|
227 |
|
|
password.setMaxWidth(300);
|
228 |
|
|
|
229 |
|
|
HBox.setHgrow(urlLayout, Priority.ALWAYS);
|
230 |
|
|
|
231 |
|
|
HBox connLayout = new HBox();
|
232 |
|
|
connLayout.setSpacing(10);
|
233 |
|
|
connLayout.getChildren().addAll(rdbmsLayout, urlLayout, userLayout, passwordLayout);
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
Label select = new Label("SELECT"), from = new Label("FROM"), where = new Label("WHERE"), queryEnd = new Label(";");
|
237 |
|
|
TextField column = new TextField(), table = new TextField(), cond = new TextField();
|
238 |
|
|
|
239 |
|
|
select.setStyle("-fx-font-weight: bold;");
|
240 |
|
|
from.setStyle("-fx-font-weight: bold;");
|
241 |
|
|
where.setStyle("-fx-font-weight: bold;");
|
242 |
|
|
queryEnd.setStyle("-fx-font-weight: bold;");
|
243 |
|
|
|
244 |
|
|
column.setPromptText("sloupec");
|
245 |
|
|
table.setPromptText("tabulka");
|
246 |
|
|
cond.setPromptText("podminka");
|
247 |
|
|
|
248 |
|
|
HBox.setHgrow(column, Priority.ALWAYS);
|
249 |
|
|
HBox.setHgrow(table, Priority.ALWAYS);
|
250 |
|
|
HBox.setHgrow(cond, Priority.ALWAYS);
|
251 |
|
|
|
252 |
|
|
HBox queryLayout = new HBox();
|
253 |
|
|
queryLayout.setAlignment(Pos.CENTER);
|
254 |
|
|
queryLayout.setSpacing(5.0);
|
255 |
|
|
queryLayout.getChildren().addAll(select, column, from, table, where, cond, queryEnd);
|
256 |
|
|
|
257 |
|
|
Button setQuery = new Button("Spustit");
|
258 |
|
|
setQuery.setOnAction(event -> {
|
259 |
|
|
String driver = rdbms.getValue().equals("MySQL") ? "com.mysql.cj.jdbc.Driver" : "oracle.jdbc.driver.OracleDriver";
|
260 |
|
|
converter.setInput(null, new DB_Messenger(driver, url.getText().trim(), user.getText().trim(), password.getText().trim(),
|
261 |
|
|
table.getText().trim(), cond.getText().trim(), column.getText().trim()));
|
262 |
|
|
});
|
263 |
|
|
|
264 |
|
|
HBox bIF = new HBox();
|
265 |
|
|
bIF.setAlignment(Pos.CENTER_RIGHT);
|
266 |
|
|
bIF.getChildren().add(setQuery);
|
267 |
|
|
|
268 |
|
|
VBox forInput = new VBox();
|
269 |
|
|
forInput.setPadding(new Insets(10, 10, 0, 10));
|
270 |
|
|
forInput.setSpacing(5.0);
|
271 |
|
|
forInput.getChildren().addAll(connLayout, queryLayout, bIF);
|
272 |
|
|
|
273 |
|
|
return new Tab("SQL", forInput);
|
274 |
|
|
}
|
275 |
|
|
|
276 |
5ae26965
|
horkmi
|
private Tab createInputFileTab() {
|
277 |
|
|
Label forInputFile = new Label("Soubor k deserializaci:");
|
278 |
|
|
Label inputFile = new Label(" Ještě nebyl vybrán žádný soubor...");
|
279 |
|
|
inputFile.setStyle("-fx-font-style: italic;");
|
280 |
|
|
inputFile.setPrefWidth(500); // Value to cut the text.
|
281 |
|
|
inputFile.setMaxWidth(Double.MAX_VALUE);
|
282 |
49fd8648
|
Michal Horký
|
|
283 |
5ae26965
|
horkmi
|
Button setInputFile = new Button("Vstupní soubor");
|
284 |
|
|
setInputFile.setOnAction(event -> {
|
285 |
|
|
FileChooser fCh = new FileChooser();
|
286 |
|
|
fCh.setInitialDirectory(new File("."));
|
287 |
|
|
// The input can be a zip file or file without a specific extension -> file chooser without extension filters...
|
288 |
|
|
// fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("Binary Files", "*.out"));
|
289 |
|
|
File file = fCh.showOpenDialog(stage);
|
290 |
|
|
if (file != null) {
|
291 |
|
|
setOutputLayoutDisabled(true);
|
292 |
|
|
|
293 |
|
|
inputFile.setText(file.getAbsolutePath());
|
294 |
|
|
inputFile.setStyle("-fx-font-weight: bold;");
|
295 |
|
|
|
296 |
7e0b699a
|
horkmi
|
converter.setInput(file, null);
|
297 |
5ae26965
|
horkmi
|
}
|
298 |
|
|
});
|
299 |
49fd8648
|
Michal Horký
|
|
300 |
5ae26965
|
horkmi
|
HBox bIF = new HBox();
|
301 |
|
|
bIF.setAlignment(Pos.CENTER_RIGHT);
|
302 |
|
|
bIF.getChildren().add(setInputFile);
|
303 |
49fd8648
|
Michal Horký
|
|
304 |
5ae26965
|
horkmi
|
VBox forInput = new VBox();
|
305 |
|
|
forInput.setAlignment(Pos.CENTER_LEFT);
|
306 |
|
|
forInput.setPadding(new Insets(10, 10, 0, 10));
|
307 |
|
|
forInput.setSpacing(5.0);
|
308 |
|
|
forInput.getChildren().addAll(forInputFile, inputFile, bIF);
|
309 |
03a2d08f
|
Michal Horký
|
|
310 |
5ae26965
|
horkmi
|
return new Tab("Soubor", forInput);
|
311 |
03a2d08f
|
Michal Horký
|
}
|
312 |
|
|
|
313 |
49fd8648
|
Michal Horký
|
private Node createMenu() {
|
314 |
|
|
Menu menu = new Menu("Aplikace");
|
315 |
|
|
|
316 |
|
|
MenuItem fullScreen = createMenuItem(null, null, new KeyCodeCombination(KeyCode.F, KeyCombination.CONTROL_DOWN));
|
317 |
|
|
fullScreen.setOnAction(event -> {
|
318 |
|
|
stage.setFullScreen(!stage.isFullScreen());
|
319 |
|
|
});
|
320 |
|
|
this.fullScreen = (Label) fullScreen.getGraphic();
|
321 |
|
|
changeFullScreenMenuItem();
|
322 |
|
|
|
323 |
a5d16f0a
|
horkmi
|
MenuItem close = createMenuItem("Ukončit", getResource("close.png"), new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN));
|
324 |
49fd8648
|
Michal Horký
|
close.setOnAction(event -> {
|
325 |
|
|
Platform.exit();
|
326 |
|
|
});
|
327 |
|
|
|
328 |
|
|
menu.getItems().addAll(fullScreen, new SeparatorMenuItem(), close);
|
329 |
|
|
|
330 |
|
|
MenuBar bar = new MenuBar();
|
331 |
|
|
bar.getMenus().add(menu);
|
332 |
|
|
return bar;
|
333 |
|
|
}
|
334 |
|
|
|
335 |
|
|
private void changeFullScreenMenuItem() {
|
336 |
|
|
fullScreen.setText(stage.isFullScreen() ? "Normální zobrazení" : "Plné zobrazení");
|
337 |
a5d16f0a
|
horkmi
|
fullScreen.setGraphic(new ImageView(stage.isFullScreen() ? getResource("normal.png") : getResource("full.png")));
|
338 |
49fd8648
|
Michal Horký
|
}
|
339 |
|
|
|
340 |
|
|
private MenuItem createMenuItem(String name, String icon, KeyCodeCombination keyCodeComb) {
|
341 |
|
|
Label label = new Label(name);
|
342 |
|
|
label.setGraphicTextGap(10);
|
343 |
|
|
label.getStyleClass().add("menu-graphics");
|
344 |
|
|
label.setMinWidth(175);
|
345 |
|
|
label.setMaxWidth(175);
|
346 |
|
|
if (icon != null)
|
347 |
|
|
label.setGraphic(new ImageView(new Image(icon)));
|
348 |
|
|
|
349 |
|
|
MenuItem menuItem = new MenuItem();
|
350 |
|
|
menuItem.setGraphic(label);
|
351 |
|
|
menuItem.setAccelerator(keyCodeComb);
|
352 |
|
|
return menuItem;
|
353 |
|
|
}
|
354 |
|
|
|
355 |
|
|
private void setOutputLayoutDisabled(boolean disable) {
|
356 |
5ae26965
|
horkmi
|
outputLayout.setDisable(disable);
|
357 |
a5d16f0a
|
horkmi
|
}
|
358 |
|
|
|
359 |
|
|
private String getResource(String path) {
|
360 |
|
|
return Deserializer.class.getResource(path).toString();
|
361 |
|
|
}
|
362 |
|
|
|
363 |
49fd8648
|
Michal Horký
|
@Override
|
364 |
|
|
public void loadingInputFileError() {
|
365 |
|
|
Platform.runLater(()->{
|
366 |
|
|
Report.error("Načítání souboru", null, "Při načítání souboru došlo k chybě.");
|
367 |
|
|
});
|
368 |
|
|
}
|
369 |
|
|
|
370 |
|
|
@Override
|
371 |
5ae26965
|
horkmi
|
public void completed(String html, String json, String loaded) {
|
372 |
|
|
Platform.runLater(() -> {
|
373 |
|
|
String _html = html; String _json = json;
|
374 |
|
|
|
375 |
|
|
boolean showData = html != null && html.length() > 0 && json != null && json.length() > 0;
|
376 |
|
|
|
377 |
|
|
if (!showData && Report.confirm("Výsledek deserializace", null, "Při deserializaci došlo k chybě. Je ale možné, že nejde o serializovaná data. Chcete zobrazit, co bylo načteno?")) {
|
378 |
|
|
_html = loaded.trim();
|
379 |
|
|
_json = loaded.trim();
|
380 |
|
|
showData = true;
|
381 |
|
|
}
|
382 |
|
|
|
383 |
|
|
if (showData) {
|
384 |
|
|
editor.setContent(_html, _json);
|
385 |
|
|
setOutputLayoutDisabled(false);
|
386 |
49fd8648
|
Michal Horký
|
}
|
387 |
|
|
});
|
388 |
03a2d08f
|
Michal Horký
|
}
|
389 |
|
|
|
390 |
|
|
}
|