Skip to content

Commit afdb84f

Browse files
authored
Merge pull request #93 from cloudinary/uat
V2.1.1 version release
2 parents e6e6921 + b4cb1fc commit afdb84f

26 files changed

+750
-205
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/cloudinary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Cloudinary
44
* Plugin URI: https://cloudinary.com/documentation/wordpress_integration
55
* Description: With the Cloudinary plugin, you can upload and manage your media assets in the cloud, then deliver them to your users through a fast content delivery network, improving your website’s loading speed and overall user experience. Apply multiple transformations and take advantage of a full digital asset management solution without leaving WordPress.
6-
* Version: 2.0.3
6+
* Version: 2.1.1
77
* Author: Cloudinary Ltd., XWP
88
* Author URI: https://cloudinary.com/
99
* License: GPLv2+

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/css/cloudinary.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Loading
Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,109 @@
11
@font-face {
2-
font-family: 'cloudinary';
3-
src: url('fonts/cloudinary.eot?fj77m5');
4-
src: url('fonts/cloudinary.eot?fj77m5#iefix') format('embedded-opentype'),
2+
font-family : 'cloudinary';
3+
src : url('fonts/cloudinary.eot?fj77m5');
4+
src : url('fonts/cloudinary.eot?fj77m5#iefix') format('embedded-opentype'),
55
url('fonts/cloudinary.ttf?fj77m5') format('truetype'),
66
url('fonts/cloudinary.woff?fj77m5') format('woff'),
77
url('fonts/cloudinary.svg?fj77m5#cloudinary') format('svg');
8-
font-weight: normal;
9-
font-style: normal;
8+
font-weight : normal;
9+
font-style : normal;
1010
}
1111

1212
.dashicons {
1313
&-cloudinary {
1414
/* use !important to prevent issues with browser extensions that change fonts */
15-
speak: none;
16-
font-style: normal;
17-
font-weight: normal;
18-
font-variant: normal;
19-
text-transform: none;
20-
line-height: 1;
15+
speak : none;
16+
font-style : normal;
17+
font-weight : normal;
18+
font-variant : normal;
19+
text-transform : none;
20+
line-height : 1;
2121

2222
/* Better Font Rendering =========== */
23-
-webkit-font-smoothing: antialiased;
24-
-moz-osx-font-smoothing: grayscale;
23+
-webkit-font-smoothing : antialiased;
24+
-moz-osx-font-smoothing : grayscale;
2525

2626
&:before {
27-
font-family: 'cloudinary' !important;
28-
content: '\e900';
27+
font-family : 'cloudinary' !important;
28+
content : '\e900';
2929
}
3030

3131
&.success {
32-
color: $color-green;
32+
color : $color-green;
3333
}
3434

3535
&.error {
36-
color: $color-red;
36+
color : $color-red;
3737

3838
&:before {
39-
content: '\e901';
39+
content : '\e901';
4040
}
4141
}
4242

4343
&.warning {
44-
color: $color-orange;
44+
color : $color-orange;
4545

4646
&:before {
47-
content: '\e902';
47+
content : '\e902';
4848
}
4949
}
5050

5151
&.warning {
52-
color: $color-orange;
52+
color : $color-orange;
5353
}
5454

5555
&.warning {
56-
color: $color-orange;
56+
color : $color-orange;
5757
}
5858
}
5959
}
6060

6161
.column-cld_status {
62-
width: 5.5em;
62+
width : 5.5em;
6363

6464
.dashicons {
6565
&-cloudinary {
66-
display: inline-block;
66+
display : inline-block;
6767

6868
&:before {
69-
font-size: 1.8rem;
69+
font-size : 1.8rem;
7070
}
7171
}
7272
}
7373
}
7474

7575
.form-field, .form-table {
7676
.error-notice {
77-
display: none;
78-
color: $color-red;
77+
display : none;
78+
color : $color-red;
7979
}
8080

8181
input.cld-field:invalid {
82-
border-color: $color-red;
82+
border-color : $color-red;
8383

8484
+ .error-notice {
85-
display: inline-block;
85+
display : inline-block;
8686
}
8787
}
8888
}
8989

