mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 01:12:03 +00:00
bugfix for 'dir view', modified grp-repo-tmpl
This commit is contained in:
@@ -46,19 +46,19 @@
|
||||
<script type="text/template" id="group-repo-tmpl">
|
||||
<td>
|
||||
<% if (encrypted) { %>
|
||||
<img src="<%= app.config.mediaUrl %>img/sync-folder-encrypt-20.png" title="{% trans "Encrypted" %}" alt="" />
|
||||
<img src="{{ MEDIA_URL }}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted" %}" alt="" />
|
||||
<% } else { %>
|
||||
<% if (permission == 'rw') { %>
|
||||
<img src="<%= app.config.mediaUrl %>img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="" />
|
||||
<img src="{{ MEDIA_URL }}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="" />
|
||||
<% } else { %>
|
||||
<img src="<%= app.config.mediaUrl %>img/folder-no-write-20.png?t=1387267140" title="{% trans "Read-Only" %}" alt="" />
|
||||
<img src="{{ MEDIA_URL }}img/folder-no-write-20.png?t=1387267140" title="{% trans "Read-Only" %}" alt="" />
|
||||
<% } %>
|
||||
<% } %>
|
||||
</td>
|
||||
<td><a href="#/group/<%= group_id %>/lib/<%= id %>"><%- name %></a></td>
|
||||
<td><a href="#group/<%= group_id %>/lib/<%= id %>"><%- name %></a></td>
|
||||
<td class="alc">
|
||||
<% if (app.pageOptions.isGroupStaff) { %>
|
||||
<img src="<%= app.config.mediaUrl%>img/delete-orange.png" alt="" class="cancel-share op-icon vh" title="{% trans "Unshare" %}" />
|
||||
<img src="{{ MEDIA_URL }}img/delete-orange.png" alt="" class="cancel-share op-icon vh" title="{% trans "Unshare" %}" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%= size_formatted %></td>
|
||||
|
@@ -26,7 +26,6 @@ define([
|
||||
|
||||
this.dirent_more = data.dirent_more;
|
||||
this.more_start = data.more_start;
|
||||
this.share = data.share;
|
||||
return data.dirent_list; // return the array
|
||||
},
|
||||
|
||||
|
@@ -6,9 +6,10 @@ define([
|
||||
'app/views/myhome',
|
||||
'app/views/group',
|
||||
'app/views/organization',
|
||||
'app/views/dir',
|
||||
'app/views/top-group-nav'
|
||||
], function($, Backbone, Common, MyHomeView, GroupView, OrgView,
|
||||
GroupNavView) {
|
||||
DirView, GroupNavView) {
|
||||
"use strict";
|
||||
|
||||
var Router = Backbone.Router.extend({
|
||||
@@ -35,9 +36,11 @@ define([
|
||||
Common.initNoticePopup();
|
||||
Common.getContacts();
|
||||
|
||||
this.myHomeView = new MyHomeView();
|
||||
this.groupView = new GroupView();
|
||||
this.orgView = new OrgView();
|
||||
this.dirView = new DirView();
|
||||
|
||||
this.myHomeView = new MyHomeView({dirView: this.dirView});
|
||||
this.groupView = new GroupView({dirView: this.dirView});
|
||||
this.orgView = new OrgView({dirView: this.dirView});
|
||||
|
||||
this.currentView = this.myHomeView;
|
||||
|
||||
|
@@ -6,10 +6,9 @@ define([
|
||||
'app/collections/group-repos',
|
||||
'app/views/group-repo',
|
||||
'app/views/add-group-repo',
|
||||
'app/views/dir',
|
||||
'app/views/group-side-nav'
|
||||
], function($, _, Backbone, Common, GroupRepos, GroupRepoView,
|
||||
AddGroupRepoView, DirView, GroupSideNavView) {
|
||||
AddGroupRepoView, GroupSideNavView) {
|
||||
'use strict';
|
||||
|
||||
var GroupView = Backbone.View.extend({
|
||||
@@ -21,7 +20,7 @@ define([
|
||||
'click #grp-repos .by-time': 'sortByTime'
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
initialize: function(options) {
|
||||
this.$tabs = this.$('#group-repo-tabs');
|
||||
this.$table = this.$('#grp-repos table', this.$tabs);
|
||||
this.$tableHead = $('thead', this.$table);
|
||||
@@ -35,7 +34,7 @@ define([
|
||||
this.listenTo(this.repos, 'add', this.addOne);
|
||||
this.listenTo(this.repos, 'reset', this.reset);
|
||||
|
||||
this.dirView = new DirView();
|
||||
this.dirView = options.dirView;
|
||||
},
|
||||
|
||||
addOne: function(repo, collection, options) {
|
||||
|
@@ -6,23 +6,23 @@ define([
|
||||
'app/views/myhome-repos',
|
||||
'app/views/myhome-sub-repos',
|
||||
'app/views/myhome-shared-repos',
|
||||
'app/views/dir',
|
||||
'app/views/myhome-side-nav'
|
||||
], function($, _, Backbone, Common, ReposView, SubReposView,
|
||||
SharedReposView, DirView, MyhomeSideNavView) {
|
||||
SharedReposView, MyhomeSideNavView) {
|
||||
'use strict';
|
||||
|
||||
var MyHomeView = Backbone.View.extend({
|
||||
el: '#main',
|
||||
|
||||
initialize: function() {
|
||||
this.$cont = this.$('#right-panel');
|
||||
|
||||
initialize: function(options) {
|
||||
this.sideNavView = new MyhomeSideNavView();
|
||||
|
||||
this.reposView = new ReposView();
|
||||
this.subReposView = new SubReposView();
|
||||
this.sharedReposView = new SharedReposView();
|
||||
this.dirView = new DirView();
|
||||
|
||||
this.dirView = options.dirView;
|
||||
|
||||
this.currentView = this.reposView;
|
||||
|
||||
$('#initial-loading-view').hide();
|
||||
|
@@ -5,16 +5,15 @@ define([
|
||||
'common',
|
||||
'app/collections/pub-repos',
|
||||
'app/views/organization-repo',
|
||||
'app/views/dir',
|
||||
'app/views/add-pub-repo'
|
||||
], function($, _, Backbone, Common, PubRepoCollection, OrganizationRepoView,
|
||||
DirView, AddPubRepoView) {
|
||||
AddPubRepoView) {
|
||||
'use strict';
|
||||
|
||||
var OrganizationView = Backbone.View.extend({
|
||||
el: '#main',
|
||||
|
||||
initialize: function() {
|
||||
initialize: function(options) {
|
||||
|
||||
this.$sideNav = $('#org-side-nav');
|
||||
this.$reposDiv = $('#organization-repos');
|
||||
@@ -27,7 +26,7 @@ define([
|
||||
this.listenTo(this.repos, 'add', this.addOne);
|
||||
this.listenTo(this.repos, 'reset', this.reset);
|
||||
|
||||
this.dirView = new DirView();
|
||||
this.dirView = options.dirView;
|
||||
},
|
||||
|
||||
events: {
|
||||
|
Reference in New Issue
Block a user