EasyUI Forum
April 28, 2024, 12:55:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Show form as MenuItem  (Read 5388 times)
rkpunjal
Newbie
*
Posts: 15


View Profile
« on: October 28, 2015, 08:24:56 AM »

I am struggling to show a login form as a Menu-Item.

This is the form I wanted to show as menu-item

http://www.jeasyui.com/demo/main/index.php?plugin=TextBox&theme=default&dir=ltr&pitem=


The issue issue is that the width of the text-boxes somehow automatically becomes zero or something, effectively destroying the look of the form.

If anybody has the solution to this, please help me.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 28, 2015, 11:37:50 PM »

When display the menu item, call 'resize' method to resize the drop-down panel.
Code:
<a href="#" class="easyui-menubutton" data-options="menu:'#mm'">About</a>
<div id="mm" class="menu-content" style="width:400px;" data-options="
onShow: function(){
$(this).find('.easyui-panel').panel('resize');
}
">
    <div class="easyui-panel" title="Register" style="width:100%;padding:30px 60px">
        <div style="margin-bottom:20px">
            <div>Email:</div>
            <input class="easyui-textbox" data-options="prompt:'Enter a email address...',validType:'email'" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>First Name:</div>
            <input class="easyui-textbox" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>Last Name:</div>
            <input class="easyui-textbox" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>Company:</div>
            <input class="easyui-textbox" style="width:100%;height:32px">
        </div>
       
        <div>
            <a href="#" class="easyui-linkbutton" iconCls="icon-ok" style="width:100%;height:32px">Register</a>
        </div>
    </div>
</div>
Logged
rkpunjal
Newbie
*
Posts: 15


View Profile
« Reply #2 on: November 02, 2015, 02:10:11 PM »

Thank you very much.
That works !!!

and I was also able to retain the form even when I moved away the mouse by adding "hideOnUnhover: false" to the corresponding menu-content.
 Smiley Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!