Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into 1.11.x
commit
cd328a38e1
@ -1,5 +1,65 @@ |
||||
# jQuery Dist |
||||
# jQuery |
||||
|
||||
This repo only contains package distribution files for jQuery Core. |
||||
> jQuery is a fast, small, and feature-rich JavaScript library. |
||||
|
||||
For source files and issues, visit the [jQuery repo](https://github.com/jquery/jquery). |
||||
For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/). |
||||
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery). |
||||
|
||||
## Including jQuery |
||||
|
||||
Below are some of the most common ways to include jQuery. |
||||
|
||||
### Browser |
||||
|
||||
#### Script tag |
||||
|
||||
```html |
||||
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script> |
||||
``` |
||||
|
||||
#### Babel |
||||
|
||||
[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. |
||||
|
||||
```js |
||||
import $ from "jquery"; |
||||
``` |
||||
|
||||
#### Browserify/Webpack |
||||
|
||||
There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this... |
||||
|
||||
```js |
||||
var $ = require("jquery"); |
||||
``` |
||||
|
||||
#### AMD (Asynchronous Module Definition) |
||||
|
||||
AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html). |
||||
|
||||
```js |
||||
define(["jquery"], function($) { |
||||
|
||||
}); |
||||
``` |
||||
|
||||
### Node |
||||
|
||||
To include jQuery in [Node](nodejs.org), first install with npm. |
||||
|
||||
```sh |
||||
npm install jquery |
||||
``` |
||||
|
||||
For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes. |
||||
|
||||
```js |
||||
require("jsdom").env("", function(err, window) { |
||||
if (err) { |
||||
console.error(err); |
||||
return; |
||||
} |
||||
|
||||
var $ = require("jquery")(window); |
||||
}); |
||||
``` |
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,36 @@ |
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/ |
||||
|
||||
This software consists of voluntary contributions made by many |
||||
individuals. For exact contribution history, see the revision history |
||||
available at https://github.com/jquery/sizzle |
||||
|
||||
The following license applies to all parts of this software except as |
||||
documented below: |
||||
|
||||
==== |
||||
|
||||
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. |
||||
|
||||
==== |
||||
|
||||
All files located in the node_modules and external directories are |
||||
externally maintained libraries used by this software which have their |
||||
own licenses; we recommend you read them, as their terms may differ from |
||||
the terms above. |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,18 +0,0 @@ |
||||
define( [ |
||||
"../var/document", |
||||
"../var/support" |
||||
], function( document, support ) { |
||||
|
||||
// Support: Safari 8+
|
||||
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
||||
// collapse sibling forms: the second one becomes a child of the first one.
|
||||
// Because of that, this security measure has to be disabled in Safari 8.
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=137337
|
||||
support.createHTMLDocument = ( function() { |
||||
var body = document.implementation.createHTMLDocument( "" ).body; |
||||
body.innerHTML = "<form></form><form></form>"; |
||||
return body.childNodes.length === 2; |
||||
} )(); |
||||
|
||||
return support; |
||||
} ); |
@ -1,20 +0,0 @@ |
||||
define([ |
||||
"../core" |
||||
], function( jQuery ) { |
||||
|
||||
/** |
||||
* Determines whether an object can have data |
||||
*/ |
||||
jQuery.acceptData = function( owner ) { |
||||
// Accepts only:
|
||||
// - Node
|
||||
// - Node.ELEMENT_NODE
|
||||
// - Node.DOCUMENT_NODE
|
||||
// - Object
|
||||
// - Any
|
||||
/* jshint -W018 */ |
||||
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); |
||||
}; |
||||
|
||||
return jQuery.acceptData; |
||||
}); |
@ -1,23 +0,0 @@ |
||||
define( [ |
||||
"../var/document", |
||||
"../var/support" |
||||
], function( document, support ) { |
||||
|
||||
( function() { |
||||
var div = document.createElement( "div" ); |
||||
|
||||
// Support: IE<9
|
||||
support.deleteExpando = true; |
||||
try { |
||||
delete div.test; |
||||
} catch ( e ) { |
||||
support.deleteExpando = false; |
||||
} |
||||
|
||||
// Null elements to avoid leaks in IE.
|
||||
div = null; |
||||
} )(); |
||||
|
||||
return support; |
||||
|
||||
} ); |
@ -1,58 +0,0 @@ |
||||
define( [ |
||||
"../var/support", |
||||
"../var/document" |
||||
], function( support, document ) { |
||||
|
||||
( function() { |
||||
var shrinkWrapBlocksVal; |
||||
|
||||
support.shrinkWrapBlocks = function() { |
||||
if ( shrinkWrapBlocksVal != null ) { |
||||
return shrinkWrapBlocksVal; |
||||
} |
||||
|
||||
// Will be changed later if needed.
|
||||
shrinkWrapBlocksVal = false; |
||||
|
||||
// Minified: var b,c,d
|
||||
var div, body, container; |
||||
|
||||
body = document.getElementsByTagName( "body" )[ 0 ]; |
||||
if ( !body || !body.style ) { |
||||
|
||||
// Test fired too early or in an unsupported environment, exit.
|
||||
return; |
||||
} |
||||
|
||||
// Setup
|
||||
div = document.createElement( "div" ); |
||||
container = document.createElement( "div" ); |
||||
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; |
||||
body.appendChild( container ).appendChild( div ); |
||||
|
||||
// Support: IE6
|
||||
// Check if elements with layout shrink-wrap their children
|
||||
if ( typeof div.style.zoom !== "undefined" ) { |
||||
|
||||
// Reset CSS: box-sizing; display; margin; border
|
||||
div.style.cssText = |
||||
|
||||
// Support: Firefox<29, Android 2.3
|
||||
// Vendor-prefix box-sizing
|
||||
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + |
||||
"box-sizing:content-box;display:block;margin:0;border:0;" + |
||||
"padding:1px;width:1px;zoom:1"; |
||||
div.appendChild( document.createElement( "div" ) ).style.width = "5px"; |
||||
shrinkWrapBlocksVal = div.offsetWidth !== 3; |
||||
} |
||||
|
||||
body.removeChild( container ); |
||||
|
||||
return shrinkWrapBlocksVal; |
||||
}; |
||||
|
||||
} )(); |
||||
|
||||
return support; |
||||
|
||||
} ); |
@ -1,20 +0,0 @@ |
||||
define( [ |
||||
"./var/nodeNames" |
||||
], function( nodeNames ) { |
||||
|
||||
function createSafeFragment( document ) { |
||||
var list = nodeNames.split( "|" ), |
||||
safeFrag = document.createDocumentFragment(); |
||||
|
||||
if ( safeFrag.createElement ) { |
||||
while ( list.length ) { |
||||
safeFrag.createElement( |
||||
list.pop() |
||||
); |
||||
} |
||||
} |
||||
return safeFrag; |
||||
} |
||||
|
||||
return createSafeFragment; |
||||
} ); |
@ -1,5 +0,0 @@ |
||||
define( function() { |
||||
return "abbr|article|aside|audio|bdi|canvas|data|datalist|" + |
||||
"details|dialog|figcaption|figure|footer|header|hgroup|main|" + |
||||
"mark|meter|nav|output|picture|progress|section|summary|template|time|video"; |
||||
} ); |
@ -1,3 +0,0 @@ |
||||
define( function() { |
||||
return ( /^\s+/ ); |
||||
} ); |
@ -1,63 +0,0 @@ |
||||
define( [ |
||||
"./core", |
||||
"./var/support", |
||||
"./var/document", |
||||
"./core/init", // Needed for hasOwn support test
|
||||
// This is listed as a dependency for build order, but it's still optional in builds
|
||||
"./core/ready" |
||||
], function( jQuery, support, document ) { |
||||
|
||||
// Support: IE<9
|
||||
// Iteration over object's inherited properties before its own
|
||||
var i; |
||||
for ( i in jQuery( support ) ) { |
||||
break; |
||||
} |
||||
support.ownFirst = i === "0"; |
||||
|
||||
// Note: most support tests are defined in their respective modules.
|
||||
// false until the test is run
|
||||
support.inlineBlockNeedsLayout = false; |
||||
|
||||
// Execute ASAP in case we need to set body.style.zoom
|
||||
jQuery( function() { |
||||
|
||||
// Minified: var a,b,c,d
|
||||
var val, div, body, container; |
||||
|
||||
body = document.getElementsByTagName( "body" )[ 0 ]; |
||||
if ( !body || !body.style ) { |
||||
|
||||
// Return for frameset docs that don't have a body
|
||||
return; |
||||
} |
||||
|
||||
// Setup
|
||||
div = document.createElement( "div" ); |
||||
container = document.createElement( "div" ); |
||||
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; |
||||
body.appendChild( container ).appendChild( div ); |
||||
|
||||
if ( typeof div.style.zoom !== "undefined" ) { |
||||
|
||||
// Support: IE<8
|
||||
// Check if natively block-level elements act like inline-block
|
||||
// elements when setting their display to 'inline' and giving
|
||||
// them layout
|
||||
div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; |
||||
|
||||
support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; |
||||
if ( val ) { |
||||
|
||||
// Prevent IE 6 from affecting layout for positioned elements #11048
|
||||
// Prevent IE from shrinking the body in IE 7 mode #12869
|
||||
// Support: IE<8
|
||||
body.style.zoom = 1; |
||||
} |
||||
} |
||||
|
||||
body.removeChild( container ); |
||||
} ); |
||||
|
||||
return support; |
||||
} ); |
@ -1,3 +0,0 @@ |
||||
define( function() { |
||||
return []; |
||||
} ); |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,134 +0,0 @@ |
||||
{% raw %} |
||||
<script LANGUAGE="JavaScript"> |
||||
var nav =""; |
||||
var screen_size_w; |
||||
var screen_size_h; |
||||
var java=""; |
||||
var type_mimetypes=""; |
||||
var suffixes_mimetypes=""; |
||||
var list_plugins=""; |
||||
var check_some_activex=""; |
||||
var check_some_plugins=""; |
||||
var java_sun_ver=""; |
||||
|
||||
<!-- check Microsoft Internet Explorer --> |
||||
if (navigator.userAgent.indexOf("MSIE") != -1) { var nav="ie";} |
||||
|
||||
<!-- check Screen Size --> |
||||
screen_size_w=screen.width; |
||||
screen_size_h=screen.height; |
||||
|
||||
<!-- list mimetypes types, suffixes and plugins (no for IE) --> |
||||
if (nav!="ie"){ |
||||
|
||||
if (navigator.mimeTypes && navigator.mimeTypes.length > 0) { |
||||
|
||||
for (i=0; i < navigator.mimeTypes.length; i++) { |
||||
type_mimetypes=type_mimetypes+" "+navigator.mimeTypes[i].type; |
||||
suffixes_mimetypes=suffixes_mimetypes+" "+navigator.mimeTypes[i].suffixes; |
||||
if (navigator.mimeTypes[i].enabledPlugin!=null) { |
||||
list_plugins=list_plugins+" "+navigator.mimeTypes[i].enabledPlugin.name; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
<!-- check some activex for IE --> |
||||
if (nav=="ie"){ |
||||
//TODO:check wmediaplayer are too aggressive. Then we can assume that if there Windows, there Wmediaplayer? |
||||
|
||||
var check_some_activex = |
||||
DetectActiveXObject("ShockwaveFlash.ShockwaveFlash.1", "flash_yes")+ |
||||
DetectActiveXObject("QuickTime.QTElementBehavior", "quicktime_yes")+ |
||||
//DetectActiveXObject("MediaPlayer.MediaPlayer.1","wmediaplayer_yes")+ |
||||
DetectActiveXObject("acroPDF.PDF.1","acrobatreader_yes"); |
||||
|
||||
function DetectActiveXObject(ObjectName, name) { |
||||
result = false; |
||||
document.write('<SCRIPT LANGUAGE=VBScript\> \n'); |
||||
document.write('on error resume next \n'); |
||||
document.write('result = IsObject(CreateObject("' + ObjectName + '")) \n'); |
||||
document.write('</SCRIPT\> \n'); |
||||
if (result) return name+' , '; else return ''; |
||||
} |
||||
} |
||||
<!-- check some plugins for not IE --> |
||||
if (nav!="ie"){ |
||||
|
||||
if (list_plugins.indexOf("Shockwave Flash")!=-1){ |
||||
check_some_plugins=check_some_plugins+', flash_yes'; |
||||
} |
||||
if (list_plugins.indexOf("QuickTime")!=-1){ |
||||
check_some_plugins=check_some_plugins+', quicktime_yes'; |
||||
} |
||||
if (list_plugins.indexOf("Windows Media Player")!=-1){ |
||||
check_some_plugins=check_some_plugins+', wmediaplayer_yes'; |
||||
} |
||||
if (list_plugins.indexOf("Adobe Acrobat")!=-1){ |
||||
check_some_plugins=check_some_plugins+',acrobatreader_yes'; |
||||
} |
||||
} |
||||
<!-- java --> |
||||
if(navigator.javaEnabled()==true){java="java_yes";}else{java="java_no";} |
||||
|
||||
<!-- check java Sun ver --> |
||||
//for not IE |
||||
if (nav!="ie"){ |
||||
if (navigator.mimeTypes["application/x-java-applet"]){ java_sun_ver="javasun_yes";} |
||||
if (navigator.mimeTypes["application/x-java-applet;jpi-version=1.6.0_24"]){ java_sun_ver=java_sun_ver+" , javasun_ver_1.6_24_yes"; }//This java version 1.6.0_24 is problematic, the user should be updated |
||||
|
||||
} |
||||
//for IE |
||||
if (nav=="ie"){ |
||||
//1.5->end nov 2009 |
||||
//TODO:extract minor version |
||||
var java_sun_ver = |
||||
DetectActiveXObject("JavaWebStart.isInstalled","javasun_yes")+ |
||||
DetectActiveXObject("JavaWebStart.isInstalled.1.4.2.0","javasun_ver_1.4_yes")+ |
||||
DetectActiveXObject("JavaWebStart.isInstalled.1.5.0.0","javasun_ver_1.5_yes")+ |
||||
DetectActiveXObject("JavaWebStart.isInstalled.1.6.0.0","javasun_ver_1.6_yes")+ |
||||
DetectActiveXObject("JavaWebStart.isInstalled.1.7.0.0","javasun_ver_1.7_yes"); |
||||
|
||||
function DetectActiveXObject(ObjectName, name) { |
||||
result = false; |
||||
document.write('<SCRIPT LANGUAGE=VBScript\> \n'); |
||||
document.write('on error resume next \n'); |
||||
document.write('result = IsObject(CreateObject("' + ObjectName + '")) \n'); |
||||
document.write('</SCRIPT\> \n'); |
||||
if (result) return name+' , '; else return ''; |
||||
} |
||||
} |
||||
|
||||
<!-- Send to server --> |
||||
function sendSniff(){ |
||||
document.forms.sniff_nav_form.sniff_navigator.value="checked"; |
||||
document.forms.sniff_nav_form.sniff_navigator_screen_size_w.value=screen_size_w; |
||||
document.forms.sniff_nav_form.sniff_navigator_screen_size_h.value=screen_size_h; |
||||
document.forms.sniff_nav_form.sniff_navigator_type_mimetypes.value=type_mimetypes; |
||||
document.forms.sniff_nav_form.sniff_navigator_suffixes_mimetypes.value=suffixes_mimetypes; |
||||
document.forms.sniff_nav_form.sniff_navigator_list_plugins.value=list_plugins; |
||||
document.forms.sniff_nav_form.sniff_navigator_check_some_activex.value=check_some_activex; |
||||
document.forms.sniff_nav_form.sniff_navigator_check_some_plugins.value=check_some_plugins; |
||||
document.forms.sniff_nav_form.sniff_navigator_java.value=java; |
||||
document.forms.sniff_nav_form.sniff_navigator_java_sun_ver.value=java_sun_ver; |
||||
document.sniff_nav_form.submit(); |
||||
} |
||||
</script> |
||||
{% endraw %} |
||||
|
||||
<form name="sniff_nav_form" method="POST"> |
||||
<input type="hidden" name="sniff_navigator"> |
||||
<input type="hidden" name="sniff_navigator_screen_size_w"> |
||||
<input type="hidden" name="sniff_navigator_screen_size_h"> |
||||
<input type="hidden" name="sniff_navigator_type_mimetypes"> |
||||
<input type="hidden" name="sniff_navigator_suffixes_mimetypes"> |
||||
<input type="hidden" name="sniff_navigator_list_plugins"> |
||||
<input type="hidden" name="sniff_navigator_check_some_activex"> |
||||
<input type="hidden" name="sniff_navigator_check_some_plugins"> |
||||
<input type="hidden" name="sniff_navigator_java"> |
||||
<input type="hidden" name="sniff_navigator_java_sun_ver"> |
||||
</form> |
||||
{# |
||||
<script> |
||||
sendSniff(); |
||||
</script> |
||||
#} |
Loading…
Reference in new issue