GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Repulse/scripts/custom/carousel.js at main · SMFTricks/Repulse Expand file tree/ Copy pathcarousel.jsMore file actions 70 lines (66 loc) · 3.09 KB / Copy pathcarousel.jsFile metadata and controls70 lines (66 loc) · 3.09 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 /** * @package Theme Customs * @author Diego Andrés <[email protected]> * @copyright Copyright (c) 2023, SMF Tricks * @license MIT */ $(function() { // Drop the og settings $('.st_carousel_title_1').hide(); $('.st_carousel_title_1 + dl.settings').hide(); $('.st_carousel_title_2').hide(); $('.st_carousel_title_2 + dl.settings').hide(); $('.st_carousel_title_3').hide(); $('.st_carousel_title_3 + dl.settings').hide(); $('.st_carousel_title_4').hide(); $('.st_carousel_title_4 + dl.settings').hide(); $('.st_carousel_title_5').hide(); $('.st_carousel_title_5 + dl.settings').hide(); // Add a 'Add New' button inside #settingtype-carousel $('#settingtype-carousel').append('<div class="information carousel_new"><a href="#" class="button floatnone">' + carousel_add_new + '</a></div>'); // When clicking the new button... $('.carousel_new a').click(function(e) { add_new_setting(); e.preventDefault(); }); }); // Create a new function for it 'add_new_setting' let add_new_setting = () => { // Inject the new setting before the 'Add New' button carousel_slides_total++; $('.carousel_new').before('' + '<div class="title_bar tca_carousel_title_' + carousel_slides_total + '">' + '<h4 class="titlebg">' + '<label for="tca_delete_' + carousel_slides_total + '">Slider ' + carousel_slides_total + '</label><span class="floatright"><strong><label for="tca_delete_' + carousel_slides_total + '">Delete</label></strong> <input type="checkbox" name="tc_carousel_delete" id="tca_delete_' + carousel_slides_total + '" value="' + carousel_slides_total + '"></span>' + '</h4>' + '</div>' + '<dl class="settings">' + '<dt>' + '<label for="options_tca_carousel_title_' + carousel_slides_total + '"><strong>' + carousel_item_title + '</strong></label>:' + '<br>' + '<div class="smalltext">' + carousel_item_title_desc + '</div>' + '</dt>' + '<dd>' + '<input type="text" name="options[tca_carousel_title_' + carousel_slides_total + ']" id="options_tca_carousel_title_' + carousel_slides_total + '" value="" size="40">' + '</dd>' + '<dt>' + '<label for="options_tca_carousel_text_' + carousel_slides_total + '"><strong>' + carousel_item_text + '</strong></label>:' + '</dt>' + '<dd>' + '<textarea rows="4" style="width: 95%;" cols="40" name="options[tca_carousel_text_' + carousel_slides_total + ']" id="options_tca_carousel_text_' + carousel_slides_total + '"></textarea>' + '</dd>' + '<dt>' + '<label for="options_tca_carousel_link_' + carousel_slides_total + '"><strong>' + carousel_item_link + '</strong></label>:' + '</dt>' + '<dd>' + '<input type="text" name="options[tca_carousel_link_' + carousel_slides_total + ']" id="options_tca_carousel_link_' + carousel_slides_total + '" value="" size="40">' + '</dd>' + '<dt>' + '<label for="options_tca_carousel_image_' + carousel_slides_total + '"><strong>' + carousel_item_image_upload + '</strong></label>:' + '<br>' + '</dt>' + '<dd>' + '<input type="file" name="tca_carousel_image_' + carousel_slides_total + '" id="options_tca_carousel_image_' + carousel_slides_total + '">' + '</dd>' + '</dl>'); }; |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |