Commit 4c89c920 authored by Eric Windham's avatar Eric Windham Committed by Kenneth Hall

Issue#3717

parent 6140f505
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
html,
body {
background: #fff;
}
h1 {
line-height: 32px;
}
h2 {
/*margin: 40px auto 20px;*/
}
p {
font-size: 16px;
/*padding-top: 20px;*/
}
ol {
font-size: 16px;
margin-left: 40px;
list-style-type: none;
}
hr {
margin: 50px 20px;
}
img {
width: 100%;
}
table {
width: 100%;
margin-bottom: 20px;
border-collapse: collapse;
}
tr {
height: 65px;
}
th {
text-align: left;
}
th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th:nth-child( 1 ),
td:nth-child( 1 ) {
width: 30%;
}
th:nth-child( 2 ),
td:nth-child( 2 ) {
width: 70%;
text-align: center;
}
tbody tr:nth-child(odd) {
background-color: #f2f2f2
}
.opt-in {
text-align: center;
}
.nf-logo {
display: block;
margin: 0 auto;
max-width: 300px;
}
.nf-update {
margin: 0 auto 50px auto;
max-width: 800px;
}
/*
* Dashicons
*/
.dashicons-yes {
color: green;
}
.dashicons-no {
color: #EF4748;
}
.dashicons-flag {
color: #ffba00; /* WP Update Nag Yellow */
}
.dashicons-warning {
color: gray;
}
.dashicons-update {
margin-left: -1px;
animation: dashicons-spin 1s infinite;
animation-timing-function: linear;
}
@keyframes dashicons-spin {
0% {
transform: rotate( 0deg );
}
100% {
transform: rotate( 360deg );
}
}
ol .dashicons {
margin-top: 2px;
margin-right: 8px;
margin-left: -30px;
}
/*
* Progress Bar
*/
.progress-bar,
.progress-bar--wrapper {
height: 10px;
}
.progress-bar {
width: 0;
background-color: green;
}
.progress-bar--wrapper {
width: 100%;
}
/*
* Button
*/
.nf-update-button {
color: white;
background-color: #2BAAE7;
cursor: pointer;
padding: 10px 20px;
height: auto;
display: none;
margin: auto;
border: 2px solid transparent;
transition: all .5s;
position: relative;
}
.nf-update-button:hover,
.nf-update-button:active {
color: #2BAAE7;
border-color: #2BAAE7;
background-color: white;
}
#nf-upgrades-table .nf-progress-bar {
margin: 0;
}
.jBox-Modal {
max-width: 500px
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -56,7 +56,11 @@ define( [ 'views/sections/widgets.js', 'views/sections/services.js', 'views/sect
initialize: function() {
if( "1" === nfAdmin.requiredUpdates ) {
// if we have required updates, redirect them
window.location.hash = '#requiredUpdates';
} else if ( '#requiredUpdates' === window.location.hash ) {
// if no updates, but someone hits update url, give the the dashboard
window.location.hash = '';
}
switch( window.location.hash ) {
......@@ -110,7 +114,15 @@ define( [ 'views/sections/widgets.js', 'views/sections/services.js', 'views/sect
onRender: function() {
if( useServices ) this.showChildView( 'notices', new OAuthView() );
if( useServices ) this.showChildView( 'promotions', new PromotionView() );
if( useServices && '1' !== nfAdmin.requiredUpdates ) {
this.showChildView( 'promotions', new PromotionView() );
}
// if no updates and someone hits the update url, give them the dashboard
if( '0' === nfAdmin.requiredUpdates
&& '#requiredUpdates' === window.location.hash ) {
window.location.hash = '';
}
switch( window.location.hash ) {
case '#apps':
......
......@@ -149,6 +149,8 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
</script>
<?php
$required_updates = get_option( 'ninja_forms_needs_updates', 0 );
wp_enqueue_script( 'backbone-radio', Ninja_Forms::$url . 'assets/js/lib/backbone.radio.min.js', array( 'jquery', 'backbone' ) );
wp_enqueue_script( 'backbone-marionette-3', Ninja_Forms::$url . 'assets/js/lib/backbone.marionette3.min.js', array( 'jquery', 'backbone' ) );
wp_enqueue_script( 'nf-jbox', Ninja_Forms::$url . 'assets/js/lib/jBox.min.js', array( 'jquery' ) );
......@@ -165,7 +167,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
'formTelemetry' => ( get_option( 'nf_form_tel_sent' ) ) ? 0 : 1,
'showOptin' => ( get_option( 'ninja_forms_do_not_allow_tracking' ) ||
get_option( 'ninja_forms_allow_tracking' ) ) ? 0 : 1,
'requiredUpdates' => get_option( 'ninja_forms_needs_updates', 0 ),
'requiredUpdates' => $required_updates,
'currentUserEmail' => $current_user->user_email,
'doingCleanup' => ( ! get_option( 'ninja_forms_data_is_clean' ) &&
isset( $_REQUEST[ 'action' ] ) &&
......@@ -177,6 +179,10 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
wp_enqueue_style( 'nf-jbox', Ninja_Forms::$url . 'assets/css/jBox.css' );
wp_enqueue_style( 'nf-font-awesome', Ninja_Forms::$url . 'assets/css/font-awesome.min.css' );
if( $required_updates ) {
wp_enqueue_style( 'nf-updates-styles', Ninja_Forms::$url . '/assets/css/required-updates.css' );
}
Ninja_Forms::template( 'admin-menu-dashboard.html.php' );
}
}
......
......@@ -249,8 +249,16 @@
</p>
</div>
<div id="nfUpgradeApp">
<table id="nf-upgrades-table">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<input class="nf-button primary nf-required-update" type='button' id='nf-required-updates-btn' name='nf-required-updates-btn' value="<?php _e( 'Do Required Updates' ); ?>" />
<input class="nf-required-update nf-update-button" type='button' id='nf-required-updates-btn' name='nf-required-updates-btn' value="<?php _e( 'Do Required Updates' ); ?>" />
</div>
<div class="nf-update-progress jBox-content" id="nf-required-updates-progress"></div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment