Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter jinch

    (@jinch)

    Sorry bad typing. Should say “actioned before” and “if that can be added”

    Thread Starter jinch

    (@jinch)

    Lyndon, is a JavaScript solution possible for this? It looks like there’s Ajax involved in the button action and online comments suggest that the Ajax is actions before JavaScript would stop it?

    There looks to be ways to add stops in Ajax or even an Ajax confirmation pop up but I don’t know if that be be added to a child theme?

    Thread Starter jinch

    (@jinch)

    Actually the top one doesn’t work either if I tick a file first.

    Thread Starter jinch

    (@jinch)

    Thanks Lynton –

    Unfortunately I’m no programmer!

    I found and adapted some Jquery and put it in a child theme js file:

    $('button.btn.btn-danger.delete').on('click',function(e){
        var answer=confirm('Do you want to delete?');
        if(answer){
         alert('Deleted');
        }
        else{
         e.preventDefault();
        }
    });

    This seems to work on the Delete button that sits at the top of the workflow (along with all the other buttons) but on the list of already uploaded files where each has its own Delete button next to it, then these Delete buttons aren’t affected by the above code and just go ahead and delete the file without prompting me to confirm.

    The buttons all seem to use the same classes but I don’t know why all but the top one ignore the confirmation code?

    p.s I’m using a simple workflow using just [wtf_fu_upload]

    Thread Starter jinch

    (@jinch)

    Ok – thanks for getting back to me.

    Thread Starter jinch

    (@jinch)

    You did it!!!

    I officially love you and / or owe you a beer!

    Thanks Mottie, you’ve solved a problem that’s been bugging my progress for weeks. I really appreciate it.

    Cheers again!

    Thread Starter jinch

    (@jinch)

    Hi Mottie –

    Many thanks for that. It doesn’t seem to work on my site, though. As with my previous code attempt, it works fine for the three on tab-2 but always goes to the last selected slide on tab-3.

    I’ve inserted the code above into the HEAD section of the header.php file for my theme: is that the right place? When I tried it in the page itself it just wrapped it in <p> tags.

    Thread Starter jinch

    (@jinch)

    Hi Jacob –

    Site is just on my local pc, but here’s the code for the page with the tabs and sliders on:

    <script>
    jQuery("document").ready(function() {
        jQuery( "#tabs" ).tabs();
    	jQuery("#web_review").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-2");
    		jQuery('.anythingSlider').anythingSlider(1);
    		e.preventDefault();
    		});
    	jQuery("#web_test").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-2");
    		jQuery('.anythingSlider').anythingSlider(2);
    		e.preventDefault();
    		});
    	jQuery("#web_design").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-2");
    		jQuery('.anythingSlider').anythingSlider(3);
    		e.preventDefault();
    		});
    	jQuery("#words_create").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-3");
    		jQuery('.anythingSlider').anythingSlider(4);
    		e.preventDefault();
    		});
    	jQuery("#words_check").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-3");
    		jQuery('.anythingSlider').anythingSlider(5);
    		e.preventDefault();
    		});
    	jQuery("#words_proofread").click(function(e){
    		jQuery("#tabs").tabs("select","#tabs-3");
    		jQuery('.anythingSlider').anythingSlider(6);
    		e.preventDefault();
    		});
    });
    </script>
    
    <div class="homePage">
    
    <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
    	<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
    		<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Home</a></li>
    		<li class="ui-state-default ui-corner-top"><a href="#tabs-2">Websites</a></li>
    		<li class="ui-state-default ui-corner-top"><a href="#tabs-3">Words</a></li>
    	</ul>
    	<div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
    
    		<div id="homeContentWeb">
    		<ul>
    			<li><a href="#" id="web_review" class="highlight">link to tab2, slide1</a></li>
    			<li><a href="#" id="web_test" class="highlight">link to tab2, slide2</a></li>
    			<li><a href="#" id="web_design" class="highlight">link to tab2, slide3</a></li>
    		</ul>
    		</div>
    
    		<div id="homeContentWords">
    		<ul>
    			<li><a href="#" id="words_create" class="highlight">link to tab3, slide1</a></li>
    			<li><a href="#" id="words_check" class="highlight">link to tab3, slide2</a></li>
    			<li><a href="#" id="words_proofread" class="highlight">link to tab3, slide3</a></li>
    		</ul>
    		</div>
    	</div>
    	<div id="tabs-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
    		[anything_slides navFormat="true" orderby="menu_order" order="ASC" cat="web"]
    	</div>
    	<div id="tabs-3" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
    		[anything_slides navFormat="true" orderby="menu_order" order="ASC" cat="words"]
    	</div>
    </div>
    </div>

    Each slide is just a slide with text in so nothing really to show you. I have the first three slides numbered 1,2 and 3 and categorised as “web”, and the remaining three slides numbered 4,5 and 6 and categorised as “words” so that each slider picks up the right slides to display.

    Really appreciate any advice you can hive with this as it’s urgent!

    p.s. if you can suggest any improvements to the code please do – I’m new to this sort of thing!

    Thread Starter jinch

    (@jinch)

    SOLVED:

    Seems that the Order attribute on Quick Edit doesn’t work, but I discovered the Order attribute is also on the Edit screen (bottom right).

    I updated that and had to add ORDER=”ASC” to the shortcut, then they began to appear in the order I wanted.

Viewing 9 replies - 1 through 9 (of 9 total)