Parcourir la source

修复更多操作部分浏览器不兼容情况

RuoYi il y a 5 ans
Parent
commit
dcbc77b403

+ 15 - 18
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -260,24 +260,21 @@ var table = {
             	// 浮动提示框特效
             	$(".table [data-toggle='tooltip']").tooltip();
             	
-            	// 气泡弹出框特效
-            	$('.table [data-toggle="popover"]').each(function() {
-            	    $(this).popover({ trigger: "manual", html: true, animation: false, container: "body", placement: "left" 
-            	    }).on("mouseenter",
-                        function() {
-	            	        var _this = this;
-	            	        $(this).popover("show");
-	            	        $(".popover").on("mouseleave", function() {
-                                $(_this).popover('hide'); 
-	            	        });
-            	    }).on("mouseleave",
-                        function() {
-            	            var _this = this;
-	            	        setTimeout(function() {
-		            	        if (!$(".popover:hover").length)
-			            	        $(_this).popover("hide");
-            	        }, 100);
-            	    });
+            	// 气泡弹出框特效(移到元素时)
+            	$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
+            		var _this = this;
+            		$(this).popover("show");
+            		$(".popover").on("mouseleave", function() {
+            			$(_this).popover('hide');
+            		});
+            	})
+
+            	// 气泡弹出框特效(离开元素时)
+            	$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
+            		var _this = this;
+            		setTimeout(function() {
+            			if (!$(".popover:hover").length) $(_this).popover("hide");
+            		}, 100);
             	});
             },
             // 表格销毁

+ 1 - 1
ruoyi-admin/src/main/resources/templates/index.html

@@ -147,7 +147,7 @@
 							</ul>
                         </li>
                         <li>
-	                        <a href="#"><i class="fa fa-sitemap"></i> <span class="nav-label">四层菜单 </span><span class="fa arrow"></span></a>
+	                        <a href="#"><i class="fa fa-sitemap"></i>四层菜单<span class="fa arrow"></span></a>
 	                        <ul class="nav nav-second-level collapse">
 	                            <li>
 	                                <a href="#" id="damian">三级菜单1<span class="fa arrow"></span></a>

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/role/role.html

@@ -118,7 +118,7 @@
 		                var more = [];
 		                more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authDataScope(" + row.roleId + ")'><i class='fa fa-check-square-o'></i>数据权限</a> ");
 		                more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authUser(" + row.roleId + ")'><i class='fa fa-user'></i>分配用户</a>");
-		                actions.push('<a class="btn btn-info btn-xs" role="button" data-toggle="popover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
+		                actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
 		                return actions.join('');
 		            }
 		        }]

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/user/user.html

@@ -169,7 +169,7 @@
 		                var more = [];
 		                more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> ");
 		                more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authRole(" + row.userId + ")'><i class='fa fa-check-square-o'></i>分配角色</a>");
-		                actions.push('<a class="btn btn-info btn-xs" role="button" data-toggle="popover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
+		                actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
 		                return actions.join('');
 		            }
 		        }]

+ 1 - 1
ruoyi-quartz/src/main/resources/templates/monitor/job/job.html

@@ -130,7 +130,7 @@
 		                more.push("<a class='btn btn-default btn-xs " + statusFlag + "' href='javascript:void(0)' onclick='run(" + row.jobId + ")'><i class='fa fa-play-circle-o'></i> 执行一次</a> ");
 		                more.push("<a class='btn btn-default btn-xs " + detailFlag + "' href='javascript:void(0)' onclick='$.operate.detail(" + row.jobId + ")'><i class='fa fa-search'></i>任务详细</a> ");
 		                more.push("<a class='btn btn-default btn-xs " + detailFlag + "' href='javascript:void(0)' onclick='jobLog(" + row.jobId + ")'><i class='fa fa-list'></i>调度日志</a>");
-		                actions.push('<a class="btn btn-info btn-xs" role="button" data-toggle="popover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
+		                actions.push('<a class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
 		                return actions.join('');
 		            }
 		        }]