Dear Maxim,
Are you suggesting that we use RPC mechanism to moderate new menu items,
and we need not modify the code in OpenLaszlo/ Java the way we have done.
Can we use your advised RPC mechanism (using Web services API ) to do
the following:
a. User requests moderator so as to see new menu items (e.g., Math Menu).
b. Moderator allows / denies it.
c. User either sees the Menu appear, or gets a message it is not
available to use (or greyed out).
d. Moderator takes the moderation rights from the user. User cannot
see the new menu item any more.
Would your suggestion / RPC method make calls into Web services methods
only, or even into OpenLaszlo /Java / hibernate.
To help us learn about this method in OM context, would you point us
towards the appropriate examples to review and implement?
We looked at RoomWebService and there is just one example related to
menu (addRoom with hideTopBar option).
The RoomWebService class (which invokes RoomManager and adds/ updates
room via RoomDao calls) has methods taking booleans to enable/disable
whiteboard but not the menu items. If we add such boolean for new meu
item(s), which of these classes/methods should we modify.
1. Should we use one of these as an example to create a new
"updateRoomInternalWithHideMenu()" ?
2. How would we refer to a Menu Dropdown (contained in the Menubar of
Lz.canvas) from other classes of Java or OpenLaszlo?
For example, within LZX classes when we used:
// Intended to affect only the current user PRESENT MENU (who applied
for its use and got approved)
canvas.currentRoomObj._conferencemenu._present.setAttribute( "visible",
true );
We get the following warnings/errors:
WARNING @modules/conference/participants/participantListItem.lzx˜191:
reference to undefined property '_conferencemenu'
ERROR @modules/conference/participants/participantListItem.lzx˜191:
undefined object does not have a property '_present'
WARNING @modules/conference/participants/participantListItem.lzx˜191:
reference to undefined property '_present'
ERROR @modules/conference/participants/participantListItem.lzx˜191:
undefined object does not have a property 'setAttribute'
Sincerely,
Susheel Jalali
Web site:www.CoscendCommunications.com
<http://www.CoscendCommunications.com>
------------------------------------------------------------------
CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail
Messages from Coscend Communications Solutions' posted at:
http://www.CoscendCommunications.com/Terms_and_Conditions.html
On 08/31/15 10:53, Maxim Solodovnik wrote:
I believe you can create your RPC method to enable/disable this feature
I would say there is no need to modify setRoomValues
On Thu, Aug 27, 2015 at 2:16 AM, Susheel Jalali <
[email protected]> wrote:
Dear Maxim,
We added a menu item (Math Tool) at the level 1 of Room Menu (same as Exit
button). We would like moderator to moderate this menu item (make it
appear/ disappear) just like the moderator can do for Files menu. We have
created a label ID in Application.properties.xml to serve as a tooltip for
requesting the menu item. We have created a flag attribute
"isAllowedMathMenu” that toggles appearing and disappearing of the menu
item. We want to tie this to the visibility of the Math menu item. When
audience requests moderator rights by clicking on our new icon resource
(mod_mathmenu.png), and is allowed by moderator (allowMathMenu), this
variable would get updated, thereby allowing the Math menu item to appear
(onisAllowedMathMenu) for the audience to use
(via conferenceMenuBar itemlist member's "visible" attribute).
(i) Do we need to define a new method in ScopeApplicationAdapter.java:
applyForMathMenu and then call it via:
canvas.thishib.applyForMathMenu(). It may not be required.
(ii) Should we modify, the setRoomValues method? If so, which one?
// participants.lzx
<netRemoteCallHib name="setRoomValues" funcname="setRoomValues"
or
// mainMethods.lzx
<method name="setRoomValues" args="roomTypeId,roomId,roomObj">
(iii) Should we define a method like:
canvas.thishib.applyForMathMenu.doCall();
Accordingly, which method will run when moderator approves it, and in
that method we would do the following?
(a) Trigger the Room / Menubar to display the new menu dropdown {{ How
? }}
(b) Will updating its "visible" attribute trigger corresponding onvisible
method?
(c) Is it required to implement such "onvisible" method or is it
implicitly triggered?
Below are details
------------------
1. // Application.properties.xml
<entry key="1648">Get Math Tools</entry>
2. In mainAttributes.lzx
<attribute name="isAllowedMathMenu" value="false" type="boolean" />
It should update this to value TRUE when moderator approves the request
from a userwithout giving moderator rightsand also have the visibility of
the Math Menu be tied to this attribute.Should it be subordinate to
"canvas.currentRoomObj", similar to:
canvas.currentRoomObj.hideActionsMenu ?
3. A new icon button is created called: mod_mathmenu_btn.
Also, define a new icon image holder called: mod_mathmenu_rsc
Its icon image is called: mod_mathmenu.png.
And stored in:
~/WebContent/src/modules/conference/flexibleConferenceRoom/resources
4. Add new variable (*allowMathmenu*) to creation call of Moderation
Panel, in file:
*baseConferenceRoom.lzx
*// Near line 103
new lz.moderationPanel(canvas._moderatormenu,{
name:'_moderationPanel',align:'right',
*allowMathmenu*:this.roomobj.*allowMathmenu*,
allowUserQuestions:this.roomobj.allowUserQuestions,
roomName:this.roomobj.name
*
*5. For canvas variable defined earlier, goto participants.lzx
<moderationMiniIconsEventUserList name="_applyAndStatusIcons" x="2" y="2" >
<handler name="onismoderator" reference="canvas" args="m">
this.updateIcons();
</handler>
. . .
// Define here the “on” handler for that, so that it will be called
whenever its value changes:"onisAllowedMathMenu"
<handler name="onisAllowedMathMenu" reference="canvas" args="userObject">
this.updateIcons();
</handler>
6. // moderationMiniIconsEventUserList.lzx
<miniIconsNew name="mod_mathmenu_btn" y="6"
innerResource="mod_mathmenu_rsc" width="16" height="16"
visible="${ (canvas.isAllowedMathMenu) ? false : true }"
showhandcursor="true">
<handler name="onclick">
// Now toggle back the state of miniIcon. Onclick would happen only
after it was visible
this.visible=false;
</handler>
<labelTooltip inittwice="true" labelid="1648" />
</miniIconsNew>
7. In conferenceMenuBar.lzx, inside the itemlist, the menu member's
"visible" attribute)
<baseMenuMeetingsItem text="$once{ canvas.getLabelName(16XX) }" . . .>
. . . .
visible="${ canvas.isAllowedMathMenu ?
((classroot.viewType=='conference') ? true : (canvas.ismoderator ? true :
false )) }"
. . . .
</baseMenuMeetingsItem>
--
Regards,
Susheel Jalali
__
Web site:www.CoscendCommunications.com <
http://www.coscendcommunications.com/>
------------------------------------------------------------------
CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail
Messages from Coscend Communications Solutions' posted at:
http://www.CoscendCommunications.com/Terms_and_Conditions.html <
http://www.coscendcommunications.com/Terms_and_Conditions.html>