Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

Commit

Permalink
issue #901: Сделать удобную загрузку изображений
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Ivnitsky authored and mbaev committed Jun 30, 2018
1 parent 7ddec0f commit 4f3e94c
Show file tree
Hide file tree
Showing 102 changed files with 12,497 additions and 1 deletion.
3 changes: 3 additions & 0 deletions profiles/drupalru/themes/druru/css/style.css
Expand Up @@ -10034,6 +10034,9 @@ span.geshifilter code,
.maintenance-page #navbar {
height: 90px;
}
.ocupload-button-wrapper .input-group {
display: none;
}
body.adminimal-menu {
height: calc(100% - 29px);
}
Expand Down
@@ -0,0 +1,4 @@
.ocupload-button-wrapper .input-group {
display: none;
}

Expand Up @@ -32,3 +32,4 @@
@import "_frontpage";
@import "_tips";
@import "_maintenance-page";
@import "_bueditor";
339 changes: 339 additions & 0 deletions sites/all/modules/contrib/ocupload/LICENSE.txt

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions sites/all/modules/contrib/ocupload/README.txt
@@ -0,0 +1,49 @@
Requirements:
-------------
1. PHP >= 5.4

2. Browser with support HTML5 File API (IE 10+, Firefox 3.6+, Chrome 13+, Safari 6+, Opera 11.5+).


Installation:
-------------
1. Extract module archive in "sites/all/modules".

2. Enable module "One Click Upload".


Integrate with BUEditor:
------------------------
1. Open BUEditor config page "admin/config/content/bueditor".

2. Click "Edit" link for your use editor.

3. Add new button with code: "js: E.showFileSelectionDialog();" (do not change this code!).

4. Click "Save configuration".


Integrate with standalone CKEditor module (not Wysiwyg module):
---------------------------------------------------------------
1. Open CKEditor config page "admin/config/content/ckeditor".

2. Click "edit" link for your use editor.

3. Open section "Editor appearance", go to "Toolbar" field and drag & drop "One Click Upload" icon from "All buttons" to "Used buttons".

4. Below, in "Plugins" field, choose checkbox "One Click Upload".

5. Disable "Advanced content filter" in an appropriate section.

6. Click "Save".


Integrate to Wysiwyg module with CKEditor library:
--------------------------------------------------
1. Open Wysiwyg cofig page "admin/config/content/wysiwyg".

2. Click "Edit" link for your use editor.

3. Open fieldset "Buttons and plugins" and mark checkbox "One Click Upload".

4. Click "Save".
16 changes: 16 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/.gitignore
@@ -0,0 +1,16 @@
*~

# Node
/build
/node_modules
/bower_components

# Samples
/samples/Node.js/node_modules/

# Editors
.idea

# Tests
sauce_connect.log
/coverage
24 changes: 24 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/.travis.yml
@@ -0,0 +1,24 @@
language: node_js
sudo: false
cache:
directories:
- node_modules
env:
global:
- SAUCE_USERNAME=flowjs
- SAUCE_ACCESS_KEY=53e609a9-cb5d-4eac-a888-aa5419836f19
matrix:
fast_finish: true
include:
- env: TEST='unit-tests'
node_js: "4.2"
- env: TEST='browser-tests'
node_js: "4.2"
addons:
sauce_connect: true
allow_failures:
- env: TEST='browser-tests'
before_install: npm install -g grunt-cli codeclimate-test-reporter
install: npm install
script:
- $TRAVIS_BUILD_DIR/travis.sh
3 changes: 3 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/.versions
@@ -0,0 +1,3 @@
digimet:flowjs@2.9.0
meteor@1.1.6
underscore@1.0.3
37 changes: 37 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/CHANGELOG.md
@@ -0,0 +1,37 @@
# 2.0.0

## Features

