|
@@ -745,6 +745,7 @@ function autocomplete()
|
|
|
//后台通用的提示
|
|
|
function msg(value)
|
|
|
{
|
|
|
+ $("#dever_modal_no").click();
|
|
|
if(!value.data)
|
|
|
{
|
|
|
value.data = value.msg;
|
|
@@ -1242,7 +1243,7 @@ var MSG = [];
|
|
|
* 打开弹窗
|
|
|
*/
|
|
|
//function showMsg(title, e, id, func)
|
|
|
-function showMsg(title, e, id, func)
|
|
|
+function showMsg(title, e, id, func, param)
|
|
|
{
|
|
|
if(id.indexOf('http://') == -1)
|
|
|
{
|
|
@@ -1270,18 +1271,28 @@ function showMsg(title, e, id, func)
|
|
|
|
|
|
$('#dever_modal_title').html(title);
|
|
|
|
|
|
- if(func)
|
|
|
- {
|
|
|
+ if (func) {
|
|
|
$("#dever_modal_yes").unbind('click').bind('click', func);
|
|
|
+ } else {
|
|
|
+ $("#dever_modal_yes").unbind('click').bind('click', function(){$("#dever_modal_no").click()});
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if(e)
|
|
|
- {
|
|
|
- data = e.attr('msg-send');
|
|
|
+ var url = id;
|
|
|
+ var send = {};
|
|
|
+ if (param) {
|
|
|
+ send = param;
|
|
|
+ }
|
|
|
+ if (e && e.attr('msg-send')) {
|
|
|
+ send.data = e.attr('msg-send');
|
|
|
}
|
|
|
- $.getJSON(id+'?json=1',{data:data},function(t)
|
|
|
+ if (url.indexOf('?') != -1) {
|
|
|
+ url = url + '&';
|
|
|
+ } else {
|
|
|
+ url = url + '?';
|
|
|
+ }
|
|
|
+ $.getJSON(url+'json=1',send,function(t)
|
|
|
{
|
|
|
t = t.data;
|
|
|
$('#dever_modal_body').html(t);
|
|
@@ -1322,6 +1333,27 @@ function showAlert(msg, func, title)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function fastEdit(e, url, title, col)
|
|
|
+{
|
|
|
+ var func = function()
|
|
|
+ {
|
|
|
+ submit_action();
|
|
|
+ };
|
|
|
+
|
|
|
+ var send = {};
|
|
|
+ send.col = col;
|
|
|
+
|
|
|
+ $.get(url,send,function(t)
|
|
|
+ {
|
|
|
+ var html = $(t).find('form').prop("outerHTML");
|
|
|
+ var valid = $(t).find('#valid').prop("outerHTML");
|
|
|
+ html = html + valid;
|
|
|
+ showAlert(html, func, title);
|
|
|
+ $('#update_button').hide();
|
|
|
+ init();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
var test =
|