Subversion Repositories DevTools

Rev

Rev 7286 | Rev 7395 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7286 Rev 7379
Line 601... Line 601...
601
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) AND criticalSectionIsEditable Then%>
601
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) AND criticalSectionIsEditable Then%>
602
    validateSvnPath();
602
    validateSvnPath();
603
    validateSvnTag();
603
    validateSvnTag();
604
<%End If%>
604
<%End If%>
605
 
605
 
-
 
606
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_GIT_TAG) AND criticalSectionIsEditable Then%>
-
 
607
    validateGitPath();
-
 
608
    validateGitTag();
-
 
609
<%End If%>
-
 
610
 
606
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) AND criticalSectionIsEditable Then%>
611
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) AND criticalSectionIsEditable Then%>
607
    validateCCPath();
612
    validateCCPath();
608
    validateCCLabel();
613
    validateCCLabel();
609
<%End If%>
614
<%End If%>
610
 
615
 
Line 787... Line 792...
787
    }
792
    }
788
<%End If%>
793
<%End If%>
789
    parent.resizeIframe(); 
794
    parent.resizeIframe(); 
790
}
795
}
791
 
796
 
-
 
797
//  Validate the GIT Path
-
 
798
//
-
 
799
function validateGitPath()
-
 
800
{
-
 
801
    document.MM_returnValue = true;
-
 
802
    document.MM_error = "";
-
 
803
 
-
 
804
    e = MM_findObj('FRpath');
-
 
805
    if ( e.value.length ) {
-
 
806
        MM_validateForm('--Silent','--NoPrefix','FRpath','Source Path','RisGITPath');
-
 
807
        if ( !document.MM_error ) {
-
 
808
            if ( e.value.indexOf('VIXGIT0X/') != -1 ||   e.value.indexOf('/RepoName/') != -1 ) {
-
 
809
                document.MM_error = "Example path cannot be used";
-
 
810
                document.MM_returnValue = false;
-
 
811
            }
-
 
812
        }
-
 
813
    }
-
 
814
 
-
 
815
    bPathOk = document.MM_returnValue;
-
 
816
    setIdText('gitPathErr',document.MM_error);
-
 
817
    parent.resizeIframe(); 
-
 
818
}
-
 
819
 
-
 
820
//  Validate the GIT Tag
-
 
821
//
-
 
822
function validateGitTag()
-
 
823
{
-
 
824
    document.MM_returnValue = true;
-
 
825
    document.MM_error = "";
-
 
826
 
-
 
827
    e = MM_findObj('FRlabel');
-
 
828
    if ( e.value.length )
-
 
829
        MM_validateForm('--Silent','--NoPrefix','FRlabel','Git Tag','RisGITTag');
-
 
830
 
-
 
831
    bLabelOk = document.MM_returnValue;
-
 
832
    setIdText('gitTagErr',document.MM_error);
-
 
833
<%If (objFormCollector.Item("build_type") = "M" ) Then%>
-
 
834
    if(bLabelOk){
-
 
835
        MM_validateForm('--Silent','FRlabel','Git Tag','RisGITPegTag');
-
 
836
        bLabelOk = document.MM_returnValue;
-
 
837
        setIdText('gitTagErr',document.MM_error);
-
 
838
    }
-
 
839
<%End If%>
-
 
840
    parent.resizeIframe(); 
-
 
841
}
-
 
842
 
792
//  Validate the CC Path
843
//  Validate the CC Path
793
//
844
//
794
function validateCCPath()
845
function validateCCPath()
795
{
846
{
796
    document.MM_returnValue = true;
847
    document.MM_returnValue = true;
Line 866... Line 917...
866
   var str = e.value;
917
   var str = e.value;
867
   str = str.replace(/^\s+/,"");
918
   str = str.replace(/^\s+/,"");
868
   e.value =  str.replace(/\s+$/,"");
919
   e.value =  str.replace(/\s+$/,"");
869
}
920
}
870
 
921
 
-
 
922
//
-
 