90-
.cloudinary-welcome {
91-
background-image: url("logo.svg");
92-
background-repeat: no-repeat;
93-
background-size: 153px;
94-
background-position: top 12px right 20px;
90+
.cloudinary {
91+
&-welcome {
92+
background-image : url("logo.svg");
93+
background-repeat : no-repeat;
94+
background-size : 153px;
95+
background-position : top 12px right 20px;
96+
}
97+
&-stats{
98+
display: inline-block;
99+
margin-left: 25px;
100+
}
101+
&-stat{
102+
cursor: help;
103+
}
104+
&-percent {
105+
font-size : 0.8em;
106+
vertical-align : top;
107+
color : $color-blue;
108+
}
95109
}

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/css/src/components/_sync.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,19 @@
7070
max-width : 300px;
7171
display : none;
7272
}
73+
74+
&-status {
75+
&-disabled {
76+
color : $color-red;
77+
}
78+
79+
&-enabled {
80+
color : $color-green;
81+
}
82+
83+
&-button.button {
84+
vertical-align : baseline;
85+
}
86+
}
7387
}
7488

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Frontend video styles.
2+
.cld {
3+
&-video {
4+
&-player {
5+
max-width: 100%;
6+
}
7+
}
8+
}
9+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.cld-video-player{max-width:100%}

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/js/cloudinary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/js/src/components/settings-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
let field = $(this),
5151
value = field.val();
5252

53-
let reg = new RegExp(/^(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g );
53+
let reg = new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g );
5454
if( reg.test( value ) ){
5555
field.addClass( 'settings-valid-field' );
5656
field.removeClass( 'settings-invalid-field' );

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/js/src/components/sync.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ const Sync = {
44
progress: document.getElementById( 'progress-wrapper' ),
55
submitButton: document.getElementById( 'submit' ),
66
stopButton: document.getElementById( 'stop-sync' ),
7-
progressCount: document.getElementById( 'sync-progress' ),
8-
barSyncCount: document.getElementById( 'sync-total' ),
97
completed: document.getElementById( 'completed-notice' ),
108
show: 'inline-block',
119
hide: 'none',
10+
isRunning: false,
1211
getStatus: function getStatus() {
1312
var self = this,
1413
resourceType = [],
@@ -22,8 +21,9 @@ const Sync = {
2221
request.setRequestHeader( 'X-WP-Nonce', cloudinaryApi.nonce );
2322
},
2423
} ).done( function( data ) {
25-
if ( data.done < data.total ) {
26-
setTimeout( Sync.getStatus, 2000 );
24+
Sync.isRunning = data.is_running;
25+
if ( Sync.isRunning ) {
26+
setTimeout( Sync.getStatus, 10000 );
2727
}
2828
Sync._updateUI( data );
2929
} );
@@ -32,6 +32,8 @@ const Sync = {
3232
var self = this,
3333
url = cloudinaryApi.restUrl + 'cloudinary/v1/sync';
3434

35+
Sync.isRunning = false;
36+
3537
wp.ajax.send( {
3638
url: url,
3739
data: {
@@ -48,11 +50,16 @@ const Sync = {
4850
var self = this,
4951
url = cloudinaryApi.restUrl + 'cloudinary/v1/sync';
5052

53+
Sync.isRunning = true;
54+
Sync.progress.style.display = Sync.show;
55+
5156
wp.ajax.send( {
5257
url: url,
5358
beforeSend: function( request ) {
5459
request.setRequestHeader( 'X-WP-Nonce', cloudinaryApi.nonce );
5560
},
61+
} ).done( function ( data ) {
62+
setTimeout( Sync.getStatus, 10000 );
5663
} );
5764
},
5865
_updateUI: function _updateUI( data ) {
@@ -75,13 +82,14 @@ const Sync = {
7582
this.stopButton.style.display = this.hide;
7683
}
7784

78-
if ( data.percent < 100 ) {
79-
this.barSyncCount.innerText = data.total;
80-
this.progressCount.innerText = data.done;
85+
if ( data.percent === 100 ) {
86+
this.completed.style.display = this.show;
87+
}
88+
89+
if ( this.isRunning ) {
8190
this.progress.style.display = this.show;
8291
}
8392
else {
84-
this.completed.style.display = this.show;
8593
this.progress.style.display = this.hide;
8694
}
8795
},

0 commit comments

Comments
 (0)