diff options
| author | Jacob Thornton <[email protected]> | 2012-01-26 21:48:46 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-01-26 21:48:46 -0800 |
| commit | dc2deb9a1b1995bbabee91bfd579d9b466fe78f2 (patch) | |
| tree | 9606da7326fd0a1e2ba1727e7390a69555bd92c3 /docs/assets/js/application.js | |
| parent | e0e54d9c6cb39eae53e31117c38ceae0a08a6e0b (diff) | |
| download | bootstrap-dc2deb9a1b1995bbabee91bfd579d9b466fe78f2.tar.xz bootstrap-dc2deb9a1b1995bbabee91bfd579d9b466fe78f2.zip | |
moving structure around + more work on builder...
Diffstat (limited to 'docs/assets/js/application.js')
| -rw-r--r-- | docs/assets/js/application.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 2315cdaa8..8c86ff028 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -171,6 +171,7 @@ $(function () { var inputsComponent = $("#components.download input") , inputsPlugin = $("#plugins.download input") + , inputsVariables = $("#variables.download input") // toggle all plugin checkboxes $('#components.download .toggle-all').on('click', function (e) { @@ -183,6 +184,11 @@ $(function () { inputsPlugin.attr('checked', !inputsPlugin.is(':checked')) }) + $('#variables.download .toggle-all').on('click', function (e) { + e.preventDefault() + inputsVariables.val('') + }) + // request built javascript $('.download-btn').on('click', function () { @@ -193,11 +199,12 @@ $(function () { .map(function () { return this.value }) .toArray() , vars = {} + , img = ['glyphicons-halflings-sprite.png', 'glyphicons-halflings-sprite-white.png'] - $("#variables.download input") - .each(function () { - return vars[ $(this).prev().text() ] = $(this).val() - }) + $("#variables.download input") + .each(function () { + $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) + }) // , url: "http://bootstrap.herokuapp.com" $.ajax({ @@ -209,6 +216,7 @@ $(function () { , js: js , css: css , vars: vars + , img: img } }) }) |
