Skip to content

Commit 8619161

Browse files
committed
Added animation on action buttons
* 1.4.1 Added animation on action buttons * Update data file button shows animated icon on download action * Run the scan button shows animated icon on run action * cleaned up some javascript on the buttons, now using jquery
1 parent da29587 commit 8619161

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
**MainWP check vulnerability extension**
22

33
**Changelog:**
4+
* 1.4.1 Added animation on action buttons
5+
* Update data file button shows animated icon on download action
6+
* Run the scan button shows animated icon on run action
7+
* cleaned up some javascript on the buttons, now using jquery
48
* 1.4.0 New plugin updater
59
* added: plugin updater
610
* removed: updater class

class/class-dashboard.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
// mwpcpv dashboard
3-
// version: 1.2.1
3+
// version: 1.2.2
44
// ---------------------
55

66
class MainWPCheckPluginVulnerability extends MainWPCheckPluginVulnerabilityActivator {
@@ -122,9 +122,10 @@ public static function hhdev_mwpcpv_render_page() {
122122
} ?></p>
123123
<p><input name="mwpcpv-get-data-file" type="hidden" value="1" /></p>
124124

125-
<p><a class="ui button green" href="#" onclick="javascript:document.getElementById('data-update').submit();"><?php _e('Update data file','hhdev-mwpcpv'); ?></a></p>
125+
<p><a id="dl-button" class="ui button green" href="#"><?php _e('Update data file','hhdev-mwpcpv'); ?></a>&nbsp;&nbsp;<span class="loader dl-loader" style="display:none;"></span></p>
126126
</form>
127127

128+
128129
</div>
129130
</div>
130131

@@ -148,6 +149,14 @@ public static function hhdev_mwpcpv_render_page() {
148149
$('#toggle-novuln').removeClass('active').css("background-color","#7FB100");
149150
}
150151
});
152+
$( "#dl-button" ).on( "click", function() {
153+
$('.dl-loader').css('display','inline-block');
154+
$('#data-update').submit();
155+
});
156+
$( "#run-button" ).on( "click", function() {
157+
$('.run-loader').css('display','inline-block');
158+
$('#run-scan').submit();
159+
});
151160
});
152161
</script>
153162
<style>
@@ -158,6 +167,8 @@ public static function hhdev_mwpcpv_render_page() {
158167
#mainwp-page-navigation-wrapper, .mainwp-page-navigation {display: none !important;min-width: 0px;}
159168
.mainwp-individual-site-view #mainwp-site-mode-wrap { width: 100%; float: none;}
160169
#mainwp_custom_dashboard_extension .ui.segment.website { margin-bottom: 10px; max-width: 680px; margin-left: 10px; border: 1px solid #ccc; border-radius: 0.28571429rem;}
170+
/* loader icon */
171+
.loader { width: 28px; height: 28px; border: 5px solid #FFF; border-bottom-color: transparent; border-radius: 50%; vertical-align: middle; display: inline-block; box-sizing: border-box; animation: rotation 1s linear infinite; } @keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
161172
-->
162173
</style>
163174
<div class='ui segment'>
@@ -177,7 +188,7 @@ public static function hhdev_mwpcpv_render_page() {
177188
echo '&nbsp;'.$MainWPCheckPluginVulnerabilityActivator->hhdev_get_groups_dropdown($selected_group);
178189
echo '</div>';
179190
?>
180-
<div class="sub header"><a class="ui button green" href="#" onclick="javascript:document.getElementById('run-scan').submit();"><?php _e('Run the scan!','hhdev-mwpcpv'); ?></a></div>
191+
<div class="sub header"><a id="run-button" class="ui button green" href="#"><?php _e('Run the scan!','hhdev-mwpcpv'); ?></a> &nbsp;&nbsp;<span class="loader run-loader" style="display:none;"></span></div>
181192
<?php } // end if file exist ?>
182193

183194
</form>

hhdev-mwpcpv.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: MainWP Check Plugins Vulnerability Extension
44
* Plugin URI: https://haha.nl
55
* Description: MainWP Extension: Use this extension to check the installed child site plugins for vulnerabilities using data from the wordfence vulnerability data feed api.
6-
* Version: 1.4.0
6+
* Version: 1.4.1
77
* Author: herbert hoekstra - haha!
88
* Author URI: https://haha.nl
99
* Documentation URI: https://haha.nl/voorbeelden/mainwp-check-plugins-vulnerability-extension/
@@ -42,7 +42,7 @@ class MainWPCheckPluginVulnerabilityActivator
4242
protected $childFile;
4343
protected $plugin_handle = 'mainwp-check-plugins-vulnerability';
4444
protected $product_id = 'MainWP Check Plugins Vulnerability Extension';
45-
protected $software_version = '1.4.0'; // used for mwp update notice
45+
protected $software_version = '1.4.1'; // used for mwp update notice
4646

4747
// set custom plugin vars
4848
// -------------------

0 commit comments

Comments
 (0)