You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by Susheel Jalali <Su...@CoscendCommunications.com> on 2015/08/02 07:55:41 UTC

Creating New Menu Items at Level 1 (same as EXIT button)

Dear Maxim,

We are adding new menu items at Level 1 (same level as Exit) in the 
conference room to trigger a popup window that will start another 
service (such as send invitation, share/record screen/remote control).  
We have accomplished a few steps.  We would appreciate your help to go 
further.

1.  We renamed Label "File upload" in Language editor to "Upload", but 
after re-compilation we have to redo this every time. Which database 
table should we directly update through SQL command for this? If we 
change Application.properties.xml, after each re-compilation without 
re-installing database, it gives double menu entries.  Is there any 
incremental way of modifying Application.properties.xml without 
reinstalling database after each recompilation?

2. We upgraded the "File upload" menu item to Level 1 (like EXIT button) 
by making the following changes in conferenceMenubar.lzx, and it gives 
the expected popup.  However, a similar approach to make SEND INVITATION 
as Level 1 (same as EXIT button) is not working.  SEND INVITATION works 
at sub-menu / dropdown level.  Would you please advise what we are missing?

The three code snippets are below.  Thank you.

------------------------------------------------

(i) FILE UPLOAD (at same level as EXIT) is working

A) In "itemlist", added the instance of:
       <conferenceFileUpload  name="_uploadbtn"
          text_y_inset="4" text_fontsize="14" down_y_inset="8" 
height="28" />

B)  The corresponding class definition:
             <class name="conferenceFileUpload"  extends="view" . . .  />
  is patterned after:
         <class name="conferenceExitButton" . . />, with no icon image, 
and only single handler:

         <handler name="onclick"  >
              new 
lz.uploadWindowExplorer(canvas.main_content._content.inner,{
                     x:60,uploadmodule:canvas.uploadmoduleimg,
                     parentFolderId:0,
                     isOwner:false,
                     fileExplorerRef:null,
                     isOnlyImage:true,
                     servletName:'file.upload'
                  });
      </handler>

(ii) SEND INVITATION (at same level as EXIT) is not working

A) In "itemlist", added the instance of:
                  <conferenceInvitation  name="_invitebtn" height="34"  />

B)  The corresponding class definition:
       <class name="conferenceInvitation" extends="view" height="34" 
width="${
         this._ctext.width+12 }" text="$once{ canvas.getLabelName(213) }"
         text_y_inset="4" text_fontsize="14" down_y_inset="8"
         visible="${ canvas.currentRoomObj.hideActionsMenu ? false :
                ((classroot.viewType=='conference') ? true : 
((canvas.ismoderator) ?
                   true : ((canvas.isAllowedToDraw) ? true : false ))) }"
   >

    <handler name="onclick" >
         enabled="${ canvas.timeZonesLoaded &amp;&amp; canvas.ismoderator }"
                      new lz.conferenceInvite(canvas,{
                         x:this.getAttributeRelative("x",canvas),
y:this.getAttributeRelative("y",canvas)+this.height,
                         btnRef:this
                   });
            this.parent.parent.sendOpenMenu(this);
    </handler>

   <view width="1" height="${ parent.height }" y="0" bgcolor="0xEEEEEE" 
x="${ parent.width-1 }" />
     <labelText labelid="213" name="_ctext" fontstyle="plain" 
fgcolor="0xFFFFFF"
        fontsize="$once{ parent.text_fontsize }" y="$once{ 
parent.text_y_inset }" x="6"   />
        <labelTooltip name="_textToolTip" labelid="1489" 
multiline="false" />
   </class>

<class name="conferenceInvite" extends="baseDropDownMenuList"
         height="${ this._content.height+2 }" width="${ 
this._content.width+2 }">
     <handler name="oninit">
               this.fixWidth();
     </handler>

     <view name="_content" x="1" y="1"
         layout="axis:y;spacing:1" bgcolor="$once{ 
canvas.getThemeColor('menuBackgroundColor') }" >
         <conferencDropDownMenuItem labelid="213" command="cmd_invitation"
                     enabled="${ canvas.timeZonesLoaded &amp;&amp; 
