Commit 1b85d9d0 authored by Steffen van Bergerem's avatar Steffen van Bergerem

Use a button instead of input to submit, use smaller photos

parent 0cc3b10b
......@@ -19,6 +19,7 @@ app.views.Publisher = Backbone.View.extend({
"focus textarea" : "open",
"click #hide_publisher" : "clear",
"submit form" : "createStatusMessage",
"click #submit" : "createStatusMessage",
"click .post_preview_button" : "createPostPreview",
"textchange #status_message_fake_text": "handleTextchange",
"click #locator" : "showLocation",
......@@ -33,7 +34,7 @@ app.views.Publisher = Backbone.View.extend({
this.el_input = this.$('#status_message_fake_text');
this.el_hiddenInput = this.$('#status_message_text');
this.el_wrapper = this.$('#publisher_textarea_wrapper');
this.el_submit = this.$('input[type=submit]');
this.el_submit = this.$('input[type=submit], button#submit');
this.el_preview = this.$('button.post_preview_button');
this.el_photozone = this.$('#photodropzone');
......@@ -260,7 +261,7 @@ app.views.Publisher = Backbone.View.extend({
keyDown : function(evt) {
if( evt.keyCode == 13 && evt.ctrlKey ) {
this.$("form").submit();
this.el_submit.click();
this.open();
return false;
}
......
......@@ -100,28 +100,28 @@
> li.publisher_photo {
list-style: none;
float: left;
margin: 10px;
height: 100px;
width: 100px;
margin: 8px;
height: 80px;
width: 80px;
overflow: hidden;
line-height: 100px;
line-height: 80px;
vertical-align: middle;
img {
vertical-align: middle;
width: 100px;
width: 80px;
}
.x {
display: none;
width: 70px;
height: 70px;
border-radius: 35px;
width: 50px;
height: 50px;
border-radius: 25px;
text-align: center;
background-color: white;
color: black;
font-size: 70px;
line-height: 70px;
font-size: 50px;
line-height: 50px;
font-style: bold;
position: absolute;
z-index: 2;
......@@ -143,7 +143,7 @@
.progress {
width: 100%;
height: 20px;
margin: 40px 0;
margin: 30px 0;
}
.ajax-loader { display: none; }
......
......@@ -100,7 +100,8 @@
%button{ :disabled => ("disabled" if publisher_hidden_text.blank?), :class => 'btn btn-default post_preview_button'}
= t('.preview')
= status.submit t('.share'), :disabled => publisher_hidden_text.blank?, :class => 'btn btn-primary creation', :tabindex => 2
%button#submit.btn.btn-primary.creation{ :disabled => ("disabled" if publisher_hidden_text.blank?), :tabindex => 2}
= t('.share')
.facebox_content
#question_mark_pane
......
......@@ -35,6 +35,6 @@
$(function(){
$("#publisher #status_message_fake_text").val(contents);
$("#publisher #status_message_text").val(contents);
$('input.button')[0].removeAttribute('disabled');
$('#publisher button#submit').removeAttr('disabled');
$('#publisher #publisher_textarea_wrapper').addClass('active');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment