blob: 5b957067ef1a4ad9ff39bb220536a811833bd538 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
<h1>{{lang_translationHeading}}: {{module}} / {{section}}</h1>
<div class="alert alert-info">
{{lang_templateHint}}
</div>
<form action="?do=Translation" method="post" class="slx-visible-rows">
<table id="moduleTable" class="table table-condensed table-hover">
<thead>
<tr>
<th>{{lang_tag}}</th>
<th>{{lang_translation}} (<b>{{language}}</b>)</th>
<th class="hidden-xs">{{lang_sample}}</th>
<th style="text-align: center;">{{lang_clear}}</th>
</tr>
</thead>
<tbody>
{{#tags}}
<tr>
<td class="col-sm-3">
<div>
{{#unused}}
<span class="label label-danger">{{lang_unused}}</span>
{{/unused}}
{{#missing}}
<span class="label label-warning">{{lang_missing}}</span>
{{/missing}}
{{#isglobal}}
<span class="label label-success" title="{{lang_globalTooltip}}">{{lang_global}}</span>
{{/isglobal}}
{{tag}}
<div class="slx-notebox">{{{notes}}}</div>
</div>
</td>
<td class="col-sm-4" id="tagid-{{tagid}}">
{{^big}}
<input type="text" class="form-control switchable {{#missing}}txt-empty{{/missing}}" value="{{translation}}" ondblclick="slxMb(this)" name="langtag[{{tag}}]" placeholder="{{placeholder}}">
{{/big}}
{{#big}}
<textarea rows="3" class="form-control {{#missing}}txt-empty{{/missing}}" name="langtag[{{tag}}]" placeholder="{{placeholder}}">{{translation}}</textarea>
{{/big}}
</td>
<td class="hidden-xs col-sm-4">
<div class="badge">{{samplelang}}</div>
{{sampletext}}
</td>
<td class="col-sm-1" style="text-align:center; vertical-align: middle;">
<button type="button" class="btn btn-danger btn-xs" onclick="slxDelTag({{tagid}})" tabindex="-1">
<span class="glyphicon glyphicon-remove"></span>
</button>
</td>
</tr>
{{/tags}}
</tbody>
</table>
<input type="hidden" name="module" value="{{module}}">
<input type="hidden" name="destlang" value="{{destlang}}">
<input type="hidden" name="section" value="{{section}}">
<input type="hidden" name="subsection" value="{{subsection}}">
<input type="hidden" name="token" value="{{token}}">
<div class="text-right">
<a class="btn btn-default" href='?do=Translation' >{{lang_back}}</a>
<button type="submit" class="btn btn-primary" name="update" value="true">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
</button>
<button class="btn btn-success" type="button" onclick="slxAddTag()" >
<span class="glyphicon glyphicon-plus"></span>
{{lang_createTag}}
</button>
</div>
</form>
<br/>
<script type="text/javascript">
var slxNewTagCounter = 0;
function slxAddTag()
{
$('#moduleTable').find('tr:last').after(
'<tr id="new-delete-' + slxNewTagCounter + '">' +
' <td class="col-sm-3">' +
' <input type="text" name="new-id[' + slxNewTagCounter + ']" class="form-control">' +
' </td>' +
' <td class="col-sm-4">' +
' <input type="text" class="form-control" name="new-text[' + slxNewTagCounter + ']">' +
' </td>' +
' <td class="hidden-xs col-sm-4"></td>' +
' <td class="col-sm-1" style="text-align:center; vertical-align: middle;">' +
' <button type="button" class="btn btn-danger btn-xs" onclick="slxDelNew(' + slxNewTagCounter + ')" tabindex="-1">' +
' <span class="glyphicon glyphicon-remove"></span> ' +
' </button>' +
' </td>' +
'</tr>'
);
slxNewTagCounter++;
}
function slxDelNew(id)
{
$('#new-delete-' + id).remove();
}
function slxDelTag(id)
{
$('#tagid-' + id).text('-');
}
function slxMb(el)
{
var old = $(el);
var ta = $('<textarea name="' + el.name + '" class="form-control" rows="3"></textarea>');
ta.val(old.val());
old.replaceWith(ta);
}
document.addEventListener('DOMContentLoaded', function () {
$('.txt-empty').first().focus();
});
</script>
|