cvs: doc-editor /js main.js /js/locale fr.js
| From: | Yannick Torres | Date: | Thu, 16 Apr 2009 20:11:00 +0000 |
| Subject: | cvs: doc-editor /js main.js /js/locale fr.js | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3758@lists.php.net to get a copy of this message | ||
yannick Thu Apr 16 20:11:00 2009 UTC
Modified files:
/doc-editor/js/locale fr.js
/doc-editor/js main.js
Log:
# Fix small i18n issue
# When we clear change, the red mark is now remove in differents stores like
storeFilesNeedReviewed, storeFilesNeedUpdate, storeFilesError and in treeAllFiles is the file is
rendered
http://cvs.php.net/viewvc.cgi/doc-editor/js/locale/fr.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/locale/fr.js diff -u doc-editor/js/locale/fr.js:1.3 doc-editor/js/locale/fr.js:1.4 --- doc-editor/js/locale/fr.js:1.3 Thu Apr 16 17:41:14 2009 +++ doc-editor/js/locale/fr.js Thu Apr 16 20:11:00 2009 @@ -25,7 +25,7 @@ i18n["Maintainer"] = "Mainteneur"; i18n["Path"] = "Chemin"; i18n["No Files"] = "Aucun fichier"; -i18n["Please, Wait..."] = "Veuillez patienter..."; +i18n["Please, wait..."] = "Veuillez patienter..."; i18n["Loading..."] = "Chargement..."; i18n["Saving data..."] = "Enregistrement des données..."; i18n["Rev."] = "Ver."; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.33&r2=1.34&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.33 doc-editor/js/main.js:1.34 --- doc-editor/js/main.js:1.33 Thu Apr 16 17:44:14 2009 +++ doc-editor/js/main.js Thu Apr 16 20:11:00 2009 @@ -3783,7 +3783,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -3927,7 +3927,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -5069,7 +5069,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -5118,6 +5118,8 @@ function goClearChange(btn){ if (btn === 'yes') { + Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); + // Before clear local change, we close the file if there is open if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + FilePath + FileName))) { Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + FilePath + FileName)); @@ -5136,6 +5138,8 @@ var o = Ext.util.JSON.decode(action.responseText); if (o.success) { + var node; + if (this.userLang === 'en') { // We reload all store this.storeFilesNeedUpdate.reload(); @@ -5148,9 +5152,39 @@ // We fire event add to update the file count this.storePendingCommit.fireEvent('add', this.storePendingCommit); - + + // We try to search in others stores if this file is marked as needCommit + + // trow storeFilesNeedReviewed + this.storeFilesNeedReviewed.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // trow storeFilesNeedUpdate + this.storeFilesNeedUpdate.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // trow FileError + this.storeFilesError.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // find open node in All Files modules + node = this.treeAllFiles.getNodeById('//'+FilePath+FileName); + if( node ) { + node.getUI().removeClass('modified'); + } + Ext.getBody().unmask(); } else { + Ext.getBody().unmask(); this.winForbidden(); } @@ -5283,7 +5317,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({
http://cvs.php.net/viewvc.cgi/doc-editor/js/locale/fr.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/locale/fr.js diff -u doc-editor/js/locale/fr.js:1.3 doc-editor/js/locale/fr.js:1.4 --- doc-editor/js/locale/fr.js:1.3 Thu Apr 16 17:41:14 2009 +++ doc-editor/js/locale/fr.js Thu Apr 16 20:11:00 2009 @@ -25,7 +25,7 @@ i18n["Maintainer"] = "Mainteneur"; i18n["Path"] = "Chemin"; i18n["No Files"] = "Aucun fichier"; -i18n["Please, Wait..."] = "Veuillez patienter..."; +i18n["Please, wait..."] = "Veuillez patienter..."; i18n["Loading..."] = "Chargement..."; i18n["Saving data..."] = "Enregistrement des données..."; i18n["Rev."] = "Ver."; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.33&r2=1.34&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.33 doc-editor/js/main.js:1.34 --- doc-editor/js/main.js:1.33 Thu Apr 16 17:44:14 2009 +++ doc-editor/js/main.js Thu Apr 16 20:11:00 2009 @@ -3783,7 +3783,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -3927,7 +3927,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -5069,7 +5069,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({ @@ -5118,6 +5118,8 @@ function goClearChange(btn){ if (btn === 'yes') { + Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); + // Before clear local change, we close the file if there is open if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + FilePath + FileName))) { Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + FilePath + FileName)); @@ -5136,6 +5138,8 @@ var o = Ext.util.JSON.decode(action.responseText); if (o.success) { + var node; + if (this.userLang === 'en') { // We reload all store this.storeFilesNeedUpdate.reload(); @@ -5148,9 +5152,39 @@ // We fire event add to update the file count this.storePendingCommit.fireEvent('add', this.storePendingCommit); - + + // We try to search in others stores if this file is marked as needCommit + + // trow storeFilesNeedReviewed + this.storeFilesNeedReviewed.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // trow storeFilesNeedUpdate + this.storeFilesNeedUpdate.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // trow FileError + this.storeFilesError.each(function(record){ + if ((this.userLang+record.data.path) === FilePath && record.data.name === FileName) { + record.set('needcommit', false); + } + }, this); + + // find open node in All Files modules + node = this.treeAllFiles.getNodeById('//'+FilePath+FileName); + if( node ) { + node.getUI().removeClass('modified'); + } + Ext.getBody().unmask(); } else { + Ext.getBody().unmask(); this.winForbidden(); } @@ -5283,7 +5317,7 @@ }); Ext.getCmp('main-panel').setActiveTab('diff_panel_' + rowIndex); - Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, Wait...')); + Ext.get('diff_panel_' + rowIndex).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); // Load diff data Ext.Ajax.request({