EasyUI Forum
September 14, 2025, 05:36:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Dynamic menu for tree on: June 14, 2019, 11:23:24 AM
I need to create a context-menu on a tree but the contents of that tree depend on the type tree-node (folder or document). \

I can build by menu by appending items to an empty menu but I the next time I create a menu it appends to the last one so I need to clear the menu at the start of the process. This is eluding me for now.

Any hints or samples will be helpful.
2  General Category / EasyUI for jQuery / Re: clear all menu items on: June 14, 2019, 11:18:12 AM
I couldn't get this to work. Perhaps because I do not have menu-text in my page. Can you include a more complete example here please.
3  General Category / General Discussion / Drag-Drop from TREE to a DIV tag on: March 17, 2016, 01:20:59 AM
I've implemented a drag-drop from a Tree to a DIV tag which is droppable - is it possible to obtain x-y coordinates on the drop zone?  Would prefer coordinates relative to the DIV tag but will settle for relative to browser top-left.

Thanks in advance,

Richard
4  General Category / EasyUI for jQuery / Tree onDrop on: February 21, 2016, 10:34:39 AM
I need to send drag-drop details back to the server with an ajax call.

However the onDrop(target, source, point) function gives me the target as the DOM element, the source is the node being dragged. What I need is the data-item where we're dropping so how do we get from the DOM-target to the tree-node where we drop?

5  General Category / EasyUI for jQuery / Re: Dynamic Icons on Tabs on: November 02, 2015, 08:13:20 AM
This worked really well and when data in the tab changes I can add the SAVE icon which fires the function when clicked. But, here's my problem:  I need to know the TAB number which holds the pressed icon.  Bearing in mind that it quite possibly won't be the SELECTED tab.  How can I get the Tab number inside the function?  I also need to keep in mind that some tabs may have been closed which may mess with any saved values.

Any suggestions?

Code:
var t = $('#tt');
var p = t.tabs('getSelected');
t.tabs('update', {
  tab: p,
  type: 'header',
  options: {
    iconCls: 'icon-ok',
    tools:[{
      iconCls:'icon-mini-refresh',
      handler: function(){
        alert('SAVE TAB #'+tabNo);
      }
    }]
  }
})
6  General Category / EasyUI for jQuery / Re: Dynamic Icons on Tabs on: November 01, 2015, 02:42:48 AM
Can I add an event handler to the icon at the same time? Something like:   (this didn't work out)
Code:
var t = $('#tt');
var p = t.tabs('getSelected');
t.tabs('update', {
    tab: p,
    type: 'all',
    options: {
        iconCls: 'icon-save',
        handler:function() {
            console.log('SAVE');
        }
    }
});
7  General Category / EasyUI for jQuery / Dynamic Icons on Tabs on: October 31, 2015, 03:09:42 AM
I want to programatically add an icon to a tab - the tab contains data which needs saving and once the data is dirty I want to place a SAVE icon on the tab.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!