Subversion Repositories DevTools

Rev

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

Rev 5590 Rev 5596
Line 47... Line 47...
47
parVCSTag = QStrPar("vcs_tag")
47
parVCSTag = QStrPar("vcs_tag")
48
parBSName = QStrPar("bs_name")
48
parBSName = QStrPar("bs_name")
49
'----------------------------------------------
49
'----------------------------------------------
50
%>
50
%>
51
<%
51
<%
52
Sub MessageBox_BM_Exclusivity()
-
 
53
%><script language="Javascript">
-
 
54
alert("You cannot select Generic with other BUILD MACHINE options!")
-
 
55
history.reload()
-
 
56
 
-
 
57
</script>
-
 
58
<%
-
 
59
End Sub
-
 
60
 
-
 
61
Sub MessageBox_RequiredFieldsEmpty()
-
 
62
%><script language="Javascript">
-
 
63
alert("One or more required fields are still empty!\nFill in and submit, or cancel.")
-
 
64
history.reload()
-
 
65
 
-
 
66
</script>
-
 
67
<%
-
 
68
End Sub
-
 
69
 
-
 
70
Sub MessageBox_Need_A_BuildStandard()
-
 
71
%><script language="Javascript">
-
 
72
alert("This is an auto-build package version, and so a build standard/environment is required!\nFill in and re-submit, or cancel.")
-
 
73
history.reload()
-
 
74
 
-
 
75
</script>
-
 
76
<%
-
 
77
End Sub
-
 
78
 
-
 
79
 
-
 
80
'----------------------------------------------------------------------------------------------------------------------
52
'----------------------------------------------------------------------------------------------------------------------
81
' Function to get the build standard name (eg. JATS) from a build standard ID
53
' Function to get the build standard name (eg. JATS) from a build standard ID
82
Function bs_name_from_bs_id( nBs_Id )
54
Function bs_name_from_bs_id( nBs_Id )
83
   Dim rsTemp, Query_String
55
   Dim rsTemp, Query_String
84
 
56
 
Line 572... Line 544...
572
         submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id & "&vcs_tag=" & parVCSTag & "&bs_name=" & parBSName
544
         submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id & "&vcs_tag=" & parVCSTag & "&bs_name=" & parBSName
573
      End If
545
      End If
574
   End If
546
   End If
575
End Sub
547
End Sub
576
'----------------------------------------------------------------------------------------------------------------------
548
'----------------------------------------------------------------------------------------------------------------------
577
' This subroutine sets up the on_submit_validation string to be used in the form tag to validate certain fields
-
 
578
' in client-side javascript when a user tries to submit the form
-
 
579
Sub Determine_On_Submit_Validation
-
 
580
   on_submit_validation = ""
-
 
581
   Dim args
-
 
582
 
-
 
583
   If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then
-
 
584
      ' Do clearcase path + label validation
-
 
585
      args = "'FRlabel','Label','RisCCLabel','FRpath','Source Path','RisCCPath'"
-
 
586
   ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then
-
 
587
      ' Do subversion tag validation
-
 
588
      args = "'FRpath','Source Path','RisSVNPath'"
-
 
589
      args = args & ",'FRlabel','Subversion Tag','RisSVNTag'"
-
 
590
      If (objFormCollector.Item("build_type") = "M" ) Then
-
 
591
          args = args & ",'FRlabel','Subversion Tag','RisSVNPegTag'"
-
 
592
      End If
-
 
593
   End If
-
 
594
   args = args & ",'pv_description','Package Description','RminLength:11'"
-
 
595
   args = args & ",'pv_overview','Package Overview','RminLength:11'"
-
 
596
   on_submit_validation = "onSubmit=""MM_validateForm(" & args & "); return document.MM_returnValue"""
-
 
597
 
-
 
598
   on_submit_validation = ""
-
 
599
End Sub
-
 
600
'----------------------------------------------------------------------------------------------------------------------
-
 
601
' This function obtains a BM_ID (build machine ID) from a buidl machine name by querrying the database
-
 
602
Function Get_BM_ID_for_BM_Name(nBm_Name)
-
 
603
   Dim rsTemp, Query_String
-
 
604
 
-
 
605
   Get_BM_ID_for_BM_Name = ""
-
 
606
 
-
 
607
   Query_String = "SELECT bm_id FROM build_machines bm WHERE bm.bm_name = '" & nBm_Name & "'"
-
 
608
 
-
 
609
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
-
 
610
 
-
 
611
   Get_BM_ID_for_BM_Name = ""
-
 
612
 
-
 
613
   If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
-
 
614
      Get_BM_ID_for_BM_Name = rsTemp("bm_id")
-
 
615
   End If
-
 
616
 
-
 
617
End Function
-
 
618
'----------------------------------------------------------------------------------------------------------------------
-
 
619
Function GetRowColor( sRowColor )
549
Function GetRowColor( sRowColor )
620
   If sRowColor = "#FFFFFF" Then
550
   If sRowColor = "#FFFFFF" Then
621
      GetRowColor = "#F5F5F5"