canvas.ismoderator }" />
         <horizontalDropDownSpacer />
     </view>
</class>


(iii) SEND INVITATION at Level 2 is working
A) In "itemlist", added the instance of:
          <baseMenuMeetingsItem text="$once{ 'Invite' }"
                         text_y_inset="4" text_fontsize="14" 
down_y_inset="8"
                         textToolTip="" height="28"
                         visible="${ 
canvas.currentRoomObj.hideActionsMenu ? false : 
((classroot.viewType=='conference') ? true : (canvas.ismoderator ? true 
: (canvas.isAllowedToDraw ? true : false ))) }"
          >
             <handler name="onclick">
                          new lz.conferenceInvite(canvas,{
x:this.getAttributeRelative("x",canvas),
y:this.getAttributeRelative("y",canvas)+this.height,
                                 btnRef:this
                           });
                    this.parent.parent.sendOpenMenu(this);
               </handler>
             </baseMenuMeetingsItem>

B)  The corresponding class definition of
             <class name="conferenceInvite" 
extends="baseDropDownMenuList" . . . />
      is as above in previous case.


-- 

Regards,

Susheel Jalali

Coscend Communications Solutions_
Susheel.Jalali@CoscendCommunications.com_

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>


Re: Creating New Menu Items at Level 1 (same as EXIT button)

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Susheel,

1) String labels are not stored in DB anymore. The only place for
labels Application.properties*.xml files. After label is added/changed in
the file it is _immediately_ in use.
2) Your issue is caused by following:
    1. you have changed label in Language editor
    2. label is in use and displayed as expected
    3. you recompiled application
    4. your new version of Application.properties.xml file is replaced with
version stored in sources, this causes your custom value lost.
To avoid this you need to change both versions
of Application.properties.xml file (in sources and in distribution)

3) according invitation button: it seems you have copy/pasted code without
understanding its meaning :( this part (*in bold*) definitely should be
attribute of (<class name="conferenceInvitation") :
 <handler name="onclick" >
        *enabled="${ canvas.timeZonesLoaded &amp;&amp; canvas.ismoderator
}"*
                     new lz.conferenceInvite(canvas,{
                        x:this.getAttributeRelative("x",canvas),
y:this.getAttributeRelative("y",canvas)+this.height,
                        btnRef:this
                  });
           this.parent.parent.sendOpenMenu(this);
   </handler>



On Sun, Aug 2, 2015 at 11:55 AM, Susheel Jalali <
Susheel.Jalali@coscendcommunications.com> wrote:

