Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

issue #901: Сделать удобную загрузку изображений

  • Loading branch information...
Andrey Ivnitsky authored and mbaev committed Jun 30, 2018
1 parent 7ddec0f commit 4f3e94caffc6bc86ee16ce89b2a4f8d3e23e97af
Showing with 12,497 additions and 1 deletion.
  1. +3 −0 profiles/drupalru/themes/druru/css/style.css
  2. +4 −0 profiles/drupalru/themes/druru/less/drupal/components/_bueditor.less
  3. +1 −0 profiles/drupalru/themes/druru/less/drupal/components/_initial.less
  4. +339 −0 sites/all/modules/contrib/ocupload/LICENSE.txt
  5. +49 −0 sites/all/modules/contrib/ocupload/README.txt
  6. +16 −0 sites/all/modules/contrib/ocupload/flowjs/.gitignore
  7. +24 −0 sites/all/modules/contrib/ocupload/flowjs/.travis.yml
  8. +3 −0 sites/all/modules/contrib/ocupload/flowjs/.versions
  9. +37 −0 sites/all/modules/contrib/ocupload/flowjs/CHANGELOG.md
  10. +125 −0 sites/all/modules/contrib/ocupload/flowjs/Gruntfile.js
  11. +21 −0 sites/all/modules/contrib/ocupload/flowjs/LICENSE
  12. +278 −0 sites/all/modules/contrib/ocupload/flowjs/README.md
  13. +17 −0 sites/all/modules/contrib/ocupload/flowjs/bower.json
  14. +1,626 −0 sites/all/modules/contrib/ocupload/flowjs/dist/flow.js
  15. +2 −0 sites/all/modules/contrib/ocupload/flowjs/dist/flow.min.js
  16. +136 −0 sites/all/modules/contrib/ocupload/flowjs/karma.conf.js
  17. +24 −0 sites/all/modules/contrib/ocupload/flowjs/package.js
  18. +48 −0 sites/all/modules/contrib/ocupload/flowjs/package.json
  19. +136 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Backend on AOLserver and OpenACS.md
  20. +6 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Backend on ASP.NET MVC.md
  21. +149 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Backend on Go.md
  22. +173 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Backend on PHP.md
  23. +2 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Frontend in jQuery.md
  24. +19 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/README.md
  25. +58 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/app.js
  26. +210 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/flow-node.js
  27. +6 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/package.json
  28. BIN sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/public/cancel.png
  29. +200 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/public/index.html
  30. BIN sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/public/pause.png
  31. BIN sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/public/resume.png
  32. +51 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/public/style.css
  33. +3 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Node.js/tmp/.gitignore
  34. +141 −0 sites/all/modules/contrib/ocupload/flowjs/samples/Ruby backend in Sinatra.md
  35. +43 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/README.md
  36. +47 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/src/resumable/js/upload/HttpUtils.java
  37. +69 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/src/resumable/js/upload/ResumableInfo.java
  38. +64 −0 ...ll/modules/contrib/ocupload/flowjs/samples/java/src/resumable/js/upload/ResumableInfoStorage.java
  39. +95 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/src/resumable/js/upload/UploadServlet.java
  40. +16 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/web/WEB-INF/web.xml
  41. +108 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/web/index.html
  42. BIN sites/all/modules/contrib/ocupload/flowjs/samples/java/web/pause.png
  43. +799 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/web/resumable.js
  44. BIN sites/all/modules/contrib/ocupload/flowjs/samples/java/web/resume.png
  45. +51 −0 sites/all/modules/contrib/ocupload/flowjs/samples/java/web/style.css
  46. +1,626 −0 sites/all/modules/contrib/ocupload/flowjs/src/flow.js
  47. +95 −0 sites/all/modules/contrib/ocupload/flowjs/test/FakeXMLHttpRequestUpload.js
  48. +17 −0 sites/all/modules/contrib/ocupload/flowjs/test/evalOptsSpec.js
  49. +113 −0 sites/all/modules/contrib/ocupload/flowjs/test/eventsSpec.js
  50. +65 −0 sites/all/modules/contrib/ocupload/flowjs/test/fileAddSpec.js
  51. +45 −0 sites/all/modules/contrib/ocupload/flowjs/test/fileRemoveSpec.js
  52. +38 −0 sites/all/modules/contrib/ocupload/flowjs/test/fileSpec.js
  53. +123 −0 sites/all/modules/contrib/ocupload/flowjs/test/setupSpec.js
  54. +51 −0 sites/all/modules/contrib/ocupload/flowjs/test/singleFileSpec.js
  55. +597 −0 sites/all/modules/contrib/ocupload/flowjs/test/uploadSpec.js
  56. +147 −0 sites/all/modules/contrib/ocupload/flowjs/test/webKitDataTransferSpec.js
  57. +19 −0 sites/all/modules/contrib/ocupload/flowjs/travis.sh
  58. +8 −0 sites/all/modules/contrib/ocupload/flowphp/.gitignore
  59. +13 −0 sites/all/modules/contrib/ocupload/flowphp/.travis.yml
  60. +5 −0 sites/all/modules/contrib/ocupload/flowphp/CHANGELOG.md
  61. +20 −0 sites/all/modules/contrib/ocupload/flowphp/LICENSE
  62. +98 −0 sites/all/modules/contrib/ocupload/flowphp/README.md
  63. +35 −0 sites/all/modules/contrib/ocupload/flowphp/composer.json
  64. +4 −0 sites/all/modules/contrib/ocupload/flowphp/phpunit
  65. +29 −0 sites/all/modules/contrib/ocupload/flowphp/phpunit.xml
  66. +67 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Autoloader.php
  67. +54 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Basic.php
  68. +115 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Config.php
  69. +48 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/ConfigInterface.php
  70. +233 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/File.php
  71. +7 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/FileLockException.php
  72. +7 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/FileOpenException.php
  73. +39 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/FustyRequest.php
  74. +31 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Mongo/MongoConfig.php
  75. +18 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Mongo/MongoConfigInterface.php
  76. +181 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Mongo/MongoFile.php
  77. +31 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Mongo/MongoUploader.php
  78. +50 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Mongo/README.md
  79. +152 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Request.php
  80. +76 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/RequestInterface.php
  81. +41 −0 sites/all/modules/contrib/ocupload/flowphp/src/Flow/Uploader.php
  82. +55 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/AutoloadTest.php
  83. +117 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/ConfigTest.php
  84. +428 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/FileTest.php
  85. +53 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/FlowUnitCase.php
  86. +121 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/FustyRequestTest.php
  87. +86 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/RequestTest.php
  88. +77 −0 sites/all/modules/contrib/ocupload/flowphp/test/Unit/UploaderTest.php
  89. +7 −0 sites/all/modules/contrib/ocupload/flowphp/test/bootstrap.php
  90. +60 −0 sites/all/modules/contrib/ocupload/flowphp/travis.phpunit.xml
  91. BIN sites/all/modules/contrib/ocupload/img/icon-ckeditor.png
  92. +121 −0 sites/all/modules/contrib/ocupload/js/bueditor.js
  93. +119 −0 sites/all/modules/contrib/ocupload/js/ocupload.js
  94. +108 −0 sites/all/modules/contrib/ocupload/js/plugin.js
  95. +155 −0 sites/all/modules/contrib/ocupload/js/textarea.js
  96. +16 −0 sites/all/modules/contrib/ocupload/ocupload.css
  97. +69 −0 sites/all/modules/contrib/ocupload/ocupload.features.inc
  98. +618 −0 sites/all/modules/contrib/ocupload/ocupload.inc
  99. +13 −0 sites/all/modules/contrib/ocupload/ocupload.info
  100. +338 −0 sites/all/modules/contrib/ocupload/ocupload.install
  101. +417 −0 sites/all/modules/contrib/ocupload/ocupload.module
  102. +22 −1 sites/all/modules/custom/drurum/drurum.install
@@ -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);
}
@@ -0,0 +1,4 @@
.ocupload-button-wrapper .input-group {
display: none;
}

@@ -32,3 +32,4 @@
@import "_frontpage";
@import "_tips";
@import "_maintenance-page";
@import "_bueditor";

Large diffs are not rendered by default.

@@ -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".
@@ -0,0 +1,16 @@
*~

# Node
/build
/node_modules
/bower_components

# Samples
/samples/Node.js/node_modules/

# Editors
.idea

# Tests
sauce_connect.log
/coverage
@@ -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
@@ -0,0 +1,3 @@
digimet:flowjs@2.9.0
meteor@1.1.6
underscore@1.0.3
@@ -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.
@@ -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"]);
};
@@ -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.
You can’t perform that action at this time.