I have a DHTMLxGantt chart I'm using that needs to have links on specific tasks without interfering with either the text on the data bars or in the description when you click on a data bar.
I have gotten the links to apply in a way that works for what I'm working on, however once you start scrolling and a task "leaves" the screen, it loses the href attached to it on load and defaults back to just showing the task name from the data passed into the API.
Is there a setting or some kind of function that I might have missed that would disable this data refresh on scrolling? I'm guessing this is a built-in feature with DHTMLxGantt, and so if this is not possible then we will have to proceed with just passing in the link HTML into the data array we give the API.
Thanks for any advice in the future.
If you modify the DOM objects inside the Gantt container, all the changes will be lost after Gantt repaints the data. If you need to display custom data or HTML elements inside the task bars, you need to specify them in the task_text template:
https://docs.dhtmlx.com/gantt/api__gantt_task_text_template.html
Here are examples:
https://snippet.dhtmlx.com/gloya4d1
https://snippet.dhtmlx.com/7kfi9tc4
Related
As the title states, I need to filter results of an associated view based on a record's field value and user permissions.
I've used some Javascript to achieve this whenever the iFrame loads, but if the user switches to a different view, my Javascript is not called and the filtered records come back. I've tried to implement an event listener for various changes within the iFrame, but haven't been able to get what I need. I've gotten onclick to call my function whenever the user opens the view dropdown, but I need it to call whenever they actually switch views.
Am I over complicating this and there's a native way to do this? Or does anyone know how to detect changes within an iFrame?
Unfortunately there’s no native config to do it by OOB. I recommend these.
Don’t rely on associated view, as the name suggests it’s for seeing all the associated records. Remove navigation item in Form editor to remove them if you don’t want your users to see it
Use Subgrid for all your different needs, but not with view switcher, as again you will get roadblock of view switch triggers, etc. also this is going to be unsupported approach to rig the FetchXml with your custom filters
Custom HTML with grid is better or even PCF control of your own to take query & filters
Plugin on RetrieveMultiple can be used in worst cases
I have a setup where I display a list of buttons and clicking on the buttons triggers a function that contacts a firebase database and gets the contents of a 'slide' that is to be shown to the user. The function then clears the content of the page and then creates elements from the data acquired from the database.
Now obviously, when I press back browser button once I've replaced the content, it won't take me back to the previous content. But I believe that my user's experience will be much better if it actually took them back to the list of buttons. I have two faint ideas on how to go about solving this problem but I'm lacking in specific details of how I can go about it.
Possible Solution 1:
Some way to dynamically create a new page using javascript and then serve it to the user.
Possible Solution 2:
Some way to simulate that the page has changed location. Maybe using anchoring links.
Let me know if you have any other solutions in mind or if you know how I should go about implementing these. Your help will be much appreciated. :D
I have an HTML page that has an option for drag-n-drop and a "Preview" button. I want to call a function on the click event of that button, which will fetch all the files that are dragged onto the page. When I press this button, it opens a <px-modal> (a popup which displays some data), and it has a dropdown (<paper-dropdown> and <paper-item>), which should display the filename fetched earlier.
So I have the data, but I don't know how to store it or display it as dropdown content.
I have tried the <template> tag, but it fires on page-load when I need it to fire after the files are dropped onto the page. Otherwise, the data is null.
How do I solve this?
Without some code to look at, it's hard to help you but in general, my advice will be to use a service to store your data and all your directive/controller that needs to have access to the data should havce a dependency on this service.
Have a look at option 1 on this answer
If that's not what you're looking for, post more details, create a jsFiddle to show us where you are so we can help you better.
I am using bokeh to embed a chart into an html template served by flask. I am using the autoload server method which returns a script which is then embedded into the html by the template renderer.
What I would like to do next is update the plot via a ajax type request, via a button click on hte same page, without necessarily having to replace the whole script which came along the first time the page loaded. It seems like it should be possible to just update the plot id or something similar so that the chart changes but without the brute force of replacing the whole script each time. Is this possible and how would it be done?
Thanks!
Hi this is currently possible, but difficult. We are currently working on a PR:
https://github.com/ContinuumIO/bokeh/pull/1274
that will be merged in the next few days (today's date: 2014.10.19) that will make things easier. It adds a "Bokeh.index" that contains all the top level objects, so that you can reach in and grab the data sources more easily and update them. Then there is a follow on PR to create an example just like you describe:
https://github.com/ContinuumIO/bokeh/pull/911
It may be a few weeks before I have time to finish that one, I would suggest subscribing to the issue on GH so you can be updated when it is ready.
I have a website, and I am making widgets for it. Those widgets are draggable. I was wondering how I would save the positions of the widget (And if it is hidden or not [disabled or enabled]), and load the positions and if it is hidden or not when you join the website again (With the same user). Thank you for your time, please post comments if you don't understand what I need.
I am assuming that your widgets are in a <ul>, one <li> per widget which is quite normal.
Be able to position them
You need to arrange the widgets in a specific order in the first place. Imagine you already did the hard work and have the data that a user would have. Hard-code that and get your modules to appear correctly. Change the data, see if the modules appear as you expect.The user needs to drag them. jQuery draggable is your friend.
Prove you can get your data
Be able to get the order of widgets from the page after they've moved. draggable example shows a .serialize() function. Also you need to know which is on and which is off. You can create another list using jQuery .map() which can return their ID and state if you ask it nicely. Alert to the screen, write to the document, or preferably use console.log().
Interact with the server
You can skip this if you want to test using just cookies because the browser can set those.
But if you want to store this with the user's info in case they log out, start a new session or use another computer you'll need to use a database.
You need to know about sending data from browser to the server using ajax. jQuery is your friend.
You need to learn about storing user info in the database.
Restore the positions
You want to be able to set the positions of the widgets from a list that isn't hard-coded, so be able to order the widgets correctly on page load using the data that you saved. You did this in the first step but with hard-coded data.
What you will have to do is:
Save the status at a given time. For example when you change it.
$('#toBeDragableId').draggable({
// options...
drag: funciton(event,ui){
theUserposition = ui.position;
}
});
You need to save theUserposition in a consistent way, like a database or using cookies or client side storage. Afterwards, you need to recove it and set it when you load the page.
Similar Question
Example using Cookies