summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-01-07 13:04:25 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-01-07 15:16:12 +0100
commit44dc9aa69e19d90564fdb279f9e8d51b5caf2cae (patch)
tree4e65cadcc4ff7de0dee3b596cab1bab12e3eb8ea
parent4443a5f3c76015f7bf083248b6910d01839cfc88 (diff)
downloadgitlab-ce-44dc9aa69e19d90564fdb279f9e8d51b5caf2cae.tar.gz
Fix typo in js method and some repeating css
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/assets/javascripts/commits.js.coffee6
-rw-r--r--app/assets/stylesheets/framework/blocks.scss9
-rw-r--r--app/views/projects/commits/show.html.haml8
3 files changed, 16 insertions, 7 deletions
diff --git a/app/assets/javascripts/commits.js.coffee b/app/assets/javascripts/commits.js.coffee
index bddcf83d4dd..c337038e446 100644
--- a/app/assets/javascripts/commits.js.coffee
+++ b/app/assets/javascripts/commits.js.coffee
@@ -24,19 +24,19 @@ class @CommitsList
form = $(".commits-search-form")
search = @searchField.val()
commitsUrl = form.attr("action") + '?' + form.serialize()
- @setOpacitiy(0.5)
+ @setOpacity(0.5)
$.ajax
type: "GET"
url: form.attr("action")
data: form.serialize()
complete: =>
- @setOpacitiy(1.0)
+ @setOpacity(1.0)
success: (data) =>
@content.html(data.html)
# Change url so if user reload a page - search results are saved
history.replaceState {page: commitsUrl}, document.title, commitsUrl
dataType: "json"
- @setOpacitiy: (opacity) ->
+ @setOpacity: (opacity) ->
@content.css("opacity", opacity)
diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss
index 206d39cc9b3..fa0e70847f3 100644
--- a/app/assets/stylesheets/framework/blocks.scss
+++ b/app/assets/stylesheets/framework/blocks.scss
@@ -72,6 +72,15 @@
> p:last-child {
margin-bottom: 0;
}
+
+ .block-controls {
+ float: right;
+
+ .control {
+ float: left;
+ margin-left: 10px;
+ }
+ }
}
.cover-block {
diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml
index 8f6625fef8a..034057da42e 100644
--- a/app/views/projects/commits/show.html.haml
+++ b/app/views/projects/commits/show.html.haml
@@ -10,19 +10,19 @@
.tree-ref-holder
= render 'shared/ref_switcher', destination: 'commits'
- .pull-right.hidden-xs.hidden-sm
+ .block-controls.hidden-xs.hidden-sm
- if create_mr_button?(@repository.root_ref, @ref)
- .pull-left.prepend-left-10
+ .control
= link_to create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success' do
= icon('plus')
Create Merge Request
- .pull-left.prepend-left-10
+ .control
= form_tag(namespace_project_commits_path(@project.namespace, @project, @id), method: :get, class: 'pull-left commits-search-form') do
= search_field_tag :search, params[:search], { placeholder: 'Filter by commit message', id: 'commits-search', class: 'form-control search-text-input', spellcheck: false }
- if current_user && current_user.private_token
- .pull-left.prepend-left-10
+ .control
= link_to namespace_project_commits_path(@project.namespace, @project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Commits Feed", class: 'btn' do
= icon("rss")