- All code follows Google javascript style guide
- Target url can be provided with query string
- Events **fileAdded** and **filesAdded** can prevent file from being added to $.files list by
returning false. Custom validators can be ran here.
- **ResumableFile.getType()** and **ResumableFile.getExtension()** helper methods added. Can be
used for custom validation.
- **fileProgress** and **progress** events are always asynchronous.
- **ResumableFile.pause()** and **ResumableFile.resume()** methods for single file pausing and
resuming.
- **filesSubmitted** event added. Can be used to start file upload. Event is thrown then files are
added to queue.
- **progressCallbacksInterval** parameter added. Minimum interval between callbacks execution in
milliseconds.
- **averageSpeed** and **currentSpeed** parameters added for `ResumableFile`. These params
accuracy can be adjusted with `speedSmoothingFactor` and `progressCallbacksInterval` parameters.
- **timeRemaining** method added for `ResumableFile`. Returns remaining time to upload in seconds. Accuracy is based on average speed.
- **sizeUploaded** method added for `ResumableFile`. Returns size uploaded in bytes.
- **singleFile** parameter added. Then enabled, uploaded file will replace current one.

## Breaking Changes
- **Resumable** was renamed to **Flow**
- **ResumableFile.fileName** parameter renamed to **ResumableFile.name**
- **Resumable.getOpt** method dropped, use Resumable.opts parameter instead if needed.
- **Resumable.maxFiles**, **Resumable.minFileSize**, **Resumable.maxFileSize**,
**Resumable.fileType** validators dropped. Use **fileAdded** and **filesAdded** events for
custom validation.
- **fileProgress** and **progress** events are not thrown on ResumableFile.abort() and ResumableFile.cancel() methods execution.
- **cancel** event was removed. Event was always called after **Resumable.cancel()** function.
- **fileAdded**, **filesAdded** events are thrown before file is added to upload queue. This means
that calling **Resumable.upload()** method in these events will not start uploading current
files. To start upload use **filesSubmitted** event instead.
- **throttleProgressCallbacks** parameter was replaced with **progressCallbacksInterval** and it
is now measured in milliseconds.
125 changes: 125 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/Gruntfile.js
@@ -0,0 +1,125 @@
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
},
build: {
src: 'dist/flow.js',
dest: 'dist/flow.min.js'
}
},
concat: {
build: {
files: {
'dist/flow.js': [
'src/flow.js'
]
}
}
},
jst: {
compile: {
options: {

},
files: {
"dist/flow.js": ["dist/flow.js"]
}
}
},
karma: {
options: {
configFile: 'karma.conf.js'
},
watch: {
autoWatch: true,
background: false
},
continuous: {
singleRun: true
},
coverage: {
singleRun: true,
browsers: ['Firefox'],
reporters: ['progress', 'coverage'],
preprocessors: {
'src/*.js': 'coverage'
},
coverageReporter: {
type: "lcov",
dir: "coverage"
}
},
saucelabs: {
singleRun: true,
reporters: ['progress', 'saucelabs'],
preprocessors: {
'src/*.js': 'coverage'
},
coverageReporter: {
type: "lcov",
dir: "coverage"
},
// global config for SauceLabs
sauceLabs: {
testName: 'flow.js',
username: grunt.option('sauce-username') || process.env.SAUCE_USERNAME,
accessKey: grunt.option('sauce-access-key') || process.env.SAUCE_ACCESS_KEY,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
startConnect: false
}
}
},
clean: {
release: ["dist/"]
},
bump: {
options: {
files: ['package.json'],
updateConfigs: ['pkg'],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['-a'], // '-a' for all files
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
}
},
'template': {
'release': {
'options': {
'data': {
'version': '<%= pkg.version %>'
}
},
'files': {
'dist/flow.js': ['dist/flow.js']
}
}
}
});

// Loading dependencies
for (var key in grunt.file.readJSON("package.json").devDependencies) {
if (key !== "grunt" && key.indexOf("grunt") === 0) grunt.loadNpmTasks(key);
}

// Default task.
grunt.registerTask('default', ['test']);
// Release tasks
grunt.registerTask('build', ['concat', 'template', 'uglify']);
grunt.registerTask('release', function(type) {
type = type ? type : 'patch';
grunt.task.run('bump-only:' + type);
grunt.task.run('clean', 'build');
grunt.task.run('bump-commit');
});
// Development
grunt.registerTask('test', ["karma:coverage"]);
};
21 changes: 21 additions & 0 deletions sites/all/modules/contrib/ocupload/flowjs/LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2011, 23, http://www.23developer.com
2013, Aidas Klimas

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 4f3e94c

Please sign in to comment.