Addon toolbar - create button to show back button history? - firefox-addon

I have a toolbar and want to create a button that will display a drop down list of the back button history which the user can select and go back to that page.

Check the Firefox source to see how it's implemented. Open source and all that.
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.xul#507
http://mxr.mozilla.org/mozilla-central/

Related

Show a popup from a popup in DNN

In DNN is it possible to navigate to a different popup control from another popup control?
I have a pop up edit control with some buttons. When I click on one of the buttons I would like to show a different edit control in the pop up window.
I have tried using this code in the button's click handler:
Response.Redirect(EditUrl("", "", "MyControlKey"))
but when I click the button Firefox shows a "Corrupted Content Error" in the pop up window.
Can this be made to work, and if so how?
Never mind I figured it out. This seems to do what I want:
Dim url = DotNetNuke.Common.NavigateURL("MyControlKey", $"mid={ModuleId}", "popUp=true")
Response.Redirect(url)

How do I create a lightbox in AppDrag?

I would like to have a Youtube video play in lightbox format. Is there a way to achieve that using the AppDrag CMS editor?
First create a new page in your project.
Keep the page format as a landing page, removing thus the header/footer.
in the new page, click on the "+" button on the left then click on ELEMENTS > Medias and Drag a youtube element into the blank section and remove the placeholder text there.
Right click on the section containing the video, click on SECTION > Edit > Position and there check the "full height" checkbox.
Go back to your original page.
Open the button you would like to use to trigger the video, and select the Link tab.
Scroll to Website Page -> select the page you have created earlier.
Then a bit lower, still in the Link tab, select "Open in -> Modal".

How do I delete menu item created by createAddonMenu() in Google Script

I created an add-on menu for Google Sheet by using script SpreadsheetApp.getUi().createAddonMenu(). But as requested by our customer, instead of putting this menu under Add-ons, now we put this menu on top menu by using SpreadsheetApp.getUi().CreateMenu() and want to remove the menu under Add-ons. I tried SpreadsheetApp.getActive().removeMenu() but it doesn't work. Is anyone know how to remove the Add-ons menu item?
SpreadsheetApp.getActiveSpreadsheet().removeMenu('Custom Menu');
Reloading the Spreadsheet with Ctrl + R doesn't work to re-execute onOpen(), because the Spreadsheet App overrides the keys' function and reloads the Spreadsheet content within the Google App. To really reload, you may press Ctrl + F5 or use the Browser's Reload button or click into the address bar and hit Enter.
Some Examples for creating, editing and removing menus / menu items:
http://apps-script-google.blogspot.com/2015/03/custom-menu-create-delete.html
I realized the SpreadsheetApp.getUi().createAddonMenu() was in onOpen(), that means this Add-on menu item was only created when the sheet is opening. That means if the sheet is closed, the menu item will not exist. So just modify menu items in the script, close the sheet and re-open it, the menu item will be change accordingly.

jQuery Tabbed UI using AJAX - switching between tabs previous view

Let's say I have two tabs tabA and tabB. When I click on tabA the first page of that section appears, call it tabA1. If I click on a link on that page then page tabA1 is replaced with tabA2. If I then click on another tab, say tabB, and then go and click on tabA again I get an image of tabA2 lingering for a bit.
How can I make it so that clicking tabA will always show tabA1 straight away? Is it saving it in the cookies for fast access?
Before switching additionally try setting the content in the tab (or equivalent wrapper) to display : none.
This is happened to me and that's how I fixed it. Although I know it fixes the symptoms and not the exact problem.

show <rich:tab> contents while navigating only if action Performed is YES

I am using RF3.3 and JSF(2.0) wiht JSPs in the project.
My page contains 4 tabs inside a tab panel.
When page is first loaded, the TAB1 is automatically selected which is ok.
Now before user navigate from one tab to another tab I need to show him a pop up panel asking his confirmation to move from one tab to another. So when User present on TAB 1 clicks on TAB2 I want a pop up panel asking user whether he is sure to navigate to TAB2.
The problem is: Once I click tab 2 the action listener present with <rich:tab> is fired and tab2 is rendered and only then pop up panel comes.
Is there any way to open pop up panel once user click on TAB 2 and only if he clicks YES in pop up panel the contents of TAB 2 is shown.
I cannot use disabled attribute since using that I won't be able to click on TAB 2 and my pop up panel won't open.
<rich:tabPanel id="tab" switchType="ajax" headerSpacing="10px"style="overflow:auto">
<rich:tab binding="#{Bean.firsttab}" id="tabOne" style="overflow:auto" styleClass="richTab" label="TAB ONE" actionListener="#{Bean.refresh}" switchType="ajax">
<rich:tab binding="#{Bean.secondtab}" id="tabTwo" style="overflow:auto" styleClass="richTab" label="TABTWO" actionListener="#{Bean.refresh}" switchType="ajax">
</rich:tabPanel>
I preferably don't want to use Javascript to achieve the same. How can I achieve this in JSF?
Can you please try using onlabelclick inside <rich:tab. Call a JS method inside this and return a boolean to proceed to the action or not. Hope this works. If it worked kindly post your code snippet in this.
I achieved the same by binding the tab with the backing bean and using the property of the tab to render and rerender the tab based on some conditions...

Resources