mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +00:00
[starred-file] fix bug when generate file view url
This commit is contained in:
@@ -700,9 +700,9 @@
|
||||
<td class="alc"><img src="{{ MEDIA_URL }}img/file/<%= icon_path %>" alt="{% trans "icon" %}" /></td>
|
||||
<td>
|
||||
<% if (is_img) { %>
|
||||
<a class="normal img-name-link" href="{{ SITE_ROOT }}lib/<%= repo %>/file/<%- encoded_path %>" target="_blank" data-mfp-src="{{ SITE_ROOT }}repo/<%= repo %>/raw/<%- encoded_path %>"><%- file_name %></a>
|
||||
<a class="normal img-name-link" href="{{ SITE_ROOT }}lib/<%= repo %>/file<%- encoded_path %>" target="_blank" data-mfp-src="{{ SITE_ROOT }}repo/<%= repo %>/raw<%- encoded_path %>"><%- file_name %></a>
|
||||
<% } else { %>
|
||||
<a href="{{ SITE_ROOT }}lib/<%= repo %>/file/<%- encoded_path %>" target="_blank"><%- file_name %></a>
|
||||
<a href="{{ SITE_ROOT }}lib/<%= repo %>/file<%- encoded_path %>" target="_blank"><%- file_name %></a>
|
||||
<% } %>
|
||||
</td>
|
||||
<td>
|
||||
|
@@ -21,11 +21,10 @@ define([
|
||||
},
|
||||
|
||||
render: function () {
|
||||
var data = this.model.toJSON(),
|
||||
file_name = data['file_name'];
|
||||
var data = this.model.toJSON();
|
||||
|
||||
data['is_img'] = Common.imageCheck(file_name);
|
||||
data['encoded_path'] = Common.encodePath(file_name);
|
||||
data['is_img'] = Common.imageCheck(data['file_name']);
|
||||
data['encoded_path'] = Common.encodePath(data['path']);
|
||||
|
||||
this.$el.html(this.template(data));
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user