Use a button instead of input to submit, use smaller photos
This commit is contained in:
parent
0cc3b10b1f
commit
1b85d9d032
4 changed files with 17 additions and 15 deletions
|
|
@ -19,6 +19,7 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
"focus textarea" : "open",
|
"focus textarea" : "open",
|
||||||
"click #hide_publisher" : "clear",
|
"click #hide_publisher" : "clear",
|
||||||
"submit form" : "createStatusMessage",
|
"submit form" : "createStatusMessage",
|
||||||
|
"click #submit" : "createStatusMessage",
|
||||||
"click .post_preview_button" : "createPostPreview",
|
"click .post_preview_button" : "createPostPreview",
|
||||||
"textchange #status_message_fake_text": "handleTextchange",
|
"textchange #status_message_fake_text": "handleTextchange",
|
||||||
"click #locator" : "showLocation",
|
"click #locator" : "showLocation",
|
||||||
|
|
@ -33,7 +34,7 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
this.el_input = this.$('#status_message_fake_text');
|
this.el_input = this.$('#status_message_fake_text');
|
||||||
this.el_hiddenInput = this.$('#status_message_text');
|
this.el_hiddenInput = this.$('#status_message_text');
|
||||||
this.el_wrapper = this.$('#publisher_textarea_wrapper');
|
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_preview = this.$('button.post_preview_button');
|
||||||
this.el_photozone = this.$('#photodropzone');
|
this.el_photozone = this.$('#photodropzone');
|
||||||
|
|
||||||
|
|
@ -260,7 +261,7 @@ app.views.Publisher = Backbone.View.extend({
|
||||||
|
|
||||||
keyDown : function(evt) {
|
keyDown : function(evt) {
|
||||||
if( evt.keyCode == 13 && evt.ctrlKey ) {
|
if( evt.keyCode == 13 && evt.ctrlKey ) {
|
||||||
this.$("form").submit();
|
this.el_submit.click();
|
||||||
this.open();
|
this.open();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,28 +100,28 @@
|
||||||
> li.publisher_photo {
|
> li.publisher_photo {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 10px;
|
margin: 8px;
|
||||||
height: 100px;
|
height: 80px;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
line-height: 100px;
|
line-height: 80px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x {
|
.x {
|
||||||
display: none;
|
display: none;
|
||||||
width: 70px;
|
width: 50px;
|
||||||
height: 70px;
|
height: 50px;
|
||||||
border-radius: 35px;
|
border-radius: 25px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 70px;
|
font-size: 50px;
|
||||||
line-height: 70px;
|
line-height: 50px;
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
.progress {
|
.progress {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin: 40px 0;
|
margin: 30px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ajax-loader { display: none; }
|
.ajax-loader { display: none; }
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,8 @@
|
||||||
%button{ :disabled => ("disabled" if publisher_hidden_text.blank?), :class => 'btn btn-default post_preview_button'}
|
%button{ :disabled => ("disabled" if publisher_hidden_text.blank?), :class => 'btn btn-default post_preview_button'}
|
||||||
= t('.preview')
|
= 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
|
.facebox_content
|
||||||
#question_mark_pane
|
#question_mark_pane
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,6 @@
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#publisher #status_message_fake_text").val(contents);
|
$("#publisher #status_message_fake_text").val(contents);
|
||||||
$("#publisher #status_message_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');
|
$('#publisher #publisher_textarea_wrapper').addClass('active');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue