Skip to content

Commit

Permalink
Updated with Romains' longer log view and fixes to the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Bert Oost committed Apr 29, 2012
1 parent 24421dc commit 19af69e
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 48 deletions.
4 changes: 2 additions & 2 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

define('PKG_NAME', 'CronManager');
define('PKG_NAME_LOWER', 'cronmanager');
define('PKG_VERSION', '1.0.1');
define('PKG_RELEASE', 'rc2');
define('PKG_VERSION', '1.1.0');
define('PKG_RELEASE', 'pl');

/* define build paths */
$root = dirname(dirname(__FILE__)).'/';
Expand Down
Binary file added _screenshots/create-new-cronjob.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _screenshots/viewlog-action.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions assets/components/cronmanager/js/mgr/sections/viewlog.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Ext.onReady(function() {
MODx.load({ xtype: 'cronmanager-page-home'});
MODx.load({ xtype: 'cronmanager-page-logs'});
});

CronManager.page.Home = function(config) {
CronManager.page.Logs = function(config) {
config = config || {};
Ext.applyIf(config,{
buttons: [{
Expand All @@ -17,12 +17,12 @@ CronManager.page.Home = function(config) {
handler: MODx.loadHelpPane
}],
components: [{
xtype: 'cronmanager-panel-home',
renderTo: 'cronmanager-panel-home-div',
xtype: 'cronmanager-panel-logs',
renderTo: 'cronmanager-panel-logs-div',
cronid: MODx.request.id
}]
});
CronManager.page.Home.superclass.constructor.call(this, config);
CronManager.page.Logs.superclass.constructor.call(this, config);
};
Ext.extend(CronManager.page.Home, MODx.Component);
Ext.reg('cronmanager-page-home', CronManager.page.Home);
Ext.extend(CronManager.page.Logs, MODx.Component);
Ext.reg('cronmanager-page-logs', CronManager.page.Logs);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 11 additions & 16 deletions assets/components/cronmanager/js/mgr/widgets/home.panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,20 @@ CronManager.panel.Home = function(config) {
border: false,
cls: 'modx-page-header'
},{
xtype: 'modx-tabs',
defaults: { border: false, autoHeight: true },
border: true,
defaults: { autoHeight: true },
items: [{
title: _('cronmanager.cronjobs'),
defaults: { autoHeight: true },
items: [{
html: '<p>' + _('cronmanager.cronjobs_desc') + '</p>',
bodyCssClass: 'panel-desc',
border: false
},{
xtype: 'cronmanager-grid-cronjobs',
preventRender: true,
cls: 'main-wrapper'
}]
}]
}]
html: '<p>' + _('cronmanager.cronjobs_desc') + '</p>',
bodyCssClass: 'panel-desc',
border: false
},{
xtype: 'cronmanager-grid-cronjobs',
preventRender: true,
cls: 'main-wrapper'
}]
}]
});
CronManager.panel.Home.superclass.constructor.call(this,config);
};

Ext.extend(CronManager.panel.Home,MODx.Panel);
Ext.reg('cronmanager-panel-home',CronManager.panel.Home);
36 changes: 15 additions & 21 deletions assets/components/cronmanager/js/mgr/widgets/logs.panel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
CronManager.panel.Home = function(config) {
CronManager.panel.Logs = function(config) {
config = config || {};
Ext.apply(config,{
url: CronManager.config.connectorUrl,
border: false,
baseCls: 'modx-formpanel',
cls: 'container',
items: [{
Expand All @@ -11,31 +10,26 @@ CronManager.panel.Home = function(config) {
id: 'cronmanager-logs-page-header',
cls: 'modx-page-header'
},{
xtype: 'modx-tabs',
defaults: { border: false, autoHeight: true },
border: true,
defaults: { autoHeight: true },
items: [{
title: _('cronmanager.logs'),
defaults: { autoHeight: true },
items: [{
html: '<p>' + _('cronmanager.logs_desc') + '</p>',
border: false,
bodyCssClass: 'panel-desc'
},{
xtype: 'cronmanager-grid-cronjoblog',
preventRender: true,
cls: 'main-wrapper'
}]
}]
}],
html: '<p>' + _('cronmanager.logs_desc') + '</p>',
bodyCssClass: 'panel-desc',
border: false
},{
xtype: 'cronmanager-grid-cronjoblog',
preventRender: true,
cls: 'main-wrapper'
}]
}],
listeners: {
'setup': { fn: this.setup, scope: this }
}
});
CronManager.panel.Home.superclass.constructor.call(this,config);
CronManager.panel.Logs.superclass.constructor.call(this,config);
};

Ext.extend(CronManager.panel.Home, MODx.FormPanel, {
Ext.extend(CronManager.panel.Logs, MODx.FormPanel, {
setup: function() {
if(!this.config.cronid) {
return;
Expand All @@ -60,5 +54,5 @@ Ext.extend(CronManager.panel.Home, MODx.FormPanel, {
}
});

//Ext.extend(CronManager.panel.Home,MODx.Panel);
Ext.reg('cronmanager-panel-home',CronManager.panel.Home);
//Ext.extend(CronManager.panel.Logs,MODx.Panel);
Ext.reg('cronmanager-panel-logs',CronManager.panel.Logs);
2 changes: 1 addition & 1 deletion core/components/cronmanager/controllers/mgr/viewlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
$modx->regClientStartupScript($cronmanager->config['jsUrl'].'mgr/widgets/logs.panel.js');
$modx->regClientStartupScript($cronmanager->config['jsUrl'].'mgr/sections/viewlog.js');

return '<div id="cronmanager-panel-home-div"></div>';
return '<div id="cronmanager-panel-logs-div"></div>';

?>
Loading

0 comments on commit 19af69e

Please sign in to comment.