From: <m_h...@us...> - 2006-08-10 23:36:01
|
Revision: 306 Author: m_hildebrand Date: 2006-08-10 16:35:49 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=306&view=rev Log Message: ----------- Continued work on administration page beautification Modified Paths: -------------- Website/App_Themes/Python/Images/product_add_48.png Website/App_Themes/Python/Images/product_delete_48.png Website/App_Themes/Python/Images/role_add_48.png Website/App_Themes/Python/Images/role_delete_48.png Website/App_Themes/Python/Images/user_add_48.png Website/App_Themes/Python/Images/user_delete_48.png Website/App_Themes/Python/python.css Website/App_Themes/Python/style-ie.style Website/Includes/Administration.ascx Website/Includes/Administration.ascx.cs Modified: Website/App_Themes/Python/Images/product_add_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/Images/product_delete_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/Images/role_add_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/Images/role_delete_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/Images/user_add_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/Images/user_delete_48.png =================================================================== (Binary files differ) Modified: Website/App_Themes/Python/python.css =================================================================== --- Website/App_Themes/Python/python.css 2006-08-10 21:11:42 UTC (rev 305) +++ Website/App_Themes/Python/python.css 2006-08-10 23:35:49 UTC (rev 306) @@ -1,17 +1,17 @@ /********** BEGIN Global Classes **********/ HTML { - /*height: 100%;*/ + /*height: 100%;*/ } BODY { - /*height: 100%;*/ - margin: 0; - padding: 0; - font-family: Verdana, Sans-Serif; - font-size: 8pt; - position: relative; + /*height: 100%;*/ + margin: 0; + padding: 0; + font-family: Verdana, Sans-Serif; + font-size: 8pt; + position: relative; } A:hover, A:active, A:link, A:visited @@ -21,132 +21,132 @@ .hidden { - display: none; - left: 0px; - visibility: hidden; - position: absolute; - top: 0px; + display: none; + left: 0px; + visibility: hidden; + position: absolute; + top: 0px; } .error { - padding: 0 10px 0 10px; - color: blue; + padding: 0 10px 0 10px; + color: blue; } LABEL { - font-weight: bold; - margin-right: 5px; + font-weight: bold; + margin-right: 5px; } .hr { - border-bottom: red 1px solid; - margin: 5px; + border-bottom: red 1px solid; + margin: 5px; } .item { - display: block; + display: block; } .left { - float: left; - display: inline; + float: left; + display: inline; } .right { - float: right; - position: relative; - right: 0px; - display: inline; + float: right; + position: relative; + right: 0px; + display: inline; } .end { - clear: both; + clear: both; } .bottom { - position: absolute; - bottom: 0; - left: 0; + position: absolute; + bottom: 0; + left: 0; } .hover:hover, TR.overdue:hover, TR.finished:hover { - background-color: #eee; + background-color: #eee; } .overdue { - color: Red; + color: Red; } .finished { - color: Gray; + color: Gray; } .deleted { - color: black; - font-style: italic; - text-decoration: line-through; - font-family: 'Arial Narrow'; + color: black; + font-style: italic; + text-decoration: line-through; + font-family: 'Arial Narrow'; } -INPUT:focus +INPUT:focus { outline: solid 1px blue; } .item .checkbox INPUT { - margin: 0; - padding: 0; - position: relative; - left: -5px; - top: 1px; + margin: 0; + padding: 0; + position: relative; + left: -5px; + top: 1px; } .item UL { - margin: 0; - padding-left: 20px; - list-style-type: none; + margin: 0; + padding-left: 20px; + list-style-type: none; } .item UL UL { - padding-left: 20px; - margin: 0; - list-style-type: circle; + padding-left: 20px; + margin: 0; + list-style-type: circle; } .motd { - margin: 10px 0 0 10px; - text-align: center; + margin: 10px 0 0 10px; + text-align: center; } .motd SPAN { - color: Red; - background-color: Yellow; - border: red; - padding: 3px 4px 3px 4px; - border: solid 1px red; + color: Red; + background-color: Yellow; + border: red; + padding: 3px 4px 3px 4px; + border: solid 1px red; } .indent { margin-left: 5em; - text-indent: -5em + text-indent: -5em; } .clean @@ -161,23 +161,23 @@ /********** BEGIN Calendar Classes **********/ .calendar { - display: inline; - margin: 5px 0 5px 0; + display: inline; + margin: 5px 0 5px 0; } .calendar LABEL { - font-weight: normal; + font-weight: normal; } .calendar IMG { - position: relative !important; - top: 6px !important; - padding-left: 5px !important; - margin: 0 0 3px 0 !important; - height: 20px !important; - width: 20px !important; + position: relative !important; + top: 6px !important; + padding-left: 5px !important; + margin: 0 0 3px 0 !important; + height: 20px !important; + width: 20px !important; } /********** END Calendar Classes ************/ @@ -185,74 +185,74 @@ /********** BEGIN Header Content **********/ #HeaderContent { - background-image: url(images/Header-Background.gif); - background-repeat: repeat-x; - height: 69px; - position: relative; + background-image: url(images/Header-Background.gif); + background-repeat: repeat-x; + height: 69px; + position: relative; } #HeaderContent A { - color: White; + color: White; } #HeaderContent A:hover, #HeaderContent A:active, .username { - color: #FDB928; + color: #FDB928; } .username { - display: inline; + display: inline; } #Logo { - background-position: left top; - left: 0px; - background-image: url(Images/TCDB-2006-Logo-on-Blue.gif); - width: 200px; - height: 50px; - background-repeat: no-repeat; - position: absolute; - top: 3px; - left: 5px; + background-position: left top; + left: 0px; + background-image: url(Images/TCDB-2006-Logo-on-Blue.gif); + width: 200px; + height: 50px; + background-repeat: no-repeat; + position: absolute; + top: 3px; + left: 5px; } #MainMenu { - text-align: right; - top: 0px; - padding: 9px 10px 2px 0px; - color: White; - float: right; + text-align: right; + top: 0px; + padding: 9px 10px 2px 0px; + color: White; + float: right; } #HeaderContent .hr { - margin: 7px 0 4px 0; + margin: 7px 0 4px 0; } #CurrentInfo, #Menu { - display: inline; + display: inline; } #CurrentInfo { - padding-right: 30px; + padding-right: 30px; } /********** END Header Content **********/ /********** BEGIN Footer Content **********/ #FooterContent A { - color: White; + color: White; } #FooterContent A:hover, #FooterContent A:active { - color: #FDB928; + color: #FDB928; } #NonFooter @@ -264,13 +264,11 @@ #FooterContent { - background-color: #022e66; - color: white; - padding: 6px 0 6px 0; - vertical-align: middle; - text-align: center; - /*position: relative;*/ - /*margin: -2.35em auto 0 auto;*/ + background-color: #022e66; + color: white; + padding: 6px 0 6px 0; + vertical-align: middle; + text-align: center; /*position: relative;*/ /*margin: -2.35em auto 0 auto;*/ } /********** END Footer Content **********/ @@ -278,70 +276,70 @@ /********** BEGIN Form Content **********/ .form { - padding: 5px 0px 0px 20px; + padding: 5px 0px 0px 20px; } .form .results { - padding: 10px 0 10px 70px; - color: Red; + padding: 10px 0 10px 70px; + color: Red; } .form LABEL, .form A, .form INPUT, .form SELECT { - display: block; - float: left; - margin-bottom: 5px; + display: block; + float: left; + margin-bottom: 5px; } .form LABEL, .form A { - text-align: right; - width: 110px; - padding-right: 5px; + text-align: right; + width: 110px; + padding-right: 5px; } .form INPUT { - width: 150px; + width: 150px; } .form INPUT, .form SELECT { - position: relative; - top: -4px; - text-align: left; + position: relative; + top: -4px; + text-align: left; } .form .checkbox > INPUT { - width: inherit; - display: inline; - position: relative; - top: -3px; - left: -3px; + width: inherit; + display: inline; + position: relative; + top: -3px; + left: -3px; } .form BR { - clear: left; + clear: left; } /*********** END Form Content ***********/ /********** BEGIN User Settings **************/ #fullname input { - width: 75px; + width: 75px; } #fullname input + input { - width: 100px; + width: 100px; } #email input { - width: 200px; + width: 200px; } /********** END User Settings *************/ @@ -350,74 +348,74 @@ /* Snazzy borders by Stu Nicholls (http://www.cssplay.co.uk/boxes/snazzy.html) */ .xsnazzy { - background: transparent; - margin: .5em 1em; + background: transparent; + margin: .5em 1em; } .xtop, .xbottom { - display: block; - background: transparent; - font-size: 1px; + display: block; + background: transparent; + font-size: 1px; } .xb1, .xb2, .xb3, .xb4 { - display: block; - overflow: hidden; + display: block; + overflow: hidden; } .xb1, .xb2, .xb3 { - height: 1px; + height: 1px; } .xb2, .xb3, .xb4 { - background: #d4d4d4; - border-left: 1px solid #08c; - border-right: 1px solid #08c; + background: #d4d4d4; + border-left: 1px solid #08c; + border-right: 1px solid #08c; } .xb1 { - margin: 0 5px; - background: #08c; + margin: 0 5px; + background: #08c; } .xb2 { - margin: 0 3px; - border-width: 0 2px; + margin: 0 3px; + border-width: 0 2px; } .xb3 { - margin: 0 2px; + margin: 0 2px; } .xb4 { - height: 2px; - margin: 0 1px; + height: 2px; + margin: 0 1px; } .xboxcontent { - display: block; - background: #d4d4d4; - border: 0 solid #08c; - border-width: 0 1px; - padding: 0px 5px 0px 5px; + display: block; + background: #d4d4d4; + border: 0 solid #08c; + border-width: 0 1px; + padding: 0px 5px 0px 5px; } /********** END Box Content **********/ /********** BEGIN Notes Box Content **********/ .note .xsnazzy { - width: 200px; + width: 200px; } .note .xb2, .note .xb3, .note .xb4 { - background: #ff9; + background: #ff9; } .note .xboxcontent { - background: #ff9; - text-align: left; + background: #ff9; + text-align: left; } /********** END Notes Box Content **********/ @@ -431,8 +429,7 @@ { display: block; margin: 15px; - float: left; - clear: left; + float: left; /*clear: left;*/ } .pictureMenu @@ -444,160 +441,183 @@ .button { - float: left; - position: relative; - z-index: 50; - margin: 5px 0 5px -20px; + float: left; + display: inline; + position: relative; + z-index: 50; + margin: 5px 5px 0px 5px; + text-indent: 0; + min-height: 60px; + text-decoration: none; + font-weight: bold; } -.button A +.menu .left { - text-decoration: none; - font-weight: bold; + min-height: 60px; } .button IMG { - border: none; - position: relative; - left: 30px; - top: -3px; - z-index: -10; + border: none; /*display: block;*/ + position: absolute; /* left: 30px;*/ + top: -3px; } +.button LABEL +{ + position: relative; + top: 40px; /* left: -48px;*/ + margin-left: 0 !important; + z-index: 20; +} + .pictureMenu .xb2, .pictureMenu .xb3, .pictureMenu .xb4 { - background-color: Transparent; + background-color: Transparent; border-left-color: #022E66; - border-right-color: #022E66; + border-right-color: #022E66; } .pictureMenu .xb1 { - background-color: #022E66; + background-color: #022E66; } .pictureMenu .xboxcontent { - background-color: Transparent; - border-color: #022E66; + background-color: Transparent; + border-color: #022E66; } + +.vr +{ + border-left: solid 1px red; + height: 25px; + display: inline; +} + +.pulldown LABEL +{ + margin-left: 7px !important; +} + /********** END Picture Menu Content **********/ /********** BEGIN Page Content **********/ #TreeContent { - /* border: solid thin red; */ /*float: left; padding-right: 10px; */ /*position: absolute; width: 200px;*/ - padding-top: 0px; - margin-top: 0px; - vertical-align: top; + /* border: solid thin red; */ /*float: left; padding-right: 10px; */ /*position: absolute; width: 200px;*/ + padding-top: 0px; + margin-top: 0px; + vertical-align: top; } #MainContent { - /* border: solid thin green; */ /* float: left; margin-left: 175px; /*margin-right: 200px; display: inline;*/ - vertical-align: top; - width: 100%; + /* border: solid thin green; */ /* float: left; margin-left: 175px; /*margin-right: 200px; display: inline;*/ + vertical-align: top; + width: 100%; } #NotesContent { - /* border: solid thin blue; */ /*width: 200px; clear: right; padding-left: 10px; padding-top: 10px;*/ /*position: absolute; right: 10px; top: 50px; width: 200px; */ - vertical-align: top; + /* border: solid thin blue; */ /*width: 200px; clear: right; padding-left: 10px; padding-top: 10px;*/ /*position: absolute; right: 10px; top: 50px; width: 200px; */ + vertical-align: top; } /********** END Page Content **********/ /********** BEGIN Content Header ************/ .ch, #Filters { - padding-top: 15px; - display: block; + padding-top: 15px; + display: block; } .ch H2, #Filters H2 { - display: inline; - left: 0; - top: 0; - padding-left: 15px; - margin-bottom: 0; - padding-bottom: 0; + display: inline; + left: 0; + top: 0; + padding-left: 15px; + margin-bottom: 0; + padding-bottom: 0; } .ch .buttons { - display: inline; - padding-left: 10px; - padding-right: 50px; - margin-left: 10px; - margin-right: 50px; + display: inline; + padding-left: 10px; + padding-right: 50px; + margin-left: 10px; + margin-right: 50px; } .ch .quickFilter { - display: inline; - right: 0; - padding-right: 15px; - position: relative; + display: inline; + right: 0; + padding-right: 15px; + position: relative; } .ch .quickFilter INPUT { - position: relative; - top: 3px; + position: relative; + top: 3px; } /********* END Content Header ***********/ /********* BEGIN Content Content ***********/ .ct, .cb { - position: relative; + position: relative; } .ct .bottom { - bottom: 5px; + bottom: 5px; } .ct H2 { - display: block; - left: 0px; - margin: 0px; - padding: 0px; - font-size: 16px; + display: block; + left: 0px; + margin: 0px; + padding: 0px; + font-size: 16px; } /********* END Content Top ************/ /********** BEGIN Assignments Content **********/ TD.colAssignment { - text-align: left; + text-align: left; } TR.header { - text-align: left; + text-align: left; } /********** END Assignments Content *************/ /************ BEGIN Action Item Content ***************/ .ch .buttons { - display: inline; - right: 0px; + display: inline; + right: 0px; } .ch .status { - display: block; - float: left; /*right: 0px; */ - padding-right: 15px; /*position: relative; */ + display: block; + float: left; /*right: 0px; */ + padding-right: 15px; /*position: relative; */ } .ch .status INPUT { - position: relative; - top: 3px; + position: relative; + top: 3px; } /************** END Action Item Content ***************/ @@ -605,77 +625,77 @@ .filters { - max-width: 850px; + max-width: 850px; } .filters .xsnazzy { - float: left; - display: inline; + float: left; + display: inline; } .filters .xboxcontent .right INPUT { - position: relative; - top: -3px; + position: relative; + top: -3px; } .filters .hr { - margin-top: 2px; + margin-top: 2px; } /* Tweaks for specific filters */ #FilterType, #FilterPriority { - width: 125px; + width: 125px; } #FilterStatus { - width: 250px; + width: 250px; } #FilterAssignedDate, #FilterDueDate, #FilterFinishedDate { - width: 150px; + width: 150px; } /************** END Filters Content *************/ /************* BEGIN Priority Classes ************/ .priority_high_small, .priority_high_large, .priority_normal_small, .priority_normal_large { - display: inline; - padding: 0; - margin: 0; + display: inline; + padding: 0; + margin: 0; } .priority_high_small { - background-image: url(images/priority_high_small.png); - margin-left: 1px; - background-repeat: no-repeat; - width: 12px; - height: 11px; - min-width: 12px; - min-height: 11px; - display: block; + background-image: url(images/priority_high_small.png); + margin-left: 1px; + background-repeat: no-repeat; + width: 12px; + height: 11px; + min-width: 12px; + min-height: 11px; + display: block; } #aiContent .top .priority { - display: inline; - position: relative; - top: 2px; + display: inline; + position: relative; + top: 2px; } .priority_high_large { - background-image: url(images/priority_high_large.png); - background-repeat: no-repeat; - width: 18px; - height: 17px; - padding: 1px 9px 1px 9px; + background-image: url(images/priority_high_large.png); + background-repeat: no-repeat; + width: 18px; + height: 17px; + padding: 1px 9px 1px 9px; } /************ END Priority Classes *************/ Modified: Website/App_Themes/Python/style-ie.style =================================================================== --- Website/App_Themes/Python/style-ie.style 2006-08-10 21:11:42 UTC (rev 305) +++ Website/App_Themes/Python/style-ie.style 2006-08-10 23:35:49 UTC (rev 306) @@ -52,7 +52,7 @@ { font-size: 16px; } - +/* #Administration .menu { display: block; @@ -67,5 +67,5 @@ float: left; position: relative; z-index: 50; - margin: 5px 0 5px -10px; -} \ No newline at end of file + margin: 5px 5px 5px 5px; +}*/ \ No newline at end of file Modified: Website/Includes/Administration.ascx =================================================================== --- Website/Includes/Administration.ascx 2006-08-10 21:11:42 UTC (rev 305) +++ Website/Includes/Administration.ascx 2006-08-10 23:35:49 UTC (rev 306) @@ -1,8 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Administration.ascx.cs" Inherits="TCDB.Administration" %> -<!-- TODO: make these pull-downs dynamic --> <div id="Administration"> - <asp:Panel runat="server" ID="ProductAdmin" CssClass="menu"> + <asp:Panel runat="server" ID="ProductAdmin" CssClass="menu" OnInit="Product_Init"> <label> Product Administration</label> <div class="pictureMenu"> @@ -10,142 +9,134 @@ <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> </b></b> <div class="xboxcontent"> - <!--<asp:Panel runat="server" ID="ProductAdminTop" CssClass="clean">--> - <div class="button"> - <asp:LinkButton ID="newProduct" runat="server" OnInit="newProduct_Init" CommandName="new" - OnCommand="Product_Command"> - <asp:Image ID="newProductIcon" runat="server" SkinID="newProductImage" AlternateText="New Product" />New - Product</asp:LinkButton></div> - <div class="end"> - </div> - <!-- </asp:Panel> - <asp:Panel runat="server" ID="ProductAdminHR" CssClass="clean">--> - <div class="hr"> - </div> - <!-- </asp:Panel>--> - <asp:Panel runat="server" ID="ProductAdminBottom" CssClass="clean"> - <div class="pulldown"> - <label> - For:</label> - <asp:DropDownList runat="server" ID="productList" AutoPostBack="True" OnInit="productList_Init" - OnSelectedIndexChanged="productList_SelectedIndexChanged"> - </asp:DropDownList> - </div> - <div class="button"> - <asp:LinkButton ID="viewProduct" runat="server" CommandName="view" OnCommand="Product_Command"> - <asp:Image ID="viewProductIcon" runat="server" SkinID="viewProductImage" AlternateText="View Product" />View - Product</asp:LinkButton> - </div> - <div class="button"> - <asp:LinkButton ID="editProduct" runat="server" CommandName="edit" OnCommand="Product_Command"> - <asp:Image ID="editProductIcon" runat="server" SkinID="editProductImage" AlternateText="Edit Product" />Edit - Product</asp:LinkButton> - </div> - <div class="button"> - <asp:LinkButton ID="deleteProduct" runat="server" CommandName="delete" OnCommand="Product_Command"> - <asp:Image ID="deleteProductIcon" runat="server" SkinID="deleteProductImage" AlternateText="Delete Product" />Delete - Product</asp:LinkButton> - </div> - <div class="end"> - </div> - </asp:Panel> + <asp:LinkButton ID="newProduct" runat="server" CommandName="new" OnCommand="Product_Command" + CssClass="button"> + <asp:Image ID="newProductImage" runat="server" SkinID="newProductImage" AlternateText="New Product" /> + <label> + New Product</label></asp:LinkButton> + <div class="end"> + </div> + <asp:Panel runat="server" ID="ProductAdminHR" CssClass="hr" /> + <div class="pulldown"> + <label> + For:</label> + <asp:DropDownList runat="server" ID="productList" AutoPostBack="True" OnSelectedIndexChanged="productList_SelectedIndexChanged"> + </asp:DropDownList> + </div> + <asp:LinkButton ID="viewProduct" runat="server" CommandName="view" OnCommand="Product_Command" + CssClass="button"> + <asp:Image ID="viewProductImage" runat="server" SkinID="viewProductImage" AlternateText="View Product" /> + <label> + View Product</label></asp:LinkButton> + <asp:LinkButton ID="editProduct" runat="server" CommandName="edit" OnCommand="Product_Command" + CssClass="button"> + <asp:Image ID="editProductImage" runat="server" SkinID="editProductImage" AlternateText="Edit Product" /> + <label> + Edit Product</label></asp:LinkButton> + <asp:LinkButton ID="deleteProduct" runat="server" CommandName="delete" OnCommand="Product_Command" + CssClass="button"> + <asp:Image ID="deleteProductImage" runat="server" SkinID="deleteProductImage" AlternateText="Delete Product" /> + <label> + Delete Product</label></asp:LinkButton> + <div class="end"> + </div> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> - </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b></div> </div> </asp:Panel> - <div class="menu"> + <asp:Panel runat="server" ID="UserAdmin" CssClass="menu" OnInit="User_Init"> <label> User Administration</label> - <div class="pictureMenu" id="UserAdmin"> + <div class="pictureMenu"> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> </b></b> <div class="xboxcontent"> - <div class="button"> - <asp:LinkButton ID="newUser" runat="server" OnInit="newUser_Init" CommandName="new" - OnCommand="User_Command"> - <asp:Image ID="newUserIcon" runat="server" SkinID="newUserImage" AlternateText="New User" />New - User</asp:LinkButton></div> + <asp:LinkButton ID="newUser" runat="server" CommandName="new" OnCommand="User_Command" + CssClass="button"> + <asp:Image ID="newUserIcon" runat="server" SkinID="newUserImage" AlternateText="New User" /> + <label> + New User</label></asp:LinkButton> <div class="end"> </div> - <div class="hr"> - </div> + <asp:Panel runat="server" ID="UserAdminHR" CssClass="hr" /> <div class="pulldown"> <label> For:</label> - <asp:DropDownList runat="server" ID="userList" AutoPostBack="True" OnInit="userList_Init" - OnSelectedIndexChanged="userList_SelectedIndexChanged"> + <asp:DropDownList runat="server" ID="userList" AutoPostBack="True" OnSelectedIndexChanged="userList_SelectedIndexChanged"> </asp:DropDownList> </div> - <div class="button"> - <asp:LinkButton ID="userView" runat="server" CommandName="view" OnCommand="User_Command"> - <asp:Image ID="userViewIcon" runat="server" SkinID="viewUserImage" AlternateText="View User" />View - User</asp:LinkButton></div> - <div class="button"> - <asp:LinkButton ID="userEdit" runat="server" CommandName="edit" OnCommand="User_Command"> - <asp:Image ID="userEditIcon" runat="server" SkinID="editUserImage" AlternateText="Edit User" />Edit - User</asp:LinkButton></div> - <div class="button"> - <asp:LinkButton ID="userDelete" runat="server" CommandName="delete" OnCommand="User_Command"> - <asp:Image ID="userDeleteIcon" runat="server" SkinID="deleteUserImage" AlternateText="Delete User" />Delete - User</asp:LinkButton></div> + <asp:LinkButton ID="userView" runat="server" CommandName="view" OnCommand="User_Command" + CssClass="button"> + <asp:Image ID="userViewIcon" runat="server" SkinID="viewUserImage" AlternateText="View User" /> + <label> + View User</label></asp:LinkButton> + <asp:LinkButton ID="userEdit" runat="server" CommandName="edit" OnCommand="User_Command" + CssClass="button"> + <asp:Image ID="userEditIcon" runat="server" SkinID="editUserImage" AlternateText="Edit User" /> + <label> + Edit User</label></asp:LinkButton> + <asp:LinkButton ID="userDelete" runat="server" CommandName="delete" OnCommand="User_Command" + CssClass="button"> + <asp:Image ID="userDeleteIcon" runat="server" SkinID="deleteUserImage" AlternateText="Delete User" /> + <label> + Delete User</label></asp:LinkButton> <div class="end"> </div> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b> - <b class="xb1"></b></b> - </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b></div> </div> - </div> - <div class="menu"> + </asp:Panel> + <asp:Panel runat="server" ID="RoleAdmin" CssClass="menu" OnInit="Role_Init"> <label> Role Administration</label> - <div class="pictureMenu" id="RoleAdmin"> + <div class="pictureMenu"> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> </b></b> <div class="xboxcontent"> - <div class="button"> - <asp:LinkButton ID="newRole" runat="server" OnInit="newRole_Init" CommandName="new" - OnCommand="Role_Command"> - <asp:Image ID="newRoleIcon" runat="server" SkinID="newRoleImage" AlternateText="New User" />New - Role</asp:LinkButton></div> - <div class="button"> - <asp:LinkButton ID="userRole" runat="server" CommandName="user" - OnCommand="Role_Command"> - <asp:Image ID="userRoleIcon" runat="server" SkinID="userRoleImage" AlternateText="User Roles" />User - Roles</asp:LinkButton></div> + <asp:LinkButton ID="newRole" runat="server" CommandName="new" OnCommand="Role_Command" + CssClass="button"> + <asp:Image ID="newRoleIcon" runat="server" SkinID="newRoleImage" AlternateText="New User" /> + <label> + New Role</label> + </asp:LinkButton> <div class="end"> </div> - <div class="hr"> - </div> + <asp:Panel runat="server" ID="RoleAdminHR" CssClass="hr" /> <div class="pulldown"> <label> For:</label> - <asp:DropDownList runat="server" ID="roleList" AutoPostBack="True" OnInit="roleList_Init" - OnSelectedIndexChanged="roleList_SelectedIndexChanged"> + <asp:DropDownList runat="server" ID="roleList" AutoPostBack="True" OnSelectedIndexChanged="roleList_SelectedIndexChanged"> </asp:DropDownList> </div> - <div class="button"> - <asp:LinkButton ID="roleView" runat="server" CommandName="view" OnCommand="Role_Command"> - <asp:Image ID="roleViewIcon" runat="server" SkinID="viewRoleImage" AlternateText="View Role" />View - Role</asp:LinkButton></div> - <div class="button"> - <asp:LinkButton ID="roleEdit" runat="server" CommandName="edit" OnCommand="Role_Command"> - <asp:Image ID="roleEditIcon" runat="server" SkinID="editRoleImage" AlternateText="Edit Role" />Edit - Role</asp:LinkButton></div> - <div class="button"> - <asp:LinkButton ID="roleDelete" runat="server" CommandName="delete" OnCommand="Role_Command"> - <asp:Image ID="roleDeleteIcon" runat="server" SkinID="deleteRoleImage" AlternateText="Delete Role" />Delete - Role</asp:LinkButton></div> + <asp:LinkButton ID="roleView" runat="server" CommandName="view" OnCommand="Role_Command" + CssClass="button"> + <asp:Image ID="roleViewIcon" runat="server" SkinID="viewRoleImage" AlternateText="View Role" /> + <label> + View Role</label></asp:LinkButton> + <asp:LinkButton ID="roleEdit" runat="server" CommandName="edit" OnCommand="Role_Command" + CssClass="button"> + <asp:Image ID="roleEditIcon" runat="server" SkinID="editRoleImage" AlternateText="Edit Role" /> + <label> + Edit Role</label></asp:LinkButton> + <asp:LinkButton ID="roleDelete" runat="server" CommandName="delete" OnCommand="Role_Command" + CssClass="button"> + <asp:Image ID="roleDeleteIcon" runat="server" SkinID="deleteRoleImage" AlternateText="Delete Role" /> + <label> + Delete Role</label></asp:LinkButton> + <asp:LinkButton ID="userRole" runat="server" CommandName="role" OnCommand="Role_Command" + CssClass="button"> + <asp:Image ID="userRoleIcon" runat="server" SkinID="userRoleImage" AlternateText="User Roles" /> + <label> + User Roles</label></asp:LinkButton> <div class="end"> </div> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b> - <b class="xb1"></b></b> - </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b></div> </div> - </div> + </asp:Panel> </div> Modified: Website/Includes/Administration.ascx.cs =================================================================== --- Website/Includes/Administration.ascx.cs 2006-08-10 21:11:42 UTC (rev 305) +++ Website/Includes/Administration.ascx.cs 2006-08-10 23:35:49 UTC (rev 306) @@ -22,25 +22,32 @@ m_logg.Debug("Loading Administration page"); } - protected void newProduct_Init(object sender, EventArgs e) + protected void Product_Init(object sender, EventArgs e) { if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_CREATE, Constants.PRODUCT_ANYID)) + { newProduct.Visible = false; - } - protected void newUser_Init(object sender, EventArgs e) - { - if (!m_user.HasRight(Constants.RIGHTS_USER_CREATE, Constants.PRODUCT_ANYID)) - newUser.Visible = false; - } - protected void newRole_Init(object sender, EventArgs e) - { - if (!m_user.HasRight(Constants.RIGHTS_ROLE_CREATE, Constants.PRODUCT_ANYID)) - newRole.Visible = false; - } + ProductAdminHR.Visible = false; + } - protected void productList_Init(object sender, EventArgs e) - { + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_VIEW, Constants.PRODUCT_ANYID)) + viewProduct.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_EDIT, Constants.PRODUCT_ANYID)) + editProduct.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_DELETE, Constants.PRODUCT_ANYID)) + deleteProduct.Visible = false; + if (!viewProduct.Visible && !editProduct.Visible && !deleteProduct.Visible) + { + ProductAdminHR.Visible = false; + productList.Visible = false; + + if (!newProduct.Visible) + { + ProductAdmin.Visible = false; + } + } + List<Product> products = ProductDB.GetProductList(active); foreach (Product product in products) @@ -56,40 +63,41 @@ if (!IsPostBack) productList_SelectedIndexChanged(sender, e); } - protected void productList_SelectedIndexChanged(object sender, EventArgs e) + + protected void User_Init(object sender, EventArgs e) { - try + if (!m_user.HasRight(Constants.RIGHTS_USER_CREATE, Constants.PRODUCT_ANYID)) { - int productID = Convert.ToInt32(productList.SelectedValue); - - if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_VIEW, productID)) - viewProduct.Visible = false; - else - viewProduct.Visible = true; - if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_EDIT, productID)) - editProduct.Visible = false; - else - editProduct.Visible = true; - if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_DELETE, productID)) - deleteProduct.Visible = false; - else - deleteProduct.Visible = true; + newUser.Visible = false; + UserAdminHR.Visible = false; } - catch { } - } + if (!m_user.HasRight(Constants.RIGHTS_USER_VIEW_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, Constants.PRODUCT_ANYID)) + userView.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_USER_EDIT_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_USER_EDIT_OTHER, Constants.PRODUCT_ANYID)) + userEdit.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_USER_DELETE, Constants.PRODUCT_ANYID)) + userDelete.Visible = false; - protected void userList_Init(object sender, EventArgs e) - { + if (!userView.Visible && !userEdit.Visible && !userDelete.Visible) + { + UserAdminHR.Visible = false; + userList.Visible = false; + if (!newUser.Visible) + { + UserAdmin.Visible = false; + } + } + List<Product> products = ProductDB.GetProductList(active); List<User> users = UserDB.TCDB_GetUserList(active); foreach (User user in users) { if (!(m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER)) && - !(user.ID == m_user.ID && m_user.HasRight(Constants.RIGHTS_USER_VIEW_MY, Constants.PRODUCT_ANYID)) && - !(m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, user, Constants.PRODUCT_ANYID))) + !(user.ID == m_user.ID && m_user.HasRight(Constants.RIGHTS_USER_VIEW_MY, Constants.PRODUCT_ANYID)) && + !(m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, user, Constants.PRODUCT_ANYID))) continue; ListItem item = new ListItem(user.FULLNAME, user.ID.ToString()); @@ -101,6 +109,84 @@ if (!IsPostBack) userList_SelectedIndexChanged(sender, e); } + + protected void Role_Init(object sender, EventArgs e) + { + if (!m_user.HasRight(Constants.RIGHTS_ROLE_CREATE, Constants.PRODUCT_ANYID)) + { + newRole.Visible = false; + } + if (!m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, Constants.PRODUCT_ANYID)) + { + userRole.Visible = false; + } + if (!newRole.Visible && !userRole.Visible) + { + RoleAdminHR.Visible = false; + } + + if (!m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, Constants.PRODUCT_ANYID)) + roleView.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID)) + roleEdit.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_ROLE_DELETE, Constants.PRODUCT_ANYID)) + roleDelete.Visible = false; + if (!m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_MY, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID)) + userRole.Visible = false; + + if (!roleView.Visible && !roleEdit.Visible && !roleDelete.Visible && !userRole.Visible) + { + RoleAdminHR.Visible = false; + roleList.Visible = false; + + if (!newRole.Visible) + { + RoleAdmin.Visible = false; + } + } + + List<Product> products = ProductDB.GetProductList(active); + List<Role> roles = RightDB.TCDB_GetRoleList(active); + + foreach (Role role in roles) + { + if (!(m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, Constants.PRODUCT_ANYID)) && + !(m_user.HasRole(role.NAME) && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY, Constants.PRODUCT_ANYID))) + continue; + + ListItem item = new ListItem(role.NAME, role.ID.ToString()); + if (!role.ACTIVE) + item.Attributes.CssStyle.Add("text-decoration", "line-through"); + + roleList.Items.Add(item); + } + if (!IsPostBack) + roleList_SelectedIndexChanged(sender, e); + } + + protected void productList_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + int productID = Convert.ToInt32(productList.SelectedValue); + + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_VIEW, productID)) + viewProduct.Visible = false; + else + viewProduct.Visible = true; + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_EDIT, productID)) + editProduct.Visible = false; + else + editProduct.Visible = true; + if (!m_user.HasRight(Constants.RIGHTS_PRODUCT_DELETE, productID)) + deleteProduct.Visible = false; + else + deleteProduct.Visible = true; + } + catch { } + + } + protected void userList_SelectedIndexChanged(object sender, EventArgs e) { try @@ -115,9 +201,9 @@ userDelete.Visible = false; foreach (Product product in products) { - if (!userView.Visible && m_user.HasRight(Constants.RIGHTS_USER_VIEW_MY, product.ID)) + if (!userView.Visible && m_user.HasRight(Constants.RIGHTS_USER_VIEW_MY, product.ID)) userView.Visible = true; - if (!userEdit.Visible && m_user.HasRight(Constants.RIGHTS_USER_EDIT_MY, product.ID)) + if (!userEdit.Visible && m_user.HasRight(Constants.RIGHTS_USER_EDIT_MY, product.ID)) userEdit.Visible = true; } } @@ -128,13 +214,13 @@ userDelete.Visible = true; foreach (Product product in products) { - if (!userView.Visible && m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, user, product.ID)) + if (!userView.Visible && m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, user, product.ID)) userView.Visible = true; - if (!userEdit.Visible && m_user.HasRight(Constants.RIGHTS_USER_EDIT_OTHER, user, product.ID)) + if (!userEdit.Visible && m_user.HasRight(Constants.RIGHTS_USER_EDIT_OTHER, user, product.ID)) userEdit.Visible = true; if (product.ID != Constants.PRODUCT_SITEID && user.HasRights(product.ID)) { - if (userDelete.Visible && !m_user.HasRight(Constants.RIGHTS_USER_DELETE, product.ID)) + if (userDelete.Visible && !m_user.HasRight(Constants.RIGHTS_USER_DELETE, product.ID)) userDelete.Visible = false; } } @@ -143,27 +229,6 @@ catch { } } - protected void roleList_Init(object sender, EventArgs e) - { - List<Product> products = ProductDB.GetProductList(active); - List<Role> roles = RightDB.TCDB_GetRoleList(active); - - foreach (Role role in roles) - { - if (!(m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, Constants.PRODUCT_ANYID)) && - !(m_user.HasRole(role.NAME) && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY,Constants.PRODUCT_ANYID))) - continue; - - ListItem item = new ListItem(role.NAME,role.ID.ToString()); - if (!role.ACTIVE) - item.Attributes.CssStyle.Add("text-decoration", "line-through"); - - roleList.Items.Add(item); - } - if (!IsPostBack) - roleList_SelectedIndexChanged(sender, e); - - } protected void roleList_SelectedIndexChanged(object sender, EventArgs e) { Role role = RightDB.GetRoleInfo(Convert.ToInt32(roleList.SelectedValue)); @@ -186,7 +251,7 @@ List<Product> products = ProductDB.GetProductList(active); foreach (Product product in products) { - List<User> users = ProductDB.TCDB_GetProductUsers(product.ID,role.ID); + List<User> users = ProductDB.TCDB_GetProductUsers(product.ID, role.ID); if (users.Count > 0) { @@ -219,7 +284,7 @@ Response.Redirect(Request.RawUrl); break; case "new": - Response.Redirect("~/Product.aspx?"+Constants.CODE_MODE+"=new"); + Response.Redirect("~/Product.aspx?" + Constants.CODE_MODE + "=new"); break; default: m_logg.Error("Invalid Command: " + e.CommandName); @@ -277,5 +342,5 @@ break; } } + } } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |