// // Copyright 2000 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wSubmitDefPane: // Generates a form for choosing a file path for submitting a default changelist #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wSubmitDefPane.h" // ------------------------------------- // Constructors and destructor. // p4wSubmitDefPane::p4wSubmitDefPane( p4wView & ParentView, p4wRequest & Request, int isFileBrowser ) : p4wRunPane( ParentView, Request ), fIsFileBrowser(isFileBrowser) { } p4wSubmitDefPane::~p4wSubmitDefPane() { } // ------------------------------------- // Render functions. // void p4wSubmitDefPane::Begin() { // // Fetch and build the ACTION value. StrBuf actionURL; GetAction( actionURL ); // // Begin the pane. DoComment( "BEGIN SUBMITDEF PANE" ); BeginForm( "Select files to submit:", actionURL ); // // Generate the Files portion. StrBuf path; p4wURL urlMaker; if( fIsFileBrowser ) { char *e = urlMaker.GetNodeLocation( fRequest.GetPath().Text(), fRequest.GetViewMode() != VM_WORKSPACE, fRequest.GetCmd() ); path.Set( fRequest.GetPath().Text(), e - fRequest.GetPath().Text() ); } else { path.Set( fRequest.GetPath() ); } DoHidden( 0, "Path", path.Text() ); FilesIn( 1, 1, path.Text(), "All opened files" ); } void p4wSubmitDefPane::Render( StrDict *varList ) { // // Generate choice of single file only if it is opened by client // in the default changelist DoRadio( 1, 0, "Files", "file", fRequest.GetPath().Text(), 0, 0, "Filesfile" ); DoHidden( 1, "File", fRequest.GetPath().Text() ); } void p4wSubmitDefPane::RenderPathOnly() { // // Generate the form without a File argument. This is used when called // from the path browser Begin(); End(); } void p4wSubmitDefPane::End() { // // End the pane. // p4wHtml htm; htm.dListVal(); fRequest << htm; DoButton( "submitFiles", "Continue" ); DoCheckFiles( 1 ); EndForm(); DoComment( "END SUBMITDEF PANE" ); } void p4wSubmitDefPane::GetAction( StrBuf & actionURL ) { // // Generate the URL that will be used to parse this form. Strip // out path as the path doesn't belong in the submit url. StrBuf path; p4wURL urlMaker; fRequest.UseNewBase( path, NULL, "path", "/" ); urlMaker.ConstructURL( actionURL, path.Text(), AC_SUBMIT, NULL, fRequest.GetUnicode() ); } void p4wSubmitDefPane::RenderError( char *data, int escapeHTML ) { RenderErrorList( data, escapeHTML ); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Panes/p4wSubmitDefPane.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |