EasyUI Forum
May 14, 2024, 04:31:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Pager: add menu  (Read 6660 times)
digo
Newbie
*
Posts: 26


View Profile
« on: June 28, 2016, 10:40:10 PM »

Hi!

I try to extend pager with a menu, but menu-window remains closed.
Linkbuttons work fine.

Code:
<div id="bb">
<a href="javascript:void(0)" id="DigoMenuButton12345" class="easyui-menubutton"
data-options="menu:'#digoMM1',iconCls:'icon-edit'">Edit</a>
<div id="digoMM1" style="width:150px;">
    <div data-options="iconCls:'icon-undo'">Undo</div>
    <div data-options="iconCls:'icon-redo'">Redo</div>
    <div class="menu-sep"></div>
    <div>Cut</div>
    <div>Copy</div>
    <div>Paste</div>
    <div class="menu-sep"></div>
    <div data-options="iconCls:'icon-remove'">Delete</div>
    <div>Select All</div>
</div>
</div>

Javascript:

Code:
var pager = $('#dg').datagrid('getPager');
       pager.pagination({buttons:$('#bb').clone()});

Any suggestions?

Thanks
Digo
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 28, 2016, 11:34:55 PM »

Please use this code instead.
Code:
pager.pagination({buttons:$('#bb')});
Logged
digo
Newbie
*
Posts: 26


View Profile
« Reply #2 on: June 28, 2016, 11:53:30 PM »

Sorry, no changes.
menu-button is visible and seems to be active, but when I click the button, nothing happens
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: June 29, 2016, 01:06:36 AM »

Please look at this example http://code.reloado.com/itariy3/edit#preview. It works fine.
Logged
digo
Newbie
*
Posts: 26


View Profile
« Reply #4 on: June 30, 2016, 04:51:10 AM »

Hi!

I tried to create an example -

*) I need to switch the view
*) I need 2 Button for excel-export in pager
*) menu for view should also be within pager


http://codepen.io/anon/pen/oLWXJO?editors=1010

My example demonstrates 2 problems:

*) I canĀ“t add menu and button (id: bb and id: Digobb)
*) search/add/edit buttons disappear when view is changed

Any suggestions?

Thanks
Digo

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: June 30, 2016, 07:38:59 PM »

You share the buttons between different views, so you need to backup the buttons before re-creating the datagrid. Please try this updated example http://code.reloado.com/itariy3/2/edit#preview
Logged
digo
Newbie
*
Posts: 26


View Profile
« Reply #6 on: July 04, 2016, 09:47:08 PM »

Thanks! Works fine!

Digo
« Last Edit: July 05, 2016, 05:47:55 AM by digo » 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!