Browse Source

Add 'asset:upload:error' event

pull/261/head
Artur Arseniev 9 years ago
parent
commit
ad84b29618
  1. 2
      dist/css/grapes.min.css
  2. 4
      dist/grapes.min.js
  3. 2
      package.json
  4. 2
      src/asset_manager/view/FileUploader.js
  5. 1
      src/editor/index.js
  6. 2
      src/styles/scss/_gjs_assets.scss

2
dist/css/grapes.min.css

File diff suppressed because one or more lines are too long

4
dist/grapes.min.js

File diff suppressed because one or more lines are too long

2
package.json

@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Free and Open Source Web Builder Framework",
"version": "0.9.27",
"version": "0.9.28",
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",

2
src/asset_manager/view/FileUploader.js

@ -56,8 +56,10 @@ module.exports = Backbone.View.extend({
* @private
*/
onUploadError(err) {
const em = this.config.em;
console.error(err);
this.onUploadEnd(err);
em && em.trigger('asset:upload:error', err);
},
/**

1
src/editor/index.js

@ -39,6 +39,7 @@
* * `component:styleUpdate:{propertyName}` - Listen for a specific style property change
* * `asset:upload:start` - Before the upload is started
* * `asset:upload:end` - After the upload is ended
* * `asset:upload:error` - On any error in upload, passes the error as an argument
* * `asset:upload:response` - On upload response, passes the result as an argument
* * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback
* * `styleManager:change:{propertyName}` - As above but for a specific style property

2
src/styles/scss/_gjs_assets.scss

@ -4,7 +4,7 @@
position: absolute;
top: 0;
left: 0;
z-index: 5;
z-index: 11;
width: 100%;
height: 100%;
transition: opacity 0.25s;

Loading…
Cancel
Save