Plugin Directory

Changeset 1693410


Ignore:
Timestamp:
07/09/2017 10:04:25 PM (9 years ago)
Author:
robby.roboter
Message:

Stylish checkbox

Location:
redi-restaurant-reservation/branches/newDesign
Files:
42 added
4 edited

Legend:

Unmodified
Added
Removed
  • redi-restaurant-reservation/branches/newDesign/css/restaurant.css

    r1689184 r1693410  
    10161016    font-family: "PT Sans Narrow", verdana;
    10171017    font-size: 16px;
    1018     margin-left: 55px;
     1018    margin-left: 49px;
    10191019}
    10201020
     
    13281328    color: lightgrey;
    13291329}
     1330
     1331#redi-booking-div .checkbox{
     1332    display: inline-block;
     1333}
     1334#redi-booking-div .checkbox label{
     1335    margin: 0;
     1336}
     1337
     1338#redi-booking-div .checkbox label:after{
     1339    content: '';
     1340    display: table;
     1341    clear: both;
     1342}
     1343
     1344#redi-booking-div .checkbox .cr {
     1345    position: relative;
     1346    display: inline-block;
     1347    width: 1.3em;
     1348    height: 1.3em;
     1349    float: left;
     1350    margin-right: .5em;
     1351    border: 1px solid #ccc;
     1352    border-top-right-radius: 3px;
     1353    border-bottom-right-radius: 3px;
     1354    height: 32px;
     1355    display: block;
     1356    width: 37px;
     1357    background-color: #f3f3f3;
     1358}
     1359
     1360#redi-booking-div .checkbox .cr .cr-icon {
     1361    position: absolute;
     1362    font-size: 1.2em;
     1363    line-height: 0;
     1364    top: 50%;
     1365    left: 20%;
     1366}
     1367
     1368#redi-booking-div .checkbox label input[type="checkbox"]{
     1369    display: none;
     1370}
     1371
     1372#redi-booking-div .checkbox label input[type="checkbox"] + .cr > .cr-icon{
     1373    transform: scale(3) rotateZ(-20deg);
     1374    opacity: 0;
     1375    transition: all .3s ease-in;
     1376}
     1377
     1378#redi-booking-div .checkbox label input[type="checkbox"]:checked + .cr > .cr-icon {
     1379    transform: scale(1) rotateZ(0deg);
     1380    opacity: 1;
     1381}
     1382
     1383#redi-booking-div .checkbox label input[type="checkbox"]:disabled + .cr{
     1384    opacity: .5;
     1385}
     1386
     1387#redi-booking-div .checkbox_field label{
     1388    position: relative;
     1389    top: -10px;
     1390}
  • redi-restaurant-reservation/branches/newDesign/js/restaurant.js

    r1646920 r1693410  
    245245
    246246        $('.field_required').each(function () {
    247             if ($(this).attr('type') === 'checkbox' && $(this).attr('checked') !== 'checked' || $(this).attr('type') === 'text' && $(this).val() === '') {
     247            if ($(this).attr('type') === 'checkbox' && !$(this).prop('checked') || $(this).attr('type') === 'text' && $(this).val() === '') {
    248248                $('#' + this.id + '_message').show();
    249249                $('#' + this.id).addClass('form_validation_error');
  • redi-restaurant-reservation/branches/newDesign/redi-restaurant-booking.php

    r1689142 r1693410  
    791791            //calendar localization
    792792            if(!wp_script_is('jquery-ui-datepicker-localization')) {
    793                 wp_register_script('jquery-ui-datepicker-localization', REDI_BOOKING_PLUGIN_URL . '/lib/datetimepicker/js/jquery.ui.i18n.all.min.js');
     793                wp_register_script('jquery-ui-datepicker-localization', REDI_BOOKING_PLUGIN_URL . 'lib/datetimepicker/js/jquery.ui.i18n.all.min.js');
    794794            }
    795795
    796796            if(!wp_style_is('jquery-ui-custom-style')) {
    797797                wp_register_style('jquery-ui-custom-style',
    798                     REDI_BOOKING_PLUGIN_URL . '/css/custom-theme/jquery-ui-1.8.18.custom.css','jquery_ui', '1.8.18');
     798                    REDI_BOOKING_PLUGIN_URL . 'css/custom-theme/jquery-ui-1.8.18.custom.css','jquery_ui', '1.8.18');
    799799            }
    800800            wp_enqueue_style('jquery-ui-custom-style');
     
    804804            //DateTime parsing library
    805805            if(!wp_script_is('moment')) {
    806                 wp_register_script('moment', REDI_BOOKING_PLUGIN_URL . '/lib/moment/moment.js');
     806                wp_register_script('moment', REDI_BOOKING_PLUGIN_URL . 'lib/moment/moment.js');
    807807            }
    808808            wp_enqueue_script('moment');
    809809
    810             wp_register_script('restaurant', REDI_BOOKING_PLUGIN_URL . '/js/restaurant.js', array('jquery'));
     810            wp_register_script('restaurant', REDI_BOOKING_PLUGIN_URL . 'js/restaurant.js', array('jquery'));
    811811
    812812            wp_localize_script('restaurant',
     
    822822            wp_enqueue_script('restaurant');
    823823
    824             wp_register_style('redi-booking', REDI_BOOKING_PLUGIN_URL . '/css/restaurant.css');
     824            wp_register_style('redi-booking', REDI_BOOKING_PLUGIN_URL . 'css/restaurant.css');
    825825            wp_enqueue_style('redi-booking');
    826826
     
    831831
    832832            wp_enqueue_style('google_fonts_sans_narrow');
     833
     834            //wp_register_style('font-awesome', REDI_BOOKING_PLUGIN_URL . 'lib/font-awesome-4.3.0/font-awesome.min.css',null, '4.7.0');
     835            wp_register_style('font-awesome', REDI_BOOKING_PLUGIN_URL . 'lib/font-awesome-4.7.0/css/font-awesome.min.css',null, '4.7.0');
     836            wp_enqueue_style('font-awesome');
    833837
    834838            $apiKeyId = (int)$this->GetOption('apikeyid');
  • redi-restaurant-reservation/branches/newDesign/templates/frontend.php

    r1689142 r1693410  
    307307                    switch($custom_field->Type):
    308308                        case 'checkbox':?>
    309                                     <span class="checkbox_field">
    310                         <input type="checkbox" value="" name="field_<?php echo $i; ?>"
    311                                id="field_<?php echo $i; ?>"
    312                                class="<?php if ( isset( $custom_field->Required ) && $custom_field->Required ): ?>field_required<?php endif; ?>"/>
    313                         <label for="field_<?php echo $i; ?>">
    314                             <?php echo $custom_field->Name; ?>
    315                         </label>
    316                     </span>
     309                            <span class="checkbox_field">
     310                                <div class="checkbox">
     311                                    <label style="">
     312                                        <input class="<?php if ( isset( $custom_field->Required ) && $custom_field->Required ): ?>field_required<?php endif; ?>" value="" type="checkbox" name="field_<?php echo $i; ?>" id="field_<?php echo $i; ?>">
     313                                        <span class="cr"><i class="cr-icon fa fa-check"></i></span>
     314                                    </label>
     315                                </div>
     316                                <label for="field_<?php echo $i; ?>">
     317                                    <?php echo $custom_field->Name; ?>
     318                                </label>
     319                            </span>
     320
    317321                                    <?php break;
    318322                                default:
Note: See TracChangeset for help on using the changeset viewer.