去掉实训编辑模式,改成直读编辑
This commit is contained in:
parent
67e4a5982a
commit
b5a5c9fd34
|
@ -61,10 +61,10 @@ class GamesController < ApplicationController
|
|||
end
|
||||
|
||||
def file_edit
|
||||
entry_and_raw(false)
|
||||
@content = @repository.cat(@path, @rev).strip
|
||||
# respond_to do |format|
|
||||
# format.js
|
||||
# entry_and_raw(false)
|
||||
# @content = @repository.cat(@path, @rev).strip
|
||||
# # respond_to do |format|
|
||||
# # format.js
|
||||
# end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
</h3>
|
||||
<div class="fr mt5">
|
||||
<% if params[:action] == "entry" || @file_open %>
|
||||
<a href="javascript:void(0)" class="undis" id="sava_edit_btn1" onclick="file_edit_submit()" title="保存修改"><i class="fa fa-save font-18 fl color-grey mr10"></i></a>
|
||||
<a href="<%= file_edit_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => params[:path]) %>" data-remote="true" ><i class="fa fa-edit font-18 fl color-grey mr10"></i></a>
|
||||
<a href="javascript:void(0)" id="sava_edit_btn1" onclick="file_edit_submit()" title="保存修改"><i class="fa fa-save font-18 fl color-grey mr10"></i></a>
|
||||
<% end %>
|
||||
<a href="javascript:void(0)" onclick="extend_repository();"><i class="fa fa-expand font-18 fl color-grey"></i></a>
|
||||
</div>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
<div class="wrap-big">
|
||||
<div style="padding-left: 8px;">
|
||||
<!--目录跳转-->
|
||||
<div class="fl mt3">
|
||||
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir'} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
$("#file_entry_content").html('<%= escape_javascript(render :partial => 'games/file_edit_form') %>');
|
||||
$("#file_entry_content_inner").html('<%= escape_javascript(render :partial => 'games/extend_file_edit_form') %>');
|
||||
$("#sava_edit_btn1").show();
|
||||
$("#sava_edit_btn").show();
|
||||
$("#bottom_save_edit").show();
|
||||
editor_CodeMirror.refresh();
|
||||
editor.refresh();
|
||||
//$("#file_entry_content").html('<%#= escape_javascript(render :partial => 'games/file_edit_form') %>');
|
||||
//$("#file_entry_content_inner").html('<%#= escape_javascript(render :partial => 'games/extend_file_edit_form') %>');
|
||||
//$("#sava_edit_btn1").show();
|
||||
//$("#sava_edit_btn").show();
|
||||
//$("#bottom_save_edit").show();
|
||||
//editor_CodeMirror.refresh();
|
||||
//editor.refresh();
|
Loading…
Reference in New Issue