svn: /web/doc-editor/trunk/js/ui/component/ PendingCommitGrid.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Fri, 11 Dec 2009 06:54:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291970
Log:
Fix bug when we open a EN modified file from PendingGrid
Changed paths:
U web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
Modified: web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-12-11 06:53:31 UTC (rev 291969)
+++ web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-12-11 06:54:20 UTC (rev 291970)
@@ -459,23 +459,30 @@
FileType = storeRecord.data.type,
FilePath = storeRecord.data.path,
FileName = storeRecord.data.name,
- tmp;
+ FileLang, tmp;
if (FileType === 'update') {
- // Find the id of this row into StaleFileGrid.store and open it !
tmp = FilePath.split('/');
+ FileLang = tmp[0];
tmp.shift();
FilePath = "/" + tmp.join('/');
- ui.component.StaleFileGrid.getInstance().store.each(function(row) {
+ // For EN file, we open this new file into the "All files" module
+ if( FileLang === 'en' ) {
+ ui.component.RepositoryTree.getInstance().openFile(FileLang+FilePath, FileName);
+ } else {
- if( (row.data['path']) === FilePath && row.data['name'] === FileName ) {
- ui.component.StaleFileGrid.getInstance().openFile(row.data.id);
- }
- });
+ // Find the id of this row into StaleFileGrid.store and open it !
+ ui.component.StaleFileGrid.getInstance().store.each(function(row) {
+ if( (row.data['path']) === FilePath && row.data['name'] === FileName ) {
+ ui.component.StaleFileGrid.getInstance().openFile(row.data.id);
+ }
+ });
+ }
+
}
if (FileType === 'delete') {