function rockthemes_pb_make_modals($arr) { $return = ''; foreach ($arr as $modal) { if ($modal['modal']['descType'] == 'textfield') { $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= '<div id="' . $id . '" modalType="' . $modal['modal']['descType'] . '" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="' . $id . '" aria-hidden="true"> <div> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3>Text Field</h3> </div> <div class="modal-body"> <textarea rows="10" cols="50" style="width:100%">' . $modal['modal']['desc'] . '</textarea> </div> <div class="modal-footer"> <button class="button" data-dismiss="modal" aria-hidden="true">Close</button> <div class="button-primary">Save changes</div> </div> </div> </div>'; } elseif ($modal['modal']['descType'] == 'ajaxfiltered') { /* ** Ajax Filtered Elem */ $totalItemsToShow = '<div class="total_show_holder"><h4>Select Total Item To Show</h4><select class="total_show" autocomplete="off">'; for ($i = 1; $i < 100; $i++) { if ($modal['modal']['data']['data']['total'] == $i) { $totalItemsToShow .= '<option value="' . $i . '" selected>' . $i . '</option>'; } else { $totalItemsToShow .= '<option value="' . $i . '">' . $i . '</option>'; } } $totalItemsToShow .= '</select></div>'; $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $chosenCategory = isset($modal['modal']['data']['data']['category']) ? $modal['modal']['data']['data']['category'] : ''; $activate_hover_box = checked("true", isset($modal['modal']['data']['data']['activate_hover_box']) ? $modal['modal']['data']['data']['activate_hover_box'] : false, false); $activate_hover = checked("true", isset($modal['modal']['data']['data']['activate_hover']) ? $modal['modal']['data']['data']['activate_hover'] : false, false); $small_thumb_hover = checked("true", isset($modal['modal']['data']['data']['small_thumb_hover']) ? $modal['modal']['data']['data']['small_thumb_hover'] : false, false); $boxed_layout = checked("true", isset($modal['modal']['data']['data']['boxed_layout']) ? $modal['modal']['data']['data']['boxed_layout'] : false, false); $use_shadow = checked("true", isset($modal['modal']['data']['data']['use_shadow']) ? $modal['modal']['data']['data']['use_shadow'] : false, false); $disable_hover_link = checked("true", isset($modal['modal']['data']['data']['disable_hover_link']) ? $modal['modal']['data']['data']['disable_hover_link'] : false, false); $activate_category_link = isset($modal['modal']['data']['data']['activate_category_link']) ? $modal['modal']['data']['data']['activate_category_link'] : ""; $header_title = isset($modal['modal']['data']['data']['header_title']) ? $modal['modal']['data']['data']['header_title'] : ""; $excerpt_length = isset($modal['modal']['data']['data']['excerpt_length']) ? $modal['modal']['data']['data']['excerpt_length'] : 18; $use_border_on_categories = isset($modal['modal']['data']['data']['use_border_on_categories']) ? $modal['modal']['data']['data']['use_border_on_categories'] : ""; $excerpt_length_html = '<select class="excerpt_length" autocomplete="off">'; for ($e = 0; $e < 150; $e++) { if ($e == $excerpt_length) { $excerpt_length_html .= '<option value="' . $e . '" selected="selected">' . $e . '</option>'; } else { $excerpt_length_html .= '<option value="' . $e . '">' . $e . '</option>'; } } $excerpt_length_html .= '</select>'; $return .= ' <div id="' . $id . '" modalType="' . $modal['modal']['descType'] . '" class="modal container hide fade" tabindex="-1" role="dialog" aria-labelledby="Grid" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Filtered Ajax Gallery</h3> </div> <div class="modal-body"> <div class="row-fluid"> <div class="span6 image_sizes_column" bind="' . $id . '" calc="true"> ' . rock_builder_get_image_sizes(isset($modal['modal']['data']['data']['imageSize']) ? $modal['modal']['data']['data']['imageSize'] : '', $id, '') . ' </div> <div class="span6"> <strong>Choose image size</strong><br/> <p>You can choose any image sizes for Ajax Filtered Portfolio. But we recommend using cropped image sizes.</p> </div> </div> <hr/> <div class="row-fluid post_type_tax_holder"> <div class="span6"> ' . rock_builder_get_customposttypes($modal['modal']['data']['data']['postType'], $id, '') . ' ' . rock_builder_get_taxonomies($chosenCategory, $modal['modal']['data']['data']['postType'], '') . ' </div> <div class="span6"> <strong>Choose A Post Type</strong></br> <p>Choose the post type</p><br/> <strong>Choose Taxonomies/Categories to Display</strong></br> <p>Choose categories/taxonomies. You can choose multiple categories/taxonomies or just single taxonomy/category. You can also choose all categories/taxonomies by choosing the "All".</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <input autocomplete="off" autocomplete="off" type="text" class="header_title" value="' . $header_title . '" /> </div> <div class="span6"> <strong>Header Title</strong> <p>You can choose to use a header title for filtered ajax portfolio. If you leave this area empty, header title will not be displayed.</p> </div> </div> <hr/> ' . rock_builder_get_block_grid_list(isset($modal['modal']['data']['data']['block_grid_large']) ? intval($modal['modal']['data']['data']['block_grid_large']) : '', isset($modal['modal']['data']['data']['block_grid_medium']) ? intval($modal['modal']['data']['data']['block_grid_medium']) : '', isset($modal['modal']['data']['data']['block_grid_small']) ? intval($modal['modal']['data']['data']['block_grid_small']) : '') . ' <div class="row-fluid"> <div class="span6"> ' . $totalItemsToShow . ' </div> <div class="span6"> <strong>Total Products to Show</strong></br> <p>This will set up the total products for each category. If you choose 18, you will be showing 18 products for each category.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <select class="activate_category_link" autocomplete="off"> <option value="active" ' . ($activate_category_link == "active" ? "selected" : "") . '>Activate</option> <option value="deactive" ' . ($activate_category_link == "deactive" ? "selected" : "") . '>Deactivate</option> </select> </div> <div class="span6"> <strong>Activate Category Link</strong></br> <p>If you activate this option, there will be a link under the products for the chosen category.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> ' . $excerpt_length_html . ' </div> <div class="span6"> <strong>Excerpt Length</strong> <p>You can adjust the excerpt length in words. Which means if you choose 10, your excerpt will show up to 10 words from your originial excerpt.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <select class="use_border_on_categories" autocomplete="off"> <option value="active" ' . ($use_border_on_categories == "active" ? "selected" : "") . '>Use Border On Category Names</option> <option value="deactive" ' . ($use_border_on_categories == "deactive" ? "selected" : "") . '>Do Not Use Border On Category Names</option> </select> </div> <div class="span6"> <strong>Use Border On Category Names</strong></br> <p>If you want to add a border around category names choose this option.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="activate_hover_box_holder"> <input autocomplete="off" autocomplete="off" class="activate_hover_box" type="checkbox" value="true" name="activate_hover_box" ' . $activate_hover_box . ' /><label for="activate_hover_box"> Activate Hover Box</label> </div> </div> <div class="span6"> <strong>Activate Hover Box Effect</strong></br> <p>If you activate hover box effect, your thumbnails will show a bigger image with excerpt when hovered</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="activate_hover_holder"> <input autocomplete="off" autocomplete="off" class="activate_hover" type="checkbox" value="true" name="activate_hover" ' . $activate_hover . ' /><label for="activate_hover"> Activate Hover Effect</label> </div> </div> <div class="span6"> <strong>Activate Regular Hover Effect</strong></br> <p>This option will show the regular hover effect with PrettyPhoto (lightbox). If you activate this option, you can not activate the hover box option. Two option can not be activated.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="disable_hover_link_holder"> <input autocomplete="off" autocomplete="off" class="disable_hover_link" type="checkbox" value="true" name="disable_hover_link" ' . $disable_hover_link . ' /><label for="activate_hover"> Disable Hover Link</label> </div> </div> <div class="span6"> <strong>Disable Hover Link</strong></br> <p>If you want to disable the link in the hover effect check this option.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="use_shadow_holder"> <input autocomplete="off" autocomplete="off" class="use_shadow" type="checkbox" value="true" name="use_shadow" ' . $use_shadow . ' /><label for="use_shadow"> Use Shadow</label> </div> </div> <div class="span6"> <strong>Activate Shadow Under Thumbnails</strong></br> <p>If you want a shadow under thumbnail images check this option. This shadow will be under the thumbnail images not hover box images.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="small_thumb_hover_holder"> <input autocomplete="off" autocomplete="off" class="small_thumb_hover" type="checkbox" value="true" name="small_thumb_hover" ' . $small_thumb_hover . ' /><label for="small_thumb_hover"> Small Thumbnail Hover Effect</label> </div> </div> <div class="span6"> <strong>Activate Small Thumbnail Hover Effect</strong></br> <p>If you are using "Regular Hover Effect" and your thumbnails are smaller than 100px, you should activate this option.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="boxed_layout_holder"> <input autocomplete="off" autocomplete="off" class="boxed_layout" type="checkbox" value="true" name="boxed_layout" ' . $boxed_layout . ' /><label for="boxed_layout"> Use Boxed Layout</label> </div> </div> <div class="span6"> <strong>Activate Boxed Layout</strong></br> <p>You can easily activate/deactivate boxed layout.</p> </div> </div> <hr/> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button><div class="btn btn-primary builder-close ajaxfiltered-save">Save changes</div> </div> </div>'; } elseif ($modal['modal']['descType'] == 'featuredimage') { /* ** Featured Image Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= ' <div id="' . $id . '" class="modal container hide fade" tabindex="-1" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Featured Image</h3> </div> <div class="modal-body"> <div class="row-fluid"> <div class="span6 featured_element_holder"> ' . rock_builder_get_image_sizes(isset($modal['modal']['data']['data']['imageSize']) ? $modal['modal']['data']['data']['imageSize'] : '', $id, '') . ' </div> <div class="span6"> <strong>Choose a Size</strong></br> <p>You need to upload your featured image to use this element. You can choose different image sizes for your featured image. You can also adjust image sizes in Theme Options</p> </div> </div> </div> <div class="modal-footer"> <div class="btn builder-close">Close</div> <div class="btn btn-primary featuredimage-save builder-close" ref="' . $id . '">Save changes</div> </div> </div> '; } elseif ($modal['modal']['descType'] == 'swiperslider') { /* ** Swiper Slider Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $linkString = ''; $max_width = $modal['modal']['data']['data']['maxWidth']; $avoid_sidebar = checked("true", isset($modal['modal']['data']['data']['avoidSidebar']) ? $modal['modal']['data']['data']['avoidSidebar'] : false, false); $images = ''; if ($modal['modal']['data']['data']['images']) { $current_img_num = 0; foreach ($modal['modal']['data']['data']['images'] as $image) { $images .= ' <div class="swiperslider-modal-image" ref="' . $id . '"> <h4>Choose an Image</h4> <div class="hide image-data"></div> <label for="upload_image"> <input autocomplete="off" autocomplete="off" modalID="' . $id . '" id="' . $id . '_' . $current_img_num . '" class="upload_image_button" size="36" name="upload_image" type="text" value="' . $image . '" /> <input autocomplete="off" autocomplete="off" class="button image_uploader_class" value="Upload Image" type="button" /> </label> ' . $linkString . ' <div class="button delete-image-button" ref="' . $id . '">Delete Image</div> <br /> </div> '; } } $return .= ' <div id="' . $id . '" modalType="' . $modal['modal']['descType'] . '" class="modal container hide fade" tabindex="-1" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Swiper Slider</h3> </div> <div class="modal-body" data-saved="false"> <div class="row-fluid"> <div class="span6 image_sizes_holder"> ' . rock_builder_get_image_sizes(isset($modal['modal']['data']['data']['imageSize']) ? $modal['modal']['data']['data']['imageSize'] : '', $id, 'Choose an Image Size') . ' </div> <div class="span6"> <strong>Choose a Size</strong></br> <p>You can choose different image sizes for your featured image. You can also adjust image sizes in Theme Options</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6 images_holder"> ' . $images . ' </div> <div class="span6"> <h4>Add New Image</h4> <p>You can add images to Swiper Slider by clicking to "Add New Image" button</p> <div class="button add-new-image">Add New Image</div> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <input autocomplete="off" autocomplete="off" name="max_width_holder" class="max_width_holder" type="text" value="' . $max_width . '" /> </div> <div class="span6"> <h4>Maximum Width</h4> <p>This is an advanced responsivity option. You can choose the max width breakpoint for this element. </p> </div> </div> <hr/> </div> <div class="modal-footer"> <div class="btn builder-close">Close</div> <div class="btn btn-primary swiperslider-save builder-close" ref="' . $id . '">Save changes</div> </div> </div>'; } elseif ($modal['modal']['descType'] == 'pricingtable') { /* ** Pricing Table Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $linkString = ''; $max_width = ''; $featured_text = $modal['modal']['data']['data']['featuredText']; $show_details_in_tables = checked("true", isset($modal['modal']['data']['data']['show_details_in_tables']) ? $modal['modal']['data']['data']['show_details_in_tables'] : false, false); $i = 0; $optionNames = ''; if ($modal['modal']['data']['data']['optionNames']) { $i = 0; foreach ($modal['modal']['data']['data']['optionNames'] as $optionName) { $optionNames .= ' <div class="new-option new-option-' . $i . '"> <div class="row-fluid escape_hover"> <div class="btn btn-mini btn-danger span3 remove_option_button" ref="new-option-' . $i . '"><i class="fa fa-times"></i></div><input autocomplete="off" autocomplete="off" type="text" class="span9" value="' . $optionName . '" data-toggle="tooltip" data-placement="right" title="Enter your option name (i.e. Bandwidth, Traffic, OS)" /> </div> <h4 style="margin:' . ($i === 0 ? '0.41em 0;' : '0.41em 0;') . '">Option Icon : </h4> </div>'; $i++; } } $tables = ''; $total_tables = 0; if ($modal['modal']['data']['data']['tables']) { foreach ($modal['modal']['data']['data']['tables'] as $table) { $is_featured = checked("true", isset($table['packageFeatured']) ? $table['packageFeatured'] : false, false); $button_json_data = isset($table['button_json_data']) ? $table['button_json_data'] : ''; $button_shortcode = isset($table['button_shortcode']) ? $table['button_shortcode'] : ''; $columns = ''; $t = 0; foreach ($table['packageOptions'] as $detail) { $icon_class = isset($detail['icon_class']) ? $detail['icon_class'] : ''; $icon_url = isset($detail['icon_url']) ? $detail['icon_url'] : ''; $icon_used = $icon_class != "" || $icon_url != "" ? true : false; $columns .= ' <div class="new-option new-option-' . $t . '"> <input autocomplete="off" autocomplete="off" type="text" value="' . $detail['value'] . '" data-toggle="tooltip" data-placement="right" title="Enter your option name (i.e. Bandwidth, Traffic, OS)" /> <div class="elem-icon"> <div class="icon-holder add-elem-icon-btn" style="font-size:4px !important;" icon-ref="' . $icon_class . '">' . ($icon_class != "" ? '<i class="' . $icon_class . ' fa-4x"></i>' : '') . '</div> <input autocomplete="off" autocomplete="off" type="text" size="36" class="add-elem-icon-text" ' . ($icon_url != "" ? "" : 'style="display:none;"') . ' value="' . ($icon_url != "" ? $icon_url : "") . '"/> ' . (!$icon_used ? '<div class="add-elem-icon-btn btn btn-small">Add Icon</div>' : '<div class="add-elem-icon-btn btn hide">Add Icon</div>') . ' ' . ($icon_used ? '<div class="remove-elem-icon-btn btn btn-small">Remove Icon</div>' : '<div class="remove-elem-icon-btn btn btn-small hide">Remove Icon</div>') . ' </div> </div>'; $t++; } $tables .= ' <div class="span2 table-elem"> <input autocomplete="off" autocomplete="off" type="text" name="package_name" class="pt-package-name" value="' . $table['packageName'] . '" data-toggle="tooltip" data-placement="bottom" title="Enter your package name (i.e. Basic, Platinum, Gold)" /> <input autocomplete="off" autocomplete="off" type="text" name="package_detail" class="pt-package-detail" value="' . (isset($table['packageDetail']) ? $table['packageDetail'] : '') . '" data-toggle="tooltip" data-placement="bottom" title="Enter your package small detail (i.e. Classic Plan)" /> <div class="set_featured_holder" style="padding:6px 0px 2px;" data-toggle="tooltip" data-placement="bottom" title="Set featured package (You can only set one featured package)"> <label for="set_featured"><input autocomplete="off" autocomplete="off" type="checkbox" value="1" class="set_featured" name="set_featured" ref="' . $id . '" ' . $is_featured . ' /> Set Featured</label> </div> <input autocomplete="off" type="text" name="package_time" class="pt-package-time" value="' . $table['packageTime'] . '" data-toggle="tooltip" data-placement="bottom" title="Package\'s time amount (i.e. Monthly, Yearly)" /> <hr / > <input autocomplete="off" type="text" class="price" value="' . $table['packagePrice'] . '" data-toggle="tooltip" data-placement="bottom" title="Enter the price (i.e. $29.9, £18.40)" /> <hr /> ' . $columns . ' <hr class="pt-footer" /> <div class="pricing-table-button" id-ref="' . $total_tables . '"> <input autocomplete="off" id="button_data_' . $total_tables . '" class="button_json_data" type="hidden" value="' . esc_attr($button_json_data) . '" /> <input autocomplete="off" id="button_shortcode_' . $total_tables . '" class="button_shortcode" type="hidden" value="' . esc_attr($button_shortcode) . '" /> <div class="btn btn-small btn-block advanced_details_make_button_modal" id_ref="button_shortcode_' . $total_tables . '" id_data_ref="button_data_' . $total_tables . '"><i class="fa fa-gear"></i> Edit Button</div> </div> <hr /> <div class="button pt-remove-package-button" style="width:100%;" data-toggle="tooltip" title="Delete current package" ref="' . $id . '"><i class="icon-trash"></i> Delete Package</div> </div>'; $total_tables++; } } $return .= '<div id="' . $id . '" class="modal container hide fade" tabindex="-1" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Pricing Table</h3> </div> <div class="modal-body" data-saved="false"> <br /> <div class="pricing-table-modal"> <div class="pt-demo row-fluid"> <div class="span2 main-details header-details" style="background-color:#006dcc; color:#fff; border:1px solid #0044cc; border-radius:4px;"> <h4 style="margin:0.60em 0;">Package Name : </h4> <h4 style="margin:0.60em 0;">Package Detail : </h4> <h4 style="margin:0.60em 0;">Featured : </h4> <h4 style="margin:0.70em 0;">Package Time : </h4> <hr /> <h4 style="margin:0.9em 0;">Price :</h4> <hr style="margin-top:0.68em;" /> <div class="option-name-holder"> ' . $optionNames . ' </div> <hr /> <h4 style="margin:0.8em 0;">Button :</h4> <h4 style="margin:0.8em 0;">Button Name :</h4> <h4 style="margin:0.8em 0;">Button Link :</h4> <hr /> <h4>Add New Option</h4> <div class="button pt-add-new-option" ref="' . $id . '" data-toggle="tooltip" title="Add a new option field"><i class="fa fa-plus"></i> New Option</div> </div> ' . $tables; if ($total_tables < 5) { $return .= '<div class="span2 main-details new-package-button-holder" style="background-color:#006dcc; color:#fff; border:1px solid #0044cc; border-radius:4px; text-align:center;"> <h4>Add New Package</h4> <div class="button pt-add-new-package" ref="' . $id . '" data-toggle="tooltip" title="Add a new package"><i class="fa fa-plus"></i> New Package</div> <br /> <br /> </div>'; } $return .= '</div> <br /> <hr /> <h2 style="margin-bottom:0px;">General Settings</h2> <div class="pt-general-settings row-fluid"> <div class="span2"> <h4>Featured Text</h4> <input autocomplete="off" name="featured_text" class="featured_text" type="text" value="' . $featured_text . '" data-toggle="tooltip" data-placement="top" title="Featured text (i.e. Hot!, Featured, Recommended)" /> </div> <div class="span2"> <h4>Show Details in Tables</h4> <label for="show_details_in_tables"><input autocomplete="off" type="checkbox" value="1" class="show_details_in_tables" name="show_details_in_tables" ref="' . $id . '" ' . $show_details_in_tables . ' /> Activate</label> </div> </div> <br /> </div> </div> <div class="modal-footer row-fluid" style="padding:0px; text-align:left;"> <div class="span9" style="padding:14px 15px 15px; text-align:left;"> <div class="btn turnonoff-tooltips"> <i class="fa fa-gear"></i> <span class="tooltipstext">Turn Off Tooltips</span> </div> </div> <div class="span3" style="padding:14px 15px 15px; text-align:right;"> <div class="btn builder-close">Close</div> <div class="btn btn-primary pricingtable-save" ref="' . $id . '">Save changes</div> </div> </div> </div>'; //Activate tooltips $script = ' <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("[data-toggle=tooltip]").tooltip({html:true}); }); </script> '; $return .= $script; } elseif ($modal['modal']['descType'] == 'curvyslider') { /* ** Curvy Slider Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $auto_play = checked("true", isset($modal['modal']['data']['data']['autoPlay']) ? $modal['modal']['data']['data']['autoPlay'] : false, false); $slider_bottom_divider = isset($modal['modal']['data']['data']['slider_bottom_divider']) ? $modal['modal']['data']['data']['slider_bottom_divider'] : ''; $return .= ' <div id="' . $id . '" class="modal container hide fade" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Curvy Slider</h3> </div> <div class="modal-body" data-saved="false"> <div class="row-fluid"> <div class="span6 curvyslider_list_holder"> ' . curvy_get_slider_list(isset($modal['modal']['data']['data']['slider_basic_shortcode']) ? $modal['modal']['data']['data']['slider_basic_shortcode'] : '', $id, false) . ' </div> <div class="span6"> <strong>Choose Curvy Slider</strong><br/> <p>You can choose any of your saved Curvy Sliders.</p> </div> </div> <hr /> <div class="row-fluid"> <div class="span6"> <div class="slider_width_holder"> <select class="slider_bottom_divider" autocomplete="off"> <option value="" ' . ($slider_bottom_divider === '' ? 'selected' : '') . '>Empty</option> <option value="use_border" ' . ($slider_bottom_divider === 'use_border' ? 'selected' : '') . '>Add Border Under Slider</option> <option value="use_shadow" ' . ($slider_bottom_divider === 'use_shadow' ? 'selected' : '') . '>Add Shadow Under Slider</option> </select> </div> </div> <div class="span6"> <strong>Border, Shadow Details</strong><br/> <p>You can choose to add border or shadow at the bottom of the slider. If you don\'t want both of them, you can choose "Empty"</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="activate_autoplay_holder"> <input autocomplete="off" type="checkbox" value="1" class="activate_autoplay" name="activate_autoplay" ' . $auto_play . ' /><label for="activate_autoplay"> Activate Autoplay</label> </div> </div> <div class="span6"> <strong>Auto Play</strong><br/> <p>If you check this option, slider will start to play automatically.</p> </div> </div> </div> <div class="modal-footer"> <div class="btn builder-close">Close</div> <div class="btn btn-primary curvyslider-save builder-close" ref="' . $id . '">Save changes</div> </div> </div>'; } elseif ($modal['modal']['descType'] == 'sidebar') { /* ** Sidebar Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= ' <div id="' . $id . '" class="modal container hide fade" tabindex="-1" aria-hidden="true"> <div class="modal-header"> <div class="close builder-close"><i class="fa fa-times"></i></div> <h3>Sidebar</h3> </div> <div class="modal-body" data-saved="false"> <div class="row-fluid"> <div class="span6 sidebar_list_holder"> ' . rock_builder_get_sidebar_list($modal['modal']['data']['data']['id']) . ' </div> <div class="span6"> <strong>Choose a Sidebar</strong><br/> <p>You can insert widgets into your sidebars and use these sidebars in your page layout</p> </div> </div> </div> <div class="modal-footer"> <div class="btn builder-close">Close</div> <div class="btn btn-primary sidebar-save builder-close" ref="' . $id . '">Save changes</div> </div> </div>'; } elseif ($modal['modal']['descType'] == 'toggles') { /* ** Toggles Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $avoid_sidebar = checked("true", isset($modal['modal']['data']['data']['avoidSidebar']) ? $modal['modal']['data']['data']['avoidSidebar'] : false, false); $toggleType = $modal['modal']['data']['data']['toggleType']; $boxed_layout = checked("true", isset($modal['modal']['data']['data']['boxed_layout']) ? $modal['modal']['data']['data']['boxed_layout'] : false, false); $use_shadow = checked("true", isset($modal['modal']['data']['data']['use_shadow']) ? $modal['modal']['data']['data']['use_shadow'] : false, false); $open_toggle_index = intval(isset($modal['modal']['data']['data']['openToggleIndex']) ? $modal['modal']['data']['data']['openToggleIndex'] : 0); $togglesString = ''; if (isset($modal['modal']['data']['data']['toggles']) && is_array($modal['modal']['data']['data']['toggles'])) { foreach ($modal['modal']['data']['data']['toggles'] as $toggle) { $togglesString .= ' <li class="toggles-block"> <div class="hide secret-desc" toggle-title="' . $toggle['title'] . '" icon_class="' . $toggle['icon_class'] . '" icon_url="' . $toggle['icon_url'] . '">' . $toggle['text'] . '</div> <i class="drag fa fa-move"></i> <span class="toggle-name" ref="' . $id . '">' . $toggle['title'] . '</span> <i class="close fa fa-times"></i> </li>'; } } $return .= '<div id="' . $id . '" modalType="toggles" class="modal container hide fade" > <div class="modal-header"> <div class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></div> <h3>Add Toggle</h3> </div> <div class="modal-body" data-saved="false"> <div class="row-fluid"> <div class="toggles-elements-holder span6"> <ul class="toggles-list"> ' . $togglesString . ' </ul> <div class="btn btn-small add-new-toggle-btn" ref="' . $id . '"><i class="fa fa-plus"></i> Add</div> </div> <div class="span6"> <strong>Add/Remove Toggles</strong><br/> <p>You can easily add remove toggles by clicking to add new button</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <select class="toggle-type" autocomplete="off"> <option value="single-mode" ' . ($toggleType == "single-mode" ? 'selected' : '') . '>Toggle Single</option> <option value="multiple-mode" ' . ($toggleType == "multiple-mode" ? 'selected' : '') . '>Toggle Multiple (Accordion)</option> </select> </div> <div class="span6"> <strong>Choose Toggle Type</strong><br/> <p>You can choose multiple mode or single mode. If you choose multiple mode, when a toggle opens, it will close other toggles.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="open_toggle_index_holder"> <input autocomplete="off" type="text" value="' . $open_toggle_index . '" class="open_toggle_index" name="open_toggle_index" /> </div> </div> <div class="span6"> <strong>Open Toggle Index</strong><br/> <p>Index of the toggle will be open. If you want your first toggle to be open enter 0. If you want all toggles to be closed enter -1</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="boxed_layout_holder"> <input autocomplete="off" class="boxed_layout" type="checkbox" value="true" name="boxed_layout" ' . $boxed_layout . ' /><label for="activate_hover"> Use Boxed Layout</label> </div> </div> <div class="span6"> <strong>Boxed Layout</strong><br/> <p>If you want to wrap a boxed layout around this element, check this option.</p> </div> </div> <hr/> <div class="row-fluid"> <div class="span6"> <div class="use_shadow_holder"> <input autocomplete="off" class="use_shadow" type="checkbox" value="true" name="use_shadow" ' . $use_shadow . ' /><label for="activate_hover"> Use Shadow</label> </div> </div> <div class="span6"> <strong>Use Header Shadow</strong><br/> <p>This option will activate/deactivate the shadows under the header text.</p> </div> </div> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> <div class="btn btn-primary toggles-save builder-close">Save changes</div> </div> </div>'; $return .= ' <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#' . $id . ' .toggles-list" ).sortable({ handle : "i.drag", }); }); </script>'; } elseif ($modal['modal']['descType'] == 'tabs') { /* ** Tabs Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_tabs_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'iconictext') { /* ** Iconic Text Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_iconictext_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'button') { /* ** Button Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_button_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'skill') { /* ** Skill Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_skill_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'horizontalrule') { /* ** Horizontal Rule Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_hr_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'portfolio') { /* ** Portfolio Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_portfolio_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'googlemap') { /* ** Google Map Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_googlemap_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'promotionbox') { /* ** Promotion Box Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_promotionbox_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'alertbox') { /* ** Alert Box Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_alertbox_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'referencesbuilder') { /* ** References Builder Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_referencesbuilder_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'testimonialsbuilder') { /* ** Testimonials Builder Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_testimonialsbuilder_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'socialicons') { /* ** Social Icons */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_socialicons_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'teammembers') { /* ** Team Members */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_teammembers_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'beforeafterslider') { /* ** Before After Slider */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_beforeafterslider_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'externalshortcode') { /* ** External Shortcode */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_externalshortcode_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'regularblog') { /* ** Regular Blog */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_regularblog_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'gallery') { /* ** Gallery */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_gallery_modal($modal, $id); } elseif ($modal['modal']['descType'] == 'rockformbuilder') { /* ** Rock Form Builder Elem */ $id = explode('-', $modal['id']); $id = 'modal-' . $id[1]; $return .= xr_make_rockformbuilder_modal($modal, $id); } } return $return; }
function rock_builder_get_sidebar_list_ajax() { rock_builder_get_sidebar_list(); exit; }