EasyUI Forum
January 24, 2026, 05:27:33 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 ... 6 7 [8] 9 10
 71 
 on: March 07, 2025, 01:05:34 AM 
Started by drutech - Last post by jarry
Due to the CORS policy, the browser doesn't allow to load contents from different sites. So please set the 'href' page on the same page of your panel.

 72 
 on: March 05, 2025, 11:53:50 AM 
Started by drutech - Last post by drutech
This might just be me, but just confirming.

When setting up the data-options href for a panel, it doesn't load up the page.

I'm creating a page to run off my laptop, no local server and just using JavaScript.

Does this data-options only works when the page is on a severe? If not I'm not sure what is going on.

For testing, I'm using the code for panel href in Documentation on the EasyUI site. Running webpage from my laptop, it just shows loading and nothing else.

I'm guessing that this will work if the page was on a server?

 73 
 on: March 04, 2025, 10:04:36 AM 
Started by korenanzo - Last post by jega
Hi Jarry

And if we want to have a text left align and another text right in same panel title ??


 74 
 on: February 19, 2025, 05:12:36 AM 
Started by jega - Last post by jega
Hi.

Have tested timeline and thought about it in sports

To add:

contentPosition : [before/after] - if before, content is right aligned and when after, it's left aligned

Take a look at the imagefile attached


<body>
    <div class="easyui-panel" style="padding:10px">
        <div class="easyui-timeline" data-options="data:data,formatter:myFormatter"></div>
    </div>

<script type="text/javascript">
      
   $(document).ready(function(){

   })

    var data = [            
      {content:'Goal',contentPosition:'before',time:'10:30',playerName:'Player #1',info:''},
      {content:'Penalty',contentPosition:'after',time:'12:00',playerName:'Player #2',info:'Yellow Card'},
      {content:'Goal',contentPosition:'before',time:'14:30',playerName:'Player #3',info:''},
      {content:'Goal',contentPosition:'after',time:'16:30',playerName:'Player #4',info:''}
   ]

    function myFormatter(row){
       var textContent = '<div>'+row.time+' - '+row.content+'</div>'
       textContent += '<div style="font-size:12px;opacity:0.5">'+row.playerName+'</div>'
       textContent += '<div style="font-size:12px;opacity:0.5">'+row.info+'</div>'
        return textContent;
    }

</script>

</body>

 75 
 on: February 05, 2025, 05:40:47 AM 
Started by Vladzimir - Last post by Vladzimir
Hi everyone! I created a wrapper for EasyUI without dependencies!
https://github.com/Vladzimir/phpEasyUI

 76 
 on: January 31, 2025, 06:00:36 AM 
Started by brucet622 - Last post by brucet622
One other note to anyone else trying this...  If you have cascadeCheck on and you want to uncheck a leaf, you have to make sure the parent is also unchecked.  If not, when the data is loaded, it will recheck the leaf for you.  When the parent is unchecked and a leaf is unchecked but there could be other leaves checked, the system will know to set the parent to intermediate.  That is the only way I've figured out to actually get a parent set to intermediate correctly.

Burce

 77 
 on: January 29, 2025, 03:53:05 PM 
Started by brucet622 - Last post by brucet622
OK, I think I have something that might work. 

1.  Call the getRoots method to get the data in the tree.  This will reflect any changes the user made after the initial load.
2.  Modify the array to reflect what we needed.  For example: roots[0].children[0].checked = true
3.  call the loadData method with the modified data.  This will update the tree, will set any needed states to intermediate, and most importantly NOT reload the tree from the server.

Actually manually calling the check method on the node will check the node but it also caused a reload of the tree from the server, wiping out the change.

Live and learn I guess....

Thanks!

Bruce

 78 
 on: January 29, 2025, 02:36:26 PM 
Started by brucet622 - Last post by brucet622
Thanks for the reply Jesper.

Let me see what I can put together for an example.  I might take the demo you pointed to and then add what I'm trying to do:

The tree gets loaded from the server and the user can then check or uncheck whatever they want.  All that works just fine.  The problem come when they have, say 100 nodes, each with a set of leaves and they want to only check one of the leaves in all the nodes.  That can take 200 clicks!  (100 to expand, 100 to click).   What I want to do is have a button that the user can select which of those they want checked (or unchecked) and have the javascript code do that for them.  Hope that makes sense....

If I do it the way I think you are suggesting, on a button press I would have to grab the contents of the tree, update it with the changes from the button, and then reload the entire tree again with this new data.  That might be the only way I can do it since none of what I've been trying to do has worked so far.  Worth a shot...

Bruce

 79 
 on: January 29, 2025, 12:50:29 PM 
Started by brucet622 - Last post by jega
Hi.

Is it possible to see an example of what you have so far. I use both tree and treegrid in several projects and have no troubles at all.

"When i set checked" are you doing it after the load ? I never do that, but set it checked already in my json data. This way the onCheck is not called.

"When a leaf is checked"
Sounds like it is this sample, that works just fine.
https://www.jeasyui.com/demo/main/index.php?plugin=Tree&theme=material-teal&dir=ltr&pitem=&sort=asc

But show an example

Jesper

 80 
 on: January 28, 2025, 11:59:59 AM 
Started by brucet622 - Last post by brucet622
I have a tree that I load from the server.  I have other buttons that are used to select specific leaf nodes in the tree based upon some selection.  I'm having a few issues:

  • When I set "checked" on a node, the onCheck function is called.  It doesn't hurt anything but can be called a LOT if there are a large number of items to check.  I just disable that until I'm finished.  So far so good.
  • When a leaf is checked, the parent doesn't go to in intermediate state.  I can also check that node but it does put a check there.  Expanding the parent does expand but it still doesn't set it to intermediate.  I haven't found a way to set that manually.
  • The biggest issue is that when the code finishes, the tree is reloaded again from the host wiping out all the changes.  It seems to do this multiple times.  I don't have any explicit code that does that.  Not sure what is happening.  I've setup onBeforeLoad event to return false until we are done but that only stops the first one.  Again, not sure where they are coming from.

Before I go to the next step about filtering the data as it comes from the server based upon what things need to set, is there a better approach here?  Is there a way to stop the reload of the tree automatically?  

Hopefully someone can point me in the right direction.  Thanks in advance!

Bruce

Pages: 1 ... 6 7 [8] 9 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!