mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
accessibility improvement; bugfix & clean up
This commit is contained in:
@@ -65,6 +65,7 @@ define([
|
||||
_this.$days_input.prop('disabled', false).removeClass('input-disabled');
|
||||
_this.$days_input.attr('value', data.keep_days);
|
||||
}
|
||||
_this.$radios.filter(':checked').focus();
|
||||
|
||||
if (!app.pageOptions.enable_repo_history_setting) {
|
||||
_this.$('.history-settings-notice').removeClass('hide');
|
||||
|
@@ -546,6 +546,7 @@ define([
|
||||
focus: false,
|
||||
containerCss: {'padding':'20px 25px'}
|
||||
});
|
||||
file_name.focus();
|
||||
$('#simplemodal-container').css({'height':'auto'});
|
||||
|
||||
$('.set-file-type', form).click(function() {
|
||||
@@ -781,7 +782,7 @@ define([
|
||||
var $all_dirent_checkbox = this.$('[type=checkbox]');
|
||||
var $dirents_op = this.$('#multi-dirents-op');
|
||||
|
||||
var $curDirOps = this.$('#upload-file, #add-new-dir, #add-new-file, #share-cur-dir');
|
||||
var $curDirOps = this.$('#cur-dir-ops');
|
||||
|
||||
if ($el.prop('checked')) {
|
||||
$all_dirent_checkbox.prop('checked', true);
|
||||
|
@@ -103,7 +103,7 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
var $curDirOps = dirView.$('#upload-file, #add-new-dir, #add-new-file, #share-cur-dir');
|
||||
var $curDirOps = dirView.$('#cur-dir-ops');
|
||||
|
||||
if (checked_num > 0) {
|
||||
$dirents_op.css({'display':'inline-block'});
|
||||
@@ -211,6 +211,7 @@ define([
|
||||
}).append(form);
|
||||
$op.hide();
|
||||
$name.hide();
|
||||
$('[name="newname"]', form).focus();
|
||||
|
||||
this._hideMenu();
|
||||
app.ui.freezeItemHightlight = true;
|
||||
|
@@ -17,6 +17,7 @@ define([
|
||||
events: {
|
||||
'mouseenter': 'highlight',
|
||||
'mouseleave': 'rmHighlight',
|
||||
'focus *': 'focusItem',
|
||||
'click .js-del-msg': 'delMessage',
|
||||
'click .js-reply-msg': 'reply'
|
||||
},
|
||||
@@ -67,8 +68,17 @@ define([
|
||||
this.$('.msg-ops').addClass('vh');
|
||||
},
|
||||
|
||||
focusItem: function() {
|
||||
$('.msg.hl', this.$el.parent())
|
||||
.removeClass('hl')
|
||||
.find('.msg-ops').addClass('vh');
|
||||
|
||||
this.highlight();
|
||||
},
|
||||
|
||||
reply: function() {
|
||||
this.parentView.replyTo(this.model.get("user_name"));
|
||||
return false;
|
||||
},
|
||||
|
||||
delMessage: function() {
|
||||
@@ -86,6 +96,7 @@ define([
|
||||
Common.feedback(err, 'error');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
@@ -115,7 +115,7 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
$("#group").append(this.$el);
|
||||
$("#group-discussions-icon").after(this.$el);
|
||||
this.$(".msg-input").focus();
|
||||
app.router.navigate('group/' + this.groupView.group.id + '/discussions/');
|
||||
},
|
||||
|
@@ -77,7 +77,7 @@ define([
|
||||
_this.$error.html(err_msg).show();
|
||||
}
|
||||
});
|
||||
$("#group").append(this.$el);
|
||||
$("#group-members-icon").after(this.$el);
|
||||
}
|
||||
|
||||
});
|
||||
|
@@ -53,7 +53,7 @@ define([
|
||||
'wiki_enabled': this.groupView.group.wiki_enabled
|
||||
}));
|
||||
|
||||
$("#group").append(this.$el);
|
||||
$("#group-settings-icon").after(this.$el);
|
||||
},
|
||||
|
||||
highlightItem: function(e) {
|
||||
@@ -99,7 +99,7 @@ define([
|
||||
var _this = this;
|
||||
|
||||
var $form = $(this.renameTemplate());
|
||||
$form.modal({focus:false});
|
||||
$form.modal();
|
||||
$('#simplemodal-container').css({'width':'auto', 'height':'auto'});
|
||||
|
||||
$form.submit(function() {
|
||||
|
@@ -13,7 +13,7 @@ define([
|
||||
'use strict';
|
||||
|
||||
var OrganizationView = Backbone.View.extend({
|
||||
id: 'organization-repos-tmpl',
|
||||
id: 'organization',
|
||||
|
||||
template: _.template($('#organization-repos-tmpl').html()),
|
||||
reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()),
|
||||
|
@@ -63,9 +63,9 @@ define([
|
||||
.replace('{lib_name}', '<span class="op-target">' + Common.HTMLescape(this.model.get('name')) + '</span>');
|
||||
var confirm_popup = $(this.repoDelConfirmTemplate({
|
||||
content: confirm_msg
|
||||
}))
|
||||
.appendTo(op_container)
|
||||
.css({
|
||||
}));
|
||||
del_icon.after(confirm_popup);
|
||||
confirm_popup.css({
|
||||
'left': del_icon.position().left,
|
||||
'top': del_icon.position().top + del_icon.height() + 2,
|
||||
'width': 180
|
||||
@@ -144,6 +144,7 @@ define([
|
||||
}).append(form);
|
||||
$op_td.hide();
|
||||
$name_span.hide();
|
||||
$('[name="newname"]', form).focus();
|
||||
|
||||
this.togglePopup();
|
||||
app.ui.freezeItemHightlight = true;
|
||||
|
Reference in New Issue
Block a user