Pupdate
This commit is contained in:
parent
841a715deb
commit
28b5be76c5
37 changed files with 1717 additions and 1437 deletions
|
|
@ -1,7 +1,7 @@
|
|||
$(function() {
|
||||
$(document).ready(function () {
|
||||
// when hovering over arrow, add highlight (only if inactive)
|
||||
$("h3.methodToggle").hover(function () {
|
||||
if (!$("h3.methodToggle").hasClass('active'))
|
||||
$("i.methodToggle").hover(function () {
|
||||
if (!$("i.methodToggle").hasClass('active'))
|
||||
$(this).addClass("methodToggleHover");
|
||||
},
|
||||
function () {
|
||||
|
|
@ -10,26 +10,45 @@ $(function() {
|
|||
);
|
||||
|
||||
// after expanding the hidden description, hide the ellipsis
|
||||
$('.signature-call, .signature-returns', '.signature').click(function() {
|
||||
$("i.methodToggle").click(function() {
|
||||
var $article = $(this).closest('.article'),
|
||||
$arrow = $('h3.methodClicker', $article);
|
||||
$arrow = $('i.methodClicker', $article);
|
||||
|
||||
if (!$article.hasClass('methodToggleOpen') || this.force) {
|
||||
$article.addClass('methodToggleOpen');
|
||||
$arrow.removeClass('inactive').addClass('active');
|
||||
|
||||
var data = location.hash = $arrow[0].id.replace(/^js_/, "");
|
||||
var data = $arrow[0].id.replace(/^js_/, "");
|
||||
location.hash = data + "#nav=api";
|
||||
scrollTo(null, data);
|
||||
}
|
||||
else {
|
||||
$article.removeClass('methodToggleOpen');
|
||||
$arrow.removeClass('active').addClass('inactive');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$('.signature-call, .signature-returns', '.signature').click(function() {
|
||||
var $article = $(this).closest('.article'),
|
||||
$arrow = $('i.methodClicker', $article);
|
||||
|
||||
if (!$article.hasClass('methodToggleOpen') || this.force) {
|
||||
$article.addClass('methodToggleOpen');
|
||||
$arrow.removeClass('inactive').addClass('active');
|
||||
|
||||
var data = $arrow[0].id.replace(/^js_/, "");
|
||||
location.hash = data + "#nav=api";
|
||||
scrollTo(null, data);
|
||||
}
|
||||
else {
|
||||
$article.removeClass('methodToggleOpen');
|
||||
$arrow.removeClass('active').addClass('inactive');
|
||||
}
|
||||
});
|
||||
|
||||
$('.related-to', '.metaInfo').click(function(){
|
||||
location.hash = $(this).find('a').attr('href').split('#')[1];
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ var disqus_identifier = fileName;
|
|||
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue