Skip to content

Commit

Permalink
release 0.46.0 with qx8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed May 23, 2023
1 parent 08a10d2 commit ba2bce1
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ thirdparty/
frontend/compiled/
t/callbackery.cfg.secret
my-call-backery-app/
CallBackery-*
*.gz
*.tar
dist.sh
Expand Down
18 changes: 18 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
0.46.0 2023-05-23 12:05:29 +0200 Tobias Oetiker <[email protected]>

- the methodes 'show' and 'hide' clash with the attributes
'show' and 'hide' of the underlying atom class. Replaced them with
'manifest' and 'vanish'.

- the upload button tried to overwrite the capture attribute.

- these changes are necessary to make callbackery work with qx8

0.45.0 2023-05-23 12:05:16 +0200 Tobias Oetiker <[email protected]>

-

0.45.0 2023-05-23 12:05:01 +0200 Tobias Oetiker <[email protected]>

-

- Reload CardList on action response

0.45.0 2023-03-30 09:13:03 +0200 Tobias Oetiker <[email protected]>
Expand Down
14 changes: 10 additions & 4 deletions lib/CallBackery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use CallBackery::Database;
use CallBackery::User;


our $VERSION = '0.45.0';
our $VERSION = '0.46.0';


=head2 config
Expand Down Expand Up @@ -176,9 +176,15 @@ sub startup {
if (not -f $app->config->secretFile){
$app->config->reConfigure;
}

$app->secrets([ path($app->config->secretFile)->slurp ]);

if (my $secrets = $app->config->secretFile) {
if (-r $secrets) {
$app->secrets([ path($app->config->secretFile)->slurp ]);
}
else {
$app->log->error("Cannot read secrets file $secrets. Please check permissions.");
}
}

my $routes = $app->routes;

$app->plugin('CallBackery::Plugin::Doc', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ qx.Class.define("callbackery.data.Server", {
var origHandler = handler;
var busy = callbackery.ui.Busy.getInstance();
var superHandler = function(ret, exc, id) {
busy.hide();
busy.vanish();
if (exc) {
callbackery.ui.MsgBox.getInstance().exc(exc);
} else {
Expand All @@ -112,7 +112,7 @@ qx.Class.define("callbackery.data.Server", {
};
var newArgs = Array.prototype.slice.call(arguments);
newArgs[0] = superHandler;
busy.show('Runnning ' + methodName);
busy.manifest('Runnning ' + methodName);
this.callAsync.apply(this, newArgs);
},
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* <pre code='javascript'>
* var busy = callbackery.ui.Busy.getInstance();
* busy.show();busy.hide();
* busy.manifest();busy.vanish();
* </pre>
*/

Expand Down Expand Up @@ -49,13 +49,13 @@ qx.Class.define("callbackery.ui.Busy", {
},
members : {
__blocker : null,
show: function(label){
manifest: function(label){
this.setVisibility('visible');
this.fadeIn(500);
this.setLabel(label);
this.__blocker.block();
},
hide: function(){
vanish: function(){
this.setVisibility('excluded');
this.fadeOut(10);
this.__blocker.unblock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ qx.Class.define("callbackery.ui.form.UploadButton", {
nullable: true,
apply : "_applyAttribute"
},
capture: {
nullable: true,
apply : "_applyAttribute"
},
multiple: {
nullable: true,
apply : "_applyAttribute"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,68 +39,61 @@
* After qx.ui.form.Button <> qx.ui.toolbar.Button
*/
qx.Class.define("callbackery.ui.form.UploadToolbarButton",
{
extend : callbackery.ui.form.UploadButton,

// --------------------------------------------------------------------------
// [Constructor]
// --------------------------------------------------------------------------

/**
* @param label {String} button label
* @param icon {String} icon path
* @param command {Command} command instance to connect with
*/

construct: function(label, icon, command)
{
this.base(arguments,label, icon, command);

// Toolbar buttons should not support the keyboard events
this.removeListener("keydown", this._onKeyDown);
this.removeListener("keyup", this._onKeyUp);
},

// --------------------------------------------------------------------------
// [Properties]
// --------------------------------------------------------------------------

properties:
{
appearance :
{
refine : true,
init : "toolbar-button"
},

show :
{
refine : true,
init : "inherit"
},

focusable :
{
refine : true,
init : false
}
},

// --------------------------------------------------------------------------
// [Members]
// --------------------------------------------------------------------------

members :
{
// overridden
_applyVisibility : function(value, old) {
this.base(arguments, value, old);
// trigger a appearance recalculation of the parent
var parent = this.getLayoutParent();
if (parent && parent instanceof qx.ui.toolbar.PartContainer) {
qx.ui.core.queue.Appearance.add(parent);
}
}
}

});
extend: callbackery.ui.form.UploadButton,

// --------------------------------------------------------------------------
// [Constructor]
// --------------------------------------------------------------------------

/**
* @param label {String} button label
* @param icon {String} icon path
* @param command {Command} command instance to connect with
*/

construct: function (label, icon, command) {
this.base(arguments, label, icon, command);

// Toolbar buttons should not support the keyboard events
this.removeListener("keydown", this._onKeyDown);
this.removeListener("keyup", this._onKeyUp);
},

// --------------------------------------------------------------------------
// [Properties]
// --------------------------------------------------------------------------

properties:
{
appearance:
{
refine: true,
init: "toolbar-button"
},

focusable:
{
refine: true,
init: false
}
},

// --------------------------------------------------------------------------
// [Members]
// --------------------------------------------------------------------------

members:
{
// overridden
_applyVisibility: function (value, old) {
this.base(arguments, value, old);
// trigger a appearance recalculation of the parent
var parent = this.getLayoutParent();
if (parent && parent instanceof qx.ui.toolbar.PartContainer) {
qx.ui.core.queue.Appearance.add(parent);
}
}
}

});
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ qx.Class.define("callbackery.ui.plugin.CardList", {
var rpc = callbackery.data.Server.getInstance();
var currentFormData = this._form.getData();
var busy = callbackery.ui.Busy.getInstance();
busy.show(this.tr('Loading Card Data'));
busy.manifest(this.tr('Loading Card Data'));
this._loading++;
rpc.callAsync(function(data,exc){
if (!exc){
Expand All @@ -64,7 +64,7 @@ qx.Class.define("callbackery.ui.plugin.CardList", {
callbackery.ui.MsgBox.getInstance().exc(exc);
}
}
busy.hide();
busy.vanish();
that._loading--;
}, 'getPluginData', this._cfg.name, 'allCardData', currentFormData);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ qx.Class.define("callbackery.ui.plugin.Form", {
parentFormData = this._getParentFormData();
}
var busy = callbackery.ui.Busy.getInstance();
busy.show(this.tr('Loading Form Data'));
busy.manifest(this.tr('Loading Form Data'));
rpc.callAsync(function(data,exc){
if (!exc){
if (mergeUrlData) {
Expand All @@ -365,7 +365,7 @@ qx.Class.define("callbackery.ui.plugin.Form", {
callbackery.ui.MsgBox.getInstance().exc(exc);
}
}
busy.hide();
busy.vanish();
that._loading--;
},'getPluginData',this._cfg.name,'allFields',parentFormData,{ currentFormData: this._form.getData()});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ qx.Class.define("callbackery.ui.plugin.Html", {
parentFormData = this._getParentFormData();
}
var busy = callbackery.ui.Busy.getInstance();
busy.show(this.tr('Loading HTML Data'));
busy.manifest(this.tr('Loading HTML Data'));
var that = this;
rpc.callAsync(function(data,exc){
if (!exc){
Expand All @@ -62,7 +62,7 @@ qx.Class.define("callbackery.ui.plugin.Html", {
callbackery.ui.MsgBox.getInstance().exc(exc);
}
}
busy.hide();
busy.vanish();
},'getPluginData',cfg.name,parentFormData);
}
}
Expand Down

0 comments on commit ba2bce1

Please sign in to comment.