Changeset 1842954
- Timestamp:
- 03/19/2018 05:05:01 PM (8 years ago)
- Location:
- canvasflow/trunk
- Files:
-
- 5 edited
-
README.md (modified) (2 diffs)
-
assets/css/style.css (modified) (1 diff)
-
canvasflow-plugin.php (modified) (1 diff)
-
includes/views/canvasflow-metabox-view.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
canvasflow/trunk/README.md
r1841508 r1842954 66 66 67 67 #### Changelog 68 ##### 0.12.3 69 * Add loading icon when publishing an article in metabox 70 68 71 ##### 0.12.2 69 72 * Replace alert message with html message … … 116 119 117 120 #### Upgrade Notice 121 ##### 0.12.3 122 * Add loading icon when publishing an article in metabox 123 118 124 ##### 0.12.2 119 125 * Replace alert message with html message -
canvasflow/trunk/assets/css/style.css
r1841508 r1842954 120 120 color: #FF530D; 121 121 } 122 123 .meta-box-alert-processing { 124 display: block; 125 color: #3498db; 126 } 127 128 .loader { 129 border: 3px solid #f3f3f3; /* Light grey */ 130 border-top: 3px solid #3498db; /* Blue */ 131 border-radius: 50%; 132 width: 13px; 133 height: 13px; 134 animation: spin 1s linear infinite; 135 } 136 137 @keyframes spin { 138 0% { transform: rotate(0deg); } 139 100% { transform: rotate(360deg); } 140 } -
canvasflow/trunk/canvasflow-plugin.php
r1841508 r1842954 3 3 Plugin Name: Canvasflow for WordPress 4 4 Description: This out-of-the-box connector provides a quick and simple way to push your blog content directly to an existing Canvasflow publication. 5 Version: 0.12. 25 Version: 0.12.3 6 6 Developer: Canvasflow 7 7 Developer URI: https://canvasflow.io -
canvasflow/trunk/includes/views/canvasflow-metabox-view.php
r1841508 r1842954 79 79 <?php echo $post_state_content?> 80 80 </td> 81 <div id="cf-alert" class="meta-box-alert"> </div>81 <div id="cf-alert" class="meta-box-alert"> </div> 82 82 </tr> 83 83 <?php … … 109 109 }); 110 110 111 loadProcess(); 112 111 113 request.done(function (response, textStatus, xhr){ 112 114 var status = xhr.status; 113 let currentClass = $('#cf_state').attr('class'); 114 $("#cf_state").removeClass(currentClass); 115 $("#cf_state").addClass('meta-box-post-state-in-sync'); 116 $("#cf_state").html("In Sync"); 117 118 let alertClass = $('#cf-alert').attr('class'); 119 $("#cf-alert").removeClass(alertClass); 120 $("#cf-alert").addClass('meta-box-alert meta-box-alert-success'); 121 $("#cf-alert").html("✔ Success"); 115 successOnPublish(); 122 116 }); 123 117 124 118 // Callback handler that will be called on failure 125 119 request.fail(function (jqXHR, textStatus, errorThrown){ 126 // Log the error to the console 127 let alertClass = $('#cf-alert').attr('class'); 128 $("#cf-alert").removeClass(alertClass); 129 $("#cf-alert").addClass('meta-box-alert meta-box-alert-error'); 130 $("#cf-alert").html("× Fail"); 131 console.error( 132 "The following error occurred: "+ 133 textStatus, errorThrown 134 ); 120 errorOnPublish(textStatus, errorThrown); 135 121 }); 136 122 }); 123 124 function loadProcess() { 125 let currentClass = $('#cf-alert').attr('class'); 126 $("#cf-alert").removeClass(currentClass); 127 $("#cf-alert").addClass('meta-box-alert meta-box-alert-processing'); 128 $("#cf-alert").html('<div class="loader"></div>'); 129 130 $("#cf_publish").html('Processing'); 131 } 132 133 function successOnPublish() { 134 $("#cf_publish").html('Publish to Canvasflow'); 135 136 let currentClass = $('#cf_state').attr('class'); 137 $("#cf_state").removeClass(currentClass); 138 $("#cf_state").addClass('meta-box-post-state-in-sync'); 139 $("#cf_state").html("In Sync"); 140 141 let alertClass = $('#cf-alert').attr('class'); 142 $("#cf-alert").removeClass(alertClass); 143 $("#cf-alert").addClass('meta-box-alert meta-box-alert-success'); 144 $("#cf-alert").html("✔ Success"); 145 } 146 147 function errorOnPublish(textStatus, errorThrown) { 148 $("#cf_publish").html('Publish to Canvasflow'); 149 150 // Log the error to the console 151 let alertClass = $('#cf-alert').attr('class'); 152 $("#cf-alert").removeClass(alertClass); 153 $("#cf-alert").addClass('meta-box-alert meta-box-alert-error'); 154 $("#cf-alert").html("× Fail"); 155 console.error( 156 "The following error occurred: "+ 157 textStatus, errorThrown 158 ); 159 } 137 160 </script> -
canvasflow/trunk/readme.txt
r1841508 r1842954 74 74 75 75 == Changelog == 76 = 0.12.3 = 77 * Add loading icon when publishing an article in metabox 78 76 79 = 0.12.2 = 77 80 * Replace alert message with html message … … 123 126 124 127 125 == Upgrade Notice ==3 128 == Upgrade Notice == 129 = 0.12.3 = 130 * Add loading icon when publishing an article in metabox 131 126 132 = 0.12.2 = 127 133 * Replace alert message with html message
Note: See TracChangeset
for help on using the changeset viewer.