cvs: doc-editor /js main.js /js/locale fr.js /php ExtJsController.php class.php /themes style.css

From: Date: Sat, 16 May 2009 21:30:23 +0000
Subject: cvs: doc-editor /js main.js /js/locale fr.js /php ExtJsController.php class.php /themes style.css
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4027@lists.php.net to get a copy of this message
yannick Sat May 16 21:30:23 2009 UTC Modified files: /doc-editor/js/locale fr.js /doc-editor/js main.js /doc-editor/php class.php ExtJsController.php /doc-editor/themes style.css Log: - Add a new grid to view the result of the check build. Access via Main Menu => EN tools => Translation build status

http://cvs.php.net/viewvc.cgi/doc-editor/js/locale/fr.js?r1=1.14&r2=1.15&diff_format=u Index: doc-editor/js/locale/fr.js diff -u doc-editor/js/locale/fr.js:1.14 doc-editor/js/locale/fr.js:1.15 --- doc-editor/js/locale/fr.js:1.14 Sun May 3 07:04:43 2009 +++ doc-editor/js/locale/fr.js Sat May 16 21:30:22 2009 @@ -132,6 +132,9 @@ i18n["Remove this file"] = "Supprimer ce fichier"; i18n["This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action."] = "Voulez-vous marquer ce fichier comme devant être effacé ?<br/><br/>L'effacement sera effectif qu'une fois le commit émis.<br/><br/>Vous devez confirmer cette action."; +i18n["Translation build status"] = "Statut de la compilation"; +i18n["Language"] = "Langage"; + // Main Menu i18n["Main Menu"] = "Menu principal"; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.57&r2=1.58&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.57 doc-editor/js/main.js:1.58 --- doc-editor/js/main.js:1.57 Sun May 3 21:28:42 2009 +++ doc-editor/js/main.js Sat May 16 21:30:22 2009 @@ -43,7 +43,7 @@ userLang: '', appName: 'PhpDocumentation Online Editor', appVer: '0.2', - uiRevision: '$Revision: 1.57 $', + uiRevision: '$Revision: 1.58 $', userConf: { 'conf_needupdate_diff': 'using-exec', @@ -1023,6 +1023,101 @@ }); Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); }, // newTabCheckDoc + newTabBuildStatus: function(){ + + var ds, grid; + + // The store + ds = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: './php/controller.php' + }), + baseParams: { + task: 'getBuildStatusData' + }, + reader: new Ext.data.JsonReader({ + root: 'Items', + totalProperty: 'nbItems', + id: 'id' + }, [{ + name: 'id', + mapping: 'id' + }, { + name: 'lang', + mapping: 'lang' + }, { + name: 'date', + mapping: 'date', + type: 'date', + dateFormat: 'Y-m-d H:i:s' + }, { + name: 'status', + mapping: 'status', + type: 'int' + }]) + }); + ds.setDefaultSort('date', 'desc'); + + // The grid + + function rendererLanguage(val) { + return '<div class="flag flag-' + val + '">' + val + '</div>'; + } + function rendererStatus(val) { + if( val === 0 ) return 'Nok'; + else return 'Ok'; + } + + grid = new Ext.grid.GridPanel({ + store: ds, + loadMask: true, + columns: [{ + id: 'date', + header: _("Date"), + sortable: true, + dataIndex: 'date', + renderer: Ext.util.Format.dateRenderer(_('Y-m-d, H:i')) + }, { + header: _("Language"), + width: 45, + sortable: true, + dataIndex: 'lang', + renderer: rendererLanguage + }, { + header: _("Status"), + width: 45, + sortable: true, + dataIndex: 'status', + renderer: rendererStatus + }], + view: new Ext.grid.GridView({ + forceFit: true, + getRowClass: function(record, numIndex, rowParams, store){ + if (record.data.status === 0) { + return 'summary_3'; + } + } + }), + autoExpandColumn: 'date', + bodyBorder: false, + listeners: { + scope: this, + render: function(grid){ + grid.store.load.defer(20, grid.store); + } + } + }); + + Ext.getCmp('main-panel').add({ + closable: true, + title: _('Translation build status'), + iconCls: 'BuildStatus', + id: 'tab-build-status', + layout: 'fit', + items: [grid] + }); + Ext.getCmp('main-panel').setActiveTab('tab-build-status'); + }, // newTabBuildStatus openFile: function(FilePath, FileName){ Ext.getCmp('acc-all-files').expand(); @@ -7240,6 +7335,11 @@ menu: new Ext.menu.Menu({ items: [{ scope: this, + text: _('Translation build status'), + iconCls: 'BuildStatus', + handler: this.newTabBuildStatus + },{ + scope: this, text: _('Script Check doc'), iconCls: 'CheckDoc', handler: this.newTabCheckDoc http://cvs.php.net/viewvc.cgi/doc-editor/php/class.php?r1=1.46&r2=1.47&diff_format=u Index: doc-editor/php/class.php diff -u doc-editor/php/class.php:1.46 doc-editor/php/class.php:1.47 --- doc-editor/php/class.php:1.46 Sat May 16 20:38:41 2009 +++ doc-editor/php/class.php Sat May 16 21:30:23 2009 @@ -2502,4 +2502,26 @@ } + /** + * Get buildLog data. + * + */ + function getBuildStatusData() + { + + $node = array(); + + $s = 'SELECT `id`, `lang`, `status`, `date` FROM `buildLog`'; + + $r = $this->db->query($s) or die('Error: '.$this->db->error.'|'.$s); + $nb = $r->num_rows; + + while ($a = $r->fetch_assoc()) { + $node[] = $a; + } + + return array('nb' => $nb, 'node' => $node); + + } + } // End of class http://cvs.php.net/viewvc.cgi/doc-editor/php/ExtJsController.php?r1=1.26&r2=1.27&diff_format=u Index: doc-editor/php/ExtJsController.php diff -u doc-editor/php/ExtJsController.php:1.26 doc-editor/php/ExtJsController.php:1.27 --- doc-editor/php/ExtJsController.php:1.26 Mon Apr 27 05:09:57 2009 +++ doc-editor/php/ExtJsController.php Sat May 16 21:30:23 2009 @@ -743,6 +743,15 @@ return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } + public function getBuildStatusData() { + + $this->phpDoc->isLogged(); + + $r = $this->phpDoc->getBuildStatusData(); + + return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); + } + public function getCheckDocFiles() { $this->phpDoc->isLogged(); http://cvs.php.net/viewvc.cgi/doc-editor/themes/style.css?r1=1.10&r2=1.11&diff_format=u Index: doc-editor/themes/style.css diff -u doc-editor/themes/style.css:1.10 doc-editor/themes/style.css:1.11 --- doc-editor/themes/style.css:1.10 Sat Apr 25 08:38:45 2009 +++ doc-editor/themes/style.css Sat May 16 21:30:23 2009 @@ -76,7 +76,15 @@ color: #aaa; font-size: 10pt !important; font-family: monospace; -} .key { +} + +.flag { + background-repeat: no-repeat ! important; + background-position: 3px 50% ! important; + padding-left: 24px ! important; +} + +.key { background-image: url(../themes/img/key.png) !important; } .flag-ar { background-image: url(../themes/img/flags/ar.png) !important; @@ -214,6 +222,8 @@ background: transparent url(../themes/img/page_edit.png) no-repeat 0 0; } .CheckDoc { background-image: url(../themes/img/lightbulb_add.png) !important; +} .BuildStatus { + background-image: url(../themes/img/error_delete.png) !important; } .AllFiles { background: transparent url(../themes/img/application_side_tree.png) no-repeat 0 0; } .PendingCommit {
« previous php.doc.cvs (#4027) next »