/************************************* * *Advanced Reorder Image Text Slider Options * **************************************/ (function ($) { var simpleImageSliderAdmin = { init: function () { this.settings(); this.defaultEvents(); }, settings: function () { }, defaultEvents: function () { this.tabOptions(); this.saveChanges(); this.accordionSections(); this.removeButton(); this.loaderAjax(); this.addNewHomeSliders(); this.SortableSliders(); this.removeSliders(); }, tabOptions: function () { /********************************************************************* * * Admin option page tabs * ********************************************************************/ $("#simple-image-slider-tab").tabs(); }, saveChanges: function () { /********************************************************************* * * Save options after submit form * ********************************************************************/ }, accordionSections: function () { /********************************************************************* * * Tab contents sections accordion functionality * ********************************************************************/ $('.simple-image-slider-section-content').accordion({ collapsible: true, heightStyle: "content" }); }, removeButton: function () { /********************************************************************* * * Remove the upload url and preview images * ********************************************************************/ $('.wrap').on('click', '.remove-button', function () { var link = $(this).parent().parent(); link.find('.simple-image-slider-option-links').val(''); var imgparent = $(this).parent().find('.sis_image_uploader_thumb'); if (imgparent) { imgparent.remove(); } }); }, loaderAjax: function () { $(window).load(function () { $(".option-loader").hide(); $("#simple-image-slider_options_page").css('display', "block"); }); }, addNewHomeSliders: function () { $('#add-new-slider-image').on('click', function (e) { var data = '
| ' + ' | ' + '|
| ' + '' + '' + ' | ' + '|
| ' + '' + ' | |
| ' + '' + ' ' + ' | ' + '|
| ' + '' + '' + 'Please upload slider image' + '' + ' | ' + '' + ' |