FWS-V2

 view release on metacpan or  search on metacpan

lib/FWS/V2/Admin.pm  view on Meta::CPAN

    $self->{tinyMCEEnable} = 1;
            
    my $linkSpacer = "  ·  ";
    my $FWSMenu;
    

    #
    # create a correct label for fws/devel link to know what we have access too
    #
    if ( $self->userValue( 'isAdmin' ) || $self->userValue( 'showDeveloper' ) )  {
        $FWSMenu .= $self->popupWindow( queryString => "p=fws_systemInfo", linkHTML => "System" );
        $FWSMenu .= $linkSpacer;
    }

    #
    # get the FWSMenu taged elements and add them to the list
    #
    my @elementArray    = $self->elementArray( tags => 'FWSMenu' );
    @elementArray       = $self->sortDataByNumber( 'ord', @elementArray );
    for my $i (0 .. $#elementArray) {

lib/FWS/V2/Admin.pm  view on Meta::CPAN

            # convert to our friendly name format
            #
            ( my $fwsLink = $elementArray[$i]{type} ) =~ s/^FWS/fws_/sg;
    
            #
            # if this is not a friendly type version menu item then use the guid
            #
            $fwsLink ||= 'fws_' . $elementArray[$i]{guid};

            my $queryString = "FWS_pageId=" . $paramHash{pageId} . "&p=" . $fwsLink . "&FWS_showElementOnly=";
            if ( $elementArray[$i]{rootElement} ) { $FWSMenu .= $self->popupWindow( queryString => $queryString . "0", linkHTML => $elementArray[$i]{title} ) }
            else { $FWSMenu .= $self->dialogWindow( queryString => $queryString . "1", linkHTML => $elementArray[$i]{title} ) }
            $FWSMenu .= $linkSpacer;
        }
    }

    if ( $self->formValue( "p" ) =~ /^fws_/ ) {
        $FWSMenu .= $self->_selfWindow( "", "View Site" );
        $FWSMenu .= $linkSpacer;
    }
    

lib/FWS/V2/Admin.pm  view on Meta::CPAN

            $treeHTML .= $self->FWSIcon(    
                icon    => "properties_16.png",
                onClick => $self->dialogWindow( queryString => "p=fws_messageEdit&guid=" . $paramHash{id} ),
                alt     => "Edit",
                width   => "16",
            );
        }    
        if ( $paramHash{pageTool} ) {
            $treeHTML .= $self->FWSIcon(
                icon    => "properties_16.png",
                onClick => $self->popupWindow( queryString => "p=fws_pageEdit&FWS_pageId=" . $paramHash{guid} . "&FWS_showElementOnly=0" ),
                alt     => "Edit",
                width   => "16",
                id      => "edit_".$paramHash{id}, 
            );
        }    
        else { 
            $treeHTML .= " " 
        }
        
        $treeHTML .= "</div>";

lib/FWS/V2/Format.pm  view on Meta::CPAN

        # add the text for the name, and close the anchor
        #
        $href .= ( $hrefHash{navigationName} ) ? $hrefHash{navigationName} : $hrefHash{name};
        
        $href .= "</a>";
    }
    return $href;
}


=head2 popupWindow

Create a link to a popup window or just the onclick.  Passing queryString is requried and pass linkHTML if you would like it to be a link.  

    $valueHash{html} .= $fws->popupWindow(queryString=>'p=somePage',$linkHTML=>'Click Here to go to some page');

NOTE: This should only be used in the context of the FWS Administration, and is only here as a reference for modifiers of the admin. 

=cut

sub popupWindow {
    my ( $self, %paramHash ) = @_;
    my $returnHTML = "window.open('" . $self->{scriptName} . $self->{queryHead} . $paramHash{queryString} . "','_blank');";
    if ( $paramHash{linkHTML} ) {
        return "<span class=\"FWSAjaxLink\" onclick=\"" . $returnHTML . "\">" . $paramHash{linkHTML} . "</span>";
    }
    return $returnHTML;
}

=head2 removeHTML



( run in 3.608 seconds using v1.01-cache-2.11-cpan-364913b4093 )