Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 49 additions & 4 deletions css/sass/_field-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,37 @@

&.loading .loading-indicator {
display: block;
position: absolute;
top: 50%;
left: 50%;
margin: -10px 0 0 -10px;
position: relative;
width: 100%;
height: 100%;
}

.loading-indicator {
.dashicons {
font-size: 80px;
height: 100px;
line-height: 100px;
width: 100%;
text-align: center;
vertical-align: middle;
}
.attachment-preview-loading {
width: 60px;
height: 5px;
overflow: hidden;
background-color: transparent;
margin: -30px auto 0;

ins {
background-color: #464646;
margin: 0 0 0 -60px;
width: 60px;
height: 5px;
display: block;
-webkit-animation: attachment-preview-loading 1.3s infinite 1s linear;
animation: attachment-preview-loading 1.3s infinite 1s linear;
}
}
}

.filename {
Expand All @@ -75,3 +102,21 @@
}

}

@-webkit-keyframes attachment-preview-loading {
0% {
margin-left: -60px;
}
100% {
margin-left: 60px;
}
}

@keyframes attachment-preview-loading {
0% {
margin-left: -60px;
}
100% {
margin-left: 60px;
}
}
42 changes: 38 additions & 4 deletions css/shortcode-ui.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/shortcode-ui.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion inc/fields/class-field-attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public function action_shortcode_ui_loaded_editor() {
<div class="shortcake-attachment-preview attachment-preview attachment">
<button id="{{ data.attr }}" class="button button-small add">{{ data.addButton }}</button>
<button class="button button-small remove">&times;</button>
<span class="loading-indicator spinner"></span>
<div class="loading-indicator">
<span class="dashicons dashicons-format-image"></span>
<div class="attachment-preview-loading"><ins></ins></div>
</div>
</div>
</div>
</script>
Expand Down