551
      GetRowColor = "#F5F5F5"
622
   Else
552
   Else
623
      GetRowColor = "#FFFFFF"
553
      GetRowColor = "#FFFFFF"
Line 626... Line 556...
626
'----------------------------------------------------------------------------------------------------------------------
556
'----------------------------------------------------------------------------------------------------------------------
627
%>
557
%>
628
<%
558
<%
629
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------
559
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------
630
 
560
 
631
Call LoadFieldRules ( "'FRlabel','FRpath','pv_description','pv_overview','be_id_list'", objForm )      ' Load Validation Rules
-
 
632
Call Get_Form_Details( parPv_id, objFormCollector )
561
Call Get_Form_Details( parPv_id, objFormCollector )
633
 
562
 
634
 
-
 
635
 
-
 
636
'--- From Validation Rule Changes ----
-
 
637
 
-
 
638
' Dont need the label if the package version is uncontrolled
-
 
639
If (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then
-
 
640
   objForm.UpdateRules ("id='FRlabel' IsRequired='N'")
-
 
641
End If
-
 
642
 
-
 
643
' Dont need the path if the package version is uncontrolled
-
 
644
If (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then
-
 
645
   objForm.UpdateRules ("id='FRpath' IsRequired='N'")
-
 
646
End If
-
 
647
 
-
 
648
' Dont need the build environment if the is_build_env_required is "N"
-
 
649
If objFormCollector.Item("is_build_env_required") = "N" Then
-
 
650
   objForm.UpdateRules ("id='be_id_list' IsRequired='N'")
-
 
651
End If
-
 
652
 
-
 
653
' Test for late entry of data
-
 
654
'objForm.UpdateRules ("id='FRpath' IsRequired='N'")
-
 
655
'objForm.UpdateRules ("id='FRlabel' IsRequired='N'")
-
 
656
'objForm.UpdateRules ("id='pv_description' IsRequired='N'")
-
 
657
'objForm.UpdateRules ("id='pv_overview' IsRequired='N'")
-
 
658
 
-
 
659
 
-
 
660
 
-
 
661
'--- Access Control Setup ------------
563
'--- Access Control Setup ------------
662
pageIsEditable = Is_Page_Editable ( objFormCollector.Item ("dlocked") )
564
pageIsEditable = Is_Page_Editable ( objFormCollector.Item ("dlocked") )
663
criticalSectionIsEditable = Is_Critical_Section_Editable ( objFormCollector.Item("dlocked") )
565
criticalSectionIsEditable = Is_Critical_Section_Editable ( objFormCollector.Item("dlocked") )
664
isWIP = PackageExists(parRtag_id,parPv_id,"work_in_progress")
566
isWIP = PackageExists(parRtag_id,parPv_id,"work_in_progress")
665
 
567
 
Line 667... Line 569...
667
   disableCriticalSectionEdit = ""
569
   disableCriticalSectionEdit = ""
668
Else
570
Else
669
   disableCriticalSectionEdit = "disabled"
571
   disableCriticalSectionEdit = "disabled"
670
End If
572
End If
671
 
573
 
672
' Disable "Required" warnings for fields that cannot be edited by the current user at this time
-
 
673
If NOT criticalSectionIsEditable Then
-
 
674
   objForm.UpdateRules ("id='FRlabel' IsRequired='N'")
-
 
675
   objForm.UpdateRules ("id='FRpath' IsRequired='N'")
-
 
676
   objForm.UpdateRules ("id='be_id_list' IsRequired='N'")
-
 
677
End If
-
 
678
 
-
 
679
 
-
 
680
'--- Process Submission ---------------
574
'--- Process Submission ---------------
681
 
-
 
682
If objForm.IsPostBack Then
575
If objForm.IsPostBack Then
683
   ' use of the drop down lists or the submit button gets us in here
-
 
684
 
-
 
685
   If objForm.IsValidOnPostBack Then
-
 
686
      ' only get here if the form is valid
-
 
687
 
-
 
688
      ' has the user pressed the submit button?
576
      ' has the user pressed the submit button?
689
      If Request("btn") = "Submit" Then
577
    If Request("btn") = "Submit" Then
690
 
-
 
691
         If objFormCollector.Item("build_type") = "A" AND UCase(objFormCollector.Item("bs_name")) = "NONE" Then
-
 
692
 
-
 
693
            Call MessageBox_Need_A_BuildStandard()
-
 
694
 
-
 
695
         Else
-
 
696
 
-
 
697
            Dim aBuildEnvList, nBuildEnv, display
-
 
698
            display = false
-
 
699
 
-
 
700
            If UCase(objFormCollector.Item("bs_name")) <> "NONE" Then
-
 
701
               ' Check for mutual exclusivity rules on the build standard addendum items
-
 
702
               aBuildEnvList = Split( Replace( Request("be_id_list"), " ", "" ) , ",")
-
 
703
 
-
 
704
               ' If >1 build machine items have been selected....
-
 
705
               If UBound(aBuildEnvList) > 0 Then
-
 
706
                  Dim bm_id_generic
-
 
707
                  bm_id_generic = Get_BM_ID_for_BM_Name("Generic")
-
 
708
 
-
 
709
                  ' If one of the selected build mnachines is "Generic" then we have a mutual exclusivity violation
-
 
710
                  For Each nBuildEnv In aBuildEnvList
-
 
711
                     If nBuildEnv = bm_id_generic Then
-
 
712
                        display = true
-
 
713
                     End If
-
 
714
                  Next
-
 
715
               End If
-
 
716
            End If
-
 
717
 
-
 
718
            If display then
-
 
719
               Call MessageBox_BM_Exclusivity()
-
 
720
            Else
-
 
721
               Call Update_Pkg_Info ( parPv_id, QStrPar("FRdeployable"), QStrPar("FRlabel"), QStrPar("FRpath"), QStrPar("pv_description"), QStrPar("pv_overview") )
578
        Call Update_Pkg_Info ( parPv_id, QStrPar("FRdeployable"), QStrPar("FRlabel"), QStrPar("FRpath"), QStrPar("pv_description"), QStrPar("pv_overview") )
722
               Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
579
        Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
723
               Call CloseWindow
580
        Call CloseWindow
724
            End If
581
        Response.End
725
 
-
 
726
         End If
-
 
727
 
-
 
728
 
-
 
729
      Else
-
 
730
         ' We come through here when a user modifies the VCS or Build Standard drop down list settings
-
 
731
         ' We must stay in the form. There is nothing to do yet. The user may not have finished making their edits yet.
-
 
732
      End If
-
 
733
   Else
-
 
734
      ' The form is still invalid but we only want to issue the warning message if the user pressed the submit button
-
 
735
      If Request("btn") = "Submit" Then
-
 
736
         Call MessageBox_RequiredFieldsEmpty()
-
 
737
      End If
-
 
738
   End If
582
   End If
739
End If
583
End If
740
 
584
 
741
' Determine the URL to use when and if this form is refreshed using F5, or when a user changes the
585
' Determine the URL to use when and if this form is refreshed using F5, or when a user changes the
742
' values in one of the drop down lists and the form is reloaded with additional or changed parameters
586
' values in one of the drop down lists and the form is reloaded with additional or changed parameters
743
' The html form will use the result of this in its action tag.
587
' The html form will use the result of this in its action tag.
744
Call Determine_submit_action_url()
588
Call Determine_submit_action_url()
745
 
589
 
746
Call Determine_On_Submit_Validation()
-
 
747
 
-
 
748
'--------------------------------------------------------------------------------------------
590
'--------------------------------------------------------------------------------------------
749
%>
591
%>
750
<html>
592
<html>
751
<head>
593
<head>
752
<title>Release Manager</title>
594
<title>Release Manager</title>
Line 759... Line 601...
759
<!-- TIPS -->
601
<!-- TIPS -->
760
<script language="JavaScript" src="images/tipster.js"></script>
602
<script language="JavaScript" src="images/tipster.js"></script>
761
<script language="JavaScript" src="images/_help_tips.js"></script>
603
<script language="JavaScript" src="images/_help_tips.js"></script>
762
<script language="JavaScript" type="text/javascript">
604
<script language="JavaScript" type="text/javascript">
763
<!--
605
<!--
-
 
606
//  Validate tags on window load
-
 
607
window.onload = function(e)
-
 
608
{
-
 
609
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) AND criticalSectionIsEditable Then%>
-
 
610
    validateSvnPath();
-
 
611
    validateSvnTag();
-
 
612
<%End If%>
-
 
613
 
-
 
614
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) AND criticalSectionIsEditable Then%>
-
 
615
    validateCCPath();
-
 
616
    validateCCLabel();
-
 
617
<%End If%>
-
 
618
 
-
 
619
    validateDesc();
-
 
620
    validateOverview();
-
 
621
}
764
 
