summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-11-25 06:49:47 +0000
committerEndi S. Dewata <edewata@redhat.com>2013-11-25 06:49:47 +0000
commitbf774eaa59db068accb5ef4629aad4d30cb65871 (patch)
tree8a3035c1d0e4da842c5c28de4b38e418b2d61105 /js
parent28545042084a2f4212b2d97c267a267aae47d55f (diff)
downloadcli-demo-bf774eaa59db068accb5ef4629aad4d30cb65871.tar.gz
cli-demo-bf774eaa59db068accb5ef4629aad4d30cb65871.tar.xz
cli-demo-bf774eaa59db068accb5ef4629aad4d30cb65871.zip
Renamed to CLI Demo.
Diffstat (limited to 'js')
-rw-r--r--js/cli-demo.js (renamed from js/terminal-animation.js)36
-rw-r--r--js/init.js2
2 files changed, 19 insertions, 19 deletions
diff --git a/js/terminal-animation.js b/js/cli-demo.js
index 28f1833..e7be617 100644
--- a/js/terminal-animation.js
+++ b/js/cli-demo.js
@@ -1,13 +1,13 @@
/**
- * Terminal Animation
- * http://edewata.fedorapeople.org/terminal-animation/
+ * CLI Demo
+ * http://edewata.fedorapeople.org/cli-demo/
*
* @author Endi S. Dewata <edewata@redhat.com>
*/
(function($) {
- var terminal_animation = function() {
+ var cli_demo = function() {
var $this = $(this);
var interval = 2000;
@@ -19,47 +19,47 @@
var list = $this.contents().detach();
$this.console = $('<div/>', {
- 'class': 'terminal-animation-console'
+ 'class': 'cli-demo-console'
}).appendTo($this);
$this.content = $('<span/>', {
- 'class': 'terminal-animation-content'
+ 'class': 'cli-demo-content'
}).appendTo($this.console);
$this.elements = $('<span/>', {
- 'class': 'terminal-animation-hidden'
+ 'class': 'cli-demo-hidden'
}).hide().appendTo($this.console);
$this.caret = $('<span/>', {
'text': ' ',
- 'class': 'terminal-animation-caret'
+ 'class': 'cli-demo-caret'
}).appendTo($this.console);
$this.control = $('<div/>', {
- 'class': 'terminal-animation-control'
+ 'class': 'cli-demo-control'
}).appendTo($this);
$this.playButton = $('<button/>', {
'html': 'Play',
- 'class': 'terminal-animation-button',
+ 'class': 'cli-demo-button',
'click': function() { $this.play(); }
}).appendTo($this.control);
$this.prevButton = $('<button/>', {
'html': 'Prev',
- 'class': 'terminal-animation-button',
+ 'class': 'cli-demo-button',
'click': function() { $this.prev(); }
}).appendTo($this.control);
$this.nextButton = $('<button/>', {
'html': 'Next',
- 'class': 'terminal-animation-button',
+ 'class': 'cli-demo-button',
'click': function() { $this.next(); }
}).appendTo($this.control);
$this.resetButton = $('<button/>', {
'html': 'Reset',
- 'class': 'terminal-animation-button',
+ 'class': 'cli-demo-button',
'click': function() { $this.reset(); }
}).appendTo($this.control);
@@ -82,7 +82,7 @@
}
var element = $this.elements.contents().first();
- if (!element.hasClass('terminal-animation-input')) {
+ if (!element.hasClass('cli-demo-input')) {
$this.next(run);
return;
}
@@ -113,11 +113,11 @@
$this.elements.prepend(element);
var text = element.text();
- if (element.hasClass('terminal-animation-input') && text.length > 0) return;
+ if (element.hasClass('cli-demo-input') && text.length > 0) return;
if ($this.content.contents().length > 0) {
element = $this.content.contents().last();
- if (element.hasClass('terminal-animation-input')) return;
+ if (element.hasClass('cli-demo-input')) return;
element.detach();
$this.elements.prepend(element);
}
@@ -136,7 +136,7 @@
var element = $this.elements.contents().first().detach();
- if (element.hasClass('terminal-animation-input')) {
+ if (element.hasClass('cli-demo-input')) {
var text = element.text();
if (text.length == 0) {
$this.content.append(element);
@@ -182,8 +182,8 @@
return $this;
};
- $.fn.terminal_animation = function() {
- return this.each(terminal_animation);
+ $.fn.cli_demo = function() {
+ return this.each(cli_demo);
};
}(jQuery));
diff --git a/js/init.js b/js/init.js
index 56d2f4f..2669257 100644
--- a/js/init.js
+++ b/js/init.js
@@ -1,3 +1,3 @@
$(function() {
- $(".terminal-animation").terminal_animation();
+ $(".cli-demo").cli_demo();
});