svn: /web/doc-editor/trunk/js/ locale/fr.js ui/component/MainMenu.js ui/task/CheckBuildTask.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Thu, 17 Dec 2009 06:47:21 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=292234
Log:
Disallow a new checkBuild for a language if there is one in progress
Changed paths:
U web/doc-editor/trunk/js/locale/fr.js
U web/doc-editor/trunk/js/ui/component/MainMenu.js
U web/doc-editor/trunk/js/ui/task/CheckBuildTask.js
Modified: web/doc-editor/trunk/js/locale/fr.js
===================================================================
--- web/doc-editor/trunk/js/locale/fr.js 2009-12-17 06:35:25 UTC (rev 292233)
+++ web/doc-editor/trunk/js/locale/fr.js 2009-12-17 06:47:21 UTC (rev 292234)
@@ -130,6 +130,11 @@
i18n["update in progress..."] = "Mise en jour en cours...";
i18n["Verify if there is an update in progress. Please, wait..."] = "Vérification de l\'état de la mise à jour. Merci de patienter...";
i18n["There is currently an update in progress.<br/>You can\'t perform an update now."] = "Il y a actuellement une mise à jour en cours.<br/>Vous ne pouvez pas l\'effectuer maintenant";
+
+
+i18n["Verify if there is a check in progress. Please, wait..."] = "Vérification s\'il y a une vérification de la compilation ce langage en cours. Merci de patienter...";
+i18n["There is currently a check in progress for this language.<br/>You can\'t perform a new check now."] = "Il y a actuellement une vérification de la compilation de ce langage en cours.<br/>Vous ne pouvez pas effectuer un maintenant.";
+
i18n["in {0}"] = "dans le dossier {0}";
i18n["Up to date files"] = "Fichiers à jour";
i18n["Stale files"] = "Fichiers à mettre à jour";
@@ -165,6 +170,8 @@
i18n["Check Build"] = "Vérifier la compilation";
i18n["Go !"] = "Commencer !";
i18n["Please, wait until the build is checked..."] = "Merci de patienter pendant la vérification.";
+ i18n["Check Build Result for {0}"] = "Résultat de la compilation pour {0}";
+ i18n["Check Build Result for the documentation {0}"] = "Résultat de la compilation pour la documentation {0}";
i18n["Last failed build for {0}"] = "Dernier échec pour {0}";
i18n["Last failed build for the documentation {0}"] = "Dernier échec pour la documentation {0}";
i18n["You're about to check the build via this command:"] = "Vous allez vérifier la compilation avec la commande suivante :";
Modified: web/doc-editor/trunk/js/ui/component/MainMenu.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/MainMenu.js 2009-12-17 06:35:25 UTC (rev 292233)
+++ web/doc-editor/trunk/js/ui/component/MainMenu.js 2009-12-17 06:47:21 UTC (rev 292234)
@@ -55,9 +55,42 @@
iconCls : 'checkBuild',
handler : function()
{
- var tmp = new ui.component.CheckBuildPrompt().show(
- Ext.get('acc-need-update')
+ // We test if there is a check in progress for this language
+ Ext.getBody().mask(
+ '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' +
+ _('Verify if there is a check in progress. Please, wait...')
);
+
+ XHR({
+ params :
+ {
+ task : 'checkLockFile',
+ lockFile : 'lock_check_build_' + phpDoc.userLang
+ },
+ success : function()
+ {
+ // Remove wait msg
+ Ext.getBody().unmask();
+
+ Ext.MessageBox.show({
+ title : _('Status'),
+ msg : _('There is currently a check in progress for this language.<br/>' +
+ 'You can\'t perform a new check now.'),
+ buttons : Ext.MessageBox.OK,
+ icon : Ext.MessageBox.INFO
+ });
+ },
+ failure : function()
+ {
+ // Remove wait msg
+ Ext.getBody().unmask();
+
+ var tmp = new ui.component.CheckBuildPrompt().show(
+ Ext.get('acc-need-update')
+ );
+
+ }
+ });
}
}, {
text : _('EN tools'),
Modified: web/doc-editor/trunk/js/ui/task/CheckBuildTask.js
===================================================================
--- web/doc-editor/trunk/js/ui/task/CheckBuildTask.js 2009-12-17 06:35:25 UTC (rev 292233)
+++ web/doc-editor/trunk/js/ui/task/CheckBuildTask.js 2009-12-17 06:47:21 UTC (rev 292234)
@@ -17,20 +17,21 @@
ui.task.PingTask.getInstance().delay(30000);
// Display
- if ( Ext.getCmp('main-panel').findById('check_build_panel') ) {
- Ext.getCmp('main-panel').remove('check_build_panel');
+ if ( Ext.getCmp('main-panel').findById('check_build_panel_' + phpDoc.userLang) ) {
+ Ext.getCmp('main-panel').remove('check_build_panel_' + phpDoc.userLang);
}
Ext.getCmp('main-panel').add({
xtype : 'panel',
- id : 'check_build_panel',
- title : _('Check Build Result'),
+ id : 'check_build_panel_' + phpDoc.userLang,
+ title : String.format(_('Check Build Result for {0}'),Ext.util.Format.uppercase(phpDoc.userLang)),
+ tabTip : String.format(_('Check Build Result for the documentation {0}'), Ext.util.Format.uppercase(phpDoc.userLang)),
closable : true,
autoScroll : true,
iconCls : 'checkBuild',
html : '<div class="check-build-content">' + o.mess + '</div>'
});
- Ext.getCmp('main-panel').setActiveTab('check_build_panel');
+ Ext.getCmp('main-panel').setActiveTab('check_build_panel_' + phpDoc.userLang);
}
});
};