summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-06 13:49:55 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-06 13:49:55 +0000
commitcf6a0ff7602718941edbc85fa26e975cba5038f0 (patch)
tree975f35a2e6f8ce5eddf034ed3a420124a2207a16
parent4c132ed48e5ddc81bb28bd07e92024ab3bf4d86e (diff)
parent2ed06dc41dbb5936af845b87d79e05bbf24c73b8 (diff)
downloadgitlab-ce-cf6a0ff7602718941edbc85fa26e975cba5038f0.tar.gz
Merge branch 'assets-css-helpers' into 'master'
Use rails helper image-url for reference images in css Fixes #1001
-rw-r--r--app/assets/stylesheets/generic/forms.scss2
-rw-r--r--app/assets/stylesheets/generic/typography.scss2
-rw-r--r--app/assets/stylesheets/sections/commits.scss2
-rw-r--r--app/assets/stylesheets/sections/diff.scss14
-rw-r--r--app/assets/stylesheets/sections/header.scss2
-rw-r--r--app/assets/stylesheets/sections/notes.scss2
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--spec/helpers/application_helper_spec.rb2
8 files changed, 14 insertions, 14 deletions
diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss
index 19e3e7a9536..56cd4db905e 100644
--- a/app/assets/stylesheets/generic/forms.scss
+++ b/app/assets/stylesheets/generic/forms.scss
@@ -1,5 +1,5 @@
input[type='search'].search-text-input {
- background-image: url("icon-search.png");
+ background-image: image-url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
padding-left: 25px;
diff --git a/app/assets/stylesheets/generic/typography.scss b/app/assets/stylesheets/generic/typography.scss
index 1a07fde53f1..3a31e28e0ac 100644
--- a/app/assets/stylesheets/generic/typography.scss
+++ b/app/assets/stylesheets/generic/typography.scss
@@ -105,7 +105,7 @@ a:focus {
display: inline-block;
width: $size;
height: $size;
- background-image: url("icon-link.png");
+ background-image: image-url("icon-link.png");
background-size: contain;
background-repeat: no-repeat;
}
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index f3355c8f1d6..855bb4ea010 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -73,7 +73,7 @@
.commits-compare-switch{
- background: url("switch_icon.png") no-repeat center center;
+ background: image-url("switch_icon.png") no-repeat center center;
width: 32px;
height: 32px;
text-indent: -9999px;
diff --git a/app/assets/stylesheets/sections/diff.scss b/app/assets/stylesheets/sections/diff.scss
index 74d144dfb06..813566c4def 100644
--- a/app/assets/stylesheets/sections/diff.scss
+++ b/app/assets/stylesheets/sections/diff.scss
@@ -144,7 +144,7 @@
line-height: 0;
img{
border: 1px solid #FFF;
- background: url('trans_bg.gif');
+ background: image-url('trans_bg.gif');
max-width: 100%;
}
&.deleted {
@@ -209,7 +209,7 @@
width: 15px;
position: absolute;
top: 0px;
- background: url('swipemode_sprites.gif') 0 3px no-repeat;
+ background: image-url('swipemode_sprites.gif') 0 3px no-repeat;
}
.bottom-handle{
display: block;
@@ -217,7 +217,7 @@
width: 15px;
position: absolute;
bottom: 0px;
- background: url('swipemode_sprites.gif') 0 -11px no-repeat;
+ background: image-url('swipemode_sprites.gif') 0 -11px no-repeat;
}
}
} //.view.swipe
@@ -249,7 +249,7 @@
left: 12px;
height: 10px;
width: 276px;
- background: url('onion_skin_sprites.gif') -4px -20px repeat-x;
+ background: image-url('onion_skin_sprites.gif') -4px -20px repeat-x;
}
.dragger {
@@ -259,7 +259,7 @@
top: 0px;
height: 14px;
width: 14px;
- background: url('onion_skin_sprites.gif') 0px -34px repeat-x;
+ background: image-url('onion_skin_sprites.gif') 0px -34px repeat-x;
cursor: pointer;
}
@@ -270,7 +270,7 @@
right: 0px;
height: 10px;
width: 10px;
- background: url('onion_skin_sprites.gif') -2px 0px no-repeat;
+ background: image-url('onion_skin_sprites.gif') -2px 0px no-repeat;
}
.opaque {
@@ -280,7 +280,7 @@
left: 0px;
height: 10px;
width: 10px;
- background: url('onion_skin_sprites.gif') -2px -10px no-repeat;
+ background: image-url('onion_skin_sprites.gif') -2px -10px no-repeat;
}
}
} //.view.onion-skin
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss
index 68873327845..f8da4f0f87b 100644
--- a/app/assets/stylesheets/sections/header.scss
+++ b/app/assets/stylesheets/sections/header.scss
@@ -161,7 +161,7 @@ header {
}
.search-input {
- background-image: url("icon-search.png");
+ background-image: image-url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
height: inherit;
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index 8a38cd5a939..f39a9341060 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -196,7 +196,7 @@ ul.notes {
.diff-file tr.line_holder {
.add-diff-note {
- background: url("diff_note_add.png") no-repeat left 0;
+ background: image-url("diff_note_add.png") no-repeat left 0;
height: 22px;
margin-left: -65px;
position: absolute;
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 4e7d01acd2a..240477b5b73 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -54,7 +54,7 @@ module ApplicationHelper
if group && group.avatar.present?
group.avatar.url
else
- '/assets/no_group_avatar.png'
+ image_path('no_group_avatar.png')
end
end
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index c58c83a2970..c285a9360bb 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -52,7 +52,7 @@ describe ApplicationHelper do
it "should give default avatar_icon when no avatar is present" do
group = create(:group)
group.save!
- group_icon(group.path).to_s.should == "/assets/no_group_avatar.png"
+ group_icon(group.path).should match("group_avatar.png")
end
end