Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
b5328879
Commit
b5328879
authored
Oct 03, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename tree.js to tree.js.coffee
parent
c626ec37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
30 deletions
+20
-30
app/assets/javascripts/tree.js
app/assets/javascripts/tree.js
+0
-30
app/assets/javascripts/tree.js.coffee
app/assets/javascripts/tree.js.coffee
+20
-0
No files found.
app/assets/javascripts/tree.js
deleted
100644 → 0
View file @
c626ec37
/**
* Tree slider for code browse
*
*/
var
Tree
=
{
init
:
function
()
{
$
(
'
#tree-slider .tree-item-file-name a, .breadcrumb li > a
'
).
live
(
"
click
"
,
function
()
{
$
(
"
#tree-content-holder
"
).
hide
(
"
slide
"
,
{
direction
:
"
left
"
},
150
)
})
$
(
'
.project-refs-form
'
).
live
({
"
ajax:beforeSend
"
:
function
()
{
$
(
"
#tree-content-holder
"
).
hide
(
"
slide
"
,
{
direction
:
"
left
"
},
150
);
}
})
$
(
"
#tree-slider .tree-item
"
).
live
(
'
click
'
,
function
(
e
){
if
(
e
.
target
.
nodeName
!=
"
A
"
)
{
link
=
$
(
this
).
find
(
"
.tree-item-file-name a
"
);
link
.
trigger
(
"
click
"
);
}
});
$
(
'
#tree-slider .tree-item-file-name a, .breadcrumb a, .project-refs-form
'
).
live
({
"
ajax:beforeSend
"
:
function
()
{
$
(
'
.tree_progress
'
).
addClass
(
"
loading
"
);
},
"
ajax:complete
"
:
function
()
{
$
(
'
.tree_progress
'
).
removeClass
(
"
loading
"
);
}
});
}
}
app/assets/javascripts/tree.js.coffee
0 → 100644
View file @
b5328879
# Code browser tree slider
$
->
if
$
(
'#tree-slider'
).
length
>
0
# Show the "Loading commit data" for only the first element
$
(
'span.log_loading:first'
).
removeClass
(
'hide'
)
$
(
'#tree-slider .tree-item-file-name a, .breadcrumb li > a'
).
live
"click"
,
->
$
(
"#tree-content-holder"
).
hide
(
"slide"
,
{
direction
:
"left"
},
150
)
$
(
'.project-refs-form'
).
live
"ajax:beforeSend"
:
->
$
(
"#tree-content-holder"
).
hide
(
"slide"
,
{
direction
:
"left"
},
150
)
# Make the entire tree-item row clickable, but not if clicking another link (like a commit message)
$
(
"#tree-slider .tree-item"
).
live
'click'
,
(
e
)
->
$
(
'.tree-item-file-name a'
,
this
).
trigger
(
'click'
)
if
(
e
.
target
.
nodeName
!=
"A"
)
$
(
'#tree-slider .tree-item-file-name a, .breadcrumb a, .project-refs-form'
).
live
"ajax:beforeSend"
:
->
$
(
'.tree_progress'
).
addClass
(
"loading"
)
"ajax:complete"
:
->
$
(
'.tree_progress'
).
removeClass
(
"loading"
)
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