Revision: 4208
Author:   solomax666
Date:     Wed Sep  7 11:46:30 2011
Log:      - Issue 1478: Wrong Dialog Box in Scheduled Events
- code clean up
http://code.google.com/p/openmeetings/source/detail?r=4208

Modified:
 /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/conference/conferenceMenubar.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/appointmentNotificationPopUp.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/settings/privatemessages/newPrivateMessage.lzx /trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/Navimanagement.java /trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java /trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java
 /trunk/singlewebapp/src/app/org/openmeetings/app/remote/MainService.java
 /trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java

=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx Tue Apr 26 02:04:46 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx Wed Sep 7 11:46:30 2011
@@ -318,6 +318,8 @@

 <attribute name="screenSharingDialogContainer" value="null"/>

+<attribute name="appointmentNotificationPopUp" value="null"/>
+
 <attribute name="conferenceBrowserIsinited" value="false" type="boolean" />

 <attribute name="isAllowedToScreenShare" value="false" type="boolean" />
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/conference/conferenceMenubar.lzx Tue Sep 6 11:31:58 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/conference/conferenceMenubar.lzx Wed Sep 7 11:46:30 2011
@@ -45,6 +45,9 @@
                 if (canvas.screenSharingDialogContainer != null) {
                     canvas.screenSharingDialogContainer.destroy();
                 }
+                if (canvas.appointmentNotificationPopUp != null) {
+                       canvas.appointmentNotificationPopUp.destroy();
+                }
                                canvas.doActionmenu('quit');
                        </method>
                        <view resource="exit_btn_rsc" y="2" x="4" />
@@ -183,6 +186,12 @@
                                labeliderror:790,showCheckBox:false});
                        </handler>
                        <method name="sendConfirmation" args="confirm,bool">
+                if (canvas.screenSharingDialogContainer != null) {
+                    canvas.screenSharingDialogContainer.destroy();
+                }
+                if (canvas.appointmentNotificationPopUp != null) {
+                       canvas.appointmentNotificationPopUp.destroy();
+                }
                                canvas.doActionmenu('quit');
                        </method>
                        <view resource="exit_btn_rsc" y="2" x="4" />
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/appointmentNotificationPopUp.lzx Wed Sep 22 08:40:03 2010 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/appointmentNotificationPopUp.lzx Wed Sep 7 11:46:30 2011
@@ -6,19 +6,16 @@
resizeable="false" width="280" height="280" x="$once{ parent.width-this.width-10 }">

        <attribute name="roomobj" value="null" />
-       <!--
-       textcolor="white"
-        -->

        <handler name="oninit" >
                this.getAppointMentAndTimeZones.doCall();
-               //this.getServerTime.doCall();
        </handler>

        <!-- Retrieving Appointmentdata for Meeting -->
<netRemoteCallHib name="getAppointMentAndTimeZones" remotecontext="$once{ canvas.thishib }"
                funcname="conferenceservice.getAppointMentAndTimeZones" >
