diff --git a/awx/ui/static/lib/twitter/.bower.json b/awx/ui/static/lib/twitter/.bower.json new file mode 100644 index 0000000000..96cbafbac5 --- /dev/null +++ b/awx/ui/static/lib/twitter/.bower.json @@ -0,0 +1,35 @@ +{ + "name": "bootstrap", + "version": "3.1.0", + "main": [ + "./dist/css/bootstrap.css", + "./dist/js/bootstrap.js", + "./dist/fonts/glyphicons-halflings-regular.eot", + "./dist/fonts/glyphicons-halflings-regular.svg", + "./dist/fonts/glyphicons-halflings-regular.ttf", + "./dist/fonts/glyphicons-halflings-regular.woff" + ], + "ignore": [ + "**/.*", + "_config.yml", + "CNAME", + "composer.json", + "CONTRIBUTING.md", + "docs", + "js/tests" + ], + "dependencies": { + "jquery": ">= 1.9.0" + }, + "homepage": "https://github.com/twbs/bootstrap", + "_release": "3.1.0", + "_resolution": { + "type": "version", + "tag": "v3.1.0", + "commit": "1409cde7e800ca83fd761f87e5ad8f0d259e38d1" + }, + "_source": "git://github.com/twbs/bootstrap.git", + "_target": "~3.1.0", + "_originalSource": "twitter", + "_direct": true +} \ No newline at end of file diff --git a/awx/ui/static/lib/twitter/Gruntfile.js b/awx/ui/static/lib/twitter/Gruntfile.js new file mode 100644 index 0000000000..ec9fb594e7 --- /dev/null +++ b/awx/ui/static/lib/twitter/Gruntfile.js @@ -0,0 +1,418 @@ +/*! + * Bootstrap's Gruntfile + * http://getbootstrap.com + * Copyright 2013-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +module.exports = function (grunt) { + 'use strict'; + + // Force use of Unix newlines + grunt.util.linefeed = '\n'; + + RegExp.quote = function (string) { + return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); + }; + + var fs = require('fs'); + var path = require('path'); + var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js'); + var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js'); + var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js'); + var updateShrinkwrap = require('./test-infra/shrinkwrap.js'); + + // Project configuration. + grunt.initConfig({ + + // Metadata. + pkg: grunt.file.readJSON('package.json'), + banner: '/*!\n' + + ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' + + ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + + ' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' + + ' */\n', + jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap requires jQuery\') }\n\n', + + // Task configuration. + clean: { + dist: 'dist' + }, + + jshint: { + options: { + jshintrc: 'js/.jshintrc' + }, + grunt: { + src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js'] + }, + src: { + src: 'js/*.js' + }, + test: { + src: 'js/tests/unit/*.js' + }, + assets: { + src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js'] + } + }, + + jscs: { + options: { + config: 'js/.jscs.json', + }, + grunt: { + src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js'] + }, + src: { + src: 'js/*.js' + }, + test: { + src: 'js/tests/unit/*.js' + }, + assets: { + src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js'] + } + }, + + csslint: { + options: { + csslintrc: 'less/.csslintrc' + }, + src: [ + 'dist/css/bootstrap.css', + 'dist/css/bootstrap-theme.css', + 'docs/assets/css/docs.css' + ] + }, + + concat: { + options: { + banner: '<%= banner %>\n<%= jqueryCheck %>', + stripBanners: false + }, + bootstrap: { + src: [ + 'js/transition.js', + 'js/alert.js', + 'js/button.js', + 'js/carousel.js', + 'js/collapse.js', + 'js/dropdown.js', + 'js/modal.js', + 'js/tooltip.js', + 'js/popover.js', + 'js/scrollspy.js', + 'js/tab.js', + 'js/affix.js' + ], + dest: 'dist/js/<%= pkg.name %>.js' + } + }, + + uglify: { + bootstrap: { + options: { + banner: '<%= banner %>', + report: 'min' + }, + src: '<%= concat.bootstrap.dest %>', + dest: 'dist/js/<%= pkg.name %>.min.js' + }, + customize: { + options: { + preserveComments: 'some', + report: 'min' + }, + src: [ + 'docs/assets/js/vendor/less.min.js', + 'docs/assets/js/vendor/jszip.js', + 'docs/assets/js/vendor/uglify.min.js', + 'docs/assets/js/vendor/blob.js', + 'docs/assets/js/vendor/filesaver.js', + 'docs/assets/js/raw-files.min.js', + 'docs/assets/js/customizer.js' + ], + dest: 'docs/assets/js/customize.min.js' + }, + docsJs: { + options: { + preserveComments: 'some', + report: 'min' + }, + src: [ + 'docs/assets/js/vendor/holder.js', + 'docs/assets/js/application.js' + ], + dest: 'docs/assets/js/docs.min.js' + } + }, + + less: { + compileCore: { + options: { + strictMath: true, + sourceMap: true, + outputSourceFiles: true, + sourceMapURL: '<%= pkg.name %>.css.map', + sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map' + }, + files: { + 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less' + } + }, + compileTheme: { + options: { + strictMath: true, + sourceMap: true, + outputSourceFiles: true, + sourceMapURL: '<%= pkg.name %>-theme.css.map', + sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map' + }, + files: { + 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less' + } + }, + minify: { + options: { + cleancss: true, + report: 'min' + }, + files: { + 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css' + } + } + }, + + cssmin: { + compress: { + options: { + keepSpecialComments: '*', + noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css + report: 'min', + selectorsMergeMode: 'ie8' + }, + src: [ + 'docs/assets/css/docs.css', + 'docs/assets/css/pygments-manni.css' + ], + dest: 'docs/assets/css/docs.min.css' + } + }, + + usebanner: { + dist: { + options: { + position: 'top', + banner: '<%= banner %>' + }, + files: { + src: [ + 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>.min.css', + 'dist/css/<%= pkg.name %>-theme.css', + 'dist/css/<%= pkg.name %>-theme.min.css' + ] + } + } + }, + + csscomb: { + sort: { + options: { + config: 'less/.csscomb.json' + }, + files: { + 'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css', + 'dist/css/<%= pkg.name %>-theme.css': 'dist/css/<%= pkg.name %>-theme.css' + } + } + }, + + copy: { + fonts: { + expand: true, + src: 'fonts/*', + dest: 'dist/' + }, + docs: { + expand: true, + cwd: './dist', + src: [ + '{css,js}/*.min.*', + 'css/*.map', + 'fonts/*' + ], + dest: 'docs/dist' + } + }, + + qunit: { + options: { + inject: 'js/tests/unit/phantom.js' + }, + files: 'js/tests/*.html' + }, + + connect: { + server: { + options: { + port: 3000, + base: '.' + } + } + }, + + jekyll: { + docs: {} + }, + + jade: { + compile: { + options: { + pretty: true, + data: function () { + var filePath = path.join(__dirname, 'less/variables.less'); + var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'}); + var parser = new BsLessdocParser(fileContent); + return {sections: parser.parseFile()}; + } + }, + files: { + 'docs/_includes/customizer-variables.html': 'docs/customizer-variables.jade', + 'docs/_includes/nav-customize.html': 'docs/customizer-nav.jade' + } + } + }, + + validation: { + options: { + charset: 'utf-8', + doctype: 'HTML5', + failHard: true, + reset: true, + relaxerror: [ + 'Bad value X-UA-Compatible for attribute http-equiv on element meta.', + 'Element img is missing required attribute src.' + ] + }, + files: { + src: '_gh_pages/**/*.html' + } + }, + + watch: { + src: { + files: '<%= jshint.src.src %>', + tasks: ['jshint:src', 'qunit'] + }, + test: { + files: '<%= jshint.test.src %>', + tasks: ['jshint:test', 'qunit'] + }, + less: { + files: 'less/*.less', + tasks: 'less' + } + }, + + sed: { + versionNumber: { + pattern: (function () { + var old = grunt.option('oldver'); + return old ? RegExp.quote(old) : old; + })(), + replacement: grunt.option('newver'), + recursive: true + } + }, + + 'saucelabs-qunit': { + all: { + options: { + build: process.env.TRAVIS_JOB_ID, + concurrency: 10, + urls: ['http://127.0.0.1:3000/js/tests/index.html'], + browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml') + } + } + }, + + exec: { + npmUpdate: { + command: 'npm update' + }, + npmShrinkWrap: { + command: 'npm shrinkwrap --dev' + } + } + }); + + + // These plugins provide necessary tasks. + require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); + grunt.loadNpmTasks('browserstack-runner'); + + // Docs HTML validation task + grunt.registerTask('validate-html', ['jekyll', 'validation']); + + // Test task. + var testSubtasks = []; + // Skip core tests if running a different subset of the test suite + if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') { + testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']); + } + // Skip HTML validation if running a different subset of the test suite + if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') { + testSubtasks.push('validate-html'); + } + // Only run Sauce Labs tests if there's a Sauce access key + if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' && + // Skip Sauce if running a different subset of the test suite + (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) { + testSubtasks.push('connect'); + testSubtasks.push('saucelabs-qunit'); + } + // Only run BrowserStack tests if there's a BrowserStack access key + if (typeof process.env.BROWSERSTACK_KEY !== 'undefined' && + // Skip BrowserStack if running a different subset of the test suite + (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'browserstack-js-unit')) { + testSubtasks.push('browserstack_runner'); + } + grunt.registerTask('test', testSubtasks); + + // JS distribution task. + grunt.registerTask('dist-js', ['concat', 'uglify']); + + // CSS distribution task. + grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']); + + // Docs distribution task. + grunt.registerTask('dist-docs', 'copy:docs'); + + // Full distribution task. + grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-docs', 'dist-js']); + + // Default task. + grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer', 'update-shrinkwrap']); + + // Version numbering task. + // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z + // This can be overzealous, so its changes should always be manually reviewed! + grunt.registerTask('change-version-number', 'sed'); + + grunt.registerTask('build-glyphicons-data', generateGlyphiconsData); + + // task for building customizer + grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']); + grunt.registerTask('build-customizer-html', 'jade'); + grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () { + var banner = grunt.template.process('<%= banner %>'); + generateRawFilesJs(banner); + }); + + // Task for updating the npm packages used by the Travis build. + grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']); + grunt.registerTask('_update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); }); +}; diff --git a/awx/ui/static/lib/twitter/LICENSE b/awx/ui/static/lib/twitter/LICENSE new file mode 100644 index 0000000000..8d94aa9ac9 --- /dev/null +++ b/awx/ui/static/lib/twitter/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2014 Twitter, Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/awx/ui/static/lib/twitter/README.md b/awx/ui/static/lib/twitter/README.md new file mode 100644 index 0000000000..da5dfe223e --- /dev/null +++ b/awx/ui/static/lib/twitter/README.md @@ -0,0 +1,173 @@ +# [Bootstrap](http://getbootstrap.com) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.png)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.png?theme=shields.io)](https://david-dm.org/twbs/bootstrap#info=devDependencies) +[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) + +Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community. + +To get started, check out ! + +## Table of contents + + - [Quick start](#quick-start) + - [Bugs and feature requests](#bugs-and-feature-requests) + - [Documentation](#documentation) + - [Compiling CSS and JavaScript](#compiling-css-and-javascript) + - [Contributing](#contributing) + - [Community](#community) + - [Versioning](#versioning) + - [Authors](#authors) + - [Copyright and license](#copyright-and-license) + +## Quick start + +Three quick start options are available: + +- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.1.0.zip). +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`. +- Install with [Bower](http://bower.io): `bower install bootstrap`. + +Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. + +### What's included + +Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this: + +``` +bootstrap/ +├── css/ +│ ├── bootstrap.css +│ ├── bootstrap.min.css +│ ├── bootstrap-theme.css +│ └── bootstrap-theme.min.css +├── js/ +│ ├── bootstrap.js +│ └── bootstrap.min.js +└── fonts/ + ├── glyphicons-halflings-regular.eot + ├── glyphicons-halflings-regular.svg + ├── glyphicons-halflings-regular.ttf + └── glyphicons-halflings-regular.woff +``` + +We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). Fonts from Glyphicons are included, as is the optional Bootstrap theme. + + + +## Bugs and feature requests + +Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). + + +## Documentation + +Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally. + +### Running documentation locally + +1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x). + - **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. We use Pygments for syntax highlighting, so make sure to read the sections on installing Python and Pygments. +2. From the root `/bootstrap` directory, run `jekyll serve` in the command line. + - **Windows users:** While we use Jekyll's `encoding` setting, you might still need to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors. For Ruby 2.0.0, run `chcp 65001` first. For Ruby 1.9.3, you can alternatively do `SET LANG=en_EN.UTF-8`. +3. Open in your browser, and voilà. + +Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). + +### Documentation for previous releases + +Documentation for v2.3.2 has been made available for the time being at while folks transition to Bootstrap 3. + +[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. + + + +## Compiling CSS and JavaScript + +Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands. + +### Install Grunt + +From the command line: + +1. Install `grunt-cli` globally with `npm install -g grunt-cli`. +2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there. + +When completed, you'll be able to run the various Grunt commands provided from the command line. + +**Unfamiliar with `npm`? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding. + +### Available Grunt commands + +#### Build - `grunt` +Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).** + +#### Only compile CSS and JavaScript - `grunt dist` +`grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).** + +#### Tests - `grunt test` +Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI). + +#### Watch - `grunt watch` +This is a convenience method for watching just Less files and automatically building them whenever you save. + +### Troubleshooting dependencies + +Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`. + + + +## Contributing + +Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. + +Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo). + +Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at . + + + +## Community + +Keep track of development and community news. + +- Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap). +- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com). +- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##twitter-bootstrap` channel. +- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)). + + + + +## Versioning + +For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible. + +Releases will be numbered with the following format: + +`..` + +And constructed with the following guidelines: + +- Breaking backward compatibility **bumps the major** while resetting minor and patch +- New additions without breaking backward compatibility **bumps the minor** while resetting the patch +- Bug fixes and misc changes **bumps only the patch** + +For more information on SemVer, please visit . + + + +## Authors + +**Mark Otto** + +- +- + +**Jacob Thornton** + +- +- + + + +## Copyright and license + +Code and documentation copyright 2011-2014 Twitter, Inc. Code released under [the MIT license](LICENSE). Docs released under [Creative Commons](docs/LICENSE). diff --git a/awx/ui/static/lib/twitter/bower.json b/awx/ui/static/lib/twitter/bower.json new file mode 100644 index 0000000000..3bb72d1005 --- /dev/null +++ b/awx/ui/static/lib/twitter/bower.json @@ -0,0 +1,24 @@ +{ + "name": "bootstrap", + "version": "3.1.0", + "main": [ + "./dist/css/bootstrap.css", + "./dist/js/bootstrap.js", + "./dist/fonts/glyphicons-halflings-regular.eot", + "./dist/fonts/glyphicons-halflings-regular.svg", + "./dist/fonts/glyphicons-halflings-regular.ttf", + "./dist/fonts/glyphicons-halflings-regular.woff" + ], + "ignore": [ + "**/.*", + "_config.yml", + "CNAME", + "composer.json", + "CONTRIBUTING.md", + "docs", + "js/tests" + ], + "dependencies": { + "jquery": ">= 1.9.0" + } +} diff --git a/awx/ui/static/lib/twitter/browserstack.json b/awx/ui/static/lib/twitter/browserstack.json new file mode 100644 index 0000000000..beab742e1f --- /dev/null +++ b/awx/ui/static/lib/twitter/browserstack.json @@ -0,0 +1,44 @@ +{ + "username": "--secure--", + "key": "--secure--", + "test_path": "js/tests/index.html", + "debug": true, + "browsers": [ + { + "browser": "firefox", + "browser_version": "latest", + "os": "OS X", + "os_version": "Mavericks" + }, + { + "browser": "safari", + "browser_version": "latest", + "os": "OS X", + "os_version": "Mavericks" + }, + { + "browser": "chrome", + "browser_version": "latest", + "os": "OS X", + "os_version": "Mavericks" + }, + { + "browser": "firefox", + "browser_version": "latest", + "os": "Windows", + "os_version": "8.1" + }, + { + "browser": "chrome", + "browser_version": "latest", + "os": "Windows", + "os_version": "8.1" + }, + { + "browser": "Mobile Safari", + "os": "ios", + "os_version": "7.0", + "device": "iPhone 5S" + } + ] +} diff --git a/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.eot b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000..423bd5d3a2 Binary files /dev/null and b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.eot differ diff --git a/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.svg b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000000..4469488747 --- /dev/null +++ b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.ttf b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000..a498ef4e7c Binary files /dev/null and b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.ttf differ diff --git a/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.woff b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000000..d83c539b82 Binary files /dev/null and b/awx/ui/static/lib/twitter/fonts/glyphicons-halflings-regular.woff differ diff --git a/awx/ui/static/lib/twitter/js/affix.js b/awx/ui/static/lib/twitter/js/affix.js new file mode 100644 index 0000000000..d447b0947e --- /dev/null +++ b/awx/ui/static/lib/twitter/js/affix.js @@ -0,0 +1,137 @@ +/* ======================================================================== + * Bootstrap: affix.js v3.1.0 + * http://getbootstrap.com/javascript/#affix + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // AFFIX CLASS DEFINITION + // ====================== + + var Affix = function (element, options) { + this.options = $.extend({}, Affix.DEFAULTS, options) + this.$window = $(window) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + + this.$element = $(element) + this.affixed = + this.unpin = + this.pinnedOffset = null + + this.checkPosition() + } + + Affix.RESET = 'affix affix-top affix-bottom' + + Affix.DEFAULTS = { + offset: 0 + } + + Affix.prototype.getPinnedOffset = function () { + if (this.pinnedOffset) return this.pinnedOffset + this.$element.removeClass(Affix.RESET).addClass('affix') + var scrollTop = this.$window.scrollTop() + var position = this.$element.offset() + return (this.pinnedOffset = position.top - scrollTop) + } + + Affix.prototype.checkPositionWithEventLoop = function () { + setTimeout($.proxy(this.checkPosition, this), 1) + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + var scrollTop = this.$window.scrollTop() + var position = this.$element.offset() + var offset = this.options.offset + var offsetTop = offset.top + var offsetBottom = offset.bottom + + if (this.affixed == 'top') position.top += scrollTop + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + + var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : + offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : + offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false + + if (this.affixed === affix) return + if (this.unpin) this.$element.css('top', '') + + var affixType = 'affix' + (affix ? '-' + affix : '') + var e = $.Event(affixType + '.bs.affix') + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + + this.$element + .removeClass(Affix.RESET) + .addClass(affixType) + .trigger($.Event(affixType.replace('affix', 'affixed'))) + + if (affix == 'bottom') { + this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() }) + } + } + + + // AFFIX PLUGIN DEFINITION + // ======================= + + var old = $.fn.affix + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.affix') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + + // AFFIX NO CONFLICT + // ================= + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + // AFFIX DATA-API + // ============== + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + var data = $spy.data() + + data.offset = data.offset || {} + + if (data.offsetBottom) data.offset.bottom = data.offsetBottom + if (data.offsetTop) data.offset.top = data.offsetTop + + $spy.affix(data) + }) + }) + +}(jQuery); diff --git a/awx/ui/static/lib/twitter/js/alert.js b/awx/ui/static/lib/twitter/js/alert.js new file mode 100644 index 0000000000..1c0756a953 --- /dev/null +++ b/awx/ui/static/lib/twitter/js/alert.js @@ -0,0 +1,88 @@ +/* ======================================================================== + * Bootstrap: alert.js v3.1.0 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.hasClass('alert') ? $this : $this.parent() + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent.trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(150) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); diff --git a/awx/ui/static/lib/twitter/js/button.js b/awx/ui/static/lib/twitter/js/button.js new file mode 100644 index 0000000000..2be72d53dc --- /dev/null +++ b/awx/ui/static/lib/twitter/js/button.js @@ -0,0 +1,107 @@ +/* ======================================================================== + * Bootstrap: button.js v3.1.0 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (!data.resetText) $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + e.preventDefault() + }) + +}(jQuery); diff --git a/awx/ui/static/lib/twitter/js/carousel.js b/awx/ui/static/lib/twitter/js/carousel.js new file mode 100644 index 0000000000..88c9b23da4 --- /dev/null +++ b/awx/ui/static/lib/twitter/js/carousel.js @@ -0,0 +1,205 @@ +/* ======================================================================== + * Bootstrap: carousel.js v3.1.0 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getActiveIndex = function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + + return this.$items.index(this.$active) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getActiveIndex() + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || $active[type]() + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var fallback = type == 'next' ? 'first' : 'last' + var that = this + + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() + } + + if ($next.hasClass('active')) return this.sliding = false + + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid.bs.carousel', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) + }) + .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid.bs.carousel') + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + }) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + $carousel.carousel($carousel.data()) + }) + }) + +}(jQuery); diff --git a/awx/ui/static/lib/twitter/js/collapse.js b/awx/ui/static/lib/twitter/js/collapse.js new file mode 100644 index 0000000000..1abafd6a5c --- /dev/null +++ b/awx/ui/static/lib/twitter/js/collapse.js @@ -0,0 +1,170 @@ +/* ======================================================================== + * Bootstrap: collapse.js v3.1.0 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.transitioning = null + + if (this.options.parent) this.$parent = $(this.options.parent) + if (this.options.toggle) this.toggle() + } + + Collapse.DEFAULTS = { + toggle: true + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var actives = this.$parent && this.$parent.find('> .panel > .in') + + if (actives && actives.length) { + var hasData = actives.data('bs.collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing') + [dimension](0) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in') + [dimension]('auto') + this.transitioning = 0 + this.$element.trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + [dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element + [dimension](this.$element[dimension]()) + [0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse') + .removeClass('in') + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .trigger('hidden.bs.collapse') + .removeClass('collapsing') + .addClass('collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') option = !option + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + var target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + var $target = $(target) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $this.data() + var parent = $this.attr('data-parent') + var $parent = parent && $(parent) + + if (!data || !data.transitioning) { + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') + $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + } + + $target.collapse(option) + }) + +}(jQuery); diff --git a/awx/ui/static/lib/twitter/js/dropdown.js b/awx/ui/static/lib/twitter/js/dropdown.js new file mode 100644 index 0000000000..9c13aac97d --- /dev/null +++ b/awx/ui/static/lib/twitter/js/dropdown.js @@ -0,0 +1,147 @@ +/* ======================================================================== + * Bootstrap: dropdown.js v3.1.0 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle=dropdown]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('