Jairo Llopis
9 years ago
12 changed files with 83 additions and 134 deletions
-
29website_mail_snippet_fixed/README.rst
-
5website_mail_snippet_fixed/__openerp__.py
-
58website_mail_snippet_fixed/i18n/es.po
-
38website_mail_snippet_fixed/static/src/js/vertical_resize.js
-
16website_mail_snippet_fixed/views/assets.xml
-
6website_mail_snippet_fixed/views/snippet_1_col.xml
-
6website_mail_snippet_fixed/views/snippet_2_cols.xml
-
6website_mail_snippet_fixed/views/snippet_3_cols.xml
-
18website_mail_snippet_fixed/views/snippet_hr.xml
-
6website_mail_snippet_fixed/views/snippet_img_text.xml
-
6website_mail_snippet_fixed/views/snippet_text_img.xml
-
23website_mail_snippet_fixed/views/templates.xml
@ -1,38 +0,0 @@ |
|||
/* © 2016 Antiun Ingeniería S.L. - Jairo Llopis |
|||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */
|
|||
|
|||
"use strict"; |
|||
(function ($) { |
|||
var _t = openerp._t, |
|||
prompt = openerp.website.prompt, |
|||
snippet = openerp.website.snippet; |
|||
|
|||
snippet.options.vertical_resize = snippet.Option.extend({ |
|||
start: function () { |
|||
var self = this; |
|||
self._super(); |
|||
return self.$el.find(".js_vertical_resize").click(function(){ |
|||
return self.ask(); |
|||
}); |
|||
}, |
|||
|
|||
ask: function() { |
|||
var self = this; |
|||
return prompt({ |
|||
window_title: _t("Set element height"), |
|||
input: _t("Element height in pixels"), |
|||
}).then(function (answer) { |
|||
return self.resize(answer); |
|||
}); |
|||
}, |
|||
|
|||
resize: function(size) { |
|||
this.$target.css("height", String(size) + "px"); |
|||
|
|||
// Old-school height attribute changed too if needed
|
|||
if (this.$target.attr("height")) { |
|||
this.$target.attr("height", size); |
|||
} |
|||
}, |
|||
}); |
|||
})(jQuery); |
@ -1,16 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<template id="assets_editor" inherit_id="website.assets_editor"> |
|||
<xpath expr="."> |
|||
<script type="text/javascript" |
|||
src="/website_mail_snippet_responsive/static/src/js/vertical_resize.js"/> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue