|
From: Thyamad c. <th...@us...> - 2005-09-08 20:36:37
|
Update of /cvsroot/thyapi/thyapi/thyutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4425/thyutils Modified Files: thyconnector.js Log Message: Commiting file additions and modification from SVN revision 1918 to 1919... Changes made by rpereira on 2005-09-08 22:51:20 +0200 (Thu, 08 Sep 2005) corresponding to SVN revision 1919 with message: - thyConnector uses default messages (closes 1285343) - thyBase depends on DynLayerInline (closes 1285349) Index: thyconnector.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thyconnector.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** thyconnector.js 1 Sep 2005 18:15:38 -0000 1.4 --- thyconnector.js 8 Sep 2005 20:36:29 -0000 1.5 *************** *** 24,27 **** --- 24,30 ---- * It is also responsible to inform user about connection status. * + * By default, all requests are signaled using the default messages present + * on GLOBALS['thyapi']['connector']['defaultMessages'] + * */ function thyConnector() *************** *** 47,51 **** this.progressContents[2] = {}; this.progressContents[3] = {}; ! } --- 50,61 ---- this.progressContents[2] = {}; this.progressContents[3] = {}; ! ! if (typeof(GLOBALS) == 'object' && ! typeof(GLOBALS['thyapi']) == 'object' && ! typeof(GLOBALS['thyapi']['connector']) == 'object' && ! typeof(GLOBALS['thyapi']['connector']['defaultMessages']) == 'object') ! { ! this.progressContents['default'] = GLOBALS['thyapi']['connector']['defaultMessages']; ! } } *************** *** 381,389 **** p._setProgressState = function (id, state) { switch (state) { case 0: case 4: - if (!this._progressHolder[id]) return; this._progressHolder[id].setVisible(false); break; --- 391,400 ---- p._setProgressState = function (id, state) { + if (!this._progressHolder[id]) return; + switch (state) { case 0: case 4: this._progressHolder[id].setVisible(false); break; *************** *** 394,401 **** return; } - - if (!this._progressHolder[id]) return; ! this._progressHolder[id].setHTML(this.progressContents[state][id] || ''); this._progressHolder[id].setVisible(true); } --- 405,418 ---- return; } ! var msg; ! if (this.progressContents[state][id]) ! msg = this.progressContents[state][id]; ! else if (this.progressContents['default'][state]) ! msg = this.progressContents['default'][state]; ! else ! msg = ''; ! ! this._progressHolder[id].setHTML(msg); this._progressHolder[id].setVisible(true); } |