This commit is contained in:
@@ -31,15 +31,22 @@
|
||||
Helpers
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="test" v-if="reportData != null">
|
||||
{{ $ay.t("ReportEditorTestRun") }}
|
||||
</v-btn>
|
||||
|
||||
<v-btn value="rawData" v-if="reportData != null">
|
||||
{{ $ay.t("ReportEditorData") }}
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
<v-col cols="12" v-show="showEditor">
|
||||
<v-col cols="12" v-show="view == 'edit'">
|
||||
<div id="editContainer"></div>
|
||||
</v-col>
|
||||
<v-col cols="12" v-show="activeTab == 'properties'">
|
||||
<v-col cols="12" v-show="view == 'test'">
|
||||
<div id="testContainer"></div>
|
||||
</v-col>
|
||||
<v-col cols="12" v-show="view == 'properties'">
|
||||
<v-form ref="form">
|
||||
<v-row>
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
@@ -139,7 +146,7 @@ decision: render here or at server in designer for preview of report?
|
||||
However, when a user wants to quickly test a template out it would be better to do it locally.
|
||||
hmm..
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
working widget template
|
||||
@@ -248,7 +255,7 @@ export default {
|
||||
vm.formState.dirty = true;
|
||||
});
|
||||
|
||||
vm.showEditor = false;
|
||||
vm.view = "properties";
|
||||
|
||||
//---------------
|
||||
|
||||
@@ -288,7 +295,7 @@ export default {
|
||||
editAreaHeight: 300,
|
||||
activeTab: "properties",
|
||||
lastTab: "properties",
|
||||
showEditor: true,
|
||||
view: "edit", //"edit","properties","test"
|
||||
editData: {
|
||||
template: {
|
||||
model: null,
|
||||
@@ -401,6 +408,9 @@ Handlebars.registerHelper('loud', function (aString) {
|
||||
case "properties":
|
||||
//no state to save here
|
||||
break;
|
||||
case "testrun":
|
||||
//no state to save here
|
||||
break;
|
||||
case "template":
|
||||
vm.editData.template.state = currentState;
|
||||
break;
|
||||
@@ -421,41 +431,44 @@ Handlebars.registerHelper('loud', function (aString) {
|
||||
//set new view stuff
|
||||
switch (vm.activeTab) {
|
||||
case "properties":
|
||||
vm.showEditor = false;
|
||||
vm.view = "properties";
|
||||
break;
|
||||
case "test":
|
||||
vm.view = "test";
|
||||
break;
|
||||
case "template":
|
||||
editor.setModel(vm.editData.template.model);
|
||||
editor.restoreViewState(vm.editData.template.state);
|
||||
editor.updateOptions({ readOnly: false });
|
||||
vm.showEditor = true;
|
||||
vm.view = "edit";
|
||||
editor.focus();
|
||||
break;
|
||||
case "style":
|
||||
editor.setModel(vm.editData.style.model);
|
||||
editor.restoreViewState(vm.editData.style.state);
|
||||
editor.updateOptions({ readOnly: false });
|
||||
vm.showEditor = true;
|
||||
vm.view = "edit";
|
||||
editor.focus();
|
||||
break;
|
||||
case "jsPrerender":
|
||||
editor.setModel(vm.editData.jsPrerender.model);
|
||||
editor.restoreViewState(vm.editData.jsPrerender.state);
|
||||
editor.updateOptions({ readOnly: false });
|
||||
vm.showEditor = true;
|
||||
vm.view = "edit";
|
||||
editor.focus();
|
||||
break;
|
||||
case "jsHelpers":
|
||||
editor.setModel(vm.editData.jsHelpers.model);
|
||||
editor.restoreViewState(vm.editData.jsHelpers.state);
|
||||
editor.updateOptions({ readOnly: false });
|
||||
vm.showEditor = true;
|
||||
vm.view = "edit";
|
||||
editor.focus();
|
||||
break;
|
||||
case "rawData":
|
||||
editor.setModel(vm.editData.rawData.model);
|
||||
editor.restoreViewState(vm.editData.rawData.state);
|
||||
editor.updateOptions({ readOnly: true });
|
||||
vm.showEditor = true;
|
||||
vm.view = "edit";
|
||||
editor.focus();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user