From 3090b588d0c0cb2ecdffd19ffc613f7880dce677 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 9 Jan 2019 19:38:00 +0800 Subject: [PATCH] Update mysql.js --- plugins/mysql/js/mysql.js | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index e9f6402a0..e43f5fa2b 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -790,6 +790,39 @@ function delDbBatch(){ }); } + +function setDataByKey(tab, key, obj) { + var _span = $(obj); + var _input = $(""); + _span.hide().after(_input); + _input.focus(); + _input.blur(function(){ + // var item = $(this).parents('tr').data('item'); + // console.log(item); + // var _txt = $(this); + // var data = {table:tab,id:item.id}; + // data[key] = _txt.val() + // bt.pub.set_data_ps(data,function(rdata){ + // if(rdata.status){ + // _span.text(_txt.val()); + // _span.show(); + // _txt.remove(); + // } + // }) + }) + _input.keyup(function(){ + if(event.keyCode == 13){ + _input.trigger('blur'); + } + }) +} + +function setDbPs(data,callback){ + bt.send('setPs','data/setPs',data,function(rdata){ + if(callback) callback(rdata); + }) +} + function openPhpmyadmin(name,username,password){ data = syncPost('/plugins/check',{'name':'phpmyadmin'}); @@ -856,7 +889,7 @@ function dbList(page, search){ ''+ ''; list += '备份'; - list += ''+rdata.data[i]['ps']+''; + list += ''+rdata.data[i]['ps']+''; list += '' + '管理 | ' + '工具 | ' +