From 93b1caf4debb55a06a72ad1d38134bb1f4173bf4 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Tue, 23 May 2023 14:35:24 +0200 Subject: [PATCH] release 0.46.1 with qx8 support (#216) * release 0.46.0 with qx8 support * up version for resync --- .gitignore | 1 + CHANGES | 14 ++ lib/CallBackery.pm | 14 +- .../source/class/callbackery/data/Server.js | 4 +- .../source/class/callbackery/ui/Busy.js | 6 +- .../class/callbackery/ui/form/UploadButton.js | 4 - .../ui/form/UploadToolbarButton.js | 121 +++++++++--------- .../class/callbackery/ui/plugin/CardList.js | 4 +- .../class/callbackery/ui/plugin/Form.js | 4 +- .../class/callbackery/ui/plugin/Html.js | 4 +- 10 files changed, 93 insertions(+), 83 deletions(-) diff --git a/.gitignore b/.gitignore index 4b91ccba..7388beb5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ thirdparty/ frontend/compiled/ t/callbackery.cfg.secret my-call-backery-app/ +CallBackery-* *.gz *.tar dist.sh diff --git a/CHANGES b/CHANGES index b4ad73fb..a3f05815 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,17 @@ +0.46.1 2023-05-23 12:12:33 +0200 Tobias Oetiker + + - resync branches + +0.46.0 2023-05-23 12:05:29 +0200 Tobias Oetiker + + - 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.1 2023-05-08 10:52:48 +0200 Tobias Oetiker - Reload CardList on action response diff --git a/lib/CallBackery.pm b/lib/CallBackery.pm index 2808435b..503e329e 100644 --- a/lib/CallBackery.pm +++ b/lib/CallBackery.pm @@ -38,7 +38,7 @@ use CallBackery::Database; use CallBackery::User; -our $VERSION = '0.45.1'; +our $VERSION = '0.46.1'; =head2 config @@ -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', { diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/Server.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/Server.js index 1594b1c5..3501135a 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/Server.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/Server.js @@ -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 { @@ -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); }, /** diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Busy.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Busy.js index c1226194..c4ded648 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Busy.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Busy.js @@ -17,7 +17,7 @@ * *
  * var busy = callbackery.ui.Busy.getInstance();
- * busy.show();busy.hide();
+ * busy.manifest();busy.vanish();
  * 
*/ @@ -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(); diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadButton.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadButton.js index 3f2842e8..7123a268 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadButton.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadButton.js @@ -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" diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadToolbarButton.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadToolbarButton.js index c56a4b63..5cb4a72f 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadToolbarButton.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadToolbarButton.js @@ -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); + } + } + } + + }); diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/CardList.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/CardList.js index c8d4e1de..fb3e9582 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/CardList.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/CardList.js @@ -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){ @@ -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); }, diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js index 6010a505..79c98dab 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Form.js @@ -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) { @@ -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()}); } diff --git a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Html.js b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Html.js index 352342fc..0cc045db 100644 --- a/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Html.js +++ b/lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/plugin/Html.js @@ -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){ @@ -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); } }