├── .gitignore ├── .jshintrc ├── CONTRIBUTING.md ├── Gruntfile.js ├── MIT-LICENSE.txt ├── README.md ├── bower.json ├── dist ├── demos │ ├── loan_calculator.html │ ├── purecss.html │ ├── select_filter.html │ ├── survey.html │ ├── twitter_bootstrap.html │ └── user_manager.html ├── index.html ├── jquery-impromptu.css ├── jquery-impromptu.js ├── jquery-impromptu.min.css ├── jquery-impromptu.min.js └── themes │ ├── base.css │ ├── classic-impromptu.css │ ├── clean-blue.css │ ├── ext-blue.css │ ├── smooth.css │ └── zoo.css ├── jquery-impromptu.jquery.json ├── package.json ├── src ├── .jshintrc ├── demos │ ├── loan_calculator.html │ ├── purecss.html │ ├── select_filter.html │ ├── survey.html │ ├── twitter_bootstrap.html │ └── user_manager.html ├── index.html ├── jquery-impromptu.css ├── jquery-impromptu.js └── themes │ ├── base.css │ ├── classic-impromptu.css │ ├── clean-blue.css │ ├── ext-blue.css │ ├── smooth.css │ └── zoo.css └── test ├── .jshintrc ├── SpecRunner.html ├── jquery-impromptu_spec.js └── lib ├── jasmine-2.0.3 ├── boot.js ├── console.js ├── jasmine-html.js ├── jasmine.css ├── jasmine.js └── jasmine_favicon.png ├── jasmine-jquery.js └── jquery.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true, 14 | "es5": true 15 | } 16 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Important notes 4 | Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory! 5 | 6 | ### Code style 7 | Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already (tabs).** 8 | 9 | ### PhantomJS 10 | While Grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers. 11 | 12 | ## Modifying the code 13 | First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed. 14 | 15 | Test that Grunt's CLI is installed by running `grunt --version`. If the command isn't found, run `npm install -g grunt-cli`. For more information about installing Grunt, see the [getting started guide](http://gruntjs.com/getting-started). 16 | 17 | 1. Fork and clone the repo. 18 | 1. Run `npm install` to install all dependencies (including Grunt). 19 | 1. Run `grunt` to grunt this project. 20 | 21 | Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken. 22 | 23 | ## Submitting pull requests 24 | 25 | 1. Create a new branch, please don't work in your `master` branch directly. 26 | 1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail. 27 | 1. Fix stuff. 28 | 1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done. 29 | 1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere. 30 | 1. Update the documentation to reflect any changes. 31 | 1. Push to your fork and submit a pull request. 32 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | 8 | // Metadata. 9 | pkg: grunt.file.readJSON('jquery-impromptu.jquery.json'), 10 | banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %>' + 11 | //' - <%= grunt.template.today("yyyy-mm-dd") %>\n' + 12 | ' - <%= pkg.modified %>\n' + 13 | '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + 14 | '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + 15 | ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', 16 | 17 | // Task configuration. 18 | clean: { 19 | files: ['dist'] 20 | }, 21 | copy: { 22 | dist: { 23 | files: [ 24 | { src: 'src/index.html', dest: 'dist/index.html' }, 25 | { src: 'src/demos/*', dest: 'dist/demos/', expand:true, flatten: true }, 26 | { src: 'src/themes/*', dest: 'dist/themes/', expand:true, flatten: true } 27 | ] 28 | } 29 | }, 30 | concat: { 31 | dist: { 32 | options: { 33 | banner: '<%= banner %>', 34 | stripBanners: true 35 | }, 36 | files: [ 37 | { src: 'src/<%= pkg.name %>.js', dest: 'dist/<%= pkg.name %>.js' }, 38 | { src: 'src/<%= pkg.name %>.css', dest: 'dist/<%= pkg.name %>.css' } 39 | ] 40 | } 41 | }, 42 | uglify: { 43 | options: { 44 | banner: '<%= banner %>' 45 | }, 46 | dist: { 47 | src: 'dist/<%= pkg.name %>.js', 48 | dest: 'dist/<%= pkg.name %>.min.js' 49 | }, 50 | }, 51 | cssmin: { 52 | options: { 53 | //banner: '<%= banner %>' 54 | }, 55 | dist: { 56 | src: 'dist/<%= pkg.name %>.css', 57 | dest: 'dist/<%= pkg.name %>.min.css' 58 | }, 59 | }, 60 | replace: { 61 | dist: { 62 | options: { 63 | variables: { 64 | version: '<%= pkg.version %>', 65 | timestamp: '<%= pkg.modified %>' 66 | }, 67 | prefix: '@@' 68 | }, 69 | files: [ 70 | //{ src: 'dist/<%= pkg.name %>.js', dest: 'dist/<%= pkg.name %>.js' }, 71 | //{ src: 'dist/<%= pkg.name %>.css', dest: 'dist/<%= pkg.name %>.css' }, 72 | { src: 'dist/index.html', dest: 'dist/index.html' } 73 | ] 74 | } 75 | }, 76 | jasmine: { 77 | src: 'src/<%= pkg.name %>.js', 78 | options: { 79 | specs: 'test/*_spec.js', 80 | vendor: [ 81 | 'test/lib/jquery.min.js', 82 | 'test/lib/jasmine-jquery.js' 83 | ] 84 | } 85 | }, 86 | jshint: { 87 | gruntfile: { 88 | options: { 89 | jshintrc: '.jshintrc' 90 | }, 91 | src: 'Gruntfile.js' 92 | }, 93 | src: { 94 | options: { 95 | jshintrc: 'src/.jshintrc' 96 | }, 97 | src: ['src/**/*.js'] 98 | }, 99 | test: { 100 | options: { 101 | jshintrc: 'test/.jshintrc' 102 | }, 103 | src: ['test/*_spec.js'] 104 | } 105 | }, 106 | watch: { 107 | gruntfile: { 108 | files: '<%= jshint.gruntfile.src %>', 109 | tasks: ['jshint:gruntfile'] 110 | }, 111 | src: { 112 | files: 'src/**',//'<%= jshint.src.src %>', 113 | tasks: ['jshint:src', 'jasmine', 'clean', 'copy', 'concat', 'replace', 'uglify', 'cssmin'] 114 | }, 115 | test: { 116 | files: '<%= jshint.test.src %>', 117 | tasks: ['jshint:test', 'jasmine'] 118 | } 119 | }, 120 | }); 121 | 122 | // These plugins provide necessary tasks. 123 | grunt.loadNpmTasks('grunt-contrib-clean'); 124 | grunt.loadNpmTasks('grunt-contrib-concat'); 125 | grunt.loadNpmTasks('grunt-contrib-copy'); 126 | grunt.loadNpmTasks('grunt-replace'); 127 | grunt.loadNpmTasks('grunt-contrib-uglify'); 128 | grunt.loadNpmTasks('grunt-contrib-cssmin'); 129 | grunt.loadNpmTasks('grunt-contrib-jasmine'); 130 | grunt.loadNpmTasks('grunt-contrib-jshint'); 131 | grunt.loadNpmTasks('grunt-contrib-watch'); 132 | 133 | // Default task. 134 | grunt.registerTask('default', ['jshint', 'jasmine', 'clean', 'copy', 'concat', 'replace', 'uglify', 'cssmin']); 135 | 136 | // test task. 137 | grunt.registerTask('test', ['jshint', 'jasmine']); 138 | 139 | }; 140 | -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Trent Richardson, http://trentrichardson.com/Impromptu/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jQuery Impromptu 2 | ================ 3 | 4 | About 5 | ----- 6 | - Author: [Trent Richardson][author] 7 | - Documentation: [http://trentrichardson.com/Impromptu/][documentation] 8 | - Twitter: [@practicalweb][twitter] 9 | - eBook: [Impromptu - From I to U][ebook] 10 | 11 | [author]: (http://trentrichardson.com) 12 | [documentation]: http://trentrichardson.com/Impromptu/ 13 | [twitter]: http://twitter.com/practicalweb 14 | [ebook]: http://sellfy.com/p/IrwS 15 | 16 | Use 17 | --- 18 | - Include jQuery and Impromptu into your page ([production version][jsmin] or the [development version][jsmax]) 19 | - Add the CSS file or copy it to your CSS ([production version][cssmin] or the [development version][cssmax]) 20 | - call using $.prompt('hello world!'); 21 | - Visit the [Impromptu Documentation](http://trentrichardson.com/Impromptu/) for MUCH more advanced usage 22 | 23 | [jsmin]: dist/jquery-impromptu.min.js 24 | [jsmax]: dist/jquery-impromptu.js 25 | [cssmin]: dist/jquery-impromptu.min.css 26 | [cssmax]: dist/jquery-impromptu.css 27 | 28 | Contributing 29 | ------------ 30 | jQuery Impromptu uses Grunt to automate the build, lint, minification. 31 | - Checkout the dev branch 32 | - Follow the [contributing instructions][contributing] 33 | 34 | [contributing]: CONTRIBUTING.md 35 | 36 | License 37 | ------- 38 | Copyright 2011 Trent Richardson 39 | 40 | Licensed under the [MIT][mitlicense]. 41 | 42 | [mitlicense]: MIT-LICENSE.txt 43 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-impromptu", 3 | "main": [ 4 | "dist/jquery-impromptu.css", 5 | "dist/jquery-impromptu.js" 6 | ], 7 | "keywords": ["impromptu","prompt","alert","modal","overlay","confirm"], 8 | "repository": { 9 | "type": "git", 10 | "url": "git://github.com/trentrichardson/jQuery-Impromptu.git" 11 | }, 12 | "dependencies": { 13 | "jquery": ">=1.6" 14 | } 15 | } -------------------------------------------------------------------------------- /dist/demos/loan_calculator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu States Example - Loan Calculator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 99 | 100 | 101 | 102 | Test Impromptu Loan Calculator 103 | 104 | 105 | -------------------------------------------------------------------------------- /dist/demos/purecss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu with PureCSS 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 115 | 116 | 117 | 118 | Test Impromptu States Survey 119 |
120 | 121 | -------------------------------------------------------------------------------- /dist/demos/select_filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu States Example - Select Dropdown Option Search 7 | 8 | 9 | 10 | 11 | 12 | 13 | 38 | 39 | 118 | 119 | 120 | 121 |

Right click or ctrl click on the select for it to bring up a search for its options:

