"use strict"; /* Basic -------------------------------------------------------------- */ (function($) { var abrMetabox = {}; ( function() { var $this; abrMetabox = { /* * Initialize */ init: function( e ) { $this = abrMetabox; // Variables. $this.wrap = $( '.abr-metabox-wrap' ); // Init. $this.metaboxInit( e ); // Init events. $this.events( e ); }, /* * Events */ events: function( e ) { // Custom Events $this.wrap.on( 'click change keyup keydown', '.abr-metabox-repeater .attribute-name', $this.setSignature ); $this.wrap.on( 'click', '.abr-metabox-repeater .row-topbar', $this.toggleItems ); $this.wrap.on( 'click', '.abr-metabox-repeater .btn-remove-row', $this.removeRepeaterRow ); $this.wrap.on( 'click', '.abr-metabox-repeater .btn-add-row', $this.addRepeaterRow ); }, /* * Init metabox elements */ metaboxInit: function( e ) { // Add tabs for Meta Box (UI) $this.wrap.find( '.abr-metabox-tabs' ).tabs(); // Repeater sortable $this.wrap.find( '.abr-metabox-repeater tbody' ).sortable( { items: 'tr', placeholder: 'ui-state-highlight', handle: '.row-topbar, .row-handle', start: function( e, ui ) { ui.placeholder.height( ui.item.height() ); }, } ); }, /* * Toggle items */ toggleItems: function() { if ( $( this ).hasClass( 'closed' ) ) { $( this ).removeClass( 'closed' ); $( this ).siblings( '.row-fields' ).slideDown(); } else { $( this ).addClass( 'closed' ); $( this ).siblings( '.row-fields' ).slideUp(); } }, /* * Set signature */ setSignature: function() { var label = '' + $( this ).data( 'label' ) + ''; var value = $( this ).val() ? $( this ).val() : label; $( this ).parents( '.row-content' ).find( '.signature' ).html( value ); }, /* * Add repeater row */ addRepeaterRow: function() { var repeater = $( this ).siblings( '.abr-metabox-repeater-table' ) // Get html row. var html = repeater.find( 'tbody tr.hidden' ).html(); // Add new row. repeater.find( 'tbody' ).append( '' + html + '' ); // Visible all input and textarea. repeater.find( 'tr' ).not( '.hidden' ).find( 'input, textarea' ).removeAttr( 'disabled' ); return false; }, /* * Remove repeater row */ removeRepeaterRow: function() { $( this ).parents( '.row' ).remove(); return false; } }; } )(); // Initialize. $( function() { abrMetabox.init(); } ); })(jQuery); /* Reviews -------------------------------------------------------------- */ (function($) { var abrReviews = {}; ( function() { var $this; abrReviews = { /* * Initialize */ init: function( e ) { $this = abrReviews; // Variables. $this.wrap = $( '.review-wrap' ); // Init. $this.reviewsInit( e ); // Init events. $this.events( e ); }, /* * Events */ events: function( e ) { // Custom Events $this.wrap.on( 'click', 'input[name="abr_review_settings"]', $this.toggleMetaBox ); $this.wrap.on( 'click', 'input[name="abr_review_auto_score"]', $this.actionAutoScore ); $this.wrap.on( 'change', 'select[name="abr_review_schema_author"]', $this.actionSchemaAuthor ); }, /* * Init reviews elements */ reviewsInit: function( e ) { $this.actionAutoScore( 'input[name="abr_review_auto_score"]' ); $this.actionSchemaAuthor( 'select[name="abr_review_schema_author"]' ); }, /* * Toggle metabox view */ toggleMetaBox: function() { if ( $( this ).prop( 'checked' ) ) { $this.wrap.find( '.abr-metabox-tabs' ).attr( 'checked', 'checked' ); } else { $this.wrap.find( '.abr-metabox-tabs' ).removeAttr( 'checked' ); } }, /* * Action auto score */ actionAutoScore: function( e ) { let checked = $( typeof e === 'string' ? e : this ).prop('checked'); if ( checked ) { $( '.review-field-total-score' ).addClass( 'hidden' ); } else { $( '.review-field-total-score' ).removeClass( 'hidden' ); } }, /* * Action schema author */ actionSchemaAuthor: function( e ) { let val = $( typeof e === 'string' ? e : this ).val(); if ( 'custom' !== val ) { $( '.review-field-schema-author-custom' ).addClass( 'hidden' ); } else { $( '.review-field-schema-author-custom' ).removeClass( 'hidden' ); } }, }; } )(); // Initialize. $( function() { abrReviews.init(); }); })(jQuery);{"id":14952,"date":"2018-12-31T00:50:21","date_gmt":"2018-12-31T07:50:21","guid":{"rendered":"https:\/\/www.hyperfarmer.com\/?page_id=14952"},"modified":"2018-12-31T04:37:01","modified_gmt":"2018-12-31T11:37:01","slug":"just-listed-postcards","status":"publish","type":"page","link":"https:\/\/hyperfarmer.com\/just-listed-postcards\/","title":{"rendered":"Just Listed Postcards"},"content":{"rendered":"

[vc_row full_width=”stretch_row_content” css=”.vc_custom_1546243834028{background-image: url(https:\/\/www.hyperfarmer.com\/wp-content\/uploads\/2018\/12\/shutterstock_752498263-1984×880.jpg?id=14954) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}”][vc_column][vc_custom_heading text=”JUST LISTED !” font_container=”tag:h1|font_size:90|text_align:right|color:%2381d742″ use_theme_fonts=”yes” css=”.vc_custom_1546243881806{padding-top: 100px !important;padding-bottom: 100px !important;}”][\/vc_column][\/vc_row][vc_row full_width=”stretch_row_content”][vc_column][vc_custom_heading text=”SELECT YOUR POSTCARD SIZE” font_container=”tag:h2|text_align:center|color:%23dd9933″][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column][vc_tta_tabs][vc_tta_section title=”6“ x 4“” tab_id=”1546244882091-395f5c72-a615″][\/vc_tta_section][vc_tta_section title=”10.5“ x 4.25“” tab_id=”1546244882112-d618e88c-c5f0″][\/vc_tta_section][vc_tta_section title=”8.5“ x 5.5“” tab_id=”1546244926244-5ed3f347-e026″][vc_row_inner][vc_column_inner width=”1\/3″][vc_empty_space height=”16px”][vc_hoverbox image=”14964″ primary_title=”” hover_title=”” hover_btn_title=”CLICK TO OPEN!” hover_btn_style=”classic” hover_btn_align=”center” hover_btn_i_icon_fontawesome=”fa fa-mouse-pointer” hover_add_button=”true” hover_btn_add_icon=”true” hover_btn_link=”url:https%3A%2F%2Fwww.hyperfarmer.com%2Fjust-listed-postcards%2Fjust-listed-by-suneet-agarwal%2F|title:JUST%20%20LISTED!%20%20By%20%20Suneet%20%20Agarwal|target:%20_blank|”][\/vc_hoverbox][vc_empty_space height=”16px”][\/vc_column_inner][vc_column_inner width=”1\/3″][\/vc_column_inner][vc_column_inner width=”1\/3″][\/vc_column_inner][\/vc_row_inner][\/vc_tta_section][vc_tta_section title=”11“ x 5.75“” tab_id=”1546244927073-4584bdc3-78d1″][\/vc_tta_section][\/vc_tta_tabs][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"

[vc_row full_width=”stretch_row_content” css=”.vc_custom_1546243834028{background-image: url(https:\/\/www.hyperfarmer.com\/wp-content\/uploads\/2018\/12\/shutterstock_752498263-1984×880.jpg?id=14954) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}”][vc_column][vc_custom_heading text=”JUST LISTED !” font_container=”tag:h1|font_size:90|text_align:right|color:%2381d742″ use_theme_fonts=”yes” css=”.vc_custom_1546243881806{padding-top: 100px !important;padding-bottom: 100px !important;}”][\/vc_column][\/vc_row][vc_row full_width=”stretch_row_content”][vc_column][vc_custom_heading text=”SELECT YOUR POSTCARD SIZE” font_container=”tag:h2|text_align:center|color:%23dd9933″][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column width=”1\/3″][vc_single_image][\/vc_column][vc_column][vc_tta_tabs][vc_tta_section title=”6“ x 4“” tab_id=”1546244882091-395f5c72-a615″][\/vc_tta_section][vc_tta_section title=”10.5“ x 4.25“” tab_id=”1546244882112-d618e88c-c5f0″][\/vc_tta_section][vc_tta_section title=”8.5“ x 5.5“” tab_id=”1546244926244-5ed3f347-e026″][vc_row_inner][vc_column_inner width=”1\/3″][vc_empty_space height=”16px”][vc_hoverbox image=”14964″ primary_title=”” hover_title=”” hover_btn_title=”CLICK TO OPEN!” hover_btn_style=”classic” hover_btn_align=”center” hover_btn_i_icon_fontawesome=”fa fa-mouse-pointer” hover_add_button=”true” […]<\/p>\n","protected":false},"author":285,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-14952","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/14952"}],"collection":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/users\/285"}],"replies":[{"embeddable":true,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/comments?post=14952"}],"version-history":[{"count":18,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/14952\/revisions"}],"predecessor-version":[{"id":14985,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/14952\/revisions\/14985"}],"wp:attachment":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/media?parent=14952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}