Tejas Tank (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-pad-project-defaultvalue-tta into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-pad-project-defaultvalue-tta/+merge/128250

Hello,

Improvement with etherpad.

Fixed following issues.

# Fixd icon issue when etherpad content load with page view.

# project task create new task with blank etherpad[No welcome message]. 


Thanks,
Tejas - TTA
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-pad-project-defaultvalue-tta/+merge/128250
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-pad-project-defaultvalue-tta.
=== modified file 'pad/pad.py'
--- pad/pad.py	2012-09-20 12:06:16 +0000
+++ pad/pad.py	2012-10-05 13:43:28 +0000
@@ -49,7 +49,11 @@
                     myPad.setText(path, html2plaintext(record[real_field]))
                     #Etherpad for html not functional
                     #myPad.setHTML(path, record[real_field])
-
+        elif "field_name" in context and "model" in context and "field_value" in context:
+            myPad = EtherpadLiteClient( pad["key"], pad["server"]+'/api')
+            myPad.createPad(path)
+            myPad.setText(path, context.get("field_value"))
+            
         return {
             "server": pad["server"],
             "path": path,

=== modified file 'pad/static/src/js/pad.js'
--- pad/static/src/js/pad.js	2012-09-25 13:55:57 +0000
+++ pad/static/src/js/pad.js	2012-10-05 13:43:28 +0000
@@ -38,7 +38,10 @@
                 }else{
                     this.content = '<div class="oe_pad_loading">... Loading pad ...</div>';
                     $.get(value+'/export/html').success(function(data){
-                        self.$('.oe_pad_content').html('<div class="oe_pad_readonly">'+data+'<div>');
+                        var iframe = self.$('.oe_pad_content');
+                        iframe.contents().find('html').html(data);
+                        var iframeheight = iframe.contents().find('html')[0].offsetHeight;
+                        iframe[0].style.height = iframeheight + "px";                        
                     }).error(function(){
                         self.$('.oe_pad_content').text('Unable to load pad');
                     });

=== modified file 'pad/static/src/xml/pad.xml'
--- pad/static/src/xml/pad.xml	2012-09-24 13:46:00 +0000
+++ pad/static/src/xml/pad.xml	2012-10-05 13:43:28 +0000
@@ -16,8 +16,7 @@
         <t t-if="widget.configured">
             <t t-if="widget.get('effective_readonly')">
                 <div class="oe_form_field_text oe_pad oe_configured">
-                    <div class="oe_pad_content etherpad_readonly">
-                    </div>
+                    <iframe src="about:blank" class="oe_pad_content etherpad_readonly" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
                 </div>
             </t>
 

=== modified file 'pad_project/project_task.py'
--- pad_project/project_task.py	2012-08-29 12:38:33 +0000
+++ pad_project/project_task.py	2012-10-05 13:43:28 +0000
@@ -8,3 +8,7 @@
     _columns = {
         'description_pad': fields.char('Description PAD', pad_content_field='description')
     }
+    
+    def pad_generate_url(self, cr, uid, context=None):        
+        context.update({'field_name': 'description_pad','field_value': ''})
+        return super(task, self).pad_generate_url(cr, uid, context=context)    

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to