// // Copyright 2001 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wRunPane: // Methods to display forms from the Run menu #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wRunPane.h" p4wRunPane::p4wRunPane( p4wView & ParentView, p4wRequest & Request ) : p4wSpecPane( ParentView, Request, 1 ), fUnchecked(0), fRedisplay(0), fIsFirstFile(0), fNeedsTRTD(0) { // // Set flag for files to be displayed without checks // if unchecked dynamic parameter was set in url. // Also, set the flag for the redisplay button if the // uch dynamic variable is in the url, irregardless of // its value. const StrPtr *uch = fRequest.GetDynArg( "uch" ); if( uch && *uch == "1" ) fUnchecked = 1; if( uch ) fRedisplay = 1; } p4wRunPane::p4wRunPane( p4wView & ParentView, p4wRequest & Request, int unch ) : p4wSpecPane( ParentView, Request, 1 ), fUnchecked(unch) { // // Special constructor for AddPane where unchecked flag // is passed in constructor parameter list instead of // parsed from url. } p4wRunPane::~p4wRunPane() { } void p4wRunPane::BeginForm( const char *title, StrBuf & action, char *path ) { // // Start the form, generate the title and start the table p4wHtml htm; p4wURL urlMaker; StrBuf grayIcon; StrBuf clearIcon; AllCommands rt = fRequest.GetLastReturnType(); int isFileBrowser = ( rt != AC_PATHBROWSER ); // // Used to generate a line underneath the title, and to gnerate // vertical whitespace urlMaker.ConstructURL( grayIcon, "/grayPixelIcon", AC_ICON, NULL ); urlMaker.ConstructURL( clearIcon, "/clearpixelIcon", AC_ICON, NULL ); // // Title with line underneath htm.beginTRow(); htm.beginCol(); htm.beginSpan( "title" ); htm << title; htm.endSpan(); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol( "top" ); htm.icon( grayIcon.Text(), "1", "100%", "", 1, 0, 0 ); htm.endCol(); htm.endTRow(); // // Path with links, with some vertical space for most commands if( fRequest.GetCmd() != AC_SYNCCHANGE && fRequest.GetCmd() != AC_SYNCLABEL && fRequest.GetCmd() != AC_INTEGRATEBRANCH && fRequest.GetCmd() != AC_REPLACELABEL ) { htm.beginTRow(); htm.beginCol("top"); fRequest << htm; htm.Clear(); int useDepot = ( fRequest.GetViewMode() != VM_WORKSPACE ); if( path ) (void)OutputDirectoryHeader( path, isFileBrowser, 1, useDepot ); else (void)OutputDirectoryHeader( fRequest.GetPath().Text(), isFileBrowser, 1, useDepot ); if (!fRequest.isLocalRequest() && fRequest.GetViewMode() == VM_WORKSPACE) { htm << " "; htm.beginSpan("remote"); htm << "<nobr>"; htm << "(workspace files are located on remote machine \"" << fRequest.GetHost() << "\")"; htm << "</nobr>"; htm.endSpan(); } if (!strcmp(fRequest.GetPath().Text(), "//")) { switch(fRequest.GetCmd()) { case AC_EDITFRM: htm.icon( clearIcon.Text(), "1", "20", "", 1, 0, 0 ); htm.text("WARNING: You are about to open for edit ALL files mapped to your client!", 0, 0, "#FF0000"); break; case AC_DELETEFRM: htm.icon( clearIcon.Text(), "1", "20", "", 1, 0, 0 ); htm.text("WARNING: You are about to open for delete ALL your files under Perforce control!", 0, 0, "#FF0000"); break; } } htm.endCol(); htm.endTRow(); } htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "15", "0", "", 1 ); const StrPtr *mu = fRequest.GetDynArg("mu"); if (mu || fRequest.GetLastReturnType() == AC_BROWSEFILE) { int show = mu ? atoi(mu->Text()) : -1; htm.SetRequest(&fRequest); htm.RenderFileMenu(show ? show : -1); htm << "<script language=javascript>" << crlf; htm << "setmushow("; htm << show; htm << ");" << crlf; htm << "</script>" << crlf; } htm.endCol(); htm.endTRow(); // // Begin the form htm.beginTRow(); htm.beginCol(); htm.beginForm( action.Text(), "Run" ); htm.beginTable( "0", NULL, "0", "0" ); htm.beginTRow(); fRequest << htm; } void p4wRunPane::EndForm() { // // End the form & table p4wHtml htm; htm.endTable(); htm.endForm(); htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::DoHidden( int listItem, const char *name, const char *value ) { // // Generate a hidden field p4wHtml htm; if( listItem ) { htm.beginTRow(); htm.beginCol(); } htm.hiddenField( name, p4wStrBuf().EscapeHTML( StrRef(value), Unicode() ).Text() ); if( listItem ) { htm.endCol(); htm.endTRow(); } fRequest << htm; } void p4wRunPane::DoHidden( int listItem, const char *name, int value ) { // // Generate hidden field with an int value p4wHtml htm; if( listItem ) { htm.beginTRow(); htm.beginCol(); } htm.hiddenField( name, value ); if( listItem ) { htm.endCol(); htm.endTRow(); } fRequest << htm; } void p4wRunPane::DoListItem ( const char *item, int noSpan, const char *ftype ) { // // Output a list item. Well, technically it is a table row column // item. p4wHtml htm; if( noSpan ) htm.beginCol(); else htm.beginCol( NULL, NULL, "2" ); htm.text( item ); if( ftype ) { htm.beginSpan( "filestat" ); htm << ftype; htm.endSpan(); } htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::DoButton( const char *name, const char *value ) { // // Generate a submit button p4wHtml htm; htm.button( name, value ); fRequest << htm; } void p4wRunPane::BeginFiles( const StrPtr &path, int noLeadingWS ) { // // Start the Files: section of the run forms and // set a hidden field containing the file's path p4wHtml htm; p4wURL urlMaker; StrBuf clearIcon; // // Used for generating vertical whitespace urlMaker.ConstructURL( clearIcon, "/clearpixelIcon", AC_ICON, NULL ); if( !noLeadingWS ) { htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "20", "0", "", 1 ); htm.endCol(); htm.endTRow(); } htm.beginTRow(); htm.beginCol( "top" ); htm.beginSpan( "label" ); htm << "Files:"; htm.endSpan(); htm.hiddenField( "Path", p4wStrBuf().EscapeHTML( path, Unicode() ).Text() ); htm.endCol(); fRequest << htm; fIsFirstFile = 1; } void p4wRunPane::EndFiles() { // // End the Files section // Nothing to do here. XXX should retire this method. } void p4wRunPane::BeginButtons() { // // Generate some vertical space and start the // row with buttons p4wHtml htm; p4wURL urlMaker; StrBuf clearIcon; // // Used for generating vertical whitespace urlMaker.ConstructURL( clearIcon, "/clearpixelIcon", AC_ICON, NULL ); htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "25", "0", "", 1 ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.endCol(); htm.beginCol( NULL, NULL, "2" ); fRequest << htm; } void p4wRunPane::EndButtons() { // // End the row of buttons p4wHtml htm; htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::FilesIn( int all, int checked, const char *path, const char *allText, int skipCol ) { // // Generate the "Files in" section of the run form p4wHtml htm; if( all ) { htm.beginCol(); htm.radio( "Files", "all", 0, 0, "Filesall" ); htm.endCol(); htm.beginCol(); htm.label( allText, "Filesall" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); } if( skipCol ) { htm.beginCol(); htm.endCol(); } htm.beginCol(); htm.radio( "Files", "in", checked, 0, "Filesin" ); htm.endCol(); htm.beginCol(0, 0, 0, 0, 0, "100%"); htm.label( "Files in ", "Filesin" ); htm.label( p4wStrBuf().EscapeHTML(StrRef(path), Unicode()).Text(), "Filesin" ); htm.beginSelect( "dirVal", 0, 0, 0, "setCheckedValue(document.forms['Run'].elements['Files'], 'in')" ); htm.selectOpt(); htm.text( "and subdirectories" ); htm.selectOpt(); htm.text( "at this level only" ); htm.endSelect(); htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::BeginSelected( int optChecked, int filesChecked ) { // // Start the Selected Files section of the run form p4wHtml htm; htm.beginTRow(); htm.beginCol(); htm.endCol(); htm.beginCol(); htm.radio( "Files", "selected", optChecked, 0, "Filesselected" ); htm.endCol(); htm.beginCol(); htm.label( "Selected Files", "Filesselected" ); htm.endCol(); htm.endTRow(); htm << "<script language=javascript>" << crlf; htm << "</script>" << crlf; htm << "<noscript>" << crlf; htm.beginTRow(); htm.beginCol(); htm.endCol(); htm.beginCol(); htm.endCol(); htm.beginCol(); htm.button( "redisplay", "Redisplay" ); fRequest << htm; DoCheckFiles( filesChecked ); htm.Clear(); htm << "</noscript>" << crlf; fRequest << htm; fNeedsTRTD = 1; } void p4wRunPane::DoCheckFiles( int checked ) { // // Generate the "using files checked/unchecked radio options p4wHtml htm; htm.text( " using files " ); htm.radio( "CheckOption", "checked", checked, 0, "DoCheckOptionchecked" ); htm.label( "checked or ", "DoCheckOptionchecked" ); htm.radio( "CheckOption", "unchecked", !checked, 0, "DoCheckOptionunchecked" ); htm.label( "unchecked", "DoCheckOptionunchecked" ); htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::DoFile( int checked, StrPtr *fileName, StrPtr *fileText, const char *ftype ) { p4wHtml htm; // // Add a Select All Files check box if (fIsFirstFile) { if (fNeedsTRTD) { htm.beginTRow(); htm.beginCol(0,0, "2"); htm.endCol(); fNeedsTRTD = 0; } htm.checkboxselectall("Run", "File", checked); htm << "<script language=javascript>" << crlf; htm << "document.write(\"<tr><td><img src='/clearpixelIcon?ac=20' height='4' width='1' border='0' alt='' title=''></td></tr>\")" << crlf; htm << "</script>" << crlf; fIsFirstFile = 0; } // // Generate file with checkbox htm.beginTRow(); if( fRequest.GetCmd() != AC_ADDSELECTPROCESSOR ) { htm.beginCol(); htm.endCol(); } htm.beginCol(); htm.endCol(); if( fRequest.GetCmd() != AC_ADDSELECTPROCESSOR ) htm.beginCol(); else htm.beginCol( NULL, NULL, "2" ); htm.checkbox( "File", p4wStrBuf().EscapeHTML( *fileName, Unicode() ).Text(), checked, 0, p4wStrBuf().EscapeHTML( *fileName, Unicode() ).Text() ); htm.label( fileText->Text(), p4wStrBuf().EscapeHTML( *fileName, Unicode() ).Text() ); if( ftype ) { htm.beginSpan( "filestat" ); htm << ftype; htm.endSpan(); } htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::BeginOptions() { // // Beginning of Options section p4wHtml htm; htm.beginCol( "top" ); htm.beginSpan( "label" ); htm << "Options:"; htm.endSpan(); htm.endCol(); fRequest << htm; } void p4wRunPane::BeginOptionChange( const char *text, int newRow, int sameCol ) { // // Start the Option/changelist option section p4wHtml htm; if( newRow ) { htm.beginTRow(); htm.beginCol(); htm.endCol(); } htm.beginCol(); htm.checkbox( "OptionChg", "changelist" ); if( !sameCol ) { htm.endCol(); htm.beginCol(); } htm.label( text, "OptionChg" ); htm.beginSelect( "changelistVal", 0, 0, 0, "setCheckedValue(document.forms['Run'].elements['OptionChg'], 'changelist')" ); htm.selectOpt(); htm.text( "default" ); fRequest << htm; } void p4wRunPane::BeginFilesChange( const char *text ) { // // Start the Files/changelist option section p4wHtml htm; htm.beginCol(); htm.radio( "Files", "changelist", 0, 0, "BgnFileschangelist" ); htm.endCol(); htm.beginCol(); htm.label( text, "BgnFileschangelist" ); htm.beginSelect( "changelistVal", 0, 0, 0, "setCheckedValue(document.forms['Run'].elements['Files'], 'changelist')" ); htm.selectOpt(); htm.text( "default" ); fRequest << htm; } void p4wRunPane::BeginSelect( const char *value, const char *onFocus ) { // // Begin a Select option list p4wHtml htm; htm.beginSelect( value, 0, 0, 0, onFocus ); fRequest << htm; } void p4wRunPane::DoOption( const char *text, const char *value ) { // // Output an option value. The value argument is optional. // If value is set, use it as the OPTION VALUE= parameter. // Otherwise the text is used by default as both the // text displayed and the value of the option. p4wHtml htm; htm.selectOpt( 0, value ); htm.text( text ); fRequest << htm; } void p4wRunPane::EndSelect() { // // End the select options section p4wHtml htm; htm.endSelect(); htm.endCol(); htm.endTRow(); fRequest << htm; } void p4wRunPane::DoCheckbox( int newRow, int checked, const char *name, const char *value, const char *text, int newCol, int endRow, int splitCol ) { // // Output a checkbox item (optionally start a new row, start a // new column, and/or split // into 2 cols p4wHtml htm; if( newRow ) { htm.beginTRow(); htm.beginCol(); htm.endCol(); } if( newCol ) htm.beginCol(); htm.checkbox( name, value, checked, 0, (char *)value ); if( splitCol ) { htm.endCol(); htm.beginCol(); } htm.label( text, value ); if( endRow ) { htm.endCol(); htm.endTRow(); } fRequest << htm; } void p4wRunPane::DoRadio( int newRow, int checked, const char *name, const char *value, const char *text, int endCol, int endRow, const char *id, const char *height ) { // // Output a radio item. Options include starting a new row, // ending this column, and ending this row. p4wHtml htm; if( newRow ) { htm.beginTRow(); htm.beginCol(); htm.endCol(); } htm.beginCol(0,0,0,0,0,0, height ? height : 0); htm.radio( name, value, checked, 0, (char *)id ); htm.endCol(); htm.beginCol(); if (id) htm.label( text, id ); else htm.text( text ); if( endCol ) htm.endCol(); if( endRow ) htm.endTRow(); fRequest << htm; } void p4wRunPane::DoText( const char *name, const char *value, int size, int endRow, const char *onClick, const char *onFocus, const char *onBlur, const char *id ) { // // Output a text input field (size & value optional). // optionally end the row. p4wHtml htm; htm.textField( name, value, size, (char *)id, onClick, onFocus, onBlur ); if( endRow ) { htm.endCol(); htm.endTRow(); } fRequest << htm; } void p4wRunPane::DoComment( const char *text ) { // // Output the text as an html comment p4wHtml htm; htm.comment( text ); fRequest << htm; } void p4wRunPane::DoFileType( int useBox, const char *type ) { // // Generate select box, checkboxes and radio buttons // to help user change the file type. Optionally // enclose this in a box and indent to the 3rd column // position on the next row. p4wHtml htm; p4wURL urlMaker; StrBuf clearIcon; const StrPtr *server = fRequest.GetProtocol( "server2" ); urlMaker.ConstructURL( clearIcon, "/clearpixelIcon", AC_ICON, NULL ); if( !useBox ) { htm.beginCol( NULL, NULL, "2" ); htm.beginTable(); } else { htm.beginTRow(); htm.beginCol(); htm.endCol(); htm.beginCol(); htm.endCol(); htm.beginCol( NULL, NULL, "2" ); htm.beginTable( "0", "100%", "8", "1", "#7F7F7F" ); htm.beginTRow( NULL, NULL, "#FFFFFF" ); htm.beginCol(); htm.beginTable( "0", "100%", "2", "0", "#FFFFFF" ); } StrBuf basic; const char *t; const char *p; int mmod = 0; int wmod = 0; int xmod = 0; int kmod = 0; int komod = 0; int lmod = 0; int Smod = 0; int NbrRevs = 1; int norev = 0; int crev = 0; int drev = 0; int frev = 0; // // Parse the file type to determine which checkboxes and // buttons to set to match the current file type if( ( t = strchr( type, '+' ) ) ) { basic.Set( type, t - type ); ++t; if( t && ( *t == 'C' || *t == 'D' || *t == 'F' ) ) { if( *t == 'C' ) ++crev; else if( *t == 'D' ) ++drev; else if( *t == 'F' ) ++frev; ++t; } else { ++norev; } if( t ) { if( strchr( t, 'm' ) ) ++mmod; if( strchr( t, 'w' ) ) ++wmod; if( strchr( t, 'x' ) ) ++xmod; if( strchr( t, 'k' ) ) { if( (t+1) && ( *(t+1) == 'o' ) ) ++komod; else ++kmod; } if( strchr( t, 'l' ) ) ++lmod; if( p=strchr( t, 'S' ) ) { ++Smod; if (isdigit(*++p)) { NbrRevs = atoi(p); if (NbrRevs < 1) NbrRevs = 1; } } } } else if (!strncmp("ktext", type, 5)) { // handle old style type names ++kmod; basic.Set( "text" ); } else if (!strncmp("kotext", type, 5)) { ++komod; basic.Set( "text" ); } else if (!strncmp("kxtext", type, 5)) { ++kmod; ++xmod; basic.Set( "text" ); } else if (!strncmp("ltext", type, 5)) { ++lmod; basic.Set( "text" ); } else if (!strncmp("xtext", type, 5)) { ++xmod; basic.Set( "text" ); } else if (!strncmp("xbinary", type, 7)) { ++xmod; basic.Set( "binary" ); } else { // defualt basic.Set( type ); ++norev; } // // Basic file type select box htm.beginTRow(); htm.beginCol( NULL, NULL, "6" ); htm.text( "Base filetype: " ); htm.beginSelect( "basicType", 0, 0, 0, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); if( basic == "text" ) htm.selectOpt( 1, "text" ); else htm.selectOpt( 0, "text" ); htm.text( "text" ); if( basic == "binary" ) htm.selectOpt( 1, "binary" ); else htm.selectOpt( 0, "binary" ); htm.text( "binary" ); if ( fRequest.isLocalRequest() || basic == "symlink" || SEC_ALLOW_CR8CHG_SYMLINKS ) { if( basic == "symlink" ) htm.selectOpt( 1, "symlink" ); else htm.selectOpt( 0, "symlink" ); htm.text( "symlink" ); } if( basic == "resource" ) htm.selectOpt( 1, "resource" ); else htm.selectOpt( 0, "resource" ); htm.text( "resource" ); if( basic == "apple" ) htm.selectOpt( 1, "apple" ); else htm.selectOpt( 0, "apple" ); htm.text( "apple" ); if( basic == "unicode" ) htm.selectOpt( 1, "unicode" ); else htm.selectOpt( 0, "unicode" ); htm.text( "unicode" ); if( basic == "utf16" ) htm.selectOpt( 1, "utf16" ); else htm.selectOpt( 0, "utf16" ); htm.text( "utf16" ); htm.endSelect(); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "10", "0", "", 1 ); htm.endCol(); htm.endTRow(); // // Modifier titles htm.beginTRow(); htm.beginCol( NULL, NULL, "3" ); htm.text( "Filetype modifiers:" ); htm.endCol(); htm.beginCol( NULL, NULL, "3" ); htm.text( "Format of revisions stored on server:" ); htm.endCol(); htm.endTRow(); // // File type modifier checkboxes & revision format radio buttons htm.beginTRow(); htm.beginCol(); htm.checkbox( "mmod", "m", mmod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+m", "mmod" ); htm.endCol(); htm.beginCol(); htm.label( "Preserve file modification time", "mmod" ); htm.endCol(); htm.beginCol(); htm.radio( "fileRevs", "def", norev, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.endCol(); htm.beginCol(); htm.label( "Use default format for base filetype", "def" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "wmod", "w", wmod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+w", "wmod" ); htm.endCol(); htm.beginCol(); htm.label( "Always writable in workspace", "wmod" ); htm.endCol(); htm.beginCol(); htm.radio( "fileRevs", "+C", crev, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+C", "+C" ); htm.endCol(); htm.beginCol(); htm.label( "Compressed file (binary default)", "+C" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "xmod", "x", xmod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+x", "xmod" ); htm.endCol(); htm.beginCol(); htm.label( "Executable bit set in workspace", "xmod" ); htm.endCol(); htm.beginCol(); htm.radio( "fileRevs", "+D", drev, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+D", "+D" ); htm.endCol(); htm.beginCol(); htm.label( "RCS formatted deltas (text default)", "+D" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "kmod", "k", kmod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+k", "kmod" ); htm.endCol(); htm.beginCol(); htm.label( "RCS keyword expansion", "kmod" ); htm.endCol(); htm.beginCol(); htm.radio( "fileRevs", "+F", frev, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+F", "+F" ); htm.endCol(); htm.beginCol(); htm.label( "Uncompressed file", "+F" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "komod", "ko", komod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+ko", "komod" ); htm.endCol(); htm.beginCol(); htm.label( "RCS keyword expansion (Id & Header only)", "komod" ); htm.endCol(); htm.beginCol( NULL, NULL, "3" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "lmod", "l", lmod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+l", "lmod" ); htm.endCol(); htm.beginCol(); htm.label( "Exclusive open: disallow multiple opens", "lmod" ); htm.endCol(); htm.beginCol( NULL, NULL, "3" ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.checkbox( "Smod", "S", Smod, "setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); htm.endCol(); htm.beginCol(); htm.label( "+S", "Smod" ); htm.endCol(); htm.beginCol(); htm.label( "Server stores only ", "Smod" ); if( server && server->Atoi() >= 23 ) // Handle +Sn for 2007.2+ servers { htm.beginSelect( "NbrRevs", 0, 0, 0, "setCheckedValue(document.forms['Run'].elements['Smod'], 'S');setCheckedValue(document.forms['Run'].elements['OptionFt'], 'filetype')" ); int i; for (i=0; ++i <= 16; ) { char buf[8]; int j; if (i <= 10) sprintf(buf, "%d", j = i); else sprintf(buf, "%d", j = 16 << (i-11)); if( NbrRevs == j ) htm.selectOpt( 1, buf ); else htm.selectOpt( 0, buf ); htm.text( buf ); } htm.endSelect(); htm.text( " revision(s)" ); } else { htm.text( "single head revision" ); } htm.endCol(); htm.beginCol( NULL, NULL, "3" ); htm.endCol(); htm.endTRow(); htm.endTable(); if( useBox ) { htm.endCol(); htm.endTRow(); htm.endTable(); } htm.endCol(); if( useBox ) htm.endTRow(); fRequest << htm; }
# | 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/p4wRunPane.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |