codemirror高度自动填充
This commit is contained in:
parent
1b7a973b73
commit
05dbce6fa9
|
|
@ -38,8 +38,7 @@
|
|||
// $("#challenge-answer-edit-small" ).nextAll(".CodeMirror").css("line-height", 1.2);
|
||||
$(document).ready(function(){
|
||||
// 设置codemirror的高度/宽度自适应
|
||||
var code_height = $("#new_repository_contents").height() - $("#top_repository").height() - 10;
|
||||
editor_CodeMirror.setSize("auto",code_height+"px");
|
||||
editor_CodeMirror.setSize("auto","auto");
|
||||
editor_CodeMirror.refresh();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -66,9 +66,7 @@
|
|||
<div class="split-panel -fit -vertical">
|
||||
<div class="-layout -stretch -fit -vertical">
|
||||
<div class="split-panel--first -layout -vertical -flex -relative -bg-black -flex-basic60" id="games_repository_contents">
|
||||
<div class="task-source-view -fit" id="new_repository_contents">
|
||||
<%= render :partial => 'games/repository' %>
|
||||
</div>
|
||||
<%= render :partial => 'games/repository' %>
|
||||
</div>
|
||||
<div class="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic40" id="games_valuation_contents">
|
||||
<%= render :partial => 'games/game_results' %>
|
||||
|
|
|
|||
|
|
@ -3,19 +3,25 @@
|
|||
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
|
||||
</h3>
|
||||
<div class="fr mt5 -horizontal">
|
||||
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-arrows-alt font-16 mr5"></i></a>
|
||||
<a href="javascript:void(0);" onclick="repository_extend_and_zoom();" id="extend_and_zoom"><i class="fa fa-arrows-alt font-16"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-editor-inner">
|
||||
<% if params[:action] == "entry" || @file_open %>
|
||||
<div id="file_entry_content">
|
||||
<%= render :partial => 'games/file_edit_form', :locals => {:filename => @path, :content => @content} %>
|
||||
<div class="-flex -relative">
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll">
|
||||
<div class="content-editor-inner">
|
||||
<% if params[:action] == "entry" || @file_open %>
|
||||
<div id="file_entry_content">
|
||||
<%= render :partial => 'games/file_edit_form', :locals => {:filename => @path, :content => @content} %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% unless @entries.blank? %>
|
||||
<%= render :partial => 'tree', :locals => { :extend => false}%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% unless @entries.blank? %>
|
||||
<%= render :partial => 'tree', :locals => { :extend => false}%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
$("#new_repository_contents").html('<%= escape_javascript(render :partial => 'games/repository') %>');
|
||||
$("#games_repository_contents").html('<%= escape_javascript(render :partial => 'games/repository') %>');
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ ol,ul,li{ list-style-type:none}
|
|||
a:link,a:visited{text-decoration:none;color:#898989; }
|
||||
a:hover {color:#29bd8b;}
|
||||
input,textarea,select{ background: #fff; border:1px solid #ccc; color:#666;}
|
||||
/*侧滚动条*/
|
||||
::-webkit-scrollbar { width:10px; height:10px; background-color: #F5F5F5; border-radius: 10px; }
|
||||
::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); border-radius: 10px; background-color: #F5F5F5; }
|
||||
::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); background-color: #555; }
|
||||
/*万能清除浮动*/
|
||||
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;}
|
||||
.clearfix{clear:both;zoom:1}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
|
|||
.undis {display:none;}
|
||||
.dis {display:block;}
|
||||
.tab-info{ }
|
||||
.content-editor-inner{ overflow:auto;height: 813px}
|
||||
.content-editor-inner{ overflow:auto;}
|
||||
.tab-info-inner{ overflow:auto; height:600px; margin:0 0 0px 15px;padding-top: 15px}
|
||||
.content-history-inner{height:120px; overflow:auto; padding:15px;}
|
||||
.content-history{width:48.7%; min-width:500px; }
|
||||
|
|
@ -144,7 +144,7 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f
|
|||
.-flex-basic100{flex-basis: 100%!important;}
|
||||
|
||||
.-header-title{ max-width:500px; font-weight: normal;}
|
||||
.-header-right{ background:#333;border-radius:25px; padding:5px 15px; height: 30px; position: absolute; right:10px;}
|
||||
.-header-right{ background:#333;border-radius:25px; padding:5px 15px; height: 30px; position: absolute; right:10px;line-height: 30px;}
|
||||
.-header-right-info{ padding:10px; background:#fff; border-radius:3px; top:50px; right:10px; position: relative;display:none;color:#666;}
|
||||
.-header-right-info font { border: 1px solid #dddddd; display: block;border-width: 8px; position: absolute; top: -15px;right:20px;border-style: solid; border-color: transparent transparent #fff transparent; font-size: 0; line-height: 0;}
|
||||
.-header-right-box:hover .-header-right-info{ display: block;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue