ext js accordion - extjs

http://www.myethiopia.org/QuickLinks/accordion.html
Please check this link in IE. I did not have time to figure out why it is not working in Firefox. I am trying to click on a link on the left column and have the page open in the center.
If you click on Weather Station and Oromiya Station, the title opens up fine but the link does not even open. Line No.325 under var menu1, look at the first item for the code. What am I doing wrong?
Second question. I want a round bulltein or outline type of thing (not sure what to call it) to the left of the Oromiya station. HOw can I do that?
Checkbox is not what I am looking for.

If you want to update the centerpanel html you can use the update() function.
In this small example I've added an 'id' to the center panel and then in the handler function for the menu item used this code to show an update.
var centerRegion = Ext.getCmp('centerpanel');
centerRegion.update('<iframe src="http://www.myethiopia.org/QuickLinks/Weather/EthiopiaWeatherStations/Amharastations.html" style="width:100%;height:100%"></iframe>');
I'm not exactly sure what you are trying to do but it looks like you want to load the grid into the centerpanel, you can do that directly without having to load in a separate html page.

Related

React two click handling

I have a coverflow in my program that select an image on click, but I need to have functionality that when you click on the chosen image a second time, it links you to a route.
Like with itunes, you can scrowl side by side the coverflow to chose the correct album and click again to access it's page.
The coverflow has the attribute handleSelect. I want the first click to select the image and make it bigger and in the center of the coverflow, and for the second click to follow the route.
Is it doable?
I use this coverflow: https://github.com/leon-good-life/coverflow-react
Thanks.
For the first click figure out to enlarge image ,You have to do a complete change in you css .It is easier to add the enlargement when hovered, because that makes more sense ,Anyway add counts to the onClick function you are using and then do the complete routing in that function when the clickcCount exedes you limit..

Scroll down on the terms and condition Textbox and click on Agree selenium

I am working on Protractor tests. Recently my web page changed where the terms and conditions are inside a textbox. Button Submit works only when the user scrolls through the textbox and clicks on Agree button. I tried the following option to scroll down but it is not scrolling down. Any help is greatly appreciated.
var scrollbar = element(by.id('terms-conditions'));
var checkbox = element(by.id('checkbox'));
scrollbar.click()
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);')
checkbox.click();
I followed the below link too but no luck.
Protractor: Scroll down
The second js execute statement you are using contains Window.scrollTo which references an open window in a browser. and using it only scrolls the complete window but not the pop-ups that appear inside a browser window
Refer here for documentation on Window.scrollTo
Normally terms and conditions shows up in a pop-up or may be a div and hence Window.scrollTo doesn't work
there are two ways you can do it
SOLUTION 1: use Jquery scrollTop() to scroll inside a specific webElement
Step 1: Identify the exact div that holds your terms of Service scroll bar
Step 2: Refine your js statement by trying directly in Chrome console
$('.modal-body').scrollTop() -> This returns the current position of scroll
$('.modal-body').scrollTop(10000) -> This sets the value of top position
Step 3: Incorporate this in your protractor script
browser.executeScript('$('.modal-body').scrollTop(10000)');
You can professionalize this by passing the element & scroll amount as arguments. Refer here
SOLUTION 2; The best way I see to submit a pop-up is not to deal with interface but to deal with the 'form' element behind it. Similar to how we deal with file uploads.No fuss & effective
May be try something like this, by making button visible first and then submit form
browser.executeScript is an asynchronous call, so you will need to put it into the controlFlow so that it will complete before clicking the checkbox:
scrollbar.click();
browser.controlFlow().execute(function() {
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);');
});
checkbox.click();

change Module position in joomla

I am working on a website using Joomla, how can I change Module position in the picture below
click to see photo
thanks
Since most menus do not allow a search bar to show without it being a drop down item or part of a mega menu, your best bet would be to remove the float:right line of code so it just starts from that left side.

How to Close Angular-Strap Tabs

In my app I have 3 static tabs that get rendered when the application loads. Using ng-grid, when a user double clicks on a row a new tab is generated with the results of that row. My question is..... how do I close the tab? It seems so simple but, I've goggled and tinkered with no results.
What I'd like is that after viewing the results the user would click on a small X near the tab heading to close/dismiss the tab. I've created a plunker http://plnkr.co/edit/ZkamtnBK01h0IvC9Hmjh?p=preview that resembles my tab layout. It has a button that you can click to add a new tab. Any help would be greatly appreciated. Thank you.
you can easily remove tabs by altering scope, http://plnkr.co/edit/AKlmUaRkaYWjOYnPRnWF
$scope.remove = function() {
$scope.tabs.splice($scope.tabs.activeTab,1);
}
These tabs are problably created with templates from the tabs directive, so I suggest using css positioning the element outside the bs-tabs div to get the effect you want

Celerity - Help with popup_browser select list that updates div text on main browser

I'm screen scraping a page that includes a link that spawns a popup window that is comprised of a select list and a button to execute your selection. The objective is to click the link on the main page, make a selection on the pop-up window, click the link to confirm the selection and then view the new selection on the main webpage.
Here are the steps that I'm taking in Celerity and the results:
popup_browser = browser.image(:alt, 'Holidays').click_and_attach
#this creates a new browser to deal with the popup window
popup_browser.select_list(:id, 'ddlSlot1').select_value('Christmas')
#Selecting Christmas from the select list
popup_browser.link(:id, 'btnChangeHoliday').click
#Confirms/Implements selection
popup_browser.close
#Closes popup browser
puts browser.div(:id, 'HolidayName').text
#Here I try to print the updated holiday but nothing is printed (no text value)
Everything seems to work fine except for the last line. I've done some debugging and have confirmed that my selection has been made. It seems that the main webpage is not being updated after I click the ChangeHoliday button on the popup page.
Any thoughts or suggestions would be appreciated.
Thanks in advance for you help.
This turned out to be an easy fix. The only change required for the script to work is to add the resynchronize option to the browser initialization. After doing so the script works as expected.
browser = Celerity::IE.new(:resynchronize => true)

Resources