Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
nexedi
converse.js
Commits
8a2f5439
Commit
8a2f5439
authored
Jan 09, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
06836aee
e756cb1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
weblate/html/translate.html
weblate/html/translate.html
+1
-1
weblate/media/loader-bootstrap.js
weblate/media/loader-bootstrap.js
+13
-0
No files found.
weblate/html/translate.html
View file @
8a2f5439
...
...
@@ -112,7 +112,7 @@
</div>
</form>
<ul
class=
"nav nav-pills"
>
<ul
class=
"nav nav-pills
translation-tabs
"
>
<li
class=
"active"
><a
href=
"#nearby"
data-toggle=
"tab"
title=
"{% trans "
Messages
placed
around
this
one
"
%}"
>
{% trans "Nearby messages" %}
</a></li>
{% if unit.suggestions %}
<li><a
href=
"#suggestions"
data-toggle=
"tab"
>
{% trans "Suggestions" %}
<span
class=
"badge"
>
{{ unit.suggestions.count }}
</span></a></li>
...
...
weblate/media/loader-bootstrap.js
View file @
8a2f5439
...
...
@@ -429,11 +429,19 @@ $(function () {
/* Load correct tab */
if
(
location
.
hash
!==
''
)
{
/* From URL hash */
var
activeTab
=
$
(
'
[data-toggle=tab][href=
'
+
location
.
hash
+
'
]
'
);
if
(
activeTab
.
length
)
{
activeTab
.
tab
(
'
show
'
);
window
.
scrollTo
(
0
,
0
);
}
}
else
if
(
$
(
'
.translation-tabs
'
).
length
>
0
&&
$
.
cookie
(
'
translate-tab
'
))
{
/* From cookie */
console
.
log
(
'
switch
'
+
$
.
cookie
(
'
translate-tab
'
));
var
activeTab
=
$
(
'
[data-toggle=tab][href=
'
+
$
.
cookie
(
'
translate-tab
'
)
+
'
]
'
);
if
(
activeTab
.
length
)
{
activeTab
.
tab
(
'
show
'
);
}
}
/* Add a hash to the URL when the user clicks on a tab */
...
...
@@ -443,6 +451,11 @@ $(function () {
$
(
'
.selectable-row
'
).
removeClass
(
'
active
'
);
});
/* Store active translation tab in cookie */
$
(
'
.translation-tabs a[data-toggle="tab"]
'
).
on
(
'
shown.bs.tab
'
,
function
(
e
)
{
$
.
cookie
(
'
translate-tab
'
,
$
(
this
).
attr
(
'
href
'
));
});
/* Navigate to a tab when the history changes */
window
.
addEventListener
(
"
popstate
"
,
function
(
e
)
{
var
activeTab
=
$
(
'
[data-toggle=tab][href=
'
+
location
.
hash
+
'
]
'
);
...
...
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