|
@@ -310,7 +310,7 @@
|
|
// body部详细语言
|
|
// body部详细语言
|
|
let body_data = data['lw_dict'];
|
|
let body_data = data['lw_dict'];
|
|
lw_data = body_data
|
|
lw_data = body_data
|
|
- let head_html = '<tr><th>key</th>';
|
|
|
|
|
|
+ let head_html = '<tr><th width="180px"><a href="javascript:void(0);" onclick="addRow()">add</a></th><th>key</th>';
|
|
let search_tab = '<label><input type="radio" name="optionsRadios" value="key" checked>key</label>'
|
|
let search_tab = '<label><input type="radio" name="optionsRadios" value="key" checked>key</label>'
|
|
|
|
|
|
//头部标签添加
|
|
//头部标签添加
|
|
@@ -321,7 +321,7 @@
|
|
search_tab += ' <label><input type="radio" name="optionsRadios" value="' + obj['lang'] + '">' + obj['lang'] + '</label>'
|
|
search_tab += ' <label><input type="radio" name="optionsRadios" value="' + obj['lang'] + '">' + obj['lang'] + '</label>'
|
|
});
|
|
});
|
|
// head_html += '<th>udpateTime <i class="fa fa-arrow-down" aria-hidden="true"></i></td><th width="180px"><a href="#" onclick="addRow()">add</a></th></tr>';
|
|
// head_html += '<th>udpateTime <i class="fa fa-arrow-down" aria-hidden="true"></i></td><th width="180px"><a href="#" onclick="addRow()">add</a></th></tr>';
|
|
- head_html += ('<th><a href="javascript:void(0);" onclick="orderByUpdateTimeFunc(' + orderByupdate + ')">udpateTime <i class="fa ' + (orderByupdate == 1 ? 'fa-arrow-up' : 'fa-arrow-down') + '" aria-hidden="true"></i></a></td><th width="180px"><a href="javascript:void(0);" onclick="addRow()">add</a></th></tr>');
|
|
|
|
|
|
+ head_html += ('<th><a href="javascript:void(0);" onclick="orderByUpdateTimeFunc(' + orderByupdate + ')">udpateTime <i class="fa ' + (orderByupdate == 1 ? 'fa-arrow-up' : 'fa-arrow-down') + '" aria-hidden="true"></i></a></td></tr>');
|
|
// search_tab += '<td width="180px"><button class="btn-primary btn">搜索</button></td></tr>';
|
|
// search_tab += '<td width="180px"><button class="btn-primary btn">搜索</button></td></tr>';
|
|
$('#searchCheckBox').html(search_tab)
|
|
$('#searchCheckBox').html(search_tab)
|
|
let body_html = '';
|
|
let body_html = '';
|
|
@@ -335,7 +335,7 @@
|
|
let edit_btn = '<a href="javascript:void(0);" title="Edit" onclick="editFunc(this)"><i class="fa fa-edit"></i></a>';
|
|
let edit_btn = '<a href="javascript:void(0);" title="Edit" onclick="editFunc(this)"><i class="fa fa-edit"></i></a>';
|
|
let del_btn = '<a href="javascript:void(0);" title="Delete" onclick="deleteFunc(this)"><i class="fa fa-ban"></i></a>';
|
|
let del_btn = '<a href="javascript:void(0);" title="Delete" onclick="deleteFunc(this)"><i class="fa fa-ban"></i></a>';
|
|
// let del_btn = '';
|
|
// let del_btn = '';
|
|
- body_html += '<tr>';
|
|
|
|
|
|
+ body_html += '<tr><td>' + edit_btn + ' ' + del_btn + '</td>';
|
|
body_html += ('<td>' + idx + '</td>');
|
|
body_html += ('<td>' + idx + '</td>');
|
|
|
|
|
|
$.each(la_list, function (x, y) {
|
|
$.each(la_list, function (x, y) {
|
|
@@ -346,7 +346,7 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
let updTime = $.DateChange.UnixToDate(obj['updTime'], true, 8);
|
|
let updTime = $.DateChange.UnixToDate(obj['updTime'], true, 8);
|
|
- body_html += ('<td>' + updTime + '<span class="arrow dsc"></td><td>' + edit_btn + ' ' + del_btn + '</td></tr>');
|
|
|
|
|
|
+ body_html += ('<td>' + updTime + '<span class="arrow dsc"></td></tr>');
|
|
});
|
|
});
|
|
|
|
|
|
$('#langTableHead').empty().html(head_html);
|
|
$('#langTableHead').empty().html(head_html);
|
|
@@ -355,8 +355,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
function addRow() {
|
|
function addRow() {
|
|
|
|
+ let save_btn = '<a href="javascript:void(0);" title="Save" class="save_row"><i class="fa fa-check-circle-o"></i></a>';
|
|
|
|
+ let del_btn = '<a href="javascript:void(0);" title="Delete" class="del_row"><i class="fa fa-ban"></i></a>';
|
|
|
|
|
|
- let newRow = '<tr><td><input class="form-control" type="text" langID="key" id="newRow_key"></td>'
|
|
|
|
|
|
+ let newRow = '<tr><td>' + save_btn + ' ' + del_btn + '</td><td><input class="form-control" type="text" langID="key" id="newRow_key"></td>'
|
|
$.each(la_list, function (idx, obj) {
|
|
$.each(la_list, function (idx, obj) {
|
|
// console.log(idx)
|
|
// console.log(idx)
|
|
// newRow += ('<td>' + obj['id'] + '</td>')
|
|
// newRow += ('<td>' + obj['id'] + '</td>')
|
|
@@ -364,10 +366,8 @@
|
|
'<input class="form-control" type="text" langID="' + obj['id'] + '" id="newRow_lang_' + obj['id'] + '">' +
|
|
'<input class="form-control" type="text" langID="' + obj['id'] + '" id="newRow_lang_' + obj['id'] + '">' +
|
|
'</td>')
|
|
'</td>')
|
|
})
|
|
})
|
|
- let save_btn = '<a href="javascript:void(0);" title="Save" class="save_row"><i class="fa fa-check-circle-o"></i></a>';
|
|
|
|
- let del_btn = '<a href="javascript:void(0);" title="Delete" class="del_row"><i class="fa fa-ban"></i></a>';
|
|
|
|
|
|
|
|
- newRow += '<td></td><td>' + save_btn + ' ' + del_btn + '</td></tr>'
|
|
|
|
|
|
+ newRow += '<td></td></tr>'
|
|
$('#langTableBody').prepend(newRow)
|
|
$('#langTableBody').prepend(newRow)
|
|
addDelFunc()
|
|
addDelFunc()
|
|
addSaveFunc()
|
|
addSaveFunc()
|
|
@@ -419,7 +419,7 @@
|
|
// 编辑模态框
|
|
// 编辑模态框
|
|
function editFunc($this) {
|
|
function editFunc($this) {
|
|
|
|
|
|
- let langKey = $($this).parent().parent().children().eq(0).text()
|
|
|
|
|
|
+ let langKey = $($this).parent().parent().children().eq(1).text()
|
|
$('#modal-container-593541').modal('show')
|
|
$('#modal-container-593541').modal('show')
|
|
// let post_data = {'token': $.cookie('access_token')};
|
|
// let post_data = {'token': $.cookie('access_token')};
|
|
let html_per = '<label for="lang_key_edit">KEY</label><input class="form-control" type="text" id="lang_key_edit" oldkey="' + langKey + '" value="' + langKey + '"> '
|
|
let html_per = '<label for="lang_key_edit">KEY</label><input class="form-control" type="text" id="lang_key_edit" oldkey="' + langKey + '" value="' + langKey + '"> '
|
|
@@ -433,7 +433,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
function deleteFunc($this) {
|
|
function deleteFunc($this) {
|
|
- let langKey = $($this).parent().parent().children().eq(0).text()
|
|
|
|
|
|
+ let langKey = $($this).parent().parent().children().eq(1).text()
|
|
|
|
|
|
var r = confirm("Press a button")
|
|
var r = confirm("Press a button")
|
|
if (r) {
|
|
if (r) {
|