This commit is contained in:
C9 2012-09-12 21:17:14 -04:00
commit 28b5be76c5
37 changed files with 1717 additions and 1437 deletions

View file

@ -11,15 +11,6 @@ $(function () {
$selNavLink.addClass('currentItem');
}
// init prettyprint
$('pre > code').addClass('prettyprint');
prettyPrint();
var baseTitle = document.title,
// base (general) part of title
pathName = window.location.pathname,
fileName = pathName.substring(window.location.pathname.lastIndexOf("/") + 1);
if (window.addEventListener) window.addEventListener('load', loadCallback, true);
else window.attachEvent('load', loadCallback, true);
@ -31,7 +22,6 @@ $(function () {
if (query) {
input.value = "";
input.blur();
var currentVersion = $('#currentVersion').text();
var url = "https://www.google.com/search?q=" + encodeURIComponent("site:ace.ajax.org/api" + " " + query);
window.open(url);
}
@ -79,11 +69,10 @@ $(document).ready(function () {
else sx = 0;
$('.members').each(function (i) {
var position = $(this).position();
var $classContent = $(this).closest('.classContent');
$(this).scrollspy({
min: $classContent.position().top - 35,
min: $classContent.position().top + 5,
max: $classContent.position().top + $classContent.height() - 35,
onEnter: function (element, position) {
var $pagination = $(element);
@ -94,8 +83,7 @@ $(document).ready(function () {
$paginationContent.css('top', 0);
$pagination.addClass('shadow').stop().css({
height: 31,
'top': 33
height: 31
}).closest('.classContent').addClass('srolled');
$tabs.addClass('tabsSansBorder');
@ -133,7 +121,7 @@ $(document).ready(function () {
});
});
$('span.methodClicker, article.article, h3.methodClicker').each(function () {
/*$('span.methodClicker, article.article, i.methodClicker').each(function () {
var a = $(this);
var constructorPos = a.attr("id").indexOf("new ");
@ -144,28 +132,21 @@ $(document).ready(function () {
}
a.attr("id", objName);
});
});*/
$('.brand').parent('.dropdown').hover(
function () {
$(this).addClass('open');
}, function () {
clearMenus();
});
$('.versions').hover(
function () {
$(this).addClass('open');
}, function () {
clearMenus();
});
function showMethodContent() {
if (!location.hash) return;
var $clickerEl = $('span#' + location.hash.replace(/^#/, '').replace(/\./g, '\\.'));
var locationHash = location.hash.replace(/^#/, '').replace(/\./g, '\\.');
var equalsPos = location.hash.indexOf("=");
if (equalsPos >=0) {
locationHash = locationHash.substring(0, location.hash.indexOf("="));
}
var $clickerEl = $('span#' + locationHash);
if ($clickerEl.length > 0 && $clickerEl.hasClass('methodClicker')) {
var p = $clickerEl.parent();
p[0].force = true;