Kendo UI Autocomplete open link in same tab/window - kendo-ui

Below example allow us to open a link in a new tab/window when user selects item from the AutoComplete.
http://jsbin.com/EQamewI/2/edit
How to modify window.open(href) to open the link in same tab/window?

Instead of window.open(href) use location.assign(href);
Documentation: http://www.w3schools.com/jsref/met_loc_assign.asp
If you are in an iframe, you can use top.location.assign(href);

Related

Cypress. Get a list of opened tabs

Is it possible to make a list of opened tabs?
The case is:
I click on a button
It generates the link and opens it in a new tab
I have to navigate to this page and do some verifications
In case that Cypress does not support multi-tabs. It would be good to have a list of the opened tabs. So I can navigate to them.
According to the official documentation, Cypress'll never have multi-tabs support. What you could do, however, for your test case is:
Check the links open in new tabs like so: cy.get('a[href="/index"]').should('have.attr', 'target', '_blank').
Visit the href like so: cy.visit('/index.html').
Assert the visited page's content.
If you need inspiration, you could use this recipe for handling tabs & links.

Remove upload tab from Link menu

Is there a way to remove the "Upload" tab when using the Link dialog? I don't need it removed globally, just in the Link functionality.
See config.dialogRemoveTabs:
config.removeDialogTabs = 'link:upload';

N2CMS: how to add popup conent

I have a news-type website that I am looking to create using N2CMS, but besides the regular operations (being able to see a calendar, viewing lists of news, viewing news details etc.), part of the content in the website is displayed in "modal" popups (similar to the ModalPopupExtender from the AjaxToolkit) inside the page (for example if you click Login, a popup panel appears with the login controls).
My question is: is there a way of adding a handler for a link, and displaying a "modal" popup when the link is clicked? If so, can this be done from the template GUI editor (and how)?
Thank you
N2CMS doesn't have any built-in handlers to create modal pop-ups for links. However, N2CMS does ship with the Jquery JavaScript library. My suggestion would be to use JavaScript in your site template to select and format the desired links with modal dialogs -- but that can't be done from the GUI editor, you'd need to do it in the template code directly.

Options page for Firefox addon using the Add-on Builder (JetPack)

I am developing a Firefox extension and want to open a custom html page where the user can adjust the settings. I am able to do it in different ways, but would like to use the standard Options button that is shown in the add-on manager of Firefox.
I have seen some documentation about it, but I am having problems on finding proper documentation for this function using the online Add-on Builder:
Preferences system,
Inline options,
Simple prefs.
Does anybody know how to just add that standard Options button that is shown in the add-on manager and handle its click event to show a custom options page? (just like it's possible in Google Chrome)
Builder projects have an 'Properties' dialog that has a field you can paste the extra JSON in that you need to create preferences:
https://www.evernote.com/shard/s1/sh/cdb97850-935d-4cf1-95f1-a25c130d1498/4b0b2553f3aa85e4d6489c1d50492c97
( fixed the link, sorry )
Here's an example in builder that implements all the different types, and contains documentation as well:
https://builder.addons.mozilla.org/package/60337/latest/
You'll notice that one of the type of prefs you can define is a 'control' pref, essentially a button that emits a custom event you can listen of and react to from main.js. You could then open a new tab or addon-page with additional preferences?
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/simple-prefs.html#prefs

keep dropdown list open in windows form

How can keep the dropdown list open after the users click on one of the items? I'm working in windowsform with C# and my boss wants me to keep droplist open after users select one item form list. The dropdown list is inside a toolstrip, so it can be checked or unckecked by clicking on it.
you can open a drop down list using jQuery . use this link to learn more , I think there is a way to open drop down list after it close.
Can I open a dropdownlist using jQuery

Resources