diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-09-21 10:43:59 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-09-21 10:43:59 +0200 |
| commit | b406fde2cab9ccb57a526c9e355fa24fa1204a2a (patch) | |
| tree | 226de678bd2194e5d1c4b415a6229410c9b98c0e /addons/pad/static/src | |
| parent | cb806332be3168238dfe27c02b3c89ad99f44329 (diff) | |
| parent | bc8250b428d41aacd84d8d829e1a4e578a96cd69 (diff) | |
[MERGE] from trunk
bzr revid: chm@openerp.com-20120921084359-tc326p031x9ll77h
Diffstat (limited to 'addons/pad/static/src')
| -rw-r--r-- | addons/pad/static/src/css/etherpad.css | 33 | ||||
| -rw-r--r-- | addons/pad/static/src/js/pad.js | 14 | ||||
| -rw-r--r-- | addons/pad/static/src/xml/pad.xml | 4 |
3 files changed, 44 insertions, 7 deletions
diff --git a/addons/pad/static/src/css/etherpad.css b/addons/pad/static/src/css/etherpad.css index 8ea7972071e..bd73af6c2cd 100644 --- a/addons/pad/static/src/css/etherpad.css +++ b/addons/pad/static/src/css/etherpad.css @@ -1,7 +1,12 @@ .oe_pad_head { + box-sizing: border-box; width: 100%; display: block; padding: 4px; + text-align: right; +} +.oe_pad_head .oe_pad_switch { + } .oe_pad_readonly { @@ -13,14 +18,38 @@ position: fixed; top: 0px; left: 0px; - width: 100%; - height: 100%; + right: 0px; + bottom: 0px; background-color: white; + margin:0; + padding:0; + border:none; z-index: 1000; } +.oe_pad_content { + border: solid 1px #c4c4c4; + height: 150px; + -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.1); + -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.1); + -ms-box-shadow: 0 5px 10px rgba(0,0,0,0.1); + -o-box-shadow: 0 5px 10px rgba(0,0,0,0.1); + box-shadow: 0 5px 10px rgba(0,0,0,0.1); +} + +.oe_pad_content > p { + text-align: center; + opacity: 0.75; +} + .oe_pad_fullscreen .oe_pad_content { height: 100%; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -ms-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; } .etherpad_readonly ul, .etherpad_readonly ol { diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index b7c13ba1b89..e598ecca4f5 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -16,10 +16,17 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({ var self = this; var _super = self._super; _super.apply(self,[val]); + if (val === false || val === "") { - self.field_manager.dataset.call('pad_generate_url').then(function(r) { - _super.apply(self,[r]); - self.render_value(); + self.field_manager.dataset.call('pad_generate_url',{context:{ + model: self.field_manager.model, + field_name: self.name, + object_id: self.field_manager.datarecord.id + }}).then(function(data) { + if(data&&data.url){ + _super.apply(self,[data.url]); + self.render_value(); + } }); } else { self.render_value(); @@ -27,7 +34,6 @@ instance.web.form.FieldPad = instance.web.form.AbstractField.extend({ this._dirty_flag = true; }, render_value: function() { - console.log("display"); var self = this; var value = this.get('value'); diff --git a/addons/pad/static/src/xml/pad.xml b/addons/pad/static/src/xml/pad.xml index ce79df52684..911655b6b89 100644 --- a/addons/pad/static/src/xml/pad.xml +++ b/addons/pad/static/src/xml/pad.xml @@ -5,12 +5,14 @@ <t t-name="FieldPad"> <div class="oe_form_field_text oe_pad"> <div class="oe_pad_head"> - <span class="oe_pad_switch">Fullscreen</span> + <button class="oe_pad_switch oe_button">Fullscreen</button> </div> <div class="oe_pad_content"></div> </div> </t> <t t-name="FieldPad.unconfigured"> + <p> You must configure the etherpad through the menu Setting > Companies > Companies, in the configuration tab of your company.<br/> + </p> </t> </templates> |
