I use a Dojo Enhanced Grid to display various data. With a DropDownMenu I give the user the ability to show additional colums.
But this is a little bit uncomfortable. Because the user has to click for every new colum onto the menu.
Is there a possibility to prevent the DropDownMenu from closing? Or should I use another widget for this?
I'd suggest you look into Dojo dgrid, and the ColumnHider extension. It effectively recreates what you're doing, and is available out-of-the-box, including the feature you're after.
An alternate solution is to use a dijit/TooltipDialog, whose default behavior is to stay open when one of its contents is clicked.
yourGrid.openDropDown(); will open the menu back again, and you would not really notice that it was displayed back again after a close.
Related
I have a div that is used to display one of several wizard interfaces; which wizard is dependent upon a menu selection.
Unfortunately, if a user clicks a different menu option, the div is cleared and the new wizard is displayed. There is no chance to clean up the session (which I am using as a conversation scope).
Is there a way to trap the jquery .empty() command, in order to make sure I can clean up any mess before new content is displayed?
With no real code it's hard to answer, but as I can see in docs empty() has no method for binding another function (http://api.jquery.com/empty/) - so my suggestion is to write own function for clearing and allow it's manipulation.
Another way could be with some "dirty form" handling (check if form changed and allow/disallow etc).
I have a link which has two actions. When I click on it, it opens a modal box via "ng-click", but it also transitions state via its "ng-href".
The modal box opening is intended. The state transition is not. However I need the URL in that state transition to persist.
When I try to use $locationChangeStart to prevent the state change, it also prevents the URL from changing. This is not preferable. I've also researched a bit, and found potential solutions in "reloadOnSearch". However it doesn't possible to point to a particular link. Not all of the links on the page do this, the other links are all normal links. Furthermore I don't know how to use reloadOnSearch with ui-router.
The feature I'm trying to implement is similar to Pinterest's overlay of items. When you click on the item, they open up a modal box and change the URL, but the underlying page doesn't change. This allows the end user to copy the URL and share it with their friends, and when they access it, it will actually go directly the item page and not the overlay.
I'm currently using ui-router if that makes anything easier.
Hopefully somebody has a solution?
You can try angular ui bootstrap modal for better integration with angularJS.
Take a look at an example in http://angular-ui.github.io/bootstrap/
Or you may open a modal via data-target="#abc" instead of href="#abc"
I'm using jQuery Mobile 1.1 and I have a fixed toolbar but I want to disable hiding it when a user clicks somewhere in the page. It would even be better if I can set that up for just specific page elements (like clicking on an input box).
I tried many methods that I found on the web (e.g. $.fixedToolbars.setTouchToggleEnabled(false);) but none of them work, probably because of the 1.1 version.
You can check my example here: http://jsfiddle.net/Leqpw/
The using is the JQM v 1.0.x method for disabling the fixed toolbar. There are multiple ways to disable this functionality.
The simplest way is to simply add data-tap-toggle="false" to your toolbar. But if you don't feel like copy and pasting a bunch of times in your project try these other methods.
$('[data-position=fixed]').fixedtoolbar({ tapToggle:false});
You can also configure it so that certain elements will ignore this behavior.
$('[data-position=fixed]').fixedtoolbar({ tapToggleBlacklist: "a, input, select, textarea, .ui-header-fixed, .ui-footer-fixed" })
Update added more info for a more complete answer.
All you need to do is add the following attribute to your header
data-tap-toggle="false"
and the tap toggling will go away.
I'm developing a Google Chrome extension that makes heavy use of the context menu, and I would like to make certain menu items available only on some domains.
Currently, I am using chrome.tabs.onUpdated and chrome.tabs.onSelectionChanged to check the tab url, and then I add or remove menu items based on a check against a domain list.
Is it possible to just disable the menu items, instead of removing them? I'm hoping for something like this:
chrome.contextMenus.update(id, {"disabled": true});
It's possible now: https://developer.chrome.com/extensions/contextMenus#property-createProperties-enabled
chrome.contextMenus.update('your-id', {
enabled: false
});
Unfortunately you cannot. That would be a neat feature I suppose. Feel free to submit a feature request http://crbug.com (Make sure you mention any valid use cases for it).
An old post but maybe someone will find this answer useful.
As of Chrome 62 the following works (puts cleaner logic on large context menus):
https://developer.chrome.com/apps/contextMenus#method-update
After the menu has been created, update the menu as follows:
chrome.contextMenus.update(intId-or-stringId, {"visible": true});
with toggle:
chrome.contextMenus.update(intId-or-stringId, {"visible": false});
Removing and creating menus will mess the order of the menu (new menus get placed at the bottom). Enabling and disabling still leaves the menu cluttered up. The visible option keeps the original order of the menu intact.
http://findaccountingsoftware.com/directory/gba-systems/fams-fixed-assets-management-system/
this site contain a tab container. On Applications tab clicking on + sign it goes to expand, I want to know this process name. How to do it?. There is a strange thing occur clicking on + sign expand automatically scroll move and focus on text. What this process name is. How to do that?
This effect is called an 'accordion' menu. jQuery UI has a great one which you can use and also has some great documentation explaining how to use it :)
http://jqueryui.com/demos/accordion/
Beautiful full customization accordion in Bootstrap.
Please refer the following documentation.
https://getbootstrap.com/docs/5.0/components/accordion/