svn: /web/doc-editor/trunk/js/ locale/fr.js ui/component/NotInENGrid.js ui/component/PendingCommitGrid.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Mon, 16 Nov 2009 23:02:21 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290847
Log:
Mor logic into NotInEN module & subMenu in Pending Commit for this file
Changed paths:
U web/doc-editor/trunk/js/locale/fr.js
U web/doc-editor/trunk/js/ui/component/NotInENGrid.js
U web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
svn-diffs-290847.txt
(text/x-diff, 9.8 KB)
Modified: web/doc-editor/trunk/js/locale/fr.js
===================================================================
--- web/doc-editor/trunk/js/locale/fr.js 2009-11-16 22:52:00 UTC (rev 290846)
+++ web/doc-editor/trunk/js/locale/fr.js 2009-11-16 23:02:21 UTC (rev 290847)
@@ -10,6 +10,7 @@
// Generic
+i18n["Cancel this deletion"] = "Annuler cette suppression";
i18n["anonymous"] = "Utilisateur anonyme";
i18n["Close"] = "Fermer";
i18n["Confirm"] = "Confirmation";
Modified: web/doc-editor/trunk/js/ui/component/NotInENGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/NotInENGrid.js 2009-11-16 22:52:00 UTC (rev 290846)
+++ web/doc-editor/trunk/js/ui/component/NotInENGrid.js 2009-11-16 23:02:21 UTC (rev 290847)
@@ -142,50 +142,56 @@
{
var storeRecord = grid.store.getAt(rowIndex),
FilePath = storeRecord.data.path,
- FileName = storeRecord.data.name,
- FileID = Ext.util.md5('FNIEN-' + phpDoc.userLang + FilePath + FileName);
+ FileName = storeRecord.data.name;
+ this.openFile(FilePath, FileName);
- // Render only if this tab don't exist yet
- if (!Ext.getCmp('main-panel').findById('FNIEN-' + FileID)) {
+ }
+ },
- Ext.getCmp('main-panel').add(
- {
- id : 'FNIEN-' + FileID,
- layout : 'border',
- title : FileName,
- originTitle : FileName,
- iconCls : 'iconTabView',
- closable : true,
- defaults : { split : true },
- tabTip : String.format(
- _('Not In EN: in {0}'), FilePath
- ),
- items : [
- new ui.component.FilePanel(
- {
- id : 'FNIEN-NotInEN-PANEL-' + FileID,
- region : 'center',
- title : _('File: ') + FilePath + FileName,
- prefix : 'FNIEN',
- ftype : 'NotInEN',
- fid : FileID,
- fpath : FilePath,
- fname : FileName,
- readOnly : true,
- lang : phpDoc.userLang,
- parser : 'xml',
- storeRecord : storeRecord,
- syncScroll : false
- })
- ]
- });
- Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
+ openFile : function(FilePath, FileName) {
- } else {
- // This tab already exist. We focus it.
- Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
- }
+ var FileID = Ext.util.md5('FNIEN-' + phpDoc.userLang + FilePath + FileName);
+
+ // Render only if this tab don't exist yet
+ if (!Ext.getCmp('main-panel').findById('FNIEN-' + FileID)) {
+
+ Ext.getCmp('main-panel').add(
+ {
+ id : 'FNIEN-' + FileID,
+ layout : 'border',
+ title : FileName,
+ originTitle : FileName,
+ iconCls : 'iconTabView',
+ closable : true,
+ defaults : { split : true },
+ tabTip : String.format(
+ _('Not In EN: in {0}'), FilePath
+ ),
+ items : [
+ new ui.component.FilePanel(
+ {
+ id : 'FNIEN-NotInEN-PANEL-' + FileID,
+ region : 'center',
+ title : _('File: ') + FilePath + FileName,
+ prefix : 'FNIEN',
+ ftype : 'NotInEN',
+ fid : FileID,
+ fpath : FilePath,
+ fname : FileName,
+ readOnly : true,
+ lang : phpDoc.userLang,
+ parser : 'xml',
+ storeRecord : '',
+ syncScroll : false
+ })
+ ]
+ });
+ Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
+
+ } else {
+ // This tab already exist. We focus it.
+ Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
}
},
Modified: web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-11-16 22:52:00 UTC (rev 290846)
+++ web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-11-16 23:02:21 UTC (rev 290847)
@@ -322,63 +322,35 @@
iconCls : 'iconView',
handler : function()
{
- var storeRecord = this.grid.store.getAt(this.rowIdx),
- FilePath = storeRecord.data.path,
- FileName = storeRecord.data.name,
- FileID = Ext.util.md5('FNIEN-' + phpDoc.userLang + FilePath + FileName);
-
-
- // Render only if this tab don't exist yet
- if (!Ext.getCmp('main-panel').findById('FNIEN-' + FileID)) {
-
- Ext.getCmp('main-panel').add(
- {
- id : 'FNIEN-' + FileID,
- layout : 'border',
- title : FileName,
- originTitle : FileName,
- iconCls : 'iconTabView',
- closable : true,
- defaults : { split : true },
- tabTip : String.format(
- _('Not In EN: in {0}'), FilePath
- ),
- items : [
- new ui.component.FilePanel(
- {
- id : 'FNIEN-NotInEN-PANEL-' + FileID,
- region : 'center',
- title : _('File: ') + FilePath + FileName,
- prefix : 'FNIEN',
- ftype : 'NotInEN',
- fid : FileID,
- fpath : FilePath,
- fname : FileName,
- readOnly : true,
- lang : '',
- parser : 'xml',
- storeRecord : storeRecord,
- syncScroll : false
- })
- ]
- });
- Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
-
- } else {
- // This tab already exist. We focus it.
- Ext.getCmp('main-panel').setActiveTab('FNIEN-' + FileID);
- }
+ this.grid.fireEvent('rowdblclick',
+ this.grid, this.rowIdx, this.event
+ );
}
}, {
scope : this,
- text : '<b>' + _('Cancel') + '<b>',
+ text : _('Cancel this deletion'),
iconCls : 'iconPageDelete',
disabled : (phpDoc.userLogin === 'anonymous'),
handler : function()
{
+
+ var storeRecord = this.grid.store.getAt(this.rowIdx),
+ FilePath = storeRecord.data.path,
+ FileName = storeRecord.data.name
+
+ tmp = new ui.task.ClearLocalChangeTask({
+ storeRecord : storeRecord,
+ ftype : 'delete',
+ fpath : FilePath,
+ fname : FileName
+ });
+/*
this.grid.fireEvent('rowdblclick',
this.grid, this.rowIdx, this.event
);
+*/
+
+
}
}, '-', new ui.component._PendingCommitGrid.menu.common({
rowIdx : this.rowIdx
@@ -470,12 +442,12 @@
}
if (FileType === 'delete') {
- tmp = new ui.task.ClearLocalChangeTask({
- storeRecord : storeRecord,
- ftype : FileType,
- fpath : FilePath,
- fname : FileName
- });
+
+ // CleanUp the path - Del the first element => LANG (Automatic added by FilePanel.js)
+ tmp = FilePath.split('/');
+ tmp.shift();
+
+ ui.component.NotInENGrid.getInstance().openFile('/' + tmp.join('/'), FileName);
}
}
},