Mathias Markl 6 years ago
parent
commit
b038f12555
  1. 6
      muk_web_preview_vector/README.md
  2. 2
      muk_web_preview_vector/__init__.py
  3. 11
      muk_web_preview_vector/__manifest__.py
  4. 6
      muk_web_preview_vector/doc/changelog.rst
  5. 49
      muk_web_preview_vector/doc/index.rst
  6. 10
      muk_web_preview_vector/static/src/js/preview_handler.js
  7. 2
      muk_web_utils/__manifest__.py
  8. 0
      muk_web_utils/static/lib/svg-pan-zoom/svg-pan-zoom.js

6
muk_web_preview_vector/README.md

@ -1,6 +0,0 @@
# MuK Preview Vector
Extendes the Preview Dialog to support vector graphics.
Currently the following vector graphic extensions are supported:
* Scalable Vector Graphics (*.svg, image/svg+xml)

2
muk_web_preview_vector/__init__.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH

11
muk_web_preview_vector/__manifest__.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH
@ -22,12 +20,7 @@
{
"name": "MuK Preview Vector",
"summary": """Vector Preview""",
"description": """
Extendes the Preview Dialog to support vector graphics.
Currently the following vector graphic extensions are supported:
- Scalable Vector Graphics (*.svg, image/svg+xml)
""",
"version": "11.0.1.1.0",
"version": "11.0.2.0.0",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",
@ -41,8 +34,6 @@
"data": [
"template/assets.xml",
],
"demo": [
],
"qweb": [
"static/src/xml/*.xml",
],

6
muk_web_preview_vector/doc/changelog.rst

@ -1,9 +1,13 @@
`2.0.0`
-------
- Migrated to Python 3
`1.1.0`
-------
- Lazy load javascript
`1.0.0`
-------

49
muk_web_preview_vector/doc/index.rst

@ -0,0 +1,49 @@
==================
MuK Preview Vector
==================
Extendes the Preview Dialog to support vector graphics. Currently the following
extensions are supported:
* Scalable Vector Graphics (\*.svg, image/svg+xml)
Installation
============
To install this module, you need to:
Download the module and add it to your Odoo addons folder. Afterward, log on to
your Odoo server and go to the Apps menu. Trigger the debug modus and update the
list by clicking on the "Update Apps List" link. Now install the module by
clicking on the install button.
Configuration
=============
No additional configuration is needed to use this module.
Usage
=============
Go to a binary that contains a vector file and open the preview dialog to view
the preview.
Credits
=======
Contributors
------------
* Mathias Markl <mathias.markl@mukit.at>
Author & Maintainer
-------------------
This module is maintained by the `MuK IT GmbH <https://www.mukit.at/>`_.
MuK IT is an Austrian company specialized in customizing and extending Odoo.
We develop custom solutions for your individual needs to help you focus on
your strength and expertise to grow your business.
If you want to get in touch please contact us via mail
(sale@mukit.at) or visit our website (https://mukit.at).

10
muk_web_preview_vector/static/src/js/preview_handler.js

@ -32,7 +32,7 @@ var VectorHandler = PreviewHandler.BaseHandler.extend({
cssLibs: [
],
jsLibs: [
'/muk_web_preview_vector/static/lib/svg-pan-zoom/svg-pan-zoom.js',
'/muk_web_utils/static/lib/svg-pan-zoom/svg-pan-zoom.js',
],
checkExtension: function(extension) {
return ['.svg', 'svg'].includes(extension);
@ -63,13 +63,13 @@ var VectorHandler = PreviewHandler.BaseHandler.extend({
panFactor: 100,
});
$content.find('.zoom-plus').click(function(){
svgPanZoom.zoomIn()
svgPanZoom.zoomIn();
});
$content.find('.zoom-minus').click(function(){
svgPanZoom.zoomOut()
svgPanZoom.zoomOut();
});
$content.find('.zoom-reset').click(function(){
svgPanZoom.reset()
svgPanZoom.reset();
});
},
error: function(request, status, error) {
@ -84,6 +84,6 @@ var VectorHandler = PreviewHandler.BaseHandler.extend({
return {
VectorHandler: VectorHandler,
}
};
});

2
muk_web_utils/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Web Utils",
"summary": """Utility Features""",
"version": "11.0.2.0.6",
"version": "11.0.2.0.7",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",

0
muk_web_preview_vector/static/lib/svg-pan-zoom/svg-pan-zoom.js → muk_web_utils/static/lib/svg-pan-zoom/svg-pan-zoom.js

Loading…
Cancel
Save