-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add slightly modified original examples of bootstrap to match rtl the…
…me, licensed under CC-3.0 (LICENSE).
- Loading branch information
Showing
61 changed files
with
14,022 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
51 changes: 51 additions & 0 deletions
51
examples/originals/assets/js/ie-emulation-modes-warning.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT | ||
// IT'S JUST JUNK FOR OUR DOCS! | ||
// ++++++++++++++++++++++++++++++++++++++++++ | ||
/*! | ||
* Copyright 2014 Twitter, Inc. | ||
* | ||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For | ||
* details, see http://creativecommons.org/licenses/by/3.0/. | ||
*/ | ||
// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes. | ||
(function () { | ||
'use strict'; | ||
|
||
function emulatedIEMajorVersion() { | ||
var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent) | ||
if (groups === null) { | ||
return null | ||
} | ||
var ieVersionNum = parseInt(groups[1], 10) | ||
var ieMajorVersion = Math.floor(ieVersionNum) | ||
return ieMajorVersion | ||
} | ||
|
||
function actualNonEmulatedIEMajorVersion() { | ||
// Detects the actual version of IE in use, even if it's in an older-IE emulation mode. | ||
// IE JavaScript conditional compilation docs: http://msdn.microsoft.com/en-us/library/ie/121hztk3(v=vs.94).aspx | ||
// @cc_on docs: http://msdn.microsoft.com/en-us/library/ie/8ka90k2e(v=vs.94).aspx | ||
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line | ||
if (jscriptVersion === undefined) { | ||
return 11 // IE11+ not in emulation mode | ||
} | ||
if (jscriptVersion < 9) { | ||
return 8 // IE8 (or lower; haven't tested on IE<8) | ||
} | ||
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode | ||
} | ||
|
||
var ua = window.navigator.userAgent | ||
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) { | ||
return // Opera, which might pretend to be IE | ||
} | ||
var emulated = emulatedIEMajorVersion() | ||
if (emulated === null) { | ||
return // Not IE | ||
} | ||
var nonEmulated = actualNonEmulatedIEMajorVersion() | ||
|
||
if (emulated !== nonEmulated) { | ||
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!') | ||
} | ||
})(); |
22 changes: 22 additions & 0 deletions
22
examples/originals/assets/js/ie10-viewport-bug-workaround.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*! | ||
* IE10 viewport hack for Surface/desktop Windows 8 bug | ||
* Copyright 2014 Twitter, Inc. | ||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For | ||
* details, see http://creativecommons.org/licenses/by/3.0/. | ||
*/ | ||
|
||
// See the Getting Started docs for more information: | ||
// http://getbootstrap.com/getting-started/#support-ie10-width | ||
|
||
(function () { | ||
'use strict'; | ||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | ||
var msViewportStyle = document.createElement('style') | ||
msViewportStyle.appendChild( | ||
document.createTextNode( | ||
'@-ms-viewport{width:auto!important}' | ||
) | ||
) | ||
document.querySelector('head').appendChild(msViewportStyle) | ||
} | ||
})(); |
13 changes: 13 additions & 0 deletions
13
examples/originals/assets/js/ie8-responsive-file-warning.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT | ||
// IT'S JUST JUNK FOR OUR DOCS! | ||
// ++++++++++++++++++++++++++++++++++++++++++ | ||
/*! | ||
* Copyright 2011-2014 Twitter, Inc. | ||
* | ||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For | ||
* details, see http://creativecommons.org/licenses/by/3.0/. | ||
*/ | ||
// Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. | ||
if (window.location.protocol == 'file:') { | ||
window.alert('ERROR: Bootstrap\'s responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.') | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.