Merge branch 'reoponed_issue3897' of https://github.com/RoonyH/diaspora into RoonyH-reoponed_issue3897

This commit is contained in:
Florian Staudacher 2013-06-04 16:41:21 +02:00
commit b7b4edeeb0
5 changed files with 7 additions and 6 deletions

View file

@ -14,6 +14,7 @@
* Fix tags ordering in chrome [#4133](https://github.com/diaspora/diaspora/issues/4133)
* Fix src URL for oEmbed iFrame [#4178](https://github.com/diaspora/diaspora/pull/4178)
* Add back-to-top button on tag and user pages [#4185](https://github.com/diaspora/diaspora/issues/4185)
* Fix reopened issue by changing the comment/post submit keyboard sortcut to ctrl+enter from shift+enter [#3897](https://github.com/diaspora/diaspora/issues/3897)
## Features

View file

@ -53,7 +53,7 @@ app.views.CommentStream = app.views.Base.extend({
},
keyDownOnCommentBox: function(evt) {
if(evt.keyCode == 13 && evt.shiftKey) {
if(evt.keyCode == 13 && evt.ctrlKey) {
this.$("form").submit()
return false;
}

View file

@ -210,7 +210,7 @@ app.views.Publisher = Backbone.View.extend(_.extend(
},
keyDown : function(evt) {
if( evt.keyCode == 13 && evt.shiftKey ) {
if( evt.keyCode == 13 && evt.ctrlKey ) {
this.$("form").submit();
this.open();
return false;

View file

@ -94,14 +94,14 @@ describe("app.views.CommentStream", function(){
expect(submitCallback).not.toHaveBeenCalled();
})
it("should submit the form when enter is pressed with shift", function(){
it("should submit the form when enter is pressed with ctrl", function(){
this.view.render();
var form = this.view.$("form")
var submitCallback = jasmine.createSpy().andReturn(false);
form.submit(submitCallback);
var e = $.Event("keydown", { keyCode: 13 });
e.shiftKey = true;
e.ctrlKey = true;
this.view.keyDownOnCommentBox(e);
expect(submitCallback).toHaveBeenCalled();

View file

@ -116,14 +116,14 @@ describe("app.views.Publisher", function() {
});
describe("publishing a post with keyboard", function(){
it("should submit the form when shift+enter is pressed", function(){
it("should submit the form when ctrl+enter is pressed", function(){
this.view.render();
var form = this.view.$("form")
var submitCallback = jasmine.createSpy().andReturn(false);
form.submit(submitCallback);
var e = $.Event("keydown", { keyCode: 13 });
e.shiftKey = true;
e.ctrlKey = true;
this.view.keyDown(e);
expect(submitCallback).toHaveBeenCalled();