Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
60b2d9f3c3ac
Commit
60b2d9f3
authored
Nov 15, 2011
by
Nihad Abbasov
Browse files
clean up whitespace from project
parent
a629e7edf428
Changes
50
Expand all
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/application.js
View file @
60b2d9f3
...
...
@@ -22,9 +22,9 @@
$
(
'
select#branch
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
'
select#tag
'
).
selectmenu
({
style
:
'
popup
'
,
width
:
200
});
$
(
"
.account-box
"
).
mouseenter
(
showMenu
);
$
(
"
.account-box
"
).
mouseleave
(
resetMenu
);
$
(
"
.account-box
"
).
mouseenter
(
showMenu
);
$
(
"
.account-box
"
).
mouseleave
(
resetMenu
);
});
function
updatePage
(
data
){
...
...
@@ -32,7 +32,7 @@
}
function
showMenu
()
{
$
(
this
).
toggleClass
(
'
hover
'
);
$
(
this
).
toggleClass
(
'
hover
'
);
}
function
resetMenu
()
{
...
...
@@ -36,5 +36,5 @@
}
function
resetMenu
()
{
$
(
this
).
removeClass
(
"
hover
"
);
$
(
this
).
removeClass
(
"
hover
"
);
}
app/assets/javascripts/commits.js
View file @
60b2d9f3
...
...
@@ -8,11 +8,9 @@
});
});
var
CommitsList
=
{
var
CommitsList
=
{
ref
:
null
,
limit
:
0
,
offset
:
0
,
...
...
@@ -14,15 +12,15 @@
ref
:
null
,
limit
:
0
,
offset
:
0
,
init
:
function
(
ref
,
limit
)
{
this
.
ref
=
ref
;
this
.
limit
=
limit
;
this
.
offset
=
limit
;
init
:
function
(
ref
,
limit
)
{
this
.
ref
=
ref
;
this
.
limit
=
limit
;
this
.
offset
=
limit
;
this
.
initLoadMore
();
$
(
'
.loading
'
).
show
();
},
getOld
:
...
...
@@ -24,9 +22,9 @@
this
.
initLoadMore
();
$
(
'
.loading
'
).
show
();
},
getOld
:
function
()
{
function
()
{
$
(
'
.loading
'
).
show
();
$
.
ajax
({
type
:
"
GET
"
,
...
...
@@ -39,6 +37,6 @@
append
:
function
(
count
,
html
)
{
$
(
"
#commits_list
"
).
append
(
html
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
this
.
offset
+=
count
;
this
.
initLoadMore
();
...
...
@@ -43,6 +41,6 @@
this
.
offset
+=
count
;
this
.
initLoadMore
();
}
}
},
initLoadMore
:
...
...
@@ -46,7 +44,7 @@
},
initLoadMore
:
function
()
{
function
()
{
$
(
window
).
bind
(
'
scroll
'
,
function
(){
if
(
$
(
window
).
scrollTop
()
==
$
(
document
).
height
()
-
$
(
window
).
height
()){
$
(
window
).
unbind
(
'
scroll
'
);
...
...
app/assets/javascripts/note.js
View file @
60b2d9f3
var
NoteList
=
{
var
NoteList
=
{
first_id
:
0
,
last_id
:
0
,
resource_name
:
null
,
...
...
@@ -2,15 +2,15 @@
first_id
:
0
,
last_id
:
0
,
resource_name
:
null
,
init
:
function
(
resource_name
,
first_id
,
last_id
)
{
this
.
resource_name
=
resource_name
;
this
.
first_id
=
first_id
;
this
.
last_id
=
last_id
;
init
:
function
(
resource_name
,
first_id
,
last_id
)
{
this
.
resource_name
=
resource_name
;
this
.
first_id
=
first_id
;
this
.
last_id
=
last_id
;
this
.
initRefresh
();
this
.
initLoadMore
();
},
getOld
:
...
...
@@ -12,9 +12,9 @@
this
.
initRefresh
();
this
.
initLoadMore
();
},
getOld
:
function
()
{
function
()
{
$
(
'
.loading
'
).
show
();
$
.
ajax
({
type
:
"
GET
"
,
...
...
@@ -31,7 +31,7 @@
this
.
initLoadMore
();
},
replace
:
replace
:
function
(
fid
,
lid
,
html
)
{
this
.
first_id
=
fid
;
this
.
last_id
=
lid
;
...
...
@@ -39,6 +39,5 @@
this
.
initLoadMore
();
},
prepend
:
function
(
id
,
html
)
{
...
...
@@ -43,9 +42,9 @@
prepend
:
function
(
id
,
html
)
{
if
(
id
!=
this
.
last_id
)
{
if
(
id
!=
this
.
last_id
)
{
this
.
last_id
=
id
;
$
(
"
#notes-list
"
).
prepend
(
html
);
}
},
getNew
:
...
...
@@ -46,10 +45,10 @@
this
.
last_id
=
id
;
$
(
"
#notes-list
"
).
prepend
(
html
);
}
},
getNew
:
function
()
{
function
()
{
// refersh notes list
$
.
ajax
({
type
:
"
GET
"
,
...
...
@@ -59,7 +58,7 @@
},
refresh
:
function
()
{
function
()
{
// refersh notes list
$
.
ajax
({
type
:
"
GET
"
,
...
...
@@ -68,8 +67,6 @@
dataType
:
"
script
"
});
},
initRefresh
:
function
()
{
// init timer
...
...
@@ -78,7 +75,7 @@
},
initLoadMore
:
function
()
{
function
()
{
$
(
window
).
bind
(
'
scroll
'
,
function
(){
if
(
$
(
window
).
scrollTop
()
==
$
(
document
).
height
()
-
$
(
window
).
height
()){
$
(
window
).
unbind
(
'
scroll
'
);
...
...
app/assets/javascripts/projects.js
View file @
60b2d9f3
...
...
@@ -48,7 +48,6 @@
source
:
'
/tags.json
'
});
$
(
'
form
'
).
submit
(
function
()
{
var
tag_field
=
$
(
'
#tag_field
'
)
tag_field
.
val
(
tag_field
.
tagify
(
'
serialize
'
)
);
...
...
app/assets/stylesheets/application.css
View file @
60b2d9f3
...
...
@@ -15,6 +15,6 @@
.cgreen
{
color
:
#44aa22
;
}
/** COMMON STYLES **/
.left
{
.left
{
float
:
left
;
}
...
...
@@ -19,6 +19,6 @@
float
:
left
;
}
.right
{
.right
{
float
:
right
;
}
.width-50p
{
...
...
@@ -33,7 +33,7 @@
.width-65p
{
width
:
65%
;
}
.append-bottom-10
{
.append-bottom-10
{
margin-bottom
:
10px
;
}
.prepend-top-10
{
...
...
app/assets/stylesheets/issues.css.scss
View file @
60b2d9f3
...
...
@@ -12,7 +12,7 @@
.issues_filter
{
margin-top
:
10px
;
.left
{
.left
{
margin-right
:
15px
;
}
}
...
...
@@ -38,10 +38,10 @@
/** ISSUES LIST **/
.issue
.action-links
{
display
:none
;
a
{
display
:none
;
a
{
margin-left
:
10px
;
}
}
.issue
:hover
.action-links
{
display
:block
;
}
...
...
@@ -43,6 +43,5 @@
margin-left
:
10px
;
}
}
.issue
:hover
.action-links
{
display
:block
;
}
app/assets/stylesheets/notes.css.scss
View file @
60b2d9f3
...
...
@@ -14,7 +14,6 @@
}
}
/* Note textare */
#note_note
{
height
:
100px
;
...
...
app/assets/stylesheets/projects.css.scss
View file @
60b2d9f3
...
...
@@ -99,5 +99,5 @@
}
}
td
.code
{
td
.code
{
width
:
100%
;
...
...
@@ -103,7 +103,7 @@
width
:
100%
;
.highlight
{
.highlight
{
margin-left
:
55px
;
overflow
:auto
;
overflow-y
:hidden
;
}
}
...
...
@@ -105,9 +105,9 @@
margin-left
:
55px
;
overflow
:auto
;
overflow-y
:hidden
;
}
}
.highlight
pre
{
.highlight
pre
{
white-space
:
pre
;
word-wrap
:normal
;
}
...
...
@@ -115,8 +115,8 @@
.highlighttable
tr
:hover
{
background
:white
;
}
table
.highlighttable
pre
{
table
.highlighttable
pre
{
line-height
:
16px
!
important
;
font-size
:
12px
!
important
;
}
...
...
@@ -119,8 +119,7 @@
line-height
:
16px
!
important
;
font-size
:
12px
!
important
;
}
table
.highlighttable
.linenodiv
pre
{
text-align
:
right
;
padding-right
:
4px
;
...
...
@@ -235,7 +234,6 @@
}
}
#user_projects_limit
{
width
:
60px
;
}
...
...
@@ -244,7 +242,7 @@
cursor
:
move
;
}
.project-refs-form
{
.project-refs-form
{
span
{
background
:
none
!
important
;
position
:static
!
important
;
...
...
@@ -258,7 +256,7 @@
}
.filter
.left
{
margin-right
:
15px
;
}
body
.project-page
table
.commit
{
a
.tree-commit-link
{
body
.project-page
table
.commit
{
a
.tree-commit-link
{
color
:gray
;
...
...
@@ -264,8 +262,8 @@
color
:gray
;
&
:hover
{
&
:hover
{
text-decoration
:underline
;
}
}
}
/** NEW PROJECT **/
...
...
@@ -266,10 +264,10 @@
text-decoration
:underline
;
}
}
}
/** NEW PROJECT **/
.new-project-hodler
{
.new-project-hodler
{
.icon
span
{
background-position
:
-31px
-70px
;
}
td
{
border-bottom
:
1px
solid
#DEE2E3
;
}
}
...
...
@@ -277,8 +275,8 @@
/** Feed entry **/
.commit
,
.snippet
,
.message
{
.title
{
.message
{
.title
{
color
:
#666
;
a
{
color
:
#666
!
important
;
}
p
{
margin-top
:
0px
;
}
...
...
@@ -295,7 +293,7 @@
font-size
:
1
.5em
;
height
:auto
;
font-weight
:bold
;
.ui-selectmenu-status
{
.ui-selectmenu-status
{
padding
:
3px
10px
;
}
}
...
...
@@ -299,5 +297,5 @@
padding
:
3px
10px
;
}
}
/** Snippets **/
...
...
@@ -303,8 +301,8 @@
/** Snippets **/
.new_snippet
textarea
,
.edit_snippet
textarea
{
.new_snippet
textarea
,
.edit_snippet
textarea
{
height
:
300px
;
padding
:
8px
;
width
:
95%
;
}
.snippet
.action-links
{
...
...
@@ -306,10 +304,10 @@
height
:
300px
;
padding
:
8px
;
width
:
95%
;
}
.snippet
.action-links
{
display
:none
;
a
{
display
:none
;
a
{
margin-left
:
10px
;
}
}
...
...
@@ -348,7 +346,7 @@
background
:
#2c5c66
;
color
:white
;
}
&
.issue
{
&
.issue
{
background
:
#D12F19
;
color
:white
;
}
...
...
@@ -352,7 +350,7 @@
background
:
#D12F19
;
color
:white
;
}
&
.commit
{
&
.commit
{
background
:
#44aacc
;
color
:white
;
}
...
...
app/assets/stylesheets/style.scss
View file @
60b2d9f3
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/tags.css.css
View file @
60b2d9f3
.tags-list
{
padding
:
0px
10px
10px
10px
;
padding
:
0px
10px
10px
10px
;
}
.tags-list
a
{
...
...
@@ -15,7 +15,6 @@
font-size
:
14px
;
}
.small-tags
a
{
font-size
:
9px
;
...
...
@@ -26,6 +25,6 @@
background-color
:
#72bbdf
;
color
:
#FFF
;
text-shadow
:
none
;
font-weight
:
bold
;
font-weight
:
bold
;
}
...
...
@@ -30,6 +29,5 @@
}
.medium-tags
a
{
font-size
:
12px
;
...
...
@@ -40,5 +38,5 @@
background-color
:
#72bbdf
;
color
:
#FFF
;
text-shadow
:
none
;
font-weight
:
bold
;
}
\ No newline at end of file
font-weight
:
bold
;
}
app/controllers/application_controller.rb
View file @
60b2d9f3
...
...
@@ -79,8 +79,8 @@
elsif
params
[
:last_id
]
@notes
=
@notes
.
where
(
"id > ?"
,
params
[
:last_id
])
elsif
params
[
:first_id
]
@notes
=
@notes
.
where
(
"id < ?"
,
params
[
:first_id
])
else
@notes
=
@notes
.
where
(
"id < ?"
,
params
[
:first_id
])
else
nil
end
end
...
...
app/controllers/commits_controller.rb
View file @
60b2d9f3
...
...
@@ -10,7 +10,6 @@
before_filter
:require_non_empty_project
before_filter
:load_refs
,
:only
=>
:index
# load @branch, @tag & @ref
def
index
@repo
=
project
.
repo
limit
,
offset
=
(
params
[
:limit
]
||
20
),
(
params
[
:offset
]
||
0
)
...
...
app/controllers/projects_controller.rb
View file @
60b2d9f3
...
...
@@ -79,7 +79,7 @@
@notes
=
@project
.
common_notes
.
order
(
"created_at DESC"
)
@notes
=
@notes
.
fresh
.
limit
(
20
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
js
{
respond_with_notes
}
end
...
...
@@ -168,7 +168,7 @@
def
add_refs
(
commit
,
ref_cache
)
if
ref_cache
.
empty?
@repo
.
refs
.
each
do
|
ref
|
@repo
.
refs
.
each
do
|
ref
|
ref_cache
[
ref
.
commit
.
id
]
||=
[]
ref_cache
[
ref
.
commit
.
id
]
<<
ref
end
...
...
app/controllers/tags_controller.rb
View file @
60b2d9f3
class
TagsController
<
ApplicationController
def
index
@tags
=
Project
.
tag_counts
.
order
(
'count DESC'
)
@tags
=
@tags
.
where
(
'name like ?'
,
"%
#{
params
[
:term
]
}
%"
)
unless
params
[
:term
].
blank?
def
index
@tags
=
Project
.
tag_counts
.
order
(
'count DESC'
)
@tags
=
@tags
.
where
(
'name like ?'
,
"%
#{
params
[
:term
]
}
%"
)
unless
params
[
:term
].
blank?
...
...
@@ -5,7 +5,7 @@
respond_to
do
|
format
|
format
.
html
format
.
json
{
render
json:
@tags
.
limit
(
8
).
map
{
|
t
|
t
.
name
}}
end
end
respond_to
do
|
format
|
format
.
html
format
.
json
{
render
json:
@tags
.
limit
(
8
).
map
{
|
t
|
t
.
name
}}
end
end
end
app/helpers/application_helper.rb
View file @
60b2d9f3
...
...
@@ -11,7 +11,7 @@
end
def
body_class
(
default_class
=
nil
)
main
=
content_for
(
:body_class
).
blank?
?
main
=
content_for
(
:body_class
).
blank?
?
default_class
:
content_for
(
:body_class
)
...
...
@@ -42,7 +42,7 @@
else
"Never"
end
rescue
rescue
"Never"
end
...
...
app/helpers/dashboard_helper.rb
View file @
60b2d9f3
...
...
@@ -4,7 +4,7 @@
when
"Issue"
then
project_issue_path
(
project
,
project
.
issues
.
find
(
object
.
id
))
when
"Grit::Commit"
then
project_commit_path
(
project
,
project
.
repo
.
commits
(
object
.
id
).
first
)
when
"Note"
then
then
note
=
object
case
note
.
noteable_type
when
"Issue"
then
project_issue_path
(
project
,
note
.
noteable_id
)
...
...
@@ -12,5 +12,5 @@
when
"Commit"
then
project_commit_path
(
project
,
:id
=>
note
.
noteable_id
)
else
wall_project_path
(
project
)
end
else
wall_project_path
(
project
)
else
wall_project_path
(
project
)
end
...
...
@@ -16,5 +16,5 @@
end
rescue
rescue
"#"
end
...
...
app/models/issue.rb
View file @
60b2d9f3
...
...
@@ -11,8 +11,8 @@
validates_presence_of
:author_id
delegate
:name
,
:email
,
:to
=>
:author
,
:email
,
:to
=>
:author
,
:prefix
=>
true
validates
:title
,
...
...
app/models/note.rb
View file @
60b2d9f3
...
...
@@ -8,8 +8,8 @@
:class_name
=>
"User"
delegate
:name
,
:email
,
:to
=>
:author
,
:email
,
:to
=>
:author
,
:prefix
=>
true
attr_protected
:author
,
:author_id
...
...
app/models/project.rb
View file @
60b2d9f3
...
...
@@ -121,5 +121,5 @@
private_flag
end
def
last_activity
def
last_activity
updates
(
1
).
first
...
...
@@ -125,5 +125,5 @@
updates
(
1
).
first
rescue
rescue
nil
end
...
...
@@ -132,7 +132,7 @@
end
def
updates
(
n
=
3
)
[
[
fresh_commits
(
n
),
issues
.
last
(
n
),
notes
.
fresh
.
limit
(
n
)
...
...
app/models/repository.rb
View file @
60b2d9f3
...
...
@@ -9,7 +9,7 @@
@project
=
project
end
def
path
def
path
@path
||=
project
.
path
end
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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.