Преглед изворни кода

Merge remote-tracking branch 'origin/master'

user5 пре 3 година
родитељ
комит
9b1e5cfc8f

+ 4 - 4
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryCompanyList.jsp

@@ -345,17 +345,17 @@
 				,{field:'classification',align:'center', title: '收藏分类',  width:150}
 				,{field:'fileName',align:'center', title: '附件名称',minWidth:200,templet:function(d){
                 		if(2 == d.uploadMode){
-                			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+                			if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
-							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+							if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview( '" + d.url +"',2)\">" + d.fileName + "</a>";

+ 7 - 7
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryList.jsp

@@ -255,9 +255,9 @@
 					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
 					inputForm.attr("action","${ctx}/collectAccessory/collectAccessory/saveGeCollectAccessory");//表单提交成功后,从服务器返回的url在当前tab中展示
 					var $document = iframeWin.contentWindow.document;
-					iframeWin.contentWindow.formSubmit2($document,formId,index,tableId);
-					top.layer.close(index)
-					location.reload();
+					var s=iframeWin.contentWindow.formSubmit2($document,formId,index,tableId);
+					top.layer.close(index);
+					setTimeout(function(){location.reload();},500);
 				},
 				cancel: function(index){
 				},
@@ -427,17 +427,17 @@
 				,{field:'classification',align:'center', title: '收藏分类',  width:150}
 				,{field:'fileName',align:'center', title: '附件名称',minWidth:200,templet:function(d){
                 		if(2 == d.uploadMode){
-                			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+                			if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
-							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+							if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',2)\">" + d.fileName + "</a>";

+ 4 - 4
src/main/webapp/webpage/modules/collectAccessory/collectAccessoryOfficeList.jsp

@@ -346,17 +346,17 @@
 				,{field:'classification',align:'center', title: '收藏分类',  width:150}
 				,{field:'fileName',align:'center', title: '附件名称',minWidth:200,templet:function(d){
                 		if(2 == d.uploadMode){
-                			if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+                			if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.temporaryUrl+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.temporaryUrl +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.temporaryUrl +"',2)\">" + d.fileName + "</a>";
 							}
 						}else{
-							if(d.fileName.indexOf('jpg') != -1 || d.fileName.indexOf('png') != -1 || d.fileName.indexOf('gif') != -1 || d.fileName.indexOf('bmp') != -1 || d.fileName.indexOf('jpeg') != -1){
+							if(d.fileName.toLowerCase().indexOf('jpg') != -1 || d.fileName.toLowerCase().indexOf('png') != -1 || d.fileName.toLowerCase().indexOf('gif') != -1 || d.fileName.toLowerCase().indexOf('bmp') != -1 || d.fileName.toLowerCase().indexOf('jpeg') != -1){
 								return "<img src="+d.url+" width='50' height='50' onclick=\"openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=" + d.url +"','90%','90%')\" alt='"+d.fileName+"'>";
-							}else if(d.fileName.indexOf('pdf') != -1){
+							}else if(d.fileName.toLowerCase().indexOf('pdf') != -1){
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',1)\">" + d.fileName + "</a>";
 							}else{
 								return "<a class=\"attention-info\" title=\"" + d.fileName + "\" href=\"javascript:void(0);\" onclick=\"openPreview('" + d.url +"',2)\">" + d.fileName + "</a>";

+ 4 - 4
src/main/webapp/webpage/modules/projectAccessory/collectAccessoryModify.jsp

@@ -176,12 +176,12 @@
 								<c:choose>
 									<c:when test="${collectAccessoryInfo.uploadMode == 2}">
 										<c:choose>
-											<c:when test="${collectAccessoryInfo.fileName.indexOf('jpg') != -1 || collectAccessoryInfo.fileName.indexOf('png') != -1 || collectAccessoryInfo.fileName.indexOf('gif') != -1 || collectAccessoryInfo.fileName.indexOf('bmp') != -1 || collectAccessoryInfo.fileName.indexOf('jpeg') != -1}">
+											<c:when test="${collectAccessoryInfo.fileName.toLowerCase().indexOf('jpg') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('png') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('gif') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('bmp') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('jpeg') != -1}">
 												<td><img src="${collectAccessoryInfo.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${collectAccessoryInfo.temporaryUrl}','90%','90%')" alt="${collectAccessoryInfo.fileName}">
 											</c:when>
 											<c:otherwise>
 												<c:choose>
-													<c:when test="${collectAccessoryInfo.fileName.indexOf('pdf') != -1}">
+													<c:when test="${collectAccessoryInfo.fileName.toLowerCase().indexOf('pdf') != -1}">
 														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${collectAccessoryInfo.temporaryUrl}',1)">${collectAccessoryInfo.fileName}</a></td>
 													</c:when>
 													<c:otherwise>
@@ -193,12 +193,12 @@
 									</c:when>
 									<c:otherwise>
 										<c:choose>
-											<c:when test="${collectAccessoryInfo.fileName.indexOf('jpg') != -1 || collectAccessoryInfo.fileName.indexOf('png') != -1 || collectAccessoryInfo.fileName.indexOf('gif') != -1 || collectAccessoryInfo.fileName.indexOf('bmp') != -1 || collectAccessoryInfo.fileName.indexOf('jpeg') != -1}">
+											<c:when test="${collectAccessoryInfo.fileName.toLowerCase().indexOf('jpg') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('png') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('gif') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('bmp') != -1 || collectAccessoryInfo.fileName.toLowerCase().indexOf('jpeg') != -1}">
 												<td><img src="${collectAccessoryInfo.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${collectAccessoryInfo.url}','90%','90%')" alt="${collectAccessoryInfo.fileName}"></td>
 											</c:when>
 											<c:otherwise>
 												<c:choose>
-													<c:when test="${collectAccessoryInfo.fileName.indexOf('pdf') != -1}">
+													<c:when test="${collectAccessoryInfo.fileName.toLowerCase().indexOf('pdf') != -1}">
 														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${collectAccessoryInfo.url}',1)">${collectAccessoryInfo.fileName}</a></td>
 													</c:when>
 													<c:otherwise>