Plugin Directory

Changeset 1954557


Ignore:
Timestamp:
10/10/2018 01:06:08 PM (7 years ago)
Author:
tigrisflexplatform
Message:

Added pagination to Vacancies List

Location:
tigris/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tigris/trunk/assets/css/acs-back-style.css

    r1939863 r1954557  
    33 * Plugin URI: http://www.amconsoft.com/
    44 * Description: Plug-in package for Wordpress from Amcon Soft.
    5  * Version: 1.1.1
     5 * Version: 0.0.2
    66 * Author: Amcon Soft
    77 * Author URI: http://www.amconsoft.com/
     
    213213#acskey {
    214214}
    215 .acs-content.form-table {
     215.form-table {
    216216    width: inherit;
    217217}
     
    649649}
    650650/**
    651  * END: 652
     651 * END: 555
    652652 */
  • tigris/trunk/assets/css/acs-style.css

    r1939863 r1954557  
    99 * Text Domain: acs-tigris-for-salesforce
    1010 * Tigris for Salesforce.
    11  * Version: 1.1.1
     11 * Version: 0.0.2
    1212 */
    1313@charset "UTF-8";
     
    1717    font-size: 14px;
    1818    letter-spacing: 3px;
    19     width: 190px;
    2019    padding: 10px 30px;
    21     float: right;
     20    text-align: center;
    2221    cursor: pointer;
     22    width: 100%;
    2323}
    2424#vacancy-load span {
     
    2828/** Vacancies category */
    2929.vacancies-page__block {
    30     width: 1024px;
     30    width: 100%;
    3131    margin: auto;
    3232    padding: 40px 15px;
    3333}
    34 .vacancies-page__title {
    35 }
     34
    3635.vacancies-page__title .h1 {
    3736    margin-top: 15px;
     
    3938    font-size: 28px;
    4039    margin-bottom: 45px;
     40    text-align: center;
     41    color: rgb(0,175,211);
    4142}
    4243.vacancies-page__vacancies-block {
     
    4546    max-width: 1448px;
    4647    margin: auto;
    47     width: 100%;
    48     color: #4b5963;
     48    width: 90%;
     49    color: #777777;
    4950}
    5051.vacancies-page__vacancy-block {
    51     width: 48.5%;
    52     float: left;
    53     margin-bottom: 26px;
     52    width: 45%;
     53    float: left;
     54    margin-bottom: 50px;
    5455    text-align: left;
    5556    padding: 0 33px;
    5657    overflow: hidden;
    57     background-color: #FFF;
    58 }
    59 .vacancies-page__vacancy-block:nth-child(odd) {
    60     margin-right: 1.5%;
    61 }
    62 .vacancies-page__vacancy-block:nth-child(even) {
    63     margin-left: 1.5%;
    64 }
     58    background-color: #ffffff;
     59    border: 0;
     60    border-radius: 6px;
     61    box-shadow: 0px 3px 38px 0px rgba(0, 0, 0, 0.1);
     62    margin-right: 15px;
     63}
     64
    6565.vacancies-page__vacancy-header {
    6666    text-decoration: none;
    67     color: #4eaee7;
     67    color: rgb(0,175,211);
    6868    padding-top: 17px;
     69    padding-bottom: 0px;
    6970    display: block;
    70 }
    71 .vacancies-page__vacancy-header .h4 {
    72     font-size: 25px;
    73     margin-bottom: 19px;
    74     font-family: 'ubuntumedium';
    75     letter-spacing: -0.5px;
    76 }
    77 .vacancies-page__vacancy-content {
    78     font-size: 17px;
    79     margin-bottom: 33px;
    80     height: 96px;
    81     overflow: hidden;
    82 }
    83 .vacancies-page__vacancy-footer {
    84     padding-bottom: 22px;
     71    margin: 0;
     72    width: 33%;
     73    float: left;
     74}
     75
     76.vacancies-page__vacancy-header:hover {
     77    color: rgb(252,146,4);
     78}
     79
     80.vacancies-page__vacancy-plaats {
     81    color: rgba(0,0,0,0.67);
     82    width: 33%;
     83    float: left;
     84    text-align: left;
     85    padding-top: 17px;
     86    padding-bottom: 17px;
     87}
     88
     89.vacancies-page__vacancy-plaats: hover {
     90    color: rgb(252,146,4);
     91}
     92
     93.vacancies-page__vacancy-dienstverband {
    8594    white-space: nowrap;
    86     overflow: hidden;
    87     text-overflow: ellipsis;
    88 }
    89 .vacancies-page__vacancy-footer span {
    90     display: inline;
    91     padding: 0 5px;
    92     letter-spacing: 0.5px;
    93     border-right: 2px solid #333;
    94     line-height: 16px;
    95     font-family: 'ubuntumedium';
    96 }
    97 .vacancies-page__vacancy-footer span:first-of-type {
    98 }
    99 .vacancies-page__vacancy-footer span:last-of-type {
    100     border: 0;
    101 }
     95    color: #90da36;
     96    width: 33%;
     97    float: right;
     98    text-align: right;
     99    padding-top: 17px;
     100}
     101.vacancies-page__vacancy-introductie {
     102    color: rgba(0,0,0,0.67);
     103    width: 100%;
     104    float: left;
     105    text-align: left;
     106    padding-top: 0px;
     107    padding-bottom: 15px;
     108}
     109
    102110/** Vacancy page */
    103111.vacancy-page__block {
    104     width: 1024px;
     112    width: 100%;
    105113    margin: auto;
    106114    padding: 40px 15px 20px;
    107115}
    108 .vacancy-page__box {
    109 }
    110 .vacancy-page__title {
    111 }
    112 .vacancy-page__title .h1 {
    113     color: #00b0ec;
    114 }
     116
    115117.vacancy-page__date {
    116118    text-align: left;
     
    121123.vacancy-page__custom-fields {
    122124    text-align: left;
    123     padding: 10px 0;
     125    padding: 30px 0;
     126    padding-bottom: 50px;
    124127}
    125128.vacancy-page__custom-fields span {
     
    137140    border-right: 0;
    138141}
     142
     143.vacancies-page__details-plaats {
     144    color: rgb(252,146,4);
     145    width: 33%;
     146    float: left;
     147    text-align: left;
     148}
     149
     150.vacancies-page__details-dienstverband {
     151    color: rgb(252,146,4);
     152    width: 33%;
     153    float: left;
     154    text-align: center;
     155}
     156
     157.vacancies-page__details-uren {
     158    white-space: nowrap;
     159    color: rgb(252,146,4);
     160    width: 33%;
     161    float: right;
     162    text-align: right;
     163}
     164
    139165.vacancy-page__content {
    140166    text-align: justify;
    141167    padding: 10px 0;
    142168    margin: 10px 0;
    143     border-width: 2px 0;
    144     border-style: dotted;
    145     border-color: #00b0ec;
    146169}
    147170.vacancy-page__feedback {
    148     width: 1024px;
     171    width: 100%;
    149172    margin: auto;
    150173    padding: 0 15px 40px;
     
    155178}
    156179.vacancy-form p {
    157     margin: 0;
    158180    display: inline-block;
    159     width: 33%;
    160     position: relative;
     181    width: 50%;
    161182}
    162183.vacancy-form p.add-file {
     
    169190    font-weight: normal;
    170191}
    171 .vacancy-form label b {
    172     position: absolute;
    173     display: inline-block;
    174     font-style: normal;
    175     font-size: .5em;
    176     right: 0;
    177     color: #f83821;
    178     z-index: 10;
    179     max-width: 300px;
    180     letter-spacing: .5px;
    181     font-family: sans-serif;
    182     padding: 2px;
    183     text-align: right;
    184     font-weight: normal;
    185     top: 0;
     192.vacancy-form label span {;;
    186193}
    187194.vacancy-form label span.vacancy-form__your-name {
     
    219226    width: 100%;
    220227}
    221 .vacancy-form__button {
    222 }
    223 .vacancy-form__inputfile {
    224 }
     228
     229.vacancy-form p.add-file {
     230    width: 100%;   
     231}
     232
    225233.vacancy-form__submit {
    226 }
    227 .vacancy-form__your-cv {
    228 }
    229 .vacancy-form__your-email {
     234    background-color: #a79585 !important;
     235    background-image: none !important;
     236    color: #fff !important;
     237    font-size: 13px !important;
     238    height: 40px;
     239}
     240
     241.vacancy-form label input[type=file]    {
     242    border: 0px solid #fff !important;
     243}
     244
     245input[type="file"] {
     246    padding: 0px !important;
     247}
     248
     249input.vacancy-form__acs-form {
     250    border: 15px solid #d2d2d2;
     251}
    230252}
    231253.vacancy-form__your-letter {
     254    border-width: 1px;
     255    border-color: #a51f1f;
     256    border-style: solid;
    232257}
    233258.vacancy-form__your-message {
    234259}
    235 .vacancy-form__your-name {
    236 }
    237 /**
    238  * END: 239;
    239  */
     260input.vacancy-form__acs-form {
     261    border: 1px solid #a79585 !important;
     262}
     263
     264
     265
    240266 .tigris-search-form .tigris-search-form-distances {
    241267    width: 100%;
    242     margin: 10px 0;
     268    margin: 0px 0;
    243269    background: none;
    244270}
     
    267293    opacity: 1;
    268294}
     295
     296@media (max-width: 1060px) {
     297   
     298}
     299@media (max-width: 979px) {
     300    .vacancies-page__vacancy-block {
     301        width: 100%;   
     302    }
     303    .vacancies-page__vacancy-block:nth-child(odd) {
     304        margin-right: 0;
     305    }
     306    .vacancies-page__vacancy-block:nth-child(even) {
     307        margin-left: 0;
     308    }
     309}
     310@media (max-width: 767px){
     311
     312.vacancies-page__vacancy-header {
     313    width: 100%;
     314}
     315
     316.vacancy-form p {
     317    width: 100%;
     318}
     319
     320.vacancies-page__details-dienstverband, .vacancies-page__details-plaats {
     321    width: 100%;
     322    padding-bottom: 0px;
     323    text-align: left;
     324}
     325
     326.vacancies-page__details-uren {
     327    width: 100%;
     328    text-align: left;
     329    padding-bottom: 17px;
     330}
     331
     332}
     333@media (max-width: 480px) {
     334   
     335}
     336
     337.tigris-more-vacancies {
     338    margin: 30px 0;
     339    text-align: right;
     340}
     341.tigris-more-vacancies a.js-tigris-more-vacancies {
     342    border: 1px solid !important;
     343    padding: 10px 10px 10px 25px;
     344    text-decoration: none;
     345}
  • tigris/trunk/core/function.php

    r1950218 r1954557  
    952952                         . '<p>' . __( 'Referer URL', ACS_TFS_NAME ) . ': ' . get_home_url() . esc_url( $_POST['_wp_http_referer'] ) . '</p><br>';
    953953
     954                $adminEmail = get_option('admin_email');
     955                $emailFrom = !empty($adminEmail) ? $adminEmail : 'info@' . str_replace('www.', '', parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ));
    954956                $headers = array(
    955                         'From: ' . get_bloginfo( 'name' ) . ' <info@' . parse_url( get_bloginfo( 'url' ), PHP_URL_HOST ) . '>',
     957                        'From: ' . get_bloginfo( 'name' ) . ' <' . $emailFrom . '>',
    956958                        'content-type: text/html'
    957959                    );
     
    13241326 *                                      employment=Employment //Type of employment
    13251327 *                                      branch=Branch //Branch
     1328 *                                      page=1 //Page Number
    13261329 */
    13271330function acs_tfs_add_vacancy_list_shortcode( $atts ) {
     1331    ob_start();
    13281332    global $att;
    13291333    $att = $atts;
     1334    if (!isset($att['is_ajax'])) {
     1335        echo '<div class="js-tigris-vacancies-container">';
     1336    }
    13301337    $args = array(
    13311338            'post_type'      => 'vacatures',
    1332             'posts_per_page' => 4
     1339            'posts_per_page' => 2
    13331340        );
    13341341    if (isset($att['count']) && $att['count'])
    13351342        $args['posts_per_page'] = $att['count'];
     1343    if (isset($att['page']) && !empty($att['page'])) {
     1344        $args['offset'] = $att['page'] * $args['posts_per_page'];
     1345    }
    13361346    if (isset($att['categories'])) {
    13371347        $categories = explode(',', $att['categories']);
     
    14111421        }
    14121422    }
    1413     wp_reset_postdata();
     1423    if (!isset($att['is_ajax'])) {
     1424        $att['action'] = 'tigris_vacancy_list';
     1425        echo '</div>';
     1426        if ($vacancies->post_count >= $att['count']) {?>
     1427        <div class="tigris-more-vacancies">
     1428            <a href="#" class="js-tigris-more-vacancies" data-page="1"><?php echo __('More Vacancies', ACS_TFS_NAME)?></a>
     1429        </div>
     1430        <script type="text/javascript">
     1431            jQuery(function($) {
     1432                $(document).on('click', '.js-tigris-more-vacancies', function(e){
     1433                    e.preventDefault();
     1434                    that = $(this);
     1435                    var data = {
     1436                        <?php
     1437                        foreach ($att as $attKey => $attValue) {
     1438                            echo '"' . $attKey . '": "' . $attValue . '",';
     1439                        }
     1440                        ?>
     1441                        'page' :  $(this).data('page')
     1442                      };
     1443                      $.ajax({
     1444                        url: "<?php echo admin_url('admin-ajax.php')?>",
     1445                        data:data,
     1446                        type:'POST',
     1447                        dataType: 'json',
     1448                        success:function(data){
     1449                            if( data) {
     1450                                if (data.data) {
     1451                                    $('.js-tigris-vacancies-container').append(data.data);
     1452                                    that.data('page', that.data('page') + 1);
     1453                                }
     1454                                if (data.count < <?php echo $att['count']?>) {
     1455                                    that.parent().remove();
     1456                                }
     1457                            }
     1458                        }
     1459                      });
     1460
     1461                });
     1462            });
     1463        </script>
     1464    <?php
     1465        }
     1466        wp_reset_postdata();
     1467        wp_reset_query();
     1468        $vacancyList = ob_get_clean();
     1469    } else {
     1470        $vacancyList['data'] = ob_get_clean();
     1471        $vacancyList['count'] = $vacancies->post_count;
     1472        $vacancyList = json_encode($vacancyList);
     1473    }
     1474   
     1475    return $vacancyList;
    14141476}
    14151477add_shortcode( 'tigris_vacancy_list', 'acs_tfs_add_vacancy_list_shortcode' );
     1478
     1479add_action('wp_ajax_tigris_vacancy_list', 'ajax_tigris_vacancy_list');
     1480add_action('wp_ajax_nopriv_tigris_vacancy_list', 'ajax_tigris_vacancy_list');
     1481
     1482function ajax_tigris_vacancy_list() {
     1483    $shortCodeAttr = '';
     1484    foreach ($_POST as $key => $value) {
     1485        if ($key == 'action')
     1486            continue;
     1487        $shortCodeAttr .= ' ' . $key . '="' . esc_attr($value) . '"';
     1488    }
     1489    $shortCodeAttr .= ' is_ajax=1';
     1490    echo do_shortcode('[tigris_vacancy_list ' . $shortCodeAttr . ']');
     1491    die();
     1492}
     1493
    14161494
    14171495/**
  • tigris/trunk/readme.txt

    r1950218 r1954557  
    8383= 1.1.6 =
    8484Salesforce Login and Salesforce Password from Tigris Options have been deleted
     85
     86= 1.1.7 =
     87Added pagination to Vacancies List
Note: See TracChangeset for help on using the changeset viewer.