Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
f94c2769e6
|
@ -180,17 +180,14 @@ class ZipdownController < ApplicationController
|
|||
|
||||
|
||||
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
|
||||
ic = Iconv.new('GBK//IGNORE', 'UTF-8//IGNORE')
|
||||
|
||||
rename_zipfile = zip_name_refer ||= "#{Time.now.to_i.to_s}.zip"
|
||||
zipfile_name = "#{output_path}/#{rename_zipfile}"
|
||||
Zip.unicode_names = true
|
||||
|
||||
Dir.mkdir(File.dirname(zipfile_name)) unless File.exist?(File.dirname(zipfile_name))
|
||||
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
|
||||
files_paths.each do |filename|
|
||||
rename_file = ic.iconv( (File.basename(filename)) ).to_s
|
||||
rename_file = ic.iconv( filename_to_real( File.basename(filename))).to_s if is_attachment
|
||||
rename_file = File.basename(filename)
|
||||
rename_file = filename_to_real( File.basename(filename)) if is_attachment
|
||||
|
||||
begin
|
||||
zipfile.add(rename_file, filename)
|
||||
|
|
|
@ -66,10 +66,10 @@
|
|||
</p>
|
||||
<% end %>
|
||||
<div class="ni_btn">
|
||||
<a href="javascript:" class="tijiao" onclick="clickOK();" >
|
||||
<a href="javascript:" class="tijiao" onclick="clickOK();" style="margin-bottom: 20px;" >
|
||||
确 定
|
||||
</a>
|
||||
<a href="javascript:" class="tijiao" onclick="clickCanel();">
|
||||
<a href="javascript:" class="tijiao" onclick="clickCanel();" style="margin-bottom: 20px;">
|
||||
取 消
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'alert_anonyoms', locals: { bid: @bid, totle_size:@totle_size, cur_size:@cur_size, percent:@percent}) %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').css('height','180px');
|
||||
//$('#ajax-modal').css('height','180px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if @journal_destroyed.nil? %>
|
||||
alert('<%=l(:notice_failed_delete)%>');
|
||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||
<% if @bid && @@jours_count %>
|
||||
<% if @bid && @jours_count %>
|
||||
$('#jours_count').html("<%= @jours_count %>");
|
||||
<% elsif @course && @jours_count%>
|
||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||
|
|
Loading…
Reference in New Issue