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