Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Milan
diaspora
Commits
1b85d9d0
Commit
1b85d9d0
authored
Feb 25, 2014
by
Steffen van Bergerem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a button instead of input to submit, use smaller photos
parent
0cc3b10b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
15 deletions
+17
-15
app/assets/javascripts/app/views/publisher_view.js
app/assets/javascripts/app/views/publisher_view.js
+3
-2
app/assets/stylesheets/publisher.css.scss
app/assets/stylesheets/publisher.css.scss
+11
-11
app/views/shared/_publisher.html.haml
app/views/shared/_publisher.html.haml
+2
-1
app/views/status_messages/bookmarklet.html.haml
app/views/status_messages/bookmarklet.html.haml
+1
-1
No files found.
app/assets/javascripts/app/views/publisher_view.js
View file @
1b85d9d0
...
...
@@ -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
;
}
...
...
app/assets/stylesheets/publisher.css.scss
View file @
1b85d9d0
...
...
@@ -100,28 +100,28 @@
>
li
.publisher_photo
{
list-style
:
none
;
float
:
left
;
margin
:
10
px
;
height
:
10
0px
;
width
:
10
0px
;
margin
:
8
px
;
height
:
8
0px
;
width
:
8
0px
;
overflow
:
hidden
;
line-height
:
10
0px
;
line-height
:
8
0px
;
vertical-align
:
middle
;
img
{
vertical-align
:
middle
;
width
:
10
0px
;
width
:
8
0px
;
}
.x
{
display
:
none
;
width
:
7
0px
;
height
:
7
0px
;
border-radius
:
3
5px
;
width
:
5
0px
;
height
:
5
0px
;
border-radius
:
2
5px
;
text-align
:
center
;
background-color
:
white
;
color
:
black
;
font-size
:
7
0px
;
line-height
:
7
0px
;
font-size
:
5
0px
;
line-height
:
5
0px
;
font-style
:
bold
;
position
:
absolute
;
z-index
:
2
;
...
...
@@ -143,7 +143,7 @@
.progress
{
width
:
100%
;
height
:
20px
;
margin
:
4
0px
0
;
margin
:
3
0px
0
;
}
.ajax-loader
{
display
:
none
;
}
...
...
app/views/shared/_publisher.html.haml
View file @
1b85d9d0
...
...
@@ -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
...
...
app/views/status_messages/bookmarklet.html.haml
View file @
1b85d9d0
...
...
@@ -35,6 +35,6 @@
$
(
function
(){
$
(
"
#publisher #status_message_fake_text
"
).
val
(
contents
);
$
(
"
#publisher #status_message_text
"
).
val
(
contents
);
$
(
'
input.button
'
)[
0
]
.
removeAttr
ibute
(
'
disabled
'
);
$
(
'
#publisher button#submit
'
)
.
removeAttr
(
'
disabled
'
);
$
(
'
#publisher #publisher_textarea_wrapper
'
).
addClass
(
'
active
'
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment