Sfoglia il codice sorgente

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!1951
胡起 5 anni fa
parent
commit
f0639aa099

+ 1 - 0
o2web/source/o2_core/o2/widget/AttachmentController.js

@@ -1,4 +1,5 @@
 o2.widget = o2.widget || {};
+if( !o2.widget.UUID )o2.require("o2.widget.UUID", null, false);
 o2.widget.AttachmentController = o2.widget.ATTER  = new Class({
     Extends: o2.widget.Common,
 	Implements: [Options, Events],

+ 2 - 1
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js

@@ -129,7 +129,8 @@ MWF.xDesktop.Actions.RestActions = new Class({
             if(file){
                 this.transferComplete(e, xhr, messageItem, currentDate, file);
             }
-        }.bind(this), false);        xhr.upload.addEventListener("loadstart", function(e){this.transferStart(e, xhr, messageItem);}.bind(this), false);
+        }.bind(this), false);
+        xhr.upload.addEventListener("loadstart", function(e){this.transferStart(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("error", function(e){this.transferFailed(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("abort", function(e){this.transferCanceled(e, xhr, messageItem);}.bind(this), false);
         xhr.upload.addEventListener("timeout", function(e){this.transferCanceled(e, xhr, messageItem);}.bind(this), false);

+ 2 - 1
o2web/source/x_component_Forum/Attachment.js

@@ -89,12 +89,13 @@ MWF.xApplication.Forum.Attachment = new Class({
                 this.actions.getAttachment(aid, this.options.documentId, function (json) {
                     json = this.transportData(json);
                     if (json.data) {
-                        this.attachmentController.addAttachment(json.data);
+                        this.attachmentController.addAttachment(json.data, o.messageId);
                         //this.attachmentList.push(json.data);
                     }
                     this.attachmentController.checkActions();
 
                     this.fireEvent("upload", [json.data]);
+                    this.fireEvent("change");
                 }.bind(this))
             }
             this.attachmentController.checkActions();

+ 7 - 15
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -2210,28 +2210,20 @@ debugger;
                     }.bind(this));
                     e.data.dataValue = tmp.get("html");
                     tmp.destroy();
+
+                    this.fireEvent("paste");
+                }.bind(this) );
+
+                this.filetextEditor.on( 'afterPaste', function( e ) {
+                    this.resetNodeSize();
+                    this.fireEvent("afterPaste");
                 }.bind(this) );
 
 
                 if (this.json.textIndent!=="n"){
-                    // this.filetextEditor.addCommand( 'textIndent_P', {
-                    //     exec: function( editor ) {
-                    //         debugger;
-                    //         editor.insertHtml("<br><div>  </div>");
-                    //     }
-                    // } );
-                    // this.filetextEditor.setKeystroke( CKEDITOR.CTRL + 13, 'textIndent_P' );
                     this.layout_filetext.addEvent("keyup", function(ev){
                         if (ev.code==13) this.filetextEditor.insertText("  ");
                     }.bind(this));
-                    //
-                    // this.filetextEditor.on("key", function(e){
-                    //     if (e.data.keyCode==13){
-                    //         e.editor.insertText("  ");
-                    //         //e.cancel();
-                    //     }
-                    // }.bind(this));
-
                 }
                 if (this.json.fullWidth!=="n"){
                     this.filetextEditor.addCommand( 'insertHalfSpace', {