socialforge/app/views/avatar/upload.js.erb

8 lines
386 B
Plaintext

<% if @is_direct == '1' && (@source_type=='User'|| @source_type == 'Course' || @source_type == 'Project' || @source_type == 'Organization') %>
var imgSpan = $("img[nhname='avatar_image']");
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
<% else %>
var imgSpan = jQuery('#avatar_image');
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
<% end %>