We're getting there
7
doc/additionalObjs.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"DOMElement" : "https://developer.mozilla.org/en/DOM/element",
|
||||||
|
"Event" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/lib/event.js",
|
||||||
|
"TextMode" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/text.js",
|
||||||
|
"KeyBinding" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/keyboard/keybinding.js",
|
||||||
|
"Cursor" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/layer/cursor.js"
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@ var panino = require("panino");
|
||||||
|
|
||||||
var srcPath = process.cwd() + "/../lib/ace";
|
var srcPath = process.cwd() + "/../lib/ace";
|
||||||
|
|
||||||
panino.main(["--path=" + srcPath, "-o", "./out/", "-r", "-t", "ACE API", "--skin", "./resources/ace/skins"], function(err) {
|
panino.main(["--path=" + srcPath, "-o", "./out/", "-a", "./additionalObjs.json", "-t", "Ace API Documentation", "--skin", "./resources/ace/"], function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
"node": "~0.6.0"
|
"node": "~0.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"panino" : "~1.0.0"
|
"panino" : "~1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
}
|
}
|
||||||
1056
doc/resources/ace/skeleton/csses/refguide_overrides.css
Normal file
|
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 296 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
|
@ -1,41 +1,4 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
// $(".sideToggler").collapse();
|
|
||||||
|
|
||||||
// var documentURL = location.href;
|
|
||||||
// var lastSlashPos = documentURL.lastIndexOf("/") + 1;
|
|
||||||
// var filenamePos = documentURL.lastIndexOf(".html");
|
|
||||||
|
|
||||||
// var objName = documentURL.substring(lastSlashPos, filenamePos);
|
|
||||||
|
|
||||||
// var menuUl = "menu_" + objName;
|
|
||||||
|
|
||||||
// resize the sidebar/content based on window height;
|
|
||||||
// this enables us to have "inner" scroll bars
|
|
||||||
/*var h = $(window).height();
|
|
||||||
$("#sidebar").css('height', h - 80);
|
|
||||||
$("#content").css('height', h - 100);
|
|
||||||
|
|
||||||
$(window).resize(function(){
|
|
||||||
var h = $(window).height();
|
|
||||||
var w = $(window).width();
|
|
||||||
$("#sidebar").css('height', h - 80);
|
|
||||||
$("#content").css('height', h - 100);
|
|
||||||
}); */
|
|
||||||
|
|
||||||
// clicking on the member title should launch open the
|
|
||||||
// description
|
|
||||||
// $('.member-name').click(function() {
|
|
||||||
// var id = this.id.substring(this.id.indexOf("_") + 1);
|
|
||||||
//
|
|
||||||
// $("h3[id='" + id + "']").trigger('click');
|
|
||||||
// });
|
|
||||||
|
|
||||||
/*$('.memberLink').click(function() {
|
|
||||||
var id = this.id.substring(this.id.indexOf("_") + 1);
|
|
||||||
|
|
||||||
$("h3[data-id='" + id + "']").trigger('click');
|
|
||||||
}); */
|
|
||||||
|
|
||||||
// when hovering over arrow, add highlight (only if inactive)
|
// when hovering over arrow, add highlight (only if inactive)
|
||||||
$("h3.methodToggle").hover(function () {
|
$("h3.methodToggle").hover(function () {
|
||||||
if (!$("h3.methodToggle").hasClass('active'))
|
if (!$("h3.methodToggle").hasClass('active'))
|
||||||
98
doc/resources/ace/skeleton/javascripts/jquery-scrollspy.js
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
/*!
|
||||||
|
* jQuery Scrollspy Plugin
|
||||||
|
* Author: @sxalexander
|
||||||
|
* Licensed under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
;(function ( $, window, document, undefined ) {
|
||||||
|
|
||||||
|
$.fn.extend({
|
||||||
|
scrollspy: function ( options ) {
|
||||||
|
|
||||||
|
var defaults = {
|
||||||
|
min: 0,
|
||||||
|
max: 0,
|
||||||
|
mode: 'vertical',
|
||||||
|
buffer: 0,
|
||||||
|
container: window,
|
||||||
|
onEnter: options.onEnter ? options.onEnter : [],
|
||||||
|
onLeave: options.onLeave ? options.onLeave : [],
|
||||||
|
onTick: options.onTick ? options.onTick : []
|
||||||
|
}
|
||||||
|
|
||||||
|
var options = $.extend( {}, defaults, options );
|
||||||
|
|
||||||
|
return this.each(function (i) {
|
||||||
|
|
||||||
|
var element = this;
|
||||||
|
var o = options;
|
||||||
|
var $container = $(o.container);
|
||||||
|
var mode = o.mode;
|
||||||
|
var buffer = o.buffer;
|
||||||
|
var enters = leaves = 0;
|
||||||
|
var inside = false;
|
||||||
|
|
||||||
|
/* add listener to container */
|
||||||
|
$container.bind('scroll', function(e){
|
||||||
|
var position = {top: $(this).scrollTop(), left: $(this).scrollLeft()};
|
||||||
|
var xy = (mode == 'vertical') ? position.top + buffer : position.left + buffer;
|
||||||
|
var max = o.max;
|
||||||
|
var min = o.min;
|
||||||
|
|
||||||
|
/* fix max */
|
||||||
|
if($.isFunction(o.max)){
|
||||||
|
max = o.max();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix max */
|
||||||
|
if($.isFunction(o.min)){
|
||||||
|
min = o.min();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(max == 0){
|
||||||
|
max = (mode == 'vertical') ? $container.height() : $container.outerWidth() + $(element).outerWidth();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if we have reached the minimum bound but are below the max ... */
|
||||||
|
if(xy >= o.min && xy <= max){
|
||||||
|
/* trigger enter event */
|
||||||
|
if(!inside){
|
||||||
|
inside = true;
|
||||||
|
enters++;
|
||||||
|
|
||||||
|
/* fire enter event */
|
||||||
|
$(element).trigger('scrollEnter', {position: position})
|
||||||
|
if($.isFunction(o.onEnter)){
|
||||||
|
o.onEnter(element, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* triger tick event */
|
||||||
|
$(element).trigger('scrollTick', {position: position, inside: inside, enters: enters, leaves: leaves})
|
||||||
|
if($.isFunction(o.onTick)){
|
||||||
|
o.onTick(element, position, inside, enters, leaves);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
if(inside){
|
||||||
|
inside = false;
|
||||||
|
leaves++;
|
||||||
|
/* trigger leave event */
|
||||||
|
$(element).trigger('scrollLeave', {position: position, leaves:leaves})
|
||||||
|
|
||||||
|
if($.isFunction(o.onLeave)){
|
||||||
|
o.onLeave(element, position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
})( jQuery, window );
|
||||||
211
doc/resources/ace/skeleton/javascripts/ux.js
Normal file
|
|
@ -0,0 +1,211 @@
|
||||||
|
$(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (pathName.indexOf("nodejs_ref_guide") >= 0) $('li#node_js_ref').addClass("active");
|
||||||
|
else if (pathName.indexOf("nodejs_dev_guide") >= 0) $('li#nodejs_dev_guide').addClass("active");
|
||||||
|
else if (pathName.indexOf("js_doc") >= 0) $('li#js_doc').addClass("active");
|
||||||
|
|
||||||
|
function loadCallback(evt) {
|
||||||
|
var form = document.getElementById("searchbox");
|
||||||
|
var input = form.query;
|
||||||
|
form.onsubmit = function (evt) {
|
||||||
|
var query = input.value;
|
||||||
|
if (query) {
|
||||||
|
input.value = "";
|
||||||
|
input.blur();
|
||||||
|
var currentVersion = $('#currentVersion').text();
|
||||||
|
var url = "https://www.google.com/search?q=" + encodeURIComponent("site:nodemanual.org/" + currentVersion + " " + query);
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var fileNameRE = new RegExp("^" + fileName, "i");
|
||||||
|
|
||||||
|
$('a.menuLink').each(function (index) {
|
||||||
|
if ($(this).attr("href").match(fileNameRE)) {
|
||||||
|
$(this).addClass("currentItem");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// init search
|
||||||
|
$('#search')
|
||||||
|
// prevent from form submit
|
||||||
|
.on('submit', function () {
|
||||||
|
return false;
|
||||||
|
}).find('input');
|
||||||
|
|
||||||
|
// init prettyprint
|
||||||
|
$('pre > code').addClass('prettyprint');
|
||||||
|
prettyPrint();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
var d = 'a.menu, .dropdown-toggle'
|
||||||
|
|
||||||
|
function clearMenus() {
|
||||||
|
$(d).parent('li').each(function () {
|
||||||
|
$(this).removeClass('open')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var s, sx;
|
||||||
|
|
||||||
|
// scrolling offset calculation via www.quirksmode.org
|
||||||
|
if (window.pageYOffset || window.pageXOffset) {
|
||||||
|
s = window.pageYOffset;
|
||||||
|
sx = window.pageXOffset;
|
||||||
|
}
|
||||||
|
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
|
||||||
|
s = document.documentElement.scrollTop;
|
||||||
|
sx = document.documentElement.scrollLeft;
|
||||||
|
}
|
||||||
|
else if (document.body) {
|
||||||
|
s = document.body.scrollTop;
|
||||||
|
sx = document.body.scrollLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.documentElement.offsetWidth < 1010) {
|
||||||
|
if (sx <= 0) sx = 0;
|
||||||
|
else if (sx + document.documentElement.offsetWidth > 1010) sx = 1010 - document.documentElement.offsetWidth;
|
||||||
|
}
|
||||||
|
else sx = 0;
|
||||||
|
|
||||||
|
$('.members').each(function (i) {
|
||||||
|
var position = $(this).position();
|
||||||
|
var $classContent = $(this).closest('.classContent');
|
||||||
|
|
||||||
|
$(this).scrollspy({
|
||||||
|
min: $classContent.position().top - 55,
|
||||||
|
max: $classContent.position().top + $classContent.height(),
|
||||||
|
onEnter: function (element, position) {
|
||||||
|
var $pagination = $(element);
|
||||||
|
var $paginationContent = $('.membersContent pos' + i);
|
||||||
|
var $tabs = $('.tabs pos' + i);
|
||||||
|
|
||||||
|
$paginationContent.css('left', -1 * sx);
|
||||||
|
$paginationContent.css('top', 0);
|
||||||
|
|
||||||
|
$pagination.addClass('shadow').stop().css({
|
||||||
|
height: 31,
|
||||||
|
'top': 33
|
||||||
|
}).closest('.classContent').addClass('srolled');
|
||||||
|
|
||||||
|
$tabs.addClass('tabsSansBorder');
|
||||||
|
},
|
||||||
|
onLeave: function (element, position) {
|
||||||
|
var $pagination = $(element);
|
||||||
|
var $paginationContent = $('.membersContent pos' + i);
|
||||||
|
var $tabs = $('.tabs pos' + i);
|
||||||
|
|
||||||
|
$paginationContent.stop().css({
|
||||||
|
top: 11
|
||||||
|
});
|
||||||
|
$pagination.css({
|
||||||
|
'position': 'absolute',
|
||||||
|
'top': 193
|
||||||
|
});
|
||||||
|
$pagination.stop().removeClass('shadow').css({
|
||||||
|
height: 42
|
||||||
|
});
|
||||||
|
|
||||||
|
$paginationContent.css('left', 0);
|
||||||
|
// setTimeout(function () {
|
||||||
|
$paginationContent.css({
|
||||||
|
'top': ''
|
||||||
|
});
|
||||||
|
$pagination.css({
|
||||||
|
'position': '',
|
||||||
|
'top': ''
|
||||||
|
});
|
||||||
|
$paginationContent.css('left', 0);
|
||||||
|
$pagination.closest('.classContent').removeClass('srolled')
|
||||||
|
$tabs.removeClass('tabsSansBorder');
|
||||||
|
// }, 300);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('span.methodClicker, article.article, h3.methodClicker').each(function () {
|
||||||
|
var a = $(this);
|
||||||
|
var constructorPos = a.attr("id").indexOf("new ");
|
||||||
|
|
||||||
|
var objName = a.attr("id");
|
||||||
|
if (constructorPos >= 0) {
|
||||||
|
objName = objName.substring(constructorPos + 4);
|
||||||
|
objName += ".new";
|
||||||
|
}
|
||||||
|
|
||||||
|
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, '\\.'));
|
||||||
|
if ($clickerEl.length > 0 && $clickerEl.hasClass('methodClicker')) {
|
||||||
|
var p = $clickerEl.parent();
|
||||||
|
p[0].force = true;
|
||||||
|
p.trigger('click');
|
||||||
|
p[0].force = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.hash) {
|
||||||
|
showMethodContent();
|
||||||
|
var data = location.hash;
|
||||||
|
scrollTo(null, data.substr(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onhashchange = function () {
|
||||||
|
showMethodContent();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function scrollTo(el, data) {
|
||||||
|
if (!data) {
|
||||||
|
data = el.getAttribute("data-id");
|
||||||
|
location.hash = data;
|
||||||
|
}
|
||||||
|
var el = $("span#" + data.replace(/\./g, "\\."))[0];
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
|
var article = $(el).closest('.article')[0];
|
||||||
|
|
||||||
|
var top = article.offsetTop - 100;
|
||||||
|
|
||||||
|
if (document.body.scrollTop > top || document.body.scrollTop != top && document.body.scrollTop + (window.innerHeight || document.documentElement.offsetHeight) < top + article.offsetHeight) {
|
||||||
|
$('body').animate({
|
||||||
|
scrollTop: top
|
||||||
|
}, {
|
||||||
|
duration: 200,
|
||||||
|
easing: "swing"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,439 +0,0 @@
|
||||||
$(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
if (pathName.indexOf("nodejs_ref_guide") >= 0)
|
|
||||||
$('li#node_js_ref').addClass("active");
|
|
||||||
else if (pathName.indexOf("nodejs_dev_guide") >= 0)
|
|
||||||
$('li#nodejs_dev_guide').addClass("active");
|
|
||||||
else if (pathName.indexOf("js_doc") >= 0)
|
|
||||||
$('li#js_doc').addClass("active");
|
|
||||||
|
|
||||||
function loadCallback(evt){
|
|
||||||
var form = document.getElementById("searchbox");
|
|
||||||
var input = form.query;
|
|
||||||
form.onsubmit = function (evt) {
|
|
||||||
var query = input.value;
|
|
||||||
if (query) {
|
|
||||||
input.value = "";
|
|
||||||
input.blur();
|
|
||||||
var currentVersion = $('#currentVersion').text();
|
|
||||||
var url = "https://www.google.com/search?q=" + encodeURIComponent("site:nodemanual.org/" + currentVersion + " " + query);
|
|
||||||
window.open(url);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var fileNameRE = new RegExp("^" + fileName, "i");
|
|
||||||
|
|
||||||
$('a.menuLink').each(function(index) {
|
|
||||||
if ($(this).attr("href").match(fileNameRE))
|
|
||||||
{
|
|
||||||
$(this).addClass("currentItem");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// function getTitle($article) {
|
|
||||||
// var title = [baseTitle];
|
|
||||||
//
|
|
||||||
// if ($article.data('title')) {
|
|
||||||
// title.push($article.data('title'));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return title.join(' | ');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function eachParent($item, callback) {
|
|
||||||
// var $parent = $item.data('ndoc.parent');
|
|
||||||
// if ($parent && $parent.length) {
|
|
||||||
// eachParent($parent, callback);
|
|
||||||
// callback($parent);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// activates item (used upon scrolling)
|
|
||||||
// function activate($article, expandParents) {
|
|
||||||
// var $item;
|
|
||||||
//
|
|
||||||
// if ($active) {
|
|
||||||
// $item = $active.data('ndoc.item') || $empty;
|
|
||||||
// $item.removeClass('current');
|
|
||||||
// eachParent($item, function ($parent) {
|
|
||||||
// $parent.removeClass('current-parent');
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // set new active article
|
|
||||||
// $active = $article;
|
|
||||||
//
|
|
||||||
// // update title
|
|
||||||
// document.title = getTitle($article);
|
|
||||||
//
|
|
||||||
// $item = $active.data('ndoc.item') || $empty;
|
|
||||||
// $item.addClass('current');
|
|
||||||
// eachParent($item, function ($parent) {
|
|
||||||
// $parent.addClass('current-parent');
|
|
||||||
// if (expandParents) {
|
|
||||||
// $parent.data('ndoc.childs')
|
|
||||||
// .data('ndoc.collapsed', false)
|
|
||||||
// .animate({
|
|
||||||
// height: 'show',
|
|
||||||
// opacity: 'show'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// function processScroll(evt, expandParents) {
|
|
||||||
// var scrollTop = $window.scrollTop() + 10,
|
|
||||||
// i = targets.length;
|
|
||||||
//
|
|
||||||
// while (i--) {
|
|
||||||
// if ($active !== targets[i].article && scrollTop >= targets[i].offset
|
|
||||||
// && (!targets[i + 1] || scrollTop <= targets[i + 1].offset)) {
|
|
||||||
// activate(targets[i].article, expandParents)
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// init articles
|
|
||||||
// $('article.article').each(function () {
|
|
||||||
// var $article = $(this);
|
|
||||||
//
|
|
||||||
// targets.push({
|
|
||||||
// article: $article,
|
|
||||||
// offset: $article.offset().top
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
// init menu items
|
|
||||||
// $items.each(function () {
|
|
||||||
// var $item = $(this),
|
|
||||||
// $childs = $item.parent().next(),
|
|
||||||
// $parent = $item.parents('ul').eq(0).prev().children(),
|
|
||||||
// $article = $('[id="' + $item.attr('href').slice(1) + '"]');
|
|
||||||
//
|
|
||||||
// // cross-refs
|
|
||||||
// $item.data('ndoc.parent', $parent);
|
|
||||||
// $item.data('ndoc.childs', $childs);
|
|
||||||
// $article.data('ndoc.item', $item);
|
|
||||||
//
|
|
||||||
// // bind activator
|
|
||||||
// $item.on('click', function () {
|
|
||||||
// if ($item.hasClass('current') && !$childs.data('ndoc.collapsed')) {
|
|
||||||
// $childs.data('ndoc.collapsed', true).animate({
|
|
||||||
// height: 'hide',
|
|
||||||
// opacity: 'hide'
|
|
||||||
// });
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// activate($article);
|
|
||||||
//
|
|
||||||
// $item.data('ndoc.childs').data('ndoc.collapsed', false).animate({
|
|
||||||
// height: 'show',
|
|
||||||
// opacity: 'show'
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// // collapse all 2nd levels
|
|
||||||
// if (0 != $parent.length) {
|
|
||||||
// $childs.data('ndoc.collapsed', true).hide();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// function updateSearchResults() {
|
|
||||||
// $results.empty();
|
|
||||||
//
|
|
||||||
// if ('' == this.value) {
|
|
||||||
// $results.hide();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// $results.show();
|
|
||||||
//
|
|
||||||
// $items.filter('[data-id*="' + this.value + '"]').each(function () {
|
|
||||||
// var $item = $(this);
|
|
||||||
// $('<div class="menu-item">').append(
|
|
||||||
// $item.clone(false)
|
|
||||||
// .text($item.data('id'))
|
|
||||||
// .on('click', function () {
|
|
||||||
// $item.trigger('click');
|
|
||||||
// })
|
|
||||||
// ).appendTo($results);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// init search
|
|
||||||
$('#search')
|
|
||||||
// prevent from form submit
|
|
||||||
.on('submit', function () {
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
.find('input')
|
|
||||||
//.on('keyup', $.throttle(250, updateSearchResults))
|
|
||||||
// click - cuz i don't know what event fied on input clear in Chrome
|
|
||||||
//.on('change click', updateSearchResults);
|
|
||||||
|
|
||||||
// init scrollspy
|
|
||||||
//$window.on('scroll', $.throttle(250, processScroll));
|
|
||||||
|
|
||||||
// initial jump (required for FF only - Chrome don't need it)
|
|
||||||
//processScroll(null, true);
|
|
||||||
|
|
||||||
// init prettyprint
|
|
||||||
$('pre > code').addClass('prettyprint');
|
|
||||||
prettyPrint();
|
|
||||||
|
|
||||||
//set the height of the sidebar
|
|
||||||
// var sidebarHeight = $('#sidebar').height(),
|
|
||||||
// contentHeight = $('.container .content .span11').height();
|
|
||||||
|
|
||||||
// if(contentHeight > sidebarHeight)
|
|
||||||
// $('#sidebar').height(contentHeight);
|
|
||||||
// else
|
|
||||||
// $('#sidebar').height(sidebarHeight + 10);
|
|
||||||
|
|
||||||
// function isScrolledIntoView(elem) {
|
|
||||||
// var docViewTop = $(window).scrollTop();
|
|
||||||
// var docViewBottom = docViewTop + $(window).height();
|
|
||||||
//
|
|
||||||
// var elemTop = $(elem).offset().top;
|
|
||||||
// var elemBottom = elemTop + $(elem).height() -60;
|
|
||||||
//
|
|
||||||
// return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// $('#sidebar').height($(window).height() - $('#overview').outerHeight() - 25 + ($('html').scrollTop() <= 85 ? $('html').scrollTop() : 85 ))
|
|
||||||
var bgHeightSet = false,
|
|
||||||
// $sidebar = $('#sidebar'),
|
|
||||||
$pagination = $('.members'),
|
|
||||||
// $paginationBackground = $('.membersBackground'),
|
|
||||||
$paginationContent = $('.membersContent'),
|
|
||||||
$tabs = $('.tabs'),
|
|
||||||
$topSection = $('#topSection');
|
|
||||||
|
|
||||||
function handleScroll() {
|
|
||||||
var s, sx;
|
|
||||||
|
|
||||||
// scrolling offset calculation via www.quirksmode.org
|
|
||||||
if (window.pageYOffset || window.pageXOffset) {
|
|
||||||
s = window.pageYOffset;
|
|
||||||
sx = window.pageXOffset;
|
|
||||||
}
|
|
||||||
else if (document.documentElement
|
|
||||||
&& (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
|
|
||||||
s = document.documentElement.scrollTop;
|
|
||||||
sx = document.documentElement.scrollLeft;
|
|
||||||
}
|
|
||||||
else if (document.body) {
|
|
||||||
s = document.body.scrollTop;
|
|
||||||
sx = document.body.scrollLeft;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.documentElement.offsetWidth < 1010) {
|
|
||||||
if (sx <= 0) sx = 0;
|
|
||||||
else if (sx + document.documentElement.offsetWidth > 1010)
|
|
||||||
sx = 1010 - document.documentElement.offsetWidth;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
sx = 0;
|
|
||||||
|
|
||||||
$topSection.css({'left': -1 * sx});
|
|
||||||
|
|
||||||
if (s > 163) { //header_offset - 35) {
|
|
||||||
$paginationContent.css('left', -1 * sx);
|
|
||||||
|
|
||||||
if (bgHeightSet)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// $sidebar.css({
|
|
||||||
// 'position': 'fixed',
|
|
||||||
// 'top': 41,
|
|
||||||
// 'padding':0
|
|
||||||
// });
|
|
||||||
// if(!bgHeightSet) {
|
|
||||||
|
|
||||||
// $paginationBackground.css('display', 'block')//.stop().animate({'height': 44, 'opacity':1}, 'normal', 'linear');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var leftPos = $paginationContent.outerWidth() + $paginationContent.position().left > $(window).width()
|
|
||||||
// ? $(window).width()- $paginationContent.outerWidth()
|
|
||||||
// : $paginationContent.offset().left - $('html').scrollLeft()
|
|
||||||
|
|
||||||
// $paginationContent.css('left', leftPos);
|
|
||||||
$paginationContent.css('top', 0);
|
|
||||||
//$paginationContent.stop().animate({'top': 0}, 300);
|
|
||||||
|
|
||||||
$pagination
|
|
||||||
// .css({'background': 'white'})
|
|
||||||
.addClass('shadow')
|
|
||||||
.stop().css({height: 31})
|
|
||||||
/*animate({'height': 31}, {
|
|
||||||
duration : 300,
|
|
||||||
complete : function(){
|
|
||||||
// $pagination.css({'background': ''});
|
|
||||||
}
|
|
||||||
})*/
|
|
||||||
// .next().css({'padding-top': $pagination.outerHeight()})
|
|
||||||
.closest('.content').addClass('srolled')
|
|
||||||
// setTimeout(function(){
|
|
||||||
// $pagination.css({'background': ''});
|
|
||||||
// }, 300);
|
|
||||||
$tabs.addClass('tabsSansBorder');
|
|
||||||
|
|
||||||
bgHeightSet = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!bgHeightSet)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// $sidebar.css({
|
|
||||||
// 'position': 'relative',
|
|
||||||
// 'top': 0,
|
|
||||||
// 'padding-top':25
|
|
||||||
// });
|
|
||||||
|
|
||||||
$paginationContent.stop().css({top:11});//animate({'top': 11}, 300);
|
|
||||||
$pagination.css({'position': 'absolute', 'top': 193});
|
|
||||||
$pagination.stop()
|
|
||||||
.removeClass('shadow')
|
|
||||||
.css({height: 42})
|
|
||||||
//.animate({'background': 'transparant'}, 300);
|
|
||||||
|
|
||||||
$paginationContent.css('left', 0);
|
|
||||||
|
|
||||||
setTimeout(function(){
|
|
||||||
$pagination
|
|
||||||
// .animate({'height': 42}, {
|
|
||||||
// 'complete' : function(){
|
|
||||||
$paginationContent.css({'top': ''});
|
|
||||||
$pagination.css({'position': '', 'top': ''});
|
|
||||||
$paginationContent.css('left', 0);
|
|
||||||
$pagination.closest('.content').removeClass('srolled')
|
|
||||||
$tabs.removeClass('tabsSansBorder');
|
|
||||||
// }
|
|
||||||
// }, 300);
|
|
||||||
}, 300);
|
|
||||||
|
|
||||||
bgHeightSet = false;
|
|
||||||
// $paginationBackground.stop().css({'display': 'none'});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// function handleWinSize(){
|
|
||||||
// if($(window).width() < 1000)
|
|
||||||
// $('body').addClass('small_win');
|
|
||||||
// else
|
|
||||||
// $('body').removeClass('small_win');
|
|
||||||
// }
|
|
||||||
|
|
||||||
$(window)
|
|
||||||
.scroll(function(){//auto kanei to header na metakinhtai kai na einai panta visible;
|
|
||||||
handleScroll();
|
|
||||||
}).resize(function(){
|
|
||||||
//handleWinSize();
|
|
||||||
});
|
|
||||||
handleScroll();
|
|
||||||
//handleWinSize();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
|
||||||
var d = 'a.menu, .dropdown-toggle'
|
|
||||||
function clearMenus() {
|
|
||||||
$(d).parent('li').each(function(){
|
|
||||||
$(this).removeClass('open')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$('span.methodClicker, article.article, h3.methodClicker').each(function(){
|
|
||||||
var a = $(this);
|
|
||||||
var constructorPos = a.attr("id").indexOf("new ");
|
|
||||||
|
|
||||||
var objName = a.attr("id");
|
|
||||||
if (constructorPos >= 0)
|
|
||||||
{
|
|
||||||
objName = objName.substring(constructorPos + 4);
|
|
||||||
objName += ".new";
|
|
||||||
}
|
|
||||||
|
|
||||||
a.attr("id", "js_" + 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#js_' + location.hash.replace(/^#/,'').replace(/\./g, '\\.'));
|
|
||||||
if ($clickerEl.length > 0 && $clickerEl.hasClass('methodClicker')) {
|
|
||||||
var p = $clickerEl.parent();
|
|
||||||
p[0].force = true;
|
|
||||||
p.trigger('click');
|
|
||||||
p[0].force = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (location.hash) {
|
|
||||||
showMethodContent();
|
|
||||||
var data = location.hash;
|
|
||||||
scrollTo(null, data.substr(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onhashchange = function(){
|
|
||||||
showMethodContent();
|
|
||||||
}
|
|
||||||
|
|
||||||
//$('#content article:last').css('padding-bottom', 50);
|
|
||||||
});
|
|
||||||
|
|
||||||
function scrollTo(el, data){
|
|
||||||
if (!data) {
|
|
||||||
data = el.getAttribute("data-id");
|
|
||||||
location.hash = data;
|
|
||||||
}
|
|
||||||
var el = $("span#js_" + data.replace(/\./g, "\\."))[0];
|
|
||||||
if (!el) return;
|
|
||||||
|
|
||||||
var article = $(el).closest('.article')[0];
|
|
||||||
|
|
||||||
var top = article.offsetTop - 100;
|
|
||||||
|
|
||||||
if (document.body.scrollTop > top
|
|
||||||
|| document.body.scrollTop != top && document.body.scrollTop
|
|
||||||
+ (window.innerHeight || document.documentElement.offsetHeight) <
|
|
||||||
top + article.offsetHeight) {
|
|
||||||
//document.body.scrollTop = top;
|
|
||||||
$('body').animate({scrollTop : top}, {
|
|
||||||
duration: 200,
|
|
||||||
easing : "swing"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -11,13 +11,20 @@ div#well
|
||||||
a(class="menuLink namespace", href="anchor.html") Anchor
|
a(class="menuLink namespace", href="anchor.html") Anchor
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="background.tokenizer.html") BackgroundTokenizer
|
a(class="menuLink namespace", href="background_tokenizer.html") BackgroundTokenizer
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="edit.session.html") EditSession
|
a(class="menuLink namespace", href="document.html") Document
|
||||||
|
li
|
||||||
|
div.menu-item
|
||||||
|
a(class="menuLink namespace", href="edit_session.html") EditSession
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="editor.html") Editor
|
a(class="menuLink namespace", href="editor.html") Editor
|
||||||
|
|
||||||
|
li
|
||||||
|
div.menu-item
|
||||||
|
a(class="menuLink namespace", href="multi_select.html") MultiSelect
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="placeholder.html") PlaceHolder
|
a(class="menuLink namespace", href="placeholder.html") PlaceHolder
|
||||||
|
|
@ -41,7 +48,7 @@ div#well
|
||||||
a(class="menuLink namespace", href="split.html") Split
|
a(class="menuLink namespace", href="split.html") Split
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="token.iterator.html") TokenIterator
|
a(class="menuLink namespace", href="token_iterator.html") TokenIterator
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="tokenizer.html") Tokenizer
|
a(class="menuLink namespace", href="tokenizer.html") Tokenizer
|
||||||
|
|
@ -50,4 +57,4 @@ div#well
|
||||||
a(class="menuLink namespace", href="undomanager.html") UndoManager
|
a(class="menuLink namespace", href="undomanager.html") UndoManager
|
||||||
li
|
li
|
||||||
div.menu-item
|
div.menu-item
|
||||||
a(class="menuLink namespace", href="virtual.renderer.html") VirtualRenderer
|
a(class="menuLink namespace", href="virtual_renderer.html") VirtualRenderer
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
include ../../../common_layout
|
include ../../common_layout
|
||||||
include lib
|
include lib
|
||||||
|
|
||||||
mixin identifyBuild(tree)
|
!!! 5
|
||||||
|
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
|
||||||
|
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
|
||||||
|
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
||||||
|
|
||||||
mixin doctype
|
mixin head('Prototype')
|
||||||
|
|
||||||
mixin head('Ace API Reference')
|
body
|
||||||
|
|
||||||
body(onload="styleCode()")
|
|
||||||
|
|
||||||
mixin topBar("Ace")
|
mixin topBar("Ace")
|
||||||
|
|
||||||
|
|
@ -1,26 +1,5 @@
|
||||||
- var methodSection = constructorSection = propertySection = eventSection = false;
|
- var methodSection = constructorSection = propertySection = eventSection = false;
|
||||||
|
|
||||||
mixin argument(arg, reqOptObj)
|
|
||||||
td
|
|
||||||
p
|
|
||||||
i
|
|
||||||
#{arg.name}
|
|
||||||
if arg.types
|
|
||||||
td
|
|
||||||
p
|
|
||||||
for type, i in arg.types
|
|
||||||
- if (i == arg.types.length - 1)
|
|
||||||
mixin link(type)
|
|
||||||
- else
|
|
||||||
mixin link(type) |
|
|
||||||
td
|
|
||||||
-var argStatus = "Required. "
|
|
||||||
if reqOptObj.length > 0
|
|
||||||
for argInfo in reqOptObj
|
|
||||||
- if (argInfo !== undefined && arg.name === argInfo.name && argInfo.optional)
|
|
||||||
-argStatus = "Optional. "
|
|
||||||
mixin markdown(argStatus + arg.description)
|
|
||||||
|
|
||||||
-function renameMemberTitle(title, count)
|
-function renameMemberTitle(title, count)
|
||||||
if title.indexOf("ethods") >= 0
|
if title.indexOf("ethods") >= 0
|
||||||
span Functions (#{count})
|
span Functions (#{count})
|
||||||
|
|
@ -29,7 +8,7 @@ mixin argument(arg, reqOptObj)
|
||||||
else
|
else
|
||||||
span #{title} (#{count})
|
span #{title} (#{count})
|
||||||
|
|
||||||
mixin article(obj, parents, memberType)
|
mixin article(obj, parents)
|
||||||
if typeof obj === 'string'
|
if typeof obj === 'string'
|
||||||
obj = list[obj]
|
obj = list[obj]
|
||||||
|
|
||||||
|
|
@ -92,7 +71,6 @@ mixin article(obj, parents, memberType)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
-var reqOptObj = [];
|
|
||||||
.section.method
|
.section.method
|
||||||
.memberContent
|
.memberContent
|
||||||
if obj.signatures
|
if obj.signatures
|
||||||
|
|
@ -100,34 +78,16 @@ mixin article(obj, parents, memberType)
|
||||||
ul.signatures
|
ul.signatures
|
||||||
-var loops = 0;
|
-var loops = 0;
|
||||||
for sig in obj.signatures
|
for sig in obj.signatures
|
||||||
if sig.args
|
|
||||||
for arg in sig.args
|
|
||||||
-reqOptObj.push({name: arg.name, optional: arg.optional}) // only sig object has "optional" information; store for later use
|
|
||||||
li.signature
|
li.signature
|
||||||
ul
|
ul
|
||||||
li.signature-call!= sanitize_link(signature(obj, sig, memberType, obj.id))
|
li.signature-call!= signature(obj, sig, ["methodClicker"])
|
||||||
if sig.returns
|
if sig.returns
|
||||||
li.signature-returns
|
li.signature-returns
|
||||||
ul.argument-types
|
ul.argument-types
|
||||||
for ret in sig.returns
|
for ret in sig.returns
|
||||||
non_link = obj.type == 'constant' || ret.type == 'Void' || ret.type == 'null'
|
li.argument-type!= returnLink(obj, ret, [])
|
||||||
//- N.B: type can be array. E.g. [ Element... ]
|
|
||||||
//- N.B: type can be array. E.g. [ Element1, Element2 ]
|
|
||||||
text = ''
|
|
||||||
if (typeof ret.type !== 'string')
|
|
||||||
- text = ret.type.map(function(r){ return link(r || '?', true, ['link-short']);}).join(', ');
|
|
||||||
else
|
|
||||||
if non_link
|
|
||||||
text = ret.type
|
|
||||||
else
|
|
||||||
text = link(ret.type || '?', true, ['link-short'], "ret")
|
|
||||||
if ret.ellipsis
|
|
||||||
text = text + '...'
|
|
||||||
if ret.array
|
|
||||||
text = '[ ' + text + ' ]'
|
|
||||||
li.argument-type!= sanitize_link(text)
|
|
||||||
-if (loops == 0)
|
-if (loops == 0)
|
||||||
-loops = 1 // ensure that we only print ONE meta info UL per signature (some methods have multiple forms)
|
-loops = 1 // ensure that we only print ONE meta info UL per signature (some methods have multiple signatures)
|
||||||
ul.metaInfo
|
ul.metaInfo
|
||||||
if obj.readonly
|
if obj.readonly
|
||||||
li
|
li
|
||||||
|
|
@ -146,9 +106,14 @@ mixin article(obj, parents, memberType)
|
||||||
| (since #{obj.deprecated.from})
|
| (since #{obj.deprecated.from})
|
||||||
if obj.deprecated.off
|
if obj.deprecated.off
|
||||||
| and will be removed on #{obj.deprecated.off}
|
| and will be removed on #{obj.deprecated.off}
|
||||||
if obj.aliases && obj.aliases.length
|
if obj.alias_of
|
||||||
li
|
li
|
||||||
span.label.alias
|
span.label.alias.single
|
||||||
|
| Aliased as:
|
||||||
|
!= link(obj.alias_of)
|
||||||
|
else if obj.aliases.length
|
||||||
|
li
|
||||||
|
span.label.alias.multiple
|
||||||
| Aliased as:
|
| Aliased as:
|
||||||
ul.alias
|
ul.alias
|
||||||
for alias in obj.aliases
|
for alias in obj.aliases
|
||||||
|
|
@ -165,7 +130,7 @@ mixin article(obj, parents, memberType)
|
||||||
|
|
||||||
if obj.ellipsis_description
|
if obj.ellipsis_description
|
||||||
div(id='ellipsis_#{obj.id}', class='ellipsis_description')
|
div(id='ellipsis_#{obj.id}', class='ellipsis_description')
|
||||||
mixin markdown(obj.short_description)
|
mixin markdown(obj.ellipsis_description)
|
||||||
div(id='short_#{obj.id}', class='short_description hiddenSpan')
|
div(id='short_#{obj.id}', class='short_description hiddenSpan')
|
||||||
mixin markdown(obj.short_description)
|
mixin markdown(obj.short_description)
|
||||||
|
|
||||||
|
|
@ -178,11 +143,7 @@ mixin article(obj, parents, memberType)
|
||||||
|
|
||||||
if obj.arguments
|
if obj.arguments
|
||||||
h4 Arguments
|
h4 Arguments
|
||||||
table.argument-list.zebra-striped.bordered-table
|
!= argumentTable(obj.arguments, ["argument-list", "zebra-striped", "bordered-table"])
|
||||||
tbody
|
|
||||||
-for (var a = 0; a < obj.arguments.length; a++)
|
|
||||||
tr
|
|
||||||
mixin argument(obj.arguments[a], reqOptObj)
|
|
||||||
|
|
||||||
if descArray[0].length && descArray[0] !== '' && descArray[0] !== '\n'
|
if descArray[0].length && descArray[0] !== '' && descArray[0] !== '\n'
|
||||||
h4 Description
|
h4 Description
|
||||||
|
|
@ -191,12 +152,12 @@ mixin article(obj, parents, memberType)
|
||||||
if obj.bound && ~obj.bound.indexOf('#')
|
if obj.bound && ~obj.bound.indexOf('#')
|
||||||
p.note.methodized
|
p.note.methodized
|
||||||
| This method can be called <em>either</em> as an
|
| This method can be called <em>either</em> as an
|
||||||
!= link(obj.bound, 'instance method', ['link-short'])
|
!= link(obj.bound, ['link-short'], 'instance method')
|
||||||
| <em>or</em> as a generic method. If calling as generic, pass the instance in as the first argument.
|
| <em>or</em> as a generic method. If calling as generic, pass the instance in as the first argument.
|
||||||
else if obj.bound && !~obj.bound.indexOf('#')
|
else if obj.bound && !~obj.bound.indexOf('#')
|
||||||
p.note.functionalized
|
p.note.functionalized
|
||||||
| This method can be called <em>either</em> as an instance method <em>or</em> as a
|
| This method can be called <em>either</em> as an instance method <em>or</em> as a
|
||||||
!= link(obj.bound, 'generic method', ['link-short'])
|
!= link(obj.bound, ['link-short'], 'generic method')
|
||||||
|. If calling as generic, pass the instance in as the first argument.
|
|. If calling as generic, pass the instance in as the first argument.
|
||||||
|
|
||||||
- var r; // Probably inefficient; we want the Returns section under the Arguments, no matter where in source it's defined
|
- var r; // Probably inefficient; we want the Returns section under the Arguments, no matter where in source it's defined
|
||||||
|
|
@ -252,9 +213,29 @@ mixin article(obj, parents, memberType)
|
||||||
|
|
||||||
|
|
||||||
mixin api()
|
mixin api()
|
||||||
|
-pos = 0
|
||||||
for obj in tree.children
|
for obj in tree.children
|
||||||
mixin article(obj, [])
|
.classContent
|
||||||
|
.membersBackground
|
||||||
|
div(class=' members pos#{pos}')
|
||||||
|
div(class=' membersContent pos#{pos}')
|
||||||
|
h1.memberHeader
|
||||||
|
-var heading = obj.path
|
||||||
|
span.name #{heading}
|
||||||
|
|
||||||
|
-if (true || obj.filename.indexOf("index") < 0)
|
||||||
|
ul(class='tabs pos#{pos}', data-tabs='tabs')
|
||||||
|
for selector, title in {'Events': ['event', 'events'], 'Constructors': ['constructor', 'constructors'], 'Class methods': ['class method', 'class_methods'], 'Class properties': ['class property', 'class_properties'], 'Instance methods': ['instance method', 'instance_methods'], 'Instance properties': ['instance property', 'instance_properties'], 'Constants': ['constant', 'constants']}
|
||||||
|
members = obj.children.filter(function(x){return x.type === selector[0]})
|
||||||
|
li(class="dropdown", data-dropdown="dropdown")
|
||||||
|
if members.length
|
||||||
|
a(href="\#", class="dropdown-toggle")!= renameMemberTitle(title, members.length)
|
||||||
|
ul.dropdown-menu
|
||||||
|
for m in members
|
||||||
|
li(data-id='#{m.id}', class='memberLink')
|
||||||
|
mixin internalLink(m, [], true)
|
||||||
|
-pos++
|
||||||
|
mixin article(obj, [])
|
||||||
|
|
||||||
|
|
||||||
mixin short_description_list(collection)
|
mixin short_description_list(collection)
|
||||||
|
|
@ -268,19 +249,15 @@ mixin short_description_list(collection)
|
||||||
if obj.short_description
|
if obj.short_description
|
||||||
mixin markdown(obj.short_description)
|
mixin markdown(obj.short_description)
|
||||||
|
|
||||||
|
mixin internalLink(obj, classes, short)
|
||||||
|
!= internalLink(obj, classes, short)
|
||||||
|
|
||||||
|
mixin link(obj, classes, short)
|
||||||
mixin link(obj, short, classes)
|
l = link(obj, classes, short)
|
||||||
l = link(obj, short, classes)
|
!= l
|
||||||
!= sanitize_link(l)
|
|
||||||
|
|
||||||
mixin links(collection)
|
mixin links(collection)
|
||||||
ul.method-list
|
ul.method-list
|
||||||
for obj in collection
|
for obj in collection
|
||||||
li
|
li
|
||||||
mixin link(obj)
|
mixin link(obj)
|
||||||
|
|
||||||
//- we want to force these links to lowercase;
|
|
||||||
//- our Linux server doesn't distinguish between case. TODO: fix that?
|
|
||||||
-function sanitize_link(l)
|
|
||||||
!= l
|
|
||||||
|
|
@ -66,7 +66,7 @@ require("./config").init();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ace.edit(el) -> Editor
|
* Ace.edit(el) -> Editor
|
||||||
* - el (String | Element): Either the id of an element, or the element itself
|
* - el (String | DOMElement): Either the id of an element, or the element itself
|
||||||
*
|
*
|
||||||
* This method embeds the Ace editor into the DOM, at the element provided by `el`.
|
* This method embeds the Ace editor into the DOM, at the element provided by `el`.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ var BackgroundTokenizer = function(tokenizer, editor) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BackgroundTokenizer.setTokenizer(tokenizer) -> Void
|
* BackgroundTokenizer.setTokenizer(tokenizer) -> Void
|
||||||
* - tokenizer (Tokenizier): The new tokenizer to use
|
* - tokenizer (Tokenizer): The new tokenizer to use
|
||||||
*
|
*
|
||||||
* Sets a new tokenizer for this object.
|
* Sets a new tokenizer for this object.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ var Document = function(text) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Document.insertInLine(position, text) -> Object | Integer
|
* Document.insertInLine(position, text) -> Object | Number
|
||||||
* - position (Number): The position to insert at
|
* - position (Number): The position to insert at
|
||||||
* - text (String): A chunk of text
|
* - text (String): A chunk of text
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ var EditSession = function(text, mode) {
|
||||||
/**
|
/**
|
||||||
* EditSession.getTabString() -> String
|
* EditSession.getTabString() -> String
|
||||||
*
|
*
|
||||||
* Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
|
* Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
|
||||||
**/
|
**/
|
||||||
this.getTabString = function() {
|
this.getTabString = function() {
|
||||||
if (this.getUseSoftTabs()) {
|
if (this.getUseSoftTabs()) {
|
||||||
|
|
@ -635,7 +635,7 @@ var EditSession = function(text, mode) {
|
||||||
* EditSession.$detectNewLine(text) -> Void
|
* EditSession.$detectNewLine(text) -> Void
|
||||||
* - text (String): A block of text
|
* - text (String): A block of text
|
||||||
*
|
*
|
||||||
* If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, [[autoNewLine `autoNewLine`]] stores that value.
|
* If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, `$autoNewLine` stores that value.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.$detectNewLine = function(text) {
|
this.$detectNewLine = function(text) {
|
||||||
|
|
@ -1288,7 +1288,7 @@ var EditSession = function(text, mode) {
|
||||||
*
|
*
|
||||||
* Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`.
|
* Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`.
|
||||||
*
|
*
|
||||||
* If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[getTabString `getTabString()`]].
|
* If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[EditSession.getTabString `getTabString()`]].
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.indentRows = function(startRow, endRow, indentString) {
|
this.indentRows = function(startRow, endRow, indentString) {
|
||||||
|
|
@ -1923,8 +1923,8 @@ var EditSession = function(text, mode) {
|
||||||
/** internal
|
/** internal
|
||||||
* EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> Array
|
* EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> Array
|
||||||
* - str (String): The string to calculate the screen width of
|
* - str (String): The string to calculate the screen width of
|
||||||
* - maxScreenColumn (Integer):
|
* - maxScreenColumn (Number):
|
||||||
* - screenColumn (Integer):
|
* - screenColumn (Number):
|
||||||
*
|
*
|
||||||
* Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen.
|
* Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,15 @@ var TokenIterator = require("../token_iterator").TokenIterator;
|
||||||
**/
|
**/
|
||||||
function BracketMatch() {
|
function BracketMatch() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new findMatchingBracket(position)
|
||||||
|
* - position (Number): Identifier for the platform; must be either `'mac'` or `'win'`
|
||||||
|
* - commands (Array): A list of commands
|
||||||
|
*
|
||||||
|
* TODO
|
||||||
|
*
|
||||||
|
*
|
||||||
|
**/
|
||||||
this.findMatchingBracket = function(position) {
|
this.findMatchingBracket = function(position) {
|
||||||
if (position.column == 0) return null;
|
if (position.column == 0) return null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ var Editor = function(renderer, session) {
|
||||||
/**
|
/**
|
||||||
* Editor.focus() -> Void
|
* Editor.focus() -> Void
|
||||||
*
|
*
|
||||||
* Brings the current [[textInput `textInput`]] into focus.
|
* Brings the current `textInput` into focus.
|
||||||
**/
|
**/
|
||||||
this.focus = function() {
|
this.focus = function() {
|
||||||
// Safari needs the timeout
|
// Safari needs the timeout
|
||||||
|
|
@ -346,7 +346,7 @@ var Editor = function(renderer, session) {
|
||||||
/**
|
/**
|
||||||
* Editor.isFocused() -> Boolean
|
* Editor.isFocused() -> Boolean
|
||||||
*
|
*
|
||||||
* Returns true if the current [[textInput `textInput`]] is in focus.
|
* Returns true if the current `textInput` is in focus.
|
||||||
**/
|
**/
|
||||||
this.isFocused = function() {
|
this.isFocused = function() {
|
||||||
return this.textInput.isFocused();
|
return this.textInput.isFocused();
|
||||||
|
|
@ -355,7 +355,7 @@ var Editor = function(renderer, session) {
|
||||||
/**
|
/**
|
||||||
* Editor.blur() -> Void
|
* Editor.blur() -> Void
|
||||||
*
|
*
|
||||||
* Blurs the current [[textInput `textInput`]].
|
* Blurs the current `textInput`.
|
||||||
**/
|
**/
|
||||||
this.blur = function() {
|
this.blur = function() {
|
||||||
this.textInput.blur();
|
this.textInput.blur();
|
||||||
|
|
@ -767,7 +767,7 @@ var Editor = function(renderer, session) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.setScrollSpeed(speed) -> Void
|
* Editor.setScrollSpeed(speed) -> Void
|
||||||
* - speed (Integer): A value indicating the new speed
|
* - speed (Number): A value indicating the new speed
|
||||||
*
|
*
|
||||||
* Sets how fast the mouse scrolling should do.
|
* Sets how fast the mouse scrolling should do.
|
||||||
*
|
*
|
||||||
|
|
@ -1652,7 +1652,7 @@ var Editor = function(renderer, session) {
|
||||||
this.selection.moveCursorToPosition(pos);
|
this.selection.moveCursorToPosition(pos);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** related to: EditSession.findMatchingBracket
|
/**
|
||||||
* Editor.jumpToMatching() -> Void
|
* Editor.jumpToMatching() -> Void
|
||||||
*
|
*
|
||||||
* Moves the cursor's row and column to the next matching bracket.
|
* Moves the cursor's row and column to the next matching bracket.
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.removeSelectionMarker(range) -> Void
|
* Editor.removeSelectionMarker(range) -> Void
|
||||||
* - range (Range): The selection range added with [[addSelectionMarker `addSelectionMarker()`]].
|
* - range (Range): The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
|
||||||
*
|
*
|
||||||
* Removes the selection marker.
|
* Removes the selection marker.
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
|
||||||
/**
|
/**
|
||||||
* PlaceHolder.hideOtherMarkers() -> Void
|
* PlaceHolder.hideOtherMarkers() -> Void
|
||||||
*
|
*
|
||||||
* Hides all over markers in the [[EditSesssion `EditSession`]] that are not the currently selected one.
|
* Hides all over markers in the [[EditSession `EditSession`]] that are not the currently selected one.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.hideOtherMarkers = function() {
|
this.hideOtherMarkers = function() {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* new ScrollBar(parent)
|
* new ScrollBar(parent)
|
||||||
* - parent (Element): A DOM element
|
* - parent (DOMElement): A DOM element
|
||||||
*
|
*
|
||||||
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
|
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ var Selection = function(session) {
|
||||||
return this.selectionAnchor.getPosition();
|
return this.selectionAnchor.getPosition();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** related to: Lead.getPosition
|
/**
|
||||||
* Selection.getSelectionLead() -> Object
|
* Selection.getSelectionLead() -> Object
|
||||||
*
|
*
|
||||||
* Returns an object containing the `row` and `column` of the calling selection lead.
|
* Returns an object containing the `row` and `column` of the calling selection lead.
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ var Split = function(container, theme, splits) {
|
||||||
this.$editors.forEach(callback, scope);
|
this.$editors.forEach(callback, scope);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** related to: editor.setFontSize
|
/** related to: Editor.setFontSize
|
||||||
* Split.setFontSize(size) -> Void
|
* Split.setFontSize(size) -> Void
|
||||||
* - size (Number): The new font size
|
* - size (Number): The new font size
|
||||||
*
|
*
|
||||||
|
|
@ -269,7 +269,7 @@ var Split = function(container, theme, splits) {
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** related to: editor.setSession
|
/** related to: Editor.setSession
|
||||||
* Split.setSession(session, idx) -> Void
|
* Split.setSession(session, idx) -> Void
|
||||||
* - session (EditSession): The new edit session
|
* - session (EditSession): The new edit session
|
||||||
* - idx (Number): The editor's index you're interested in
|
* - idx (Number): The editor's index you're interested in
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VirtualRenderer.moveTextAreaToCursor(textarea) -> Void
|
* VirtualRenderer.moveTextAreaToCursor(textarea) -> Void
|
||||||
* - textarea (Element): A text area to work with
|
* - textarea (DOMElement): A text area to work with
|
||||||
*
|
*
|
||||||
* Changes the position of `textarea` to where the cursor is pointing.
|
* Changes the position of `textarea` to where the cursor is pointing.
|
||||||
**/
|
**/
|
||||||
|
|
@ -960,12 +960,19 @@ var VirtualRenderer = function(container, theme) {
|
||||||
* VirtualRenderer.scrollToRow(row) -> Void
|
* VirtualRenderer.scrollToRow(row) -> Void
|
||||||
* - row (Number): A row id
|
* - row (Number): A row id
|
||||||
*
|
*
|
||||||
* Sets the top of the editor to the row indicated.
|
* Gracefully scrolls the top of the editor to the row indicated.
|
||||||
**/
|
**/
|
||||||
this.scrollToRow = function(row) {
|
this.scrollToRow = function(row) {
|
||||||
this.session.setScrollTop(row * this.lineHeight);
|
this.session.setScrollTop(row * this.lineHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VirtualRenderer.scrollToLine(line, center) -> Void
|
||||||
|
* - line (Number): A line number
|
||||||
|
* - center (Boolean): If `true`, centers the editor the to indicated line
|
||||||
|
*
|
||||||
|
* Gracefully scrolls the editor to the row indicated.
|
||||||
|
**/
|
||||||
this.scrollToLine = function(line, center) {
|
this.scrollToLine = function(line, center) {
|
||||||
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
||||||
var offset = pos.top;
|
var offset = pos.top;
|
||||||
|
|
|
||||||