Before this commit, images displayed on survey question answers were small and hard to read, and nothing existed in order to zoom on them properly. AFTER THIS COMMIT Backend: A new field value_image_filename is added to store the names of the image fields. They are seen when editing an answer (line). The max_height and max_width of the images are raised to 1024 px on their field definition in survey.question.answer to compromise between image resolution and space, and in order to be able to zoom on them and still see details Survey: A hovering frame is visible on the images, as well as a zoom in cursor, to indicate we can click on them to zoom in. The rest of the answer frame is the selection area. Clicking anywhere on the modal closes it. Until then, a pointer cursor hints the feature. A new widget SurveyImageZoomer is added. Once the user has clicked on a choice image, a transparent modal is opened on the whole screen. This is thought for all size devices : it can be closed by clicking anywhere, or the cross button, or ESC key. It will always be destroyed. Also, for small width screens, we do not take the whole height but leave bands over and below to indicate the mobile users can leave by clicking out. The image will be displayed in the foreground, zooming on small images by default, by setting a min width depending on the screen width. We also avoid using a zoom too large to avoid very low resolution. The widget allows zooming as long as the image stays in the frame. The user can zoom both with the mouse scrolling and + and - buttons, sized to allow medium screen (tablets) to press them accurately. All keys are disabled but the 'ESC' one when the Zoomer is open to avoid (undesired) survey navigation. Task-2566584 closes odoo/odoo#73718 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
105 lines
4.3 KiB
Python
105 lines
4.3 KiB
Python
# -*- encoding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
{
|
|
'name': 'Surveys',
|
|
'version': '3.5',
|
|
'category': 'Marketing/Surveys',
|
|
'description': """
|
|
Create beautiful surveys and visualize answers
|
|
==============================================
|
|
|
|
It depends on the answers or reviews of some questions by different users. A
|
|
survey may have multiple pages. Each page may contain multiple questions and
|
|
each question may have multiple answers. Different users may give different
|
|
answers of question and according to that survey is done. Partners are also
|
|
sent mails with personal token for the invitation of the survey.
|
|
""",
|
|
'summary': 'Send your surveys or share them live.',
|
|
'website': 'https://www.odoo.com/app/surveys',
|
|
'depends': [
|
|
'auth_signup',
|
|
'http_routing',
|
|
'mail',
|
|
'web_tour',
|
|
'gamification'],
|
|
'data': [
|
|
'views/survey_report_templates.xml',
|
|
'views/survey_reports.xml',
|
|
'data/mail_template_data.xml',
|
|
'security/survey_security.xml',
|
|
'security/ir.model.access.csv',
|
|
'views/survey_menus.xml',
|
|
'views/survey_survey_views.xml',
|
|
'views/survey_user_views.xml',
|
|
'views/survey_question_views.xml',
|
|
'views/survey_templates.xml',
|
|
'views/survey_templates_management.xml',
|
|
'views/survey_templates_print.xml',
|
|
'views/survey_templates_statistics.xml',
|
|
'views/survey_templates_user_input_session.xml',
|
|
'views/gamification_badge_views.xml',
|
|
'wizard/survey_invite_views.xml',
|
|
'views/res_partner_views.xml',
|
|
],
|
|
'demo': [
|
|
'data/gamification_badge_demo.xml',
|
|
'data/res_users_demo.xml',
|
|
'data/survey_demo_feedback.xml',
|
|
'data/survey_demo_feedback_user_input.xml',
|
|
'data/survey_demo_feedback_user_input_line.xml',
|
|
'data/survey_demo_certification.xml',
|
|
'data/survey_demo_certification_user_input.xml',
|
|
'data/survey_demo_certification_user_input_line.xml',
|
|
'data/survey_demo_quiz.xml',
|
|
'data/survey_demo_quiz_user_input.xml',
|
|
'data/survey_demo_quiz_user_input_line.xml',
|
|
'data/survey_demo_conditional.xml',
|
|
],
|
|
'installable': True,
|
|
'application': True,
|
|
'sequence': 220,
|
|
'assets': {
|
|
'survey.survey_assets': [
|
|
'web/static/lib/Chart/Chart.js',
|
|
'survey/static/src/js/survey_image_zoomer.js',
|
|
'survey/static/src/js/survey_quick_access.js',
|
|
'survey/static/src/js/survey_timer.js',
|
|
'survey/static/src/js/survey_breadcrumb.js',
|
|
'survey/static/src/js/survey_form.js',
|
|
'survey/static/src/js/survey_preload_image_mixin.js',
|
|
'survey/static/src/js/survey_print.js',
|
|
'survey/static/src/js/survey_result.js',
|
|
('include', 'web._assets_helpers'),
|
|
('include', 'web._assets_frontend_helpers'),
|
|
'web/static/src/libs/bootstrap/pre_variables.scss',
|
|
'web/static/lib/bootstrap/scss/_variables.scss',
|
|
'survey/static/src/scss/survey_templates_form.scss',
|
|
'survey/static/src/scss/survey_templates_results.scss',
|
|
],
|
|
'survey.survey_user_input_session_assets': [
|
|
'survey/static/src/js/libs/chartjs-plugin-datalabels.min.js',
|
|
'survey/static/src/js/survey_session_colors.js',
|
|
'survey/static/src/js/survey_session_chart.js',
|
|
'survey/static/src/js/survey_session_text_answers.js',
|
|
'survey/static/src/js/survey_session_leaderboard.js',
|
|
'survey/static/src/js/survey_session_manage.js',
|
|
],
|
|
'web.report_assets_common': [
|
|
'survey/static/src/scss/survey_reports.scss',
|
|
],
|
|
'web.assets_backend': [
|
|
'survey/static/src/js/fields_section_one2many.js',
|
|
'survey/static/src/js/fields_form_page_description.js',
|
|
'survey/static/src/js/survey_renderers.js',
|
|
'survey/static/src/js/survey_views.js',
|
|
'survey/static/src/scss/survey_survey_views.scss',
|
|
'survey/static/src/scss/survey_question_views.scss',
|
|
'survey/static/src/scss/survey_templates_results.scss',
|
|
],
|
|
'web.assets_tests': [
|
|
'survey/static/tests/**/*',
|
|
],
|
|
},
|
|
'license': 'LGPL-3',
|
|
}
|