diff --git a/Makefile b/Makefile index 00b89ea2..438ae577 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ build: @node docs/build @cp img/* docs/assets/img/ @cp js/*.js docs/assets/js/ - @cp -r fonts docs/assets/ + @cp -r font docs/assets/ @cp js/tests/vendor/jquery.js docs/assets/js/ @echo "Compiling documentation... ${CHECK} Done" @cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-inputmask.js js/bootstrap-rowlink.js js/bootstrap-fileupload.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js @@ -69,9 +69,9 @@ bootstrap: mkdir -p bootstrap/img mkdir -p bootstrap/css mkdir -p bootstrap/js - mkdir -p bootstrap/fonts + mkdir -p bootstrap/font cp img/* bootstrap/img/ - cp fonts/* bootstrap/fonts/ + cp font/* bootstrap/font/ recess --compile ${BOOTSTRAP_LESS} ${JASNY_BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css recess --compress ${BOOTSTRAP_LESS} ${JASNY_BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} ${JASNY_BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css @@ -90,9 +90,9 @@ bootstrap: jasny-bootstrap: mkdir -p jasny-bootstrap/css mkdir -p jasny-bootstrap/js - mkdir -p jasny-bootstrap/fonts + mkdir -p jasny-bootstrap/font cp js/bootstrap-inputmask.js js/bootstrap-rowlink.js js/bootstrap-fileupload.js jasny-bootstrap/js - cp fonts/* jasny-bootstrap/fonts/ + cp font/* jasny-bootstrap/font/ recess --compile ${JASNY_BOOTSTRAP_LESS} > jasny-bootstrap/css/jasny-bootstrap.css recess --compress ${JASNY_BOOTSTRAP_LESS} > jasny-bootstrap/css/jasny-bootstrap.min.css recess --compile ${JASNY_BOOTSTRAP_RESPONSIVE_LESS} > jasny-bootstrap/css/jasny-bootstrap-responsive.css diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index 42d817bc..5ff62d31 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -1087,7 +1087,7 @@ } } /*! - * Jasny Bootstrap Responsive Extensions j2 + * Jasny Bootstrap Responsive Extensions j3 * * Copyright 2012 Jasny BV * Licensed under the Apache License v2.0 diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index d9f2cf6d..7141b5f5 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -7341,7 +7341,3 @@ body > .container.tabs-right.tabbable-bodered > .tab-content { -moz-border-radius: 0 0 0 4px; border-radius: 0 0 0 4px; } - -.modal form { - margin-bottom: 0; -} diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index ae1a7540..bb3476e9 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -436,6 +436,18 @@ hr.soften { /* Download page -------------------------------------------------- */ +#customupload { + display: block; + margin-top: 20px; + width: 232px; + text-align: center; +} + +#no-customupload { + margin-top: 20px; + width: 206px; +} + .download .page-header { margin-top: 36px; } @@ -864,7 +876,7 @@ form.bs-docs-example { background-image: url(../img/glyphicons-halflings-white.png); opacity: 1; } -.bs-docs-sidenav.affix { +.bs-docs-sidebar > .affix { top: 40px; } .bs-docs-sidenav.affix-bottom { diff --git a/docs/assets/font/iconic_fill.eot b/docs/assets/font/iconic_fill.eot new file mode 100644 index 00000000..dc8aa7dc Binary files /dev/null and b/docs/assets/font/iconic_fill.eot differ diff --git a/docs/assets/font/iconic_fill.otf b/docs/assets/font/iconic_fill.otf new file mode 100644 index 00000000..52da7907 Binary files /dev/null and b/docs/assets/font/iconic_fill.otf differ diff --git a/docs/assets/font/iconic_fill.svg b/docs/assets/font/iconic_fill.svg new file mode 100644 index 00000000..f228fab1 --- /dev/null +++ b/docs/assets/font/iconic_fill.svg @@ -0,0 +1,475 @@ + + + + +Created by FontForge 20110222 at Thu Dec 29 18:55:15 2011 + By PJ Onori,,, +Icons by PJ Onori, font creation script by Yann + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/font/iconic_fill.ttf b/docs/assets/font/iconic_fill.ttf new file mode 100644 index 00000000..194a753c Binary files /dev/null and b/docs/assets/font/iconic_fill.ttf differ diff --git a/docs/assets/font/iconic_fill.woff b/docs/assets/font/iconic_fill.woff new file mode 100644 index 00000000..833f4632 Binary files /dev/null and b/docs/assets/font/iconic_fill.woff differ diff --git a/docs/assets/font/iconic_stroke.eot b/docs/assets/font/iconic_stroke.eot new file mode 100644 index 00000000..430ae76c Binary files /dev/null and b/docs/assets/font/iconic_stroke.eot differ diff --git a/docs/assets/font/iconic_stroke.otf b/docs/assets/font/iconic_stroke.otf new file mode 100644 index 00000000..9d611150 Binary files /dev/null and b/docs/assets/font/iconic_stroke.otf differ diff --git a/docs/assets/font/iconic_stroke.svg b/docs/assets/font/iconic_stroke.svg new file mode 100644 index 00000000..18e8c345 --- /dev/null +++ b/docs/assets/font/iconic_stroke.svg @@ -0,0 +1,492 @@ + + + + +Created by FontForge 20110222 at Thu Dec 29 18:54:06 2011 + By PJ Onori,,, +Icons by PJ Onori, font creation script by Yann + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/font/iconic_stroke.ttf b/docs/assets/font/iconic_stroke.ttf new file mode 100644 index 00000000..f0b1878c Binary files /dev/null and b/docs/assets/font/iconic_stroke.ttf differ diff --git a/docs/assets/font/iconic_stroke.woff b/docs/assets/font/iconic_stroke.woff new file mode 100644 index 00000000..b2649347 Binary files /dev/null and b/docs/assets/font/iconic_stroke.woff differ diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 20c0e457..2659ce7b 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -14,7 +14,7 @@ }) // side bar - $('.bs-docs-sidenav').affix({ + $('.bs-docs-sidebar > *').affix({ offset: { top: function () { return $window.width() <= 980 ? 290 : 210 } , bottom: 270 @@ -71,7 +71,38 @@ var inputsComponent = $("#components.download input") , inputsPlugin = $("#plugins.download input") , inputsVariables = $("#variables.download input") - + + // Upload custom.json (requires FileReader support) + if (typeof FileReader !== "undefined") { + $('#customupload > input[type=file]').on('change', function(e) { + var file = e.target.files !== undefined ? e.target.files[0] : (e.target.value ? { name: e.target.value.replace(/^.+\\/, '') } : null) + var reader = new FileReader() + + reader.onload = function(e) { + try { + var params = JSON.parse(e.target.result) + } catch(err) { + window.alert("The loaded file doesn't contain valid JSON: " + new String(err).replace(/^SyntaxError: /i, '')) + } + + inputsComponent.attr('checked', false) + $.each(params.css, function(key, value) { + $("#components.download input[value='" + value + "']").attr('checked', true) + }) + + inputsPlugin.attr('checked', false) + $.each(params.js, function(key, value) { + $("#plugins.download input[value='" + value + "']").attr('checked', true) + }) + } + + reader.readAsText(file) + }) + $('#customupload').show() + } else { + $('#no-customupload').show() + } + // toggle all plugin checkboxes $('#components.download .toggle-all').on('click', function (e) { e.preventDefault() @@ -119,22 +150,29 @@ .toArray() , vars = {} , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png'] - , fonts = [] + , font = [] , autoselect = { - 'jasny/modals.less': ['modals.less'] - , 'jasny/layouts-semifluid.responsive-1200px-min.less': ['jasny/layouts-semifluid.less', 'responsive-1200px-min.less'] - , 'jasny/forms.responsive-767px-max.less': ['jasny/forms.less', 'responsive-767px-max.less'] - , 'jasny/forms.responsive-768px-979px.less': ['jasny/forms.less', 'responsive-768px-979px.less'] - , 'jasny/forms.responsive-1200px-min.less': ['jasny/forms.less', 'responsive-1200px-min.less'] - , 'jasny/page-alert.responsive-767px-max.less': ['jasny/page-alert.less', 'responsive-767px-max.less'] - , 'jasny/page-alert.responsive-1200px-min.less': ['jasny/page-alert.less', 'responsive-1200px-min.less'] + 'layouts-semifluid.responsive-1200px-min.less': ['layouts-semifluid.less', 'responsive-1200px-min.less'] + , 'jasny-forms.responsive-767px-max.less': ['jasny-forms.less', 'responsive-767px-max.less'] + , 'jasny-forms.responsive-768px-979px.less': ['jasny-forms.less', 'responsive-768px-979px.less'] + , 'jasny-forms.responsive-1200px-min.less': ['jasny-forms.less', 'responsive-1200px-min.less'] + , 'page-alert.responsive-767px-max.less': ['page-alert.less', 'responsive-767px-max.less'] + , 'page-alert.responsive-1200px-min.less': ['page-alert.less', 'responsive-1200px-min.less'] + , 'tooltip.less': ['match:js', 'bootstrap-tooltip.js'] + , 'popovers.less': ['match:js', 'bootstrap-popovers.js'] + , 'modals.less': ['match:js', 'bootstrap-modals.js'] + , 'dropdowns.less': ['match:js', 'bootstrap-dropdowns.js'] + , 'accordion.less': ['match:js', 'bootstrap-accordion.js'] + , 'carousel.less': ['match:js', 'bootstrap-carousel.js'] + , 'rowlink.less': ['match:js', 'bootstrap-rowlink.js'] + , 'fileupload.less': ['match:js', 'bootstrap-fileupload.js'] } - if ($('#components.download input[value="jasny/iconic.less"]').is(':checked')) - fonts = ['iconic_fill.eot', 'iconic_fill.otf', 'iconic_fill.svg', 'iconic_fill.ttf', 'iconic_fill.woff', 'iconic_stroke.eot', 'iconic_stroke.otf', 'iconic_stroke.svg', 'iconic_stroke.ttf', 'iconic_stroke.woff'] + if ($('#components.download input[value="iconic.less"]').is(':checked')) + $.merge(font, ['iconic_fill.eot', 'iconic_fill.otf', 'iconic_fill.svg', 'iconic_fill.ttf', 'iconic_fill.woff', 'iconic_stroke.eot', 'iconic_stroke.otf', 'iconic_stroke.svg', 'iconic_stroke.ttf', 'iconic_stroke.woff']) $.map(autoselect, function(deps, file) { - if ($.map(deps, function (value) { return $('#components.download input[value="'+value+'"]').is(':checked') ? 1 : null }).length == deps.length) + if ($.map(deps, function (value) { return $('.download input[value="'+value+'"]').is(':checked') ? 1 : null }).length == deps.length) css.push(file) }) @@ -152,7 +190,7 @@ , css: css , vars: vars , img: img - , fonts: fonts + , font: font } }) }) diff --git a/docs/base-css.html b/docs/base-css.html index 06f719d2..9523acd1 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -1738,6 +1738,17 @@ For example, <code><section></code> should be wrapped as inlin

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

