From 641a062124f3467880978143504be74dba547443 Mon Sep 17 00:00:00 2001 From: manolobevia Date: Fri, 9 Dec 2011 18:51:22 +0000 Subject: [PATCH] NIHVIVO-3468: Started work for adding progress indicator to autocomplete fields --- webapp/web/css/account/account.css | 8 ++++ webapp/web/images/indicatorWhite.gif | Bin 0 -> 1542 bytes .../web/js/account/accountProxyItemsPanel.js | 37 ++++++++++++++++++ webapp/web/js/account/proxyUtils.js | 1 + .../body/manageproxies/manageProxies-list.ftl | 8 ++-- 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 webapp/web/images/indicatorWhite.gif diff --git a/webapp/web/css/account/account.css b/webapp/web/css/account/account.css index f9e4a45df..7aa32d239 100644 --- a/webapp/web/css/account/account.css +++ b/webapp/web/css/account/account.css @@ -470,4 +470,12 @@ h4.profile-editors { .proxy-item { margin-left: 20px; margin-top: 20px; +} +span[name=proxySelectorSearchStatus] { + color: red; +} +img.loading-relateEdior, +img.loading-relateProfile, +img.loading-addProfile { + padding-left: 10px; } \ No newline at end of file diff --git a/webapp/web/images/indicatorWhite.gif b/webapp/web/images/indicatorWhite.gif new file mode 100644 index 0000000000000000000000000000000000000000..529e72f45a2395e2eddb0487edbe79b306c92c3a GIT binary patch literal 1542 zcma)+ZA?>F7{_}rw{MqAdn^?TGVN^(w7}TqO{+3&F9nJ+R*E<<0&OXdX^es|GZF{4 zEl^%(9lp{U!Tk6YH4YyudgpHEiEi8)M~XPNk&IU z<2VigpuIfr-T(i>=Y2DhH)SO$HOVnigb(Dsi9bi^OfNlh;gy9lX!QL;2?>26z1K#P zV&uBmc3ztB!JQGe3%xin-RaY+qK3d98fkvdQN;t{oK0gq+21S5uC5%{i0Rkv4w<&D zJMjZD7~PJ7Ws}GES&9V@nF^RLDT|DSF@(;5sRA*CvH-&fm&e1b*w01Co_GW)!WWmq zeOZb@C}{*uR%lI>L5yacs>LSc&yub>OO|tgQr{&M!Pxk;eM1c&ROwWXCzb>?PAMLC z1GC6JXDUc(-m@u3aTC6;$74tGFI<-5LO#4LoR#vKh>|j7m0)u&+#r4f3us)g0tH^I zt;E*mux|86(!S&sVn}Jx(E{rR@KAZe3V3OQgh*I9umtZKPs|XRegw&V z*XWil!;da!)+BwsQ-QH9Pg^G5XT1P$nS_y40Tsy z{=wwwR=Ec@H0)=_Eu4eUa{DduV&e41fhwT}-kHt$uA zb}g8vv`P8=DavZKF<526AnGep^efD4R7poT41ZImDN+S_C?KFCwamgWUZJk`!~ zT#=Z`F1h2n%sgVJokp-VKc_!QT=Ag>&W4N}ZVs1IETePLkb?bUKWr#oNjnpyd9k)?!4M?%;92?~PwtjZ=-!&#>4sNe7_}r$O zson-Y-4)nvlJpZQC&U&6uKs?SCVNj09n8wAFu|P76)3h_vPe_N8`*{Q?^VX)r(?M%vvE=b?K;_!f8 z85)&S&2)|t3TrI%&F?Itlg^Dg1pG215&^1RM0`E5g%-D^w{1v;Ej@GFf#$mhQ?td50gdL-SzT{X6={H?<9MQh zTO&IDmziQe=nz0T8Ju01Xm47?mb69O*PU)%;OZFgx!P8>>(A#M=fWq3vBN`3q^FtF zv|HfcX=>^}AYVq9-PJrn@MXK6`Md#U4{x3jGJ<^XDaW#fs!Er#ODIP}1U_W7@EKVI zd^M_Eg2^QQ6DZ*yoe{9k_B%akiPtknp;_KPPaEMp_N?@h(ODHk$K`ainr|-+$frDT zQKU?@eheS0B!m-{o=?N*C;UFVSv* literal 0 HcmV?d00001 diff --git a/webapp/web/js/account/accountProxyItemsPanel.js b/webapp/web/js/account/accountProxyItemsPanel.js index 335d0c338..fc354bd25 100644 --- a/webapp/web/js/account/accountProxyItemsPanel.js +++ b/webapp/web/js/account/accountProxyItemsPanel.js @@ -185,4 +185,41 @@ $(document).ready(function() { } this["proxyItemsPanel"] = new proxyItemsPanel(this, context); }); + + //Add progress indicator for autocomplete input fields + + var inputClick; + + $('#selectProfileEditors').click(function(){ + inputClick = ".loading-relateEditor"; + }); + + $('#selectProfiles').click(function(){ + inputClick = ".loading-relateProfile"; + }); + + $('#addProfile').click(function(){ + inputClick = ".loading-addProfile"; + }); + + + $(document).ajaxStart(function(){ + if (inputClick = ".loading-relateProfile"){ + $('.loading-relateProfile').removeClass('hidden').css('display', 'inline-block'); + }else if (inputClick = ".loading-addProfile"){ + $('.loading-addProfile').removeClass('hidden').css('display', 'inline-block'); + }else if (inputClick = ".loading-relateEditor"){ + $('.loading-relateEditor').removeClass('hidden').css('display', 'inline-block'); + } + }); + + $(document).ajaxStop(function(){ + if (inputClick = ".loading-relateProfile"){ + $('.loading-relateProfile').hide().addClass('hidden');; + }else if (inputClick = ".loading-addProfile"){ + $('.loading-addProfile').hide().addClass('hidden');; + }else if (inputClick = ".loading-relateEditor"){ + $('.loading-relateEditor').hide().addClass('hidden');; + } + }); }); diff --git a/webapp/web/js/account/proxyUtils.js b/webapp/web/js/account/proxyUtils.js index ea5f58890..0e41e250e 100644 --- a/webapp/web/js/account/proxyUtils.js +++ b/webapp/web/js/account/proxyUtils.js @@ -4,6 +4,7 @@ $(document).ready(function(){ //Remove initial value of input text 'Select an existing last name' $('input[name="proxySelectorAC"]').click(function(){ $(this).val(''); + $("span[name='proxySelectorSearchStatus']").text('') }); //Alert when user doesn't select an editor and a profile after submitting from for relating proxy-profiles diff --git a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl index 16a241e86..efe74bd6b 100644 --- a/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl +++ b/webapp/web/templates/freemarker/body/manageproxies/manageProxies-list.ftl @@ -30,7 +30,7 @@
- +

 

<#-- Magic div that holds all of the proxy data and the template that shows how to display it. --> @@ -61,8 +61,8 @@ Select profiles
- - + +

 

@@ -140,7 +140,7 @@
- +

 

${r.proxyInfos[0].profileUri}