923
//  Local form tips
-
 
924
formTips.tips.deployable           = newTip(-150, 20, 150, 10, 'DEPLOYABLE','Select YES if this package or certain files of this package have to be deployed to the field.');
-
 
925
formTips.tips.pkg_info_short_desc  = newTip(-150, 20, 150, 10, 'SHORT DESCRIPTION','Describe the meaning of the package name.');
-
 
926
formTips.tips.pkg_info_overview    = newTip(-150, 20, 150, 10, 'PACKAGE OVERVIEW','Describe in a paragraph what does the package do.<br>NOTE: You have to do this only once!');
-
 
927
formTips.tips.build_environment    = newTip(-150, 20, 150, 10, 'BUILD ENVIRONMENT','Select which build environments are used to build this package.');
-
 
928
 
-
 
929
 
-
 
930
formTips.tips.pkg_label            = newTip(-150, 20, 150, 10, 'LABEL','Enter the ClearCase label used to tag all the source code in this release.');
-
 
931
formTips. tips.src_path             = newTip(-180, 20, 180, 10, 'SOURCE PATH','Enter the path to the source code in a ClearCase VOB. This is used to create a "load rule". ie: /MASS_Dev/%package_name%');
-
 
932
 
-
 
933
formTips.tips.svn_source_path      = newTip(-180, 20, 180, 10,  'SUBVERSION SOURCE PATH',
-
 
934
                                                        'Enter the Subversion path to the development branch of the package. <p>The first element will be a symbolic repository reference. '+
-
 
935
                                                        '<p>The last element will be the packages development branch - which may be the trunk.');
-
 
936
 
-
 
937
formTips.tips.svn_tag              = newTip(-180, 20, 180, 10,  'SUBVERSION TAG',
-
 
938
                                                        'Enter the Subversion tag. This is a named directory within the packages \'tags\' directory. It may be pegged.');
-
 
939
 
-
 
940
formTips.tips.git_source_path      = newTip(-180, 20, 180, 10,  'GIT SOURCE PATH',
-
 
941
                                                        'Enter the GIT path to the development branch of the package. <p>The first element will be a symbolic repository reference. '+
-
 
942
                                                        '<p>The last element will be the packages main release branch - which may be \'master\' or a project name.');
-
 
943
 
-
 
944
formTips.tips.git_tag              = newTip(-180, 20, 180, 10,  'GIT TAG',
-
 
945
                                                        'Enter a GIT tag or SHA-1 commit identifier.');
871
//-->
946
//-->
872
</script>
947
</script>
873
</head>
948
</head>
874
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
949
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
875
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
950
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
Line 908... Line 983...
908
               </tr>
983
               </tr>
909
               <tr>
984
               <tr>
910
                  <td nowrap>Version Control System</td>
985
                  <td nowrap>Version Control System</td>
911
                  <td nowrap>
986
                  <td nowrap>
912
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
987
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
913
                     <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
988
                     <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) OR  (objFormCollector.Item("vcs_tag") = enum_VCS_GIT_TAG) Then%>
914
                        <span class='err_alert'>[Not fully Supported]</span>
989
                        <span class='err_alert'>[Not fully Supported]</span>
915
                     <%End If%>
990
                     <%End If%>
916
                  </td>
991
                  </td>
917
               </tr>
992
               </tr>
918
 
993
 
Line 1039... Line 1114...
1039
                        </table>
1114
                        </table>
1040
                        <span class='val_err' id=svnTagErr style='display:none'></span>
1115
                        <span class='val_err' id=svnTagErr style='display:none'></span>
1041
                     </td>
1116
                     </td>
1042
                  </tr>
1117
                  </tr>
1043
 
1118
 
-
 
1119
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_GIT_TAG) Then%>
-
 
1120
                  <tr>
-
 
1121
                     <td nowrap>Source Path<%=Quick_Help ( "git_source_path" )%></td>
-
 
1122
                     <td nowrap>
-
 
1123
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateGitPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
-
 
1124
                        <table>
