Compare commits

...
2 Commits
Author SHA1 Message Date
paris bc67c788d2 Bump version to 0.17 2014-09-10 11:09:59 +00:00
paris 3f455f90d9 Fix #4 2014-09-10 11:09:23 +00:00
6 changed files with 4663 additions and 4616 deletions
+17 -2
View File
@@ -5,7 +5,21 @@
* The bidirectional argument indicates, whether the terminal should * The bidirectional argument indicates, whether the terminal should
* send data to the socket as well and is true, by default. * send data to the socket as well and is true, by default.
*/ */
Terminal.prototype.attach = function (socket, bidirectional) {
(function (attach) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], attach);
} else {
/*
* Plain browser environment
*/
attach(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.attach = function (socket, bidirectional) {
var term = this; var term = this;
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional; bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
@@ -20,4 +34,5 @@ Terminal.prototype.attach = function (socket, bidirectional) {
socket.send(data); socket.send(data);
}); });
} }
} };
});
+15 -1
View File
@@ -11,7 +11,20 @@
* terminal row and truncate its width with the current number * terminal row and truncate its width with the current number
* of columns) * of columns)
*/ */
Terminal.prototype.fit = function () { (function (fit) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], fit);
} else {
/*
* Plain browser environment
*/
fit(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.fit = function () {
var container = this.rowContainer, var container = this.rowContainer,
subjectRow = this.rowContainer.firstElementChild, subjectRow = this.rowContainer.firstElementChild,
rows, rows,
@@ -43,3 +56,4 @@ Terminal.prototype.fit = function () {
this.resize(cols, rows); this.resize(cols, rows);
}; };
});
+16 -2
View File
@@ -10,7 +10,20 @@
* If the `fullscreen` argument has not been supplied, the * If the `fullscreen` argument has not been supplied, the
* fullscreen mode is being toggled. * fullscreen mode is being toggled.
*/ */
Terminal.prototype.toggleFullscreen = function (fullscreen) { (function (fullscreen) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define(['../../src/xterm'], fullscreen);
} else {
/*
* Plain browser environment
*/
fullscreen(this.Xterm);
}
})(function (Xterm) {
Xterm.prototype.toggleFullscreen = function (fullscreen) {
var fn; var fn;
if (typeof fullscreen == 'undefined') { if (typeof fullscreen == 'undefined') {
@@ -22,4 +35,5 @@ Terminal.prototype.toggleFullscreen = function (fullscreen) {
} }
this.element.classList[fn]('fullscreen'); this.element.classList[fn]('fullscreen');
} };
});
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "xterm.js", "name": "xterm.js",
"version": "0.16", "version": "0.17",
"ignore": ["demo", "docs", "test", ".gitignore"] "ignore": ["demo", "docs", "test", ".gitignore"]
} }
+2 -2
View File
@@ -51,9 +51,9 @@ copyright = u'2014, SourceLair Limited'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.16' version = '0.17'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.16 Alpha' release = '0.17 Alpha'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
+17 -13
View File
@@ -31,8 +31,20 @@
* other features. * other features.
*/ */
;(function() { (function (xterm) {
if (typeof define == 'function') {
/*
* Require.js is available
*/
define([], xterm);
} else {
/*
* Plain browser environment
*/
this.Xterm = xterm.call(this);
this.Terminal = this.Xterm; /* Backwards compatibility with term.js */
}
})(function() {
/** /**
* Terminal Emulation References: * Terminal Emulation References:
* http://vt100.net/ * http://vt100.net/
@@ -50,8 +62,7 @@
* Shared * Shared
*/ */
var window = this var window = this, document = this.document;
, document = this.document;
/** /**
* EventEmitter * EventEmitter
@@ -4763,12 +4774,5 @@ Terminal.on = on;
Terminal.off = off; Terminal.off = off;
Terminal.cancel = cancel; Terminal.cancel = cancel;
if (typeof module !== 'undefined') { return Terminal;
module.exports = Terminal; });
} else {
this.Terminal = Terminal;
}
}).call(function() {
return this || (typeof window !== 'undefined' ? window : global);
}());