Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Thonus <steven@ln2.nl>2014-01-25 21:15:44 +0400
committerHannes Rosenögger <123haynes@gmail.com>2015-01-24 20:51:16 +0300
commit42bac7f9f27b0e8fb113e452fc2106882262172d (patch)
treebadf9efefbdf95e02cac54c48d1495cd062476e9 /app/assets
parentc8c05edcd500c0a755cb6962b51f97381663bd1a (diff)
adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/images/no_project_icon.pngbin0 -> 3387 bytes
-rw-r--r--app/assets/javascripts/project.js.coffee10
-rw-r--r--app/assets/stylesheets/generic/avatar.scss13
-rw-r--r--app/assets/stylesheets/sections/dashboard.scss6
4 files changed, 29 insertions, 0 deletions
diff --git a/app/assets/images/no_project_icon.png b/app/assets/images/no_project_icon.png
new file mode 100644
index 00000000000..8e9529c67ec
--- /dev/null
+++ b/app/assets/images/no_project_icon.png
Binary files differ
diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee
index 5a9cc66c8f0..8588a9d27cd 100644
--- a/app/assets/javascripts/project.js.coffee
+++ b/app/assets/javascripts/project.js.coffee
@@ -18,3 +18,13 @@ class @Project
$.cookie('hide_no_ssh_message', 'false', { path: path })
$(@).parents('.no-ssh-key-message').hide()
e.preventDefault()
+
+ # avatar
+ $('.js-choose-project-avatar-button').bind "click", ->
+ form = $(this).closest("form")
+ form.find(".js-project-avatar-input").click()
+
+ $('.js-project-avatar-input').bind "change", ->
+ form = $(this).closest("form")
+ filename = $(this).val().replace(/^.*[\\\/]/, '')
+ form.find(".js-avatar-filename").text(filename)
diff --git a/app/assets/stylesheets/generic/avatar.scss b/app/assets/stylesheets/generic/avatar.scss
index 80514615559..f04848ae6dc 100644
--- a/app/assets/stylesheets/generic/avatar.scss
+++ b/app/assets/stylesheets/generic/avatar.scss
@@ -23,3 +23,16 @@
&.s90 { width: 90px; height: 90px; margin-right: 15px; }
&.s160 { width: 160px; height: 160px; margin-right: 20px; }
}
+
+.identicon {
+ text-align: center;
+ vertical-align: top;
+
+ &.s16 { font-size: 12px; line-height: 1.33; }
+ &.s24 { font-size: 18px; line-height: 1.33; }
+ &.s26 { font-size: 20px; line-height: 1.33; }
+ &.s32 { font-size: 24px; line-height: 1.33; }
+ &.s60 { font-size: 45px; line-height: 1.33; }
+ &.s90 { font-size: 68px; line-height: 1.33; }
+ &.s160 { font-size: 120px; line-height: 1.33; }
+} \ No newline at end of file
diff --git a/app/assets/stylesheets/sections/dashboard.scss b/app/assets/stylesheets/sections/dashboard.scss
index 824f136d300..3135056db58 100644
--- a/app/assets/stylesheets/sections/dashboard.scss
+++ b/app/assets/stylesheets/sections/dashboard.scss
@@ -75,6 +75,9 @@
}
}
}
+.project-avatar {
+ float: left;
+}
.project-description {
overflow: hidden;
@@ -92,6 +95,9 @@
}
}
+.dash-project-avatar {
+ float: left;
+}
.dash-project-access-icon {
float: left;
margin-right: 3px;