Skip to content

Commit

Permalink
Merge pull request ezsystems#142 from ezsystems/ezp-23749_edit_binary…
Browse files Browse the repository at this point in the history
…file

EZP-23749: As an editor, I want to be able to fill the BinaryFile fields
  • Loading branch information
dpobel committed Dec 23, 2014
2 parents ce02b8b + 90c1911 commit 0aa8958
Show file tree
Hide file tree
Showing 16 changed files with 2,424 additions and 157 deletions.
2 changes: 2 additions & 0 deletions Resources/config/css.yml
Expand Up @@ -43,6 +43,7 @@ system:
- '@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/image.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/binaryfile.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/selection.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/time.css'
- '@eZPlatformUIBundle/Resources/public/css/views/fields/edit/date.css'
Expand Down Expand Up @@ -84,6 +85,7 @@ system:
- '@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/image.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/views/fields/edit/binaryfile.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/modules/tabs.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/modules/page-header.css'
- '@eZPlatformUIBundle/Resources/public/css/theme/modules/serverside-content.css'
Expand Down
7 changes: 7 additions & 0 deletions Resources/config/yui.yml
Expand Up @@ -150,6 +150,7 @@ system:
- 'ez-textblock-editview'
- 'ez-xmltext-editview'
- 'ez-image-editview'
- 'ez-binaryfile-editview'
- 'ez-emailaddress-editview'
- 'ez-maplocation-editview'
- 'ez-url-editview'
Expand Down Expand Up @@ -254,6 +255,12 @@ system:
imageeditview-ez-template:
type: 'template'
path: %ez_platformui.public_dir%/templates/fields/edit/image.hbt
ez-binaryfile-editview:
requires: ['ez-fieldeditview', 'binaryfileeditview-ez-template', 'ez-asynchronousview', '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-emailaddress-editview:
requires: ['ez-fieldeditview', 'event-valuechange', 'emailaddresseditview-ez-template']
path: %ez_platformui.public_dir%/js/views/fields/ez-emailaddress-editview.js
Expand Down
37 changes: 0 additions & 37 deletions Resources/public/css/layout.css
Expand Up @@ -35,43 +35,6 @@
-webkit-font-smoothing: antialiased;
}

/*csslint vendor-prefix: false */
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
}
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

.ez-platformui-app-page {
height: 100%;
}
Expand Down
77 changes: 77 additions & 0 deletions Resources/public/css/theme/app.css
Expand Up @@ -140,3 +140,80 @@
.ez-navigation-container {
transition: all 0.3s ease;
}

/*csslint vendor-prefix: false */
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
}
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}

@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

@-webkit-keyframes ez-expand {
0% {
-webkit-transform: scaleY(0);
}
100% {
-webkit-transform: scaleY(1);
}
}

@-webkit-keyframes ez-collapse {
0% {
-webkit-transform: scaleY(1);
max-height: 100%;
}
100% {
-webkit-transform: scaleY(0);
max-height: 0;
}
}

@keyframes ez-expand {
0% {
transform: scaleY(0);
}
100% {
transform: scaleY(1);
}
}

@keyframes ez-collapse {
0% {
transform: scaleY(1);
max-height: 100%;
}
100% {
transform: scaleY(0);
max-height: 0;
}
}
145 changes: 145 additions & 0 deletions Resources/public/css/theme/views/fields/edit/binaryfile.css
@@ -0,0 +1,145 @@
.ez-view-binaryfileeditview .ez-binaryfile-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;
}

.ez-view-binaryfileeditview.is-binaryfile-empty .ez-binaryfile-content {
display: -webkit-flex;
display: flex;
-webkit-animation: ez-collapse 0.2s ease forwards;
animation: ez-collapse 0.2s ease forwards;
}

.ez-view-binaryfileeditview .ez-binaryfile-content:before {
content: "\E629";
font-size: 7em;
color: #222;
}

.ez-view-binaryfileeditview .ez-binaryfile-properties {
margin-left: 10em; /* icon font size + 3em */
list-style-type: square;
}

.ez-view-binaryfileeditview .ez-binaryfile-properties-download {
list-style-type: none;
margin-left: -1.45em;
}

.ez-view-binaryfileeditview .ez-binaryfile-download:before {
font-family: 'ez-platformui-icomoon';
content: "\E61e";
padding-right: 0.3em;
font-size: 130%;
color: #333;
}

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

