-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make callbackery work better on mobile (#218)
* make callbackery work better on mobile * collapse navar buttons into menu * move labels over form fields * copy everything, do not try to reuse as the private variable will not work * sync action menu button properties with normal buttons * set table column with to work on mobile * detect empty values in required fields * consider required property in the backend! * cleaner approach to button focusing * port qooxdoo/qooxdoo#10632 while there is no new qx release
- Loading branch information
Showing
15 changed files
with
666 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,54 @@ | ||
0.47.9 2023-10-26 10:05:30 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- better fix, based on https://github.com/qooxdoo/qooxdoo/pull/10632 | ||
|
||
0.47.8 2023-10-24 11:23:11 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- force button to focus when it is touched ... this seems to | ||
resolve the event order problem | ||
|
||
0.47.7 2023-10-24 11:08:14 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- force button to focus when it is clicked | ||
|
||
0.47.6 2023-10-24 10:50:48 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- fix event ordering problem on ios and android | ||
- add longer timeout for downloads and views | ||
|
||
0.47.5 2023-10-19 14:06:22 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- ios compatiblity issue can not easily be fixed outside qx | ||
https://github.com/qooxdoo/qooxdoo/pull/10629 is the right way | ||
to go about it ... | ||
|
||
0.47.4 2023-10-18 22:53:53 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- it seems on ios there is no changeValue after blur, fix that by | ||
resettting and setting the value explicitly after blur ... aargh | ||
|
||
- explicitly check for empty string in required field even when there | ||
is no validator defined | ||
|
||
0.47.3 2023-08-29 16:20:30 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- make table columns with "flex" work on mobile devices | ||
|
||
0.47.2 2023-08-29 14:14:54 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- connect mmButton properties to button propperties | ||
|
||
0.47.1 2023-08-29 12:04:49 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- include callbackery.ui.form.FileSelectorMenuButton into distro | ||
|
||
0.47.0 2023-08-29 11:01:09 +0200 Tobias Oetiker <[email protected]> | ||
|
||
* make callbackery work better on mobile | ||
- collapse navbar buttons into menu on mobile | ||
- move labels over form fields on mobile | ||
* cleanup indentation | ||
|
||
0.46.5 2023-06-28 08:29:18 +0200 Tobias Oetiker <[email protected]> | ||
|
||
- fixed regression in abstractform (missing signature) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,15 @@ WriteMakefile( | |
AUTHOR => 'Tobias Oetiker <[email protected]>', | ||
LICENSE => 'gpl_3', | ||
PREREQ_PM => { | ||
'Mojolicious' => '9.12', | ||
'Mojolicious' => '9.33', | ||
'Mojolicious::Plugin::Qooxdoo' => '1.0.14', | ||
'Config::Grammar' => '1.13', | ||
'XS::Parse::Keyword' => '0.21', | ||
'Future::AsyncAwait' => '0.54', | ||
'Syntax::Keyword::Try' => '0.25', | ||
'XS::Parse::Keyword' => '0.38', | ||
'Future::AsyncAwait' => '0.65', | ||
'Syntax::Keyword::Try' => '0.29', | ||
'Locale::PO' => '0.27', | ||
'JSON::Validator' => 5.03, | ||
'YAML::XS' => 0.83, | ||
'JSON::Validator' => '5.14', | ||
'YAML::XS' => '0.88', | ||
'Text::CSV' => 0, | ||
'Excel::Writer::XLSX' => 0, | ||
'Test::Fatal' => 0, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
...allBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/FileSelectorMenuButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* ************************************************************************ | ||
After Qooxdoo FileSelectorMenuButton | ||
Copyright: | ||
2023 Oetiker+Partner AG | ||
License: | ||
LGPL: http://www.gnu.org/licenses/lgpl.html | ||
See the LICENSE file in the project's top-level directory for details. | ||
Authors: | ||
* Tobias Oetiker | ||
************************************************************************ */ | ||
|
||
qx.Class.define("callbackery.ui.form.FileSelectorMenuButton", { | ||
extend: qx.ui.menu.Button, | ||
statics: { | ||
_fileInputElementIdCounter: 0 | ||
}, | ||
properties: { | ||
/** | ||
* What type of files should be offered in the fileselection dialog. | ||
* Use a comma separated list of [Unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers). If you dont set anything, all files | ||
* are allowed. | ||
* | ||
* *Example* | ||
* | ||
* `.doc,.docx,application/msword` | ||
*/ | ||
accept: { | ||
nullable: true, | ||
check: "String", | ||
apply: "_applyAttribute" | ||
}, | ||
|
||
/** | ||
* Specify that the camera should be used for getting the "file". The | ||
* value defines which camera should be used for capturing images. | ||
* `user` indicates the user-facing camera. | ||
* `environment` indicates the camera facing away from the user. | ||
*/ | ||
capture: { | ||
nullable: true, | ||
check: ["user", "environment"], | ||
apply: "_applyAttribute" | ||
}, | ||
|
||
/** | ||
* Set to "true" if you want to allow the selection of multiple files. | ||
*/ | ||
multiple: { | ||
nullable: true, | ||
check: "Boolean", | ||
apply: "_applyAttribute" | ||
}, | ||
|
||
/** | ||
* If present, indicates that only directories should be available for | ||
* selection. | ||
*/ | ||
directoriesOnly: { | ||
nullable: true, | ||
check: "Boolean", | ||
apply: "_applyAttribute" | ||
} | ||
}, | ||
|
||
members: { | ||
__inputObjec: null, | ||
_applyAttribute(value, old, attr) { | ||
if (attr === "directoriesOnly") { | ||
// while the name of the attribute indicates that this only | ||
// works for webkit browsers, this is not the case. These | ||
// days the attribute is supported by | ||
// [everyone](https://caniuse.com/?search=webkitdirectory). | ||
attr = "webkitdirectory"; | ||
} | ||
this.__inputObject.setAttribute(attr, value); | ||
}, | ||
setEnabled(value) { | ||
this.__inputObject.setEnabled(value); | ||
super.setEnabled(value); | ||
}, | ||
_createContentElement() { | ||
let id = "qxMenuFileSelector_" + (++callbackery.ui.form.FileSelectorMenuButton._fileInputElementIdCounter); | ||
let input = (this.__inputObject = new qx.html.Input( | ||
"file", | ||
null, | ||
{ id: id } | ||
)); | ||
|
||
let label = new qx.html.Element("label", {}, { for: id }); | ||
label.addListenerOnce("appear", e => { | ||
label.add(input); | ||
}); | ||
|
||
input.addListenerOnce("appear", e => { | ||
let inputEl = input.getDomElement(); | ||
// since qx.html.Node does not even create the | ||
// domNode if it is not set to visible initially | ||
// we have to quickly hide it after creation. | ||
input.setVisible(false); | ||
inputEl.addEventListener("change", e => { | ||
this.fireDataEvent("changeFileSelection", inputEl.files); | ||
inputEl.value = ""; | ||
}); | ||
}); | ||
return label; | ||
} | ||
} | ||
}); |
47 changes: 0 additions & 47 deletions
47
lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/form/UploadButton.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.