socialforge/app/views/games/_repository.html.erb

89 lines
3.7 KiB
Plaintext

<div class="col-width fl ml15 mt15 content-half-fix02 undis" style="border: none">
<div class="panel-header clearfix" style="border: none">
<h3 class="fl"><%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h3>
<div class="fr mt5">
<a href="#"><i class="fa fa-minus font-14 mr10 fl color-grey"></i></a>
<a href="javascript:void(0)" onclick="close_big_repository()"><i class="fa fa-compress font-14 fl color-grey"></i></a>
</div>
</div>
<div class="content-history-inner">
<% if params[:action] == "entry" %>
<div id="file_entry_content_inner">
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
</div>
<% else %>
<% unless @entries.blank? %>
<%= render :partial => 'tree' %>
<% end %>
<% end %>
</div>
</div>
<div class="content-editor col-width2 fl">
<div class="panel-header-border clearfix">
<h3 class="fl">
<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
</h3>
<div class="fr mt5 ">
<% if params[:action] == "entry" %>
<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>
<% end %>
<a href="javascript:void(0)" onclick="extend_repository();"><i class="fa fa-expand font-18 fl color-grey"></i></a>
</div>
</div>
<div class="content-editor-inner">
<% if params[:action] == "entry" %>
<div id="file_entry_content">
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
</div>
<% else %>
<% unless @entries.blank? %>
<%= render :partial => 'tree' %>
<% end %>
<% end %>
</div>
</div>
<div class="cl"></div>
<script>
var web_h = window.innerHeight;
$(document).ready(function(){
if($.browser.msie) {
$(".content-half-fix02").css("height", web_h - 85 + "px");
$(".content-half-fix02").css("width", "86%");
$(".autoscroll_new").css("height", web_h * 0.61 + "px");
}
else if($.browser.safari)
{
$(".content-half-fix02").css("height", web_h - 85 + "px");
$(".content-half-fix02").css("width", "86%");
$(".autoscroll_new").css("height", web_h * 0.61 + "px");
}
else if($.browser.mozilla)
{
$(".content-half-fix02").css("height", web_h - 85 + "px");
$(".content-half-fix02").css("width", "86%");
$(".autoscroll_new").css("height", web_h * 0.595 + "px");
}
else if($.browser.opera) {
$(".content-half-fix02").css("height", web_h - 85 + "px");
$(".content-half-fix02").css("width", "86%");
$(".autoscroll_new").css("height", web_h * 0.61 + "px");
}else if($.browser.chrome){
if(window.navigator.userAgent.indexOf("MetaSr") == -1){
$(".content-half-fix02").css("height", web_h - 85 + "px");
$(".content-half-fix02").css("width", "86%");
$(".autoscroll_new").css("height", web_h * 0.61 + "px");
}else{
$(".content-half-fix02").css("height", web_h - 80 + "px");
$(".content-half-fix02").css("width", "85.7%");
$(".autoscroll_new").css("height", web_h * 0.58 + "px");
}
}
});
function close_big_repository(){
$(".content-half-fix02").hide()
}
function extend_repository(){
$(".content-half-fix02").show()
}
</script>