.ez-view-binaryfileeditview.is-error .ez-binaryfile-empty {
color: #BF3E33;
}

.ez-view-binaryfileeditview .ez-binaryfile-remove-option {
opacity: 1;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.ez-view-binaryfileeditview.is-binaryfile-empty .ez-binaryfile-remove-option {
opacity: 0.4;
}

.ez-view-binaryfileeditview.is-binaryfile-empty .ez-button-delete[disabled] {
opacity: 1;
}

.ez-view-binaryfileeditview .ez-binaryfile-warning {
border-radius: 3px;
background: #222;
opacity: 0.85;
color: #fff;
display: block;
padding: 0;

-webkit-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.ez-view-binaryfileeditview.has-warning .ez-binaryfile-warning {
padding: 0.8em;

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

.ez-view-binaryfileeditview .ez-binaryfile-warning-hide {
font-size: 90%;
}

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

.ez-view-binaryfileeditview .ez-binaryfile-warning-text:before {
content: "\E617";
font-size: 300%;
padding-right: 0.3em;
color: #fff;
display: block;
float: left;
}

.ez-view-binaryfileeditview.is-type-audio .ez-binaryfile-content:before {
content: "\E624";
}

.ez-view-binaryfileeditview.is-type-image .ez-binaryfile-content:before {
content: "\E625";
}

.ez-view-binaryfileeditview.is-type-text .ez-binaryfile-content:before {
content: "\E620";
}

.ez-view-binaryfileeditview.is-type-video .ez-binaryfile-content:before {
content: "\E621";
}

.ez-view-binaryfileeditview.is-mimetype-application-pdf .ez-binaryfile-content:before {
content: "\E628";
}

.ez-view-binaryfileeditview.is-mimetype-application-zip .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-x-7z-compressed .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-x-rar-compressed .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-x-tar .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-x-stuffit .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-gzip .ez-binaryfile-content:before {
content: "\E623";
}

.ez-view-binaryfileeditview.is-mimetype-application-vnd-openxmlformats-officedocument-wordprocessingml-document .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-vns-ms-word .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-msword .ez-binaryfile-content:before {
content: "\E627";
}

.ez-view-binaryfileeditview.is-mimetype-application-vnd-openxmlformats-officedocument-spreadsheetml-sheet .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-vnd-ms-excel .ez-binaryfile-content:before,
.ez-view-binaryfileeditview.is-mimetype-application-msexcel .ez-binaryfile-content:before {
content: "\E626";
}
48 changes: 4 additions & 44 deletions Resources/public/css/theme/views/fields/edit/image.css
@@ -1,55 +1,15 @@
@-webkit-keyframes ez-image-expand {
0% {
-webkit-transform: scaleY(0);
}
100% {
-webkit-transform: scaleY(1);
}
}

@-webkit-keyframes ez-image-collpase {
0% {
-webkit-transform: scaleY(1);
max-height: 100%;
}
100% {
-webkit-transform: scaleY(0);
max-height: 0;
}
}

@keyframes ez-image-expand {
0% {
transform: scaleY(0);
}
100% {
transform: scaleY(1);
}
}

@keyframes ez-image-collpase {
0% {
transform: scaleY(1);
max-height: 100%;
}
100% {
transform: scaleY(0);
max-height: 0;
}
}

.ez-view-imageeditview .ez-image-editpreview {
-webkit-transform-origin: center top;
transform-origin: center top;
-webkit-animation: ez-image-expand 0.2s ease forwards;
animation: ez-image-expand 0.2s ease forwards;
-webkit-animation: ez-expand 0.2s ease forwards;
animation: ez-expand 0.2s ease forwards;
}

.ez-view-imageeditview.is-image-empty .ez-image-editpreview {
display: -webkit-flex;
display: flex;
-webkit-animation: ez-image-collpase 0.2s ease forwards;
animation: ez-image-collpase 0.2s ease forwards;
-webkit-animation: ez-collapse 0.2s ease forwards;
animation: ez-collapse 0.2s ease forwards;
}

.ez-view-imageeditview.is-image-being-updated .ez-image-preview {
Expand Down

0 comments on commit 0aa8958

Please sign in to comment.