622
 
765
// This function is the onchange event handler for the Version Control System drop down list box.
623
// This function is the onchange event handler for the Version Control System drop down list box.
766
// It will re-format the web page URL to pass the vcs_tag paramter reflecting the users choice in the drop down list,
624
// It will re-format the web page URL to pass the vcs_tag paramter reflecting the users choice in the drop down list,
767
// and submit the form using the updated URL.
625
// and submit the form using the updated URL.
768
function vcs_changed() {
626
function vcs_changed() {
Line 781... Line 639...
781
         if (tc == null) {
639
         if (tc == null) {
782
            alert('Javascript Error : Failed to get vcs_tag_combo');
640
            alert('Javascript Error : Failed to get vcs_tag_combo');
783
         }
641
         }
784
         else {
642
         else {
785
            // Form the new URL with the updated VCS tag passed as a parameter
643
            // Form the new URL with the updated VCS tag passed as a parameter
786
            var tc2 = document.getElementById('vcs_name_combo');
-
 
787
            if (tc2.options[nc.selectedIndex].value == 'Concurrent Versions System')
-
 
788
            {
-
 
789
               alert('The Concurrent Versions System (CVS) is not fully supported by ERG.\n' +
-
 
790
                     'This means you will have to manually build this package.\n' +
-
 
791
                     'Please ensure you assign the version number manually, if that is not already so.\n');
-
 
792
            }
-
 
793
            <%If IsNull(parBSName) OR parBSName = "" Then%>
644
            <%If IsNull(parBSName) OR parBSName = "" Then%>
794
               f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
645
               f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
795
            <%Else%>
646
            <%Else%>
796
               f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&bs_name=<%=parBSName%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
647
               f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&bs_name=<%=parBSName%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
797
            <%End If%>
648
            <%End If%>
Line 825... Line 676...
825
 
676
 
826
         f.submit();
677
         f.submit();
827
      }
678
      }
828
   }
679
   }
