svn: /web/doc-editor/trunk/js/ui/component/ MainMenu.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Sun, 28 Mar 2010 19:58:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297010
Log:
CleanUp the way we check if there is an updateData in progress
Changed paths:
U web/doc-editor/trunk/js/ui/component/MainMenu.js
Modified: web/doc-editor/trunk/js/ui/component/MainMenu.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/MainMenu.js 2010-03-28 19:57:36 UTC (rev 297009)
+++ web/doc-editor/trunk/js/ui/component/MainMenu.js 2010-03-28 19:58:12 UTC (rev 297010)
@@ -84,27 +84,23 @@
XHR({
params : {
- task : 'getLastUpdate',
- type : 'data'
+ task : 'checkLockFile',
+ lockFiles : 'project_' + PhDOE.project + '_lock_update_repository|project_' + PhDOE.project + '_lock_apply_tools'
},
- success : function(response)
+ success : function()
{
// Remove wait msg
Ext.getBody().unmask();
-
- var o = Ext.util.JSON.decode(response.responseText);
-
- if( o.lastupdate === 'in_progress' ) {
- Ext.MessageBox.show({
- title : _('Status'),
- msg : _('There is currently an update in progress.<br/>' +
- 'You can\'t perform an update now.'),
- buttons : Ext.MessageBox.OK,
- icon : Ext.MessageBox.INFO
- });
- } else {
- new ui.component.SystemUpdatePrompt().show(Ext.get('acc-need-update'));
- }
+ Ext.MessageBox.show({
+ title : _('Status'),
+ msg : _('There is currently an update in progress.<br/>You can\'t perform an update now.'),
+ buttons : Ext.MessageBox.OK,
+ icon : Ext.MessageBox.INFO
+ });
+ },
+ failure: function() {
+ Ext.getBody().unmask();
+ new ui.component.SystemUpdatePrompt().show(Ext.get('acc-need-update'));
}
});
}
@@ -137,8 +133,7 @@
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.'),
+ 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
});