From 05dbce6fa9f8284ffbfb5e273923b87018dfa4d3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 17 Apr 2017 17:01:28 +0800 Subject: [PATCH] =?UTF-8?q?codemirror=E9=AB=98=E5=BA=A6=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_file_edit_form.html.erb | 3 +-- app/views/games/_game_show.html.erb | 4 +-- app/views/games/_repository.html.erb | 32 ++++++++++++++--------- app/views/games/entry.js.erb | 2 +- public/stylesheets/css/bigdata-common.css | 4 +++ public/stylesheets/css/taskstyle.css | 4 +-- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/app/views/games/_file_edit_form.html.erb b/app/views/games/_file_edit_form.html.erb index ace44f895..cc47100a2 100644 --- a/app/views/games/_file_edit_form.html.erb +++ b/app/views/games/_file_edit_form.html.erb @@ -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(); }); \ No newline at end of file diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 965e228e9..9853c9e13 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -66,9 +66,7 @@
-
- <%= render :partial => 'games/repository' %> -
+ <%= render :partial => 'games/repository' %>
<%= render :partial => 'games/game_results' %> diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 0ccaf77e7..cade2d571 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -3,19 +3,25 @@ <%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
- +
-
- <% if params[:action] == "entry" || @file_open %> -
- <%= render :partial => 'games/file_edit_form', :locals => {:filename => @path, :content => @content} %> +
+
+
+
+
+ <% if params[:action] == "entry" || @file_open %> +
+ <%= render :partial => 'games/file_edit_form', :locals => {:filename => @path, :content => @content} %> +
+ <% else %> + <% unless @entries.blank? %> + <%= render :partial => 'tree', :locals => { :extend => false}%> + <% end %> + <% end %> +
- <% else %> - <% unless @entries.blank? %> - <%= render :partial => 'tree', :locals => { :extend => false}%> - <% end %> - <% end %> -
- - +
+
+
\ No newline at end of file diff --git a/app/views/games/entry.js.erb b/app/views/games/entry.js.erb index 20cb2502f..23f0de04e 100644 --- a/app/views/games/entry.js.erb +++ b/app/views/games/entry.js.erb @@ -1,4 +1,4 @@ -$("#new_repository_contents").html('<%= escape_javascript(render :partial => 'games/repository') %>'); +$("#games_repository_contents").html('<%= escape_javascript(render :partial => 'games/repository') %>'); diff --git a/public/stylesheets/css/bigdata-common.css b/public/stylesheets/css/bigdata-common.css index 4621786a7..96c744e93 100644 --- a/public/stylesheets/css/bigdata-common.css +++ b/public/stylesheets/css/bigdata-common.css @@ -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} diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 0efc868f0..95df908ae 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -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;}