+

Upload button

+

It's possible to use a button to upload files, instead of showing the native browser element.

+
+ Upload a file +
+
+  <span class="btn btn-file">Upload a file<input type="file" /></span>
+
+

There is also an interactive file and image upload widgets available. View the Javascript docs for that.

+ +

Button sizes

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.

@@ -1943,17 +1954,6 @@ For example, <code><section></code> should be wrapped as inlin <img src="..." class="img-polaroid">

Heads up! .img-rounded and .img-circle do not work in IE7-8 due to lack of border-radius support.

- -
-
-

Upload button

-

It's possible to use a button to upload files, instead of showing the native browser element.

- Upload a file -

There is also an interactive file and image upload widgets available. View the Javascript docs for that.

-
-
- -
@@ -2442,7 +2442,7 @@ For example, <code><section></code> should be wrapped as inlin

How to use

For iconic icons you can use an <i> tag, just like regular for icons. To use, place the following code just about anywhere:

-<i class="iconic-search"></i>
+<i class="iconic-home"></i>
 

Styling

diff --git a/docs/customize.html b/docs/customize.html index fc7d84d8..f0c55bd8 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -86,12 +86,16 @@ ================================================== -->
- +
+ + + +
@@ -115,48 +119,40 @@ - +

Base CSS

- + - - + + - + - +

