Changeset 20464

Show
Ignore:
Timestamp:
02/24/10 08:44:03 (5 months ago)
Author:
umesha
Message:

added changes for participant check box alignment
some CSS changes for UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/core/web/css/global.css

    r20311 r20464  
    255255        font-size: 12px; 
    256256        text-decoration: none; 
     257        vertical-align: middle; 
    257258}  
    258259 
  • trunk/core/web/jsp/notification/CreateSubscription2.jsp

    r20445 r20464  
    2929            net.project.util.StringUtils, 
    3030            net.project.space.Space, 
    31                         net.project.space.SpaceFactory"%> 
     31                        net.project.space.SpaceFactory, 
     32                        net.project.space.ISpaceTypes"%> 
    3233<%@ include file="/base/taglibInclude.jsp"%> 
    3334 
     
    112113<title><display:get name="prm.global.application.title" /></title> 
    113114<template:getSpaceCSS/> 
    114         <%if(StringUtils.isNotEmpty(moduleType)){%> 
     115        <%if(StringUtils.isNotEmpty(moduleType) && "project".equals(moduleType)){%> 
    115116                <template:getSpaceCSS space="project"/> 
    116117        <%} %>   
     
    129130        deliverToRequiredErrorMessage = '<%=PropertyProvider.get("prm.notification.createsubscription2.delivertorequired.message")%>'; 
    130131        savingMessage = '<%=PropertyProvider.get("prm.global.saving.message")%>'; 
     132        isPersonalSpace = '<%=user.getCurrentSpace().getType().equals(ISpaceTypes.PERSONAL_SPACE) %>'; 
    131133         
    132134        function setup() { 
     
    359361                                        <%-- Get the notification types for the object type;  calling 
    360362                                 this method sets the notification type count  --%> 
    361                                         <div style="overflow: auto; height: 70px;"> 
     363                                        <div id ="notifyEventsDiv"> 
    362364                                        <table width="100%"  cellpadding="0" cellspacing="0"> 
    363365                                               <%=domainListBean.getNotificationTypesCheckList(objectType, isCreateType, moduleType)%> 
     
    448450                <% if (isUserSpaceAdministrator) { %> 
    449451                <%-- Space Admins can send to any group --%> 
    450                 <% if (StringUtils.isEmpty(checkPopup)) { %
    451                 <tr>            
    452                         <td class="notifyFieldRequired"  valign="top" colspan="2"><%=PropertyProvider.get("prm.notification.createsubscription2.deliverto.label")%></td
    453                 </tr
    454                 <% }%> 
    455                 <tr><td></td> 
     452                <tr id="delivertoTR"
     453                       <td class="notifyFieldRequired"  valign="middle"> 
     454                               <% if (StringUtils.isEmpty(checkPopup)) { %
     455                                       <%=PropertyProvider.get("prm.notification.createsubscription2.deliverto.label")%
     456                               <% }%> 
     457                       </td> 
    456458                        <td> 
    457                                 <div style="overflow: auto; height: 70px;"> 
     459                                <div id="spaceParticipantDiv"> 
    458460                                        <table width="100%" cellpadding="0" cellspacing="0"><%=spaceParticipantGroupCheckBoxList%></table> 
    459461                                </div> 
  • trunk/core/web/src/notifyPopup.js

    r20418 r20464  
    77uploadDialogue.style.display = 'none'; 
    88var uploadBody = document.createElement('div'); 
     9var notifyEventsDiv; 
     10var spaceParticipantDiv; 
     11var isPersonalSpace; 
    912uploadBody.id = 'uploadBody'; 
    1013 
     
    105108                        } 
    106109                        document.getElementById("name").focus(); 
     110                        setCheckBoxListDivHeight(document.getElementById('notifyEventsDiv'), 'input', 4, 'auto'); 
     111                        if(!checkIsPersonalSpace(isPersonalSpace)){                              
     112                        setCheckBoxListDivHeight(document.getElementById('spaceParticipantDiv'), 'input', 4, 'auto'); 
     113                        } 
    107114           }, 
    108115           failure: function(result, response){ 
     
    219226        } 
    220227} 
     228 
     229// Method to set size of div containing single or multiple check boxes   
     230function setCheckBoxListDivHeight(DivObject ,type , noOfCheckBox , overFlowStyle){ 
     231        if(DivObject && DivObject.getElementsByTagName(type).length > noOfCheckBox){ 
     232                DivObject.style.overflow = overFlowStyle; 
     233                DivObject.style.height = (noOfCheckBox * 22) + 'px'; 
     234        } 
     235} 
     236 
     237function checkIsPersonalSpace(isPersonalSpace){ 
     238        if(isPersonalSpace && document.getElementById('spaceParticipantDiv') && (isPersonalSpace == 'true') && (document.getElementById('spaceParticipantDiv').getElementsByTagName('input').length == 1) ){ 
     239                document.getElementById('spaceParticipantDiv').getElementsByTagName('input')[0].checked = 'checked'; 
     240                document.getElementById('delivertoTR').style.display = 'none'; 
     241                return true; 
     242        } 
     243        return false; 
     244}