diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index ffede22..0000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "components" -} \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index da032f1..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store - -node_modules/ -components/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 3258d05..0000000 --- a/.jshintrc +++ /dev/null @@ -1,67 +0,0 @@ -{ - "bitwise" : true, - "curly" : true, - "eqeqeq" : false, - "forin" : true, - "immed" : true, - "latedef" : true, - "newcap" : true, - "noarg" : true, - "noempty" : true, - "nonew" : true, - "plusplus" : false, - "regexp" : true, - "undef" : true, - "strict" : false, - "trailing" : true, - - "asi" : false, - "boss" : false, - "debug" : false, - "eqnull" : false, - "es5" : false, - "esnext" : false, - "evil" : false, - "expr" : false, - "funcscope" : false, - "globalstrict" : false, - "iterator" : false, - "lastsemic" : false, - "laxbreak" : false, - "laxcomma" : false, - "loopfunc" : false, - "multistr" : false, - "onecase" : false, - "proto" : false, - "regexdash" : false, - "scripturl" : false, - "smarttabs" : false, - "shadow" : false, - "sub" : false, - "supernew" : false, - "validthis" : false, - - "browser" : true, - "couch" : false, - "devel" : true, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : true, - "nonstandard" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - "nomen" : false, - "onevar" : false, - "passfail" : false, - "white" : false, - - "maxerr" : 100, - "predef" : [ - "test", - "deepEqual" - ], - "indent" : 4 -} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d30ba63..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.11 -before_script: - - npm install -g grunt-cli bower diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 2ff9623..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,43 +0,0 @@ - -module.exports = function (grunt) { - -// Project configuration - - grunt.initConfig({ - pkg: '', - - files: { - all: ['jquery.serializeObject.js'], - tests: ['test/**/*.js'] - }, - - docs: { - all: ['README.markdown'] - }, - - uglify: { - dist: { - 'dist/jquery.serializeObject.min.js': '' - } - }, - - jshint: { - options: '', - all: '' - }, - - qunit: { - all: ['test/*.html'] - } - - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-qunit'); - -// Default grunt task - - grunt.registerTask('default', ['jshint', 'uglify', 'qunit']); - -}; \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index f4b72d7..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 David Hong - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.markdown b/README.markdown deleted file mode 100644 index 7407517..0000000 --- a/README.markdown +++ /dev/null @@ -1,74 +0,0 @@ -[![Build Status](https://travis-ci.org/hongymagic/jQuery.serializeObject.png)](https://travis-ci.org/hongymagic/jQuery.serializeObject) - -# What is it? - -`$.serializeObject` is a variant of existing `$.serialize` method which, instead -of encoding form elements to string, converts form elements to a valid JSON -object which can be used in your JavaScript application. - -# Why? - -Whilst it isn't necessary in most cases, and by that I mean 99.99% kind of most, -there are times when we manipulate form data on client side. Personally I find -JSON much easier to work with than DOM or string manipulation. - -# How do I use it? - -If you want to see the code and demo first: http://jsfiddle.net/davidhong/PRpJT/ - -Simply include the `jQuery.serializeObject.js` along with any `jQuery` instance -and use it like `$.serialize`. - -If you have a `form` like the following: - -
- - - - - - -
- -and wish to convert them to a JSON object: - - var minutes = $('form#minutes').serializeObject(); - -will return: - - { - "subject": "", - "minute-taker": "", - "attendees": [ - "David", - "Daniel", - "Darwin" - ] - } - -## Change log - -### 2.0.3 - -- Add MIT License - -### 2.0.2 - -- Add support for $.noConflict mode - -### 2.0.0 - -*Major version change: Camel casing of names have been removed. Please use -version 1.0.4 if you require camel casing of names.* - -- Remove `$.data` like camelCasing on names - -### 1.0.4 - -- Fix an issue (#2) where arrays longer than 2 resulted in incorrect values - -## Known issues - -- In rare cases, this won't work with old checkbox/hidden hack. See [this issue for more details](https://github.com/hongymagic/jQuery.serializeObject/issues/9). - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/hongymagic/jquery.serializeobject/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/bower.json b/bower.json deleted file mode 100644 index 2612443..0000000 --- a/bower.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "jQuery.serializeObject", - "version": "2.0.3", - "main": "jquery.serializeObject.js", - "ignore": [ - "**/.*", - "node_modules", - "components" - ], - "dependencies": { - "jquery": "1.9.1" - }, - "devDependencies": { - "qunit": "~1.14.0" - } -} diff --git a/dist/jquery.serializeObject.min.js b/dist/jquery.serializeObject.min.js deleted file mode 100644 index 8aac8a4..0000000 --- a/dist/jquery.serializeObject.min.js +++ /dev/null @@ -1 +0,0 @@ -$.fn.serializeObject=function(){"use strict";var a={},b=function(b,c){var d=a[c.name];"undefined"!=typeof d&&d!==null?$.isArray(d)?d.push(c.value):a[c.name]=[d,c.value]:a[c.name]=c.value};return $.each(this.serializeArray(),b),a}; \ No newline at end of file diff --git a/images/checker.png b/images/checker.png new file mode 100644 index 0000000..ab14540 Binary files /dev/null and b/images/checker.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..ce7fbae --- /dev/null +++ b/index.html @@ -0,0 +1,85 @@ + + + + + + jQuery.serializeobject by hongymagic + + + + + + + + + +
+
+

jQuery.serializeobject

+

Encode a set of form elements as a JSON object for manipulation/submission. Similar to $.serialize, JSON-ized.

+

View the Project on GitHub hongymagic/jQuery.serializeObject

+ +
+
+

What is it?

+ +

$.serializeObject is a variant of existing $.serialize method which, instead +of encoding form elements to string, converts form elements to a valid JSON +object.

+ +

Why?

+ +

Whilst it isn't necessary in most cases, and by that I mean 99.99% kind of most, +there are times when we manipulate form data on client side. Personally I find +JSON much easier to work with than DOM or string manipulation.

+ +

How do I use it?

+ +

If you want to see the code and demo first: http://jsfiddle.net/davidhong/gP9bh/

+ +

Simple include the jQuery.serializeObject.js along with any jQuery instance +and use it like $.serialize.

+ +

If you have a form like the following:

+ +
<form id="minutes">
+  <input type="text" name="subject" />
+  <input type="text" name="minute-taker" />
+  <input type="text" name="attendees" />
+  ...
+  <input type="checkbox" name="cc[]" value="David" />
+  <input type="checkbox" name="cc[]" value="John" />
+  <input type="checkbox" name="cc[]" value="Alice" />
+</form>
+
+ +

and wish to convert them to a JSON object:

+ +
var minutes = $('form#minutes').serializeObject();
+
+ +

will return:

+ +
{
+  "subject": "",
+  "minuteTaker": "",
+  "attendees": "",
+  "cc[]": []
+}
+
+
+
+ + + + + \ No newline at end of file diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js new file mode 100644 index 0000000..08716c0 --- /dev/null +++ b/javascripts/scale.fix.js @@ -0,0 +1,20 @@ +fixScale = function(doc) { + + var addEvent = 'addEventListener', + type = 'gesturestart', + qsa = 'querySelectorAll', + scales = [1, 1], + meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; + + function fix() { + meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; + doc.removeEventListener(type, fix, true); + } + + if ((meta = meta[meta.length - 1]) && addEvent in doc) { + fix(); + scales = [.25, 1.6]; + doc[addEvent](type, fix, true); + } + +}; \ No newline at end of file diff --git a/jquery.serializeObject.d.ts b/jquery.serializeObject.d.ts deleted file mode 100644 index 3aea456..0000000 --- a/jquery.serializeObject.d.ts +++ /dev/null @@ -1,4 +0,0 @@ - -interface JQuery { - serializeObject(): { [index: string]: string|string[] } -} diff --git a/jquery.serializeObject.js b/jquery.serializeObject.js deleted file mode 100644 index f6285ac..0000000 --- a/jquery.serializeObject.js +++ /dev/null @@ -1,40 +0,0 @@ -// -// Use internal $.serializeArray to get list of form elements which is -// consistent with $.serialize -// -// From version 2.0.0, $.serializeObject will stop converting [name] values -// to camelCase format. This is *consistent* with other serialize methods: -// -// - $.serialize -// - $.serializeArray -// -// If you require camel casing, you can either download version 1.0.4 or map -// them yourself. -// - -(function($){ - $.fn.serializeObject = function () { - "use strict"; - - var result = {}; - var extend = function (i, element) { - var node = result[element.name]; - - // If node with same name exists already, need to convert it to an array as it - // is a multi-value field (i.e., checkboxes) - - if ('undefined' !== typeof node && node !== null) { - if ($.isArray(node)) { - node.push(element.value); - } else { - result[element.name] = [node, element.value]; - } - } else { - result[element.name] = element.value; - } - }; - - $.each(this.serializeArray(), extend); - return result; - }; -})(jQuery); diff --git a/package.json b/package.json deleted file mode 100644 index b07a0b7..0000000 --- a/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "jQuery.serializeObject", - "version": "2.0.4", - "description": "A jQuery plugin to turn form data into JSON", - "main": "jquery.serializeObject.js", - "types": "jquery.serializeObject.d.ts", - "directories": { - "test": "test" - }, - "scripts": { - "pretest": "bower install", - "test": "grunt" - }, - "repository": { - "type": "git", - "url": "git://github.com/hongymagic/jQuery.serializeObject.git" - }, - "keywords": [ - "jquery", - "serialize", - "object", - "json", - "serializeJSON", - "serializeObject" - ], - "author": "David G. Hong", - "license": "MIT", - "gitHead": "7789084425b353624fc95487024459f364d11df6", - "readmeFilename": "README.markdown", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.0", - "grunt-contrib-jshint": "~0.4.3", - "grunt-contrib-qunit": "~0.2.1" - } -} diff --git a/params.json b/params.json new file mode 100644 index 0000000..90f6434 --- /dev/null +++ b/params.json @@ -0,0 +1 @@ +{"name":"jQuery.serializeobject","body":"# What is it?\r\n\r\n`$.serializeObject` is a variant of existing `$.serialize` method which, instead\r\nof encoding form elements to string, converts form elements to a valid JSON\r\nobject.\r\n\r\n# Why?\r\n\r\nWhilst it isn't necessary in most cases, and by that I mean 99.99% kind of most,\r\nthere are times when we manipulate form data on client side. Personally I find\r\nJSON much easier to work with than DOM or string manipulation.\r\n\r\n# How do I use it?\r\n\r\nIf you want to see the code and demo first: http://jsfiddle.net/davidhong/gP9bh/\r\n\r\nSimple include the `jQuery.serializeObject.js` along with any `jQuery` instance\r\nand use it like `$.serialize`.\r\n\r\nIf you have a `form` like the following:\r\n\r\n
\r\n \r\n \r\n \r\n ...\r\n \r\n \r\n \r\n
\r\n\r\nand wish to convert them to a JSON object:\r\n\r\n var minutes = $('form#minutes').serializeObject();\r\n\r\nwill return:\r\n\r\n {\r\n \"subject\": \"\",\r\n \"minuteTaker\": \"\",\r\n \"attendees\": \"\",\r\n \"cc[]\": []\r\n }","tagline":"Encode a set of form elements as a JSON object for manipulation/submission. Similar to $.serialize, JSON-ized.","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file diff --git a/serializeObject.jquery.json b/serializeObject.jquery.json deleted file mode 100644 index bbc4022..0000000 --- a/serializeObject.jquery.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "serializeObject", - "version": "2.0.3", - "title": "jQuery serializeObject", - "author": { - "name": "David G. Hong", - "email": "davidhong.code@gmail.com", - "url": "https://github.com/hongymagic" - }, - "licenses": [ - { - "type": "MIT", - "url": "MIT-LICENSE.txt" - } - ], - "dependencies": { - "jquery": ">=1.4" - }, - "description": "Convert your form data to into JSON (JavaScript Object Notation) format, so you can manipulate them easily. See Github project page for information.", - "tags": [ - "form", - "JSON", - "serializeObject", - "serialize", - "serialise" - ], - "homepage": "https://github.com/hongymagic/jQuery.serializeObject", - "bugs": "https://github.com/hongymagic/jQuery.serializeObject/issues", - "maintainers": [ - { - "name": "David G. Hong", - "url": "https://github.com/hongymagic" - } - ] -} \ No newline at end of file diff --git a/stylesheets/pygment_trac.css b/stylesheets/pygment_trac.css new file mode 100644 index 0000000..1926cfd --- /dev/null +++ b/stylesheets/pygment_trac.css @@ -0,0 +1,60 @@ +.highlight .hll { background-color: #49483e } +.highlight { background: #3A3C42; color: #f8f8f2 } +.highlight .c { color: #75715e } /* Comment */ +.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ +.highlight .k { color: #66d9ef } /* Keyword */ +.highlight .l { color: #ae81ff } /* Literal */ +.highlight .n { color: #f8f8f2 } /* Name */ +.highlight .o { color: #f92672 } /* Operator */ +.highlight .p { color: #f8f8f2 } /* Punctuation */ +.highlight .cm { color: #75715e } /* Comment.Multiline */ +.highlight .cp { color: #75715e } /* Comment.Preproc */ +.highlight .c1 { color: #75715e } /* Comment.Single */ +.highlight .cs { color: #75715e } /* Comment.Special */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .kc { color: #66d9ef } /* Keyword.Constant */ +.highlight .kd { color: #66d9ef } /* Keyword.Declaration */ +.highlight .kn { color: #f92672 } /* Keyword.Namespace */ +.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ +.highlight .kr { color: #66d9ef } /* Keyword.Reserved */ +.highlight .kt { color: #66d9ef } /* Keyword.Type */ +.highlight .ld { color: #e6db74 } /* Literal.Date */ +.highlight .m { color: #ae81ff } /* Literal.Number */ +.highlight .s { color: #e6db74 } /* Literal.String */ +.highlight .na { color: #a6e22e } /* Name.Attribute */ +.highlight .nb { color: #f8f8f2 } /* Name.Builtin */ +.highlight .nc { color: #a6e22e } /* Name.Class */ +.highlight .no { color: #66d9ef } /* Name.Constant */ +.highlight .nd { color: #a6e22e } /* Name.Decorator */ +.highlight .ni { color: #f8f8f2 } /* Name.Entity */ +.highlight .ne { color: #a6e22e } /* Name.Exception */ +.highlight .nf { color: #a6e22e } /* Name.Function */ +.highlight .nl { color: #f8f8f2 } /* Name.Label */ +.highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +.highlight .nx { color: #a6e22e } /* Name.Other */ +.highlight .py { color: #f8f8f2 } /* Name.Property */ +.highlight .nt { color: #f92672 } /* Name.Tag */ +.highlight .nv { color: #f8f8f2 } /* Name.Variable */ +.highlight .ow { color: #f92672 } /* Operator.Word */ +.highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +.highlight .mf { color: #ae81ff } /* Literal.Number.Float */ +.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ +.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ +.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ +.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ +.highlight .sc { color: #e6db74 } /* Literal.String.Char */ +.highlight .sd { color: #e6db74 } /* Literal.String.Doc */ +.highlight .s2 { color: #e6db74 } /* Literal.String.Double */ +.highlight .se { color: #ae81ff } /* Literal.String.Escape */ +.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ +.highlight .si { color: #e6db74 } /* Literal.String.Interpol */ +.highlight .sx { color: #e6db74 } /* Literal.String.Other */ +.highlight .sr { color: #e6db74 } /* Literal.String.Regex */ +.highlight .s1 { color: #e6db74 } /* Literal.String.Single */ +.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ +.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ +.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ +.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/stylesheets/styles.css b/stylesheets/styles.css new file mode 100644 index 0000000..1d14024 --- /dev/null +++ b/stylesheets/styles.css @@ -0,0 +1,363 @@ +@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700); +html { + background: #6C7989; + background: #6c7989 -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6c7989), color-stop(100%, #434b55)) fixed; + background: #6c7989 -webkit-linear-gradient(#6c7989, #434b55) fixed; + background: #6c7989 -moz-linear-gradient(#6c7989, #434b55) fixed; + background: #6c7989 -o-linear-gradient(#6c7989, #434b55) fixed; + background: #6c7989 -ms-linear-gradient(#6c7989, #434b55) fixed; + background: #6c7989 linear-gradient(#6c7989, #434b55) fixed; +} + +body { + padding: 50px 0; + margin: 0; + font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #555; + font-weight: 300; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAeCAYAAABNChwpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy82LzEygrTcTAAAAFRJREFUSIljfPDggZRf5RIGGNjUHsNATz6jXmSL1Kb2GLiAX+USBnrymRgGGDCORgFmoNAXjEbBaBSMRsFoFIxGwWgUjEbBaBSMRsFoFIxGwWgUAABYNujumib3wAAAAABJRU5ErkJggg==') fixed; +} + +.wrapper { + width: 640px; + margin: 0 auto; + background: #DEDEDE; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -o-border-radius: 8px; + -ms-border-radius: 8px; + -khtml-border-radius: 8px; + border-radius: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; + -o-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; + box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; +} + +header, section, footer { + display: block; +} + +a { + color: #069; + text-decoration: none; +} + +p { + margin: 0 0 20px; + padding: 0; +} + +strong { + color: #222; + font-weight: 700; +} + +header { + -moz-border-radius: 8px 8px 0 0; + -webkit-border-radius: 8px 8px 0 0; + -o-border-radius: 8px 8px 0 0; + -ms-border-radius: 8px 8px 0 0; + -khtml-border-radius: 8px 8px 0 0; + border-radius: 8px 8px 0 0; + background: #C6EAFA; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ddfbfc), color-stop(100%, #c6eafa)); + background: -webkit-linear-gradient(#ddfbfc, #c6eafa); + background: -moz-linear-gradient(#ddfbfc, #c6eafa); + background: -o-linear-gradient(#ddfbfc, #c6eafa); + background: -ms-linear-gradient(#ddfbfc, #c6eafa); + background: linear-gradient(#ddfbfc, #c6eafa); + position: relative; + padding: 15px 20px; + border-bottom: 1px solid #B2D2E1; +} +header h1 { + margin: 0; + padding: 0; + font-size: 24px; + line-height: 1.2; + color: #069; + text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0; +} +header.without-description h1 { + margin: 10px 0; +} +header p { + margin: 0; + color: #61778B; + width: 300px; + font-size: 13px; +} +header p.view { + display: none; + font-weight: 700; + text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0; + -webkit-font-smoothing: antialiased; +} +header p.view a { + color: #06c; +} +header p.view small { + font-weight: 400; +} +header ul { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + z-index: 1; + right: 20px; + top: 20px; + height: 38px; + padding: 1px 0; + background: #5198DF; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #77b9fb), color-stop(100%, #3782cd)); + background: -webkit-linear-gradient(#77b9fb, #3782cd); + background: -moz-linear-gradient(#77b9fb, #3782cd); + background: -o-linear-gradient(#77b9fb, #3782cd); + background: -ms-linear-gradient(#77b9fb, #3782cd); + background: linear-gradient(#77b9fb, #3782cd); + border-radius: 5px; + -moz-box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; + -webkit-box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; + -o-box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; + box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; + width: 240px; +} +header ul:before { + content: ''; + position: absolute; + z-index: -1; + left: -5px; + top: -4px; + right: -5px; + bottom: -6px; + background: rgba(0, 0, 0, 0.1); + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -o-border-radius: 8px; + -ms-border-radius: 8px; + -khtml-border-radius: 8px; + border-radius: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; + -o-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; + box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; +} +header ul li { + width: 79px; + float: left; + border-right: 1px solid #3A7CBE; + height: 38px; +} +header ul li + li { + width: 78px; + border-left: 1px solid #8BBEF3; +} +header ul li + li + li { + border-right: none; + width: 79px; +} +header ul a { + line-height: 1; + font-size: 11px; + color: #fff; + color: rgba(255, 255, 255, 0.8); + display: block; + text-align: center; + font-weight: 400; + padding-top: 6px; + height: 40px; + text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0; +} +header ul a strong { + font-size: 14px; + display: block; + color: #fff; + -webkit-font-smoothing: antialiased; +} + +section { + padding: 15px 20px; + font-size: 15px; + border-top: 1px solid #fff; + background: -webkit-gradient(linear, 50% 0%, 50% 700, color-stop(0%, #fafafa), color-stop(100%, #dedede)); + background: -webkit-linear-gradient(#fafafa, #dedede 700px); + background: -moz-linear-gradient(#fafafa, #dedede 700px); + background: -o-linear-gradient(#fafafa, #dedede 700px); + background: -ms-linear-gradient(#fafafa, #dedede 700px); + background: linear-gradient(#fafafa, #dedede 700px); + -moz-border-radius: 0 0 8px 8px; + -webkit-border-radius: 0 0 8px 8px; + -o-border-radius: 0 0 8px 8px; + -ms-border-radius: 0 0 8px 8px; + -khtml-border-radius: 0 0 8px 8px; + border-radius: 0 0 8px 8px; + position: relative; +} + +h1, h2, h3, h4, h5, h6 { + color: #222; + padding: 0; + margin: 0 0 20px; + line-height: 1.2; +} + +p, ul, ol, table, pre, dl { + margin: 0 0 20px; +} + +h1, h2, h3 { + line-height: 1.1; +} + +h1 { + font-size: 28px; +} + +h2 { + color: #393939; +} + +h3, h4, h5, h6 { + color: #494949; +} + +blockquote { + margin: 0 -20px 20px; + padding: 15px 20px 1px 40px; + font-style: italic; + background: #ccc; + background: rgba(0, 0, 0, 0.06); + color: #222; +} + +img { + max-width:100%; +} + +code, pre { + font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + color: #333; + font-size: 12px; +} + +pre { + padding: 20px; + background: #3A3C42; + color: #f8f8f2; + margin: 0 -20px 20px; + overflow-x:auto; +} +pre code { + color: #f8f8f2; +} +li pre { + margin-left: -60px; + padding-left: 60px; +} + +table { + width: 100%; + border-collapse: collapse; +} + +th, td { + text-align: left; + padding: 5px 10px; + border-bottom: 1px solid #aaa; +} + +dt { + color: #222; + font-weight: 700; +} + +th { + color: #222; +} + +small { + font-size: 11px; +} + +hr { + border: 0; + background: #aaa; + height: 1px; + margin: 0 0 20px; +} + +footer { + width: 640px; + margin: 0 auto; + padding: 20px 0 0; + color: #ccc; + overflow: hidden; +} +footer a { + color: #fff; + font-weight: bold; +} +footer p { + float: left; +} +footer p + p { + float: right; +} + +@media print, screen and (max-width: 740px) { + body { + padding: 0; + } + + .wrapper { + -moz-border-radius: 0; + -webkit-border-radius: 0; + -o-border-radius: 0; + -ms-border-radius: 0; + -khtml-border-radius: 0; + border-radius: 0; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; + width: 100%; + } + + footer { + -moz-border-radius: 0; + -webkit-border-radius: 0; + -o-border-radius: 0; + -ms-border-radius: 0; + -khtml-border-radius: 0; + border-radius: 0; + padding: 20px; + width: auto; + } + footer p { + float: none; + margin: 0; + } + footer p + p { + float: none; + } +} +@media print, screen and (max-width:580px) { + header ul { + display: none; + } + + header p.view { + display: block; + } + + header p { + width: 100%; + } +} +@media print { + header p.view a small:before { + content: 'at http://github.com/'; + } +} diff --git a/test/serialization-test.js b/test/serialization-test.js deleted file mode 100644 index 8f43b66..0000000 --- a/test/serialization-test.js +++ /dev/null @@ -1,32 +0,0 @@ - -module('serialization test'); - -test('simple form test', function () { - var form = $('form#simple-form'); - var data = form.serializeObject(); - var expected = { - name: 'John Apple', - age: '21', - email: 'john.apple@apple.com', - password: '', - 'legal-age': 'yes' - }; - - deepEqual(data, expected, 'Key/value pairs should be identical'); -}); - -test('multi value inputs', function () { - var form = $('form#multi-value-form'); - var data = form.serializeObject(); - var expected = { - food: ['Banana', 'Melon'], - drink: [ - 'Water', - 'Milk', - 'Beer', - 'Cocktail' - ] - }; - - deepEqual(data, expected, 'Multiple values should be an array'); -}); diff --git a/test/tests.html b/test/tests.html deleted file mode 100644 index efc21ff..0000000 --- a/test/tests.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - $.serializeObject tests - - - - - - - - - - -

QUnit Test Suite - Step Addon

-

-
-

-
    - -
    -
    - - - - - - - -
    - -
    - - - - - - - - - -
    -
    - -