-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] helpdesk_mgmt: modify JS in order to make it compatible with we…
…bsite
- Loading branch information
Showing
6 changed files
with
90 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ Channels | |
3. Set the name for the channel. | ||
4. You can also Activate or Deactivate channels. | ||
|
||
|image1| | ||
|image0| | ||
|
||
Categories | ||
---------- | ||
|
@@ -66,7 +66,7 @@ Categories | |
3. Set the name for the category. | ||
4. You can also Activate or Deactivate categories. | ||
|
||
|image2| | ||
|image1| | ||
|
||
Stages | ||
------ | ||
|
@@ -83,7 +83,7 @@ Stages | |
8. You can add a description for the stage. | ||
9. You can also Activate or Deactivate stages. | ||
|
||
|image3| | ||
|image2| | ||
|
||
You can also sort the stage sequence if you move up or down the stages | ||
in the list view. | ||
|
@@ -97,7 +97,7 @@ Teams | |
4. Add the teams members. | ||
5. You can also Activate or Deactivate teams. | ||
|
||
|image4| | ||
|image3| | ||
|
||
Tags | ||
---- | ||
|
@@ -109,7 +109,7 @@ Tags | |
4. Set the color index for the tag. | ||
5. You can also Activate or Deactivate tags. | ||
|
||
|image5| | ||
|image4| | ||
|
||
Permissions | ||
----------- | ||
|
@@ -125,11 +125,11 @@ permissions set in Helpdesk. | |
not assigned to any team nor user. | ||
3. *User*: User is able to see all the tickets. | ||
|
||
.. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Channels.PNG | ||
.. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Categories.PNG | ||
.. |image3| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Stages.PNG | ||
.. |image4| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Teams.PNG | ||
.. |image5| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tags.PNG | ||
.. |image0| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Channels.PNG | ||
.. |image1| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Categories.PNG | ||
.. |image2| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Stages.PNG | ||
.. |image3| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Teams.PNG | ||
.. |image4| image:: https://raw.githubusercontent.com/OCA/helpdesk/17.0/helpdesk_mgmt/static/description/Tags.PNG | ||
|
||
Usage | ||
===== | ||
|
@@ -162,11 +162,11 @@ To create a new ticket from the kanban view: | |
Known issues / Roadmap | ||
====================== | ||
|
||
- Add a tour feature similar to what the ``project`` module defines to | ||
discover projects / tasks. | ||
- Update portal tests defined in ``tests/test_portal.py`` to rely on | ||
tour specs (in JS) in order to replicate the navigation behavior of | ||
portal users. | ||
- Add a tour feature similar to what the ``project`` module defines to | ||
discover projects / tasks. | ||
- Update portal tests defined in ``tests/test_portal.py`` to rely on | ||
tour specs (in JS) in order to replicate the navigation behavior of | ||
portal users. | ||
|
||
Bug Tracker | ||
=========== | ||
|
@@ -195,54 +195,54 @@ Authors | |
Contributors | ||
------------ | ||
|
||
- `Domatix <https://www.domatix.com>`__: | ||
- `Domatix <https://www.domatix.com>`__: | ||
|
||
- Carlos Martínez | ||
- Catalin Airimitoaie | ||
- Álvaro López | ||
- Samuel Calvo | ||
- Carlos Martínez | ||
- Catalin Airimitoaie | ||
- Álvaro López | ||
- Samuel Calvo | ||
|
||
- `Adaptive City <https://www.adaptivecity.com>`__: | ||
- `Adaptive City <https://www.adaptivecity.com>`__: | ||
|
||
- Aitor Bouzas | ||
- Aitor Bouzas | ||
|
||
- `SDi Soluciones, S.L. <https://www.sdi.es>`__: | ||
- `SDi Soluciones, S.L. <https://www.sdi.es>`__: | ||
|
||
- Oscar Soto | ||
- Jorge Luis Quinteros | ||
- Oscar Soto | ||
- Jorge Luis Quinteros | ||
|
||
- `C2i Change 2 improve <http://www.c2i.es>`__: | ||
- `C2i Change 2 improve <http://www.c2i.es>`__: | ||
|
||
- Eduardo Magdalena <[email protected]> | ||
- Eduardo Magdalena <[email protected]> | ||
|
||
- `Factor Libre <https://factorlibre.com>`__: | ||
- `Factor Libre <https://factorlibre.com>`__: | ||
|
||
- María Alhambra | ||
- Daniel Cano | ||
- María Alhambra | ||
- Daniel Cano | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Pedro M. Baeza | ||
- Víctor Martínez | ||
- Carolina Fernandez | ||
- Carlos Roca | ||
- Pedro M. Baeza | ||
- Víctor Martínez | ||
- Carolina Fernandez | ||
- Carlos Roca | ||
|
||
- `ID42 Sistemas <https://www.id42.com.br>`__: | ||
- `ID42 Sistemas <https://www.id42.com.br>`__: | ||
|
||
- Marcel Savegnago | ||
- Eduardo Aparício | ||
- Marcel Savegnago | ||
- Eduardo Aparício | ||
|
||
- `Obertix <https://www.obertix.net>`__: | ||
- `Obertix <https://www.obertix.net>`__: | ||
|
||
- Vicent Cubells | ||
- Vicent Cubells | ||
|
||
- `Solvos <https://www.solvos.es>`__: | ||
- `Solvos <https://www.solvos.es>`__: | ||
|
||
- David Alonso | ||
- David Alonso | ||
|
||
- `XCG Consulting <https://xcg-consulting.fr>`__: | ||
- `XCG Consulting <https://xcg-consulting.fr>`__: | ||
|
||
- Houzéfa Abbasbhay | ||
- Houzéfa Abbasbhay | ||
|
||
Maintainers | ||
----------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// /** @odoo-module **/ | ||
import {_t} from "@web/core/l10n/translation"; | ||
import {humanNumber} from "@web/core/utils/numbers"; | ||
import publicWidget from "@web/legacy/js/public/public_widget"; | ||
|
||
publicWidget.registry.NewTicket = publicWidget.Widget.extend({ | ||
selector: "form[action='/submitted/ticket']", | ||
events: { | ||
'change input[name="attachment"]': "_onChangeAttachment", | ||
}, | ||
_onChangeAttachment(ev) { | ||
ev.preventDefault(); | ||
const attachment_input = document.getElementById("attachment"); | ||
const information_input = document.getElementById("attachment_information"); | ||
information_input.style.display = "none"; | ||
const max_upload_size = parseInt( | ||
attachment_input.getAttribute("max_upload_size"), | ||
10 | ||
); | ||
const dt = new DataTransfer(); | ||
for (const file of attachment_input.files) { | ||
if (file.size > max_upload_size) { | ||
information_input.textContent = _t( | ||
"The selected file (%sB) is over the maximum allowed file size (%sB).", | ||
humanNumber(file.size), | ||
humanNumber(max_upload_size) | ||
); | ||
information_input.style.display = ""; | ||
} else { | ||
dt.items.add(file); | ||
} | ||
} | ||
attachment_input.files = dt.files; | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters