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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
30 deletions
+20
-30
tree.js
app/assets/javascripts/tree.js
+0
-30
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