"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( '
[vc_row css=”.vc_custom_1564427358119{padding-top: 0px !important;padding-bottom: 0px !important;}”][vc_column][vc_single_image image=”17296″ img_size=”1200×400″ alignment=”center”][\/vc_column][\/vc_row][vc_row css=”.vc_custom_1561665429432{padding-top: 0px !important;padding-bottom: 0px !important;}”][vc_column][vc_column_text css=”.vc_custom_1563040438628{margin-bottom: 0px !important;}”]<\/p>\n
[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJzaXplX3dyYXBwZXIlMjIlM0UlMEElM0N1bCUzRSUwQSUzQ2xpJTNFJTBBJTNDYSUyMGhyZWYlM0QlMjJodHRwcyUzQSUyRiUyRnd3dy5oeXBlcmZhcm1lci5jb20lMkZqdXN0LXNvbGQlMkYlMjIlMjBjbGFzcyUzRCUyMnBvc3RjYXJkX25hdiUyMHBjbSUyMGFjdGl2ZSUyMiUzRTguNSUyMiUyMHglMjA1LjUlMjIlMEElM0NzcGFuJTIwY2xhc3MlM0QlMjJzaXplX3RpdGxlJTIyJTNFSnVtYm8lM0MlMkZzcGFuJTNFJTBBJTNDJTJGYSUzRSUzQyUyRmxpJTNFJTBBJTNDbGklM0UlMEElM0NhJTIwaHJlZiUzRCUyMmh0dHBzJTNBJTJGJTJGd3d3Lmh5cGVyZmFybWVyLmNvbSUyRmp1c3Qtc29sZC0xMS01LXgtNiUyRiUyMiUyMGNsYXNzJTNEJTIycG9zdGNhcmRfbmF2JTIwcGNsJTIyJTNFMTEuNSUyMiUyMHglMjA2JTIyJTBBJTNDc3BhbiUyMGNsYXNzJTNEJTIyc2l6ZV90aXRsZSUyMiUzRVN1cGVyJTIwSnVtYm8lM0MlMkZzcGFuJTNFJTBBJTNDJTJGYSUzRSUzQyUyRmxpJTNFJTBBJTNDJTJGdWwlM0UlMEElM0MlMkZkaXYlM0U=[\/vc_raw_html][\/vc_column][\/vc_row][vc_row][vc_column]
[vc_row css=”.vc_custom_1564427358119{padding-top: 0px !important;padding-bottom: 0px !important;}”][vc_column][vc_single_image image=”17296″ img_size=”1200×400″ alignment=”center”][\/vc_column][\/vc_row][vc_row css=”.vc_custom_1561665429432{padding-top: 0px !important;padding-bottom: 0px !important;}”][vc_column][vc_column_text css=”.vc_custom_1563040438628{margin-bottom: 0px !important;}”] Select your Postcard Size [\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJzaXplX3dyYXBwZXIlMjIlM0UlMEElM0N1bCUzRSUwQSUzQ2xpJTNFJTBBJTNDYSUyMGhyZWYlM0QlMjJodHRwcyUzQSUyRiUyRnd3dy5oeXBlcmZhcm1lci5jb20lMkZqdXN0LXNvbGQlMkYlMjIlMjBjbGFzcyUzRCUyMnBvc3RjYXJkX25hdiUyMHBjbSUyMGFjdGl2ZSUyMiUzRTguNSUyMiUyMHglMjA1LjUlMjIlMEElM0NzcGFuJTIwY2xhc3MlM0QlMjJzaXplX3RpdGxlJTIyJTNFSnVtYm8lM0MlMkZzcGFuJTNFJTBBJTNDJTJGYSUzRSUzQyUyRmxpJTNFJTBBJTNDbGklM0UlMEElM0NhJTIwaHJlZiUzRCUyMmh0dHBzJTNBJTJGJTJGd3d3Lmh5cGVyZmFybWVyLmNvbSUyRmp1c3Qtc29sZC0xMS01LXgtNiUyRiUyMiUyMGNsYXNzJTNEJTIycG9zdGNhcmRfbmF2JTIwcGNsJTIyJTNFMTEuNSUyMiUyMHglMjA2JTIyJTBBJTNDc3BhbiUyMGNsYXNzJTNEJTIyc2l6ZV90aXRsZSUyMiUzRVN1cGVyJTIwSnVtYm8lM0MlMkZzcGFuJTNFJTBBJTNDJTJGYSUzRSUzQyUyRmxpJTNFJTBBJTNDJTJGdWwlM0UlMEElM0MlMkZkaXYlM0U=[\/vc_raw_html][\/vc_column][\/vc_row][vc_row][vc_column][\/vc_column][\/vc_row]<\/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-17303","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/17303"}],"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=17303"}],"version-history":[{"count":3,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/17303\/revisions"}],"predecessor-version":[{"id":17306,"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/pages\/17303\/revisions\/17306"}],"wp:attachment":[{"href":"https:\/\/hyperfarmer.com\/wp-json\/wp\/v2\/media?parent=17303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}