-
 
1125
                            <tr>
-
 
1126
                            <td>Example:</td>
-
 
1127
                            <td>VIXGIT0X/RepoName/<%=objFormCollector.Item("pkg_name")%>/master</td>
-
 
1128
                            </tr>
-
 
1129
                        </table>
-
 
1130
                        <span class='val_err' id=gitPathErr style='display:none'></span>
-
 
1131
                     </td>
-
 
1132
                  </tr>
-
 
1133
                  <tr>
-
 
1134
                     <td nowrap  nowrap>Tag<%=Quick_Help ( "git_tag" )%></td>
-
 
1135
                     <td nowrap>
-
 
1136
                        <%
-
 
1137
                        sLabelReadOnly = ""
-
 
1138
                        sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("change_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
-
 
1139
 
-
 
1140
                        If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
-
 
1141
                           sLabelReadOnly = "readonly"
-
 
1142
                        End If
-
 
1143
 
-
 
1144
                        If objForm.IsPostBack Then
-
 
1145
                           sLabel = Request("FRlabel")
-
 
1146
 
-
 
1147
                           ' If a user has switched the form back and forth between different VCS settings, and the previous one did not utilise a label
-
 
1148
                           ' the FRlabel request we just did will return a null/empty, so set sLabel to the default label once more if this is the case.
-
 
1149
                           ' Also, we use the SetValueForced() function to force the value of sLabel into the object that does some of our validation for us.
-
 
1150
                           ' That function (as opposed to the plain SetValue() function) cares nothing about the setting of the IsPostBack flag in the
-
 
1151
                           ' object. If we didnt do this, the field on the visible form would be highlighted with "Required" because SetValue() just does
-
 
1152
                           ' a Request() in IsPostBack situations, and so our sLabel value will not be acquired by the object for validation.
-
 
1153
                           If IsNull(sLabel) OR sLabel = "" Then
-
 
1154
                              sLabel = sDefaultLabel
-
 
1155
                              objForm.SetValueForced "FRlabel", sLabel
-
 
1156
                           End If
-
 
1157
                        Else
-
 
1158
                           If (objFormCollector.Item("pkg_label") = "N/A") Then
-
 
1159
                              sLabel = "N/A"
-
 
1160
                           Else
-
 
1161
                              If objFormCollector.Item("pkg_label") = "" OR IsNull(objFormCollector.Item("pkg_label"))  Then
-
 
1162
                                 sLabel = sDefaultLabel
-
 
1163
                              Else
-
 
1164
                                 sLabel = objFormCollector.Item("pkg_label")
-
 
1165
                              End If
-
 
1166
                              objForm.SetValue "FRlabel", sLabel
-
 
1167
                           End If
-
 
1168
                        End If
-
 
1169
                        %>
-
 
1170
 
-
 
1171
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="120" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateGitTag();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
-
 
1172
                        <%
-
 
1173
                        If objFormCollector.Item("build_type") = "M" Then
-
 
1174
                            sDefaultLabel = sDefaultLabel & "1234567"
-
 
1175
                        Else
-
 
1176
                            sDefaultLabel = sDefaultLabel & "1234567"
-
 
1177
                        End If
-
 
1178
                        %>
-
 
1179
                        <table>
-
 
1180
                            <tr>
-
 
1181
                            <td>Example:</td>
-
 
1182
                            <td><%=sDefaultLabel%></td>
-
 
1183
                            </tr>
-
 
1184
                        </table>
-
 
1185
                        <span class='val_err' id=gitTagErr style='display:none'></span>
-
 
1186
                     </td>
-
 
1187
                  </tr>
-
 
1188
 
1044
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1189
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1045
                  <tr>
1190
                  <tr>
1046
                     <td nowrap>Source Path<%=Quick_Help ( "src_path" )%></td>
1191
                     <td nowrap>Source Path<%=Quick_Help ( "src_path" )%></td>
1047
                     <td nowrap>
1192
                     <td nowrap>
1048
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
1193
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">