From 7b6caa0f6c7603aabb5e6ed657e24aaddbeafc78 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 23 Jul 2012 15:52:49 -0500 Subject: Rename samples subdirectories --- samples/JavaScript/bootstrap-modal.js | 218 + samples/JavaScript/classes-old.js | 46 + samples/JavaScript/classes.js | 69 + samples/JavaScript/dude.js | 1 + samples/JavaScript/empty.js | 3 + samples/JavaScript/hello.js | 3 + samples/JavaScript/http.js | 1838 +++++++ samples/JavaScript/intro-old.js | 37 + samples/JavaScript/intro.js | 44 + samples/JavaScript/jquery-1.4.2.min.js | 154 + samples/JavaScript/jquery-1.6.1.js | 8936 ++++++++++++++++++++++++++++++ samples/JavaScript/jquery-1.6.1.min.js | 18 + samples/JavaScript/jquery-1.7.2.js | 9404 ++++++++++++++++++++++++++++++++ samples/JavaScript/json2_backbone.js | 1152 ++++ samples/JavaScript/modernizr.js | 1295 +++++ samples/JavaScript/parser.js | 2963 ++++++++++ samples/JavaScript/script.js | 2 + samples/JavaScript/steelseries-min.js | 24 + samples/JavaScript/uglify.js | 1320 +++++ 19 files changed, 27527 insertions(+) create mode 100644 samples/JavaScript/bootstrap-modal.js create mode 100644 samples/JavaScript/classes-old.js create mode 100644 samples/JavaScript/classes.js create mode 100644 samples/JavaScript/dude.js create mode 100644 samples/JavaScript/empty.js create mode 100644 samples/JavaScript/hello.js create mode 100644 samples/JavaScript/http.js create mode 100644 samples/JavaScript/intro-old.js create mode 100644 samples/JavaScript/intro.js create mode 100644 samples/JavaScript/jquery-1.4.2.min.js create mode 100644 samples/JavaScript/jquery-1.6.1.js create mode 100644 samples/JavaScript/jquery-1.6.1.min.js create mode 100644 samples/JavaScript/jquery-1.7.2.js create mode 100644 samples/JavaScript/json2_backbone.js create mode 100644 samples/JavaScript/modernizr.js create mode 100644 samples/JavaScript/parser.js create mode 100755 samples/JavaScript/script.js create mode 100644 samples/JavaScript/steelseries-min.js create mode 100644 samples/JavaScript/uglify.js (limited to 'samples/JavaScript') diff --git a/samples/JavaScript/bootstrap-modal.js b/samples/JavaScript/bootstrap-modal.js new file mode 100644 index 0000000..38fd0c8 --- /dev/null +++ b/samples/JavaScript/bootstrap-modal.js @@ -0,0 +1,218 @@ +/* ========================================================= + * bootstrap-modal.js v2.0.4 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (content, options) { + this.options = options + this.$element = $(content) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + $('body').addClass('modal-open') + + this.isShown = true + + escape.call(this) + backdrop.call(this, function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element + .show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element.addClass('in') + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : + that.$element.trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + $('body').removeClass('modal-open') + + escape.call(this) + + this.$element.removeClass('in') + + $.support.transition && this.$element.hasClass('fade') ? + hideWithTransition.call(this) : + hideModal.call(this) + } + + } + + + /* MODAL PRIVATE METHODS + * ===================== */ + + function hideWithTransition() { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + hideModal.call(that) + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + hideModal.call(that) + }) + } + + function hideModal(that) { + this.$element + .hide() + .trigger('hidden') + + backdrop.call(this) + } + + function backdrop(callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('