829
}
680
}
-
 
681
//
-
 
682
//  Update the Build Enviroment Display
-
 
683
//  Generic is not allowed to be checked if any of the others are checked
-
 
684
//  If Generic is ticked - then untick all others and hide associated combobox
-
 
685
//  If Generic is not ticked - the untick Generic and hide associated combobox
-
 
686
function UpdateBeDisplay(me, targetId)
-
 
687
{
-
 
688
    // Toggle related target id
-
 
689
    ToggleDisplay(targetId);
-
 
690
 
-
 
691
    if (me.checked) {
-
 
692
        // Handle Generic changes
-
 
693
        isGeneric = me.getAttribute("data-generic");
-
 
694
        items = document.getElementsByName("be_id_list");
-
 
695
        if (isGeneric){
-
 
696
            // Generic item has been checked
-
 
697
            for(idx = 0;idx < items.length; idx++){
-
 
698
                item = items[idx];
-
 
699
                if ( item != me ) {
-
 
700
                    item.checked = false;
-
 
701
                    target = item.getAttribute("data-target-id");
-
 
702
                    el = document.getElementById(target);
-
 
703
                    el.style.display = 'none';  
-
 
704
                }
-
 
705
            }
-
 
706
        } else {
-
 
707
            for(idx = 0;idx < items.length; idx++){
-
 
708
                item = items[idx];
-
 
709
                itemGeneric = item.getAttribute("data-generic");
-
 
710
                if(itemGeneric) {
-
 
711
                    item.checked = false;
-
 
712
                    target = item.getAttribute("data-target-id");
-
 
713
                    el = document.getElementById(target);
-
 
714
                    el.style.display = 'none';   
-
 
715
                }
-
 
716
            }
-
 
717
        }
-
 
718
    }
-
 
719
}
-
 
720
 
-
 
721
var bPathOk = true;
-
 
722
var bLabelOk = true;
-
 
723
var bDescOk = true;
-
 
724
var bOverview = true;
-
 
725
 
-
 
726
function validateDesc()
-
 
727
{
-
 
728
    document.MM_returnValue = true;
-
 
729
    document.MM_error = "";
-
 
730
 
-
 
731
    e = MM_findObj('pv_description');
-
 
732
    if ( e.value.length )
-
 
733
        MM_validateForm('--Silent','--NoPrefix','pv_description','Package Description','minLength:10');
-
 
734
 
-
 
735
    bDescOk = document.MM_returnValue;
-
 
736
    setIdText('descErr',document.MM_error);
-
 
737
    parent.resizeIframe(); 
-
 
738
}
-
 
739
 
-
 
740
function validateOverview()
-
 
741
{
-
 
742
    document.MM_returnValue = true;
-
 
743
    document.MM_error = "";
-
 
744
 
-
 
745
    e = MM_findObj('pv_overview');
-
 
746
    if ( e.value.length )
-
 
747
        MM_validateForm('--Silent','--NoPrefix','pv_overview','Package Overview','minLength:20');
-
 
748
 
-
 
749
    bOverview = document.MM_returnValue;
-
 
750
    setIdText('viewErr',document.MM_error);
-
 
751
    parent.resizeIframe(); 
-
 
752
}
-
 
753
 
-
 
754
//  Validate the SVN Path
-
 
755
//
-
 
756
function validateSvnPath()
-
 
757
{
-
 
758
    document.MM_returnValue = true;
-
 
759
    document.MM_error = "";
-
 
760
 
-
 
761
    e = MM_findObj('FRpath');
-
 
762
    if ( e.value.length )
-
 
763
        MM_validateForm('--Silent','--NoPrefix','FRpath','Source Path','RisSVNPath');
-
 
764
 
-
 
765
    bPathOk = document.MM_returnValue;
-
 
766
    setIdText('svnPathErr',document.MM_error);
-
 
767
    parent.resizeIframe(); 
-
 
768
}
-
 
769
 
-
 
770
//  Validate the SVN Tag
-
 
771
//
-
 
772
function validateSvnTag()
-
 
