Skip to content

Commit

Permalink
Renamed FileBasedEditView to BinaryBaseEditView to match server side …
Browse files Browse the repository at this point in the history
…naming
  • Loading branch information
dpobel committed Dec 26, 2014
1 parent 83653eb commit b1842b4
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 158 deletions.
4 changes: 2 additions & 2 deletions Resources/config/css.yml
Expand Up @@ -42,7 +42,7 @@ system:
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/integer.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/maplocation.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/author.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/filebased.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/binarybase.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/image.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/binaryfile.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/selection.css'
Expand Down Expand Up @@ -85,7 +85,7 @@ system:
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/maplocation.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/author.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/selection.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/filebased.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/binarybase.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/image.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/binaryfile.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/modules/tabs.css'
Expand Down
8 changes: 4 additions & 4 deletions Resources/config/yui.yml
Expand Up @@ -250,20 +250,20 @@ system:
type: 'template'
path: %ez_platformui.public_dir%/templates/fields/edit/xmltext.hbt
ez-image-editview:
requires: ['ez-filebased-editview', 'imageeditview-ez-template', 'ez-asynchronousview', 'event-tap']
requires: ['ez-binarybase-editview', 'imageeditview-ez-template', 'ez-asynchronousview', 'event-tap']
path: %ez_platformui.public_dir%/js/views/fields/ez-image-editview.js
imageeditview-ez-template:
type: 'template'
path: %ez_platformui.public_dir%/templates/fields/edit/image.hbt
ez-binaryfile-editview:
requires: ['ez-filebased-editview', 'binaryfileeditview-ez-template', 'event-tap']
requires: ['ez-binarybase-editview', 'binaryfileeditview-ez-template', 'event-tap']
path: %ez_platformui.public_dir%/js/views/fields/ez-binaryfile-editview.js
binaryfileeditview-ez-template:
type: 'template'
path: %ez_platformui.public_dir%/templates/fields/edit/binaryfile.hbt
ez-filebased-editview:
ez-binarybase-editview:
requires: ['ez-fieldeditview', 'event-tap']
path: %ez_platformui.public_dir%/js/views/fields/ez-filebased-editview.js
path: %ez_platformui.public_dir%/js/views/fields/ez-binarybase-editview.js
ez-emailaddress-editview:
requires: ['ez-fieldeditview', 'event-valuechange', 'emailaddresseditview-ez-template']
path: %ez_platformui.public_dir%/js/views/fields/ez-emailaddress-editview.js
Expand Down
@@ -1,18 +1,18 @@
.ez-filebased-content {
.ez-binarybase-content {
-webkit-transform-origin: center top;
transform-origin: center top;
-webkit-animation: ez-expand 0.2s ease forwards;
animation: ez-expand 0.2s ease forwards;
}

.is-field-empty .ez-filebased-content {
.is-field-empty .ez-binarybase-content {
display: -webkit-flex;
display: flex;
-webkit-animation: ez-collapse 0.2s ease forwards;
animation: ez-collapse 0.2s ease forwards;
}

.ez-filebased-warning {
.ez-binarybase-warning {
border-radius: 3px;
background: #222;
opacity: 0.85;
Expand All @@ -28,24 +28,24 @@
transition: all 0.2s ease;
}

.has-warning .ez-filebased-warning {
.has-warning .ez-binarybase-warning {
padding: 0.8em;

-webkit-transform: scale(1);
transform: scale(1);
}

.ez-filebased-warning .ez-filebased-warning-hide {
.ez-binarybase-warning .ez-binarybase-warning-hide {
font-size: 90%;
}

.ez-filebased-warning .ez-filebased-warning-hide:after {
.ez-binarybase-warning .ez-binarybase-warning-hide:after {
content: "\E600";
color: #fff;
display: inline-block;
}

.ez-filebased-warning .ez-filebased-warning-text:before {
.ez-binarybase-warning .ez-binarybase-warning-text:before {
content: "\E617";
font-size: 300%;
padding-right: 0.3em;
Expand All @@ -54,27 +54,27 @@
float: left;
}

.ez-filebased-remove-option {
.ez-binarybase-remove-option {
opacity: 1;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.is-field-empty .ez-filebased-remove-option {
.is-field-empty .ez-binarybase-remove-option {
opacity: 0.4;
}

.is-field-empty .ez-filebased-remove-option .ez-button-delete[disabled] {
.is-field-empty .ez-binarybase-remove-option .ez-button-delete[disabled] {
opacity: 1;
}

.ez-filebased-empty {
.ez-binarybase-empty {
color: #888;
font-style: italic;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.is-error .ez-filebased-empty {
.is-error .ez-binarybase-empty {
color: #BF3E33;
}
64 changes: 64 additions & 0 deletions Resources/public/css/views/fields/edit/binarybase.css
@@ -0,0 +1,64 @@
.is-field-empty .ez-binarybase-content {
display: none;
}

.ez-binarybase-input-file {
display: none;
}

.ez-binarybase-warning {
display: none;
text-align: left;
position: absolute;
bottom: 100%;
left: 10%;
width: 80%;
padding: 0.8em;
}

.has-warning .ez-binarybase-warning {
display: block;
}

.ez-binarybase-warning .ez-binarybase-warning-hide {
float: right;
display: block;
}

.ez-binarybase-warning .ez-binarybase-warning-text {
margin: 0;
}

.ez-binarybase-action {
text-align: center;
position: relative;
}

.ez-binarybase-action .ez-button {
margin: 1em;
}

.ez-binarybase-upload-new {
display: none;
}

.ez-binarybase-upload-replace {
display: inline;
}

.is-field-empty .ez-binarybase-upload-new {
display: inline;
}

.is-field-empty .ez-binarybase-upload-replace {
display: none;
}

.ez-binarybase-empty {
display: none;
}

.is-field-empty .ez-binarybase-empty {
display: block;
margin: 0.5em 0 0 0.5em;
}
64 changes: 0 additions & 64 deletions Resources/public/css/views/fields/edit/filebased.css

This file was deleted.

Expand Up @@ -2,13 +2,13 @@
* Copyright (C) eZ Systems AS. All rights reserved.
* For full copyright and license information view LICENSE file distributed with this source code.
*/
YUI.add('ez-filebased-editview', function (Y) {
YUI.add('ez-binarybase-editview', function (Y) {
"use strict";
/**
* Provides a base class for the field edit view of file based field types
* (Image, BinaryFile, Media)
*
* @module ez-filebased-editview
* @module ez-binarybase-editview
*/

Y.namespace('eZ');
Expand All @@ -19,7 +19,7 @@ YUI.add('ez-filebased-editview', function (Y) {
OVER_SIZE_TPL = "The file '{name}' was refused because its size is greater than the maximum allowed size ({max})",
win = Y.config.win,
events = {
'.ez-filebased-warning-hide': {
'.ez-binarybase-warning-hide': {
'tap': '_hideWarning',
},
'.ez-button-upload': {
Expand All @@ -28,20 +28,20 @@ YUI.add('ez-filebased-editview', function (Y) {
'.ez-button-delete': {
'tap': '_removeFile',
},
'.ez-filebased-input-file': {
'.ez-binarybase-input-file': {
'change': '_updateFile'
},
};

/**
* The FileBased field edit view. This class is meant to be extended.
* The BinaryBase field edit view. This class is meant to be extended.
*
* @namespace eZ
* @class FileBasedEditView
* @class BinaryBaseEditView
* @constructor
* @extends FieldEditView
*/
Y.eZ.FileBasedEditView = Y.Base.create('filebasedEditView', Y.eZ.FieldEditView, [], {
Y.eZ.BinaryBaseEditView = Y.Base.create('binarybaseEditView', Y.eZ.FieldEditView, [], {
initializer: function () {
this.events = Y.merge(this.events, events);
this._set('file', this.get('field'));
Expand All @@ -52,7 +52,7 @@ YUI.add('ez-filebased-editview', function (Y) {
},

render: function () {
Y.eZ.FileBasedEditView.superclass.render.call(this);
Y.eZ.BinaryBaseEditView.superclass.render.call(this);
this._setStateClasses();
return this;
},
Expand Down Expand Up @@ -248,7 +248,7 @@ YUI.add('ez-filebased-editview', function (Y) {
_chooseFile: function (e) {
e.preventDefault();
this._set('warning', false);
this.get('container').one('.ez-filebased-input-file').getDOMNode().click();
this.get('container').one('.ez-binarybase-input-file').getDOMNode().click();
},

/**
Expand All @@ -265,7 +265,7 @@ YUI.add('ez-filebased-editview', function (Y) {
if ( !warning ) {
container.removeClass(HAS_WARNING);
} else {
container.one('.ez-filebased-warning-text').setContent(warning);
container.one('.ez-binarybase-warning-text').setContent(warning);
container.addClass(HAS_WARNING);
}
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/views/fields/ez-binaryfile-editview.js
Expand Up @@ -20,9 +20,9 @@ YUI.add('ez-binaryfile-editview', function (Y) {
* @namespace eZ
* @class BinaryFileEditView
* @constructor
* @extends eZ.FileBasedEditView
* @extends eZ.BinaryBaseEditView
*/
Y.eZ.BinaryFileEditView = Y.Base.create('binaryfileEditView', Y.eZ.FileBasedEditView, [], {
Y.eZ.BinaryFileEditView = Y.Base.create('binaryfileEditView', Y.eZ.BinaryBaseEditView, [], {
initializer: function () {
this.after('fileChange', this._uiBinaryFileChange);
},
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/views/fields/ez-image-editview.js
Expand Up @@ -31,9 +31,9 @@ YUI.add('ez-image-editview', function (Y) {
* @namespace eZ
* @class ImageEditView
* @constructor
* @extends eZ.FileBasedEditView
* @extends eZ.BinaryBaseEditView
*/
Y.eZ.ImageEditView = Y.Base.create('imageEditView', Y.eZ.FileBasedEditView, [Y.eZ.AsynchronousView], {
Y.eZ.ImageEditView = Y.Base.create('imageEditView', Y.eZ.BinaryBaseEditView, [Y.eZ.AsynchronousView], {
initializer: function () {
var fieldValue = this.get('field').fieldValue;

Expand Down

0 comments on commit b1842b4

Please sign in to comment.