dgrid support for aria-sort attribute - wai-aria

It looks like Dgrid doesn't set aria-sort attribute when doing the sorting. What would be the best/easiest way to do this - override updateSortArrow() method? Listen to dgrid-sort event? Another option?
Thanks

Related

How to Trigger keyup event on Dojo?

I'm using Dojo in my aplication that uses the Arcgis Map Api.
I need to set the value in the Input text (Geocoder, widget from the API) and trigger the keyup event so the autocomplete would works.
Anyone knows how to do that?
The easiest way is to fetch the event like this:
on(dom.byId("yourNodeName"), "keyup", callfunctionXY);
regards,Miriam
Assuming you want to set the Geocoder's text value programmatically and then trigger the Geocoder's auto-complete based on the value you set, this seems to work:
var thePlace = "42 Wallaby Way";
//var geocoder is of type esri/dijit/Geocoder
geocoder.value = thePlace;
geocoder.inputNode.value = thePlace;
geocoder._autoComplete();

D3.js: listen for changes to an attribute?

Is it possible, in D3.js, to listen for changes to a element attribute?
For example, say I have the following selection:
var myDiv = d3.select('#myDiv);
Is there any way I can create a listener that will do something whenever any of myDiv's attributes change?
You cannot do this in D3 itself. This question has a few options in Javascript though.

ckeditor dynamically add uiElement

I want to dynamically add UIElements to a dialog depending on the value of another uiElement..I believe what i need is defined here : http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.contentObject.html#add. unfortunately, there is no usage example..What object do i need to create to use this function? Ive tried dialog.add(), but this does not work? Can someone help me put here please?
Thanks
You can do it by using the addUIElement method.
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#.addUIElement
CKEDITOR.dialog.addUIElement(typeName, builder)

Flex 4 Alternative to partAdded() in an ItemRenderer

I'm working on an application which uses a List and some itemRenderers. I have a button displayed in the "selected" state automatically set by the List component. This button is supposed to dispatch a custom event when clicked. Problem is, I don't know how to add my event listener, and I don't want to use 'click=""' because it's kinda dirty IMHO.
/
If it was a SkinnableContainer, I could override the partAdded() but I couldn't find anything similar in the ItemRenderer or the DataRenderer.
Any hints?
Thanks !
You may use the button creationComplete event to add the listener.
Or, for complex itemRenderers I usually create my own that extends SkinnableComponent and implements IDataRenderer. You can then override partAdded/partRemoved functions. Note that you will also need to define and support the skin states (hovered, selected...).

CakePHP 1.3: Detect ajax request in view

Before Cake 1.3 I would check for an ajax request with a simple $ajax->isAjax(). Now that the AjaxHelper has been deprecated, I'm looking for the proper way to check for an ajax request in my views. I can't find anything in the JsHelper or HtmlHelper methods. This seems like a really simple thing, I hope I'm not missing something obvious!
By the way, I'm aware of the RequestHandler component ($this->RequestHandler->isAjax() in controller), but again I'm looking for help on how to do the ajax detection in my views.
Thanks.
Can you not use the RequestHandler component to set a view variable in the beforeFilter function of app_controller?
Something like this:
$this->set('isAjax', $this->RequestHandler->isAjax());
This way you can simply check $isAjax in your views.
In views check if $this->params['isAjax']

Resources