773
{
-
 
774
    document.MM_returnValue = true;
-
 
775
    document.MM_error = "";
-
 
776
 
-
 
777
    e = MM_findObj('FRlabel');
-
 
778
    if ( e.value.length )
-
 
779
        MM_validateForm('--Silent','--NoPrefix','FRlabel','Subversion Tag','RisSVNTag');
-
 
780
 
-
 
781
    bLabelOk = document.MM_returnValue;
-
 
782
    setIdText('svnTagErr',document.MM_error);
-
 
783
<%If (objFormCollector.Item("build_type") = "M" ) Then%>
-
 
784
    if(bLabelOk){
-
 
785
        MM_validateForm('--Silent','FRlabel','Subversion Tag','RisSVNPegTag');
-
 
786
        bLabelOk = document.MM_returnValue;
-
 
787
        setIdText('svnTagErr',document.MM_error);
-
 
788
    }
-
 
789
<%End If%>
-
 
790
    parent.resizeIframe(); 
-
 
791
}
-
 
792
 
-
 
793
//  Validate the CC Path
-
 
794
//
-
 
795
function validateCCPath()
-
 
796
{
-
 
797
    document.MM_returnValue = true;
-
 
798
    document.MM_error = "";
-
 
799
 
-
 
800
    e = MM_findObj('FRpath');
-
 
801
    if ( e.value.length)
-
 
802
        MM_validateForm('--Silent','--NoPrefix','FRpath','Source Path','RisCCPath');
-
 
803
    bPathOk = document.MM_returnValue;
-
 
804
    setIdText('ccPathErr',document.MM_error);
-
 
805
    parent.resizeIframe(); 
-
 
806
}
-
 
807
 
-
 
808
//  Validate the CC Label
-
 
809
//
-
 
810
function validateCCLabel()
-
 
811
{
-
 
812
    document.MM_returnValue = true;
-
 
813
    document.MM_error = "";
-
 
814
 
-
 
815
    e = MM_findObj('FRlabel');
-
 
816
    if ( e.value.length)
-
 
817
        MM_validateForm('--Silent','--NoPrefix','FRlabel','Label','RisCCLabel');
-
 
818
 
-
 
819
    bLabelOk = document.MM_returnValue;
-
 
820
    setIdText('ccLabelErr',document.MM_error);
-
 
821
    parent.resizeIframe();
-
 
822
}
-
 
823
 
-
 
824
//  Show/Hide error message in specified element
-
 
825
function setIdText(id, text) {
-
 
826
    var element = document.getElementById(id);
-
 
827
    if ( element ) {
-
 
828
    while (element.firstChild!==null)
-
 
829
        element.removeChild(element.firstChild); // remove all existing content
-
 
830
        if(text){
-
 
831
            element.appendChild(document.createTextNode(text));
-
 
832
            element.style.display = 'block';
-
 
833
        }
-
 
834
        else {
-
 
835
            element.style.display = 'none';
-
 
836
        }
-
 
837
    }
-
 
838
    updateSubmit(); 
-
 
839
}
-
 
840
 
-
 
841
// Enable/disable the submit button
-
 
842
// Based on the state of bPathOk and bLabelOk
-
 
843
function updateSubmit(){
-
 
844
    var element = document.getElementById('btn_submit');
-
 
845
    if ( element ) {
-
 
846
        element.disabled = !(bPathOk && bLabelOk && bOverview && bDescOk);
-
 
847
        if (element.disabled) {
-
 
848
            removeClass(element, 'form_btn_comp');
-
 
849
            addClass(element, 'form_btn_comp_disabled');
-
 
850
        } else {
-
 
851
            removeClass(element, 'form_btn_comp_disabled') ;
-
 
852
            addClass(element, 'form_btn_comp');
-
 
853
        }
-
 
854
    }
-
 
855
}
-
 
856
 
830
 
857
 