<netparam><method name="getValue">return parent.parent.roomobj.rooms_id;</method></netparam> + <netparam><method name="getValue">return canvas.user_id;</method></netparam>

                <handler name="ondata" args="value">
                    <![CDATA[
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx Sun Sep 4 03:51:40 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx Wed Sep 7 11:46:30 2011
@@ -24,7 +24,8 @@
         //,{x:this.roomobj.moderationPanelXPosition}

         if(roomobj.appointment){
-            new lz.appointmentNotificationPopUp(canvas.conferenceView,{
+            canvas.appointmentNotificationPopUp =
+               new lz.appointmentNotificationPopUp(canvas.conferenceView,{
                                name:'appDetail', roomobj:this.roomobj });
         } else{
             if ($debug) Debug.write("no appointed meeting");
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx Sun Sep 4 03:51:40 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx Wed Sep 7 11:46:30 2011
@@ -23,7 +23,8 @@
         //,{x:this.roomobj.moderationPanelXPosition}

         if(roomobj.appointment){
-               new lz.appointmentNotificationPopUp(canvas.conferenceView,{
+            canvas.appointmentNotificationPopUp =
+               new lz.appointmentNotificationPopUp(canvas.conferenceView,{
                                        name:'appDetail', roomobj:this.roomobj 
});
         } else{
                if ($debug) Debug.write("no appointed meeting");
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx Sun Sep 4 03:51:40 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/interviewConferenceRoom.lzx Wed Sep 7 11:46:30 2011
@@ -18,7 +18,8 @@
         if ($debug) Debug.write("this.roomobj ",this.roomobj);

         if(this.roomobj.appointment){
-               new lz.appointmentNotificationPopUp(canvas.conferenceView,{
+               canvas.appointmentNotificationPopUp =
+                       new 
lz.appointmentNotificationPopUp(canvas.conferenceView,{
                                                name:'appDetail', 
roomobj:this.roomobj });
         } else{
                if ($debug) Debug.write("no appointed meeting");
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx Sun Sep 4 03:51:40 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx Wed Sep 7 11:46:30 2011
@@ -16,7 +16,8 @@
         if ($debug) Debug.write("this.roomobj ",this.roomobj);

         if(this.roomobj.appointment){
-               new lz.appointmentNotificationPopUp(canvas.conferenceView,{
+               canvas.appointmentNotificationPopUp =
+                       new 
lz.appointmentNotificationPopUp(canvas.conferenceView,{
                                                name:'appDetail', 
roomobj:this.roomobj });
         } else{
                if ($debug) Debug.write("no appointed meeting");
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/settings/privatemessages/newPrivateMessage.lzx Thu Apr 28 05:23:57 2011 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/settings/privatemessages/newPrivateMessage.lzx Wed Sep 7 11:46:30 2011
@@ -71,7 +71,10 @@

                                if ($debug) Debug.write("++ ",i,sString,t1,t2);

-                               var email = sString.substring(t1+1, t2);
+                               var email = sString;
+                               if (t1 > -1 && t2 > -1) {
+                                       email = sString.substring(t1 + 1, t2);
+                               }

                                if ($debug) Debug.write("++ ",email);

@@ -334,10 +337,8 @@
                                   width="270" y="$once{ parent.height-120 }" 
x="4">
                <handler name="onvalue" args="v">
                        if ($debug) Debug.write("onvalue ",v);
-                       if (v) {
-                               
parent._hideRoomConfig.setAttribute("visibility","hidden");
-                       } else {
-                               
parent._hideRoomConfig.setAttribute("visibility","visible");
+                       if (parent._hideRoomConfig != null) {
+ parent._hideRoomConfig.setAttribute("visibility", v ? "hidden" : "visible");
                        }
                </handler>
        </labelCheckbox>
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/Navimanagement.java Tue Aug 30 13:17:16 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/Navimanagement.java Wed Sep 7 11:46:30 2011
@@ -29,7 +29,7 @@
        @Autowired
        private Fieldmanagment fieldmanagment;

-       public List getMainMenu(long user_level, long USER_ID, long 
language_id) {
+ public List<Naviglobal> getMainMenu(long user_level, long USER_ID, long language_id) {
                List<Naviglobal> ll = this.getMainMenu(user_level, USER_ID);
                for (Iterator<Naviglobal> it2 = ll.iterator(); it2.hasNext();) {
                        Naviglobal navigl = it2.next();
@@ -71,6 +71,7 @@
                                        + "where c.level_id <= :level_id AND "
                                        + "c.deleted LIKE 'false' " + "order by 
c.naviorder");
                        query.setParameter("level_id", user_level);
+                       @SuppressWarnings("unchecked")
                        List<Naviglobal> navi = query.getResultList();

                        return navi;
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java Tue Aug 30 13:17:16 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java Wed Sep 7 11:46:30 2011
@@ -502,7 +502,7 @@
                try {
                        CriteriaBuilder cb = em.getCriteriaBuilder();
                        CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);
-                       Root<Rooms> c = cq.from(Rooms.class);
+                       cq.from(Rooms.class);
                        TypedQuery<Rooms> q = em.createQuery(cq);
                        List<Rooms> ll = q.getResultList();
                        return ll;
@@ -720,7 +720,7 @@
         */
        public Long addRoom(long user_level, String name, long roomtypes_id,
                        String comment, Long numberOfPartizipants, boolean 
ispublic,
-                       List<?> organisations, Boolean appointment, Boolean 
isDemoRoom,
+                       List<Integer> organisations, Boolean appointment, 
Boolean isDemoRoom,
                        Integer demoTime, Boolean isModeratedRoom,
                        List<Map<String, Object>> roomModerators,
                        Boolean allowUserQuestions, Boolean isAudioOnly, 
Boolean isClosed,
@@ -846,7 +846,7 @@
         * @return id of (the newly created) room or NULL
         */
public Long addExternalRoom(String name, long roomtypes_id, String comment,
-                       Long numberOfPartizipants, boolean ispublic, List<?> 
organisations,
+ Long numberOfPartizipants, boolean ispublic, List<Integer> organisations,
                        Boolean appointment, Boolean isDemoRoom, Integer 
demoTime,
                        Boolean isModeratedRoom, List<Map<String, Object>> 
roomModerators,
                        Long externalRoomId, String externalRoomType,
@@ -1187,7 +1187,7 @@
                        CriteriaBuilder cb = em.getCriteriaBuilder();
                        CriteriaQuery<Rooms_Organisation> cq = cb
                                        .createQuery(Rooms_Organisation.class);
-                       Root<Rooms_Organisation> c = 
cq.from(Rooms_Organisation.class);
+                       cq.from(Rooms_Organisation.class);
                        TypedQuery<Rooms_Organisation> q = em.createQuery(cq);
                        List<Rooms_Organisation> ll = q.getResultList();
                        return ll;
@@ -1283,7 +1283,7 @@
         */
        public Long updateRoom(long user_level, long rooms_id, long 
roomtypes_id,
                        String name, boolean ispublic, String comment,
-                       Long numberOfPartizipants, List<?> organisations,
+                       Long numberOfPartizipants, List<Integer> organisations,
                        Boolean appointment, Boolean isDemoRoom, Integer 
demoTime,
                        Boolean isModeratedRoom, List<Map<String, Object>> 
roomModerators,
                        Boolean allowUserQuestions, Boolean isAudioOnly, 
Boolean isClosed,
@@ -1313,7 +1313,7 @@

        public Long updateRoomInternal(long rooms_id, long roomtypes_id,
                        String name, boolean ispublic, String comment,
-                       Long numberOfPartizipants, List<?> organisations,
+                       Long numberOfPartizipants, List<Integer> organisations,
                        Boolean appointment, Boolean isDemoRoom, Integer 
demoTime,
                        Boolean isModeratedRoom, List<Map<String, Object>> 
roomModerators,
                        Boolean allowUserQuestions, Boolean isAudioOnly, 
Boolean isClosed,
@@ -1439,11 +1439,9 @@
                return false;
        }

-       @SuppressWarnings("rawtypes")
-       private boolean checkRoomShouldByDeleted(long orgId, List organisations)
-                       throws Exception {
-               for (Iterator it = organisations.iterator(); it.hasNext();) {
-                       Integer key = (Integer) it.next();
+ private boolean checkRoomShouldByDeleted(long orgId, List<Integer> organisations) throws Exception {
+               for (Iterator<Integer> it = organisations.iterator(); 
it.hasNext();) {
+                       Integer key = it.next();
                        Long storedOrgId = key.longValue();
                        if (storedOrgId.equals(orgId))
                                return true;
@@ -1451,24 +1449,23 @@
                return false;
        }

-       @SuppressWarnings("rawtypes")
-       private Long updateRoomOrganisations(List organisations, Rooms room)
+ private Long updateRoomOrganisations(List<Integer> organisations, Rooms room)
                        throws Exception {
-               List roomOrganisations = this.getOrganisationsByRoom(3,
+ List<Rooms_Organisation> roomOrganisations = this.getOrganisationsByRoom(3,
                                room.getRooms_id());

                List<Long> roomsToAdd = new LinkedList<Long>();
                List<Long> roomsToDel = new LinkedList<Long>();

-               for (Iterator it = organisations.iterator(); it.hasNext();) {
-                       Integer key = (Integer) it.next();
+               for (Iterator<Integer> it = organisations.iterator(); 
it.hasNext();) {
+                       Integer key = it.next();
                        Long orgIdToAdd = key.longValue();
                        if (!this.checkRoomAlreadyInOrg(orgIdToAdd, 
roomOrganisations))
                                roomsToAdd.add(orgIdToAdd);
                }

-               for (Iterator it = roomOrganisations.iterator(); it.hasNext();) 
{
-                       Rooms_Organisation rOrganisation = (Rooms_Organisation) 
it.next();
+ for (Iterator<Rooms_Organisation> it = roomOrganisations.iterator(); it.hasNext();) {
+                       Rooms_Organisation rOrganisation = it.next();
                        Long orgIdToDel = rOrganisation.getOrganisation()
                                        .getOrganisation_id();
                        if (!this.checkRoomShouldByDeleted(orgIdToDel, 
organisations))
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java Sun Sep 4 01:44:00 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java Wed Sep 7 11:46:30 2011
@@ -296,7 +296,7 @@

// --------------------------------------------------------------------------------------------

-       public Map<String, Object> getAppointMentAndTimeZones(Long room_id) {
+ public Map<String, Object> getAppointMentAndTimeZones(Long room_id, Long user_id) {
                log.debug("getAppointMentDataForRoom");

                IConnection current = Red5.getConnectionLocal();
@@ -306,7 +306,8 @@

                RoomClient currentClient = this.clientListManager
                                .getClientByStreamId(streamid);
-
+               currentClient.setUser_id(user_id);
+
                Rooms room = roommanagement.getRoomById(room_id);

                if (room.getAppointment() == false)
@@ -579,21 +580,23 @@
         * @param argObject
         * @return
         */
-       @SuppressWarnings({ "rawtypes" })
        public Long saveOrUpdateRoom(String SID, Object argObject) {
                try {
                        Long users_id = sessionManagement.checkSession(SID);
                        long User_level = 
userManagement.getUserLevelByID(users_id);
                        log.debug("argObject: 1 - " + 
argObject.getClass().getName());
-                       LinkedHashMap argObjectMap = (LinkedHashMap) argObject;
+                       @SuppressWarnings("unchecked")
+ LinkedHashMap<String, Object> argObjectMap = (LinkedHashMap<String, Object>) argObject;
                        log.debug("argObject: 2 - "
                                        + 
argObjectMap.get("organisations").getClass().getName());
-                       List organisations = (List) 
argObjectMap.get("organisations");
+                       @SuppressWarnings("unchecked")
+ List<Integer> organisations = (List<Integer>) argObjectMap.get("organisations");
                        Long rooms_id = Long.valueOf(
                                        
argObjectMap.get("rooms_id").toString()).longValue();
                        log.debug("rooms_id " + rooms_id);

-                       List roomModerators = (List) 
argObjectMap.get("roomModerators");
+                       @SuppressWarnings("unchecked")
+ List<Map<String,Object>> roomModerators = (List<Map<String,Object>>)argObjectMap.get("roomModerators");

                        Integer demoTime = null;
                        if (argObjectMap.get("demoTime").toString() != null
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/MainService.java Tue Aug 30 13:17:16 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/MainService.java Wed Sep 7 11:46:30 2011
@@ -27,6 +27,7 @@
 import org.openmeetings.app.persistence.beans.adresses.States;
 import org.openmeetings.app.persistence.beans.basic.Configuration;
 import org.openmeetings.app.persistence.beans.basic.LdapConfig;
+import org.openmeetings.app.persistence.beans.basic.Naviglobal;
 import org.openmeetings.app.persistence.beans.basic.OmTimeZone;
 import org.openmeetings.app.persistence.beans.basic.RemoteSessionObject;
 import org.openmeetings.app.persistence.beans.basic.SOAPLogin;
@@ -103,7 +104,7 @@
         * @param language_id
         * @return
         */
-       public List getNavi(String SID, long language_id, Long organisation_id) 
{
+ public List<Naviglobal> getNavi(String SID, long language_id, Long organisation_id) {
                try {
                        Long user_id = sessionManagement.checkSession(SID);
                        // log.error("getNavi 1: "+users_id);
@@ -207,7 +208,7 @@

                        Users o = null;

-                       currentClient = 
this.clientListManager.getClientByStreamId(current
+                       currentClient = 
clientListManager.getClientByStreamId(current
                                        .getClient().getId());

                        o = userManagement.loginUserByRemoteHash(SID, 
remoteHashId);
@@ -220,7 +221,8 @@
                        }

                        
o.setSessionData(sessionManagement.getSessionByHash(remoteHashId));
-
+                       currentClient.setUser_id(o.getUser_id());
+
                        if (currentClient.getUser_id() != null
                                        && currentClient.getUser_id() > 0) {

=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java Sun Sep 4 08:07:56 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java Wed Sep 7 11:46:30 2011
@@ -914,7 +914,25 @@
                return null;
        }

-       @SuppressWarnings("deprecation")
+       private Calendar createCalendar(Date date, String time) {
+               Integer hour = Integer.valueOf(
+                               time.substring(0, 2)).intValue();
+               Integer minute = Integer.valueOf(
+                               time.substring(3, 5)).intValue();
+
+               log.info("createCalendar Hour: " + hour);
+               log.info("createCalendar Minute: " + minute);
+
+               Calendar cal = Calendar.getInstance();
+               cal.setTime(date);
+               cal.set(Calendar.HOUR_OF_DAY, hour);
+               cal.set(Calendar.MINUTE, minute);
+               cal.set(Calendar.SECOND, 0);
+               cal.set(Calendar.MILLISECOND, 0);
+
+               return cal;
+       }
+
        public Long composeMail(String SID, List<String> recipients,
                        String subject, String message, Boolean bookedRoom,
                        Date validFromDate, String validFromTime, Date 
validToDate,
@@ -926,34 +944,9 @@
                        Long user_level = 
userManagement.getUserLevelByID(users_id);
                        // users only
                        if (authLevelManagement.checkUserLevel(user_level)) {
-
-                               Integer validFromHour = Integer.valueOf(
-                                               validFromTime.substring(0, 
2)).intValue();
-                               Integer validFromMinute = Integer.valueOf(
-                                               validFromTime.substring(3, 
5)).intValue();
-
-                               Integer validToHour = Integer.valueOf(
-                                               validToTime.substring(0, 
2)).intValue();
-                               Integer validToMinute = Integer.valueOf(
-                                               validToTime.substring(3, 
5)).intValue();
-
-                               log.info("validFromHour: " + validFromHour);
-                               log.info("validFromMinute: " + validFromMinute);
-
-                               // TODO: Remove deprecated Java-Date handlers
-                               Calendar calFrom = Calendar.getInstance();
-                               int year = validFromDate.getYear() + 1900;
-                               int month = validFromDate.getMonth();
-                               int date = validFromDate.getDate();
-                               calFrom.set(year, month, date, validFromHour, 
validFromMinute,
-                                               0);
-
-                               Calendar calTo = Calendar.getInstance();
-                               int yearTo = validToDate.getYear() + 1900;
-                               int monthTo = validToDate.getMonth();
-                               int dateTo = validToDate.getDate();
-                               calTo.set(yearTo, monthTo, dateTo, validToHour, 
validToMinute,
-                                               0);
+                               Calendar calFrom = 
createCalendar(validFromDate, validFromTime);
+
+                               Calendar calTo = createCalendar(validToDate, 
validToTime);

                                Date appointmentstart = calFrom.getTime();
                                Date appointmentend = calTo.getTime();

--
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en.

Reply via email to