2009-02-02 14:36:08 +00:00
|
|
|
/*
|
|
|
|
* tabs_tickets.js
|
|
|
|
*/
|
|
|
|
(function($) {
|
|
|
|
|
|
|
|
module("tabs: tickets");
|
|
|
|
|
2009-02-03 13:37:54 +00:00
|
|
|
test('#3627 - Ajax tab with url containing a fragment identifier fails to load', function() {
|
|
|
|
// http://dev.jqueryui.com/ticket/3627
|
|
|
|
expect(1);
|
|
|
|
|
2011-03-27 02:14:17 +00:00
|
|
|
el = $('#tabs2').tabs({
|
2011-03-27 20:37:43 +00:00
|
|
|
active: 2,
|
2011-04-04 21:06:13 +00:00
|
|
|
beforeLoad: function( event, ui ) {
|
2011-03-27 02:14:17 +00:00
|
|
|
event.preventDefault();
|
2011-04-05 15:28:05 +00:00
|
|
|
ok(/test.html$/.test( ui.ajaxSettings.url ), 'should ignore fragment identifier');
|
2011-03-27 02:14:17 +00:00
|
|
|
}
|
|
|
|
});
|
2009-02-03 13:37:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
test('#4033 - IE expands hash to full url and misinterprets tab as ajax', function() {
|
|
|
|
// http://dev.jqueryui.com/ticket/4033
|
|
|
|
expect(1);
|
|
|
|
|
2011-03-27 02:14:17 +00:00
|
|
|
el = $('<div><ul><li><a href="#tab">Tab</a></li></ul><div id="tab"></div></div>');
|
|
|
|
el.appendTo('#main');
|
|
|
|
el.tabs({
|
2011-04-04 21:06:13 +00:00
|
|
|
beforeLoad: function( event, ui ) {
|
2011-03-27 02:14:17 +00:00
|
|
|
event.preventDefault();
|
|
|
|
ok( false, 'should not be an ajax tab');
|
|
|
|
}
|
|
|
|
});
|
2011-03-26 20:49:14 +00:00
|
|
|
|
2011-04-05 15:28:05 +00:00
|
|
|
equals($('a', el).attr('aria-controls'), 'tab', 'aria-contorls attribute is correct');
|
2009-02-03 13:37:54 +00:00
|
|
|
});
|
|
|
|
|
2009-02-02 14:36:08 +00:00
|
|
|
})(jQuery);
|