Components

- + - + -

JS Components

- - - - - - - -

Miscellaneous

+ @@ -168,7 +164,7 @@ - + * Please select these if you're using the Jasny extensions in a responsive design
diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index c514aa63..1b9fca44 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -1675,6 +1675,17 @@

{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}

+

{{_i}}Upload button{{/i}}

+

{{_i}}It's possible to use a button to upload files, instead of showing the native browser element.{{/i}}

+
+ Upload a file +
+
+  <span class="btn btn-file">Upload a file<input type="file" /></span>
+
+

{{_i}}There is also an interactive file and image upload widgets available. View the Javascript docs for that.{{/i}}

+ +

{{_i}}Button sizes{{/i}}

{{_i}}Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.{{/i}}

@@ -1880,17 +1891,6 @@ <img src="..." class="img-polaroid">

{{_i}}Heads up!{{/i}} {{_i}}.img-rounded and .img-circle do not work in IE7-8 due to lack of border-radius support.{{/i}}

- -
-
-

{{_i}}Upload button{{/i}}

-

{{_i}}It's possible to use a button to upload files, instead of showing the native browser element.{{/i}}

- Upload a file -

{{_i}}There is also an interactive file and image upload widgets available. View the Javascript docs for that.{{/i}}

-
-
- -
@@ -2379,7 +2379,7 @@

{{_i}}How to use{{/i}}

{{_i}}For iconic icons you can use an <i> tag, just like regular for icons. To use, place the following code just about anywhere:{{/i}}

-<i class="iconic-search"></i>
+<i class="iconic-home"></i>
 

{{_i}}Styling{{/i}}

diff --git a/docs/templates/pages/customize.mustache b/docs/templates/pages/customize.mustache index 4dea9c76..14cd279a 100644 --- a/docs/templates/pages/customize.mustache +++ b/docs/templates/pages/customize.mustache @@ -15,12 +15,16 @@ ================================================== -->
@@ -77,7 +81,7 @@

{{_i}}Miscellaneous{{/i}}

- +