Permalink
Browse files

Merge #268

  • Loading branch information...
dhcole committed Mar 25, 2013
2 parents 456366c + 9c8bc0b commit e4aec7f3f0bbcd47854f5c2d32f6a71dcf1ad13b
Showing with 4 additions and 3 deletions.
  1. +1 −1 _includes/templates/post._
  2. +3 −2 _includes/views/post.js
@@ -12,7 +12,7 @@
</div>
<div class="fr menu-item save-state">
- <input type="text" class="commit-message" value="Updated."/>
+ <input type="text" class="commit-message" value=""/>
<div class="state fl">
<% if (writeable) { %><a class='toggle-options button' href='#'>&nbsp;</a><% } %>
View
@@ -57,7 +57,7 @@ views.Post = Backbone.View.extend({
_toggleCommit: function() {
if (!this.$('.document-menu').hasClass('commit')) {
- this.$('.commit-message').val("Updated "+$('input.filepath').val());
+ this.$('.commit-message').attr( 'placeholder', "Updated "+$('input.filepath').val());
}
this.hideMeta();
@@ -69,6 +69,7 @@ views.Post = Backbone.View.extend({
this.showDiff();
this.$('.surface').toggle();
this.$('.diff-wrapper').toggle();
+ this.$('.commit-message').focus();
return false;
},
@@ -306,7 +307,7 @@ views.Post = Backbone.View.extend({
filepath = $('input.filepath').val(),
filename = _.extractFilename(filepath)[1],
filecontent = this.serialize(),
- message = this.$('.commit-message').val(),
+ message = this.$('.commit-message').val() || this.$('.commit-message').attr('placeholder'),
method = this.model.writeable ? this.saveFile : this.sendPatch;
// Update content

0 comments on commit e4aec7f

Please sign in to comment.