This repository has been archived by the owner on Mar 25, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #901: Сделать удобную загрузку изображений
- Loading branch information
Showing
102 changed files
with
12,497 additions
and
1 deletion.
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
4 changes: 4 additions & 0 deletions
4
profiles/drupalru/themes/druru/less/drupal/components/_bueditor.less
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,4 @@ | ||
.ocupload-button-wrapper .input-group { | ||
display: none; | ||
} | ||
|
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 |
---|---|---|
|
@@ -32,3 +32,4 @@ | |
@import "_frontpage"; | ||
@import "_tips"; | ||
@import "_maintenance-page"; | ||
@import "_bueditor"; |
Large diffs are not rendered by default.
Oops, something went wrong.
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,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". |
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,16 @@ | ||
*~ | ||
|
||
# Node | ||
/build | ||
/node_modules | ||
/bower_components | ||
|
||
# Samples | ||
/samples/Node.js/node_modules/ | ||
|
||
# Editors | ||
.idea | ||
|
||
# Tests | ||
sauce_connect.log | ||
/coverage |
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,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 |
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,3 @@ | ||
digimet:flowjs@2.9.0 | ||
meteor@1.1.6 | ||
underscore@1.0.3 |
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,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. |
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,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"]); | ||
}; |
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,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. |
Oops, something went wrong.