831
// This function will replace back slashes with forward slashes and can be used with an onchange event on fields
858
// This function will replace back slashes with forward slashes and can be used with an onchange event on fields
832
// where back slashes may be entered
859
// where back slashes may be entered
833
function replace_back_slashes(e) {
860
function replace_back_slashes(e) {
834
   strip_whitespace(e);
861
   strip_whitespace(e);
Line 847... Line 874...
847
</head>
874
</head>
848
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
875
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
849
<!-- TIPS LAYERS -------------------------------------->
876
<!-- TIPS LAYERS -------------------------------------->
850
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
877
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
851
<!----------------------------------------------------->
878
<!----------------------------------------------------->
852
<form id="pkginfo" name="pkginfo" method="post" <%=on_submit_validation%> action="<%=submit_action_url%>" class="form_tight">
879
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
853
   <table border="0" cellspacing="0" cellpadding="2">
880
   <table border="0" cellspacing="0" cellpadding="2">
854
      <tr>
881
      <tr>
855
         <td valign="top" nowrap class="wform_ttl" background="images/bg_form_lightgray.gif">
882
         <td valign="top" nowrap class="wform_ttl" background="images/bg_form_lightgray.gif">
856
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
883
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
857
               <tr>
884
               <tr>
Line 885... Line 912...
885
               </tr>
912
               </tr>
886
               <tr>
913
               <tr>
887
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Version Control System</td>
914
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Version Control System</td>
888
                  <td nowrap background="images/bg_form_lightbluedark.gif">
915
                  <td nowrap background="images/bg_form_lightbluedark.gif">
889
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
916
                     <% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
-
 
917
                     <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
-
 
918
                        <span class='err_alert'>[Not fully Supported]</span>
-
 
919
                     <%End If%>
890
                  </td>
920
                  </td>
891
               </tr>
921
               </tr>
892
 
922
 
893
               <!--- Source Path ---------------------------------------------->
923
               <!--- Source Path ---------------------------------------------->
894
               <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then%>
924
               <%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then%>
895
 
925
 
896
                  <tr>
926
                  <tr>
897
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
927
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "src_path" )%></td>
898
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
928
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
899
                        <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">
929
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateCCPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
900
                        <br>&nbsp;Example: /MASS_Dev_Infra/core_cs <br>
930
                        <br>&nbsp;Example: /MASS_Dev_Infra/core_cs <br>
-
 
931
                        <span class='val_err' id=ccPathErr style='display:none'></span>
901
                     </td>
932
                     </td>
902
                  </tr>
933
                  </tr>
903
               
934
               
904
                  <tr>
935
                  <tr>
905
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
936
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
Line 936... Line 967...
936
                              End If
967
                              End If
937
                              objForm.SetValue "FRlabel", sLabel
968
                              objForm.SetValue "FRlabel", sLabel
938
                           End If
969
                           End If
939
                        End If
970
                        End If
940
                        %>
971
                        %>
941
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=sLabel%>" <%=sLabelReadOnly%>>
972
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateCCLabel();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
942
                        <br>&nbsp;Example: core_cs_1.0.0000.cr<br>
973
                        <br>&nbsp;Example: core_cs_1.0.0000.cr<br>
943
                        <%=objForm.Validate ("FRlabel")%>
974
                        <span class='val_err' id=ccLabelErr style='display:none'></span>
944
                     </td>
975
                     </td>
945
                  </tr>
976
                  </tr>
946
 
977
 
947
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then%>
978
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then%>
948
                  <tr>
979
                  <tr>
949
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "svn_source_path" )%></td>
980
                     <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Source Path<%=Quick_Help ( "svn_source_path" )%></td>
950
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
981
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
951
                        <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">
982
                        <input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateSvnPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
952
                        <br>&nbsp;Example: AUPERASVN01/RepoName/myPackage/trunk<br>
983
                        <br>&nbsp;Example: AUPERASVN01/RepoName/myPackage/trunk<br>
-
 
984
                        <span class='val_err' id=svnPathErr style='display:none'></span>
953
                     </td>
985
                     </td>
954
                  </tr>
986
                  </tr>
955
                  <tr>
987
                  <tr>
956
                     <td nowrap valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Tag<%=Quick_Help ( "svn_tag" )%></td>
988
                     <td nowrap valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Tag<%=Quick_Help ( "svn_tag" )%></td>
957
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
989
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
Line 988... Line 1020...
988
                              objForm.SetValue "FRlabel", sLabel
1020
                              objForm.SetValue "FRlabel", sLabel
989
                           End If
1021
                           End If
990
                        End If
1022
                        End If
991
                        %>
1023
                        %>
992
 
1024
 
993
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=sLabel%>" <%=sLabelReadOnly%>>
1025
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateSvnTag();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
994
                        <%
1026
                        <%
995
                        If objFormCollector.Item("build_type") = "M" Then
1027
                        If objFormCollector.Item("build_type") = "M" Then
996
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>@1234<br> <%
1028
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>@1234<br> <%
997
                        Else
1029
                        Else
998
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>[@1234]<br> <%
1030
                            %> <br>&nbsp;Example: <%=sDefaultLabel%>[@1234]<br> <%
999
                        End If
1031
                        End If
1000
                        %>
1032
                        %>
1001
                        <%=objForm.Validate ("FRlabel")%>
1033
                        <span class='val_err' id=svnTagErr style='display:none'></span>
1002
                     </td>
1034
                     </td>
1003
                  </tr>
1035
                  </tr>
1004
 
1036
 
1005
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1037
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
1006
                  <tr>
1038
                  <tr>
Line 1014... Line 1046...
1014
                  <tr>
1046
                  <tr>
1015
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
1047
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Label<%=Quick_Help ( "pkg_label" )%></td>
1016
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1048
                     <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1017
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=objForm.GetValue( "FRlabel", objFormCollector.Item("pkg_label") )%>" >
1049
                        <input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=objForm.GetValue( "FRlabel", objFormCollector.Item("pkg_label") )%>" >
1018
                     </td>
1050
                     </td>
1019
                     <%=objForm.Validate ("FRlabel")%>
-
 
1020
                  </tr>
1051
                  </tr>
1021
 
1052
 
1022
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then%>
1053
               <%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then%>
1023
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
1054
                  <input name="FRpath"  type="hidden" id="FRpath"  value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
1024
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
1055
                  <input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
