1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-07 01:53:59 +00:00

[sub-lib] removed 'share'

This commit is contained in:
llj 2015-03-31 13:51:49 +08:00 committed by Daniel Pan
parent 453a286392
commit cd093a21c8
2 changed files with 3 additions and 21 deletions

View File

@ -3,22 +3,20 @@ define([
'underscore', 'underscore',
'backbone', 'backbone',
'common', 'common',
'app/views/share',
'text!' + app.config._tmplRoot + 'sub-lib.html' 'text!' + app.config._tmplRoot + 'sub-lib.html'
], function($, _, Backbone, Common, ShareView, reposTemplate) { ], function($, _, Backbone, Common, repoTemplate) {
'use strict'; 'use strict';
var RepoView = Backbone.View.extend({ var RepoView = Backbone.View.extend({
tagName: 'tr', tagName: 'tr',
template: _.template(reposTemplate), template: _.template(repoTemplate),
repoDelConfirmTemplate: _.template($('#repo-del-confirm-template').html()), repoDelConfirmTemplate: _.template($('#repo-del-confirm-template').html()),
events: { events: {
'mouseenter': 'highlight', 'mouseenter': 'highlight',
'mouseleave': 'rmHighlight', 'mouseleave': 'rmHighlight',
'click .repo-delete-btn': 'del', 'click .repo-delete-btn': 'del'
'click .repo-share-btn': 'share'
}, },
initialize: function() { initialize: function() {
@ -85,19 +83,6 @@ define([
} }
}); });
}); });
},
share: function() {
var options = {
'is_repo_owner': true,
'is_virtual': this.model.get('virtual'),
'user_perm': this.model.get('permission'),
'repo_id': this.model.get('id'),
'is_dir': true,
'dirent_path': '/',
'obj_name': this.model.get('name')
};
new ShareView(options);
} }
}); });

View File

@ -11,9 +11,6 @@
<td><%- mtime_relative %></td> <td><%- mtime_relative %></td>
<td> <td>
<div class="op-container"> <div class="op-container">
<% if (is_original_owner) { %>
<img src="{{MEDIA_URL}}img/share_20.png" alt="" class="repo-share-btn op-icon vh" title="{% trans "Share" %}" />
<% } %>
<img src="{{MEDIA_URL}}img/rm.png" class="repo-delete-btn op-icon vh" title="{% trans "Delete" %}" /> <img src="{{MEDIA_URL}}img/rm.png" class="repo-delete-btn op-icon vh" title="{% trans "Delete" %}" />
</div> </div>
</td> </td>