mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +00:00
Merge branch '5.1'
Conflicts: seahub/templates/registration/password_change_form.html seahub/templates/sysadmin/base.html seahub/templates/sysadmin/sysadmin_backbone.html
This commit is contained in:
@@ -103,6 +103,9 @@ define([
|
||||
this.$dirent_list = this.$('.repo-file-list');
|
||||
this.$dirent_grid = this.$('.grid-view');
|
||||
this.$dirent_list_body = this.$('.repo-file-list tbody');
|
||||
this.$loading_tip = this.$('.loading-tip');
|
||||
this.$error = this.$('.error');
|
||||
this.$el_con = this.$('.repo-file-list-topbar, .js-dir-content');
|
||||
|
||||
this.$path_bar = this.$('.path-bar');
|
||||
// For compatible with css, we use .repo-op instead of .dir-op
|
||||
@@ -341,6 +344,10 @@ define([
|
||||
},
|
||||
|
||||
renderDir: function() {
|
||||
this.$loading_tip.show();
|
||||
this.$error.hide();
|
||||
this.$el_con.show();
|
||||
|
||||
this.$dirent_grid.empty();
|
||||
this.$dirent_list_body.empty();
|
||||
|
||||
@@ -352,8 +359,6 @@ define([
|
||||
this.$dirent_grid.show();
|
||||
}
|
||||
|
||||
var loading_tip = this.$('.loading-tip').show();
|
||||
|
||||
var _this = this;
|
||||
var thumbnail_size = app.pageOptions.thumbnail_default_size;
|
||||
if (this.view_mode == 'grid') {
|
||||
@@ -368,12 +373,12 @@ define([
|
||||
'thumbnail_size': thumbnail_size
|
||||
},
|
||||
success: function() {
|
||||
loading_tip.hide();
|
||||
_this.$loading_tip.hide();
|
||||
},
|
||||
error: function(collection, response, opts) {
|
||||
loading_tip.hide();
|
||||
_this.$el_con = _this.$('.repo-file-list-topbar, .js-dir-content').hide();
|
||||
var $error = _this.$('.error');
|
||||
_this.$loading_tip.hide();
|
||||
_this.$el_con.hide();
|
||||
|
||||
var err_msg;
|
||||
if (response.responseText) {
|
||||
if (response.responseJSON.lib_need_decrypt) {
|
||||
@@ -385,7 +390,7 @@ define([
|
||||
} else {
|
||||
err_msg = gettext('Please check the network.');
|
||||
}
|
||||
$error.html(err_msg).show();
|
||||
_this.$error.html(err_msg).show();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@@ -69,7 +69,6 @@ define([
|
||||
events: {
|
||||
'click .select': 'select',
|
||||
'click .file-star': 'starFile',
|
||||
'click .dir-link': 'visitDir',
|
||||
'click .share': 'share',
|
||||
'click .delete': 'del', // 'delete' is a preserve word
|
||||
'click .rename': 'rename',
|
||||
@@ -146,20 +145,6 @@ define([
|
||||
return false;
|
||||
},
|
||||
|
||||
visitDir: function () { // todo
|
||||
// show 'loading'
|
||||
this.$('.dirent-icon img').attr({
|
||||
'src': app.config.mediaUrl + 'img/loading-icon.gif',
|
||||
'alt':''
|
||||
});
|
||||
// empty all models
|
||||
this.dirView.dir.reset();
|
||||
// update url & dirents
|
||||
var dir_url = this.$('.dir-link').attr("href");
|
||||
app.router.navigate(dir_url, {trigger: true}); // offer an url fragment
|
||||
return false;
|
||||
},
|
||||
|
||||
share: function() {
|
||||
var dir = this.dir,
|
||||
obj_name = this.model.get('obj_name'),
|
||||
|
Reference in New Issue
Block a user