Skip to content

Commit

Permalink
Preping for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
sqville committed May 3, 2024
1 parent 6083be3 commit 4675c94
Show file tree
Hide file tree
Showing 89 changed files with 50 additions and 222 deletions.
52 changes: 22 additions & 30 deletions Manifest.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
{
"$schema": "https://qooxdoo.org/schema/Manifest-1-0-0.json",
"info" :
{
"name" : "ville.Upload",

"summary" : "",
"description" : "",

"homepage" : "",

"license" : "MIT license",
"authors" : [
{
"name": "",
"email": "sqville"
}
],

"version" : "1.0.0"
"$schema": "https://qooxdoo.org/schema/Manifest-1-0-0.json",
"info": {
"name": "ville.Upload",
"summary": "",
"description": "",
"homepage": "",
"license": "MIT license",
"authors": [
{
"name": "",
"email": "sqville"
}
],
"version": "1.0.0"
},

"provides" :
{
"namespace" : "ville.Upload",
"encoding" : "utf-8",
"class" : "source/class",
"resource" : "source/resource",
"translation" : "source/translation"
"provides": {
"namespace": "ville.Upload",
"encoding": "utf-8",
"class": "source/class",
"resource": "source/resource",
"translation": "source/translation"
},

"requires": {
"@qooxdoo/framework": "^7.2.0",
"@qooxdoo/compiler" : "^1.0.4"
"@qooxdoo/compiler": "^1.0.4"
}
}
}
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="https://github.com/sqville/ville.Upload">
<img src="ville_Upload.png" alt="Logo">
</a>
<h3 align="center"></h3>
<p align="center">
A control for the Qooxdoo JavaScript Framework
</p>
</p>
<!-- ABOUT THE PROJECT -->

## About The Project
# Ville.Upload

**ville.Upload** is a [Qooxdoo](https://qooxdoo.org/) control designed to enabled browser drag and drop features for the qx.ui.form.FileSelectorButton control.

Expand All @@ -20,10 +8,6 @@
* Use external CSS files or embedded CSS (commented code example included) for the dragover event look and feel
* Easily revert back to the standard button look and feel by simply setting the controls appearance property to "button"

**Screen Shot**

<img src="ville_Upload_capture1.PNG" alt="ville.Upload control examples">

<!-- GETTING STARTED -->
## Using the Control in your Application
To use the control in your application, go into the application root directory and install the library into your project:
Expand All @@ -48,4 +32,4 @@ Distributed under the MIT License. See `LICENSE` for more information.

<!-- CONTACT -->
## Contact
Chris Eskew - [@SQville](https://twitter.com/SQville) - email: sqville@gmail.com
Chris Eskew (sqville) - email: sqville@gmail.com
49 changes: 0 additions & 49 deletions published/UploadDemo/index.html

This file was deleted.

22 changes: 0 additions & 22 deletions published/UploadDemo/index.js

This file was deleted.

26 changes: 0 additions & 26 deletions published/UploadDemo/nojs.html

This file was deleted.

49 changes: 0 additions & 49 deletions published/index.html

This file was deleted.

Binary file removed published/resource/demo/app.png
Binary file not shown.
Binary file removed published/resource/demo/favicon.png
Binary file not shown.
Binary file removed published/resource/demo/test.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed published/resource/qx/decoration/Simple/arrows/up.gif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed published/resource/qx/decoration/Simple/tree/minus.gif
Diff not rendered.
Binary file removed published/resource/qx/decoration/Simple/tree/plus.gif
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed published/resource/qx/icon/Tango/16/places/folder.png
Diff not rendered.
Diff not rendered.
Binary file removed published/resource/qx/static/blank.gif
Diff not rendered.
Binary file removed published/resource/qx/static/blank.png
Diff not rendered.
4 changes: 0 additions & 4 deletions published/resource/ville/upload/css/dragndrop.css

This file was deleted.

2 changes: 1 addition & 1 deletion source/boot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
</style>

<title>${name}</title>
<title>ville.Upload</title>
<noscript>
<meta http-equiv="refresh" content="0; url=nojs.html"/>
</noscript>
Expand Down
8 changes: 3 additions & 5 deletions source/class/demo/Application.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* ************************************************************************
Copyright: 2022
License: MIT license
Authors: sqville
Authors: Chris Eskew (sqville) - sqville@gmail.com
************************************************************************ */

Expand Down Expand Up @@ -59,9 +57,9 @@ qx.Class.define("demo.Application",
*/

// Create an Upload button
var uploadbutton1 = new ville.Upload("Drap and drop files here, or click to browse", "qx/icon/Tango/64/actions/go-top.png").set({ iconPosition: "top", multiple: true });
var uploadbutton1 = new ville.Upload("Drag and drop files here, or click to browse", "qx/icon/Tango/64/actions/go-top.png").set({ iconPosition: "top", multiple: true });

var uploadbutton2 = new ville.Upload("Drap and drop files here, or click to browse", "qx/icon/Tango/64/actions/go-top.png").set({ appearance: "button", iconPosition: "top", multiple: true });
var uploadbutton2 = new ville.Upload("Drag and drop files here, or click to browse", "qx/icon/Tango/64/actions/go-top.png").set({ appearance: "button", iconPosition: "top", multiple: true });

// Document is the application root
var doc = this.getRoot();
Expand Down
30 changes: 19 additions & 11 deletions source/class/ville/Upload.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* ************************************************************************
License: MIT license
Authors: Chris Eskew (sqville) - sqville@gmail.com
************************************************************************ */

qx.Class.define("ville.Upload", {

extend: qx.ui.form.FileSelectorButton,
Expand All @@ -20,7 +28,7 @@ qx.Class.define("ville.Upload", {
if (cssfile)
this.__externalcssfile = cssfile;

// Include and external CSS file for the dragover native event
// Include an external CSS file for the dragover native event
var uri = qx.util.ResourceManager.getInstance().toUri(
this.__externalcssfile
);
Expand All @@ -42,16 +50,16 @@ qx.Class.define("ville.Upload", {
this.addListenerOnce("appear", function(e) {

//*** Required - grab the object's Dom Element and attach native drag and drop event listeners
//var domtable = this.getContentElement().getDomElement();
var domtable = e.getTarget().getContentElement().getDomElement();
//var domelem = this.getContentElement().getDomElement();
var domelem = e.getTarget().getContentElement().getDomElement();

var dragcssclassname = this.__dragovercssclassname;

//*** ADD DRAG AND DROP EVENTS TO THE DOM ELEMENT:
//** Adding events using qx.bom.Event object is the same as adding an "on" event directly to the Dom Element,
//** for example, the "addNativeListener()" function is the same as: domtable.ondrop = function() {};
//** for example, the "addNativeListener()" function is the same as: domelem.ondrop = function() {};
//*** DRAGENTER
qx.bom.Event.addNativeListener(domtable, "dragenter", function(e) {
qx.bom.Event.addNativeListener(domelem, "dragenter", function(e) {
if (e.target.nodeType == 1) {
e.dataTransfer.dropEffect = 'copy';
qx.bom.Event.preventDefault(e);
Expand All @@ -60,30 +68,30 @@ qx.Class.define("ville.Upload", {
});

//*** DRAGLEAVE
qx.bom.Event.addNativeListener(domtable, "dragleave", function(e) {
qx.bom.Event.addNativeListener(domelem, "dragleave", function(e) {
if (e.target.nodeType == 1) {
qx.bom.element.Class.remove(this, dragcssclassname);
}
});

//*** DRAGEXIT
qx.bom.Event.addNativeListener(domtable, "dragexit", function(e) {
qx.bom.Event.addNativeListener(domelem, "dragexit", function(e) {
qx.bom.Event.stopPropagation(e);
qx.bom.Event.preventDefault(e);
qx.bom.element.Class.remove(this, dragcssclassname);
e.dataTransfer.dropEffect = 'none';
});

//*** DRAGEND
qx.bom.Event.addNativeListener(domtable, "dragend", function(e) {
qx.bom.Event.addNativeListener(domelem, "dragend", function(e) {
qx.bom.Event.stopPropagation(e);
qx.bom.Event.preventDefault(e);
qx.bom.element.Class.remove(this, dragcssclassname);
e.dataTransfer.dropEffect = 'none';
});

//*** DRAGOVER
qx.bom.Event.addNativeListener(domtable, "dragover", function(e) {
qx.bom.Event.addNativeListener(domelem, "dragover", function(e) {
if (e.target.nodeType == 1) {
e.dataTransfer.dropEffect = 'copy';
qx.bom.Event.preventDefault(e);
Expand All @@ -93,7 +101,7 @@ qx.Class.define("ville.Upload", {
});

//*** DROP
qx.bom.Event.addNativeListener(domtable, "drop", function(e) {
qx.bom.Event.addNativeListener(domelem, "drop", function(e) {
qx.bom.Event.preventDefault(e);
qx.bom.Event.stopPropagation(e);
qx.bom.element.Class.remove(this, dragcssclassname);
Expand Down Expand Up @@ -121,7 +129,7 @@ qx.Class.define("ville.Upload", {
*/
members: {

__dragovercssclassname: "sqvdocumentdndenter2022",
__dragovercssclassname: "ville-upload-dragndrop-enter",

__externalcssfile : "ville/upload/css/dragndrop.css"
}
Expand Down
4 changes: 1 addition & 3 deletions source/class/ville/upload/Appearance.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* ************************************************************************
Copyright: 2022
License: MIT license
Authors: sqville
Authors: Chris Eskew (sqville) - sqville@gmail.com
************************************************************************ */

Expand Down
4 changes: 1 addition & 3 deletions source/class/ville/upload/Decoration.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* ************************************************************************
Copyright: 2022
License: MIT license
Authors: sqville
Authors: Chris Eskew (sqville) - sqville@gmail.com
************************************************************************ */

Expand Down
2 changes: 1 addition & 1 deletion source/resource/ville/upload/css/dragndrop.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.sqvdocumentdndenter2022 {
.ville-upload-dragndrop-enter {
opacity: .7;
border: 1px solid orange !important;
}

0 comments on commit 4675c94

Please sign in to comment.