122 | 123 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /dist/demos/survey.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu States Survey Example 6 | 7 | 8 | 9 | 15 | 16 | 17 | 18 | 19 | 20 | 94 | 95 | 96 | 97 | Test Impromptu States Survey 98 |
99 | 100 | 101 | -------------------------------------------------------------------------------- /dist/demos/twitter_bootstrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu with Twitter Bootstrap 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 115 | 116 | 117 | 118 | Test Impromptu States Survey 119 |
120 | 121 | -------------------------------------------------------------------------------- /dist/demos/user_manager.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu - Demo 2 6 | 7 | 8 | 9 | 24 | 25 | 26 | 27 | 28 | 29 | 118 | 119 | 120 | 121 |
122 |
123 |
124 | 125 | Edit | 126 | Delete 127 | 128 | John 129 | Doe 130 |
131 | 132 |
133 | 134 | Edit | 135 | Delete 136 | 137 | Jane 138 | Doe 139 |
140 | 141 |
142 | 143 | Edit | 144 | Delete 145 | 146 | Bill 147 | Smith 148 |
149 | 150 |
151 | 152 | Edit | 153 | Delete 154 | 155 | Steve 156 | Jones 157 |
158 | 159 |
160 | 161 | Edit | 162 | Delete 163 | 164 | Will 165 | Johnson 166 |
167 | 168 |
169 | 170 | Edit | 171 | Delete 172 | 173 | Harold 174 | Anderson 175 |
176 | 177 |
178 |
179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /dist/jquery-impromptu.css: -------------------------------------------------------------------------------- 1 | /*! jQuery-Impromptu - v6.2.2 - 2015-11-14 2 | * http://trentrichardson.com/Impromptu 3 | * Copyright (c) 2015 Trent Richardson; Licensed MIT */ 4 | .jqifade{ 5 | position: absolute; 6 | background-color: #777777; 7 | } 8 | iframe.jqifade{ 9 | display:block; 10 | z-index:-1; 11 | } 12 | div.jqi{ 13 | width: 400px; 14 | max-width:90%; 15 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 16 | position: absolute; 17 | background-color: #ffffff; 18 | font-size: 11px; 19 | text-align: left; 20 | border: solid 1px #eeeeee; 21 | border-radius: 6px; 22 | -moz-border-radius: 6px; 23 | -webkit-border-radius: 6px; 24 | padding: 7px; 25 | } 26 | div.jqi .jqicontainer{ 27 | } 28 | div.jqi .jqiclose{ 29 | position: absolute; 30 | top: 4px; right: -2px; 31 | width: 18px; 32 | cursor: default; 33 | color: #bbbbbb; 34 | font-weight: bold; 35 | } 36 | div.jqi .jqistate{ 37 | background-color: #fff; 38 | } 39 | div.jqi .jqititle{ 40 | padding: 5px 10px; 41 | font-size: 16px; 42 | line-height: 20px; 43 | border-bottom: solid 1px #eeeeee; 44 | } 45 | div.jqi .jqimessage{ 46 | padding: 10px; 47 | line-height: 20px; 48 | color: #444444; 49 | overflow: auto; 50 | } 51 | div.jqi .jqibuttonshide{ 52 | display: none; 53 | } 54 | div.jqi .jqibuttons{ 55 | text-align: right; 56 | margin: 0 -7px -7px -7px; 57 | border-top: solid 1px #e4e4e4; 58 | background-color: #f4f4f4; 59 | border-radius: 0 0 6px 6px; 60 | -moz-border-radius: 0 0 6px 6px; 61 | -webkit-border-radius: 0 0 6px 6px; 62 | } 63 | div.jqi .jqibuttons button{ 64 | margin: 0; 65 | padding: 15px 20px; 66 | background-color: transparent; 67 | font-weight: normal; 68 | border: none; 69 | border-left: solid 1px #e4e4e4; 70 | color: #777; 71 | font-weight: bold; 72 | font-size: 12px; 73 | } 74 | div.jqi .jqibuttons button.jqidefaultbutton{ 75 | color: #489afe; 76 | } 77 | div.jqi .jqibuttons button:hover, 78 | div.jqi .jqibuttons button:focus{ 79 | color: #287ade; 80 | outline: none; 81 | } 82 | div.jqi .jqibuttons button[disabled]{ 83 | color: #aaa; 84 | } 85 | .jqiwarning .jqi .jqibuttons{ 86 | background-color: #b95656; 87 | } 88 | 89 | /* sub states */ 90 | div.jqi .jqiparentstate::after{ 91 | background-color: #777; 92 | opacity: 0.6; 93 | filter: alpha(opacity=60); 94 | content: ''; 95 | position: absolute; 96 | top:0;left:0;bottom:0;right:0; 97 | border-radius: 6px; 98 | -moz-border-radius: 6px; 99 | -webkit-border-radius: 6px; 100 | } 101 | div.jqi .jqisubstate{ 102 | position: absolute; 103 | top:0; 104 | left: 20%; 105 | width: 60%; 106 | padding: 7px; 107 | border: solid 1px #eeeeee; 108 | border-top: none; 109 | border-radius: 0 0 6px 6px; 110 | -moz-border-radius: 0 0 6px 6px; 111 | -webkit-border-radius: 0 0 6px 6px; 112 | } 113 | div.jqi .jqisubstate .jqibuttons button{ 114 | padding: 10px 18px; 115 | } 116 | 117 | /* arrows for tooltips/tours */ 118 | .jqi .jqiarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent;} 119 | 120 | .jqi .jqiarrowtl{ left: 10px; top: -20px; border-bottom-color: #ffffff; } 121 | .jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -10px; } 122 | .jqi .jqiarrowtr{ right: 10px; top: -20px; border-bottom-color: #ffffff; } 123 | 124 | .jqi .jqiarrowbl{ left: 10px; bottom: -20px; border-top-color: #ffffff; } 125 | .jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -10px; } 126 | .jqi .jqiarrowbr{ right: 10px; bottom: -20px; border-top-color: #ffffff; } 127 | 128 | .jqi .jqiarrowlt{ left: -20px; top: 10px; border-right-color: #ffffff; } 129 | .jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -10px; } 130 | .jqi .jqiarrowlb{ left: -20px; bottom: 10px; border-right-color: #ffffff; } 131 | 132 | .jqi .jqiarrowrt{ right: -20px; top: 10px; border-left-color: #ffffff; } 133 | .jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -10px; } 134 | .jqi .jqiarrowrb{ right: -20px; bottom: 10px; border-left-color: #ffffff; } 135 | 136 | -------------------------------------------------------------------------------- /dist/jquery-impromptu.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery-Impromptu - v6.2.2 - 2015-11-14 2 | * http://trentrichardson.com/Impromptu 3 | * Copyright (c) 2015 Trent Richardson; Licensed MIT */.jqifade{position:absolute;background-color:#777}iframe.jqifade{display:block;z-index:-1}div.jqi{width:400px;max-width:90%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;position:absolute;background-color:#fff;font-size:11px;text-align:left;border:solid 1px #eee;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;padding:7px}div.jqi .jqicontainer{}div.jqi .jqiclose{position:absolute;top:4px;right:-2px;width:18px;cursor:default;color:#bbb;font-weight:700}div.jqi .jqistate{background-color:#fff}div.jqi .jqititle{padding:5px 10px;font-size:16px;line-height:20px;border-bottom:solid 1px #eee}div.jqi .jqimessage{padding:10px;line-height:20px;color:#444;overflow:auto}div.jqi .jqibuttonshide{display:none}div.jqi .jqibuttons{text-align:right;margin:0 -7px -7px -7px;border-top:solid 1px #e4e4e4;background-color:#f4f4f4;border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;-webkit-border-radius:0 0 6px 6px}div.jqi .jqibuttons button{margin:0;padding:15px 20px;background-color:transparent;font-weight:400;border:0;border-left:solid 1px #e4e4e4;color:#777;font-weight:700;font-size:12px}div.jqi .jqibuttons button.jqidefaultbutton{color:#489afe}div.jqi .jqibuttons button:hover,div.jqi .jqibuttons button:focus{color:#287ade;outline:0}div.jqi .jqibuttons button[disabled]{color:#aaa}.jqiwarning .jqi .jqibuttons{background-color:#b95656}div.jqi .jqiparentstate::after{background-color:#777;opacity:.6;filter:alpha(opacity=60);content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px}div.jqi .jqisubstate{position:absolute;top:0;left:20%;width:60%;padding:7px;border:solid 1px #eee;border-top:0;border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;-webkit-border-radius:0 0 6px 6px}div.jqi .jqisubstate .jqibuttons button{padding:10px 18px}.jqi .jqiarrow{position:absolute;height:0;width:0;line-height:0;font-size:0;border:solid 10px transparent}.jqi .jqiarrowtl{left:10px;top:-20px;border-bottom-color:#fff}.jqi .jqiarrowtc{left:50%;top:-20px;border-bottom-color:#fff;margin-left:-10px}.jqi .jqiarrowtr{right:10px;top:-20px;border-bottom-color:#fff}.jqi .jqiarrowbl{left:10px;bottom:-20px;border-top-color:#fff}.jqi .jqiarrowbc{left:50%;bottom:-20px;border-top-color:#fff;margin-left:-10px}.jqi .jqiarrowbr{right:10px;bottom:-20px;border-top-color:#fff}.jqi .jqiarrowlt{left:-20px;top:10px;border-right-color:#fff}.jqi .jqiarrowlm{left:-20px;top:50%;border-right-color:#fff;margin-top:-10px}.jqi .jqiarrowlb{left:-20px;bottom:10px;border-right-color:#fff}.jqi .jqiarrowrt{right:-20px;top:10px;border-left-color:#fff}.jqi .jqiarrowrm{right:-20px;top:50%;border-left-color:#fff;margin-top:-10px}.jqi .jqiarrowrb{right:-20px;bottom:10px;border-left-color:#fff} -------------------------------------------------------------------------------- /dist/jquery-impromptu.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery-Impromptu - v6.2.2 - 2015-11-14 2 | * http://trentrichardson.com/Impromptu 3 | * Copyright (c) 2015 Trent Richardson; Licensed MIT */ 4 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){"use strict";var b=function(a,c){var d=this;return d.id=b.count++,b.lifo.push(d),a&&d.open(a,c),d};b.defaults={prefix:"jqi",classes:{box:"",fade:"",prompt:"",form:"",close:"",title:"",message:"",buttons:"",button:"",defaultButton:""},title:"",closeText:"×",buttons:{Ok:!0},buttonTimeout:1e3,loaded:function(a){},submit:function(a,b,c,d){},close:function(a,b,c,d){},statechanging:function(a,b,c){},statechanged:function(a,b){},opacity:.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"fadeIn",hide:"fadeOut",focus:0,defaultButton:0,useiframe:!1,top:"15%",position:{container:null,x:null,y:null,arrow:null,width:null},persistent:!0,timeout:0,states:{},initialState:0,state:{name:null,title:"",html:"",buttons:{Ok:!0},focus:0,defaultButton:0,position:{container:null,x:null,y:null,arrow:null,width:null},submit:function(a,b,c,d){return!0}}},b.setDefaults=function(c){b.defaults=a.extend({},b.defaults,c)},b.setStateDefaults=function(c){b.defaults.state=a.extend({},b.defaults.state,c)},b.count=0,b.lifo=[],b.getLast=function(){var a=b.lifo.length;return a>0?b.lifo[a-1]:!1},b.removeFromStack=function(a){for(var c=b.lifo.length-1;c>=0;c--)if(b.lifo[c].id===a)return b.lifo.splice(c,1)[0]},b.prototype={id:null,open:function(c,d){var e=this;e.options=a.extend({},b.defaults,d),e.timeout&&clearTimeout(e.timeout),e.timeout=!1;var f=e.options,g=a(document.body),h=a(window),i='
';i+=f.useiframe&&a("object, applet").length>0?'':'
',i+='
'+f.closeText+'
',e.jqib=a(i).appendTo(g),e.jqi=e.jqib.children("."+f.prefix),e.jqif=e.jqib.children("."+f.prefix+"fade"),c.constructor===String&&(c={state0:{title:f.title,html:c,buttons:f.buttons,position:f.position,focus:f.focus,defaultButton:f.defaultButton,submit:f.submit}}),e.options.states={};var j,k;for(j in c)k=a.extend({},b.defaults.state,{name:j},c[j]),e.addState(k.name,k),""===e.currentStateName&&(e.currentStateName=k.name);e.jqi.on("click","."+f.prefix+"buttons button",function(b){var c=a(this),d=c.parents("."+f.prefix+"state"),g=d.data("jqi-name"),h=e.options.states[g],i=d.children("."+f.prefix+"message"),j=h.buttons[c.text()]||h.buttons[c.html()],k={};if(e.options.buttonTimeout>0&&(e.disableStateButtons(g),setTimeout(function(){e.enableStateButtons(g)},e.options.buttonTimeout)),void 0===j)for(var l in h.buttons)(h.buttons[l].title===c.text()||h.buttons[l].title===c.html())&&(j=h.buttons[l].value);a.each(e.jqi.children("form").serializeArray(),function(a,b){void 0===k[b.name]?k[b.name]=b.value:typeof k[b.name]===Array||"object"==typeof k[b.name]?k[b.name].push(b.value):k[b.name]=[k[b.name],b.value]});var m=new a.Event("impromptu:submit");m.stateName=h.name,m.state=d,d.trigger(m,[j,i,k]),m.isDefaultPrevented()||e.close(!0,j,i,k)});var l=function(){if(f.persistent){var b=f.top.toString().indexOf("%")>=0?h.height()*(parseInt(f.top,10)/100):parseInt(f.top,10),c=parseInt(e.jqi.css("top").replace("px",""),10)-b;a("html,body").animate({scrollTop:c},"fast",function(){var a=0;e.jqib.addClass(f.prefix+"warning");var b=setInterval(function(){e.jqib.toggleClass(f.prefix+"warning"),a++>1&&(clearInterval(b),e.jqib.removeClass(f.prefix+"warning"))},100)})}else e.close(!0)},m=function(b){var c=window.event?event.keyCode:b.keyCode;if(27===c&&l(),13===c){var d=e.getCurrentState().find("."+f.prefix+"defaultbutton"),g=a(b.target);g.is("textarea,."+f.prefix+"button")===!1&&d.length>0&&(b.preventDefault(),d.click())}if(9===c){var h=a("input,select,textarea,button",e.getCurrentState()),i=!b.shiftKey&&b.target===h[h.length-1],j=b.shiftKey&&b.target===h[0];if(i||j)return setTimeout(function(){if(h){var a=h[j===!0?h.length-1:0];a&&a.focus()}},10),!1}};return e.position(),e.style(),e._windowResize=function(a){e.position(a)},h.resize({animate:!1},e._windowResize),e.jqif.click(l),e.jqi.find("."+f.prefix+"close").click(function(){e.close()}),e.jqi.find("."+f.prefix+"form").submit(function(){return!1}),e.jqib.on("keydown",m).on("impromptu:loaded",f.loaded).on("impromptu:close",f.close).on("impromptu:statechanging",f.statechanging).on("impromptu:statechanged",f.statechanged),e.jqif[f.show](f.overlayspeed),e.jqi[f.show](f.promptspeed,function(){e.goToState(isNaN(f.initialState)?f.initialState:e.jqi.find("."+f.prefix+"states ."+f.prefix+"state").eq(f.initialState).data("jqi-name")),e.jqib.trigger("impromptu:loaded")}),f.timeout>0&&(e.timeout=setTimeout(function(){e.close(!0)},f.timeout)),e},close:function(c,d,e,f){var g=this;return b.removeFromStack(g.id),g.timeout&&(clearTimeout(g.timeout),g.timeout=!1),g.jqib&&g.jqib[g.options.hide]("fast",function(){g.jqib.trigger("impromptu:close",[d,e,f]),g.jqib.remove(),a(window).off("resize",g._windowResize),"function"==typeof c&&c()}),g.currentStateName="",g},addState:function(c,d,e){var f,g,h,i,j,k=this,l="",m=null,n="",o="",p=k.options,q=a.isFunction(d.position)?d.position():d.position,r=k.jqi.find("."+p.prefix+"states"),s=[],t=0;if(d=a.extend({},b.defaults.state,{name:c},d),a.isPlainObject(q)&&null!==q.arrow&&(n='
'),d.title&&""!==d.title&&(o='
'+d.title+"
"),f=d.html,"function"==typeof d.html&&(f="Error: html function must return text"),l+='
'+n+o+'
'+f+'
',a.isArray(d.buttons))s=d.buttons;else if(a.isPlainObject(d.buttons))for(h in d.buttons)d.buttons.hasOwnProperty(h)&&s.push({title:h,value:d.buttons[h]});for(t=0,j=s.length;j>t;t++)i=s[t],g=d.focus===t||isNaN(d.focus)&&d.defaultButton===t?p.prefix+"defaultbutton "+p.classes.defaultButton:"",l+='";return l+="
",m=a(l).css({display:"none"}),m.on("impromptu:submit",d.submit),void 0!==e?k.getState(e).after(m):r.append(m),k.options.states[c]=d,m},removeState:function(a,b){var c=this,d=c.getState(a),e=function(){d.remove()};return 0===d.length?!1:("none"!==d.css("display")?void 0!==b&&c.getState(b).length>0?c.goToState(b,!1,e):d.next().length>0?c.nextState(e):d.prev().length>0?c.prevState(e):c.close():d.slideUp("slow",e),!0)},getApi:function(){return this},getBox:function(){return this.jqib},getPrompt:function(){return this.jqi},getState:function(a){return this.jqi.find('[data-jqi-name="'+a+'"]')},getCurrentState:function(){return this.getState(this.getCurrentStateName())},getCurrentStateName:function(){return this.currentStateName},disableStateButtons:function(b,c,d){var e=this;a.isArray(b)&&(c=b,b=null),e.getState(b||e.getCurrentStateName()).find("."+e.options.prefix+"button").each(function(b,e){(void 0===c||-1!==a.inArray(e.value,c))&&(e.disabled=!d)})},enableStateButtons:function(a,b){this.disableStateButtons(a,b,!0)},position:function(b){var c=this,d=a.fx.off,e=c.getCurrentState(),f=c.options.states[e.data("jqi-name")],g=f?a.isFunction(f.position)?f.position():f.position:void 0,h=a(window),i=document.body.scrollHeight,j=a(window).height(),k=(a(document).height(),i>j?i:j),l=parseInt(h.scrollTop(),10),m=l+(c.options.top.toString().indexOf("%")>=0?j*(parseInt(c.options.top,10)/100):parseInt(c.options.top,10));if(void 0!==b&&b.data.animate===!1&&(a.fx.off=!0),c.jqib.css({position:"absolute",height:k,width:"100%",top:0,left:0,right:0,bottom:0}),c.jqif.css({position:"fixed",height:k,width:"100%",top:0,left:0,right:0,bottom:0}),g&&g.container){var n=a(g.container).offset(),o=!1;a.isPlainObject(n)&&void 0!==n.top&&(m=n.top+g.y-(c.options.top.toString().indexOf("%")>=0?j*(parseInt(c.options.top,10)/100):parseInt(c.options.top,10)),c.jqi.css({position:"absolute"}),c.jqi.animate({top:n.top+g.y,left:n.left+g.x,marginLeft:0,width:void 0!==g.width?g.width:null},function(){!o&&n.top+g.y+c.jqi.outerHeight(!0)>l+j&&(a("html,body").animate({scrollTop:m},"slow","swing",function(){}),o=!0)}),(l>m||m>l+j)&&(a("html,body").animate({scrollTop:m},"slow","swing",function(){}),o=!0))}else g&&g.width?(c.jqi.css({position:"absolute",left:"50%"}),c.jqi.animate({top:g.y||m,left:g.x||"50%",marginLeft:g.width/2*-1,width:g.width})):c.jqi.css({position:"absolute",top:m,left:"50%",marginLeft:c.jqi.outerWidth(!1)/2*-1});void 0!==b&&b.data.animate===!1&&(a.fx.off=d)},style:function(){var a=this;a.jqif.css({zIndex:a.options.zIndex,display:"none",opacity:a.options.opacity}),a.jqi.css({zIndex:a.options.zIndex+1,display:"none"}),a.jqib.css({zIndex:a.options.zIndex})},goToState:function(b,c,d){var e=this,f=(e.jqi,e.options),g=e.getState(b),h=f.states[g.data("jqi-name")],i=new a.Event("impromptu:statechanging"),j=e.options;if(void 0!==h){if("function"==typeof h.html){var k=h.html;g.find("."+j.prefix+"message ").html(k())}"function"==typeof c&&(d=c,c=!1),e.jqib.trigger(i,[e.getCurrentStateName(),b]),!i.isDefaultPrevented()&&g.length>0&&(e.jqi.find("."+j.prefix+"parentstate").removeClass(j.prefix+"parentstate"),c?(e.jqi.find("."+j.prefix+"substate").not(g).slideUp(f.promptspeed).removeClass("."+j.prefix+"substate").find("."+j.prefix+"arrow").hide(),e.jqi.find("."+j.prefix+"state:visible").addClass(j.prefix+"parentstate"),g.addClass(j.prefix+"substate")):e.jqi.find("."+j.prefix+"state").not(g).slideUp(f.promptspeed).find("."+j.prefix+"arrow").hide(),e.currentStateName=h.name,g.slideDown(f.promptspeed,function(){var c=a(this);e.enableStateButtons(),"string"==typeof h.focus?c.find(h.focus).eq(0).focus():c.find("."+j.prefix+"defaultbutton").focus(),c.find("."+j.prefix+"arrow").show(f.promptspeed),"function"==typeof d&&e.jqib.on("impromptu:statechanged",d),e.jqib.trigger("impromptu:statechanged",[b]),"function"==typeof d&&e.jqib.off("impromptu:statechanged",d)}),c||e.position())}return g},nextState:function(a){var b=this,c=b.getCurrentState().next();return c.length>0&&b.goToState(c.data("jqi-name"),a),c},prevState:function(a){var b=this,c=b.getCurrentState().prev();return c.length>0&&b.goToState(c.data("jqi-name"),a),c}},a.prompt=function(a,c){var d=new b(a,c);return d.jqi},a.each(b,function(b,c){a.prompt[b]=c}),a.each(b.prototype,function(c,d){a.prompt[c]=function(){var a=b.getLast();return a&&"function"==typeof a[c]?a[c].apply(a,arguments):void 0}}),a.fn.prompt=function(b){void 0===b&&(b={}),void 0===b.withDataAndEvents&&(b.withDataAndEvents=!1),a.prompt(a(this).clone(b.withDataAndEvents).html(),b)},window.Impromptu=b}); -------------------------------------------------------------------------------- /dist/themes/base.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Impromptu Base Styles 4 | ------------------------------ 5 | */ 6 | .jqifade{ 7 | position: absolute; 8 | background-color: #777777; 9 | } 10 | div.jqi{ 11 | width: 400px; 12 | position: absolute; 13 | background-color: #ffffff; 14 | text-align: left; 15 | border: solid 1px #eeeeee; 16 | border-radius: 6px; 17 | -moz-border-radius: 6px; 18 | -webkit-border-radius: 6px; 19 | padding: 7px; 20 | } 21 | div.jqi .jqicontainer{ 22 | } 23 | div.jqi .jqiclose{ 24 | position: absolute; 25 | top: 4px; right: -2px; 26 | width: 18px; 27 | cursor: default; 28 | color: #bbbbbb; 29 | font-weight: bold; 30 | } 31 | div.jqi .jqistate{ 32 | background-color: #fff; 33 | } 34 | div.jqi .jqiparentstate::after{ 35 | background-color: #eee; 36 | opacity: 0.7; 37 | filter: alpha(opacity=70); 38 | content: ''; 39 | position: absolute; 40 | top:0;left:0;bottom:0;right:0; 41 | border-radius: 6px; 42 | -moz-border-radius: 6px; 43 | -webkit-border-radius: 6px; 44 | } 45 | div.jqi .jqisubstate{ 46 | 47 | position: absolute; 48 | top:0; 49 | left: 20%; 50 | width: 60%; 51 | padding: 7px; 52 | border: solid 1px #eeeeee; 53 | border-top: none; 54 | border-radius: 0 0 6px 6px; 55 | -moz-border-radius: 0 0 6px 6px; 56 | -webkit-border-radius: 0 0 6px 6px; 57 | } 58 | div.jqi .jqititle{ 59 | padding: 5px 10px; 60 | border-bottom: solid 1px #eeeeee; 61 | } 62 | div.jqi .jqimessage{ 63 | padding: 10px; 64 | color: #444444; 65 | } 66 | div.jqi .jqibuttons{ 67 | padding: 5px; 68 | text-align: right; 69 | } 70 | div.jqi button{ 71 | margin: 0 0 0 10px; 72 | } 73 | 74 | .jqi .jqiarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent;} 75 | 76 | .jqi .jqiarrowtl{ left: 10px; top: -20px; border-bottom-color: #ffffff; } 77 | .jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -10px; } 78 | .jqi .jqiarrowtr{ right: 10px; top: -20px; border-bottom-color: #ffffff; } 79 | 80 | .jqi .jqiarrowbl{ left: 10px; bottom: -20px; border-top-color: #ffffff; } 81 | .jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -10px; } 82 | .jqi .jqiarrowbr{ right: 10px; bottom: -20px; border-top-color: #ffffff; } 83 | 84 | .jqi .jqiarrowlt{ left: -20px; top: 10px; border-right-color: #ffffff; } 85 | .jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -10px; } 86 | .jqi .jqiarrowlb{ left: -20px; bottom: 10px; border-right-color: #ffffff; } 87 | 88 | .jqi .jqiarrowrt{ right: -20px; top: 10px; border-left-color: #ffffff; } 89 | .jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -10px; } 90 | .jqi .jqiarrowrb{ right: -20px; bottom: 10px; border-left-color: #ffffff; } 91 | 92 | -------------------------------------------------------------------------------- /dist/themes/classic-impromptu.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | classic impromptu 4 | ------------------------------ 5 | */ 6 | .impromptuwarning .impromptu{ background-color: #aaaaaa; } 7 | .impromptufade{ 8 | position: absolute; 9 | background-color: #ffffff; 10 | } 11 | div.impromptu{ 12 | position: absolute; 13 | background-color: #cccccc; 14 | padding: 10px; 15 | width: 300px; 16 | text-align: left; 17 | } 18 | div.impromptu .impromptuclose{ 19 | float: right; 20 | margin: -35px -10px 0 0; 21 | cursor: pointer; 22 | color: #213e80; 23 | } 24 | div.impromptu .impromptucontainer{ 25 | background-color: #213e80; 26 | padding: 5px; 27 | color: #ffffff; 28 | font-weight: bold; 29 | } 30 | div.impromptu .impromptumessage{ 31 | background-color: #415ea0; 32 | padding: 10px; 33 | } 34 | div.impromptu .impromptubuttons{ 35 | text-align: center; 36 | padding: 5px 0 0 0; 37 | } 38 | div.impromptu button{ 39 | padding: 3px 10px 3px 10px; 40 | margin: 0 10px; 41 | } 42 | -------------------------------------------------------------------------------- /dist/themes/clean-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | clean blue 4 | ------------------------------ 5 | */ 6 | .cleanbluewarning .cleanblue{ 7 | background-color: #acb4c4; 8 | } 9 | .cleanbluefade{ 10 | position: absolute; 11 | background-color: #aaaaaa; 12 | } 13 | div.cleanblue{ 14 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 15 | position: absolute; 16 | background-color: #ffffff; 17 | width: 300px; 18 | font-size: 11px; 19 | text-align: left; 20 | border: solid 1px #213e80; 21 | } 22 | div.cleanblue .cleanbluecontainer{ 23 | background-color: #ffffff; 24 | border-top: solid 14px #213e80; 25 | padding: 5px; 26 | font-weight: bold; 27 | } 28 | div.cleanblue .cleanblueclose{ 29 | float: right; 30 | width: 18px; 31 | cursor: default; 32 | margin: -19px -12px 0 0; 33 | color: #ffffff; 34 | font-weight: bold; 35 | } 36 | div.cleanblue .cleanbluemessage{ 37 | padding: 10px; 38 | line-height: 20px; 39 | font-size: 11px; 40 | color: #333333; 41 | } 42 | div.cleanblue .cleanbluebuttons{ 43 | text-align: right; 44 | padding: 5px 0 5px 0; 45 | border: solid 1px #eeeeee; 46 | background-color: #f4f4f4; 47 | } 48 | div.cleanblue button{ 49 | padding: 3px 10px; 50 | margin: 0 10px; 51 | background-color: #314e90; 52 | border: solid 1px #f4f4f4; 53 | color: #ffffff; 54 | font-weight: bold; 55 | font-size: 12px; 56 | } 57 | div.cleanblue button:hover{ 58 | border: solid 1px #d4d4d4; 59 | } 60 | -------------------------------------------------------------------------------- /dist/themes/ext-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Ext Blue 4 | ------------------------------ 5 | */ 6 | .extbluewarning .extblue{ 7 | border:1px red solid; 8 | } 9 | .extbluefade{ 10 | position: absolute; 11 | background-color: #ffffff; 12 | } 13 | div.extblue{ 14 | border:1px #6289B6 solid; 15 | position: absolute; 16 | background-color: #CAD8EA; 17 | padding: 0; 18 | width: 300px; 19 | text-align: left; 20 | } 21 | div.extblue .extblueclose{ 22 | background-color: #CAD8EA; 23 | margin:2px -2px 0 0; 24 | cursor: pointer; 25 | color: red; 26 | text-align: right; 27 | } 28 | div.extblue .extbluecontainer{ 29 | background-color: #CAD8EA; 30 | padding: 0 5px 5px 5px; 31 | color: #000000; 32 | font:normal 11px Verdana; 33 | } 34 | div.extblue .extbluemessage{ 35 | background-color: #CAD8EA; 36 | padding: 0; 37 | margin:0 15px 15px 15px; 38 | } 39 | div.extblue .extbluebuttons{ 40 | text-align: center; 41 | padding: 0px 0 0 0; 42 | } 43 | div.extblue button{ 44 | padding: 1px 4px; 45 | margin: 0 10px; 46 | background-color:#cccccc; 47 | font-weight:normal; 48 | font-family:Verdana; 49 | font-size:10px; 50 | } 51 | -------------------------------------------------------------------------------- /dist/themes/smooth.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Smooth 4 | ------------------------------ 5 | */ 6 | .jqismoothfade{ 7 | position: absolute; 8 | background-color: #333333; 9 | } 10 | div.jqismooth{ 11 | width: 350px; 12 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | position: absolute; 14 | background-color: #ffffff; 15 | font-size: 11px; 16 | text-align: left; 17 | border: solid 3px #e2e8e6; 18 | -moz-border-radius: 10px; 19 | -webkit-border-radius: 10px; 20 | padding: 7px; 21 | } 22 | div.jqismooth .jqismoothcontainer{ 23 | font-weight: bold; 24 | } 25 | div.jqismooth .jqismoothclose{ 26 | position: absolute; 27 | top: 0; 28 | right: 0; 29 | width: 18px; 30 | cursor: default; 31 | text-align: center; 32 | padding: 2px 0 4px 0; 33 | color: #727876; 34 | font-weight: bold; 35 | background-color: #e2e8e6; 36 | -moz-border-radius-bottomLeft: 5px; 37 | -webkit-border-bottom-left-radius: 5px; 38 | border-left: solid 1px #e2e8e6; 39 | border-bottom: solid 1px #e2e8e6; 40 | } 41 | div.jqismooth .jqismoothmessage{ 42 | padding: 10px; 43 | line-height: 20px; 44 | color: #444444; 45 | } 46 | div.jqismooth .jqismoothbuttons{ 47 | text-align: right; 48 | padding: 5px 0 5px 0; 49 | border: solid 1px #e2e8e6; 50 | background-color: #f2f8f6; 51 | } 52 | div.jqismooth button{ 53 | padding: 3px 10px; 54 | margin: 0 10px; 55 | background-color: #2F6073; 56 | border: solid 1px #f4f4f4; 57 | color: #ffffff; 58 | font-weight: bold; 59 | font-size: 12px; 60 | } 61 | div.jqismooth button:hover{ 62 | background-color: #728A8C; 63 | } 64 | div.jqismooth button.jqismoothdefaultbutton{ 65 | background-color: #BF5E26; 66 | } 67 | .jqismoothwarning .jqismooth .jqismoothbuttons{ 68 | background-color: #BF5E26; 69 | } 70 | -------------------------------------------------------------------------------- /dist/themes/zoo.css: -------------------------------------------------------------------------------- 1 | /* The Impromptzoo theme by Trent Richardson, based on http://stammtec.de/work/upload-dialog/ */ 2 | 3 | /* layout */ 4 | .jqizoofade{ position: absolute; background-color: #000; } 5 | div.jqizoo{ width: 400px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; position: absolute; background-color: #ffffff; font-size: 11px; text-align: left; 6 | border: solid 2px #333; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } 7 | 8 | /* container */ 9 | div.jqizoo .jqizoocontainer{ background-color: #5b6776; } 10 | div.jqizoo .jqizooclose{ position: absolute; top: 0; right: 8px; width: 20px; padding: 2px 0 2px 0; text-align: center; cursor: default; color: #fff; font-weight: bold; text-shadow: 1px 1px 1px #333; 11 | background-color: #d4797b; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d4797b), to(#b34b4d)); background-image: -webkit-linear-gradient(top, #d4797b, #b34b4d); background-image: -moz-linear-gradient(top, #d4797b, #b34b4d); background-image: -ms-linear-gradient(top, #d4797b, #b34b4d); background-image: -o-linear-gradient(top, #d4797b, #b34b4d); 12 | border: solid 1px #555; border-top: none; border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px;} 13 | div.jqizoo .jqizootitle{ padding: 10px 10px; font-size: 14px; color: #333; line-height: 20px; text-align: center; text-shadow: 1px 1px 1px #999; letter-spacing: 1px; 14 | background-color: #f0f0f0; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f0f0f0), to(#dbdbdb)); background-image: -webkit-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -moz-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -ms-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -o-linear-gradient(top, #f0f0f0, #dbdbdb); 15 | border-bottom: solid 1px #949494; border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; -webkit-border-radius: 5px 5px 0 0; } 16 | div.jqizoo .jqizoomessage{ padding: 10px; line-height: 20px; color: #444444; background-color: #fff; 17 | border-bottom: solid 1px #333; border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } 18 | 19 | /* buttons */ 20 | div.jqizoo .jqizoobuttons{ text-align: right; padding: 6px 0 6px 0; 21 | background-color: #5b6776; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#5b6776), to(#303940)); background-image: -webkit-linear-gradient(top, #5b6776, #303940); background-image: -moz-linear-gradient(top, #5b6776, #303940); background-image: -ms-linear-gradient(top, #5b6776, #303940); background-image: -o-linear-gradient(top, #5b6776, #303940); 22 | border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } 23 | div.jqizoo button{ padding: 3px 10px; margin: 0 10px; background-color: #2F6073; color: #ffffff; font-weight: bold; font-size: 12px; text-shadow: 1px 1px 1px #333; 24 | background-color: #78a0ce; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#78a0ce), to(#516cb6)); background-image: -webkit-linear-gradient(top, #78a0ce, #516cb6); background-image: -moz-linear-gradient(top, #78a0ce, #516cb6); background-image: -ms-linear-gradient(top, #78a0ce, #516cb6); background-image: -o-linear-gradient(top, #78a0ce, #516cb6); 25 | /* yellow background-color: #dab150; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dab150), to(#c49629)); background-image: -webkit-linear-gradient(top, #dab150, #c49629); background-image: -moz-linear-gradient(top, #dab150, #c49629); background-image: -ms-linear-gradient(top, #dab150, #c49629); background-image: -o-linear-gradient(top, #dab150, #c49629); */ 26 | border: solid 1px #192432; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } 27 | div.jqizoo button:hover{ color: #eee; } 28 | div.jqizoo button.jqizoodefaultbutton{ background-color: #d4797b; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d4797b), to(#b34b4d)); background-image: -webkit-linear-gradient(top, #d4797b, #b34b4d); background-image: -moz-linear-gradient(top, #d4797b, #b34b4d); background-image: -ms-linear-gradient(top, #d4797b, #b34b4d); background-image: -o-linear-gradient(top, #d4797b, #b34b4d); } 29 | .jqizoowarning .jqizoo .jqizoobuttons button{ border-color: #dab150; } 30 | 31 | /* arrows */ 32 | .jqizoo .jqizooarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent; } 33 | .jqizoo .jqizooarrowtl{ left: 10px; top: -20px; border-bottom-color: #333; } 34 | .jqizoo .jqizooarrowtc{ left: 50%; top: -20px; border-bottom-color: #333; margin-left: -10px; } 35 | .jqizoo .jqizooarrowtr{ right: 10px; top: -20px; border-bottom-color: #333; } 36 | .jqizoo .jqizooarrowbl{ left: 10px; bottom: -20px; border-top-color: #333; } 37 | .jqizoo .jqizooarrowbc{ left: 50%; bottom: -20px; border-top-color: #333; margin-left: -10px; } 38 | .jqizoo .jqizooarrowbr{ right: 10px; bottom: -20px; border-top-color: #333; } 39 | .jqizoo .jqizooarrowlt{ left: -20px; top: 10px; border-right-color: #333; } 40 | .jqizoo .jqizooarrowlm{ left: -20px; top: 50%; border-right-color: #333; margin-top: -10px; } 41 | .jqizoo .jqizooarrowlb{ left: -20px; bottom: 10px; border-right-color: #333; } 42 | .jqizoo .jqizooarrowrt{ right: -20px; top: 10px; border-left-color: #333; } 43 | .jqizoo .jqizooarrowrm{ right: -20px; top: 50%; border-left-color: #333; margin-top: -10px; } 44 | .jqizoo .jqizooarrowrb{ right: -20px; bottom: 10px; border-left-color: #333; } -------------------------------------------------------------------------------- /jquery-impromptu.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-impromptu", 3 | "title": "jQuery-Impromptu", 4 | "description": "An extension to help provide a more pleasant way to spontaneously prompt a user for input.", 5 | "version": "6.2.2", 6 | "modified": "2015-11-14", 7 | "homepage": "http://trentrichardson.com/Impromptu", 8 | "author": { 9 | "name": "Trent Richardson", 10 | "email": "trentdrichardson@gmail.com", 11 | "url": "http://trentrichardson.com" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/trentrichardson/jQuery-Impromptu.git" 16 | }, 17 | "bugs": "https://github.com/trentrichardson/jQuery-Impromptu/issues", 18 | "licenses": [ 19 | { 20 | "type": "MIT", 21 | "url": "http://trentrichardson.com/examples/jQuery-Impromptu/blob/master/MIT-LICENSE.txt" 22 | } 23 | ], 24 | "dependencies": { 25 | "jquery": "*" 26 | }, 27 | "keywords": [] 28 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jQuery-Impromptu", 3 | "version": "0.0.0-ignored", 4 | "engines": { 5 | "node": ">= 0.8.0" 6 | }, 7 | "devDependencies": { 8 | "grunt-contrib-concat": "~0.1.2", 9 | "grunt-contrib-jshint": "~0.1.1", 10 | "grunt-contrib-jasmine": "~0.8.0", 11 | "grunt-contrib-uglify": "~0.9.1", 12 | "grunt-contrib-watch": "~0.2.0", 13 | "grunt-contrib-clean": "~0.4.0", 14 | "grunt-contrib-copy": "~0.4.0", 15 | "grunt-contrib-cssmin": "~0.6.0", 16 | "grunt-replace": "~0.4.4", 17 | "grunt": "~0.4.1" 18 | } 19 | } -------------------------------------------------------------------------------- /src/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": false, 11 | "loopfunc": true, 12 | "boss": true, 13 | "eqnull": true, 14 | "browser": true, 15 | "predef": ["jQuery","define","Event"] 16 | } 17 | -------------------------------------------------------------------------------- /src/demos/loan_calculator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu States Example - Loan Calculator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 99 | 100 | 101 | 102 | Test Impromptu Loan Calculator 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/demos/purecss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu with PureCSS 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 115 | 116 | 117 | 118 | Test Impromptu States Survey 119 |
120 | 121 | -------------------------------------------------------------------------------- /src/demos/select_filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu States Example - Select Dropdown Option Search 7 | 8 | 9 | 10 | 11 | 12 | 13 | 38 | 39 | 118 | 119 | 120 | 121 |

Right click or ctrl click on the select for it to bring up a search for its options:

122 | 123 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /src/demos/survey.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu States Survey Example 6 | 7 | 8 | 9 | 15 | 16 | 17 | 18 | 19 | 20 | 94 | 95 | 96 | 97 | Test Impromptu States Survey 98 |
99 | 100 | 101 | -------------------------------------------------------------------------------- /src/demos/twitter_bootstrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Impromptu with Twitter Bootstrap 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 115 | 116 | 117 | 118 | Test Impromptu States Survey 119 |
120 | 121 | -------------------------------------------------------------------------------- /src/demos/user_manager.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Impromptu - Demo 2 6 | 7 | 8 | 9 | 24 | 25 | 26 | 27 | 28 | 29 | 118 | 119 | 120 | 121 |
122 |
123 |
124 | 125 | Edit | 126 | Delete 127 | 128 | John 129 | Doe 130 |
131 | 132 |
133 | 134 | Edit | 135 | Delete 136 | 137 | Jane 138 | Doe 139 |
140 | 141 |
142 | 143 | Edit | 144 | Delete 145 | 146 | Bill 147 | Smith 148 |
149 | 150 |
151 | 152 | Edit | 153 | Delete 154 | 155 | Steve 156 | Jones 157 |
158 | 159 |
160 | 161 | Edit | 162 | Delete 163 | 164 | Will 165 | Johnson 166 |
167 | 168 |
169 | 170 | Edit | 171 | Delete 172 | 173 | Harold 174 | Anderson 175 |
176 | 177 |
178 |
179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /src/jquery-impromptu.css: -------------------------------------------------------------------------------- 1 | .jqifade{ 2 | position: absolute; 3 | background-color: #777777; 4 | } 5 | iframe.jqifade{ 6 | display:block; 7 | z-index:-1; 8 | } 9 | div.jqi{ 10 | width: 400px; 11 | max-width:90%; 12 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | position: absolute; 14 | background-color: #ffffff; 15 | font-size: 11px; 16 | text-align: left; 17 | border: solid 1px #eeeeee; 18 | border-radius: 6px; 19 | -moz-border-radius: 6px; 20 | -webkit-border-radius: 6px; 21 | padding: 7px; 22 | } 23 | div.jqi .jqicontainer{ 24 | } 25 | div.jqi .jqiclose{ 26 | position: absolute; 27 | top: 4px; right: -2px; 28 | width: 18px; 29 | cursor: default; 30 | color: #bbbbbb; 31 | font-weight: bold; 32 | } 33 | div.jqi .jqistate{ 34 | background-color: #fff; 35 | } 36 | div.jqi .jqititle{ 37 | padding: 5px 10px; 38 | font-size: 16px; 39 | line-height: 20px; 40 | border-bottom: solid 1px #eeeeee; 41 | } 42 | div.jqi .jqimessage{ 43 | padding: 10px; 44 | line-height: 20px; 45 | color: #444444; 46 | overflow: auto; 47 | } 48 | div.jqi .jqibuttonshide{ 49 | display: none; 50 | } 51 | div.jqi .jqibuttons{ 52 | text-align: right; 53 | margin: 0 -7px -7px -7px; 54 | border-top: solid 1px #e4e4e4; 55 | background-color: #f4f4f4; 56 | border-radius: 0 0 6px 6px; 57 | -moz-border-radius: 0 0 6px 6px; 58 | -webkit-border-radius: 0 0 6px 6px; 59 | } 60 | div.jqi .jqibuttons button{ 61 | margin: 0; 62 | padding: 15px 20px; 63 | background-color: transparent; 64 | font-weight: normal; 65 | border: none; 66 | border-left: solid 1px #e4e4e4; 67 | color: #777; 68 | font-weight: bold; 69 | font-size: 12px; 70 | } 71 | div.jqi .jqibuttons button.jqidefaultbutton{ 72 | color: #489afe; 73 | } 74 | div.jqi .jqibuttons button:hover, 75 | div.jqi .jqibuttons button:focus{ 76 | color: #287ade; 77 | outline: none; 78 | } 79 | div.jqi .jqibuttons button[disabled]{ 80 | color: #aaa; 81 | } 82 | .jqiwarning .jqi .jqibuttons{ 83 | background-color: #b95656; 84 | } 85 | 86 | /* sub states */ 87 | div.jqi .jqiparentstate::after{ 88 | background-color: #777; 89 | opacity: 0.6; 90 | filter: alpha(opacity=60); 91 | content: ''; 92 | position: absolute; 93 | top:0;left:0;bottom:0;right:0; 94 | border-radius: 6px; 95 | -moz-border-radius: 6px; 96 | -webkit-border-radius: 6px; 97 | } 98 | div.jqi .jqisubstate{ 99 | position: absolute; 100 | top:0; 101 | left: 20%; 102 | width: 60%; 103 | padding: 7px; 104 | border: solid 1px #eeeeee; 105 | border-top: none; 106 | border-radius: 0 0 6px 6px; 107 | -moz-border-radius: 0 0 6px 6px; 108 | -webkit-border-radius: 0 0 6px 6px; 109 | } 110 | div.jqi .jqisubstate .jqibuttons button{ 111 | padding: 10px 18px; 112 | } 113 | 114 | /* arrows for tooltips/tours */ 115 | .jqi .jqiarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent;} 116 | 117 | .jqi .jqiarrowtl{ left: 10px; top: -20px; border-bottom-color: #ffffff; } 118 | .jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -10px; } 119 | .jqi .jqiarrowtr{ right: 10px; top: -20px; border-bottom-color: #ffffff; } 120 | 121 | .jqi .jqiarrowbl{ left: 10px; bottom: -20px; border-top-color: #ffffff; } 122 | .jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -10px; } 123 | .jqi .jqiarrowbr{ right: 10px; bottom: -20px; border-top-color: #ffffff; } 124 | 125 | .jqi .jqiarrowlt{ left: -20px; top: 10px; border-right-color: #ffffff; } 126 | .jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -10px; } 127 | .jqi .jqiarrowlb{ left: -20px; bottom: 10px; border-right-color: #ffffff; } 128 | 129 | .jqi .jqiarrowrt{ right: -20px; top: 10px; border-left-color: #ffffff; } 130 | .jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -10px; } 131 | .jqi .jqiarrowrb{ right: -20px; bottom: 10px; border-left-color: #ffffff; } 132 | 133 | -------------------------------------------------------------------------------- /src/themes/base.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Impromptu Base Styles 4 | ------------------------------ 5 | */ 6 | .jqifade{ 7 | position: absolute; 8 | background-color: #777777; 9 | } 10 | div.jqi{ 11 | width: 400px; 12 | position: absolute; 13 | background-color: #ffffff; 14 | text-align: left; 15 | border: solid 1px #eeeeee; 16 | border-radius: 6px; 17 | -moz-border-radius: 6px; 18 | -webkit-border-radius: 6px; 19 | padding: 7px; 20 | } 21 | div.jqi .jqicontainer{ 22 | } 23 | div.jqi .jqiclose{ 24 | position: absolute; 25 | top: 4px; right: -2px; 26 | width: 18px; 27 | cursor: default; 28 | color: #bbbbbb; 29 | font-weight: bold; 30 | } 31 | div.jqi .jqistate{ 32 | background-color: #fff; 33 | } 34 | div.jqi .jqiparentstate::after{ 35 | background-color: #eee; 36 | opacity: 0.7; 37 | filter: alpha(opacity=70); 38 | content: ''; 39 | position: absolute; 40 | top:0;left:0;bottom:0;right:0; 41 | border-radius: 6px; 42 | -moz-border-radius: 6px; 43 | -webkit-border-radius: 6px; 44 | } 45 | div.jqi .jqisubstate{ 46 | 47 | position: absolute; 48 | top:0; 49 | left: 20%; 50 | width: 60%; 51 | padding: 7px; 52 | border: solid 1px #eeeeee; 53 | border-top: none; 54 | border-radius: 0 0 6px 6px; 55 | -moz-border-radius: 0 0 6px 6px; 56 | -webkit-border-radius: 0 0 6px 6px; 57 | } 58 | div.jqi .jqititle{ 59 | padding: 5px 10px; 60 | border-bottom: solid 1px #eeeeee; 61 | } 62 | div.jqi .jqimessage{ 63 | padding: 10px; 64 | color: #444444; 65 | } 66 | div.jqi .jqibuttons{ 67 | padding: 5px; 68 | text-align: right; 69 | } 70 | div.jqi button{ 71 | margin: 0 0 0 10px; 72 | } 73 | 74 | .jqi .jqiarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent;} 75 | 76 | .jqi .jqiarrowtl{ left: 10px; top: -20px; border-bottom-color: #ffffff; } 77 | .jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -10px; } 78 | .jqi .jqiarrowtr{ right: 10px; top: -20px; border-bottom-color: #ffffff; } 79 | 80 | .jqi .jqiarrowbl{ left: 10px; bottom: -20px; border-top-color: #ffffff; } 81 | .jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -10px; } 82 | .jqi .jqiarrowbr{ right: 10px; bottom: -20px; border-top-color: #ffffff; } 83 | 84 | .jqi .jqiarrowlt{ left: -20px; top: 10px; border-right-color: #ffffff; } 85 | .jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -10px; } 86 | .jqi .jqiarrowlb{ left: -20px; bottom: 10px; border-right-color: #ffffff; } 87 | 88 | .jqi .jqiarrowrt{ right: -20px; top: 10px; border-left-color: #ffffff; } 89 | .jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -10px; } 90 | .jqi .jqiarrowrb{ right: -20px; bottom: 10px; border-left-color: #ffffff; } 91 | 92 | -------------------------------------------------------------------------------- /src/themes/classic-impromptu.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | classic impromptu 4 | ------------------------------ 5 | */ 6 | .impromptuwarning .impromptu{ background-color: #aaaaaa; } 7 | .impromptufade{ 8 | position: absolute; 9 | background-color: #ffffff; 10 | } 11 | div.impromptu{ 12 | position: absolute; 13 | background-color: #cccccc; 14 | padding: 10px; 15 | width: 300px; 16 | text-align: left; 17 | } 18 | div.impromptu .impromptuclose{ 19 | float: right; 20 | margin: -35px -10px 0 0; 21 | cursor: pointer; 22 | color: #213e80; 23 | } 24 | div.impromptu .impromptucontainer{ 25 | background-color: #213e80; 26 | padding: 5px; 27 | color: #ffffff; 28 | font-weight: bold; 29 | } 30 | div.impromptu .impromptumessage{ 31 | background-color: #415ea0; 32 | padding: 10px; 33 | } 34 | div.impromptu .impromptubuttons{ 35 | text-align: center; 36 | padding: 5px 0 0 0; 37 | } 38 | div.impromptu button{ 39 | padding: 3px 10px 3px 10px; 40 | margin: 0 10px; 41 | } 42 | -------------------------------------------------------------------------------- /src/themes/clean-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | clean blue 4 | ------------------------------ 5 | */ 6 | .cleanbluewarning .cleanblue{ 7 | background-color: #acb4c4; 8 | } 9 | .cleanbluefade{ 10 | position: absolute; 11 | background-color: #aaaaaa; 12 | } 13 | div.cleanblue{ 14 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 15 | position: absolute; 16 | background-color: #ffffff; 17 | width: 300px; 18 | font-size: 11px; 19 | text-align: left; 20 | border: solid 1px #213e80; 21 | } 22 | div.cleanblue .cleanbluecontainer{ 23 | background-color: #ffffff; 24 | border-top: solid 14px #213e80; 25 | padding: 5px; 26 | font-weight: bold; 27 | } 28 | div.cleanblue .cleanblueclose{ 29 | float: right; 30 | width: 18px; 31 | cursor: default; 32 | margin: -19px -12px 0 0; 33 | color: #ffffff; 34 | font-weight: bold; 35 | } 36 | div.cleanblue .cleanbluemessage{ 37 | padding: 10px; 38 | line-height: 20px; 39 | font-size: 11px; 40 | color: #333333; 41 | } 42 | div.cleanblue .cleanbluebuttons{ 43 | text-align: right; 44 | padding: 5px 0 5px 0; 45 | border: solid 1px #eeeeee; 46 | background-color: #f4f4f4; 47 | } 48 | div.cleanblue button{ 49 | padding: 3px 10px; 50 | margin: 0 10px; 51 | background-color: #314e90; 52 | border: solid 1px #f4f4f4; 53 | color: #ffffff; 54 | font-weight: bold; 55 | font-size: 12px; 56 | } 57 | div.cleanblue button:hover{ 58 | border: solid 1px #d4d4d4; 59 | } 60 | -------------------------------------------------------------------------------- /src/themes/ext-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Ext Blue 4 | ------------------------------ 5 | */ 6 | .extbluewarning .extblue{ 7 | border:1px red solid; 8 | } 9 | .extbluefade{ 10 | position: absolute; 11 | background-color: #ffffff; 12 | } 13 | div.extblue{ 14 | border:1px #6289B6 solid; 15 | position: absolute; 16 | background-color: #CAD8EA; 17 | padding: 0; 18 | width: 300px; 19 | text-align: left; 20 | } 21 | div.extblue .extblueclose{ 22 | background-color: #CAD8EA; 23 | margin:2px -2px 0 0; 24 | cursor: pointer; 25 | color: red; 26 | text-align: right; 27 | } 28 | div.extblue .extbluecontainer{ 29 | background-color: #CAD8EA; 30 | padding: 0 5px 5px 5px; 31 | color: #000000; 32 | font:normal 11px Verdana; 33 | } 34 | div.extblue .extbluemessage{ 35 | background-color: #CAD8EA; 36 | padding: 0; 37 | margin:0 15px 15px 15px; 38 | } 39 | div.extblue .extbluebuttons{ 40 | text-align: center; 41 | padding: 0px 0 0 0; 42 | } 43 | div.extblue button{ 44 | padding: 1px 4px; 45 | margin: 0 10px; 46 | background-color:#cccccc; 47 | font-weight:normal; 48 | font-family:Verdana; 49 | font-size:10px; 50 | } 51 | -------------------------------------------------------------------------------- /src/themes/smooth.css: -------------------------------------------------------------------------------- 1 | /* 2 | ------------------------------ 3 | Smooth 4 | ------------------------------ 5 | */ 6 | .jqismoothfade{ 7 | position: absolute; 8 | background-color: #333333; 9 | } 10 | div.jqismooth{ 11 | width: 350px; 12 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | position: absolute; 14 | background-color: #ffffff; 15 | font-size: 11px; 16 | text-align: left; 17 | border: solid 3px #e2e8e6; 18 | -moz-border-radius: 10px; 19 | -webkit-border-radius: 10px; 20 | padding: 7px; 21 | } 22 | div.jqismooth .jqismoothcontainer{ 23 | font-weight: bold; 24 | } 25 | div.jqismooth .jqismoothclose{ 26 | position: absolute; 27 | top: 0; 28 | right: 0; 29 | width: 18px; 30 | cursor: default; 31 | text-align: center; 32 | padding: 2px 0 4px 0; 33 | color: #727876; 34 | font-weight: bold; 35 | background-color: #e2e8e6; 36 | -moz-border-radius-bottomLeft: 5px; 37 | -webkit-border-bottom-left-radius: 5px; 38 | border-left: solid 1px #e2e8e6; 39 | border-bottom: solid 1px #e2e8e6; 40 | } 41 | div.jqismooth .jqismoothmessage{ 42 | padding: 10px; 43 | line-height: 20px; 44 | color: #444444; 45 | } 46 | div.jqismooth .jqismoothbuttons{ 47 | text-align: right; 48 | padding: 5px 0 5px 0; 49 | border: solid 1px #e2e8e6; 50 | background-color: #f2f8f6; 51 | } 52 | div.jqismooth button{ 53 | padding: 3px 10px; 54 | margin: 0 10px; 55 | background-color: #2F6073; 56 | border: solid 1px #f4f4f4; 57 | color: #ffffff; 58 | font-weight: bold; 59 | font-size: 12px; 60 | } 61 | div.jqismooth button:hover{ 62 | background-color: #728A8C; 63 | } 64 | div.jqismooth button.jqismoothdefaultbutton{ 65 | background-color: #BF5E26; 66 | } 67 | .jqismoothwarning .jqismooth .jqismoothbuttons{ 68 | background-color: #BF5E26; 69 | } 70 | -------------------------------------------------------------------------------- /src/themes/zoo.css: -------------------------------------------------------------------------------- 1 | /* The Impromptzoo theme by Trent Richardson, based on http://stammtec.de/work/upload-dialog/ */ 2 | 3 | /* layout */ 4 | .jqizoofade{ position: absolute; background-color: #000; } 5 | div.jqizoo{ width: 400px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; position: absolute; background-color: #ffffff; font-size: 11px; text-align: left; 6 | border: solid 2px #333; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } 7 | 8 | /* container */ 9 | div.jqizoo .jqizoocontainer{ background-color: #5b6776; } 10 | div.jqizoo .jqizooclose{ position: absolute; top: 0; right: 8px; width: 20px; padding: 2px 0 2px 0; text-align: center; cursor: default; color: #fff; font-weight: bold; text-shadow: 1px 1px 1px #333; 11 | background-color: #d4797b; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d4797b), to(#b34b4d)); background-image: -webkit-linear-gradient(top, #d4797b, #b34b4d); background-image: -moz-linear-gradient(top, #d4797b, #b34b4d); background-image: -ms-linear-gradient(top, #d4797b, #b34b4d); background-image: -o-linear-gradient(top, #d4797b, #b34b4d); 12 | border: solid 1px #555; border-top: none; border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px;} 13 | div.jqizoo .jqizootitle{ padding: 10px 10px; font-size: 14px; color: #333; line-height: 20px; text-align: center; text-shadow: 1px 1px 1px #999; letter-spacing: 1px; 14 | background-color: #f0f0f0; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f0f0f0), to(#dbdbdb)); background-image: -webkit-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -moz-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -ms-linear-gradient(top, #f0f0f0, #dbdbdb); background-image: -o-linear-gradient(top, #f0f0f0, #dbdbdb); 15 | border-bottom: solid 1px #949494; border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; -webkit-border-radius: 5px 5px 0 0; } 16 | div.jqizoo .jqizoomessage{ padding: 10px; line-height: 20px; color: #444444; background-color: #fff; 17 | border-bottom: solid 1px #333; border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } 18 | 19 | /* buttons */ 20 | div.jqizoo .jqizoobuttons{ text-align: right; padding: 6px 0 6px 0; 21 | background-color: #5b6776; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#5b6776), to(#303940)); background-image: -webkit-linear-gradient(top, #5b6776, #303940); background-image: -moz-linear-gradient(top, #5b6776, #303940); background-image: -ms-linear-gradient(top, #5b6776, #303940); background-image: -o-linear-gradient(top, #5b6776, #303940); 22 | border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } 23 | div.jqizoo button{ padding: 3px 10px; margin: 0 10px; background-color: #2F6073; color: #ffffff; font-weight: bold; font-size: 12px; text-shadow: 1px 1px 1px #333; 24 | background-color: #78a0ce; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#78a0ce), to(#516cb6)); background-image: -webkit-linear-gradient(top, #78a0ce, #516cb6); background-image: -moz-linear-gradient(top, #78a0ce, #516cb6); background-image: -ms-linear-gradient(top, #78a0ce, #516cb6); background-image: -o-linear-gradient(top, #78a0ce, #516cb6); 25 | /* yellow background-color: #dab150; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#dab150), to(#c49629)); background-image: -webkit-linear-gradient(top, #dab150, #c49629); background-image: -moz-linear-gradient(top, #dab150, #c49629); background-image: -ms-linear-gradient(top, #dab150, #c49629); background-image: -o-linear-gradient(top, #dab150, #c49629); */ 26 | border: solid 1px #192432; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } 27 | div.jqizoo button:hover{ color: #eee; } 28 | div.jqizoo button.jqizoodefaultbutton{ background-color: #d4797b; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d4797b), to(#b34b4d)); background-image: -webkit-linear-gradient(top, #d4797b, #b34b4d); background-image: -moz-linear-gradient(top, #d4797b, #b34b4d); background-image: -ms-linear-gradient(top, #d4797b, #b34b4d); background-image: -o-linear-gradient(top, #d4797b, #b34b4d); } 29 | .jqizoowarning .jqizoo .jqizoobuttons button{ border-color: #dab150; } 30 | 31 | /* arrows */ 32 | .jqizoo .jqizooarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent; } 33 | .jqizoo .jqizooarrowtl{ left: 10px; top: -20px; border-bottom-color: #333; } 34 | .jqizoo .jqizooarrowtc{ left: 50%; top: -20px; border-bottom-color: #333; margin-left: -10px; } 35 | .jqizoo .jqizooarrowtr{ right: 10px; top: -20px; border-bottom-color: #333; } 36 | .jqizoo .jqizooarrowbl{ left: 10px; bottom: -20px; border-top-color: #333; } 37 | .jqizoo .jqizooarrowbc{ left: 50%; bottom: -20px; border-top-color: #333; margin-left: -10px; } 38 | .jqizoo .jqizooarrowbr{ right: 10px; bottom: -20px; border-top-color: #333; } 39 | .jqizoo .jqizooarrowlt{ left: -20px; top: 10px; border-right-color: #333; } 40 | .jqizoo .jqizooarrowlm{ left: -20px; top: 50%; border-right-color: #333; margin-top: -10px; } 41 | .jqizoo .jqizooarrowlb{ left: -20px; bottom: 10px; border-right-color: #333; } 42 | .jqizoo .jqizooarrowrt{ right: -20px; top: 10px; border-left-color: #333; } 43 | .jqizoo .jqizooarrowrm{ right: -20px; top: 50%; border-left-color: #333; margin-top: -10px; } 44 | .jqizoo .jqizooarrowrb{ right: -20px; bottom: 10px; border-left-color: #333; } -------------------------------------------------------------------------------- /test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "browser": true, 14 | "predef": [ 15 | "jQuery", 16 | "$", 17 | "QUnit", 18 | "module", 19 | "test", 20 | "asyncTest", 21 | "expect", 22 | "start", 23 | "stop", 24 | "ok", 25 | "equal", 26 | "notEqual", 27 | "deepEqual", 28 | "notDeepEqual", 29 | "strictEqual", 30 | "notStrictEqual", 31 | "throws", 32 | "describe", 33 | "it", 34 | "beforeEach", 35 | "afterEach", 36 | "spyOn", 37 | "spyOnEvent", 38 | "runs", 39 | "waitsFor", 40 | "affix", 41 | "xdescribe", 42 | "xit", 43 | "Impromptu", 44 | "Event" 45 | ] 46 | } -------------------------------------------------------------------------------- /test/SpecRunner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jquery-impromptu Jasmine Spec Runner v2.0.3 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.0.3/boot.js: -------------------------------------------------------------------------------- 1 | /** 2 | Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project. 3 | 4 | If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms. 5 | 6 | The location of `boot.js` can be specified and/or overridden in `jasmine.yml`. 7 | 8 | [jasmine-gem]: http://github.com/pivotal/jasmine-gem 9 | */ 10 | 11 | (function() { 12 | 13 | /** 14 | * ## Require & Instantiate 15 | * 16 | * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference. 17 | */ 18 | window.jasmine = jasmineRequire.core(jasmineRequire); 19 | 20 | /** 21 | * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference. 22 | */ 23 | jasmineRequire.html(jasmine); 24 | 25 | /** 26 | * Create the Jasmine environment. This is used to run all specs in a project. 27 | */ 28 | var env = jasmine.getEnv(); 29 | 30 | /** 31 | * ## The Global Interface 32 | * 33 | * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged. 34 | */ 35 | var jasmineInterface = jasmineRequire.interface(jasmine, env); 36 | 37 | /** 38 | * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`. 39 | */ 40 | if (typeof window == "undefined" && typeof exports == "object") { 41 | extend(exports, jasmineInterface); 42 | } else { 43 | extend(window, jasmineInterface); 44 | } 45 | 46 | /** 47 | * ## Runner Parameters 48 | * 49 | * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface. 50 | */ 51 | 52 | var queryString = new jasmine.QueryString({ 53 | getWindowLocation: function() { return window.location; } 54 | }); 55 | 56 | var catchingExceptions = queryString.getParam("catch"); 57 | env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions); 58 | 59 | /** 60 | * ## Reporters 61 | * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any). 62 | */ 63 | var htmlReporter = new jasmine.HtmlReporter({ 64 | env: env, 65 | onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); }, 66 | getContainer: function() { return document.body; }, 67 | createElement: function() { return document.createElement.apply(document, arguments); }, 68 | createTextNode: function() { return document.createTextNode.apply(document, arguments); }, 69 | timer: new jasmine.Timer() 70 | }); 71 | 72 | /** 73 | * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript. 74 | */ 75 | env.addReporter(jasmineInterface.jsApiReporter); 76 | env.addReporter(htmlReporter); 77 | 78 | /** 79 | * Filter which specs will be run by matching the start of the full name against the `spec` query param. 80 | */ 81 | var specFilter = new jasmine.HtmlSpecFilter({ 82 | filterString: function() { return queryString.getParam("spec"); } 83 | }); 84 | 85 | env.specFilter = function(spec) { 86 | return specFilter.matches(spec.getFullName()); 87 | }; 88 | 89 | /** 90 | * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack. 91 | */ 92 | window.setTimeout = window.setTimeout; 93 | window.setInterval = window.setInterval; 94 | window.clearTimeout = window.clearTimeout; 95 | window.clearInterval = window.clearInterval; 96 | 97 | /** 98 | * ## Execution 99 | * 100 | * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded. 101 | */ 102 | var currentWindowOnload = window.onload; 103 | 104 | window.onload = function() { 105 | if (currentWindowOnload) { 106 | currentWindowOnload(); 107 | } 108 | htmlReporter.initialize(); 109 | env.execute(); 110 | }; 111 | 112 | /** 113 | * Helper function for readability above. 114 | */ 115 | function extend(destination, source) { 116 | for (var property in source) destination[property] = source[property]; 117 | return destination; 118 | } 119 | 120 | }()); 121 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.0.3/console.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2014 Pivotal Labs 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | function getJasmineRequireObj() { 24 | if (typeof module !== 'undefined' && module.exports) { 25 | return exports; 26 | } else { 27 | window.jasmineRequire = window.jasmineRequire || {}; 28 | return window.jasmineRequire; 29 | } 30 | } 31 | 32 | getJasmineRequireObj().console = function(jRequire, j$) { 33 | j$.ConsoleReporter = jRequire.ConsoleReporter(); 34 | }; 35 | 36 | getJasmineRequireObj().ConsoleReporter = function() { 37 | 38 | var noopTimer = { 39 | start: function(){}, 40 | elapsed: function(){ return 0; } 41 | }; 42 | 43 | function ConsoleReporter(options) { 44 | var print = options.print, 45 | showColors = options.showColors || false, 46 | onComplete = options.onComplete || function() {}, 47 | timer = options.timer || noopTimer, 48 | specCount, 49 | failureCount, 50 | failedSpecs = [], 51 | pendingCount, 52 | ansi = { 53 | green: '\x1B[32m', 54 | red: '\x1B[31m', 55 | yellow: '\x1B[33m', 56 | none: '\x1B[0m' 57 | }; 58 | 59 | this.jasmineStarted = function() { 60 | specCount = 0; 61 | failureCount = 0; 62 | pendingCount = 0; 63 | print('Started'); 64 | printNewline(); 65 | timer.start(); 66 | }; 67 | 68 | this.jasmineDone = function() { 69 | printNewline(); 70 | for (var i = 0; i < failedSpecs.length; i++) { 71 | specFailureDetails(failedSpecs[i]); 72 | } 73 | 74 | if(specCount > 0) { 75 | printNewline(); 76 | 77 | var specCounts = specCount + ' ' + plural('spec', specCount) + ', ' + 78 | failureCount + ' ' + plural('failure', failureCount); 79 | 80 | if (pendingCount) { 81 | specCounts += ', ' + pendingCount + ' pending ' + plural('spec', pendingCount); 82 | } 83 | 84 | print(specCounts); 85 | } else { 86 | print('No specs found'); 87 | } 88 | 89 | printNewline(); 90 | var seconds = timer.elapsed() / 1000; 91 | print('Finished in ' + seconds + ' ' + plural('second', seconds)); 92 | 93 | printNewline(); 94 | 95 | onComplete(failureCount === 0); 96 | }; 97 | 98 | this.specDone = function(result) { 99 | specCount++; 100 | 101 | if (result.status == 'pending') { 102 | pendingCount++; 103 | print(colored('yellow', '*')); 104 | return; 105 | } 106 | 107 | if (result.status == 'passed') { 108 | print(colored('green', '.')); 109 | return; 110 | } 111 | 112 | if (result.status == 'failed') { 113 | failureCount++; 114 | failedSpecs.push(result); 115 | print(colored('red', 'F')); 116 | } 117 | }; 118 | 119 | return this; 120 | 121 | function printNewline() { 122 | print('\n'); 123 | } 124 | 125 | function colored(color, str) { 126 | return showColors ? (ansi[color] + str + ansi.none) : str; 127 | } 128 | 129 | function plural(str, count) { 130 | return count == 1 ? str : str + 's'; 131 | } 132 | 133 | function repeat(thing, times) { 134 | var arr = []; 135 | for (var i = 0; i < times; i++) { 136 | arr.push(thing); 137 | } 138 | return arr; 139 | } 140 | 141 | function indent(str, spaces) { 142 | var lines = (str || '').split('\n'); 143 | var newArr = []; 144 | for (var i = 0; i < lines.length; i++) { 145 | newArr.push(repeat(' ', spaces).join('') + lines[i]); 146 | } 147 | return newArr.join('\n'); 148 | } 149 | 150 | function specFailureDetails(result) { 151 | printNewline(); 152 | print(result.fullName); 153 | 154 | for (var i = 0; i < result.failedExpectations.length; i++) { 155 | var failedExpectation = result.failedExpectations[i]; 156 | printNewline(); 157 | print(indent(failedExpectation.message, 2)); 158 | print(indent(failedExpectation.stack, 2)); 159 | } 160 | 161 | printNewline(); 162 | } 163 | } 164 | 165 | return ConsoleReporter; 166 | }; 167 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.0.3/jasmine-html.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2014 Pivotal Labs 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | jasmineRequire.html = function(j$) { 24 | j$.ResultsNode = jasmineRequire.ResultsNode(); 25 | j$.HtmlReporter = jasmineRequire.HtmlReporter(j$); 26 | j$.QueryString = jasmineRequire.QueryString(); 27 | j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter(); 28 | }; 29 | 30 | jasmineRequire.HtmlReporter = function(j$) { 31 | 32 | var noopTimer = { 33 | start: function() {}, 34 | elapsed: function() { return 0; } 35 | }; 36 | 37 | function HtmlReporter(options) { 38 | var env = options.env || {}, 39 | getContainer = options.getContainer, 40 | createElement = options.createElement, 41 | createTextNode = options.createTextNode, 42 | onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {}, 43 | timer = options.timer || noopTimer, 44 | results = [], 45 | specsExecuted = 0, 46 | failureCount = 0, 47 | pendingSpecCount = 0, 48 | htmlReporterMain, 49 | symbols; 50 | 51 | this.initialize = function() { 52 | clearPrior(); 53 | htmlReporterMain = createDom('div', {className: 'jasmine_html-reporter'}, 54 | createDom('div', {className: 'banner'}, 55 | createDom('a', {className: 'title', href: 'http://jasmine.github.io/', target: '_blank'}), 56 | createDom('span', {className: 'version'}, j$.version) 57 | ), 58 | createDom('ul', {className: 'symbol-summary'}), 59 | createDom('div', {className: 'alert'}), 60 | createDom('div', {className: 'results'}, 61 | createDom('div', {className: 'failures'}) 62 | ) 63 | ); 64 | getContainer().appendChild(htmlReporterMain); 65 | 66 | symbols = find('.symbol-summary'); 67 | }; 68 | 69 | var totalSpecsDefined; 70 | this.jasmineStarted = function(options) { 71 | totalSpecsDefined = options.totalSpecsDefined || 0; 72 | timer.start(); 73 | }; 74 | 75 | var summary = createDom('div', {className: 'summary'}); 76 | 77 | var topResults = new j$.ResultsNode({}, '', null), 78 | currentParent = topResults; 79 | 80 | this.suiteStarted = function(result) { 81 | currentParent.addChild(result, 'suite'); 82 | currentParent = currentParent.last(); 83 | }; 84 | 85 | this.suiteDone = function(result) { 86 | if (currentParent == topResults) { 87 | return; 88 | } 89 | 90 | currentParent = currentParent.parent; 91 | }; 92 | 93 | this.specStarted = function(result) { 94 | currentParent.addChild(result, 'spec'); 95 | }; 96 | 97 | var failures = []; 98 | this.specDone = function(result) { 99 | if(noExpectations(result) && console && console.error) { 100 | console.error('Spec \'' + result.fullName + '\' has no expectations.'); 101 | } 102 | 103 | if (result.status != 'disabled') { 104 | specsExecuted++; 105 | } 106 | 107 | symbols.appendChild(createDom('li', { 108 | className: noExpectations(result) ? 'empty' : result.status, 109 | id: 'spec_' + result.id, 110 | title: result.fullName 111 | } 112 | )); 113 | 114 | if (result.status == 'failed') { 115 | failureCount++; 116 | 117 | var failure = 118 | createDom('div', {className: 'spec-detail failed'}, 119 | createDom('div', {className: 'description'}, 120 | createDom('a', {title: result.fullName, href: specHref(result)}, result.fullName) 121 | ), 122 | createDom('div', {className: 'messages'}) 123 | ); 124 | var messages = failure.childNodes[1]; 125 | 126 | for (var i = 0; i < result.failedExpectations.length; i++) { 127 | var expectation = result.failedExpectations[i]; 128 | messages.appendChild(createDom('div', {className: 'result-message'}, expectation.message)); 129 | messages.appendChild(createDom('div', {className: 'stack-trace'}, expectation.stack)); 130 | } 131 | 132 | failures.push(failure); 133 | } 134 | 135 | if (result.status == 'pending') { 136 | pendingSpecCount++; 137 | } 138 | }; 139 | 140 | this.jasmineDone = function() { 141 | var banner = find('.banner'); 142 | banner.appendChild(createDom('span', {className: 'duration'}, 'finished in ' + timer.elapsed() / 1000 + 's')); 143 | 144 | var alert = find('.alert'); 145 | 146 | alert.appendChild(createDom('span', { className: 'exceptions' }, 147 | createDom('label', { className: 'label', 'for': 'raise-exceptions' }, 'raise exceptions'), 148 | createDom('input', { 149 | className: 'raise', 150 | id: 'raise-exceptions', 151 | type: 'checkbox' 152 | }) 153 | )); 154 | var checkbox = find('#raise-exceptions'); 155 | 156 | checkbox.checked = !env.catchingExceptions(); 157 | checkbox.onclick = onRaiseExceptionsClick; 158 | 159 | if (specsExecuted < totalSpecsDefined) { 160 | var skippedMessage = 'Ran ' + specsExecuted + ' of ' + totalSpecsDefined + ' specs - run all'; 161 | alert.appendChild( 162 | createDom('span', {className: 'bar skipped'}, 163 | createDom('a', {href: '?', title: 'Run all specs'}, skippedMessage) 164 | ) 165 | ); 166 | } 167 | var statusBarMessage = ''; 168 | var statusBarClassName = 'bar '; 169 | 170 | if (totalSpecsDefined > 0) { 171 | statusBarMessage += pluralize('spec', specsExecuted) + ', ' + pluralize('failure', failureCount); 172 | if (pendingSpecCount) { statusBarMessage += ', ' + pluralize('pending spec', pendingSpecCount); } 173 | statusBarClassName += (failureCount > 0) ? 'failed' : 'passed'; 174 | } else { 175 | statusBarClassName += 'skipped'; 176 | statusBarMessage += 'No specs found'; 177 | } 178 | 179 | alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage)); 180 | 181 | var results = find('.results'); 182 | results.appendChild(summary); 183 | 184 | summaryList(topResults, summary); 185 | 186 | function summaryList(resultsTree, domParent) { 187 | var specListNode; 188 | for (var i = 0; i < resultsTree.children.length; i++) { 189 | var resultNode = resultsTree.children[i]; 190 | if (resultNode.type == 'suite') { 191 | var suiteListNode = createDom('ul', {className: 'suite', id: 'suite-' + resultNode.result.id}, 192 | createDom('li', {className: 'suite-detail'}, 193 | createDom('a', {href: specHref(resultNode.result)}, resultNode.result.description) 194 | ) 195 | ); 196 | 197 | summaryList(resultNode, suiteListNode); 198 | domParent.appendChild(suiteListNode); 199 | } 200 | if (resultNode.type == 'spec') { 201 | if (domParent.getAttribute('class') != 'specs') { 202 | specListNode = createDom('ul', {className: 'specs'}); 203 | domParent.appendChild(specListNode); 204 | } 205 | var specDescription = resultNode.result.description; 206 | if(noExpectations(resultNode.result)) { 207 | specDescription = 'SPEC HAS NO EXPECTATIONS ' + specDescription; 208 | } 209 | specListNode.appendChild( 210 | createDom('li', { 211 | className: resultNode.result.status, 212 | id: 'spec-' + resultNode.result.id 213 | }, 214 | createDom('a', {href: specHref(resultNode.result)}, specDescription) 215 | ) 216 | ); 217 | } 218 | } 219 | } 220 | 221 | if (failures.length) { 222 | alert.appendChild( 223 | createDom('span', {className: 'menu bar spec-list'}, 224 | createDom('span', {}, 'Spec List | '), 225 | createDom('a', {className: 'failures-menu', href: '#'}, 'Failures'))); 226 | alert.appendChild( 227 | createDom('span', {className: 'menu bar failure-list'}, 228 | createDom('a', {className: 'spec-list-menu', href: '#'}, 'Spec List'), 229 | createDom('span', {}, ' | Failures '))); 230 | 231 | find('.failures-menu').onclick = function() { 232 | setMenuModeTo('failure-list'); 233 | }; 234 | find('.spec-list-menu').onclick = function() { 235 | setMenuModeTo('spec-list'); 236 | }; 237 | 238 | setMenuModeTo('failure-list'); 239 | 240 | var failureNode = find('.failures'); 241 | for (var i = 0; i < failures.length; i++) { 242 | failureNode.appendChild(failures[i]); 243 | } 244 | } 245 | }; 246 | 247 | return this; 248 | 249 | function find(selector) { 250 | return getContainer().querySelector('.jasmine_html-reporter ' + selector); 251 | } 252 | 253 | function clearPrior() { 254 | // return the reporter 255 | var oldReporter = find(''); 256 | 257 | if(oldReporter) { 258 | getContainer().removeChild(oldReporter); 259 | } 260 | } 261 | 262 | function createDom(type, attrs, childrenVarArgs) { 263 | var el = createElement(type); 264 | 265 | for (var i = 2; i < arguments.length; i++) { 266 | var child = arguments[i]; 267 | 268 | if (typeof child === 'string') { 269 | el.appendChild(createTextNode(child)); 270 | } else { 271 | if (child) { 272 | el.appendChild(child); 273 | } 274 | } 275 | } 276 | 277 | for (var attr in attrs) { 278 | if (attr == 'className') { 279 | el[attr] = attrs[attr]; 280 | } else { 281 | el.setAttribute(attr, attrs[attr]); 282 | } 283 | } 284 | 285 | return el; 286 | } 287 | 288 | function pluralize(singular, count) { 289 | var word = (count == 1 ? singular : singular + 's'); 290 | 291 | return '' + count + ' ' + word; 292 | } 293 | 294 | function specHref(result) { 295 | return '?spec=' + encodeURIComponent(result.fullName); 296 | } 297 | 298 | function setMenuModeTo(mode) { 299 | htmlReporterMain.setAttribute('class', 'jasmine_html-reporter ' + mode); 300 | } 301 | 302 | function noExpectations(result) { 303 | return (result.failedExpectations.length + result.passedExpectations.length) === 0 && 304 | result.status === 'passed'; 305 | } 306 | } 307 | 308 | return HtmlReporter; 309 | }; 310 | 311 | jasmineRequire.HtmlSpecFilter = function() { 312 | function HtmlSpecFilter(options) { 313 | var filterString = options && options.filterString() && options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); 314 | var filterPattern = new RegExp(filterString); 315 | 316 | this.matches = function(specName) { 317 | return filterPattern.test(specName); 318 | }; 319 | } 320 | 321 | return HtmlSpecFilter; 322 | }; 323 | 324 | jasmineRequire.ResultsNode = function() { 325 | function ResultsNode(result, type, parent) { 326 | this.result = result; 327 | this.type = type; 328 | this.parent = parent; 329 | 330 | this.children = []; 331 | 332 | this.addChild = function(result, type) { 333 | this.children.push(new ResultsNode(result, type, this)); 334 | }; 335 | 336 | this.last = function() { 337 | return this.children[this.children.length - 1]; 338 | }; 339 | } 340 | 341 | return ResultsNode; 342 | }; 343 | 344 | jasmineRequire.QueryString = function() { 345 | function QueryString(options) { 346 | 347 | this.setParam = function(key, value) { 348 | var paramMap = queryStringToParamMap(); 349 | paramMap[key] = value; 350 | options.getWindowLocation().search = toQueryString(paramMap); 351 | }; 352 | 353 | this.getParam = function(key) { 354 | return queryStringToParamMap()[key]; 355 | }; 356 | 357 | return this; 358 | 359 | function toQueryString(paramMap) { 360 | var qStrPairs = []; 361 | for (var prop in paramMap) { 362 | qStrPairs.push(encodeURIComponent(prop) + '=' + encodeURIComponent(paramMap[prop])); 363 | } 364 | return '?' + qStrPairs.join('&'); 365 | } 366 | 367 | function queryStringToParamMap() { 368 | var paramStr = options.getWindowLocation().search.substring(1), 369 | params = [], 370 | paramMap = {}; 371 | 372 | if (paramStr.length > 0) { 373 | params = paramStr.split('&'); 374 | for (var i = 0; i < params.length; i++) { 375 | var p = params[i].split('='); 376 | var value = decodeURIComponent(p[1]); 377 | if (value === 'true' || value === 'false') { 378 | value = JSON.parse(value); 379 | } 380 | paramMap[decodeURIComponent(p[0])] = value; 381 | } 382 | } 383 | 384 | return paramMap; 385 | } 386 | 387 | } 388 | 389 | return QueryString; 390 | }; 391 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.0.3/jasmine.css: -------------------------------------------------------------------------------- 1 | body { overflow-y: scroll; } 2 | 3 | .jasmine_html-reporter { background-color: #eeeeee; padding: 5px; margin: -8px; font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; } 4 | .jasmine_html-reporter a { text-decoration: none; } 5 | .jasmine_html-reporter a:hover { text-decoration: underline; } 6 | .jasmine_html-reporter p, .jasmine_html-reporter h1, .jasmine_html-reporter h2, .jasmine_html-reporter h3, .jasmine_html-reporter h4, .jasmine_html-reporter h5, .jasmine_html-reporter h6 { margin: 0; line-height: 14px; } 7 | .jasmine_html-reporter .banner, .jasmine_html-reporter .symbol-summary, .jasmine_html-reporter .summary, .jasmine_html-reporter .result-message, .jasmine_html-reporter .spec .description, .jasmine_html-reporter .spec-detail .description, .jasmine_html-reporter .alert .bar, .jasmine_html-reporter .stack-trace { padding-left: 9px; padding-right: 9px; } 8 | .jasmine_html-reporter .banner { position: relative; } 9 | .jasmine_html-reporter .banner .title { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAZCAMAAACGusnyAAACdlBMVEX/////AP+AgICqVaqAQICZM5mAVYCSSZKAQICOOY6ATYCLRouAQICJO4mSSYCIRIiPQICHPIeOR4CGQ4aMQICGPYaLRoCFQ4WKQICPPYWJRYCOQoSJQICNPoSIRICMQoSHQICHRICKQoOHQICKPoOJO4OJQYOMQICMQ4CIQYKLQICIPoKLQ4CKQICNPoKJQISMQ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3LjkzLDkyNS41NjYgNjA3LjQ2NSw5MDMuNDQ1IgogICAgICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgICAgIGlkPSJwYXRoNTIiCiAgICAgICAgICAgICBzdHlsZT0iZmlsbDojOGE0MTgyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiAvPjxwYXRoCiAgICAgICAgICAgICBkPSJtIDM4MC42ODgsNjIyLjEyOSAtMTEuNjI2LDM1LjgwMSAxNzUuNzU4LDU3LjA5IDExLjYyMSwtMzUuODAxIC0xNzUuNzUzLC01Ny4wOSIKICAgICAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgICAgICBpZD0icGF0aDU0IgogICAgICAgICAgICAgc3R5bGU9ImZpbGw6IzhhNDE4MjtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6bm9uemVybztzdHJva2U6bm9uZSIgLz48cGF0aAogICAgICAgICAgICAgZD0ibSA3MTYuMjg5LDM3Ni41OSAzNy42NDA2LDAgMCwxODQuODE2IC0zNy42NDA2LDAgMCwtMTg0LjgxNiB6IgogICAgICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgICAgIGlkPSJwYXRoNTYiCiAgICAgICAgICAgICBzdHlsZT0iZmlsbDojOGE0MTgyO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTpub25lIiAvPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=') no-repeat, none; -webkit-background-size: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; display: block; float: left; width: 90px; height: 25px; } 10 | .jasmine_html-reporter .banner .version { margin-left: 14px; position: relative; top: 6px; } 11 | .jasmine_html-reporter .banner .duration { position: absolute; right: 14px; top: 6px; } 12 | .jasmine_html-reporter #jasmine_content { position: fixed; right: 100%; } 13 | .jasmine_html-reporter .version { color: #aaaaaa; } 14 | .jasmine_html-reporter .banner { margin-top: 14px; } 15 | .jasmine_html-reporter .duration { color: #aaaaaa; float: right; } 16 | .jasmine_html-reporter .symbol-summary { overflow: hidden; *zoom: 1; margin: 14px 0; } 17 | .jasmine_html-reporter .symbol-summary li { display: inline-block; height: 8px; width: 14px; font-size: 16px; } 18 | .jasmine_html-reporter .symbol-summary li.passed { font-size: 14px; } 19 | .jasmine_html-reporter .symbol-summary li.passed:before { color: #007069; content: "\02022"; } 20 | .jasmine_html-reporter .symbol-summary li.failed { line-height: 9px; } 21 | .jasmine_html-reporter .symbol-summary li.failed:before { color: #ca3a11; content: "\d7"; font-weight: bold; margin-left: -1px; } 22 | .jasmine_html-reporter .symbol-summary li.disabled { font-size: 14px; } 23 | .jasmine_html-reporter .symbol-summary li.disabled:before { color: #bababa; content: "\02022"; } 24 | .jasmine_html-reporter .symbol-summary li.pending { line-height: 17px; } 25 | .jasmine_html-reporter .symbol-summary li.pending:before { color: #ba9d37; content: "*"; } 26 | .jasmine_html-reporter .symbol-summary li.empty { font-size: 14px; } 27 | .jasmine_html-reporter .symbol-summary li.empty:before { color: #ba9d37; content: "\02022"; } 28 | .jasmine_html-reporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; } 29 | .jasmine_html-reporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } 30 | .jasmine_html-reporter .bar.failed { background-color: #ca3a11; } 31 | .jasmine_html-reporter .bar.passed { background-color: #007069; } 32 | .jasmine_html-reporter .bar.skipped { background-color: #bababa; } 33 | .jasmine_html-reporter .bar.menu { background-color: #fff; color: #aaaaaa; } 34 | .jasmine_html-reporter .bar.menu a { color: #333333; } 35 | .jasmine_html-reporter .bar a { color: white; } 36 | .jasmine_html-reporter.spec-list .bar.menu.failure-list, .jasmine_html-reporter.spec-list .results .failures { display: none; } 37 | .jasmine_html-reporter.failure-list .bar.menu.spec-list, .jasmine_html-reporter.failure-list .summary { display: none; } 38 | .jasmine_html-reporter .running-alert { background-color: #666666; } 39 | .jasmine_html-reporter .results { margin-top: 14px; } 40 | .jasmine_html-reporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; } 41 | .jasmine_html-reporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } 42 | .jasmine_html-reporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; } 43 | .jasmine_html-reporter.showDetails .summary { display: none; } 44 | .jasmine_html-reporter.showDetails #details { display: block; } 45 | .jasmine_html-reporter .summaryMenuItem { font-weight: bold; text-decoration: underline; } 46 | .jasmine_html-reporter .summary { margin-top: 14px; } 47 | .jasmine_html-reporter .summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; } 48 | .jasmine_html-reporter .summary ul.suite { margin-top: 7px; margin-bottom: 7px; } 49 | .jasmine_html-reporter .summary li.passed a { color: #007069; } 50 | .jasmine_html-reporter .summary li.failed a { color: #ca3a11; } 51 | .jasmine_html-reporter .summary li.empty a { color: #ba9d37; } 52 | .jasmine_html-reporter .summary li.pending a { color: #ba9d37; } 53 | .jasmine_html-reporter .description + .suite { margin-top: 0; } 54 | .jasmine_html-reporter .suite { margin-top: 14px; } 55 | .jasmine_html-reporter .suite a { color: #333333; } 56 | .jasmine_html-reporter .failures .spec-detail { margin-bottom: 28px; } 57 | .jasmine_html-reporter .failures .spec-detail .description { background-color: #ca3a11; } 58 | .jasmine_html-reporter .failures .spec-detail .description a { color: white; } 59 | .jasmine_html-reporter .result-message { padding-top: 14px; color: #333333; white-space: pre; } 60 | .jasmine_html-reporter .result-message span.result { display: block; } 61 | .jasmine_html-reporter .stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; } 62 | -------------------------------------------------------------------------------- /test/lib/jasmine-2.0.3/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trentrichardson/jQuery-Impromptu/ef9596d302c2fa3fd7f789cdb192b12127934ee8/test/lib/jasmine-2.0.3/jasmine_favicon.png -------------------------------------------------------------------------------- /test/lib/jasmine-jquery.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Jasmine-jQuery: a set of jQuery helpers for Jasmine tests. 3 | 4 | Version 2.0.5 5 | 6 | https://github.com/velesin/jasmine-jquery 7 | 8 | Copyright (c) 2010-2014 Wojciech Zawistowski, Travis Jeffery 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining 11 | a copy of this software and associated documentation files (the 12 | "Software"), to deal in the Software without restriction, including 13 | without limitation the rights to use, copy, modify, merge, publish, 14 | distribute, sublicense, and/or sell copies of the Software, and to 15 | permit persons to whom the Software is furnished to do so, subject to 16 | the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | */ 29 | 30 | +function (window, jasmine, $) { "use strict"; 31 | 32 | jasmine.spiedEventsKey = function (selector, eventName) { 33 | return [$(selector).selector, eventName].toString() 34 | } 35 | 36 | jasmine.getFixtures = function () { 37 | return jasmine.currentFixtures_ = jasmine.currentFixtures_ || new jasmine.Fixtures() 38 | } 39 | 40 | jasmine.getStyleFixtures = function () { 41 | return jasmine.currentStyleFixtures_ = jasmine.currentStyleFixtures_ || new jasmine.StyleFixtures() 42 | } 43 | 44 | jasmine.Fixtures = function () { 45 | this.containerId = 'jasmine-fixtures' 46 | this.fixturesCache_ = {} 47 | this.fixturesPath = 'spec/javascripts/fixtures' 48 | } 49 | 50 | jasmine.Fixtures.prototype.set = function (html) { 51 | this.cleanUp() 52 | return this.createContainer_(html) 53 | } 54 | 55 | jasmine.Fixtures.prototype.appendSet= function (html) { 56 | this.addToContainer_(html) 57 | } 58 | 59 | jasmine.Fixtures.prototype.preload = function () { 60 | this.read.apply(this, arguments) 61 | } 62 | 63 | jasmine.Fixtures.prototype.load = function () { 64 | this.cleanUp() 65 | this.createContainer_(this.read.apply(this, arguments)) 66 | } 67 | 68 | jasmine.Fixtures.prototype.appendLoad = function () { 69 | this.addToContainer_(this.read.apply(this, arguments)) 70 | } 71 | 72 | jasmine.Fixtures.prototype.read = function () { 73 | var htmlChunks = [] 74 | , fixtureUrls = arguments 75 | 76 | for(var urlCount = fixtureUrls.length, urlIndex = 0; urlIndex < urlCount; urlIndex++) { 77 | htmlChunks.push(this.getFixtureHtml_(fixtureUrls[urlIndex])) 78 | } 79 | 80 | return htmlChunks.join('') 81 | } 82 | 83 | jasmine.Fixtures.prototype.clearCache = function () { 84 | this.fixturesCache_ = {} 85 | } 86 | 87 | jasmine.Fixtures.prototype.cleanUp = function () { 88 | $('#' + this.containerId).remove() 89 | } 90 | 91 | jasmine.Fixtures.prototype.sandbox = function (attributes) { 92 | var attributesToSet = attributes || {} 93 | return $('
').attr(attributesToSet) 94 | } 95 | 96 | jasmine.Fixtures.prototype.createContainer_ = function (html) { 97 | var container = $('
') 98 | .attr('id', this.containerId) 99 | .html(html) 100 | 101 | $(document.body).append(container) 102 | return container 103 | } 104 | 105 | jasmine.Fixtures.prototype.addToContainer_ = function (html){ 106 | var container = $(document.body).find('#'+this.containerId).append(html) 107 | 108 | if (!container.length) { 109 | this.createContainer_(html) 110 | } 111 | } 112 | 113 | jasmine.Fixtures.prototype.getFixtureHtml_ = function (url) { 114 | if (typeof this.fixturesCache_[url] === 'undefined') { 115 | this.loadFixtureIntoCache_(url) 116 | } 117 | return this.fixturesCache_[url] 118 | } 119 | 120 | jasmine.Fixtures.prototype.loadFixtureIntoCache_ = function (relativeUrl) { 121 | var self = this 122 | , url = this.makeFixtureUrl_(relativeUrl) 123 | , htmlText = '' 124 | , request = $.ajax({ 125 | async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded 126 | cache: false, 127 | url: url, 128 | success: function (data, status, $xhr) { 129 | htmlText = $xhr.responseText 130 | } 131 | }).fail(function ($xhr, status, err) { 132 | throw new Error('Fixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + err.message + ')') 133 | }) 134 | 135 | var scripts = $($.parseHTML(htmlText, true)).find('script[src]') || []; 136 | 137 | scripts.each(function(){ 138 | $.ajax({ 139 | async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded 140 | cache: false, 141 | dataType: 'script', 142 | url: $(this).attr('src'), 143 | success: function (data, status, $xhr) { 144 | htmlText += '' 145 | }, 146 | error: function ($xhr, status, err) { 147 | throw new Error('Script could not be loaded: ' + scriptSrc + ' (status: ' + status + ', message: ' + err.message + ')') 148 | } 149 | }); 150 | }) 151 | 152 | self.fixturesCache_[relativeUrl] = htmlText; 153 | } 154 | 155 | jasmine.Fixtures.prototype.makeFixtureUrl_ = function (relativeUrl){ 156 | return this.fixturesPath.match('/$') ? this.fixturesPath + relativeUrl : this.fixturesPath + '/' + relativeUrl 157 | } 158 | 159 | jasmine.Fixtures.prototype.proxyCallTo_ = function (methodName, passedArguments) { 160 | return this[methodName].apply(this, passedArguments) 161 | } 162 | 163 | 164 | jasmine.StyleFixtures = function () { 165 | this.fixturesCache_ = {} 166 | this.fixturesNodes_ = [] 167 | this.fixturesPath = 'spec/javascripts/fixtures' 168 | } 169 | 170 | jasmine.StyleFixtures.prototype.set = function (css) { 171 | this.cleanUp() 172 | this.createStyle_(css) 173 | } 174 | 175 | jasmine.StyleFixtures.prototype.appendSet = function (css) { 176 | this.createStyle_(css) 177 | } 178 | 179 | jasmine.StyleFixtures.prototype.preload = function () { 180 | this.read_.apply(this, arguments) 181 | } 182 | 183 | jasmine.StyleFixtures.prototype.load = function () { 184 | this.cleanUp() 185 | this.createStyle_(this.read_.apply(this, arguments)) 186 | } 187 | 188 | jasmine.StyleFixtures.prototype.appendLoad = function () { 189 | this.createStyle_(this.read_.apply(this, arguments)) 190 | } 191 | 192 | jasmine.StyleFixtures.prototype.cleanUp = function () { 193 | while(this.fixturesNodes_.length) { 194 | this.fixturesNodes_.pop().remove() 195 | } 196 | } 197 | 198 | jasmine.StyleFixtures.prototype.createStyle_ = function (html) { 199 | var styleText = $('
').html(html).text() 200 | , style = $('') 201 | 202 | this.fixturesNodes_.push(style) 203 | $('head').append(style) 204 | } 205 | 206 | jasmine.StyleFixtures.prototype.clearCache = jasmine.Fixtures.prototype.clearCache 207 | jasmine.StyleFixtures.prototype.read_ = jasmine.Fixtures.prototype.read 208 | jasmine.StyleFixtures.prototype.getFixtureHtml_ = jasmine.Fixtures.prototype.getFixtureHtml_ 209 | jasmine.StyleFixtures.prototype.loadFixtureIntoCache_ = jasmine.Fixtures.prototype.loadFixtureIntoCache_ 210 | jasmine.StyleFixtures.prototype.makeFixtureUrl_ = jasmine.Fixtures.prototype.makeFixtureUrl_ 211 | jasmine.StyleFixtures.prototype.proxyCallTo_ = jasmine.Fixtures.prototype.proxyCallTo_ 212 | 213 | jasmine.getJSONFixtures = function () { 214 | return jasmine.currentJSONFixtures_ = jasmine.currentJSONFixtures_ || new jasmine.JSONFixtures() 215 | } 216 | 217 | jasmine.JSONFixtures = function () { 218 | this.fixturesCache_ = {} 219 | this.fixturesPath = 'spec/javascripts/fixtures/json' 220 | } 221 | 222 | jasmine.JSONFixtures.prototype.load = function () { 223 | this.read.apply(this, arguments) 224 | return this.fixturesCache_ 225 | } 226 | 227 | jasmine.JSONFixtures.prototype.read = function () { 228 | var fixtureUrls = arguments 229 | 230 | for(var urlCount = fixtureUrls.length, urlIndex = 0; urlIndex < urlCount; urlIndex++) { 231 | this.getFixtureData_(fixtureUrls[urlIndex]) 232 | } 233 | 234 | return this.fixturesCache_ 235 | } 236 | 237 | jasmine.JSONFixtures.prototype.clearCache = function () { 238 | this.fixturesCache_ = {} 239 | } 240 | 241 | jasmine.JSONFixtures.prototype.getFixtureData_ = function (url) { 242 | if (!this.fixturesCache_[url]) this.loadFixtureIntoCache_(url) 243 | return this.fixturesCache_[url] 244 | } 245 | 246 | jasmine.JSONFixtures.prototype.loadFixtureIntoCache_ = function (relativeUrl) { 247 | var self = this 248 | , url = this.fixturesPath.match('/$') ? this.fixturesPath + relativeUrl : this.fixturesPath + '/' + relativeUrl 249 | 250 | $.ajax({ 251 | async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded 252 | cache: false, 253 | dataType: 'json', 254 | url: url, 255 | success: function (data) { 256 | self.fixturesCache_[relativeUrl] = data 257 | }, 258 | error: function ($xhr, status, err) { 259 | throw new Error('JSONFixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + err.message + ')') 260 | } 261 | }) 262 | } 263 | 264 | jasmine.JSONFixtures.prototype.proxyCallTo_ = function (methodName, passedArguments) { 265 | return this[methodName].apply(this, passedArguments) 266 | } 267 | 268 | jasmine.jQuery = function () {} 269 | 270 | jasmine.jQuery.browserTagCaseIndependentHtml = function (html) { 271 | return $('
').append(html).html() 272 | } 273 | 274 | jasmine.jQuery.elementToString = function (element) { 275 | return $(element).map(function () { return this.outerHTML; }).toArray().join(', ') 276 | } 277 | 278 | var data = { 279 | spiedEvents: {} 280 | , handlers: [] 281 | } 282 | 283 | jasmine.jQuery.events = { 284 | spyOn: function (selector, eventName) { 285 | var handler = function (e) { 286 | data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] = jasmine.util.argsToArray(arguments) 287 | } 288 | 289 | $(selector).on(eventName, handler) 290 | data.handlers.push(handler) 291 | 292 | return { 293 | selector: selector, 294 | eventName: eventName, 295 | handler: handler, 296 | reset: function (){ 297 | delete data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] 298 | } 299 | } 300 | }, 301 | 302 | args: function (selector, eventName) { 303 | var actualArgs = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] 304 | 305 | if (!actualArgs) { 306 | throw "There is no spy for " + eventName + " on " + selector.toString() + ". Make sure to create a spy using spyOnEvent." 307 | } 308 | 309 | return actualArgs 310 | }, 311 | 312 | wasTriggered: function (selector, eventName) { 313 | return !!(data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]) 314 | }, 315 | 316 | wasTriggeredWith: function (selector, eventName, expectedArgs, util, customEqualityTesters) { 317 | var actualArgs = jasmine.jQuery.events.args(selector, eventName).slice(1) 318 | 319 | if (Object.prototype.toString.call(expectedArgs) !== '[object Array]') 320 | actualArgs = actualArgs[0] 321 | 322 | return util.equals(expectedArgs, actualArgs, customEqualityTesters) 323 | }, 324 | 325 | wasPrevented: function (selector, eventName) { 326 | var args = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] 327 | , e = args ? args[0] : undefined 328 | 329 | return e && e.isDefaultPrevented() 330 | }, 331 | 332 | wasStopped: function (selector, eventName) { 333 | var args = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] 334 | , e = args ? args[0] : undefined 335 | return e && e.isPropagationStopped() 336 | }, 337 | 338 | cleanUp: function () { 339 | data.spiedEvents = {} 340 | data.handlers = [] 341 | } 342 | } 343 | 344 | var hasProperty = function (actualValue, expectedValue) { 345 | if (expectedValue === undefined) 346 | return actualValue !== undefined 347 | 348 | return actualValue === expectedValue 349 | } 350 | 351 | beforeEach(function () { 352 | jasmine.addMatchers({ 353 | toHaveClass: function () { 354 | return { 355 | compare: function (actual, className) { 356 | return { pass: $(actual).hasClass(className) } 357 | } 358 | } 359 | }, 360 | 361 | toHaveCss: function () { 362 | return { 363 | compare: function (actual, css) { 364 | for (var prop in css){ 365 | var value = css[prop] 366 | // see issue #147 on gh 367 | ;if (value === 'auto' && $(actual).get(0).style[prop] === 'auto') continue 368 | if ($(actual).css(prop) !== value) return { pass: false } 369 | } 370 | return { pass: true } 371 | } 372 | } 373 | }, 374 | 375 | toBeVisible: function () { 376 | return { 377 | compare: function (actual) { 378 | return { pass: $(actual).is(':visible') } 379 | } 380 | } 381 | }, 382 | 383 | toBeHidden: function () { 384 | return { 385 | compare: function (actual) { 386 | return { pass: $(actual).is(':hidden') } 387 | } 388 | } 389 | }, 390 | 391 | toBeSelected: function () { 392 | return { 393 | compare: function (actual) { 394 | return { pass: $(actual).is(':selected') } 395 | } 396 | } 397 | }, 398 | 399 | toBeChecked: function () { 400 | return { 401 | compare: function (actual) { 402 | return { pass: $(actual).is(':checked') } 403 | } 404 | } 405 | }, 406 | 407 | toBeEmpty: function () { 408 | return { 409 | compare: function (actual) { 410 | return { pass: $(actual).is(':empty') } 411 | } 412 | } 413 | }, 414 | 415 | toBeInDOM: function () { 416 | return { 417 | compare: function (actual) { 418 | return { pass: $.contains(document.documentElement, $(actual)[0]) } 419 | } 420 | } 421 | }, 422 | 423 | toExist: function () { 424 | return { 425 | compare: function (actual) { 426 | return { pass: $(actual).length } 427 | } 428 | } 429 | }, 430 | 431 | toHaveLength: function () { 432 | return { 433 | compare: function (actual, length) { 434 | return { pass: $(actual).length === length } 435 | } 436 | } 437 | }, 438 | 439 | toHaveAttr: function () { 440 | return { 441 | compare: function (actual, attributeName, expectedAttributeValue) { 442 | return { pass: hasProperty($(actual).attr(attributeName), expectedAttributeValue) } 443 | } 444 | } 445 | }, 446 | 447 | toHaveProp: function () { 448 | return { 449 | compare: function (actual, propertyName, expectedPropertyValue) { 450 | return { pass: hasProperty($(actual).prop(propertyName), expectedPropertyValue) } 451 | } 452 | } 453 | }, 454 | 455 | toHaveId: function () { 456 | return { 457 | compare: function (actual, id) { 458 | return { pass: $(actual).attr('id') == id } 459 | } 460 | } 461 | }, 462 | 463 | toHaveHtml: function () { 464 | return { 465 | compare: function (actual, html) { 466 | return { pass: $(actual).html() == jasmine.jQuery.browserTagCaseIndependentHtml(html) } 467 | } 468 | } 469 | }, 470 | 471 | toContainHtml: function () { 472 | return { 473 | compare: function (actual, html) { 474 | var actualHtml = $(actual).html() 475 | , expectedHtml = jasmine.jQuery.browserTagCaseIndependentHtml(html) 476 | 477 | return { pass: (actualHtml.indexOf(expectedHtml) >= 0) } 478 | } 479 | } 480 | }, 481 | 482 | toHaveText: function () { 483 | return { 484 | compare: function (actual, text) { 485 | var actualText = $(actual).text() 486 | var trimmedText = $.trim(actualText) 487 | 488 | if (text && $.isFunction(text.test)) { 489 | return { pass: text.test(actualText) || text.test(trimmedText) } 490 | } else { 491 | return { pass: (actualText == text || trimmedText == text) } 492 | } 493 | } 494 | } 495 | }, 496 | 497 | toContainText: function () { 498 | return { 499 | compare: function (actual, text) { 500 | var trimmedText = $.trim($(actual).text()) 501 | 502 | if (text && $.isFunction(text.test)) { 503 | return { pass: text.test(trimmedText) } 504 | } else { 505 | return { pass: trimmedText.indexOf(text) != -1 } 506 | } 507 | } 508 | } 509 | }, 510 | 511 | toHaveValue: function () { 512 | return { 513 | compare: function (actual, value) { 514 | return { pass: $(actual).val() === value } 515 | } 516 | } 517 | }, 518 | 519 | toHaveData: function () { 520 | return { 521 | compare: function (actual, key, expectedValue) { 522 | return { pass: hasProperty($(actual).data(key), expectedValue) } 523 | } 524 | } 525 | }, 526 | 527 | toContainElement: function () { 528 | return { 529 | compare: function (actual, selector) { 530 | if (window.debug) debugger 531 | return { pass: $(actual).find(selector).length } 532 | } 533 | } 534 | }, 535 | 536 | toBeMatchedBy: function () { 537 | return { 538 | compare: function (actual, selector) { 539 | return { pass: $(actual).filter(selector).length } 540 | } 541 | } 542 | }, 543 | 544 | toBeDisabled: function () { 545 | return { 546 | compare: function (actual, selector) { 547 | return { pass: $(actual).is(':disabled') } 548 | } 549 | } 550 | }, 551 | 552 | toBeFocused: function (selector) { 553 | return { 554 | compare: function (actual, selector) { 555 | return { pass: $(actual)[0] === $(actual)[0].ownerDocument.activeElement } 556 | } 557 | } 558 | }, 559 | 560 | toHandle: function () { 561 | return { 562 | compare: function (actual, event) { 563 | var events = $._data($(actual).get(0), "events") 564 | 565 | if (!events || !event || typeof event !== "string") { 566 | return { pass: false } 567 | } 568 | 569 | var namespaces = event.split(".") 570 | , eventType = namespaces.shift() 571 | , sortedNamespaces = namespaces.slice(0).sort() 572 | , namespaceRegExp = new RegExp("(^|\\.)" + sortedNamespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") 573 | 574 | if (events[eventType] && namespaces.length) { 575 | for (var i = 0; i < events[eventType].length; i++) { 576 | var namespace = events[eventType][i].namespace 577 | 578 | if (namespaceRegExp.test(namespace)) 579 | return { pass: true } 580 | } 581 | } else { 582 | return { pass: (events[eventType] && events[eventType].length > 0) } 583 | } 584 | 585 | return { pass: false } 586 | } 587 | } 588 | }, 589 | 590 | toHandleWith: function () { 591 | return { 592 | compare: function (actual, eventName, eventHandler) { 593 | var normalizedEventName = eventName.split('.')[0] 594 | , stack = $._data($(actual).get(0), "events")[normalizedEventName] 595 | 596 | for (var i = 0; i < stack.length; i++) { 597 | if (stack[i].handler == eventHandler) return { pass: true } 598 | } 599 | 600 | return { pass: false } 601 | } 602 | } 603 | }, 604 | 605 | toHaveBeenTriggeredOn: function () { 606 | return { 607 | compare: function (actual, selector) { 608 | var result = { pass: jasmine.jQuery.events.wasTriggered(selector, actual) } 609 | 610 | result.message = result.pass ? 611 | "Expected event " + $(actual) + " not to have been triggered on " + selector : 612 | "Expected event " + $(actual) + " to have been triggered on " + selector 613 | 614 | return result; 615 | } 616 | } 617 | }, 618 | 619 | toHaveBeenTriggered: function (){ 620 | return { 621 | compare: function (actual) { 622 | var eventName = actual.eventName 623 | , selector = actual.selector 624 | , result = { pass: jasmine.jQuery.events.wasTriggered(selector, eventName) } 625 | 626 | result.message = result.pass ? 627 | "Expected event " + eventName + " not to have been triggered on " + selector : 628 | "Expected event " + eventName + " to have been triggered on " + selector 629 | 630 | return result 631 | } 632 | } 633 | }, 634 | 635 | toHaveBeenTriggeredOnAndWith: function (j$, customEqualityTesters) { 636 | return { 637 | compare: function (actual, selector, expectedArgs) { 638 | var wasTriggered = jasmine.jQuery.events.wasTriggered(selector, actual) 639 | , result = { pass: wasTriggered && jasmine.jQuery.events.wasTriggeredWith(selector, actual, expectedArgs, j$, customEqualityTesters) } 640 | 641 | if (wasTriggered) { 642 | var actualArgs = jasmine.jQuery.events.args(selector, actual, expectedArgs)[1] 643 | result.message = result.pass ? 644 | "Expected event " + actual + " not to have been triggered with " + jasmine.pp(expectedArgs) + " but it was triggered with " + jasmine.pp(actualArgs) : 645 | "Expected event " + actual + " to have been triggered with " + jasmine.pp(expectedArgs) + " but it was triggered with " + jasmine.pp(actualArgs) 646 | 647 | } else { 648 | // todo check on this 649 | result.message = result.pass ? 650 | "Expected event " + actual + " not to have been triggered on " + selector : 651 | "Expected event " + actual + " to have been triggered on " + selector 652 | } 653 | 654 | return result 655 | } 656 | } 657 | }, 658 | 659 | toHaveBeenPreventedOn: function () { 660 | return { 661 | compare: function (actual, selector) { 662 | var result = { pass: jasmine.jQuery.events.wasPrevented(selector, actual) } 663 | 664 | result.message = result.pass ? 665 | "Expected event " + actual + " not to have been prevented on " + selector : 666 | "Expected event " + actual + " to have been prevented on " + selector 667 | 668 | return result 669 | } 670 | } 671 | }, 672 | 673 | toHaveBeenPrevented: function () { 674 | return { 675 | compare: function (actual) { 676 | var eventName = actual.eventName 677 | , selector = actual.selector 678 | , result = { pass: jasmine.jQuery.events.wasPrevented(selector, eventName) } 679 | 680 | result.message = result.pass ? 681 | "Expected event " + eventName + " not to have been prevented on " + selector : 682 | "Expected event " + eventName + " to have been prevented on " + selector 683 | 684 | return result 685 | } 686 | } 687 | }, 688 | 689 | toHaveBeenStoppedOn: function () { 690 | return { 691 | compare: function (actual, selector) { 692 | var result = { pass: jasmine.jQuery.events.wasStopped(selector, actual) } 693 | 694 | result.message = result.pass ? 695 | "Expected event " + actual + " not to have been stopped on " + selector : 696 | "Expected event " + actual + " to have been stopped on " + selector 697 | 698 | return result; 699 | } 700 | } 701 | }, 702 | 703 | toHaveBeenStopped: function () { 704 | return { 705 | compare: function (actual) { 706 | var eventName = actual.eventName 707 | , selector = actual.selector 708 | , result = { pass: jasmine.jQuery.events.wasStopped(selector, eventName) } 709 | 710 | result.message = result.pass ? 711 | "Expected event " + eventName + " not to have been stopped on " + selector : 712 | "Expected event " + eventName + " to have been stopped on " + selector 713 | 714 | return result 715 | } 716 | } 717 | } 718 | }) 719 | 720 | jasmine.getEnv().addCustomEqualityTester(function(a, b) { 721 | if (a && b) { 722 | if (a instanceof $ || jasmine.isDomNode(a)) { 723 | var $a = $(a) 724 | 725 | if (b instanceof $) 726 | return $a.length == b.length && a.is(b) 727 | 728 | return $a.is(b); 729 | } 730 | 731 | if (b instanceof $ || jasmine.isDomNode(b)) { 732 | var $b = $(b) 733 | 734 | if (a instanceof $) 735 | return a.length == $b.length && $b.is(a) 736 | 737 | return $(b).is(a); 738 | } 739 | } 740 | }) 741 | 742 | jasmine.getEnv().addCustomEqualityTester(function (a, b) { 743 | if (a instanceof $ && b instanceof $ && a.size() == b.size()) 744 | return a.is(b) 745 | }) 746 | }) 747 | 748 | afterEach(function () { 749 | jasmine.getFixtures().cleanUp() 750 | jasmine.getStyleFixtures().cleanUp() 751 | jasmine.jQuery.events.cleanUp() 752 | }) 753 | 754 | window.readFixtures = function () { 755 | return jasmine.getFixtures().proxyCallTo_('read', arguments) 756 | } 757 | 758 | window.preloadFixtures = function () { 759 | jasmine.getFixtures().proxyCallTo_('preload', arguments) 760 | } 761 | 762 | window.loadFixtures = function () { 763 | jasmine.getFixtures().proxyCallTo_('load', arguments) 764 | } 765 | 766 | window.appendLoadFixtures = function () { 767 | jasmine.getFixtures().proxyCallTo_('appendLoad', arguments) 768 | } 769 | 770 | window.setFixtures = function (html) { 771 | return jasmine.getFixtures().proxyCallTo_('set', arguments) 772 | } 773 | 774 | window.appendSetFixtures = function () { 775 | jasmine.getFixtures().proxyCallTo_('appendSet', arguments) 776 | } 777 | 778 | window.sandbox = function (attributes) { 779 | return jasmine.getFixtures().sandbox(attributes) 780 | } 781 | 782 | window.spyOnEvent = function (selector, eventName) { 783 | return jasmine.jQuery.events.spyOn(selector, eventName) 784 | } 785 | 786 | window.preloadStyleFixtures = function () { 787 | jasmine.getStyleFixtures().proxyCallTo_('preload', arguments) 788 | } 789 | 790 | window.loadStyleFixtures = function () { 791 | jasmine.getStyleFixtures().proxyCallTo_('load', arguments) 792 | } 793 | 794 | window.appendLoadStyleFixtures = function () { 795 | jasmine.getStyleFixtures().proxyCallTo_('appendLoad', arguments) 796 | } 797 | 798 | window.setStyleFixtures = function (html) { 799 | jasmine.getStyleFixtures().proxyCallTo_('set', arguments) 800 | } 801 | 802 | window.appendSetStyleFixtures = function (html) { 803 | jasmine.getStyleFixtures().proxyCallTo_('appendSet', arguments) 804 | } 805 | 806 | window.loadJSONFixtures = function () { 807 | return jasmine.getJSONFixtures().proxyCallTo_('load', arguments) 808 | } 809 | 810 | window.getJSONFixture = function (url) { 811 | return jasmine.getJSONFixtures().proxyCallTo_('read', arguments)[url] 812 | } 813 | }(window, window.jasmine, window.jQuery); --------------------------------------------------------------------------------