BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3d4f524d
Commit
3d4f524d
authored
Dec 20, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
play with tree view
parent
6bdcaccb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
ajax-loader-tree.gif
app/assets/images/ajax-loader-tree.gif
+0
-0
tree.js
app/assets/javascripts/tree.js
+9
-3
projects.css.scss
app/assets/stylesheets/projects.css.scss
+7
-0
tree.js.haml
app/views/refs/tree.js.haml
+2
-2
No files found.
app/assets/images/ajax-loader-tree.gif
0 → 100644
View file @
3d4f524d
2.55 KB
app/assets/javascripts/tree.js
View file @
3d4f524d
...
...
@@ -5,17 +5,23 @@
var
Tree
=
{
init
:
function
()
{
(
new
Image
).
src
=
"/assets/ajax-loader-tree.gif"
;
$
(
'#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a'
).
live
(
"click"
,
function
()
{
history
.
pushState
({
path
:
this
.
path
},
''
,
this
.
href
)
$
(
"#tree-content-holder"
).
hide
(
"slide"
,
{
direction
:
"left"
},
150
)
})
$
(
"#tree-slider tr.tree-item"
).
live
(
'click'
,
function
(
e
){
if
(
e
.
target
.
nodeName
!=
"A"
)
{
e
.
stopPropagation
();
link
=
$
(
this
).
find
(
"td.tree-item-file-name a"
);
link
.
click
();
return
false
;
link
.
trigger
(
"click"
);
}
});
$
(
'#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a'
).
live
({
"ajax:beforeSend"
:
function
()
{
$
(
'h2.icon'
).
addClass
(
"loading"
)
},
"ajax:complete"
:
function
()
{
$
(
'h2.icon'
).
removeClass
(
"loading"
)}
});
}
}
app/assets/stylesheets/projects.css.scss
View file @
3d4f524d
...
...
@@ -647,3 +647,10 @@ h4.middle-panel {
border-radius
:
3px
;
float
:left
;
}
body
.project-page
h2
.icon.loading
{
span
{
background-position
:
0px
0px
;
background
:
url("ajax-loader-tree.gif")
no-repeat
;
}
}
app/views/refs/tree.js.haml
View file @
3d4f524d
:plain
$("#tree-content-holder").hide("slide", { direction: "left" }, 150, function(){
//
$("#tree-content-holder").hide("slide", { direction: "left" }, 150, function(){
$("#tree-holder").html("
#{
escape_javascript
(
render
(
:partial
=>
"tree"
,
:locals
=>
{
:repo
=>
@repo
,
:commit
=>
@commit
,
:tree
=>
@tree
}))
}
");
$("#tree-content-holder").show("slide", { direction: "right" }, 150);
});
//
});
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