From 1353d1753c208eb818b33507357869901c5fc452 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 16 Aug 2013 09:57:39 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=ACuploadify=EF=BC=8C=E7=94=B1=E4=BA=8Eapi=E4=B8=8E?= =?UTF-8?q?=E6=97=A7=E7=89=88=E4=B8=8D=E5=90=8C=EF=BC=8C=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=A6=86=E7=9B=96=E6=97=A7=E7=89=88=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86dataservice=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=97=B6ajax=E7=8A=B6=E6=80=81=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/js/lib/custom/models/dataservice.js | 17 +- htdocs/js/lib/uploadify/jquery.uploadify.js | 986 ++++++++++++++++++ .../js/lib/uploadify/jquery.uploadify.min.js | 16 + htdocs/js/lib/uploadify/uploadify-cancel.png | Bin 0 -> 2960 bytes htdocs/js/lib/uploadify/uploadify.css | 92 ++ htdocs/js/lib/uploadify/uploadify.swf | Bin 0 -> 12767 bytes 6 files changed, 1110 insertions(+), 1 deletion(-) create mode 100644 htdocs/js/lib/uploadify/jquery.uploadify.js create mode 100644 htdocs/js/lib/uploadify/jquery.uploadify.min.js create mode 100644 htdocs/js/lib/uploadify/uploadify-cancel.png create mode 100644 htdocs/js/lib/uploadify/uploadify.css create mode 100644 htdocs/js/lib/uploadify/uploadify.swf diff --git a/htdocs/js/lib/custom/models/dataservice.js b/htdocs/js/lib/custom/models/dataservice.js index 99441dfc..6e64a602 100644 --- a/htdocs/js/lib/custom/models/dataservice.js +++ b/htdocs/js/lib/custom/models/dataservice.js @@ -1,9 +1,13 @@ var westdc = {}; westdc.dataservice = { //wsn 选择数据 - choiceData : function(uuid) + choiceData : function(uuid,btn) { this.uuid = uuid; + _btn = { + html : $(btn).html(), + onclick : $(btn).attr('onclick') + }; $.ajax({ 'type':"POST", @@ -30,6 +34,16 @@ westdc.dataservice = { }, 'timeout': 30000, + 'beforeSend': function(){ + $(btn).attr('onclick',''); + $(btn).html("加载中..."); + $(btn).addClass('disabled'); + }, + 'complete': function(){ + $(btn).attr('onclick', _btn.onclick); + $(btn).html(_btn.html); + $(btn).removeClass('disabled'); + }, 'error': function(){ alert('出现错误,请刷新后重试'); } @@ -113,6 +127,7 @@ westdc.dataservice.wsn = { this.input = new Array(); for(i in data.data) { + for(i in data.data) this.li = '