Line 1033... Line 1064...
1033
               <%End If%>
1064
               <%End If%>
1034
 
1065
 
1035
               <tr>
1066
               <tr>
1036
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Short Package Description<%=Quick_Help ( "pkg_info_short_desc" )%></td>
1067
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Short Package Description<%=Quick_Help ( "pkg_info_short_desc" )%></td>
1037
                  <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1068
                  <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1038
                     <textarea name="pv_description" cols="57" rows="5" class="form_item" id="pv_description" onchange="strip_whitespace(this);"><%=objForm.GetValue( "pv_description", objFormCollector.Item("pv_description") )%></textarea>
1069
                     <textarea name="pv_description" cols="57" rows="5" class="form_item" id="pv_description" onchange="strip_whitespace(this);validateDesc()"><%=objForm.GetValue( "pv_description", objFormCollector.Item("pv_description") )%></textarea>
1039
                  <%=objForm.Validate ("pv_description")%>
1070
                     <span class='val_err' id=descErr style='display:none'></span>
1040
                  </td>
1071
                  </td>
1041
               </tr>
1072
               </tr>
1042
               <tr>
1073
               <tr>
1043
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Package Overview<%=Quick_Help ( "pkg_info_overview" )%></td>
1074
                  <td valign="top" background="images/bg_form_lightbluedark.gif" class="form_field">Package Overview<%=Quick_Help ( "pkg_info_overview" )%></td>
1044
                  <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1075
                  <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
1045
                     <textarea name="pv_overview" cols="57" rows="10" class="form_item" id="pv_overview" onchange="strip_whitespace(this);"><%=objForm.GetValue( "pv_overview", objFormCollector.Item("pv_overview") )%></textarea>
1076
                     <textarea name="pv_overview" cols="57" rows="10" class="form_item" id="pv_overview" onchange="strip_whitespace(this);validateOverview();"><%=objForm.GetValue( "pv_overview", objFormCollector.Item("pv_overview") )%></textarea>
1046
                  <%=objForm.Validate ("pv_overview")%>
1077
                     <span class='val_err' id=viewErr style='display:none'></span>
1047
                  </td>
1078
                  </td>
1048
               </tr>
1079
               </tr>
1049
 
1080
 
1050
               <tr>
1081
               <tr>
1051
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Build Standard</td>
1082
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Build Standard</td>
Line 1068... Line 1099...
1068
                                 <table width="100%" border="0" cellspacing="0" cellpadding="3">
1099
                                 <table width="100%" border="0" cellspacing="0" cellpadding="3">
1069
                                    <%
1100
                                    <%
1070
                                    OraDatabase.Parameters.Add "PV_ID",    parPv_id,   ORAPARM_INPUT, ORATYPE_NUMBER
1101
                                    OraDatabase.Parameters.Add "PV_ID",    parPv_id,   ORAPARM_INPUT, ORATYPE_NUMBER
1071
 
1102
 
1072
                                    query = _
1103
                                    query = _
1073
                                    " SELECT DECODE ( pkgbinfo.BM_ID,"&_
1104
                                    " SELECT DECODE ( pkgbinfo.BM_ID, bm.BM_ID, 'checked', NULL ) AS checked,"&_
1074
                                    "                    bm.BM_ID, 'checked',"&_
-
 
1075
                                    "            NULL ) AS checked,"&_
-
 
1076
                                    "      bm.BM_ID,"&_
1105
                                    "      bm.BM_ID,"&_
1077
                                    "      bm.BM_NAME, "&_
1106
                                    "      bm.BM_NAME, "&_
1078
                                    "      pkgbinfo.BSA_ID"&_
1107
                                    "      pkgbinfo.BSA_ID, "&_
-
 
1108
                                    "      DECODE (UPPER(bm.BM_NAME) , UPPER('Generic'), 1, NULL ) AS isGeneric" &_
1079
                                    "  FROM BUILD_MACHINES bm,"&_
1109
                                    "  FROM BUILD_MACHINES bm,"&_
1080
                                    "        PACKAGE_BUILD_INFO pkgbinfo"&_
1110
                                    "        PACKAGE_BUILD_INFO pkgbinfo"&_
1081
                                    " WHERE pkgbinfo.BM_ID (+)= bm.BM_ID"&_
1111
                                    " WHERE pkgbinfo.BM_ID (+)= bm.BM_ID"&_
1082
                                    "   AND pkgbinfo.PV_ID (+)= :PV_ID"&_
1112
                                    "   AND pkgbinfo.PV_ID (+)= :PV_ID"&_
1083
                                    " ORDER BY UPPER(bm.bm_name) "
1113
                                    " ORDER BY UPPER(bm.bm_name) "
1084
 
1114
 
1085
 
-
 
1086
                                    Set rsQry = OraDatabase.DbCreateDynaset( query, cint(0))
1115
                                    Set rsQry = OraDatabase.DbCreateDynaset( query, cint(0))
1087
                                    Dim rowColor
1116
                                    Dim rowColor
1088
 
1117
 
1089
                                    rowColor = "#F5F5F5"
