命令行重新链接,并自动聚焦
This commit is contained in:
parent
90f4d93e44
commit
a59393db0e
|
|
@ -2,9 +2,9 @@
|
|||
<li id="codetab_nav_1" class="blacktab_hover" onclick="HoverLi_new(1);">
|
||||
<a href="javascript:void(0);" class="tab_type tab_color" >代码</a>
|
||||
</li>
|
||||
<li id="codetab_nav_2" data-tab="2" class="add-webssh">
|
||||
<li id="codetab_nav_2" data-tab="2" class="add-webssh" onclick="LoadingWebssh(2);">
|
||||
<% if @myshixun.shixun.try(:webssh) %>
|
||||
<a href="javascript:void(0);" class="tab_type tab_color" >命令行</a>
|
||||
<a href="javascript:void(0);" class="tab_type tab_color">命令行</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="codetab_nav_add" class="undis c_white " style="padding-left:10px;">
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
if($(".add-webssh").length == 5){
|
||||
$(this).hide();
|
||||
}
|
||||
LoadingWebssh();
|
||||
LoadingWebssh(H);
|
||||
$('#blacktab_nav').find("li").click(function(){
|
||||
if($(this).attr("id")=="codetab_nav_"+H+""){
|
||||
HoverLi_new(H);
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
function LoadingWebssh(){
|
||||
function LoadingWebssh(H){
|
||||
$.ajax({
|
||||
url: "<%= open_webssh_myshixun_path(@myshixun) %>",
|
||||
success: function(data){
|
||||
|
|
@ -128,7 +128,8 @@
|
|||
// 测试版
|
||||
var html = "<iframe src='<%= Redmine::Configuration['tomcat_webssh'] %>/?Host=" + data.host + "&Port=" + data.port + "&Username=" + data.username + "&Password=" + data.password + "&Gameid=" + data.game_id + "&Rows=" + rows + "'" + " style='width:100%;border:0;' scrolling='no' class='game_webssh'></iframe><div class='-brother undis'></div>";
|
||||
// 本地版
|
||||
var html_local ="<iframe src='http://127.0.0.1:9527?Host=106.75.96.108&Port=40054&Username=root&Password=123123&Gameid=" +data.game_id + "&Rows=" + rows + "'" + " style='width:100%;border:0;' scrolling='no' class='game_webssh'></iframe><div class='-brother undis'></div>";
|
||||
var html_local ="<iframe src='http://127.0.0.1:9527?Host=106.75.96.108&Port=40054&Username=root&Password=123123&Gameid=" +data.game_id + "&Rows=" + rows + "'" + " style='width:100%;border:0;' scrolling='no' class='game_webssh'></iframe><div class='undis'></div>";
|
||||
console.log(html);
|
||||
$("#codetab_con_"+H).html(html);
|
||||
$(".game_webssh").css("min-height", h);
|
||||
$(".game_webssh").css("max-height", h);
|
||||
|
|
|
|||
Loading…
Reference in New Issue