cvs: doc-editor /js main.js /js/locale fr.js /themes style.css /themes/img folder-open.gif folder.gif
| From: | Yannick Torres | Date: | Wed, 15 Apr 2009 14:59:59 +0000 |
| Subject: | cvs: doc-editor /js main.js /js/locale fr.js /themes style.css /themes/img folder-open.gif folder.gif | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3736@lists.php.net to get a copy of this message | ||
yannick Wed Apr 15 14:59:59 2009 UTC
Added files:
/doc-editor/themes/img folder.gif folder-open.gif
Modified files:
/doc-editor/js/locale fr.js
/doc-editor/js main.js
/doc-editor/themes style.css
Log:
# Add a contextMenu for "All files" module. On Folder, you can expand (or collapse), and
on Files, you can "Edit in new tab" and open the same file in EN (or LANG)
# Fix a small i18n issue (Repository string)
http://cvs.php.net/viewvc.cgi/doc-editor/js/locale/fr.js?r1=1.1&r2=1.2&diff_format=u
Index: doc-editor/js/locale/fr.js
diff -u doc-editor/js/locale/fr.js:1.1 doc-editor/js/locale/fr.js:1.2
--- doc-editor/js/locale/fr.js:1.1 Tue Apr 14 21:31:34 2009
+++ doc-editor/js/locale/fr.js Wed Apr 15 14:59:59 2009
@@ -102,9 +102,10 @@
i18n["You can\'t do this action as cvsread user."] = "Vous ne pouvez pas
effectuer cette action avec l'utilisateur cvsread.";
i18n["Do you want to be alerted ?"] = "Voulez-vous être averti ?";
i18n["If you want to be notified when your patch will be dealt with, thank you to leave an
email address below."] = "Si vous voulez être averti lors du traitement de votre patch,
merci de laisser une adresse email ci-dessous.";
-i18n[""] = "";
-
-
+i18n["Collapse"] = "Plier ce dossier";
+i18n["Expand"] = "Déplier ce dossier";
+i18n["Open the same file in <b>{0}</b>"] = "Ouvrir le même fichier en
<b>{0}</b>";
+i18n["Repository"] = "Dépôt Cvs";
// Main Menu
i18n["Main Menu"] = "Menu principal";
http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.30&r2=1.31&diff_format=u
Index: doc-editor/js/main.js
diff -u doc-editor/js/main.js:1.30 doc-editor/js/main.js:1.31
--- doc-editor/js/main.js:1.30 Wed Apr 15 12:20:19 2009
+++ doc-editor/js/main.js Wed Apr 15 14:59:59 2009
@@ -6258,6 +6258,81 @@
bodyBorder: false,
listeners: {
scope: this,
+ contextmenu: function(node, e){
+
+ var menu, expandSubMenu, FileName, FilePath, t, FileLang, OtherFileLibel,
OtherFilePath;
+ node.select();
+
+ if (node.attributes.type === 'folder' || node.isRoot ) {
+
+ if( node.isExpanded() ) {
+ expandSubMenu = {
+ text:
'<b>'+_('Collapse')+'</b>',
+ iconCls: 'iconFolderClose',
+ scope: this,
+ handler: function() { node.collapse(); }
+ };
+ }
+ else {
+ expandSubMenu = {
+ text:
'<b>'+_('Expand')+'</b>',
+ iconCls: 'iconFolderClose',
+ scope: this,
+ handler: function() { node.expand(); }
+ };
+ }
+
+ menu = new Ext.menu.Menu({
+ items: [expandSubMenu]
+ });
+ menu.showAt(e.getXY());
+
+ } else if (node.attributes.type === 'file') {
+
+ FileName = node.attributes.text;
+ FilePath = node.attributes.id;
+
+ // CleanUp the path
+ t = FilePath.split('/');
+ t.shift();
+ t.shift();
+ t.pop();
+
+ FileLang = t[0];
+ t.shift();
+
+ FilePath = t.join('/') + '/';
+
+ if( FileLang === 'en' ) {
+ OtherFileLibel = String.format(_('Open the same file in
<b>{0}</b>'), this.userLang);
+ OtherFilePath = this.userLang+FilePath;
+
+ } else {
+ OtherFileLibel = String.format(_('Open the same file in
<b>{0}</b>'), 'en');
+ OtherFilePath = 'en'+FilePath;
+ }
+
+ menu = new Ext.menu.Menu({
+ items: [{
+ text: '<b>'+_('Edit in a new
Tab')+'</b>',
+ iconCls: 'iconTabNeedReviewed',
+ scope: this,
+ handler: function() {
+ this.treeAllFiles.fireEvent('dblclick', node);
+ }
+ },{
+ text: OtherFileLibel,
+ iconCls: 'iconTabNeedReviewed',
+ scope: this,
+ handler: function() {
+ this.openFile(OtherFilePath, FileName);
+ }
+ }]
+ });
+ menu.showAt(e.getXY());
+
+ }
+ },
dblclick: function(node, e){
var FileLang, FileName, FilePath, FileID, t, parserFile, storeLog, sm,
gridLog, panelWest, panelCenter, menuMarkUp = '';
@@ -6631,7 +6706,7 @@
// set the root node
this.treeAllFilesRoot = new Ext.tree.AsyncTreeNode({
- text: 'Repository',
+ text: _('Repository'),
draggable: false, // disable root node dragging
id: '/'
});
http://cvs.php.net/viewvc.cgi/doc-editor/themes/style.css?r1=1.7&r2=1.8&diff_format=u
Index: doc-editor/themes/style.css
diff -u doc-editor/themes/style.css:1.7 doc-editor/themes/style.css:1.8
--- doc-editor/themes/style.css:1.7 Sat Apr 11 15:39:08 2009
+++ doc-editor/themes/style.css Wed Apr 15 14:59:59 2009
@@ -255,6 +255,10 @@
background-image: url(../themes/img/arrow_refresh.png) !important;
} .iconDelete {
background-image: url(../themes/img/delete.png) !important;
+} .iconFolderOpen {
+ background-image: url(../themes/img/folder-open.gif) !important;
+} .iconFolderClose {
+ background-image: url(../themes/img/folder.gif) !important;
} .iconTabNeedReviewed {
background-image: url(../themes/img/page_edit.png) !important;
} .iconTabError {