Skip to content

Commit 5c3acaf

Browse files
committed
Add code base
1 parent ebb689b commit 5c3acaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+10300
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
nbproject
3+
*sublime*
4+
.git

.scrutinizer.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
filter:
2+
excluded_paths:
3+
- vendor/*
4+
checks:
5+
php:
6+
duplication: false

JqueryFileUpload.php

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
/**
4+
* @package Jquery File Upload
5+
* @author Iurii Makukh <gplcart.software@gmail.com>
6+
* @copyright Copyright (c) 2017, Iurii Makukh <gplcart.software@gmail.com>
7+
* @license https://www.gnu.org/licenses/gpl-3.0.en.html GPL-3.0+
8+
*/
9+
10+
namespace gplcart\modules\jquery_file_upload;
11+
12+
use gplcart\core\Module;
13+
14+
/**
15+
* Main class for Jquery File Upload module
16+
*/
17+
class JqueryFileUpload extends Module
18+
{
19+
20+
/**
21+
* Constructor
22+
*/
23+
public function __construct()
24+
{
25+
parent::__construct();
26+
}
27+
28+
/**
29+
* Implements hook "library.list"
30+
* @param array $libraries
31+
*/
32+
public function hookLibraryList(array &$libraries)
33+
{
34+
$libraries['jquery_file_upload'] = array(
35+
'name' => /* @text */'jQuery File Upload',
36+
'description' => /* @text */'File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery',
37+
'type' => 'asset',
38+
'module' => 'file_manager',
39+
'url' => 'https://github.com/blueimp/jQuery-File-Upload',
40+
'download' => 'https://github.com/blueimp/jQuery-File-Upload/archive/v9.19.1.zip',
41+
'version_source' => array(
42+
'file' => 'vendor/jquery-file-upload/package.json'
43+
),
44+
'files' => array(
45+
'vendor/jquery-file-upload/js/jquery.fileupload.js'
46+
),
47+
);
48+
}
49+
50+
/**
51+
* Implements hook "module.enable.after"
52+
*/
53+
public function hookModuleEnableAfter()
54+
{
55+
$this->getLibrary()->clearCache();
56+
}
57+
58+
/**
59+
* Implements hook "module.disable.after"
60+
*/
61+
public function hookModuleDisableAfter()
62+
{
63+
$this->getLibrary()->clearCache();
64+
}
65+
66+
/**
67+
* Implements hook "module.install.after"
68+
*/
69+
public function hookModuleInstallAfter()
70+
{
71+
$this->getLibrary()->clearCache();
72+
}
73+
74+
/**
75+
* Implements hook "module.uninstall.after"
76+
*/
77+
public function hookModuleUninstallAfter()
78+
{
79+
$this->getLibrary()->clearCache();
80+
}
81+
82+
}

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[![Build Status](https://scrutinizer-ci.com/g/gplcart/jquery_file_upload/badges/build.png?b=master)](https://scrutinizer-ci.com/g/gplcart/jquery_file_upload/build-status/master)
2+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/gplcart/jquery_file_upload/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/gplcart/jquery_file_upload/?branch=master)
3+
4+
Jquery File Upload is a [GPL Cart](https://github.com/gplcart/gplcart) module that adds [Jquery File Upload](https://github.com/blueimp/jQuery-File-Upload) library for other modules.
5+
6+
**Installation**
7+
8+
1. Download and extract to `system/modules` manually or using composer `composer require gplcart/jquery_file_upload`. IMPORTANT: If you downloaded the module manually, be sure that the name of extracted module folder doesn't contain a branch/version suffix, e.g `-master`. Rename if needed.
9+
2. Go to `admin/module/list` end enable the module

composer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "gplcart/jquery_file_upload",
3+
"type": "gplcart-module",
4+
"description": "Adds Jquery File Upload library",
5+
"keywords": ["gplcart", "ecommerce", "shopping cart", "gplcart module", "php"],
6+
"license": "GPL-3.0+",
7+
"require": {
8+
"gplcart/composer-module-installer": "*"
9+
},
10+
"minimum-stability": "dev",
11+
"prefer-stable": true
12+
}

module.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "Jquery File Upload",
3+
"version": "1.0.0-dev",
4+
"description": "Adds Jquery File Upload library",
5+
"author": "Iurii Makukh <gplcart.software@gmail.com>",
6+
"core": "1.x",
7+
"license": "GPL-3.0+"
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
*.pyc
3+
node_modules
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
3+
"camelcase" : true, // true: Identifiers must be in camelCase
4+
"curly" : true, // true: Require {} for every new block or scope
5+
"eqeqeq" : true, // true: Require triple equals (===) for comparison
6+
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
7+
"immed" : true, // true: Require immediate invocations to be wrapped in parens
8+
// e.g. `(function () { } ());`
9+
"indent" : 4, // {int} Number of spaces to use for indentation
10+
"latedef" : true, // true: Require variables/functions to be defined before being used
11+
"newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
12+
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
13+
"noempty" : true, // true: Prohibit use of empty blocks
14+
"nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
15+
"plusplus" : false, // true: Prohibit use of `++` & `--`
16+
"quotmark" : "single", // Quotation mark consistency:
17+
// false : do nothing (default)
18+
// true : ensure whatever is used is consistent
19+
// "single" : require single quotes
20+
// "double" : require double quotes
21+
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
22+
"unused" : true, // true: Require all defined variables be used
23+
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
24+
"trailing" : true, // true: Prohibit trailing whitespaces
25+
"maxparams" : false, // {int} Max number of formal params allowed per function
26+
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
27+
"maxstatements" : false, // {int} Max number statements per function
28+
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
29+
"maxlen" : false, // {int} Max number of characters per line
30+
31+
// Relaxing
32+
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
33+
"boss" : false, // true: Tolerate assignments where comparisons would be expected
34+
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
35+
"eqnull" : false, // true: Tolerate use of `== null`
36+
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
37+
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
38+
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
39+
// (ex: `for each`, multiple try/catch, function expression…)
40+
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
41+
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
42+
"funcscope" : false, // true: Tolerate defining variables inside control statements"
43+
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
44+
"iterator" : false, // true: Tolerate using the `__iterator__` property
45+
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
46+
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
47+
"laxcomma" : false, // true: Tolerate comma-first style coding
48+
"loopfunc" : false, // true: Tolerate functions being defined in loops
49+
"multistr" : false, // true: Tolerate multi-line strings
50+
"proto" : false, // true: Tolerate using the `__proto__` property
51+
"scripturl" : false, // true: Tolerate script-targeted URLs
52+
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
53+
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
54+
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
55+
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
56+
"validthis" : false, // true: Tolerate using this in a non-constructor function
57+
58+
// Environments
59+
"browser" : false, // Web Browser (window, document, etc)
60+
"couch" : false, // CouchDB
61+
"devel" : false, // Development/debugging (alert, confirm, etc)
62+
"dojo" : false, // Dojo Toolkit
63+
"jquery" : false, // jQuery
64+
"mootools" : false, // MooTools
65+
"node" : false, // Node.js
66+
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
67+
"prototypejs" : false, // Prototype and Scriptaculous
68+
"rhino" : false, // Rhino
69+
"worker" : false, // Web Workers
70+
"wsh" : false, // Windows Scripting Host
71+
"yui" : false, // Yahoo User Interface
72+
73+
// Legacy
74+
"nomen" : true, // true: Prohibit dangling `_` in variables
75+
"onevar" : true, // true: Allow only one `var` statement per function
76+
"passfail" : false, // true: Stop on first error
77+
"white" : true, // true: Check against strict whitespace and indentation rules
78+
79+
// Custom Globals
80+
"globals" : {} // additional predefined global variables
81+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*
2+
!css/jquery.fileupload-noscript.css
3+
!css/jquery.fileupload-ui-noscript.css
4+
!css/jquery.fileupload-ui.css
5+
!css/jquery.fileupload.css
6+
!img/loading.gif
7+
!img/progressbar.gif
8+
!js/cors/jquery.postmessage-transport.js
9+
!js/cors/jquery.xdr-transport.js
10+
!js/vendor/jquery.ui.widget.js
11+
!js/jquery.fileupload-angular.js
12+
!js/jquery.fileupload-audio.js
13+
!js/jquery.fileupload-image.js
14+
!js/jquery.fileupload-jquery-ui.js
15+
!js/jquery.fileupload-process.js
16+
!js/jquery.fileupload-ui.js
17+
!js/jquery.fileupload-validate.js
18+
!js/jquery.fileupload-video.js
19+
!js/jquery.fileupload.js
20+
!js/jquery.iframe-transport.js
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Please follow these pull request guidelines:
2+
3+
1. Update your fork to the latest upstream version.
4+
5+
2. Follow the coding conventions of the original source files (indentation, spaces, brackets layout).
6+
7+
3. Code changes must pass JSHint validation with the `.jshintrc` settings of this project.
8+
9+
4. Code changes must pass the QUnit tests defined in the `test` folder.
10+
11+
5. New features should be covered by accompanying QUnit tests.
12+
13+
6. Keep your commits as atomic as possible, i.e. create a new commit for every single bug fix or feature added.
14+
15+
7. Always add meaningful commit messages.

0 commit comments

Comments
 (0)