View Single Post
Old 12-19-2012, 05:55 PM   PM User | #4
angst
Senior Coder

 
angst's Avatar
 
Join Date: Apr 2004
Location: Toronto, Ontario
Posts: 2,112
Thanks: 15
Thanked 122 Times in 122 Posts
angst is on a distinguished road
this is all of the javascript;

PHP Code:
function HideDivs(){
    if(
CountSelectedImages() > 1){

        
// hide all divs not selected.
        
var divs=document.getElementsByTagName("div")
        for (var 
3divs.lengthi++) { // skip first 3
            
divs[i].style.display=divs[i].children[0].children[0].checked?"block":"none";
        }

        $(
".DragDropNotice").text("Drag and Drop images to set display order."); // display notice
        
$('input:checkbox').hide(); // hide all checkboxes after selection

        
$(function() {
            $( 
".column" ).sortable({
                
connectWith".column"
            
});
     
            $( 
".portlet" ).addClass"ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
                .
find".portlet-header" )
                    .
addClass"ui-widget-header ui-corner-all" )
                    .
prepend"<span class='ui-icon ui-icon-minusthick'></span>")
                    .
end()
                .
find".portlet-content" );
     
            $( 
".portlet-header .ui-icon" ).click(function() {
                $( 
this ).toggleClass"ui-icon-minusthick" ).toggleClass"ui-icon-plusthick" );
                $( 
this ).parents".portlet:first" ).find".portlet-content" ).toggle();
            });
     
            $( 
".column" ).disableSelection();
        });

    } else {

        
alert("You must select atleast one image to continue.");

    }

angst is offline   Reply With Quote