WordPress.org

Plugin Directory

Changeset 1450295


Ignore:
Timestamp:
07/06/16 21:40:03 (18 months ago)
Author:
filkaris
Message:

1.2.1 FB validation and warnings

Location:
statistinator/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • statistinator/trunk/css/admin.css

    r1431950 r1450295  
    2929    font-size: 2em; 
    3030} 
     31input.sts-error { 
     32    background-color: rgba(255, 0, 0, 0.2); 
     33} 
     34p.sts-error-message { 
     35    color: rgba(255,0,0,0.8); 
     36} 
    3137 
    3238 
  • statistinator/trunk/inc/class-statistinator-tab-account.php

    r1447917 r1450295  
    8181        case 'twitter': 
    8282            echo "<input type='text' id='statistinator_account_{$slug}' name='$field' value='$value' />"; 
    83             echo "<p class='description'>Enter your Twitter Screen Name (eg. if you are @wordpress, enter wordpress)</p>"; 
     83            echo "<p class='description'>Enter your Twitter Screen Name (eg. @wordpress)</p>"; 
    8484            break; 
    8585 
  • statistinator/trunk/inc/class-statistinator-tab-graph.php

    r1447917 r1450295  
    5151                        <span class="metric"><?= $info['data'] ?></span> 
    5252                        <span class="description"><?= $info['metric'] ?></span> 
     53                        <?php if ( $info['data'] == 0 ) : ?> 
     54                        <p class="sts-error-message"><?= $info['title'] ?> might not be set up correctly. Please update your settings <a href="?page=statistinator&tab=account">here</a></p> 
     55                        <?php endif; ?> 
    5356                    </div> 
    5457                    <?php endforeach; ?> 
  • statistinator/trunk/js/account.js

    r1447917 r1450295  
    3030        select: function( event, ui ) { 
    3131            $( "#statistinator_account_facebook_id" ).val( ui.item.id ); 
    32         } 
     32            $( '.sts-error-message' ).remove(); 
     33            $( '.sts-error' ).removeClass('sts-error'); 
     34        }, 
     35        change: function() {  
     36            if ( $( "#statistinator_account_facebook_name" ).val() == '' ) { 
     37                $( "#statistinator_account_facebook_id" ).val(''); 
     38            } 
     39        }, 
    3340    }); 
    3441 
     
    4956        var desc =  $( this ).find('option:selected').text() ; 
    5057        $( this ).parent().find( '.get_name' ).val( desc ); 
     58    }); 
     59     
     60 
     61    // Validate Form 
     62    $( 'form' ).submit( function() { 
     63        var facebook_id = $( "#statistinator_account_facebook_id" ).val(); 
     64        if ( facebook_id == '' ) { 
     65            var msg = "<p class='sts-error-message'>Please select your Page from the dropdown that appears while you type</p>"; 
     66            $( '#statistinator_account_facebook_name' ).focus(); 
     67            $( '#statistinator_account_facebook_name' ).addClass('sts-error'); 
     68            $( '#statistinator_account_facebook_name' ).before( msg ); 
     69 
     70            return false; 
     71        }  
    5172    }); 
    5273 
  • statistinator/trunk/readme.txt

    r1447917 r1450295  
    44Requires at least: 3.9 
    55Tested up to: 4.5.3 
    6 Stable tag: 1.2.0 
     6Stable tag: 1.2.1 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    5151== Changelog == 
    5252 
     53= 1.2.1 = 
     54* Facebook page validation  
     55* Warning about wrong settings  
     56 
    5357= 1.2.0 = 
    5458* YouTube is now supported 
    55  
    5659 
    5760= 1.1.6 = 
  • statistinator/trunk/statistinator.php

    r1447917 r1450295  
    44 * Description: Your social media analytics in one place. 
    55 * Author: Filippos Karailanidis 
    6  * Version: 1.2.0 
     6 * Version: 1.2.1 
    77 */ 
    88 
Note: See TracChangeset for help on using the changeset viewer.