Explorar el Código

Merge branch 'fix/documenteditor_page' into 'develop'

Merge of fix/documenteditor_page to develop增加版式文件比例缩放,可设置是否启用

See merge request o2oa/o2oa!1157
胡起 hace 5 años
padre
commit
88989894ca

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

@@ -1853,4 +1853,4 @@ o2.widget.AttachmentController.AttachmentMin = new Class({
         this.controller.selectedAttachments.erase(this);
     }
 
-});
+});

+ 11 - 0
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/documenteditor.html

@@ -82,6 +82,17 @@
 		</table>
 		<div id="text{$.pid}allowHistoryScriptArea" style="display: text{($.allowHistory=='s')?'block':'none'}" class="MWFFormulaArea" name="allowHistoryScript" title="允许查看痕迹脚本 (S)"></div>
 
+		<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+			<tr>
+				<td class="editTableTitle">设置缩放:</td>
+				<td class="editTableValue">
+					<input class="editTableRadio" name="isScale" text{($.isScale=='y')?'checked':''} type="radio" value="y"/>是
+					<input class="editTableRadio" name="isScale" text{($.isScale!='y')?'checked':''} type="radio" value="n"/>否
+					<div>用户是否可自定义缩放比例</div>
+				</td>
+			</tr>
+		</table>
+
 		<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
 			<tr>
 				<td class="editTableTitle">全角转换:</td>

+ 5 - 4
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -1520,7 +1520,9 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
         if (layout.mobile) this.doublePageAction.hide();
 
 
+
         this.zoomActionArea =  new Element("div", {"styles": {"float": "right", "margin-right": "10px"}}).inject(this.toolbarNode);
+        if (this.json.isScale !== "y") this.zoomActionArea.hide();
         this.zoomAddAction = new Element("div", {
             "styles": {
                 "float": "right",
@@ -1534,7 +1536,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
                 "margin-left": "5px"
             },
             "text": "+"
-        }).inject(this.toolbarNode);
+        }).inject(this.zoomActionArea);
 
         this.zoomSelectAction = new Element("select", {
             "styles": {
@@ -1549,7 +1551,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
                 "margin-left": "5px"
             },
             "text": "100%"
-        }).inject(this.toolbarNode);
+        }).inject(this.zoomActionArea);
 
         this.zoomSubAction = new Element("div", {
             "styles": {
@@ -1564,7 +1566,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
                 "margin-left": "5px"
             },
             "text": "-"
-        }).inject(this.toolbarNode);
+        }).inject(this.zoomActionArea);
 
 
 
@@ -1626,7 +1628,6 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
             if (v>2) v = 2;
             this.scaleTo(v);
         }.bind(this));
-
     },
     scaleTo: function(scale){
         this._returnScale();