> Dear Maxim,
>
> We are adding new menu items at Level 1 (same level as Exit) in the
> conference room to trigger a popup window that will start another service
> (such as send invitation, share/record screen/remote control).  We have
> accomplished a few steps.  We would appreciate your help to go further.
>
> 1.  We renamed Label "File upload" in Language editor to "Upload", but
> after re-compilation we have to redo this every time. Which database table
> should we directly update through SQL command for this? If we change
> Application.properties.xml, after each re-compilation without re-installing
> database, it gives double menu entries.  Is there any incremental way of
> modifying Application.properties.xml without reinstalling database after
> each recompilation?
>
> 2. We upgraded the "File upload" menu item to Level 1 (like EXIT button)
> by making the following changes in conferenceMenubar.lzx, and it gives the
> expected popup.  However, a similar approach to make SEND INVITATION as
> Level 1 (same as EXIT button) is not working.  SEND INVITATION works at
> sub-menu / dropdown level.  Would you please advise what we are missing?
>
> The three code snippets are below.  Thank you.
>
> ------------------------------------------------
>
> (i) FILE UPLOAD (at same level as EXIT) is working
>
> A) In "itemlist", added the instance of:
>       <conferenceFileUpload  name="_uploadbtn"
>          text_y_inset="4" text_fontsize="14" down_y_inset="8" height="28"
> />
>
> B)  The corresponding class definition:
>             <class name="conferenceFileUpload"  extends="view" . . .  />
>  is patterned after:
>         <class name="conferenceExitButton" . . />, with no icon image, and
> only single handler:
>
>         <handler name="onclick"  >
>              new
> lz.uploadWindowExplorer(canvas.main_content._content.inner,{
>                     x:60,uploadmodule:canvas.uploadmoduleimg,
>                     parentFolderId:0,
>                     isOwner:false,
>                     fileExplorerRef:null,
>                     isOnlyImage:true,
>                     servletName:'file.upload'
>                  });
>      </handler>
>
> (ii) SEND INVITATION (at same level as EXIT) is not working
>
> A) In "itemlist", added the instance of:
>                  <conferenceInvitation  name="_invitebtn" height="34"  />
>
> B)  The corresponding class definition:
>       <class name="conferenceInvitation" extends="view" height="34"
> width="${
>         this._ctext.width+12 }" text="$once{ canvas.getLabelName(213) }"
>         text_y_inset="4" text_fontsize="14" down_y_inset="8"
>         visible="${ canvas.currentRoomObj.hideActionsMenu ? false :
>                ((classroot.viewType=='conference') ? true :
> ((canvas.ismoderator) ?
>                   true : ((canvas.isAllowedToDraw) ? true : false ))) }"
>   >
>
>    <handler name="onclick" >
>         enabled="${ canvas.timeZonesLoaded &amp;&amp; canvas.ismoderator }"
>                      new lz.conferenceInvite(canvas,{
>                         x:this.getAttributeRelative("x",canvas),
> y:this.getAttributeRelative("y",canvas)+this.height,
>                         btnRef:this
>                   });
>            this.parent.parent.sendOpenMenu(this);
>    </handler>
>
>   <view width="1" height="${ parent.height }" y="0" bgcolor="0xEEEEEE"
> x="${ parent.width-1 }" />
>     <labelText labelid="213" name="_ctext" fontstyle="plain"
> fgcolor="0xFFFFFF"
>        fontsize="$once{ parent.text_fontsize }" y="$once{
> parent.text_y_inset }" x="6"   />
>        <labelTooltip name="_textToolTip" labelid="1489" multiline="false"
> />
>   </class>
>
> <class name="conferenceInvite" extends="baseDropDownMenuList"
>         height="${ this._content.height+2 }" width="${
> this._content.width+2 }">
>     <handler name="oninit">
>               this.fixWidth();
>     </handler>
>
>     <view name="_content" x="1" y="1"
>         layout="axis:y;spacing:1" bgcolor="$once{
> canvas.getThemeColor('menuBackgroundColor') }" >
>         <conferencDropDownMenuItem labelid="213" command="cmd_invitation"
>                     enabled="${ canvas.timeZonesLoaded &amp;&amp;
> canvas.ismoderator }" />
>         <horizontalDropDownSpacer />
>     </view>
> </class>
>
>
> (iii) SEND INVITATION at Level 2 is working
> A) In "itemlist", added the instance of:
>          <baseMenuMeetingsItem text="$once{ 'Invite' }"
>                         text_y_inset="4" text_fontsize="14"
> down_y_inset="8"
>                         textToolTip="" height="28"
>                         visible="${ canvas.currentRoomObj.hideActionsMenu
> ? false : ((classroot.viewType=='conference') ? true : (canvas.ismoderator
> ? true : (canvas.isAllowedToDraw ? true : false ))) }"
>          >
>             <handler name="onclick">
>                          new lz.conferenceInvite(canvas,{
> x:this.getAttributeRelative("x",canvas),
> y:this.getAttributeRelative("y",canvas)+this.height,
>                                 btnRef:this
>                           });
>                    this.parent.parent.sendOpenMenu(this);
>               </handler>
>             </baseMenuMeetingsItem>
>
> B)  The corresponding class definition of
>             <class name="conferenceInvite" extends="baseDropDownMenuList"
> . . . />
>      is as above in previous case.
>
>
> --
>
> Regards,
>
> Susheel Jalali
>
> Coscend Communications Solutions_
> Susheel.Jalali@CoscendCommunications.com_
>
> 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>
>
>


-- 
WBR
Maxim aka solomax