1118
                                    rowColor = "#F5F5F5"
1090
 
1119
 
Line 1096... Line 1125...
1096
                                       End If
1125
                                       End If
1097
 
1126
 
1098
                                       rowColor = GetRowColor( rowColor )
1127
                                       rowColor = GetRowColor( rowColor )
1099
                                       %>
1128
                                       %>
1100
                                       <tr>
1129
                                       <tr>
1101
                                          <td width='1%' nowrap class="form_txt" bgcolor="<%=rowColor%>"><input type="checkbox" name="be_id_list" onClick="ToggleDisplay('build_type_<%=rsQry("bm_id")%>');" <%=disableCriticalSectionEdit%> value="<%=rsQry("bm_id")%>" <%=checked%>></td>
1130
                                          <td width='1%' nowrap class="form_txt" bgcolor="<%=rowColor%>">
-
 
1131
                                            <input type="checkbox" 
-
 
1132
                                                   name="be_id_list" 
-
 
1133
                                                   onClick="UpdateBeDisplay(this, 'build_type_<%=rsQry("bm_id")%>');" 
-
 
1134
                                                   <%=disableCriticalSectionEdit%>
-
 
1135
                                                   <%=IIf(rsQry("ISGENERIC"), "data-generic='1'","")%> 
-
 
1136
                                                   data-target-id='build_type_<%=rsQry("bm_id")%>'
-
 
1137
                                                   value="<%=rsQry("bm_id")%>" <%=checked%>>
-
 
1138
                                          </td>
1102
                                          <td width='1%' nowrap class="form_txt" bgcolor="<%=rowColor%>"><%=rsQry("bm_name")%></td>
1139
                                          <td width='1%' nowrap class="form_txt" bgcolor="<%=rowColor%>"><%=rsQry("bm_name")%></td>
1103
                                          <td width='98%' nowrap class="form_txt" bgcolor="<%=rowColor%>">
1140
                                          <td width='98%' nowrap class="form_txt" bgcolor="<%=rowColor%>">
1104
                                                <div id="build_type_<%=rsQry("bm_id")%>" <%=ShowHideBuildType( checked )%>>
1141
                                                <div id="build_type_<%=rsQry("bm_id")%>" <%=ShowHideBuildType( checked )%>>
1105
                                                    <% Call RenderBuildTypeCombo( rsQry("bsa_id"), rsQry("bm_id"), objFormCollector.Item("bs_id") )%>
1142
                                                    <% Call RenderBuildTypeCombo( rsQry("bsa_id"), rsQry("bm_id"), objFormCollector.Item("bs_id") )%>
1106
                                                </div>
1143
                                                </div>
Line 1123... Line 1160...
1123
                              </td>
1160
                              </td>
1124
                           </tr>
1161
                           </tr>
1125
                        </table>
1162
                        </table>
1126
                     </div>
1163
                     </div>
1127
                  </td>
1164
                  </td>
1128
                  <%=objForm.Validate("be_id_list")%>
-
 
1129
               </tr>
1165
               </tr>
1130
            </table>
1166
            </table>
1131
         </td>
1167
         </td>
1132
      </tr>
1168
      </tr>
1133
      <tr>
1169
      <tr>
1134
		 <td align="right" >
1170
		 <td align="right" >
1135
			<input type="submit" name="btn" value="Submit" <%If pageIsEditable Then%>class="form_btn_comp"<%Else%>disabled class="form_btn_comp_disabled"<%End If%>>
1171
			<input id="btn_submit" type="submit" name="btn" value="Submit" <%If pageIsEditable Then%>class="form_btn_comp"<%Else%>disabled class="form_btn_comp_disabled"<%End If%>>
1136
			<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
1172
			<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
1137
		 </td>
1173
		 </td>
1138
      </tr>
1174
      </tr>
1139
   </table>
1175
   </table>
1140
   <input type="hidden" name="pv_id"   id="pv_id"   value="<%=parPv_id%>">
1176
   <input type="hidden" name="pv_id"   id="pv_id"   value="<%=parPv_id%>">
1141
   <input type="hidden" name="rtag_id" id="rtag_id" value="<%=parRtag_id%>">
1177
   <input type="hidden" name="rtag_id" id="rtag_id" value="<%=parRtag_id%>">
1142
   <input type="hidden" name="vcs_tag" id="vcs_tag" value="<%=parVCSTag%>">
1178
   <input type="hidden" name="vcs_tag" id="vcs_tag" value="<%=parVCSTag%>">
1143
   <input type="hidden" name="bs_name" id="bs_name" value="<%=parBSName%>">
1179
   <input type="hidden" name="bs_name" id="bs_name" value="<%=parBSName%>">
-
 
1180
   <%objForm.AddPostBack()%>
1144
</form>
1181
</form>
1145
</body>
1182
</body>
1146
</html>
1183
</html>
1147
<%
1184
<%
1148
'------------- RUN AFTER PAGE RENDER ---------------
1185
'------------- RUN AFTER PAGE RENDER ---------------