Author: solomax
Date: Thu Feb 21 05:18:35 2013
New Revision: 1448514

URL: http://svn.apache.org/r1448514
Log:
SIP: user count update is fixed for restricted room;
        code clean-up;

Modified:
    
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewListInner.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantList.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/UserManager.java

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 Thu Feb 21 05:18:35 2013
@@ -1661,9 +1661,10 @@
                     
canvas.currentActivityList.applyForGiveExclusiveAudioOn(value.client,value.message[1]);
                 } else if (value.message[0] == 'personal') {
                        var pSID = value.client.publicSID;
-                    var vo = 
canvas._videocontainer._participants.getVideoObjectByPublicSID(pSID);
+                    var vo = 
canvas._videocontainer._participants.getUserListItemByPublicSID(pSID);
                     if (vo != null) {
                        vo.setAttribute('lastname', value.message[2]);
+                       vo.refObj.lastname = value.message[2];
                     }
                                        
canvas.sendViaLocalConnection(canvas.vid_lc_name, "updateFirstLastName", [pSID, 
value.message[1], value.message[2]]);
                 } else {

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx
 Thu Feb 21 05:18:35 2013
@@ -108,7 +108,7 @@
 
                if (canvas.GIVE_EXCLUSIVE_AUDIO_KEY == keyCode) {
                        if (canvas.ismoderator || 
canvas.isAllowedToGiveExclusiveAudio) {
-                               var obj = 
canvas._videocontainer.getVideoObjectByPublicSID(canvas.publicSID);
+                               var obj = 
canvas._videocontainer._participants.getUserListItemByPublicSID(canvas.publicSID);
                                if (null != obj) {
                                        
obj._giveExclusiveAudioView._micButton.onclick.sendEvent();
                                }

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewListInner.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewListInner.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewListInner.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewListInner.lzx
 Thu Feb 21 05:18:35 2013
@@ -138,7 +138,7 @@
     
        <method name="disconnectclient" args="publicSID">
        <![CDATA[
-               var item = getVideoObjectByPublicSID(publicSID);
+               var item = getUserListItemByPublicSID(publicSID);
                if (item) {
                        item.destroy();
                }
@@ -148,10 +148,10 @@
     <!--- get a Objects List Item
         @param string publicSID publicSID
      -->
-       <method name="getVideoObjectByPublicSID" args="publicSID">
+       <method name="getUserListItemByPublicSID" args="publicSID">
        <![CDATA[
                for (var i=0;i<this._table.innerList.subviews.length;i++){
-                       //if ($debug) Debug.write("getVideoObjectByPublicSID : 
this._table.innerList.subviews[i]",this._table.innerList.subviews[i]);
+                       //if ($debug) Debug.write("getUserListItemByPublicSID : 
this._table.innerList.subviews[i]",this._table.innerList.subviews[i]);
                        if 
(this._table.innerList.subviews[i].refObj.publicSID==publicSID){
                                return this._table.innerList.subviews[i];
                        }

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantList.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantList.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantList.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantList.lzx
 Thu Feb 21 05:18:35 2013
@@ -151,7 +151,7 @@
     <!--- get a Objects List Item
         @param string publicSID publicSID
      -->
-       <method name="getVideoObjectByPublicSID" args="publicSID">
+       <method name="getUserListItemByPublicSID" args="publicSID">
        <![CDATA[
                var v = null;
                var lst = this._table.innerList;

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
 Thu Feb 21 05:18:35 2013
@@ -195,7 +195,7 @@
     <method name="receiveExclusiveAudioFlag" args="publicSID">
     <![CDATA[
        if ($debug) Debug.write("receiveExclusiveAudioFlag: ",publicSID);
-        var obj = this._participants.getVideoObjectByPublicSID(publicSID);
+        var obj = this._participants.getUserListItemByPublicSID(publicSID);
 
         for (var i=0; i<obj.parent.subviews.length; i++) {
             var item = obj.parent.subviews[i];
@@ -224,7 +224,7 @@
     </method>
 
     <method name="setSpeakingByPos" args="publicSID,bool">
-       var tObj = this._participants.getVideoObjectByPublicSID(publicSID);
+       var tObj = this._participants.getUserListItemByPublicSID(publicSID);
        if (tObj != null) {
                tObj._miniIcons._loudness.loudness.setAttribute('opacity', bool 
? 1 : 0.2);
         }

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
 Thu Feb 21 05:18:35 2013
@@ -37,56 +37,44 @@
     
     <method name="initialAddItem" args="object">
         <![CDATA[
-            //if ($debug) Debug.write("eventUserList addItem: 
",object.publicSID);
+            if ($debug) Debug.write("restrictedUserListInner::initialAddItem : 
",object.publicSID);
             
             //Check for duplicates
-            
             if (object.isSuperModerator) {
                 object.lastname += " *";
             }
             
-            //See setRoomValues
-            //object.selfItem = false;
-            
             //Add item to list
             if (this._table.renderList == null) {
                 this._table.renderList = new Array();
             }
             
             object.isSelected = false;
-            
             this._table.renderList.push(object);
-            
         ]]>
     </method>
     
      <method name="addItem" args="object">
         <![CDATA[
-            if ($debug) Debug.write("eventUserList addItem: 
",object.publicSID);
+            if ($debug) Debug.write("restrictedUserListInner::addItem: 
",object.publicSID);
             
             //Check for duplicates
-            
             if (object.isSuperModerator) {
                 object.lastname += " *";
             }
             
             object.selfItem = false;
-            
             //Add item to list
             if (this._table.renderList == null) {
                 this._table.renderList = new Array();
             }
             
             object.isSelected = false;
-            
             this._table.renderList.push(object);
-            
             this.sortUserList();
             
             this._table.scheduleRenderContent();
-            
             this.moderationPanel.updateIcons();
-            
         ]]>
     </method>
     
@@ -97,66 +85,46 @@
     
     <method name="sortUserList">
         <![CDATA[ 
-            
             if (this.sortType == "alphabetical") {
                 function sortByName(a,b) {
-                   
                     if(a.firstname.toLowerCase() < b.firstname.toLowerCase()) 
return -1;
                     else if(a.firstname.toLowerCase() > 
b.firstname.toLowerCase()) return 1;
                     else return 0;
-                
                 }
-                
                 this._table.renderList.sort(sortByName);
-                
             } else {
                 function sortByStreamId(a,b) {
-                   
                     if(Number(a.streamid) == Number(b.streamid)) return 0;
                     else if(Number(a.streamid) > Number(b.streamid)) return 1;
                     else return -1;
-                
                 }
-            
                 this._table.renderList.sort(sortByStreamId);
             }
-            
         ]]>
     </method>
     
     <method name="initList">
         if ($debug) Debug.write("initList :: restrictedUserListInner");
-        //new lz[this.listType](this,{name:'_table'});
-        //this.moderationPanel.bringToFront();
     </method>
     
     <method name="clearList">
         if ($debug) Debug.write("clearList :: restrictedUserListInner");
-        //this._table.destroy();
-        //this.initList();
     </method>
     
     <method name="disconnectclient" args="publicSID">
         <![CDATA[
-        
            for (var i=0;i<this._table.renderList.length;i++) {
-            
                if (this._table.renderList[i].publicSID == publicSID) {
-                   
                    this._table.renderList.splice(i,1);
-                
                    break;
                }
-            
            }
-        
            this._table.renderContent();
-            
            this.moderationPanel.updateIcons();
         ]]>
     </method>
     
-       <method name="getVideoObjectByPublicSID" args="publicSID">
+       <method name="getUserListItemByPublicSID" args="publicSID">
        <![CDATA[
                var v = null;
                var vList = this._table._innerlist._inn._inn.subviews;
@@ -269,7 +237,6 @@
         
         <handler name="onclickedItem" args="refObj">
             <![CDATA[
-            
                 if ($debug) Debug.write("onclickedItem ",refObj);
                 
                 if (this.currentSelectedIndex != null) {
@@ -277,20 +244,16 @@
                 }
                 
                 this.currentSelectedIndex = refObj.itemId;
-                
                 this.renderList[refObj.itemId]["isselected"] = true;
                 
                 var list = this._innerlist._inn._inn;
                 for (var i=0;i<list.subviews.length;i++){
-                    
                     list.subviews[i].deselect();
                     list.subviews[i].hideModeratorIcons();
-                    
                 }
                 
                 refObj.select();
                 refObj.initModeratorIcons();
-            
             ]]>
         </handler>
         
@@ -313,13 +276,6 @@
                 this._records.setAttribute("text",records.length);
                 
                 for (var i=0;i<list.subviews.length;i++){
-                    
-                    //if (i % 2 == 0) {
-                    //    list.subviews[i].setIsSecond(true);
-                    //} else {
-                    //    list.subviews[i].setIsSecond(false);
-                    //}
-                    
                     if (records.length > i) {
                         
                         list.subviews[i].setAttribute("clickable",true);
@@ -381,23 +337,8 @@
                         list.subviews[i].setAttribute("itemId","");
                         
                         list.subviews[i].setAttribute("clickable",false);
-                        
                     }
-                    
                 }
-                
-                //  var x = Math.round(value.childList[i].coordX);
-                //  var y = Math.round(value.childList[i].coordY);
-                //  var name = value.childList[i].description;
-                
-                //var x = value.resultAddress[i].x;
-                //var y = value.resultAddress[i].y;
-                //var name = value.resultAddress[i].street+" 
"+value.resultAddress[i].houseNumber+","+value.resultAddress[i].postCode+" 
"+value.resultAddress[i].city+" ("+value.resultAddress[i].cityDistrict+" 
"+value.resultAddress[i].country+" )";
-                //////if ($debug)  //Debug.write("name,x,y ",name,x,y);
-                //this.parent._ausgabelisteMapAdress.addtableItem(x,y,name);
-                
-                //this.sendInitialWidthUpdate();
-                
             ]]>
         </method>   
         
@@ -407,12 +348,6 @@
                     item.setAttribute("clickable",true);
                     item.refObj = this.renderList[item.itemId];
                     
-                    //if (item.itemId % 2 == 0) {
-                    //    item.setIsSecond(true);
-                    //} else {
-                    //    item.setIsSecond(false);
-                    //}
-                    
                     if (this.renderList[item.itemId]["isselected"] && 
this.renderList[item.itemId].isselected) {
                         item.isselected = true;
                         item.onmouseout.sendEvent();
@@ -447,13 +382,6 @@
                     item.updateIconByModScroll();
                         
                 } else {
-                    
-                    //if (item.itemId % 2 == 0) {
-                    //    item.setIsSecond(true);
-                    //} else {
-                    //    item.setIsSecond(false);
-                    //}
-                    
                     item.isselected = false;
                     item.onmouseout.sendEvent();
                     item.hideModeratorIcons();

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
 Thu Feb 21 05:18:35 2013
@@ -26,12 +26,6 @@
        <attribute name="connectedSince" value="" type="string" />
        
     <attribute name="isMod" value="false" type="boolean" />
-    <!--<attribute name="canDraw" value="false" type="boolean" />-->
-    <!--<attribute name="canShare" value="false" type="boolean" />-->
-    <!--<attribute name="canRemote" value="false" type="boolean" />-->
-    <!--<attribute name="canGiveAudio" value="false" type="boolean" />-->
-    <!--<attribute name="isBroadcasting" value="false" type="boolean" />-->
-    <!--<attribute name="micMuted" value="false" type="boolean" />-->
     
     <attribute name="streamid" value="" type="string" />
     <attribute name="username" value="" type="string" />

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/UserManager.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/UserManager.java?rev=1448514&r1=1448513&r2=1448514&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/UserManager.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/UserManager.java
 Thu Feb 21 05:18:35 2013
@@ -365,10 +365,7 @@ public class UserManager {
                                CriteriaBuilder cb = em.getCriteriaBuilder();
                                CriteriaQuery<User> cq = 
cb.createQuery(User.class);
                                Root<User> c = cq.from(User.class);
-                               Expression<String> literal = cb.literal("%" + 
searchstring
-                                               + "%");
-                               // crit.add(Restrictions.ilike(searchcriteria, 
"%" +
-                               // searchstring + "%"));
+                               Expression<String> literal = cb.literal("%" + 
searchstring + "%");
                                Path<String> path = c.get(searchcriteria);
                                Predicate predicate = cb.like(path, literal);
                                Predicate condition = 
cb.notEqual(c.get("deleted"), true);


Reply via email to