Commit 3de8c145 authored by Frank Bergmann's avatar Frank Bergmann

-- minor improvements

parent fb2912b6
...@@ -11,6 +11,14 @@ Ext.onReady(function () { ...@@ -11,6 +11,14 @@ Ext.onReady(function () {
// STORES // STORES
// //
// ////////////////////////////////////////////////
// CHART TYPES
//
<if @chart_type@ eq "column_chart">
var translationProjectFeedbackNonConformityStore = Ext.create('Ext.data.Store', { var translationProjectFeedbackNonConformityStore = Ext.create('Ext.data.Store', {
fields: [ fields: [
{ name: 'first_day_period', type: 'string'}, { name: 'first_day_period', type: 'string'},
...@@ -34,33 +42,6 @@ Ext.onReady(function () { ...@@ -34,33 +42,6 @@ Ext.onReady(function () {
} }
}); });
var translationProjectFeedbackNonConformityProportionStore = Ext.create('Ext.data.Store', {
fields: [
{ name: 'category', type: 'string' },
{ name: 'count', type: 'int'}
],
autoLoad: true,
proxy: {
type: 'rest',
url: '/intranet-reporting/view', // This is the generic ]po[ REST interface
extraParams: {
format: 'json', // Ask for data in JSON format
limit: @diagram_limit@, // Limit the number of returned rows
report_code: '@diagram_report_code@', // The code of the data-source to retreive
start_date: '@start_date@',
end_date: '@end_date@',
period: '@period@'
},
reader: { type: 'json', root: 'data' } // Standard reader: Data are prefixed by "data".
}
});
// ////////////////////////////////////////////////
// CHART TYPES
//
<if @chart_type@ eq "column_chart">
var ticketAgingChart = new Ext.chart.Chart({ var ticketAgingChart = new Ext.chart.Chart({
xtype: 'chart', xtype: 'chart',
width: @diagram_width@, width: @diagram_width@,
...@@ -98,6 +79,14 @@ Ext.onReady(function () { ...@@ -98,6 +79,14 @@ Ext.onReady(function () {
style: { style: {
opacity: 0.80 opacity: 0.80
}, },
label: {
display: 'outside',
'text-anchor': 'middle',
field: ['number_projects', 'number_projects_non_conform'],
renderer: Ext.util.Format.numberRenderer('0'),
// orientation: 'horizontal',
color: '#333'
},
tips: { tips: {
trackMouse: false, trackMouse: false,
width: @diagram_tooltip_width@, width: @diagram_tooltip_width@,
...@@ -112,6 +101,27 @@ Ext.onReady(function () { ...@@ -112,6 +101,27 @@ Ext.onReady(function () {
</if> </if>
<elseif @chart_type@ eq "pie_chart"> <elseif @chart_type@ eq "pie_chart">
var translationProjectFeedbackNonConformityProportionStore = Ext.create('Ext.data.Store', {
fields: [
{ name: 'category', type: 'string' },
{ name: 'count', type: 'int'}
],
autoLoad: true,
proxy: {
type: 'rest',
url: '/intranet-reporting/view', // This is the generic ]po[ REST interface
extraParams: {
format: 'json', // Ask for data in JSON format
limit: @diagram_limit@, // Limit the number of returned rows
report_code: '@diagram_report_code@', // The code of the data-source to retreive
start_date: '@start_date@',
end_date: '@end_date@',
period: '@period@'
},
reader: { type: 'json', root: 'data' } // Standard reader: Data are prefixed by "data".
}
});
chart = new Ext.chart.Chart({ chart = new Ext.chart.Chart({
width: @diagram_width@, width: @diagram_width@,
height: @diagram_height@, height: @diagram_height@,
...@@ -154,6 +164,30 @@ Ext.onReady(function () { ...@@ -154,6 +164,30 @@ Ext.onReady(function () {
</elseif> </elseif>
<elseif @chart_type@ eq "line_chart"> <elseif @chart_type@ eq "line_chart">
var translationProjectFeedbackNonConformityStore = Ext.create('Ext.data.Store', {
fields: [
{ name: 'first_day_period', type: 'string'},
{ name: 'number_projects', type: 'int'},
{ name: 'number_projects_non_conform', type: 'int'},
{ name: 'percentage_non_conform', type: 'int'}
],
autoLoad: true,
proxy: {
type: 'rest',
url: '/intranet-reporting/view', // This is the generic ]po[ REST interface
extraParams: {
format: 'json', // Ask for data in JSON format
limit: @diagram_limit@, // Limit the number of returned rows
report_code: '@diagram_report_code@', // The code of the data-source to retreive
start_date: '@start_date@',
end_date: '@end_date@',
period: '@period@'
},
reader: { type: 'json', root: 'data' } // Standard reader: Data are prefixed by "data".
}
});
chart = new Ext.chart.Chart({ chart = new Ext.chart.Chart({
renderTo: @diagram_id@, renderTo: @diagram_id@,
width: @diagram_width@, width: @diagram_width@,
......
...@@ -67,7 +67,8 @@ if {$single_response_p == "t"} { ...@@ -67,7 +67,8 @@ if {$single_response_p == "t"} {
set button_label "Submit response" set button_label "Submit response"
set edit_previous_response_p "f" set edit_previous_response_p "f"
} else { } else {
set button_label "Modify submited response" # Review label
set button_label "Submit response"
set edit_previous_response_p "t" set edit_previous_response_p "t"
} }
set previous_responses_link "" set previous_responses_link ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment