File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 3
3
<%= javascript_include_tag 'plugin.project_tree.js', :plugin => 'project_tree'%>
4
4
<% end %>
5
5
6
+ <script >
7
+ <!-- Project TreeView variables -->
8
+ var titleHideSubProjects = "<%= l ( :title_project_link_hide_subprojects ) %> " ;
9
+ var titleShowSubProjects = "<%= l ( :title_project_link_show_subprojects ) %> " ;
10
+ </ script >
6
11
7
- <h2 > <%= l ( :label_project_plural ) %> </ h2 >
8
12
13
+ < h2 > <%= l ( :label_project_plural ) %> </ h2 >
9
14
10
15
< ul class ="tree ">
11
16
<% for project in top_projects %>
12
17
<% if project . children . length > 0 %>
13
- < li class ="project root parent "> < span class ="toggle collapsed " id ="<%= project . id %> " title ="Unterprojekt(e) anzeigen "> </ span > <%= link_to_project ( project ) %> </ li >
18
+ < li class ="project root parent "> < span class ="toggle collapsed " id ="<%= project . id %> " title ="<%= l ( :title_project_link_show_subprojects ) %> "> </ span > <%= link_to_project ( project ) %> </ li >
14
19
<% else %>
15
20
< li class ="project root parent "> < span class ="spacer "> </ span > <%= link_to_project ( project ) %> </ li >
16
21
<% end %>
17
22
<% end %>
18
23
</ ul >
19
24
20
- < hr />
21
-
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ $(document).ready(function () {
17
17
} ) ;
18
18
} ) ;
19
19
20
+
20
21
/**
21
22
* show or hide the child projects for the given project
22
23
*
@@ -27,11 +28,11 @@ function showHideChildren(project) {
27
28
var projectName = project . text ( ) ;
28
29
if ( project . hasClass ( "collapsed" ) ) {
29
30
project . addClass ( "expanded" ) . removeClass ( "collapsed" ) ;
30
- project . attr ( "title" , "Unterprojekt(e) ausblenden" ) ;
31
+ project . attr ( "title" , titleHideSubProjects ) ;
31
32
addChildren ( project ) ;
32
33
} else {
33
34
project . addClass ( "collapsed" ) . removeClass ( "expanded" ) ;
34
- project . attr ( "title" , "Unterprojekt(e) einblenden" ) ;
35
+ project . attr ( "title" , titleShowSubProjects ) ;
35
36
removeChildren ( project ) ;
36
37
}
37
38
}
@@ -85,7 +86,7 @@ function buildProjectList(children, projectId) {
85
86
var listItem = $ ( '<li class="project child"/>' ) ;
86
87
87
88
if ( child . has_children ) {
88
- var span = $ ( '<span class="toggle collapsed" id="' + child . identifier + '" title="Unterprojekt(e) anzeigen "/>' ) ;
89
+ var span = $ ( '<span class="toggle collapsed" id="' + child . identifier + '" title="' + titleShowSubProjects + ' "/>') ;
89
90
listItem . append ( span ) ;
90
91
// add event listener
91
92
$ ( span ) . click ( function ( ) {
You can’t perform that action at this time.
0 commit comments