diff --git a/app/database/migrations/2014_04_17_145108_add_custom_fields.php b/app/database/migrations/2014_04_17_145108_add_custom_fields.php index 7e4c3b1958b2..ac88c4012b70 100644 --- a/app/database/migrations/2014_04_17_145108_add_custom_fields.php +++ b/app/database/migrations/2014_04_17_145108_add_custom_fields.php @@ -24,7 +24,6 @@ class AddCustomFields extends Migration { $table->string('custom_client_label2'); }); - Schema::table('clients', function($table) { $table->string('custom_value1'); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index ad88ad2696e2..8e6543f0f682 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -308,7 +308,13 @@ return array( 'pro_plan_product' => 'Pro Plan', 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', - 'pro_plan_success' => 'Thanks for joining! Once the invoice is paid your Pro Plan membership will begin.', + 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!

+ Next Steps

A payable invoice has been sent to the email + address associated with your account. To unlock all of the awesome + Pro features, please follow the instructions on the invoice to pay + for a year of Pro-level invoicing.

+ Can\'t find the invoice? Need further assistance? We\'re happy to help + -- email us at contact@invoiceninja.com', 'unsaved_changes' => 'You have unsaved changes', 'custom_fields' => 'Custom fields', @@ -318,4 +324,8 @@ return array( 'field_value' => 'Field Value', 'edit' => 'Edit', + + + + ); diff --git a/app/ninja/repositories/AccountRepository.php b/app/ninja/repositories/AccountRepository.php index 984f2264cb5f..67bf34d9debb 100755 --- a/app/ninja/repositories/AccountRepository.php +++ b/app/ninja/repositories/AccountRepository.php @@ -102,11 +102,10 @@ class AccountRepository return false; } - $account = Auth::user()->account; - $lastInvoice = Invoice::withTrashed()->whereAccountId($account->id)->orderBy('public_id', 'DESC')->first(); + $ninjaAccount = $this->getNinjaAccount(); + $lastInvoice = Invoice::withTrashed()->whereAccountId($ninjaAccount->id)->orderBy('public_id', 'DESC')->first(); $publicId = $lastInvoice ? ($lastInvoice->public_id + 1) : 1; - $ninjaAccount = $this->getNinjaAccount($publicId); $ninjaClient = $this->getNinjaClient($ninjaAccount); $invoice = $this->createNinjaInvoice($publicId, $ninjaAccount, $ninjaClient); @@ -148,7 +147,7 @@ class AccountRepository return $invoice; } - private function getNinjaAccount($publicId) + private function getNinjaAccount() { $account = Account::whereAccountKey(NINJA_ACCOUNT_KEY)->first(); @@ -182,7 +181,7 @@ class AccountRepository $accountGateway = new AccountGateway(); $accountGateway->user_id = $user->id; $accountGateway->gateway_id = NINJA_GATEWAY_ID; - $accountGateway->public_id = $publicId; + $accountGateway->public_id = 1; $accountGateway->config = isset($_ENV['NINJA_GATEWAY_CONFIG']) ? $_ENV['NINJA_GATEWAY_CONFIG'] : null; $account->account_gateways()->save($accountGateway); } diff --git a/app/routes.php b/app/routes.php index e48b942d8a14..0128609f73af 100755 --- a/app/routes.php +++ b/app/routes.php @@ -175,7 +175,7 @@ define('GATEWAY_PAYPAL_EXPRESS', 17); define('GATEWAY_BEANSTREAM', 29); define('GATEWAY_PSIGATE', 30); -define('PRO_PLAN_PRICE', 40); +define('PRO_PLAN_PRICE', 50); define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_GATEWAY_ID', GATEWAY_PAYPAL_EXPRESS); diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 44e9d8b69f93..d48e5bbbcec8 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -257,8 +257,8 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice @endif

- {{ Former::text('path')->value(Request::path()) }} - {{ Former::text('go_pro') }} + {{ Former::text('path')->value(Request::path()) }} + {{ Former::text('go_pro') }}
{{ Former::text('new_first_name')->label(trans('texts.first_name')) }} @@ -319,6 +319,46 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice @endif +@if (Auth::check() && !Auth::user()->isPro()) + + + +@endif + @if (!Utils::isNinjaProd() && !Utils::isNinjaDev())
{{ trans('texts.powered_by') }} InvoiceNinja.com
@endif @@ -405,7 +445,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice success: function(result) { if (result) { localStorage.setItem('guest_key', ''); - isRegistered = true; + NINJA.isRegistered = true; $('#signUpButton').hide(); $('#myAccountButton').html(result); } @@ -425,16 +465,47 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice } @endif - window.isRegistered = {{ Auth::check() && Auth::user()->registered ? 'true' : 'false' }}; function logout(force) { - if (force || isRegistered) { + if (force) { + NINJA.formIsChanged = false; + } + + if (force || NINJA.isRegistered) { window.location = '{{ URL::to('logout') }}'; } else { $('#logoutModal').modal('show'); } } + @if (Auth::check() && !Auth::user()->isPro()) + function showProPlan() { + $('#proPlanModal').modal('show'); + } + + function submitProPlan() { + + if (NINJA.isRegistered) { + $('#proPlanDiv, #proPlanFooter').hide(); + $('#proPlanWorking').show(); + + $.ajax({ + type: 'POST', + url: '{{ URL::to('account/go_pro') }}', + success: function(result) { + $('#proPlanSuccess, #proPlanFooter').show(); + $('#proPlanWorking, #proPlanButton').hide(); + } + }); + } else { + $('#proPlanModal').modal('hide'); + $('#go_pro').val('true'); + showSignUp(); + } + } + @endif + + $(function() { $('#search').focus(function(){ if (!window.hasOwnProperty('searchData')) { @@ -480,17 +551,11 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice } }); }) + @endif -@endif + @yield('onReady') -@if (false && Session::has('message')) -setTimeout(function() { - $('.alert-info').fadeOut(); -}, 3000); -@endif - -@yield('onReady') -}); + }); diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index a4216006180b..b7fe9a8d506b 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -274,7 +274,7 @@ - @if (Utils::isNinjaDev() && !Auth::user()->account->isPro()) + @if (!Auth::user()->account->isPro()) {{ trans('texts.pro_plan.remove_logo', ['link'=>''.trans('texts.pro_plan.remove_logo_link').'']) }} @endif @@ -443,42 +443,6 @@ {{ Former::close() }} - - + +``` + + +## Usage + +In its simplest case, DataTables can be initialised with a single line of Javascript: + +```js +$('table').dataTable(); +``` + +where the jQuery selector is used to obtain a reference to the table you want to enhance with DataTables. Optional configuration parameters can be passed in to DataTables to have it perform certain actions by using a configuration object as the parameter passed in to the DataTables constructor. For example: + +```js +$('table').dataTable( { + paginate: false, + scrollY: 300 +} ); +``` + +will disable paging and enable scrolling. + +A full list of the options available for DataTables are available in the [documentation](//datatables.net). + + +## Documentation + +Full documentation of the DataTables options, API and pug-in interface are available on the [DataTables web-site](//datatables.net). The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further. + + +## Support + +Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available. + + +## License + +DataTables is release under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with `/*!`. diff --git a/public/vendor/datatables/bower.json b/public/vendor/datatables/bower.json new file mode 100644 index 000000000000..0f8414b6d037 --- /dev/null +++ b/public/vendor/datatables/bower.json @@ -0,0 +1,11 @@ +{ + "name": "datatables", + "version": "1.10.0-beta.2", + "main": [ + "media/js/jquery.dataTables.js", + "media/css/jquery.dataTables.css" + ], + "dependencies": { + "jquery": ">=1.7.0" + } +} diff --git a/public/vendor/datatables/composer.json b/public/vendor/datatables/composer.json new file mode 100644 index 000000000000..05b1b305cd92 --- /dev/null +++ b/public/vendor/datatables/composer.json @@ -0,0 +1,15 @@ +{ + "name": "datatables/datatables", + "version": "1.10.0-beta.2", + "description": "DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.", + "homepage": "http://www.datatables.net/", + "author": "SpryMedia", + "license": [ + "MIT" + ], + "prefer-stable": true, + "support": { + "forum": "https://datatables.net/forums", + "source": "https://github.com/DataTables/DataTablesSrc/" + } +} diff --git a/public/vendor/datatables/dataTables.jquery.json b/public/vendor/datatables/dataTables.jquery.json new file mode 100644 index 000000000000..98049202c22f --- /dev/null +++ b/public/vendor/datatables/dataTables.jquery.json @@ -0,0 +1,32 @@ +{ + "name": "DataTables", + "version": "1.10.0-beta.2", + "description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.", + "homepage": "http://datatables.net/", + "docs": "http://datatables.net/", + "demo": "http://datatables.net/examples", + "download": "http://datatables.net/download", + "author": { + "name": "Allan Jardine", + "url": "http://sprymedia.co.uk" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://datatables.net/license_bsd" + } + ], + "dependencies": { + "jquery": ">=1.7" + }, + "keywords": [ + "DataTables", + "DataTable", + "table", + "grid", + "filter", + "sort", + "page", + "internationalisable" + ] +} diff --git a/public/vendor/datatables/examples/advanced_init/html5-data-attributes.html b/public/vendor/datatables/examples/advanced_init/html5-data-attributes.html new file mode 100644 index 000000000000..75f92bf6843d --- /dev/null +++ b/public/vendor/datatables/examples/advanced_init/html5-data-attributes.html @@ -0,0 +1,766 @@ + + + + + + + DataTables example - HTML5 data-* attributes + + + + + + + + + + + + +
+
+

DataTables example - HTML5 data-* attributes

+ +
+

DataTables can use different data for different actions (display, ordering and searcgubg) which can + be immensely powerful for transforming data in the display to be intuitive for the end user, while + using different, or more complex data, for other actions. For example, if a table contains a formatted + telephone number in the format xxx-xxxx, intuitively a user might search for the number + but without a dash. Using orthogonal data for searching allows both forms of the telephone number to be + used, while only the nicely formatted number is displayed in the table.

+ +

One method in which DataTables can obtain this orthogonal data for its different actions is through + + custom HTML5 data attributes. DataTables will automatically detect four different attributes on the + HTML elements:

+ +
    +
  • data-sort or data-order - for ordering data
  • +
  • data-filter or data-search - for search data
  • +
+ +

This example shows the use of data-sort and data-filter attributes. In + this case the first column has been formatted so the first name has abbreviated, but the full name is + still searchable (search for "Bruno" for example). Additionally, although the last column contains + non-numeric data in it (/m) the column will correctly order numerically as the + data-sort / data-order attribute is set on the column with plain numeric + data.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
T. NixonSystem ArchitectEdinburgh61Mon 25th Apr 11$320,800/m
G. WintersAccountantTokyo63Mon 25th Jul 11$170,750/m
A. CoxJunior Technical AuthorSan Francisco66Mon 12th Jan 09$86,000/m
C. KellySenior Javascript DeveloperEdinburgh22Thu 29th Mar 12$433,060/m
A. SatouAccountantTokyo33Fri 28th Nov 08$162,700/m
B. WilliamsonIntegration SpecialistNew York61Sun 2nd Dec 12$372,000/m
H. ChandlerSales AssistantSan Francisco59Mon 6th Aug 12$137,500/m
R. DavidsonIntegration SpecialistTokyo55Thu 14th Oct 10$327,900/m
C. HurstJavascript DeveloperSan Francisco39Tue 15th Sep 09$205,500/m
S. FrostSoftware EngineerEdinburgh23Sat 13th Dec 08$103,600/m
J. GainesOffice ManagerLondon30Fri 19th Dec 08$90,560/m
Q. FlynnSupport LeadEdinburgh22Sun 3rd Mar 13$342,000/m
C. MarshallRegional DirectorSan Francisco36Thu 16th Oct 08$470,600/m
H. KennedySenior Marketing DesignerLondon43Tue 18th Dec 12$313,500/m
T. FitzpatrickRegional DirectorLondon19Wed 17th Mar 10$385,750/m
M. SilvaMarketing DesignerLondon66Tue 27th Nov 12$198,500/m
P. ByrdChief Financial Officer (CFO)New York64Wed 9th Jun 10$725,000/m
G. LittleSystems AdministratorNew York59Fri 10th Apr 09$237,500/m
B. GreerSoftware EngineerLondon41Sat 13th Oct 12$132,000/m
D. RiosPersonnel LeadEdinburgh35Wed 26th Sep 12$217,500/m
J. CaldwellDevelopment LeadNew York30Sat 3rd Sep 11$345,000/m
Y. BerryChief Marketing Officer (CMO)New York40Thu 25th Jun 09$675,000/m
C. VancePre-Sales SupportNew York21Mon 12th Dec 11$106,450/m
D. WilderSales AssistantSidney23Mon 20th Sep 10$85,600/m
A. RamosChief Executive Officer (CEO)London47Fri 9th Oct 09$1,200,000/m
G. JoyceDeveloperEdinburgh42Wed 22nd Dec 10$92,575/m
J. ChangRegional DirectorSingapore28Sun 14th Nov 10$357,650/m
B. WagnerSoftware EngineerSan Francisco28Tue 7th Jun 11$206,850/m
F. GreenChief Operating Officer (COO)San Francisco48Thu 11th Mar 10$850,000/m
S. ItouRegional MarketingTokyo20Sun 14th Aug 11$163,000/m
M. HouseIntegration SpecialistSidney37Thu 2nd Jun 11$95,400/m
S. BurksDeveloperLondon53Thu 22nd Oct 09$114,500/m
P. BartlettTechnical AuthorLondon27Sat 7th May 11$145,000/m
G. CortezTeam LeaderSan Francisco22Sun 26th Oct 08$235,500/m
M. MccrayPost-Sales supportEdinburgh46Wed 9th Mar 11$324,050/m
U. ButlerMarketing DesignerSan Francisco47Wed 9th Dec 09$85,675/m
H. HatfieldOffice ManagerSan Francisco51Tue 16th Dec 08$164,500/m
H. FuentesSecretarySan Francisco41Fri 12th Feb 10$109,850/m
V. HarrellFinancial ControllerSan Francisco62Sat 14th Feb 09$452,500/m
T. MooneyOffice ManagerLondon37Thu 11th Dec 08$136,200/m
J. BradshawDirectorNew York65Fri 26th Sep 08$645,750/m
O. LiangSupport EngineerSingapore64Thu 3rd Feb 11$234,500/m
B. NashSoftware EngineerLondon38Tue 3rd May 11$163,500/m
S. YamamotoSupport EngineerTokyo37Wed 19th Aug 09$139,575/m
T. WaltonDeveloperNew York61Sun 11th Aug 13$98,540/m
F. CamachoSupport EngineerSan Francisco47Tue 7th Jul 09$87,500/m
S. BaldwinData CoordinatorSingapore64Mon 9th Apr 12$138,575/m
Z. FrankSoftware EngineerNew York63Mon 4th Jan 10$125,250/m
Z. SerranoSoftware EngineerSan Francisco56Fri 1st Jun 12$115,000/m
J. AcostaJunior Javascript DeveloperEdinburgh43Fri 1st Feb 13$75,650/m
C. StevensSales AssistantNew York46Tue 6th Dec 11$145,600/m
H. ButlerRegional DirectorLondon47Mon 21st Mar 11$356,250/m
L. GreerSystems AdministratorLondon21Fri 27th Feb 09$103,500/m
J. AlexanderDeveloperSan Francisco30Wed 14th Jul 10$86,500/m
S. DeckerRegional DirectorEdinburgh51Thu 13th Nov 08$183,000/m
M. BruceJavascript DeveloperSingapore29Mon 27th Jun 11$183,000/m
D. SniderCustomer SupportNew York27Tue 25th Jan 11$112,000/m
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/advanced_init/index.html b/public/vendor/datatables/examples/advanced_init/index.html new file mode 100644 index 000000000000..8ac9567b6a93 --- /dev/null +++ b/public/vendor/datatables/examples/advanced_init/index.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + DataTables examples - Advanced initialisation + + + +
+
+

DataTables example - Advanced initialisation

+ +
+

The configuration options offered by DataTables extend much further than the options shown in the + basic initialisation of this documentation. Through combinations of the options available and the use + of callbacks, DataTables is completely customisable and will fit into exactly what you need for your + table display.

+ +

This section shows some more advanced initialisation options. Keep in mind also that each example + can be combined with the other examples to get what you want!

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/advanced_init/sort_direction_control.html b/public/vendor/datatables/examples/advanced_init/sort_direction_control.html new file mode 100644 index 000000000000..09bb006e916f --- /dev/null +++ b/public/vendor/datatables/examples/advanced_init/sort_direction_control.html @@ -0,0 +1,782 @@ + + + + + + + DataTables example - Order direction sequence control + + + + + + + + + + + + +
+
+

DataTables example - Order direction sequence control

+ +
+

At times you may wish to change the default ordering direction sequence for columns (some or all of + them) to be 'descending' rather than DataTables' default ascending. This can be done through the use of + the columns.orderSequence initialisation parameter. This parameter also + allows you to limit the ordering to a single direction, or you could add complex behaviour to the + ordering interaction.

+ +

The example below shows:

+ +
    +
  • Column 1 - default ordering
  • +
  • Column 2 - default ordering
  • +
  • Column 3 - ascending ordering only
  • +
  • Column 4 - descending ordering, followed by ascending and then ascending again
  • +
  • Column 5 - descending ordering only
  • +
  • Column 6 - default ordering
  • +
+ +

It's worth noting that I don't have a good use case for when you might what to mix such complex + ordering behaviour into a single table, but the example shows how these options can be use and + therefore applied across all columns.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + "aoColumns": [ + null, + null, + { "orderSequence": [ "asc" ] }, + { "orderSequence": [ "desc", "asc", "asc" ] }, + { "orderSequence": [ "desc" ] }, + null + ] + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/custom_data_flat.html b/public/vendor/datatables/examples/ajax/custom_data_flat.html new file mode 100644 index 000000000000..7ae3461c2056 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/custom_data_flat.html @@ -0,0 +1,333 @@ + + + + + + + DataTables example - Flat array data source + + + + + + + + + + + + +
+
+

DataTables example - Flat array data source

+ +
+

When loading data from an Ajax source, by default, DataTables will look for the data to use in the + data parameter of a returned object (e.g. { "data": [...] }). This can easily + be change by using the dataSrc option of the ajax initiation option.

+ +

The ajax.dataSrc has a number of ways in which it can be used:

+ +
    +
  • As a string (e.g. dataSrc: 'myData') - obtain data from a different property in + the source object.
  • +
  • As an empty string (e.g. dataSrc: '') - the data source is not an object but an + array.
  • +
  • As a function (e.g. dataSrc: function(json) {}) - a function can be used to + transform the data from one source format to another (for example you could convert from XML to a + Javascript object). The value returned from the function is used as the data for the table.
  • +
+ +

The example below shows ajax.dataSrc being used as an empty string. This + tells DataTables that the JSON loaded is a plain array, not an object with an array inside it as is the + default.

+
+ + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeExtn.Start dateSalary
NamePositionOfficeExtn.Start dateSalary
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + "ajax": { + "url": "data/objects_root_array.txt", + "dataSrc": "" + }, + "columns": [ + { "data": "name" }, + { "data": "position" }, + { "data": "office" }, + { "data": "extn" }, + { "data": "start_date" }, + { "data": "salary" } + ] + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/arrays.txt b/public/vendor/datatables/examples/ajax/data/arrays.txt new file mode 100644 index 000000000000..4dadf14b79ee --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/arrays.txt @@ -0,0 +1,460 @@ +{ + "data": [ + [ + "Tiger Nixon", + "System Architect", + "Edinburgh", + "5421", + "2011\/04\/25", + "$320,800" + ], + [ + "Garrett Winters", + "Accountant", + "Tokyo", + "8422", + "2011\/07\/25", + "$170,750" + ], + [ + "Ashton Cox", + "Junior Technical Author", + "San Francisco", + "1562", + "2009\/01\/12", + "$86,000" + ], + [ + "Cedric Kelly", + "Senior Javascript Developer", + "Edinburgh", + "6224", + "2012\/03\/29", + "$433,060" + ], + [ + "Airi Satou", + "Accountant", + "Tokyo", + "5407", + "2008\/11\/28", + "$162,700" + ], + [ + "Brielle Williamson", + "Integration Specialist", + "New York", + "4804", + "2012\/12\/02", + "$372,000" + ], + [ + "Herrod Chandler", + "Sales Assistant", + "San Francisco", + "9608", + "2012\/08\/06", + "$137,500" + ], + [ + "Rhona Davidson", + "Integration Specialist", + "Tokyo", + "6200", + "2010\/10\/14", + "$327,900" + ], + [ + "Colleen Hurst", + "Javascript Developer", + "San Francisco", + "2360", + "2009\/09\/15", + "$205,500" + ], + [ + "Sonya Frost", + "Software Engineer", + "Edinburgh", + "1667", + "2008\/12\/13", + "$103,600" + ], + [ + "Jena Gaines", + "Office Manager", + "London", + "3814", + "2008\/12\/19", + "$90,560" + ], + [ + "Quinn Flynn", + "Support Lead", + "Edinburgh", + "9497", + "2013\/03\/03", + "$342,000" + ], + [ + "Charde Marshall", + "Regional Director", + "San Francisco", + "6741", + "2008\/10\/16", + "$470,600" + ], + [ + "Haley Kennedy", + "Senior Marketing Designer", + "London", + "3597", + "2012\/12\/18", + "$313,500" + ], + [ + "Tatyana Fitzpatrick", + "Regional Director", + "London", + "1965", + "2010\/03\/17", + "$385,750" + ], + [ + "Michael Silva", + "Marketing Designer", + "London", + "1581", + "2012\/11\/27", + "$198,500" + ], + [ + "Paul Byrd", + "Chief Financial Officer (CFO)", + "New York", + "3059", + "2010\/06\/09", + "$725,000" + ], + [ + "Gloria Little", + "Systems Administrator", + "New York", + "1721", + "2009\/04\/10", + "$237,500" + ], + [ + "Bradley Greer", + "Software Engineer", + "London", + "2558", + "2012\/10\/13", + "$132,000" + ], + [ + "Dai Rios", + "Personnel Lead", + "Edinburgh", + "2290", + "2012\/09\/26", + "$217,500" + ], + [ + "Jenette Caldwell", + "Development Lead", + "New York", + "1937", + "2011\/09\/03", + "$345,000" + ], + [ + "Yuri Berry", + "Chief Marketing Officer (CMO)", + "New York", + "6154", + "2009\/06\/25", + "$675,000" + ], + [ + "Caesar Vance", + "Pre-Sales Support", + "New York", + "8330", + "2011\/12\/12", + "$106,450" + ], + [ + "Doris Wilder", + "Sales Assistant", + "Sidney", + "3023", + "2010\/09\/20", + "$85,600" + ], + [ + "Angelica Ramos", + "Chief Executive Officer (CEO)", + "London", + "5797", + "2009\/10\/09", + "$1,200,000" + ], + [ + "Gavin Joyce", + "Developer", + "Edinburgh", + "8822", + "2010\/12\/22", + "$92,575" + ], + [ + "Jennifer Chang", + "Regional Director", + "Singapore", + "9239", + "2010\/11\/14", + "$357,650" + ], + [ + "Brenden Wagner", + "Software Engineer", + "San Francisco", + "1314", + "2011\/06\/07", + "$206,850" + ], + [ + "Fiona Green", + "Chief Operating Officer (COO)", + "San Francisco", + "2947", + "2010\/03\/11", + "$850,000" + ], + [ + "Shou Itou", + "Regional Marketing", + "Tokyo", + "8899", + "2011\/08\/14", + "$163,000" + ], + [ + "Michelle House", + "Integration Specialist", + "Sidney", + "2769", + "2011\/06\/02", + "$95,400" + ], + [ + "Suki Burks", + "Developer", + "London", + "6832", + "2009\/10\/22", + "$114,500" + ], + [ + "Prescott Bartlett", + "Technical Author", + "London", + "3606", + "2011\/05\/07", + "$145,000" + ], + [ + "Gavin Cortez", + "Team Leader", + "San Francisco", + "2860", + "2008\/10\/26", + "$235,500" + ], + [ + "Martena Mccray", + "Post-Sales support", + "Edinburgh", + "8240", + "2011\/03\/09", + "$324,050" + ], + [ + "Unity Butler", + "Marketing Designer", + "San Francisco", + "5384", + "2009\/12\/09", + "$85,675" + ], + [ + "Howard Hatfield", + "Office Manager", + "San Francisco", + "7031", + "2008\/12\/16", + "$164,500" + ], + [ + "Hope Fuentes", + "Secretary", + "San Francisco", + "6318", + "2010\/02\/12", + "$109,850" + ], + [ + "Vivian Harrell", + "Financial Controller", + "San Francisco", + "9422", + "2009\/02\/14", + "$452,500" + ], + [ + "Timothy Mooney", + "Office Manager", + "London", + "7580", + "2008\/12\/11", + "$136,200" + ], + [ + "Jackson Bradshaw", + "Director", + "New York", + "1042", + "2008\/09\/26", + "$645,750" + ], + [ + "Olivia Liang", + "Support Engineer", + "Singapore", + "2120", + "2011\/02\/03", + "$234,500" + ], + [ + "Bruno Nash", + "Software Engineer", + "London", + "6222", + "2011\/05\/03", + "$163,500" + ], + [ + "Sakura Yamamoto", + "Support Engineer", + "Tokyo", + "9383", + "2009\/08\/19", + "$139,575" + ], + [ + "Thor Walton", + "Developer", + "New York", + "8327", + "2013\/08\/11", + "$98,540" + ], + [ + "Finn Camacho", + "Support Engineer", + "San Francisco", + "2927", + "2009\/07\/07", + "$87,500" + ], + [ + "Serge Baldwin", + "Data Coordinator", + "Singapore", + "8352", + "2012\/04\/09", + "$138,575" + ], + [ + "Zenaida Frank", + "Software Engineer", + "New York", + "7439", + "2010\/01\/04", + "$125,250" + ], + [ + "Zorita Serrano", + "Software Engineer", + "San Francisco", + "4389", + "2012\/06\/01", + "$115,000" + ], + [ + "Jennifer Acosta", + "Junior Javascript Developer", + "Edinburgh", + "3431", + "2013\/02\/01", + "$75,650" + ], + [ + "Cara Stevens", + "Sales Assistant", + "New York", + "3990", + "2011\/12\/06", + "$145,600" + ], + [ + "Hermione Butler", + "Regional Director", + "London", + "1016", + "2011\/03\/21", + "$356,250" + ], + [ + "Lael Greer", + "Systems Administrator", + "London", + "6733", + "2009\/02\/27", + "$103,500" + ], + [ + "Jonas Alexander", + "Developer", + "San Francisco", + "8196", + "2010\/07\/14", + "$86,500" + ], + [ + "Shad Decker", + "Regional Director", + "Edinburgh", + "6373", + "2008\/11\/13", + "$183,000" + ], + [ + "Michael Bruce", + "Javascript Developer", + "Singapore", + "5384", + "2011\/06\/27", + "$183,000" + ], + [ + "Donna Snider", + "Customer Support", + "New York", + "4226", + "2011\/01\/25", + "$112,000" + ] + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/arrays_custom_prop.txt b/public/vendor/datatables/examples/ajax/data/arrays_custom_prop.txt new file mode 100644 index 000000000000..06e8265de62b --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/arrays_custom_prop.txt @@ -0,0 +1,460 @@ +{ + "demo": [ + [ + "Tiger Nixon", + "System Architect", + "Edinburgh", + "5421", + "2011\/04\/25", + "$320,800" + ], + [ + "Garrett Winters", + "Accountant", + "Tokyo", + "8422", + "2011\/07\/25", + "$170,750" + ], + [ + "Ashton Cox", + "Junior Technical Author", + "San Francisco", + "1562", + "2009\/01\/12", + "$86,000" + ], + [ + "Cedric Kelly", + "Senior Javascript Developer", + "Edinburgh", + "6224", + "2012\/03\/29", + "$433,060" + ], + [ + "Airi Satou", + "Accountant", + "Tokyo", + "5407", + "2008\/11\/28", + "$162,700" + ], + [ + "Brielle Williamson", + "Integration Specialist", + "New York", + "4804", + "2012\/12\/02", + "$372,000" + ], + [ + "Herrod Chandler", + "Sales Assistant", + "San Francisco", + "9608", + "2012\/08\/06", + "$137,500" + ], + [ + "Rhona Davidson", + "Integration Specialist", + "Tokyo", + "6200", + "2010\/10\/14", + "$327,900" + ], + [ + "Colleen Hurst", + "Javascript Developer", + "San Francisco", + "2360", + "2009\/09\/15", + "$205,500" + ], + [ + "Sonya Frost", + "Software Engineer", + "Edinburgh", + "1667", + "2008\/12\/13", + "$103,600" + ], + [ + "Jena Gaines", + "Office Manager", + "London", + "3814", + "2008\/12\/19", + "$90,560" + ], + [ + "Quinn Flynn", + "Support Lead", + "Edinburgh", + "9497", + "2013\/03\/03", + "$342,000" + ], + [ + "Charde Marshall", + "Regional Director", + "San Francisco", + "6741", + "2008\/10\/16", + "$470,600" + ], + [ + "Haley Kennedy", + "Senior Marketing Designer", + "London", + "3597", + "2012\/12\/18", + "$313,500" + ], + [ + "Tatyana Fitzpatrick", + "Regional Director", + "London", + "1965", + "2010\/03\/17", + "$385,750" + ], + [ + "Michael Silva", + "Marketing Designer", + "London", + "1581", + "2012\/11\/27", + "$198,500" + ], + [ + "Paul Byrd", + "Chief Financial Officer (CFO)", + "New York", + "3059", + "2010\/06\/09", + "$725,000" + ], + [ + "Gloria Little", + "Systems Administrator", + "New York", + "1721", + "2009\/04\/10", + "$237,500" + ], + [ + "Bradley Greer", + "Software Engineer", + "London", + "2558", + "2012\/10\/13", + "$132,000" + ], + [ + "Dai Rios", + "Personnel Lead", + "Edinburgh", + "2290", + "2012\/09\/26", + "$217,500" + ], + [ + "Jenette Caldwell", + "Development Lead", + "New York", + "1937", + "2011\/09\/03", + "$345,000" + ], + [ + "Yuri Berry", + "Chief Marketing Officer (CMO)", + "New York", + "6154", + "2009\/06\/25", + "$675,000" + ], + [ + "Caesar Vance", + "Pre-Sales Support", + "New York", + "8330", + "2011\/12\/12", + "$106,450" + ], + [ + "Doris Wilder", + "Sales Assistant", + "Sidney", + "3023", + "2010\/09\/20", + "$85,600" + ], + [ + "Angelica Ramos", + "Chief Executive Officer (CEO)", + "London", + "5797", + "2009\/10\/09", + "$1,200,000" + ], + [ + "Gavin Joyce", + "Developer", + "Edinburgh", + "8822", + "2010\/12\/22", + "$92,575" + ], + [ + "Jennifer Chang", + "Regional Director", + "Singapore", + "9239", + "2010\/11\/14", + "$357,650" + ], + [ + "Brenden Wagner", + "Software Engineer", + "San Francisco", + "1314", + "2011\/06\/07", + "$206,850" + ], + [ + "Fiona Green", + "Chief Operating Officer (COO)", + "San Francisco", + "2947", + "2010\/03\/11", + "$850,000" + ], + [ + "Shou Itou", + "Regional Marketing", + "Tokyo", + "8899", + "2011\/08\/14", + "$163,000" + ], + [ + "Michelle House", + "Integration Specialist", + "Sidney", + "2769", + "2011\/06\/02", + "$95,400" + ], + [ + "Suki Burks", + "Developer", + "London", + "6832", + "2009\/10\/22", + "$114,500" + ], + [ + "Prescott Bartlett", + "Technical Author", + "London", + "3606", + "2011\/05\/07", + "$145,000" + ], + [ + "Gavin Cortez", + "Team Leader", + "San Francisco", + "2860", + "2008\/10\/26", + "$235,500" + ], + [ + "Martena Mccray", + "Post-Sales support", + "Edinburgh", + "8240", + "2011\/03\/09", + "$324,050" + ], + [ + "Unity Butler", + "Marketing Designer", + "San Francisco", + "5384", + "2009\/12\/09", + "$85,675" + ], + [ + "Howard Hatfield", + "Office Manager", + "San Francisco", + "7031", + "2008\/12\/16", + "$164,500" + ], + [ + "Hope Fuentes", + "Secretary", + "San Francisco", + "6318", + "2010\/02\/12", + "$109,850" + ], + [ + "Vivian Harrell", + "Financial Controller", + "San Francisco", + "9422", + "2009\/02\/14", + "$452,500" + ], + [ + "Timothy Mooney", + "Office Manager", + "London", + "7580", + "2008\/12\/11", + "$136,200" + ], + [ + "Jackson Bradshaw", + "Director", + "New York", + "1042", + "2008\/09\/26", + "$645,750" + ], + [ + "Olivia Liang", + "Support Engineer", + "Singapore", + "2120", + "2011\/02\/03", + "$234,500" + ], + [ + "Bruno Nash", + "Software Engineer", + "London", + "6222", + "2011\/05\/03", + "$163,500" + ], + [ + "Sakura Yamamoto", + "Support Engineer", + "Tokyo", + "9383", + "2009\/08\/19", + "$139,575" + ], + [ + "Thor Walton", + "Developer", + "New York", + "8327", + "2013\/08\/11", + "$98,540" + ], + [ + "Finn Camacho", + "Support Engineer", + "San Francisco", + "2927", + "2009\/07\/07", + "$87,500" + ], + [ + "Serge Baldwin", + "Data Coordinator", + "Singapore", + "8352", + "2012\/04\/09", + "$138,575" + ], + [ + "Zenaida Frank", + "Software Engineer", + "New York", + "7439", + "2010\/01\/04", + "$125,250" + ], + [ + "Zorita Serrano", + "Software Engineer", + "San Francisco", + "4389", + "2012\/06\/01", + "$115,000" + ], + [ + "Jennifer Acosta", + "Junior Javascript Developer", + "Edinburgh", + "3431", + "2013\/02\/01", + "$75,650" + ], + [ + "Cara Stevens", + "Sales Assistant", + "New York", + "3990", + "2011\/12\/06", + "$145,600" + ], + [ + "Hermione Butler", + "Regional Director", + "London", + "1016", + "2011\/03\/21", + "$356,250" + ], + [ + "Lael Greer", + "Systems Administrator", + "London", + "6733", + "2009\/02\/27", + "$103,500" + ], + [ + "Jonas Alexander", + "Developer", + "San Francisco", + "8196", + "2010\/07\/14", + "$86,500" + ], + [ + "Shad Decker", + "Regional Director", + "Edinburgh", + "6373", + "2008\/11\/13", + "$183,000" + ], + [ + "Michael Bruce", + "Javascript Developer", + "Singapore", + "5384", + "2011\/06\/27", + "$183,000" + ], + [ + "Donna Snider", + "Customer Support", + "New York", + "4226", + "2011\/01\/25", + "$112,000" + ] + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/arrays_subobjects.txt b/public/vendor/datatables/examples/ajax/data/arrays_subobjects.txt new file mode 100644 index 000000000000..a45518117cf1 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/arrays_subobjects.txt @@ -0,0 +1,688 @@ +{ + "data": [ + { + "0": "Tiger Nixon", + "hr": { + "position": "System Architect", + "salary": "$320,800", + "start_date": "2011\/04\/25" + }, + "contact": { + "office": "Edinburgh", + "extn": "5421" + } + }, + { + "0": "Garrett Winters", + "hr": { + "position": "Accountant", + "salary": "$170,750", + "start_date": "2011\/07\/25" + }, + "contact": { + "office": "Tokyo", + "extn": "8422" + } + }, + { + "0": "Ashton Cox", + "hr": { + "position": "Junior Technical Author", + "salary": "$86,000", + "start_date": "2009\/01\/12" + }, + "contact": { + "office": "San Francisco", + "extn": "1562" + } + }, + { + "0": "Cedric Kelly", + "hr": { + "position": "Senior Javascript Developer", + "salary": "$433,060", + "start_date": "2012\/03\/29" + }, + "contact": { + "office": "Edinburgh", + "extn": "6224" + } + }, + { + "0": "Airi Satou", + "hr": { + "position": "Accountant", + "salary": "$162,700", + "start_date": "2008\/11\/28" + }, + "contact": { + "office": "Tokyo", + "extn": "5407" + } + }, + { + "0": "Brielle Williamson", + "hr": { + "position": "Integration Specialist", + "salary": "$372,000", + "start_date": "2012\/12\/02" + }, + "contact": { + "office": "New York", + "extn": "4804" + } + }, + { + "0": "Herrod Chandler", + "hr": { + "position": "Sales Assistant", + "salary": "$137,500", + "start_date": "2012\/08\/06" + }, + "contact": { + "office": "San Francisco", + "extn": "9608" + } + }, + { + "0": "Rhona Davidson", + "hr": { + "position": "Integration Specialist", + "salary": "$327,900", + "start_date": "2010\/10\/14" + }, + "contact": { + "office": "Tokyo", + "extn": "6200" + } + }, + { + "0": "Colleen Hurst", + "hr": { + "position": "Javascript Developer", + "salary": "$205,500", + "start_date": "2009\/09\/15" + }, + "contact": { + "office": "San Francisco", + "extn": "2360" + } + }, + { + "0": "Sonya Frost", + "hr": { + "position": "Software Engineer", + "salary": "$103,600", + "start_date": "2008\/12\/13" + }, + "contact": { + "office": "Edinburgh", + "extn": "1667" + } + }, + { + "0": "Jena Gaines", + "hr": { + "position": "Office Manager", + "salary": "$90,560", + "start_date": "2008\/12\/19" + }, + "contact": { + "office": "London", + "extn": "3814" + } + }, + { + "0": "Quinn Flynn", + "hr": { + "position": "Support Lead", + "salary": "$342,000", + "start_date": "2013\/03\/03" + }, + "contact": { + "office": "Edinburgh", + "extn": "9497" + } + }, + { + "0": "Charde Marshall", + "hr": { + "position": "Regional Director", + "salary": "$470,600", + "start_date": "2008\/10\/16" + }, + "contact": { + "office": "San Francisco", + "extn": "6741" + } + }, + { + "0": "Haley Kennedy", + "hr": { + "position": "Senior Marketing Designer", + "salary": "$313,500", + "start_date": "2012\/12\/18" + }, + "contact": { + "office": "London", + "extn": "3597" + } + }, + { + "0": "Tatyana Fitzpatrick", + "hr": { + "position": "Regional Director", + "salary": "$385,750", + "start_date": "2010\/03\/17" + }, + "contact": { + "office": "London", + "extn": "1965" + } + }, + { + "0": "Michael Silva", + "hr": { + "position": "Marketing Designer", + "salary": "$198,500", + "start_date": "2012\/11\/27" + }, + "contact": { + "office": "London", + "extn": "1581" + } + }, + { + "0": "Paul Byrd", + "hr": { + "position": "Chief Financial Officer (CFO)", + "salary": "$725,000", + "start_date": "2010\/06\/09" + }, + "contact": { + "office": "New York", + "extn": "3059" + } + }, + { + "0": "Gloria Little", + "hr": { + "position": "Systems Administrator", + "salary": "$237,500", + "start_date": "2009\/04\/10" + }, + "contact": { + "office": "New York", + "extn": "1721" + } + }, + { + "0": "Bradley Greer", + "hr": { + "position": "Software Engineer", + "salary": "$132,000", + "start_date": "2012\/10\/13" + }, + "contact": { + "office": "London", + "extn": "2558" + } + }, + { + "0": "Dai Rios", + "hr": { + "position": "Personnel Lead", + "salary": "$217,500", + "start_date": "2012\/09\/26" + }, + "contact": { + "office": "Edinburgh", + "extn": "2290" + } + }, + { + "0": "Jenette Caldwell", + "hr": { + "position": "Development Lead", + "salary": "$345,000", + "start_date": "2011\/09\/03" + }, + "contact": { + "office": "New York", + "extn": "1937" + } + }, + { + "0": "Yuri Berry", + "hr": { + "position": "Chief Marketing Officer (CMO)", + "salary": "$675,000", + "start_date": "2009\/06\/25" + }, + "contact": { + "office": "New York", + "extn": "6154" + } + }, + { + "0": "Caesar Vance", + "hr": { + "position": "Pre-Sales Support", + "salary": "$106,450", + "start_date": "2011\/12\/12" + }, + "contact": { + "office": "New York", + "extn": "8330" + } + }, + { + "0": "Doris Wilder", + "hr": { + "position": "Sales Assistant", + "salary": "$85,600", + "start_date": "2010\/09\/20" + }, + "contact": { + "office": "Sidney", + "extn": "3023" + } + }, + { + "0": "Angelica Ramos", + "hr": { + "position": "Chief Executive Officer (CEO)", + "salary": "$1,200,000", + "start_date": "2009\/10\/09" + }, + "contact": { + "office": "London", + "extn": "5797" + } + }, + { + "0": "Gavin Joyce", + "hr": { + "position": "Developer", + "salary": "$92,575", + "start_date": "2010\/12\/22" + }, + "contact": { + "office": "Edinburgh", + "extn": "8822" + } + }, + { + "0": "Jennifer Chang", + "hr": { + "position": "Regional Director", + "salary": "$357,650", + "start_date": "2010\/11\/14" + }, + "contact": { + "office": "Singapore", + "extn": "9239" + } + }, + { + "0": "Brenden Wagner", + "hr": { + "position": "Software Engineer", + "salary": "$206,850", + "start_date": "2011\/06\/07" + }, + "contact": { + "office": "San Francisco", + "extn": "1314" + } + }, + { + "0": "Fiona Green", + "hr": { + "position": "Chief Operating Officer (COO)", + "salary": "$850,000", + "start_date": "2010\/03\/11" + }, + "contact": { + "office": "San Francisco", + "extn": "2947" + } + }, + { + "0": "Shou Itou", + "hr": { + "position": "Regional Marketing", + "salary": "$163,000", + "start_date": "2011\/08\/14" + }, + "contact": { + "office": "Tokyo", + "extn": "8899" + } + }, + { + "0": "Michelle House", + "hr": { + "position": "Integration Specialist", + "salary": "$95,400", + "start_date": "2011\/06\/02" + }, + "contact": { + "office": "Sidney", + "extn": "2769" + } + }, + { + "0": "Suki Burks", + "hr": { + "position": "Developer", + "salary": "$114,500", + "start_date": "2009\/10\/22" + }, + "contact": { + "office": "London", + "extn": "6832" + } + }, + { + "0": "Prescott Bartlett", + "hr": { + "position": "Technical Author", + "salary": "$145,000", + "start_date": "2011\/05\/07" + }, + "contact": { + "office": "London", + "extn": "3606" + } + }, + { + "0": "Gavin Cortez", + "hr": { + "position": "Team Leader", + "salary": "$235,500", + "start_date": "2008\/10\/26" + }, + "contact": { + "office": "San Francisco", + "extn": "2860" + } + }, + { + "0": "Martena Mccray", + "hr": { + "position": "Post-Sales support", + "salary": "$324,050", + "start_date": "2011\/03\/09" + }, + "contact": { + "office": "Edinburgh", + "extn": "8240" + } + }, + { + "0": "Unity Butler", + "hr": { + "position": "Marketing Designer", + "salary": "$85,675", + "start_date": "2009\/12\/09" + }, + "contact": { + "office": "San Francisco", + "extn": "5384" + } + }, + { + "0": "Howard Hatfield", + "hr": { + "position": "Office Manager", + "salary": "$164,500", + "start_date": "2008\/12\/16" + }, + "contact": { + "office": "San Francisco", + "extn": "7031" + } + }, + { + "0": "Hope Fuentes", + "hr": { + "position": "Secretary", + "salary": "$109,850", + "start_date": "2010\/02\/12" + }, + "contact": { + "office": "San Francisco", + "extn": "6318" + } + }, + { + "0": "Vivian Harrell", + "hr": { + "position": "Financial Controller", + "salary": "$452,500", + "start_date": "2009\/02\/14" + }, + "contact": { + "office": "San Francisco", + "extn": "9422" + } + }, + { + "0": "Timothy Mooney", + "hr": { + "position": "Office Manager", + "salary": "$136,200", + "start_date": "2008\/12\/11" + }, + "contact": { + "office": "London", + "extn": "7580" + } + }, + { + "0": "Jackson Bradshaw", + "hr": { + "position": "Director", + "salary": "$645,750", + "start_date": "2008\/09\/26" + }, + "contact": { + "office": "New York", + "extn": "1042" + } + }, + { + "0": "Olivia Liang", + "hr": { + "position": "Support Engineer", + "salary": "$234,500", + "start_date": "2011\/02\/03" + }, + "contact": { + "office": "Singapore", + "extn": "2120" + } + }, + { + "0": "Bruno Nash", + "hr": { + "position": "Software Engineer", + "salary": "$163,500", + "start_date": "2011\/05\/03" + }, + "contact": { + "office": "London", + "extn": "6222" + } + }, + { + "0": "Sakura Yamamoto", + "hr": { + "position": "Support Engineer", + "salary": "$139,575", + "start_date": "2009\/08\/19" + }, + "contact": { + "office": "Tokyo", + "extn": "9383" + } + }, + { + "0": "Thor Walton", + "hr": { + "position": "Developer", + "salary": "$98,540", + "start_date": "2013\/08\/11" + }, + "contact": { + "office": "New York", + "extn": "8327" + } + }, + { + "0": "Finn Camacho", + "hr": { + "position": "Support Engineer", + "salary": "$87,500", + "start_date": "2009\/07\/07" + }, + "contact": { + "office": "San Francisco", + "extn": "2927" + } + }, + { + "0": "Serge Baldwin", + "hr": { + "position": "Data Coordinator", + "salary": "$138,575", + "start_date": "2012\/04\/09" + }, + "contact": { + "office": "Singapore", + "extn": "8352" + } + }, + { + "0": "Zenaida Frank", + "hr": { + "position": "Software Engineer", + "salary": "$125,250", + "start_date": "2010\/01\/04" + }, + "contact": { + "office": "New York", + "extn": "7439" + } + }, + { + "0": "Zorita Serrano", + "hr": { + "position": "Software Engineer", + "salary": "$115,000", + "start_date": "2012\/06\/01" + }, + "contact": { + "office": "San Francisco", + "extn": "4389" + } + }, + { + "0": "Jennifer Acosta", + "hr": { + "position": "Junior Javascript Developer", + "salary": "$75,650", + "start_date": "2013\/02\/01" + }, + "contact": { + "office": "Edinburgh", + "extn": "3431" + } + }, + { + "0": "Cara Stevens", + "hr": { + "position": "Sales Assistant", + "salary": "$145,600", + "start_date": "2011\/12\/06" + }, + "contact": { + "office": "New York", + "extn": "3990" + } + }, + { + "0": "Hermione Butler", + "hr": { + "position": "Regional Director", + "salary": "$356,250", + "start_date": "2011\/03\/21" + }, + "contact": { + "office": "London", + "extn": "1016" + } + }, + { + "0": "Lael Greer", + "hr": { + "position": "Systems Administrator", + "salary": "$103,500", + "start_date": "2009\/02\/27" + }, + "contact": { + "office": "London", + "extn": "6733" + } + }, + { + "0": "Jonas Alexander", + "hr": { + "position": "Developer", + "salary": "$86,500", + "start_date": "2010\/07\/14" + }, + "contact": { + "office": "San Francisco", + "extn": "8196" + } + }, + { + "0": "Shad Decker", + "hr": { + "position": "Regional Director", + "salary": "$183,000", + "start_date": "2008\/11\/13" + }, + "contact": { + "office": "Edinburgh", + "extn": "6373" + } + }, + { + "0": "Michael Bruce", + "hr": { + "position": "Javascript Developer", + "salary": "$183,000", + "start_date": "2011\/06\/27" + }, + "contact": { + "office": "Singapore", + "extn": "5384" + } + }, + { + "0": "Donna Snider", + "hr": { + "position": "Customer Support", + "salary": "$112,000", + "start_date": "2011\/01\/25" + }, + "contact": { + "office": "New York", + "extn": "4226" + } + } + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/objects.txt b/public/vendor/datatables/examples/ajax/data/objects.txt new file mode 100644 index 000000000000..b908653ae8c6 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/objects.txt @@ -0,0 +1,460 @@ +{ + "data": [ + { + "name": "Tiger Nixon", + "position": "System Architect", + "salary": "$320,800", + "start_date": "2011\/04\/25", + "office": "Edinburgh", + "extn": "5421" + }, + { + "name": "Garrett Winters", + "position": "Accountant", + "salary": "$170,750", + "start_date": "2011\/07\/25", + "office": "Tokyo", + "extn": "8422" + }, + { + "name": "Ashton Cox", + "position": "Junior Technical Author", + "salary": "$86,000", + "start_date": "2009\/01\/12", + "office": "San Francisco", + "extn": "1562" + }, + { + "name": "Cedric Kelly", + "position": "Senior Javascript Developer", + "salary": "$433,060", + "start_date": "2012\/03\/29", + "office": "Edinburgh", + "extn": "6224" + }, + { + "name": "Airi Satou", + "position": "Accountant", + "salary": "$162,700", + "start_date": "2008\/11\/28", + "office": "Tokyo", + "extn": "5407" + }, + { + "name": "Brielle Williamson", + "position": "Integration Specialist", + "salary": "$372,000", + "start_date": "2012\/12\/02", + "office": "New York", + "extn": "4804" + }, + { + "name": "Herrod Chandler", + "position": "Sales Assistant", + "salary": "$137,500", + "start_date": "2012\/08\/06", + "office": "San Francisco", + "extn": "9608" + }, + { + "name": "Rhona Davidson", + "position": "Integration Specialist", + "salary": "$327,900", + "start_date": "2010\/10\/14", + "office": "Tokyo", + "extn": "6200" + }, + { + "name": "Colleen Hurst", + "position": "Javascript Developer", + "salary": "$205,500", + "start_date": "2009\/09\/15", + "office": "San Francisco", + "extn": "2360" + }, + { + "name": "Sonya Frost", + "position": "Software Engineer", + "salary": "$103,600", + "start_date": "2008\/12\/13", + "office": "Edinburgh", + "extn": "1667" + }, + { + "name": "Jena Gaines", + "position": "Office Manager", + "salary": "$90,560", + "start_date": "2008\/12\/19", + "office": "London", + "extn": "3814" + }, + { + "name": "Quinn Flynn", + "position": "Support Lead", + "salary": "$342,000", + "start_date": "2013\/03\/03", + "office": "Edinburgh", + "extn": "9497" + }, + { + "name": "Charde Marshall", + "position": "Regional Director", + "salary": "$470,600", + "start_date": "2008\/10\/16", + "office": "San Francisco", + "extn": "6741" + }, + { + "name": "Haley Kennedy", + "position": "Senior Marketing Designer", + "salary": "$313,500", + "start_date": "2012\/12\/18", + "office": "London", + "extn": "3597" + }, + { + "name": "Tatyana Fitzpatrick", + "position": "Regional Director", + "salary": "$385,750", + "start_date": "2010\/03\/17", + "office": "London", + "extn": "1965" + }, + { + "name": "Michael Silva", + "position": "Marketing Designer", + "salary": "$198,500", + "start_date": "2012\/11\/27", + "office": "London", + "extn": "1581" + }, + { + "name": "Paul Byrd", + "position": "Chief Financial Officer (CFO)", + "salary": "$725,000", + "start_date": "2010\/06\/09", + "office": "New York", + "extn": "3059" + }, + { + "name": "Gloria Little", + "position": "Systems Administrator", + "salary": "$237,500", + "start_date": "2009\/04\/10", + "office": "New York", + "extn": "1721" + }, + { + "name": "Bradley Greer", + "position": "Software Engineer", + "salary": "$132,000", + "start_date": "2012\/10\/13", + "office": "London", + "extn": "2558" + }, + { + "name": "Dai Rios", + "position": "Personnel Lead", + "salary": "$217,500", + "start_date": "2012\/09\/26", + "office": "Edinburgh", + "extn": "2290" + }, + { + "name": "Jenette Caldwell", + "position": "Development Lead", + "salary": "$345,000", + "start_date": "2011\/09\/03", + "office": "New York", + "extn": "1937" + }, + { + "name": "Yuri Berry", + "position": "Chief Marketing Officer (CMO)", + "salary": "$675,000", + "start_date": "2009\/06\/25", + "office": "New York", + "extn": "6154" + }, + { + "name": "Caesar Vance", + "position": "Pre-Sales Support", + "salary": "$106,450", + "start_date": "2011\/12\/12", + "office": "New York", + "extn": "8330" + }, + { + "name": "Doris Wilder", + "position": "Sales Assistant", + "salary": "$85,600", + "start_date": "2010\/09\/20", + "office": "Sidney", + "extn": "3023" + }, + { + "name": "Angelica Ramos", + "position": "Chief Executive Officer (CEO)", + "salary": "$1,200,000", + "start_date": "2009\/10\/09", + "office": "London", + "extn": "5797" + }, + { + "name": "Gavin Joyce", + "position": "Developer", + "salary": "$92,575", + "start_date": "2010\/12\/22", + "office": "Edinburgh", + "extn": "8822" + }, + { + "name": "Jennifer Chang", + "position": "Regional Director", + "salary": "$357,650", + "start_date": "2010\/11\/14", + "office": "Singapore", + "extn": "9239" + }, + { + "name": "Brenden Wagner", + "position": "Software Engineer", + "salary": "$206,850", + "start_date": "2011\/06\/07", + "office": "San Francisco", + "extn": "1314" + }, + { + "name": "Fiona Green", + "position": "Chief Operating Officer (COO)", + "salary": "$850,000", + "start_date": "2010\/03\/11", + "office": "San Francisco", + "extn": "2947" + }, + { + "name": "Shou Itou", + "position": "Regional Marketing", + "salary": "$163,000", + "start_date": "2011\/08\/14", + "office": "Tokyo", + "extn": "8899" + }, + { + "name": "Michelle House", + "position": "Integration Specialist", + "salary": "$95,400", + "start_date": "2011\/06\/02", + "office": "Sidney", + "extn": "2769" + }, + { + "name": "Suki Burks", + "position": "Developer", + "salary": "$114,500", + "start_date": "2009\/10\/22", + "office": "London", + "extn": "6832" + }, + { + "name": "Prescott Bartlett", + "position": "Technical Author", + "salary": "$145,000", + "start_date": "2011\/05\/07", + "office": "London", + "extn": "3606" + }, + { + "name": "Gavin Cortez", + "position": "Team Leader", + "salary": "$235,500", + "start_date": "2008\/10\/26", + "office": "San Francisco", + "extn": "2860" + }, + { + "name": "Martena Mccray", + "position": "Post-Sales support", + "salary": "$324,050", + "start_date": "2011\/03\/09", + "office": "Edinburgh", + "extn": "8240" + }, + { + "name": "Unity Butler", + "position": "Marketing Designer", + "salary": "$85,675", + "start_date": "2009\/12\/09", + "office": "San Francisco", + "extn": "5384" + }, + { + "name": "Howard Hatfield", + "position": "Office Manager", + "salary": "$164,500", + "start_date": "2008\/12\/16", + "office": "San Francisco", + "extn": "7031" + }, + { + "name": "Hope Fuentes", + "position": "Secretary", + "salary": "$109,850", + "start_date": "2010\/02\/12", + "office": "San Francisco", + "extn": "6318" + }, + { + "name": "Vivian Harrell", + "position": "Financial Controller", + "salary": "$452,500", + "start_date": "2009\/02\/14", + "office": "San Francisco", + "extn": "9422" + }, + { + "name": "Timothy Mooney", + "position": "Office Manager", + "salary": "$136,200", + "start_date": "2008\/12\/11", + "office": "London", + "extn": "7580" + }, + { + "name": "Jackson Bradshaw", + "position": "Director", + "salary": "$645,750", + "start_date": "2008\/09\/26", + "office": "New York", + "extn": "1042" + }, + { + "name": "Olivia Liang", + "position": "Support Engineer", + "salary": "$234,500", + "start_date": "2011\/02\/03", + "office": "Singapore", + "extn": "2120" + }, + { + "name": "Bruno Nash", + "position": "Software Engineer", + "salary": "$163,500", + "start_date": "2011\/05\/03", + "office": "London", + "extn": "6222" + }, + { + "name": "Sakura Yamamoto", + "position": "Support Engineer", + "salary": "$139,575", + "start_date": "2009\/08\/19", + "office": "Tokyo", + "extn": "9383" + }, + { + "name": "Thor Walton", + "position": "Developer", + "salary": "$98,540", + "start_date": "2013\/08\/11", + "office": "New York", + "extn": "8327" + }, + { + "name": "Finn Camacho", + "position": "Support Engineer", + "salary": "$87,500", + "start_date": "2009\/07\/07", + "office": "San Francisco", + "extn": "2927" + }, + { + "name": "Serge Baldwin", + "position": "Data Coordinator", + "salary": "$138,575", + "start_date": "2012\/04\/09", + "office": "Singapore", + "extn": "8352" + }, + { + "name": "Zenaida Frank", + "position": "Software Engineer", + "salary": "$125,250", + "start_date": "2010\/01\/04", + "office": "New York", + "extn": "7439" + }, + { + "name": "Zorita Serrano", + "position": "Software Engineer", + "salary": "$115,000", + "start_date": "2012\/06\/01", + "office": "San Francisco", + "extn": "4389" + }, + { + "name": "Jennifer Acosta", + "position": "Junior Javascript Developer", + "salary": "$75,650", + "start_date": "2013\/02\/01", + "office": "Edinburgh", + "extn": "3431" + }, + { + "name": "Cara Stevens", + "position": "Sales Assistant", + "salary": "$145,600", + "start_date": "2011\/12\/06", + "office": "New York", + "extn": "3990" + }, + { + "name": "Hermione Butler", + "position": "Regional Director", + "salary": "$356,250", + "start_date": "2011\/03\/21", + "office": "London", + "extn": "1016" + }, + { + "name": "Lael Greer", + "position": "Systems Administrator", + "salary": "$103,500", + "start_date": "2009\/02\/27", + "office": "London", + "extn": "6733" + }, + { + "name": "Jonas Alexander", + "position": "Developer", + "salary": "$86,500", + "start_date": "2010\/07\/14", + "office": "San Francisco", + "extn": "8196" + }, + { + "name": "Shad Decker", + "position": "Regional Director", + "salary": "$183,000", + "start_date": "2008\/11\/13", + "office": "Edinburgh", + "extn": "6373" + }, + { + "name": "Michael Bruce", + "position": "Javascript Developer", + "salary": "$183,000", + "start_date": "2011\/06\/27", + "office": "Singapore", + "extn": "5384" + }, + { + "name": "Donna Snider", + "position": "Customer Support", + "salary": "$112,000", + "start_date": "2011\/01\/25", + "office": "New York", + "extn": "4226" + } + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/objects_deep.txt b/public/vendor/datatables/examples/ajax/data/objects_deep.txt new file mode 100644 index 000000000000..a69f18d75671 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/objects_deep.txt @@ -0,0 +1,688 @@ +{ + "data": [ + { + "name": "Tiger Nixon", + "hr": { + "position": "System Architect", + "salary": "$320,800", + "start_date": "2011\/04\/25" + }, + "contact": [ + "Edinburgh", + "5421" + ] + }, + { + "name": "Garrett Winters", + "hr": { + "position": "Accountant", + "salary": "$170,750", + "start_date": "2011\/07\/25" + }, + "contact": [ + "Tokyo", + "8422" + ] + }, + { + "name": "Ashton Cox", + "hr": { + "position": "Junior Technical Author", + "salary": "$86,000", + "start_date": "2009\/01\/12" + }, + "contact": [ + "San Francisco", + "1562" + ] + }, + { + "name": "Cedric Kelly", + "hr": { + "position": "Senior Javascript Developer", + "salary": "$433,060", + "start_date": "2012\/03\/29" + }, + "contact": [ + "Edinburgh", + "6224" + ] + }, + { + "name": "Airi Satou", + "hr": { + "position": "Accountant", + "salary": "$162,700", + "start_date": "2008\/11\/28" + }, + "contact": [ + "Tokyo", + "5407" + ] + }, + { + "name": "Brielle Williamson", + "hr": { + "position": "Integration Specialist", + "salary": "$372,000", + "start_date": "2012\/12\/02" + }, + "contact": [ + "New York", + "4804" + ] + }, + { + "name": "Herrod Chandler", + "hr": { + "position": "Sales Assistant", + "salary": "$137,500", + "start_date": "2012\/08\/06" + }, + "contact": [ + "San Francisco", + "9608" + ] + }, + { + "name": "Rhona Davidson", + "hr": { + "position": "Integration Specialist", + "salary": "$327,900", + "start_date": "2010\/10\/14" + }, + "contact": [ + "Tokyo", + "6200" + ] + }, + { + "name": "Colleen Hurst", + "hr": { + "position": "Javascript Developer", + "salary": "$205,500", + "start_date": "2009\/09\/15" + }, + "contact": [ + "San Francisco", + "2360" + ] + }, + { + "name": "Sonya Frost", + "hr": { + "position": "Software Engineer", + "salary": "$103,600", + "start_date": "2008\/12\/13" + }, + "contact": [ + "Edinburgh", + "1667" + ] + }, + { + "name": "Jena Gaines", + "hr": { + "position": "Office Manager", + "salary": "$90,560", + "start_date": "2008\/12\/19" + }, + "contact": [ + "London", + "3814" + ] + }, + { + "name": "Quinn Flynn", + "hr": { + "position": "Support Lead", + "salary": "$342,000", + "start_date": "2013\/03\/03" + }, + "contact": [ + "Edinburgh", + "9497" + ] + }, + { + "name": "Charde Marshall", + "hr": { + "position": "Regional Director", + "salary": "$470,600", + "start_date": "2008\/10\/16" + }, + "contact": [ + "San Francisco", + "6741" + ] + }, + { + "name": "Haley Kennedy", + "hr": { + "position": "Senior Marketing Designer", + "salary": "$313,500", + "start_date": "2012\/12\/18" + }, + "contact": [ + "London", + "3597" + ] + }, + { + "name": "Tatyana Fitzpatrick", + "hr": { + "position": "Regional Director", + "salary": "$385,750", + "start_date": "2010\/03\/17" + }, + "contact": [ + "London", + "1965" + ] + }, + { + "name": "Michael Silva", + "hr": { + "position": "Marketing Designer", + "salary": "$198,500", + "start_date": "2012\/11\/27" + }, + "contact": [ + "London", + "1581" + ] + }, + { + "name": "Paul Byrd", + "hr": { + "position": "Chief Financial Officer (CFO)", + "salary": "$725,000", + "start_date": "2010\/06\/09" + }, + "contact": [ + "New York", + "3059" + ] + }, + { + "name": "Gloria Little", + "hr": { + "position": "Systems Administrator", + "salary": "$237,500", + "start_date": "2009\/04\/10" + }, + "contact": [ + "New York", + "1721" + ] + }, + { + "name": "Bradley Greer", + "hr": { + "position": "Software Engineer", + "salary": "$132,000", + "start_date": "2012\/10\/13" + }, + "contact": [ + "London", + "2558" + ] + }, + { + "name": "Dai Rios", + "hr": { + "position": "Personnel Lead", + "salary": "$217,500", + "start_date": "2012\/09\/26" + }, + "contact": [ + "Edinburgh", + "2290" + ] + }, + { + "name": "Jenette Caldwell", + "hr": { + "position": "Development Lead", + "salary": "$345,000", + "start_date": "2011\/09\/03" + }, + "contact": [ + "New York", + "1937" + ] + }, + { + "name": "Yuri Berry", + "hr": { + "position": "Chief Marketing Officer (CMO)", + "salary": "$675,000", + "start_date": "2009\/06\/25" + }, + "contact": [ + "New York", + "6154" + ] + }, + { + "name": "Caesar Vance", + "hr": { + "position": "Pre-Sales Support", + "salary": "$106,450", + "start_date": "2011\/12\/12" + }, + "contact": [ + "New York", + "8330" + ] + }, + { + "name": "Doris Wilder", + "hr": { + "position": "Sales Assistant", + "salary": "$85,600", + "start_date": "2010\/09\/20" + }, + "contact": [ + "Sidney", + "3023" + ] + }, + { + "name": "Angelica Ramos", + "hr": { + "position": "Chief Executive Officer (CEO)", + "salary": "$1,200,000", + "start_date": "2009\/10\/09" + }, + "contact": [ + "London", + "5797" + ] + }, + { + "name": "Gavin Joyce", + "hr": { + "position": "Developer", + "salary": "$92,575", + "start_date": "2010\/12\/22" + }, + "contact": [ + "Edinburgh", + "8822" + ] + }, + { + "name": "Jennifer Chang", + "hr": { + "position": "Regional Director", + "salary": "$357,650", + "start_date": "2010\/11\/14" + }, + "contact": [ + "Singapore", + "9239" + ] + }, + { + "name": "Brenden Wagner", + "hr": { + "position": "Software Engineer", + "salary": "$206,850", + "start_date": "2011\/06\/07" + }, + "contact": [ + "San Francisco", + "1314" + ] + }, + { + "name": "Fiona Green", + "hr": { + "position": "Chief Operating Officer (COO)", + "salary": "$850,000", + "start_date": "2010\/03\/11" + }, + "contact": [ + "San Francisco", + "2947" + ] + }, + { + "name": "Shou Itou", + "hr": { + "position": "Regional Marketing", + "salary": "$163,000", + "start_date": "2011\/08\/14" + }, + "contact": [ + "Tokyo", + "8899" + ] + }, + { + "name": "Michelle House", + "hr": { + "position": "Integration Specialist", + "salary": "$95,400", + "start_date": "2011\/06\/02" + }, + "contact": [ + "Sidney", + "2769" + ] + }, + { + "name": "Suki Burks", + "hr": { + "position": "Developer", + "salary": "$114,500", + "start_date": "2009\/10\/22" + }, + "contact": [ + "London", + "6832" + ] + }, + { + "name": "Prescott Bartlett", + "hr": { + "position": "Technical Author", + "salary": "$145,000", + "start_date": "2011\/05\/07" + }, + "contact": [ + "London", + "3606" + ] + }, + { + "name": "Gavin Cortez", + "hr": { + "position": "Team Leader", + "salary": "$235,500", + "start_date": "2008\/10\/26" + }, + "contact": [ + "San Francisco", + "2860" + ] + }, + { + "name": "Martena Mccray", + "hr": { + "position": "Post-Sales support", + "salary": "$324,050", + "start_date": "2011\/03\/09" + }, + "contact": [ + "Edinburgh", + "8240" + ] + }, + { + "name": "Unity Butler", + "hr": { + "position": "Marketing Designer", + "salary": "$85,675", + "start_date": "2009\/12\/09" + }, + "contact": [ + "San Francisco", + "5384" + ] + }, + { + "name": "Howard Hatfield", + "hr": { + "position": "Office Manager", + "salary": "$164,500", + "start_date": "2008\/12\/16" + }, + "contact": [ + "San Francisco", + "7031" + ] + }, + { + "name": "Hope Fuentes", + "hr": { + "position": "Secretary", + "salary": "$109,850", + "start_date": "2010\/02\/12" + }, + "contact": [ + "San Francisco", + "6318" + ] + }, + { + "name": "Vivian Harrell", + "hr": { + "position": "Financial Controller", + "salary": "$452,500", + "start_date": "2009\/02\/14" + }, + "contact": [ + "San Francisco", + "9422" + ] + }, + { + "name": "Timothy Mooney", + "hr": { + "position": "Office Manager", + "salary": "$136,200", + "start_date": "2008\/12\/11" + }, + "contact": [ + "London", + "7580" + ] + }, + { + "name": "Jackson Bradshaw", + "hr": { + "position": "Director", + "salary": "$645,750", + "start_date": "2008\/09\/26" + }, + "contact": [ + "New York", + "1042" + ] + }, + { + "name": "Olivia Liang", + "hr": { + "position": "Support Engineer", + "salary": "$234,500", + "start_date": "2011\/02\/03" + }, + "contact": [ + "Singapore", + "2120" + ] + }, + { + "name": "Bruno Nash", + "hr": { + "position": "Software Engineer", + "salary": "$163,500", + "start_date": "2011\/05\/03" + }, + "contact": [ + "London", + "6222" + ] + }, + { + "name": "Sakura Yamamoto", + "hr": { + "position": "Support Engineer", + "salary": "$139,575", + "start_date": "2009\/08\/19" + }, + "contact": [ + "Tokyo", + "9383" + ] + }, + { + "name": "Thor Walton", + "hr": { + "position": "Developer", + "salary": "$98,540", + "start_date": "2013\/08\/11" + }, + "contact": [ + "New York", + "8327" + ] + }, + { + "name": "Finn Camacho", + "hr": { + "position": "Support Engineer", + "salary": "$87,500", + "start_date": "2009\/07\/07" + }, + "contact": [ + "San Francisco", + "2927" + ] + }, + { + "name": "Serge Baldwin", + "hr": { + "position": "Data Coordinator", + "salary": "$138,575", + "start_date": "2012\/04\/09" + }, + "contact": [ + "Singapore", + "8352" + ] + }, + { + "name": "Zenaida Frank", + "hr": { + "position": "Software Engineer", + "salary": "$125,250", + "start_date": "2010\/01\/04" + }, + "contact": [ + "New York", + "7439" + ] + }, + { + "name": "Zorita Serrano", + "hr": { + "position": "Software Engineer", + "salary": "$115,000", + "start_date": "2012\/06\/01" + }, + "contact": [ + "San Francisco", + "4389" + ] + }, + { + "name": "Jennifer Acosta", + "hr": { + "position": "Junior Javascript Developer", + "salary": "$75,650", + "start_date": "2013\/02\/01" + }, + "contact": [ + "Edinburgh", + "3431" + ] + }, + { + "name": "Cara Stevens", + "hr": { + "position": "Sales Assistant", + "salary": "$145,600", + "start_date": "2011\/12\/06" + }, + "contact": [ + "New York", + "3990" + ] + }, + { + "name": "Hermione Butler", + "hr": { + "position": "Regional Director", + "salary": "$356,250", + "start_date": "2011\/03\/21" + }, + "contact": [ + "London", + "1016" + ] + }, + { + "name": "Lael Greer", + "hr": { + "position": "Systems Administrator", + "salary": "$103,500", + "start_date": "2009\/02\/27" + }, + "contact": [ + "London", + "6733" + ] + }, + { + "name": "Jonas Alexander", + "hr": { + "position": "Developer", + "salary": "$86,500", + "start_date": "2010\/07\/14" + }, + "contact": [ + "San Francisco", + "8196" + ] + }, + { + "name": "Shad Decker", + "hr": { + "position": "Regional Director", + "salary": "$183,000", + "start_date": "2008\/11\/13" + }, + "contact": [ + "Edinburgh", + "6373" + ] + }, + { + "name": "Michael Bruce", + "hr": { + "position": "Javascript Developer", + "salary": "$183,000", + "start_date": "2011\/06\/27" + }, + "contact": [ + "Singapore", + "5384" + ] + }, + { + "name": "Donna Snider", + "hr": { + "position": "Customer Support", + "salary": "$112,000", + "start_date": "2011\/01\/25" + }, + "contact": [ + "New York", + "4226" + ] + } + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/objects_root_array.txt b/public/vendor/datatables/examples/ajax/data/objects_root_array.txt new file mode 100644 index 000000000000..1c2faf343983 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/objects_root_array.txt @@ -0,0 +1,458 @@ +[ + { + "name": "Tiger Nixon", + "position": "System Architect", + "salary": "$320,800", + "start_date": "2011\/04\/25", + "office": "Edinburgh", + "extn": "5421" + }, + { + "name": "Garrett Winters", + "position": "Accountant", + "salary": "$170,750", + "start_date": "2011\/07\/25", + "office": "Tokyo", + "extn": "8422" + }, + { + "name": "Ashton Cox", + "position": "Junior Technical Author", + "salary": "$86,000", + "start_date": "2009\/01\/12", + "office": "San Francisco", + "extn": "1562" + }, + { + "name": "Cedric Kelly", + "position": "Senior Javascript Developer", + "salary": "$433,060", + "start_date": "2012\/03\/29", + "office": "Edinburgh", + "extn": "6224" + }, + { + "name": "Airi Satou", + "position": "Accountant", + "salary": "$162,700", + "start_date": "2008\/11\/28", + "office": "Tokyo", + "extn": "5407" + }, + { + "name": "Brielle Williamson", + "position": "Integration Specialist", + "salary": "$372,000", + "start_date": "2012\/12\/02", + "office": "New York", + "extn": "4804" + }, + { + "name": "Herrod Chandler", + "position": "Sales Assistant", + "salary": "$137,500", + "start_date": "2012\/08\/06", + "office": "San Francisco", + "extn": "9608" + }, + { + "name": "Rhona Davidson", + "position": "Integration Specialist", + "salary": "$327,900", + "start_date": "2010\/10\/14", + "office": "Tokyo", + "extn": "6200" + }, + { + "name": "Colleen Hurst", + "position": "Javascript Developer", + "salary": "$205,500", + "start_date": "2009\/09\/15", + "office": "San Francisco", + "extn": "2360" + }, + { + "name": "Sonya Frost", + "position": "Software Engineer", + "salary": "$103,600", + "start_date": "2008\/12\/13", + "office": "Edinburgh", + "extn": "1667" + }, + { + "name": "Jena Gaines", + "position": "Office Manager", + "salary": "$90,560", + "start_date": "2008\/12\/19", + "office": "London", + "extn": "3814" + }, + { + "name": "Quinn Flynn", + "position": "Support Lead", + "salary": "$342,000", + "start_date": "2013\/03\/03", + "office": "Edinburgh", + "extn": "9497" + }, + { + "name": "Charde Marshall", + "position": "Regional Director", + "salary": "$470,600", + "start_date": "2008\/10\/16", + "office": "San Francisco", + "extn": "6741" + }, + { + "name": "Haley Kennedy", + "position": "Senior Marketing Designer", + "salary": "$313,500", + "start_date": "2012\/12\/18", + "office": "London", + "extn": "3597" + }, + { + "name": "Tatyana Fitzpatrick", + "position": "Regional Director", + "salary": "$385,750", + "start_date": "2010\/03\/17", + "office": "London", + "extn": "1965" + }, + { + "name": "Michael Silva", + "position": "Marketing Designer", + "salary": "$198,500", + "start_date": "2012\/11\/27", + "office": "London", + "extn": "1581" + }, + { + "name": "Paul Byrd", + "position": "Chief Financial Officer (CFO)", + "salary": "$725,000", + "start_date": "2010\/06\/09", + "office": "New York", + "extn": "3059" + }, + { + "name": "Gloria Little", + "position": "Systems Administrator", + "salary": "$237,500", + "start_date": "2009\/04\/10", + "office": "New York", + "extn": "1721" + }, + { + "name": "Bradley Greer", + "position": "Software Engineer", + "salary": "$132,000", + "start_date": "2012\/10\/13", + "office": "London", + "extn": "2558" + }, + { + "name": "Dai Rios", + "position": "Personnel Lead", + "salary": "$217,500", + "start_date": "2012\/09\/26", + "office": "Edinburgh", + "extn": "2290" + }, + { + "name": "Jenette Caldwell", + "position": "Development Lead", + "salary": "$345,000", + "start_date": "2011\/09\/03", + "office": "New York", + "extn": "1937" + }, + { + "name": "Yuri Berry", + "position": "Chief Marketing Officer (CMO)", + "salary": "$675,000", + "start_date": "2009\/06\/25", + "office": "New York", + "extn": "6154" + }, + { + "name": "Caesar Vance", + "position": "Pre-Sales Support", + "salary": "$106,450", + "start_date": "2011\/12\/12", + "office": "New York", + "extn": "8330" + }, + { + "name": "Doris Wilder", + "position": "Sales Assistant", + "salary": "$85,600", + "start_date": "2010\/09\/20", + "office": "Sidney", + "extn": "3023" + }, + { + "name": "Angelica Ramos", + "position": "Chief Executive Officer (CEO)", + "salary": "$1,200,000", + "start_date": "2009\/10\/09", + "office": "London", + "extn": "5797" + }, + { + "name": "Gavin Joyce", + "position": "Developer", + "salary": "$92,575", + "start_date": "2010\/12\/22", + "office": "Edinburgh", + "extn": "8822" + }, + { + "name": "Jennifer Chang", + "position": "Regional Director", + "salary": "$357,650", + "start_date": "2010\/11\/14", + "office": "Singapore", + "extn": "9239" + }, + { + "name": "Brenden Wagner", + "position": "Software Engineer", + "salary": "$206,850", + "start_date": "2011\/06\/07", + "office": "San Francisco", + "extn": "1314" + }, + { + "name": "Fiona Green", + "position": "Chief Operating Officer (COO)", + "salary": "$850,000", + "start_date": "2010\/03\/11", + "office": "San Francisco", + "extn": "2947" + }, + { + "name": "Shou Itou", + "position": "Regional Marketing", + "salary": "$163,000", + "start_date": "2011\/08\/14", + "office": "Tokyo", + "extn": "8899" + }, + { + "name": "Michelle House", + "position": "Integration Specialist", + "salary": "$95,400", + "start_date": "2011\/06\/02", + "office": "Sidney", + "extn": "2769" + }, + { + "name": "Suki Burks", + "position": "Developer", + "salary": "$114,500", + "start_date": "2009\/10\/22", + "office": "London", + "extn": "6832" + }, + { + "name": "Prescott Bartlett", + "position": "Technical Author", + "salary": "$145,000", + "start_date": "2011\/05\/07", + "office": "London", + "extn": "3606" + }, + { + "name": "Gavin Cortez", + "position": "Team Leader", + "salary": "$235,500", + "start_date": "2008\/10\/26", + "office": "San Francisco", + "extn": "2860" + }, + { + "name": "Martena Mccray", + "position": "Post-Sales support", + "salary": "$324,050", + "start_date": "2011\/03\/09", + "office": "Edinburgh", + "extn": "8240" + }, + { + "name": "Unity Butler", + "position": "Marketing Designer", + "salary": "$85,675", + "start_date": "2009\/12\/09", + "office": "San Francisco", + "extn": "5384" + }, + { + "name": "Howard Hatfield", + "position": "Office Manager", + "salary": "$164,500", + "start_date": "2008\/12\/16", + "office": "San Francisco", + "extn": "7031" + }, + { + "name": "Hope Fuentes", + "position": "Secretary", + "salary": "$109,850", + "start_date": "2010\/02\/12", + "office": "San Francisco", + "extn": "6318" + }, + { + "name": "Vivian Harrell", + "position": "Financial Controller", + "salary": "$452,500", + "start_date": "2009\/02\/14", + "office": "San Francisco", + "extn": "9422" + }, + { + "name": "Timothy Mooney", + "position": "Office Manager", + "salary": "$136,200", + "start_date": "2008\/12\/11", + "office": "London", + "extn": "7580" + }, + { + "name": "Jackson Bradshaw", + "position": "Director", + "salary": "$645,750", + "start_date": "2008\/09\/26", + "office": "New York", + "extn": "1042" + }, + { + "name": "Olivia Liang", + "position": "Support Engineer", + "salary": "$234,500", + "start_date": "2011\/02\/03", + "office": "Singapore", + "extn": "2120" + }, + { + "name": "Bruno Nash", + "position": "Software Engineer", + "salary": "$163,500", + "start_date": "2011\/05\/03", + "office": "London", + "extn": "6222" + }, + { + "name": "Sakura Yamamoto", + "position": "Support Engineer", + "salary": "$139,575", + "start_date": "2009\/08\/19", + "office": "Tokyo", + "extn": "9383" + }, + { + "name": "Thor Walton", + "position": "Developer", + "salary": "$98,540", + "start_date": "2013\/08\/11", + "office": "New York", + "extn": "8327" + }, + { + "name": "Finn Camacho", + "position": "Support Engineer", + "salary": "$87,500", + "start_date": "2009\/07\/07", + "office": "San Francisco", + "extn": "2927" + }, + { + "name": "Serge Baldwin", + "position": "Data Coordinator", + "salary": "$138,575", + "start_date": "2012\/04\/09", + "office": "Singapore", + "extn": "8352" + }, + { + "name": "Zenaida Frank", + "position": "Software Engineer", + "salary": "$125,250", + "start_date": "2010\/01\/04", + "office": "New York", + "extn": "7439" + }, + { + "name": "Zorita Serrano", + "position": "Software Engineer", + "salary": "$115,000", + "start_date": "2012\/06\/01", + "office": "San Francisco", + "extn": "4389" + }, + { + "name": "Jennifer Acosta", + "position": "Junior Javascript Developer", + "salary": "$75,650", + "start_date": "2013\/02\/01", + "office": "Edinburgh", + "extn": "3431" + }, + { + "name": "Cara Stevens", + "position": "Sales Assistant", + "salary": "$145,600", + "start_date": "2011\/12\/06", + "office": "New York", + "extn": "3990" + }, + { + "name": "Hermione Butler", + "position": "Regional Director", + "salary": "$356,250", + "start_date": "2011\/03\/21", + "office": "London", + "extn": "1016" + }, + { + "name": "Lael Greer", + "position": "Systems Administrator", + "salary": "$103,500", + "start_date": "2009\/02\/27", + "office": "London", + "extn": "6733" + }, + { + "name": "Jonas Alexander", + "position": "Developer", + "salary": "$86,500", + "start_date": "2010\/07\/14", + "office": "San Francisco", + "extn": "8196" + }, + { + "name": "Shad Decker", + "position": "Regional Director", + "salary": "$183,000", + "start_date": "2008\/11\/13", + "office": "Edinburgh", + "extn": "6373" + }, + { + "name": "Michael Bruce", + "position": "Javascript Developer", + "salary": "$183,000", + "start_date": "2011\/06\/27", + "office": "Singapore", + "extn": "5384" + }, + { + "name": "Donna Snider", + "position": "Customer Support", + "salary": "$112,000", + "start_date": "2011\/01\/25", + "office": "New York", + "extn": "4226" + } +] \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/objects_subarrays.txt b/public/vendor/datatables/examples/ajax/data/objects_subarrays.txt new file mode 100644 index 000000000000..fd4b0ffdc9a8 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/objects_subarrays.txt @@ -0,0 +1,745 @@ +{ + "data": [ + { + "name": [ + "Nixon", + "Tiger" + ], + "hr": [ + "System Architect", + "$320,800", + "2011\/04\/25" + ], + "office": "Edinburgh", + "extn": "5421" + }, + { + "name": [ + "Winters", + "Garrett" + ], + "hr": [ + "Accountant", + "$170,750", + "2011\/07\/25" + ], + "office": "Tokyo", + "extn": "8422" + }, + { + "name": [ + "Cox", + "Ashton" + ], + "hr": [ + "Junior Technical Author", + "$86,000", + "2009\/01\/12" + ], + "office": "San Francisco", + "extn": "1562" + }, + { + "name": [ + "Kelly", + "Cedric" + ], + "hr": [ + "Senior Javascript Developer", + "$433,060", + "2012\/03\/29" + ], + "office": "Edinburgh", + "extn": "6224" + }, + { + "name": [ + "Satou", + "Airi" + ], + "hr": [ + "Accountant", + "$162,700", + "2008\/11\/28" + ], + "office": "Tokyo", + "extn": "5407" + }, + { + "name": [ + "Williamson", + "Brielle" + ], + "hr": [ + "Integration Specialist", + "$372,000", + "2012\/12\/02" + ], + "office": "New York", + "extn": "4804" + }, + { + "name": [ + "Chandler", + "Herrod" + ], + "hr": [ + "Sales Assistant", + "$137,500", + "2012\/08\/06" + ], + "office": "San Francisco", + "extn": "9608" + }, + { + "name": [ + "Davidson", + "Rhona" + ], + "hr": [ + "Integration Specialist", + "$327,900", + "2010\/10\/14" + ], + "office": "Tokyo", + "extn": "6200" + }, + { + "name": [ + "Hurst", + "Colleen" + ], + "hr": [ + "Javascript Developer", + "$205,500", + "2009\/09\/15" + ], + "office": "San Francisco", + "extn": "2360" + }, + { + "name": [ + "Frost", + "Sonya" + ], + "hr": [ + "Software Engineer", + "$103,600", + "2008\/12\/13" + ], + "office": "Edinburgh", + "extn": "1667" + }, + { + "name": [ + "Gaines", + "Jena" + ], + "hr": [ + "Office Manager", + "$90,560", + "2008\/12\/19" + ], + "office": "London", + "extn": "3814" + }, + { + "name": [ + "Flynn", + "Quinn" + ], + "hr": [ + "Support Lead", + "$342,000", + "2013\/03\/03" + ], + "office": "Edinburgh", + "extn": "9497" + }, + { + "name": [ + "Marshall", + "Charde" + ], + "hr": [ + "Regional Director", + "$470,600", + "2008\/10\/16" + ], + "office": "San Francisco", + "extn": "6741" + }, + { + "name": [ + "Kennedy", + "Haley" + ], + "hr": [ + "Senior Marketing Designer", + "$313,500", + "2012\/12\/18" + ], + "office": "London", + "extn": "3597" + }, + { + "name": [ + "Fitzpatrick", + "Tatyana" + ], + "hr": [ + "Regional Director", + "$385,750", + "2010\/03\/17" + ], + "office": "London", + "extn": "1965" + }, + { + "name": [ + "Silva", + "Michael" + ], + "hr": [ + "Marketing Designer", + "$198,500", + "2012\/11\/27" + ], + "office": "London", + "extn": "1581" + }, + { + "name": [ + "Byrd", + "Paul" + ], + "hr": [ + "Chief Financial Officer (CFO)", + "$725,000", + "2010\/06\/09" + ], + "office": "New York", + "extn": "3059" + }, + { + "name": [ + "Little", + "Gloria" + ], + "hr": [ + "Systems Administrator", + "$237,500", + "2009\/04\/10" + ], + "office": "New York", + "extn": "1721" + }, + { + "name": [ + "Greer", + "Bradley" + ], + "hr": [ + "Software Engineer", + "$132,000", + "2012\/10\/13" + ], + "office": "London", + "extn": "2558" + }, + { + "name": [ + "Rios", + "Dai" + ], + "hr": [ + "Personnel Lead", + "$217,500", + "2012\/09\/26" + ], + "office": "Edinburgh", + "extn": "2290" + }, + { + "name": [ + "Caldwell", + "Jenette" + ], + "hr": [ + "Development Lead", + "$345,000", + "2011\/09\/03" + ], + "office": "New York", + "extn": "1937" + }, + { + "name": [ + "Berry", + "Yuri" + ], + "hr": [ + "Chief Marketing Officer (CMO)", + "$675,000", + "2009\/06\/25" + ], + "office": "New York", + "extn": "6154" + }, + { + "name": [ + "Vance", + "Caesar" + ], + "hr": [ + "Pre-Sales Support", + "$106,450", + "2011\/12\/12" + ], + "office": "New York", + "extn": "8330" + }, + { + "name": [ + "Wilder", + "Doris" + ], + "hr": [ + "Sales Assistant", + "$85,600", + "2010\/09\/20" + ], + "office": "Sidney", + "extn": "3023" + }, + { + "name": [ + "Ramos", + "Angelica" + ], + "hr": [ + "Chief Executive Officer (CEO)", + "$1,200,000", + "2009\/10\/09" + ], + "office": "London", + "extn": "5797" + }, + { + "name": [ + "Joyce", + "Gavin" + ], + "hr": [ + "Developer", + "$92,575", + "2010\/12\/22" + ], + "office": "Edinburgh", + "extn": "8822" + }, + { + "name": [ + "Chang", + "Jennifer" + ], + "hr": [ + "Regional Director", + "$357,650", + "2010\/11\/14" + ], + "office": "Singapore", + "extn": "9239" + }, + { + "name": [ + "Wagner", + "Brenden" + ], + "hr": [ + "Software Engineer", + "$206,850", + "2011\/06\/07" + ], + "office": "San Francisco", + "extn": "1314" + }, + { + "name": [ + "Green", + "Fiona" + ], + "hr": [ + "Chief Operating Officer (COO)", + "$850,000", + "2010\/03\/11" + ], + "office": "San Francisco", + "extn": "2947" + }, + { + "name": [ + "Itou", + "Shou" + ], + "hr": [ + "Regional Marketing", + "$163,000", + "2011\/08\/14" + ], + "office": "Tokyo", + "extn": "8899" + }, + { + "name": [ + "House", + "Michelle" + ], + "hr": [ + "Integration Specialist", + "$95,400", + "2011\/06\/02" + ], + "office": "Sidney", + "extn": "2769" + }, + { + "name": [ + "Burks", + "Suki" + ], + "hr": [ + "Developer", + "$114,500", + "2009\/10\/22" + ], + "office": "London", + "extn": "6832" + }, + { + "name": [ + "Bartlett", + "Prescott" + ], + "hr": [ + "Technical Author", + "$145,000", + "2011\/05\/07" + ], + "office": "London", + "extn": "3606" + }, + { + "name": [ + "Cortez", + "Gavin" + ], + "hr": [ + "Team Leader", + "$235,500", + "2008\/10\/26" + ], + "office": "San Francisco", + "extn": "2860" + }, + { + "name": [ + "Mccray", + "Martena" + ], + "hr": [ + "Post-Sales support", + "$324,050", + "2011\/03\/09" + ], + "office": "Edinburgh", + "extn": "8240" + }, + { + "name": [ + "Butler", + "Unity" + ], + "hr": [ + "Marketing Designer", + "$85,675", + "2009\/12\/09" + ], + "office": "San Francisco", + "extn": "5384" + }, + { + "name": [ + "Hatfield", + "Howard" + ], + "hr": [ + "Office Manager", + "$164,500", + "2008\/12\/16" + ], + "office": "San Francisco", + "extn": "7031" + }, + { + "name": [ + "Fuentes", + "Hope" + ], + "hr": [ + "Secretary", + "$109,850", + "2010\/02\/12" + ], + "office": "San Francisco", + "extn": "6318" + }, + { + "name": [ + "Harrell", + "Vivian" + ], + "hr": [ + "Financial Controller", + "$452,500", + "2009\/02\/14" + ], + "office": "San Francisco", + "extn": "9422" + }, + { + "name": [ + "Mooney", + "Timothy" + ], + "hr": [ + "Office Manager", + "$136,200", + "2008\/12\/11" + ], + "office": "London", + "extn": "7580" + }, + { + "name": [ + "Bradshaw", + "Jackson" + ], + "hr": [ + "Director", + "$645,750", + "2008\/09\/26" + ], + "office": "New York", + "extn": "1042" + }, + { + "name": [ + "Liang", + "Olivia" + ], + "hr": [ + "Support Engineer", + "$234,500", + "2011\/02\/03" + ], + "office": "Singapore", + "extn": "2120" + }, + { + "name": [ + "Nash", + "Bruno" + ], + "hr": [ + "Software Engineer", + "$163,500", + "2011\/05\/03" + ], + "office": "London", + "extn": "6222" + }, + { + "name": [ + "Yamamoto", + "Sakura" + ], + "hr": [ + "Support Engineer", + "$139,575", + "2009\/08\/19" + ], + "office": "Tokyo", + "extn": "9383" + }, + { + "name": [ + "Walton", + "Thor" + ], + "hr": [ + "Developer", + "$98,540", + "2013\/08\/11" + ], + "office": "New York", + "extn": "8327" + }, + { + "name": [ + "Camacho", + "Finn" + ], + "hr": [ + "Support Engineer", + "$87,500", + "2009\/07\/07" + ], + "office": "San Francisco", + "extn": "2927" + }, + { + "name": [ + "Baldwin", + "Serge" + ], + "hr": [ + "Data Coordinator", + "$138,575", + "2012\/04\/09" + ], + "office": "Singapore", + "extn": "8352" + }, + { + "name": [ + "Frank", + "Zenaida" + ], + "hr": [ + "Software Engineer", + "$125,250", + "2010\/01\/04" + ], + "office": "New York", + "extn": "7439" + }, + { + "name": [ + "Serrano", + "Zorita" + ], + "hr": [ + "Software Engineer", + "$115,000", + "2012\/06\/01" + ], + "office": "San Francisco", + "extn": "4389" + }, + { + "name": [ + "Acosta", + "Jennifer" + ], + "hr": [ + "Junior Javascript Developer", + "$75,650", + "2013\/02\/01" + ], + "office": "Edinburgh", + "extn": "3431" + }, + { + "name": [ + "Stevens", + "Cara" + ], + "hr": [ + "Sales Assistant", + "$145,600", + "2011\/12\/06" + ], + "office": "New York", + "extn": "3990" + }, + { + "name": [ + "Butler", + "Hermione" + ], + "hr": [ + "Regional Director", + "$356,250", + "2011\/03\/21" + ], + "office": "London", + "extn": "1016" + }, + { + "name": [ + "Greer", + "Lael" + ], + "hr": [ + "Systems Administrator", + "$103,500", + "2009\/02\/27" + ], + "office": "London", + "extn": "6733" + }, + { + "name": [ + "Alexander", + "Jonas" + ], + "hr": [ + "Developer", + "$86,500", + "2010\/07\/14" + ], + "office": "San Francisco", + "extn": "8196" + }, + { + "name": [ + "Decker", + "Shad" + ], + "hr": [ + "Regional Director", + "$183,000", + "2008\/11\/13" + ], + "office": "Edinburgh", + "extn": "6373" + }, + { + "name": [ + "Bruce", + "Michael" + ], + "hr": [ + "Javascript Developer", + "$183,000", + "2011\/06\/27" + ], + "office": "Singapore", + "extn": "5384" + }, + { + "name": [ + "Snider", + "Donna" + ], + "hr": [ + "Customer Support", + "$112,000", + "2011\/01\/25" + ], + "office": "New York", + "extn": "4226" + } + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/data/orthogonal.txt b/public/vendor/datatables/examples/ajax/data/orthogonal.txt new file mode 100644 index 000000000000..3e87249dbcf2 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/data/orthogonal.txt @@ -0,0 +1,631 @@ +{ + "data": [ + { + "name": "Tiger Nixon", + "position": "System Architect", + "salary": "$320,800", + "start_date": { + "display": "Mon 25th Apr 11", + "timestamp": "1303682400" + }, + "office": "Edinburgh", + "extn": "5421" + }, + { + "name": "Garrett Winters", + "position": "Accountant", + "salary": "$170,750", + "start_date": { + "display": "Mon 25th Jul 11", + "timestamp": "1311544800" + }, + "office": "Tokyo", + "extn": "8422" + }, + { + "name": "Ashton Cox", + "position": "Junior Technical Author", + "salary": "$86,000", + "start_date": { + "display": "Mon 12th Jan 09", + "timestamp": "1231714800" + }, + "office": "San Francisco", + "extn": "1562" + }, + { + "name": "Cedric Kelly", + "position": "Senior Javascript Developer", + "salary": "$433,060", + "start_date": { + "display": "Thu 29th Mar 12", + "timestamp": "1332972000" + }, + "office": "Edinburgh", + "extn": "6224" + }, + { + "name": "Airi Satou", + "position": "Accountant", + "salary": "$162,700", + "start_date": { + "display": "Fri 28th Nov 08", + "timestamp": "1227826800" + }, + "office": "Tokyo", + "extn": "5407" + }, + { + "name": "Brielle Williamson", + "position": "Integration Specialist", + "salary": "$372,000", + "start_date": { + "display": "Sun 2nd Dec 12", + "timestamp": "1354402800" + }, + "office": "New York", + "extn": "4804" + }, + { + "name": "Herrod Chandler", + "position": "Sales Assistant", + "salary": "$137,500", + "start_date": { + "display": "Mon 6th Aug 12", + "timestamp": "1344204000" + }, + "office": "San Francisco", + "extn": "9608" + }, + { + "name": "Rhona Davidson", + "position": "Integration Specialist", + "salary": "$327,900", + "start_date": { + "display": "Thu 14th Oct 10", + "timestamp": "1287007200" + }, + "office": "Tokyo", + "extn": "6200" + }, + { + "name": "Colleen Hurst", + "position": "Javascript Developer", + "salary": "$205,500", + "start_date": { + "display": "Tue 15th Sep 09", + "timestamp": "1252965600" + }, + "office": "San Francisco", + "extn": "2360" + }, + { + "name": "Sonya Frost", + "position": "Software Engineer", + "salary": "$103,600", + "start_date": { + "display": "Sat 13th Dec 08", + "timestamp": "1229122800" + }, + "office": "Edinburgh", + "extn": "1667" + }, + { + "name": "Jena Gaines", + "position": "Office Manager", + "salary": "$90,560", + "start_date": { + "display": "Fri 19th Dec 08", + "timestamp": "1229641200" + }, + "office": "London", + "extn": "3814" + }, + { + "name": "Quinn Flynn", + "position": "Support Lead", + "salary": "$342,000", + "start_date": { + "display": "Sun 3rd Mar 13", + "timestamp": "1362265200" + }, + "office": "Edinburgh", + "extn": "9497" + }, + { + "name": "Charde Marshall", + "position": "Regional Director", + "salary": "$470,600", + "start_date": { + "display": "Thu 16th Oct 08", + "timestamp": "1224108000" + }, + "office": "San Francisco", + "extn": "6741" + }, + { + "name": "Haley Kennedy", + "position": "Senior Marketing Designer", + "salary": "$313,500", + "start_date": { + "display": "Tue 18th Dec 12", + "timestamp": "1355785200" + }, + "office": "London", + "extn": "3597" + }, + { + "name": "Tatyana Fitzpatrick", + "position": "Regional Director", + "salary": "$385,750", + "start_date": { + "display": "Wed 17th Mar 10", + "timestamp": "1268780400" + }, + "office": "London", + "extn": "1965" + }, + { + "name": "Michael Silva", + "position": "Marketing Designer", + "salary": "$198,500", + "start_date": { + "display": "Tue 27th Nov 12", + "timestamp": "1353970800" + }, + "office": "London", + "extn": "1581" + }, + { + "name": "Paul Byrd", + "position": "Chief Financial Officer (CFO)", + "salary": "$725,000", + "start_date": { + "display": "Wed 9th Jun 10", + "timestamp": "1276034400" + }, + "office": "New York", + "extn": "3059" + }, + { + "name": "Gloria Little", + "position": "Systems Administrator", + "salary": "$237,500", + "start_date": { + "display": "Fri 10th Apr 09", + "timestamp": "1239314400" + }, + "office": "New York", + "extn": "1721" + }, + { + "name": "Bradley Greer", + "position": "Software Engineer", + "salary": "$132,000", + "start_date": { + "display": "Sat 13th Oct 12", + "timestamp": "1350079200" + }, + "office": "London", + "extn": "2558" + }, + { + "name": "Dai Rios", + "position": "Personnel Lead", + "salary": "$217,500", + "start_date": { + "display": "Wed 26th Sep 12", + "timestamp": "1348610400" + }, + "office": "Edinburgh", + "extn": "2290" + }, + { + "name": "Jenette Caldwell", + "position": "Development Lead", + "salary": "$345,000", + "start_date": { + "display": "Sat 3rd Sep 11", + "timestamp": "1315000800" + }, + "office": "New York", + "extn": "1937" + }, + { + "name": "Yuri Berry", + "position": "Chief Marketing Officer (CMO)", + "salary": "$675,000", + "start_date": { + "display": "Thu 25th Jun 09", + "timestamp": "1245880800" + }, + "office": "New York", + "extn": "6154" + }, + { + "name": "Caesar Vance", + "position": "Pre-Sales Support", + "salary": "$106,450", + "start_date": { + "display": "Mon 12th Dec 11", + "timestamp": "1323644400" + }, + "office": "New York", + "extn": "8330" + }, + { + "name": "Doris Wilder", + "position": "Sales Assistant", + "salary": "$85,600", + "start_date": { + "display": "Mon 20th Sep 10", + "timestamp": "1284933600" + }, + "office": "Sidney", + "extn": "3023" + }, + { + "name": "Angelica Ramos", + "position": "Chief Executive Officer (CEO)", + "salary": "$1,200,000", + "start_date": { + "display": "Fri 9th Oct 09", + "timestamp": "1255039200" + }, + "office": "London", + "extn": "5797" + }, + { + "name": "Gavin Joyce", + "position": "Developer", + "salary": "$92,575", + "start_date": { + "display": "Wed 22nd Dec 10", + "timestamp": "1292972400" + }, + "office": "Edinburgh", + "extn": "8822" + }, + { + "name": "Jennifer Chang", + "position": "Regional Director", + "salary": "$357,650", + "start_date": { + "display": "Sun 14th Nov 10", + "timestamp": "1289689200" + }, + "office": "Singapore", + "extn": "9239" + }, + { + "name": "Brenden Wagner", + "position": "Software Engineer", + "salary": "$206,850", + "start_date": { + "display": "Tue 7th Jun 11", + "timestamp": "1307397600" + }, + "office": "San Francisco", + "extn": "1314" + }, + { + "name": "Fiona Green", + "position": "Chief Operating Officer (COO)", + "salary": "$850,000", + "start_date": { + "display": "Thu 11th Mar 10", + "timestamp": "1268262000" + }, + "office": "San Francisco", + "extn": "2947" + }, + { + "name": "Shou Itou", + "position": "Regional Marketing", + "salary": "$163,000", + "start_date": { + "display": "Sun 14th Aug 11", + "timestamp": "1313272800" + }, + "office": "Tokyo", + "extn": "8899" + }, + { + "name": "Michelle House", + "position": "Integration Specialist", + "salary": "$95,400", + "start_date": { + "display": "Thu 2nd Jun 11", + "timestamp": "1306965600" + }, + "office": "Sidney", + "extn": "2769" + }, + { + "name": "Suki Burks", + "position": "Developer", + "salary": "$114,500", + "start_date": { + "display": "Thu 22nd Oct 09", + "timestamp": "1256162400" + }, + "office": "London", + "extn": "6832" + }, + { + "name": "Prescott Bartlett", + "position": "Technical Author", + "salary": "$145,000", + "start_date": { + "display": "Sat 7th May 11", + "timestamp": "1304719200" + }, + "office": "London", + "extn": "3606" + }, + { + "name": "Gavin Cortez", + "position": "Team Leader", + "salary": "$235,500", + "start_date": { + "display": "Sun 26th Oct 08", + "timestamp": "1224972000" + }, + "office": "San Francisco", + "extn": "2860" + }, + { + "name": "Martena Mccray", + "position": "Post-Sales support", + "salary": "$324,050", + "start_date": { + "display": "Wed 9th Mar 11", + "timestamp": "1299625200" + }, + "office": "Edinburgh", + "extn": "8240" + }, + { + "name": "Unity Butler", + "position": "Marketing Designer", + "salary": "$85,675", + "start_date": { + "display": "Wed 9th Dec 09", + "timestamp": "1260313200" + }, + "office": "San Francisco", + "extn": "5384" + }, + { + "name": "Howard Hatfield", + "position": "Office Manager", + "salary": "$164,500", + "start_date": { + "display": "Tue 16th Dec 08", + "timestamp": "1229382000" + }, + "office": "San Francisco", + "extn": "7031" + }, + { + "name": "Hope Fuentes", + "position": "Secretary", + "salary": "$109,850", + "start_date": { + "display": "Fri 12th Feb 10", + "timestamp": "1265929200" + }, + "office": "San Francisco", + "extn": "6318" + }, + { + "name": "Vivian Harrell", + "position": "Financial Controller", + "salary": "$452,500", + "start_date": { + "display": "Sat 14th Feb 09", + "timestamp": "1234566000" + }, + "office": "San Francisco", + "extn": "9422" + }, + { + "name": "Timothy Mooney", + "position": "Office Manager", + "salary": "$136,200", + "start_date": { + "display": "Thu 11th Dec 08", + "timestamp": "1228950000" + }, + "office": "London", + "extn": "7580" + }, + { + "name": "Jackson Bradshaw", + "position": "Director", + "salary": "$645,750", + "start_date": { + "display": "Fri 26th Sep 08", + "timestamp": "1222380000" + }, + "office": "New York", + "extn": "1042" + }, + { + "name": "Olivia Liang", + "position": "Support Engineer", + "salary": "$234,500", + "start_date": { + "display": "Thu 3rd Feb 11", + "timestamp": "1296687600" + }, + "office": "Singapore", + "extn": "2120" + }, + { + "name": "Bruno Nash", + "position": "Software Engineer", + "salary": "$163,500", + "start_date": { + "display": "Tue 3rd May 11", + "timestamp": "1304373600" + }, + "office": "London", + "extn": "6222" + }, + { + "name": "Sakura Yamamoto", + "position": "Support Engineer", + "salary": "$139,575", + "start_date": { + "display": "Wed 19th Aug 09", + "timestamp": "1250632800" + }, + "office": "Tokyo", + "extn": "9383" + }, + { + "name": "Thor Walton", + "position": "Developer", + "salary": "$98,540", + "start_date": { + "display": "Sun 11th Aug 13", + "timestamp": "1376172000" + }, + "office": "New York", + "extn": "8327" + }, + { + "name": "Finn Camacho", + "position": "Support Engineer", + "salary": "$87,500", + "start_date": { + "display": "Tue 7th Jul 09", + "timestamp": "1246917600" + }, + "office": "San Francisco", + "extn": "2927" + }, + { + "name": "Serge Baldwin", + "position": "Data Coordinator", + "salary": "$138,575", + "start_date": { + "display": "Mon 9th Apr 12", + "timestamp": "1333922400" + }, + "office": "Singapore", + "extn": "8352" + }, + { + "name": "Zenaida Frank", + "position": "Software Engineer", + "salary": "$125,250", + "start_date": { + "display": "Mon 4th Jan 10", + "timestamp": "1262559600" + }, + "office": "New York", + "extn": "7439" + }, + { + "name": "Zorita Serrano", + "position": "Software Engineer", + "salary": "$115,000", + "start_date": { + "display": "Fri 1st Jun 12", + "timestamp": "1338501600" + }, + "office": "San Francisco", + "extn": "4389" + }, + { + "name": "Jennifer Acosta", + "position": "Junior Javascript Developer", + "salary": "$75,650", + "start_date": { + "display": "Fri 1st Feb 13", + "timestamp": "1359673200" + }, + "office": "Edinburgh", + "extn": "3431" + }, + { + "name": "Cara Stevens", + "position": "Sales Assistant", + "salary": "$145,600", + "start_date": { + "display": "Tue 6th Dec 11", + "timestamp": "1323126000" + }, + "office": "New York", + "extn": "3990" + }, + { + "name": "Hermione Butler", + "position": "Regional Director", + "salary": "$356,250", + "start_date": { + "display": "Mon 21st Mar 11", + "timestamp": "1300662000" + }, + "office": "London", + "extn": "1016" + }, + { + "name": "Lael Greer", + "position": "Systems Administrator", + "salary": "$103,500", + "start_date": { + "display": "Fri 27th Feb 09", + "timestamp": "1235689200" + }, + "office": "London", + "extn": "6733" + }, + { + "name": "Jonas Alexander", + "position": "Developer", + "salary": "$86,500", + "start_date": { + "display": "Wed 14th Jul 10", + "timestamp": "1279058400" + }, + "office": "San Francisco", + "extn": "8196" + }, + { + "name": "Shad Decker", + "position": "Regional Director", + "salary": "$183,000", + "start_date": { + "display": "Thu 13th Nov 08", + "timestamp": "1226530800" + }, + "office": "Edinburgh", + "extn": "6373" + }, + { + "name": "Michael Bruce", + "position": "Javascript Developer", + "salary": "$183,000", + "start_date": { + "display": "Mon 27th Jun 11", + "timestamp": "1309125600" + }, + "office": "Singapore", + "extn": "5384" + }, + { + "name": "Donna Snider", + "position": "Customer Support", + "salary": "$112,000", + "start_date": { + "display": "Tue 25th Jan 11", + "timestamp": "1295910000" + }, + "office": "New York", + "extn": "4226" + } + ] +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/index.html b/public/vendor/datatables/examples/ajax/index.html new file mode 100644 index 000000000000..35af458fca89 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/index.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + DataTables examples - Ajax sourced data + + + +
+
+

DataTables example - Ajax sourced data

+ +
+

DataTables can read data from a server via Ajax, while still performing searching, ordering, paging + etc on the client-side. This is done through use of the ajax option, which has a number of options to customise how the data + is retrieved from the server.

+ +

The examples in this section demonstrate the use of Ajax loading data in DataTables, with + client-side processing.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/orthogonal-data.html b/public/vendor/datatables/examples/ajax/orthogonal-data.html new file mode 100644 index 000000000000..752845de6a45 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/orthogonal-data.html @@ -0,0 +1,337 @@ + + + + + + + DataTables example - Orthogonal data + + + + + + + + + + + + +
+
+

DataTables example - Orthogonal data

+ +
+

To try and make life easy, by default, DataTables expects arrays to be used as the data source for + rows in the table. However, this isn't always useful, and you may wish to have DataTables use objects + as the data source for each row (i.e. each row has its data described by an object) as this can make + working with the data much more understandable, particularly if you are using the API and you don't + need to keep track of array indexes.

+ +

This can be done quite simply by using the columns.data option which you use to tell DataTables which property + to use from the data source object for each column.

+ +

In this example the Ajax source returns an array of objects, which DataTables uses to display the + table. The structure of the row's data source in this example is:

+
+{
+	"name":	   "Tiger Nixon",
+	"position":   "System Architect",
+	"salary":	 "$3,120",
+	"start_date": {
+		"display": "Mon 25th Apr 11",
+		"timestamp": "1303682400"
+	},
+	"office":	 "Edinburgh",
+	"extn":	   "5421"
+}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeExtn.Start dateSalary
NamePositionOfficeExtn.Start dateSalary
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + ajax: "data/orthogonal.txt", + columns: [ + { data: "name" }, + { data: "position" }, + { data: "office" }, + { data: "extn" }, + { data: { + _: "start_date.display", + sort: "start_date.timestamp" + } }, + { data: "salary" } + ] + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/ajax/simple.html b/public/vendor/datatables/examples/ajax/simple.html new file mode 100644 index 000000000000..b0afb04e12e2 --- /dev/null +++ b/public/vendor/datatables/examples/ajax/simple.html @@ -0,0 +1,319 @@ + + + + + + + DataTables example - Ajax data source (arrays) + + + + + + + + + + + + +
+
+

DataTables example - Ajax data source (arrays)

+ +
+

DataTables has the ability to read data from virtually any JSON data source that can be obtained by + Ajax. This can be done, in its most simple form, by setting the ajax option to the address of the JSON data source.

+ +

The ajax option also allows for more advanced configuration such as + altering how the Ajax request is made. See the ajax documentation or the other Ajax examples for DataTables for + further information.

+ +

By default DataTables will assume that an array data source is to be used and will read the + information to be displayed in each column from the row's array using the column index, making working + with arrays very simple (note that this can be changed, or objects used may using the columns.data option, shown in other examples).

+ +

The example below shows DataTables loading data for a table from arrays as the data source, where + the structure of the row's data source in this example is:

+
+[
+	"Tiger Nixon",
+	"System Architect",
+	"Edinburgh",
+	"5421",
+	"2011/04/25",
+	"$3,120"
+]
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeExtn.Start dateSalary
NamePositionOfficeExtn.Start dateSalary
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + "ajax": "data/arrays.txt" + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/api/counter_columns.html b/public/vendor/datatables/examples/api/counter_columns.html new file mode 100644 index 000000000000..41ad92a78c65 --- /dev/null +++ b/public/vendor/datatables/examples/api/counter_columns.html @@ -0,0 +1,785 @@ + + + + + + + DataTables example - Index column + + + + + + + + + + + + +
+
+

DataTables example - Index column

+ +
+

A fairly common requirement for highly interactive tables which are displayed on the web is to have + a column which with a 'counter' for the row number. This column should not be sortable, and will change + dynamically as the ordering and searching applied to the table is altered by the end user.

+ +

This example shows how this can be achieved with DataTables, where the first column is the counter + column, and is updated when ordering or searching occurs. This is done by listening for the order and + search + events emitted by the table. When these events are detected the column().nodes() method is used to get the TD/TH nodes for the target column + and the each() helper function used to iterate over each, which have their contents + updated as needed. Note that the filter and order options are using in the + column() method to get the nodes in the current order and with the currently + applied filter.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeSalary
NamePositionOfficeAgeSalary
Tiger NixonSystem ArchitectEdinburgh61$320,800
Garrett WintersAccountantTokyo63$170,750
Ashton CoxJunior Technical AuthorSan Francisco66$86,000
Cedric KellySenior Javascript DeveloperEdinburgh22$433,060
Airi SatouAccountantTokyo33$162,700
Brielle WilliamsonIntegration SpecialistNew York61$372,000
Herrod ChandlerSales AssistantSan Francisco59$137,500
Rhona DavidsonIntegration SpecialistTokyo55$327,900
Colleen HurstJavascript DeveloperSan Francisco39$205,500
Sonya FrostSoftware EngineerEdinburgh23$103,600
Jena GainesOffice ManagerLondon30$90,560
Quinn FlynnSupport LeadEdinburgh22$342,000
Charde MarshallRegional DirectorSan Francisco36$470,600
Haley KennedySenior Marketing DesignerLondon43$313,500
Tatyana FitzpatrickRegional DirectorLondon19$385,750
Michael SilvaMarketing DesignerLondon66$198,500
Paul ByrdChief Financial Officer (CFO)New York64$725,000
Gloria LittleSystems AdministratorNew York59$237,500
Bradley GreerSoftware EngineerLondon41$132,000
Dai RiosPersonnel LeadEdinburgh35$217,500
Jenette CaldwellDevelopment LeadNew York30$345,000
Yuri BerryChief Marketing Officer (CMO)New York40$675,000
Caesar VancePre-Sales SupportNew York21$106,450
Doris WilderSales AssistantSidney23$85,600
Angelica RamosChief Executive Officer (CEO)London47$1,200,000
Gavin JoyceDeveloperEdinburgh42$92,575
Jennifer ChangRegional DirectorSingapore28$357,650
Brenden WagnerSoftware EngineerSan Francisco28$206,850
Fiona GreenChief Operating Officer (COO)San Francisco48$850,000
Shou ItouRegional MarketingTokyo20$163,000
Michelle HouseIntegration SpecialistSidney37$95,400
Suki BurksDeveloperLondon53$114,500
Prescott BartlettTechnical AuthorLondon27$145,000
Gavin CortezTeam LeaderSan Francisco22$235,500
Martena MccrayPost-Sales supportEdinburgh46$324,050
Unity ButlerMarketing DesignerSan Francisco47$85,675
Howard HatfieldOffice ManagerSan Francisco51$164,500
Hope FuentesSecretarySan Francisco41$109,850
Vivian HarrellFinancial ControllerSan Francisco62$452,500
Timothy MooneyOffice ManagerLondon37$136,200
Jackson BradshawDirectorNew York65$645,750
Olivia LiangSupport EngineerSingapore64$234,500
Bruno NashSoftware EngineerLondon38$163,500
Sakura YamamotoSupport EngineerTokyo37$139,575
Thor WaltonDeveloperNew York61$98,540
Finn CamachoSupport EngineerSan Francisco47$87,500
Serge BaldwinData CoordinatorSingapore64$138,575
Zenaida FrankSoftware EngineerNew York63$125,250
Zorita SerranoSoftware EngineerSan Francisco56$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh43$75,650
Cara StevensSales AssistantNew York46$145,600
Hermione ButlerRegional DirectorLondon47$356,250
Lael GreerSystems AdministratorLondon21$103,500
Jonas AlexanderDeveloperSan Francisco30$86,500
Shad DeckerRegional DirectorEdinburgh51$183,000
Michael BruceJavascript DeveloperSingapore29$183,000
Donna SniderCustomer SupportNew York27$112,000
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + var t = $('#example').DataTable( { + "columnDefs": [ { + "searchable": false, + "orderable": false, + "targets": 0 + } ], + "order": [[ 1, 'asc' ]] + } ); + + t.on( 'order.dt search.dt', function () { + t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) { + cell.innerHTML = i+1; + } ); + } ).draw(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/api/index.html b/public/vendor/datatables/examples/api/index.html new file mode 100644 index 000000000000..50aa941e49ad --- /dev/null +++ b/public/vendor/datatables/examples/api/index.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + DataTables examples - API + + + +
+
+

DataTables example - API

+ +
+

The real power of DataTables can be exploited through the use of the API that it presents. The + DataTables API is designed to be simple, consistent and easy to use. The examples in this section show + how the API may be used.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/basic_init/comma-decimal.html b/public/vendor/datatables/examples/basic_init/comma-decimal.html new file mode 100644 index 000000000000..69e1ef9d918e --- /dev/null +++ b/public/vendor/datatables/examples/basic_init/comma-decimal.html @@ -0,0 +1,772 @@ + + + + + + + DataTables example - Language - Comma decimal place + + + + + + + + + + + + +
+
+

DataTables example - Language - Comma decimal place

+ +
+

A dot (.) is used to mark the decimal place in Javascript, however, many parts of the world use a comma (,) + and other characters such as the Unicode decimal separator () or a dash + (-) are often used to show the decimal place in a displayed number.

+ +

When reading such numbers, Javascript won't automatically recognise them as numbers, however, + DataTables' type detection and sorting methods can be instructed through the language.decimal option which character is used as the decimal place + in your numbers. This will be used to correctly adjust DataTables' type detection and sorting + algorithms to sort numbers in your table.

+ +

Any character can be passed in using the language.decimal option, although the decimal place character used + in a single table must be consistent (i.e. numbers with a dot decimal place and comma decimal place + cannot both appear in the same table). Different tables on the same page can use different decimal + characters if required.

+ +

The example below shows a comma being used as the decimal place in the currency numbers shown in the + final column.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320.800,00
Garrett WintersAccountantTokyo632011/07/25$170.750,00
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86.000,00
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433.060,00
Airi SatouAccountantTokyo332008/11/28$162.700,00
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372.000,00
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137.500,00
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327.900,00
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205.500,00
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103.600,00
Jena GainesOffice ManagerLondon302008/12/19$90.560,00
Quinn FlynnSupport LeadEdinburgh222013/03/03$342.000,00
Charde MarshallRegional DirectorSan Francisco362008/10/16$470.600,00
Haley KennedySenior Marketing DesignerLondon432012/12/18$313.500,00
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385.750,00
Michael SilvaMarketing DesignerLondon662012/11/27$198.500,00
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725.000,00
Gloria LittleSystems AdministratorNew York592009/04/10$237.500,00
Bradley GreerSoftware EngineerLondon412012/10/13$132.000,00
Dai RiosPersonnel LeadEdinburgh352012/09/26$217.500,00
Jenette CaldwellDevelopment LeadNew York302011/09/03$345.000,00
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675.000,00
Caesar VancePre-Sales SupportNew York212011/12/12$106.450,00
Doris WilderSales AssistantSidney232010/09/20$85.600,00
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1.200.000,00
Gavin JoyceDeveloperEdinburgh422010/12/22$92.575,00
Jennifer ChangRegional DirectorSingapore282010/11/14$357.650,00
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206.850,00
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850.000,00
Shou ItouRegional MarketingTokyo202011/08/14$163.000,00
Michelle HouseIntegration SpecialistSidney372011/06/02$95.400,00
Suki BurksDeveloperLondon532009/10/22$114.500,00
Prescott BartlettTechnical AuthorLondon272011/05/07$145.000,00
Gavin CortezTeam LeaderSan Francisco222008/10/26$235.500,00
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324.050,00
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85.675,00
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164.500,00
Hope FuentesSecretarySan Francisco412010/02/12$109.850,00
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452.500,00
Timothy MooneyOffice ManagerLondon372008/12/11$136.200,00
Jackson BradshawDirectorNew York652008/09/26$645.750,00
Olivia LiangSupport EngineerSingapore642011/02/03$234.500,00
Bruno NashSoftware EngineerLondon382011/05/03$163.500,00
Sakura YamamotoSupport EngineerTokyo372009/08/19$139.575,00
Thor WaltonDeveloperNew York612013/08/11$98.540,00
Finn CamachoSupport EngineerSan Francisco472009/07/07$87.500,00
Serge BaldwinData CoordinatorSingapore642012/04/09$138.575,00
Zenaida FrankSoftware EngineerNew York632010/01/04$125.250,00
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115.000,00
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75.650,00
Cara StevensSales AssistantNew York462011/12/06$145.600,00
Hermione ButlerRegional DirectorLondon472011/03/21$356.250,00
Lael GreerSystems AdministratorLondon212009/02/27$103.500,00
Jonas AlexanderDeveloperSan Francisco302010/07/14$86.500,00
Shad DeckerRegional DirectorEdinburgh512008/11/13$183.000,00
Michael BruceJavascript DeveloperSingapore292011/06/27$183.000,00
Donna SniderCustomer SupportNew York272011/01/25$112.000,00
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + "language": { + "decimal": ",", + "thousands": "." + } + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/basic_init/index.html b/public/vendor/datatables/examples/basic_init/index.html new file mode 100644 index 000000000000..6f2e8e1ac8e2 --- /dev/null +++ b/public/vendor/datatables/examples/basic_init/index.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + DataTables examples - Basic initialisation + + + +
+
+

DataTables example - Basic initialisation

+ +
+

DataTables is very simple to use as a jQuery plug-in with a huge range of customisable option. The + examples in this section demonstrate basic initialisation of DataTables and how it can be easily + customised by passing an object with the options you want.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/basic_init/zero_configuration.html b/public/vendor/datatables/examples/basic_init/zero_configuration.html new file mode 100644 index 000000000000..3770e6562ce7 --- /dev/null +++ b/public/vendor/datatables/examples/basic_init/zero_configuration.html @@ -0,0 +1,748 @@ + + + + + + + DataTables example - Zero configuration + + + + + + + + + + + + +
+
+

DataTables example - Zero configuration

+ +
+

DataTables has most features enabled by default, so all you need to do to use it with your own + tables is to call the construction function.

+ +

Searching, ordering, paging etc goodness will be immediately added to the table, as shown in this + example.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/data_sources/index.html b/public/vendor/datatables/examples/data_sources/index.html new file mode 100644 index 000000000000..6911fb049b32 --- /dev/null +++ b/public/vendor/datatables/examples/data_sources/index.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + DataTables examples - Data sources + + + +
+
+

DataTables example - Data sources

+ +
+

DataTables can obtain data from four different fundamental sources:

+ +
    +
  • HTML document (DOM)
  • +
  • Javascript (array / objects)
  • +
  • Ajax sourced data with client-side processing
  • +
  • Ajax sourced data with server-side processing
  • +
+ +

Which of these options is used to populate the table with data depends upon how the table is + initialised. The examples in this section show these four different data source types.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/plug-ins/api.html b/public/vendor/datatables/examples/plug-ins/api.html new file mode 100644 index 000000000000..ea318ca7cd55 --- /dev/null +++ b/public/vendor/datatables/examples/plug-ins/api.html @@ -0,0 +1,800 @@ + + + + + + + DataTables example - API plug-in methods + + + + + + + + + + + + +
+
+

DataTables example - API plug-in methods

+ +
+

The DataTables API is designed to be fully extensible, with custom functions being very easy to add + using the $.fn.dataTable.Api.register function. This function takes two arguments; the + first being the name of the method to be added and its chaining hierarchy, and the second the function + itself.

+ +

This example shows how a sum() method can easily be added to the Api so you can get the + sum of a column in a single line: table.column().data().sum(). Due to the chaining of the + methods, this allows sum() to very easily give the sum for any selected column, and to + limit the sum to just the current page, filtered data or all pages. This is done using the options for + the column() method and the options for its selectors.

+ +

For more information about API plug-ins; creating them and their requirements, please refer to the + plug-in development documentation.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$.fn.dataTable.Api.register( 'column().data().sum()', function () { + return this.reduce( function (a, b) { + var x = parseFloat( a ) || 0; + var y = parseFloat( b ) || 0; + return x + y; + } ); +} ); + +/* Init the table and fire off a call to get the hidden nodes. */ +$(document).ready(function() { + var table = $('#example').DataTable(); + + $('<button>Click to sum age in all rows</button>') + .prependTo( '#demo' ) + .on( 'click', function () { + alert( 'Column sum is: '+ table.column( 3 ).data().sum() ); + } ); + + $('<button>Click to sum age of visible rows</button>') + .prependTo( '#demo' ) + .on( 'click', function () { + alert( 'Column sum is: '+ table.column( 3, {page:'current'} ).data().sum() ); + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/plug-ins/index.html b/public/vendor/datatables/examples/plug-ins/index.html new file mode 100644 index 000000000000..325bc0b1b37f --- /dev/null +++ b/public/vendor/datatables/examples/plug-ins/index.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + DataTables examples - Plug-ins + + + +
+
+

DataTables example - Plug-ins

+ +
+

While DataTables has a wide range of options and data type support built in, it can never cater for + every type of data out of the box. For this reason, DataTables exposes an extension API which allows + you, the developers using DataTables, to add support for your own data types, searching, ordering and + feature plug-ins.

+ +

The examples in this section show how plug-ins can be used and developed for DataTables.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/plug-ins/sorting_auto.html b/public/vendor/datatables/examples/plug-ins/sorting_auto.html new file mode 100644 index 000000000000..1e9d31404297 --- /dev/null +++ b/public/vendor/datatables/examples/plug-ins/sorting_auto.html @@ -0,0 +1,781 @@ + + + + + + + DataTables example - Ordering plug-ins (with type detection) + + + + + + + + + + + + +
+
+

DataTables example - Ordering plug-ins (with type detection)

+ +
+

Although DataTables will automatically order data from a number of different data types using the + built in methods, When dealing with more complex formatted data, it can be desirable to define the + ordering order yourself. Using plug-in ordering functions, you have have DataTables sort data in any + manner you wish.

+ +

Formatted data of a particular kind can be automatically detected and a suitable ordering plug-in + assigned to it by making use of DataTables' plug-in type detection abilities. For complete information + about type detection and ordering plug-ins; creating them and their requirements, please refer to the + plug-in development documentation.

+ +

This example shows ordering with a comma for a decimal place, as is often used in parts of Europe + with automatic type detection.

+ +

A wide variety of ready made ordering plug-ins can be found on the DataTables plug-ins page.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320.800,00
Garrett WintersAccountantTokyo632011/07/25$170.750,00
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86.000,00
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433.060,00
Airi SatouAccountantTokyo332008/11/28$162.700,00
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372.000,00
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137.500,00
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327.900,00
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205.500,00
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103.600,00
Jena GainesOffice ManagerLondon302008/12/19$90.560,00
Quinn FlynnSupport LeadEdinburgh222013/03/03$342.000,00
Charde MarshallRegional DirectorSan Francisco362008/10/16$470.600,00
Haley KennedySenior Marketing DesignerLondon432012/12/18$313.500,00
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385.750,00
Michael SilvaMarketing DesignerLondon662012/11/27$198.500,00
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725.000,00
Gloria LittleSystems AdministratorNew York592009/04/10$237.500,00
Bradley GreerSoftware EngineerLondon412012/10/13$132.000,00
Dai RiosPersonnel LeadEdinburgh352012/09/26$217.500,00
Jenette CaldwellDevelopment LeadNew York302011/09/03$345.000,00
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675.000,00
Caesar VancePre-Sales SupportNew York212011/12/12$106.450,00
Doris WilderSales AssistantSidney232010/09/20$85.600,00
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1.200.000,00
Gavin JoyceDeveloperEdinburgh422010/12/22$92.575,00
Jennifer ChangRegional DirectorSingapore282010/11/14$357.650,00
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206.850,00
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850.000,00
Shou ItouRegional MarketingTokyo202011/08/14$163.000,00
Michelle HouseIntegration SpecialistSidney372011/06/02$95.400,00
Suki BurksDeveloperLondon532009/10/22$114.500,00
Prescott BartlettTechnical AuthorLondon272011/05/07$145.000,00
Gavin CortezTeam LeaderSan Francisco222008/10/26$235.500,00
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324.050,00
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85.675,00
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164.500,00
Hope FuentesSecretarySan Francisco412010/02/12$109.850,00
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452.500,00
Timothy MooneyOffice ManagerLondon372008/12/11$136.200,00
Jackson BradshawDirectorNew York652008/09/26$645.750,00
Olivia LiangSupport EngineerSingapore642011/02/03$234.500,00
Bruno NashSoftware EngineerLondon382011/05/03$163.500,00
Sakura YamamotoSupport EngineerTokyo372009/08/19$139.575,00
Thor WaltonDeveloperNew York612013/08/11$98.540,00
Finn CamachoSupport EngineerSan Francisco472009/07/07$87.500,00
Serge BaldwinData CoordinatorSingapore642012/04/09$138.575,00
Zenaida FrankSoftware EngineerNew York632010/01/04$125.250,00
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115.000,00
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75.650,00
Cara StevensSales AssistantNew York462011/12/06$145.600,00
Hermione ButlerRegional DirectorLondon472011/03/21$356.250,00
Lael GreerSystems AdministratorLondon212009/02/27$103.500,00
Jonas AlexanderDeveloperSan Francisco302010/07/14$86.500,00
Shad DeckerRegional DirectorEdinburgh512008/11/13$183.000,00
Michael BruceJavascript DeveloperSingapore292011/06/27$183.000,00
Donna SniderCustomer SupportNew York272011/01/25$112.000,00
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$.fn.dataTable.ext.type.detect.unshift( + function ( d ) { + return /^[\-\d,]+$/.test( d ) ? 'numeric-comma' : null; + } +); + +$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) { + return parseFloat( d.replace(/,/g, '.') ) || 0; +}; + + +$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/plug-ins/sorting_manual.html b/public/vendor/datatables/examples/plug-ins/sorting_manual.html new file mode 100644 index 000000000000..7201d6ee67aa --- /dev/null +++ b/public/vendor/datatables/examples/plug-ins/sorting_manual.html @@ -0,0 +1,778 @@ + + + + + + + DataTables example - Ordering plug-ins (no type detection) + + + + + + + + + + + + +
+
+

DataTables example - Ordering plug-ins (no type detection)

+ +
+

Although DataTables will order a number of data types using the built in methods, When dealing with + more complex formatted data, it can be desirable to define the ordering order yourself. Using plug-in + ordering functions, you have have DataTables order data in any manner you wish.

+ +

This is done by using the columns.type parameter, in combination with a + ordering plug-in. The ordering plug-in can be be of any level of complexity (natural ordering for + example can be fairly complex while also very powerful), and is defined by attaching to the + $.fn.dataTable.ext.type.order object. For more information about ordering plug-ins; + creating them and their requirements, please refer to the plug-in development documentation.

+ +

This example shows ordering with a comma for a decimal place, as is often used in parts of + Europe.

+ +

A wide variety of ready made ordering plug-ins can be found on the DataTables plug-ins page.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320.800,00
Garrett WintersAccountantTokyo632011/07/25$170.750,00
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86.000,00
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433.060,00
Airi SatouAccountantTokyo332008/11/28$162.700,00
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372.000,00
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137.500,00
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327.900,00
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205.500,00
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103.600,00
Jena GainesOffice ManagerLondon302008/12/19$90.560,00
Quinn FlynnSupport LeadEdinburgh222013/03/03$342.000,00
Charde MarshallRegional DirectorSan Francisco362008/10/16$470.600,00
Haley KennedySenior Marketing DesignerLondon432012/12/18$313.500,00
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385.750,00
Michael SilvaMarketing DesignerLondon662012/11/27$198.500,00
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725.000,00
Gloria LittleSystems AdministratorNew York592009/04/10$237.500,00
Bradley GreerSoftware EngineerLondon412012/10/13$132.000,00
Dai RiosPersonnel LeadEdinburgh352012/09/26$217.500,00
Jenette CaldwellDevelopment LeadNew York302011/09/03$345.000,00
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675.000,00
Caesar VancePre-Sales SupportNew York212011/12/12$106.450,00
Doris WilderSales AssistantSidney232010/09/20$85.600,00
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1.200.000,00
Gavin JoyceDeveloperEdinburgh422010/12/22$92.575,00
Jennifer ChangRegional DirectorSingapore282010/11/14$357.650,00
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206.850,00
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850.000,00
Shou ItouRegional MarketingTokyo202011/08/14$163.000,00
Michelle HouseIntegration SpecialistSidney372011/06/02$95.400,00
Suki BurksDeveloperLondon532009/10/22$114.500,00
Prescott BartlettTechnical AuthorLondon272011/05/07$145.000,00
Gavin CortezTeam LeaderSan Francisco222008/10/26$235.500,00
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324.050,00
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85.675,00
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164.500,00
Hope FuentesSecretarySan Francisco412010/02/12$109.850,00
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452.500,00
Timothy MooneyOffice ManagerLondon372008/12/11$136.200,00
Jackson BradshawDirectorNew York652008/09/26$645.750,00
Olivia LiangSupport EngineerSingapore642011/02/03$234.500,00
Bruno NashSoftware EngineerLondon382011/05/03$163.500,00
Sakura YamamotoSupport EngineerTokyo372009/08/19$139.575,00
Thor WaltonDeveloperNew York612013/08/11$98.540,00
Finn CamachoSupport EngineerSan Francisco472009/07/07$87.500,00
Serge BaldwinData CoordinatorSingapore642012/04/09$138.575,00
Zenaida FrankSoftware EngineerNew York632010/01/04$125.250,00
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115.000,00
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75.650,00
Cara StevensSales AssistantNew York462011/12/06$145.600,00
Hermione ButlerRegional DirectorLondon472011/03/21$356.250,00
Lael GreerSystems AdministratorLondon212009/02/27$103.500,00
Jonas AlexanderDeveloperSan Francisco302010/07/14$86.500,00
Shad DeckerRegional DirectorEdinburgh512008/11/13$183.000,00
Michael BruceJavascript DeveloperSingapore292011/06/27$183.000,00
Donna SniderCustomer SupportNew York272011/01/25$112.000,00
+ + + +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) { + return parseFloat( d.replace(/,/g, '.') ) || 0; +}; + +$(document).ready(function() { + $('#example').dataTable( { + "columnDefs": [ { + "type": "numeric-comma", + "targets": 3 + } ] + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.css b/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.css new file mode 100644 index 000000000000..416f17e3545c --- /dev/null +++ b/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.css @@ -0,0 +1,204 @@ + +div.dataTables_length label { + font-weight: normal; + float: left; + text-align: left; +} + +div.dataTables_length select { + width: 75px; +} + +div.dataTables_filter label { + font-weight: normal; + float: right; +} + +div.dataTables_filter input { + width: 16em; +} + +div.dataTables_info { + padding-top: 8px; +} + +div.dataTables_paginate { + float: right; + margin: 0; +} + +div.dataTables_paginate ul.pagination { + margin: 2px; +} + +table.table { + clear: both; + margin-top: 6px !important; + margin-bottom: 6px !important; + max-width: none !important; +} + +table.table thead .sorting, +table.table thead .sorting_asc, +table.table thead .sorting_desc, +table.table thead .sorting_asc_disabled, +table.table thead .sorting_desc_disabled { + cursor: pointer; +} + +table.table thead .sorting { background: url('../images/sort_both.png') no-repeat center right; } +table.table thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } +table.table thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } + +table.table thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } +table.table thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable th:active { + outline: none; +} + +/* Scrolling */ +div.dataTables_scrollHead table { + margin-bottom: 0 !important; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +div.dataTables_scrollHead table thead tr:last-child th:first-child, +div.dataTables_scrollHead table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.dataTables_scrollBody table { + border-top: none; + margin-bottom: 0 !important; +} + +div.dataTables_scrollBody tbody tr:first-child th, +div.dataTables_scrollBody tbody tr:first-child td { + border-top: none; +} + +div.dataTables_scrollFoot table { + border-top: none; +} + + + + +/* + * TableTools styles + */ +.table tbody tr.active td, +.table tbody tr.active th { + background-color: #08C; + color: white; +} + +.table tbody tr.active:hover td, +.table tbody tr.active:hover th { + background-color: #0075b0 !important; +} + +.table-striped tbody tr.active:nth-child(odd) td, +.table-striped tbody tr.active:nth-child(odd) th { + background-color: #017ebc; +} + +table.DTTT_selectable tbody tr { + cursor: pointer; +} + +div.DTTT .btn { + color: #333 !important; + font-size: 12px; +} + +div.DTTT .btn:hover { + text-decoration: none !important; +} + +ul.DTTT_dropdown.dropdown-menu { + z-index: 2003; +} + +ul.DTTT_dropdown.dropdown-menu a { + color: #333 !important; /* needed only when demo_page.css is included */ +} + +ul.DTTT_dropdown.dropdown-menu li { + position: relative; +} + +ul.DTTT_dropdown.dropdown-menu li:hover a { + background-color: #0088cc; + color: white !important; +} + +/* TableTools information display */ +div.DTTT_print_info.modal { + height: 150px; + margin-top: -75px; + text-align: center; +} + +div.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +div.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + + + +/* + * FixedColumns styles + */ +div.DTFC_LeftHeadWrapper table, +div.DTFC_LeftFootWrapper table, +div.DTFC_RightHeadWrapper table, +div.DTFC_RightFootWrapper table, +table.DTFC_Cloned tr.even { + background-color: white; +} + +div.DTFC_RightHeadWrapper table , +div.DTFC_LeftHeadWrapper table { + margin-bottom: 0 !important; + border-top-right-radius: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child, +div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child, +div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child, +div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_RightBodyWrapper table, +div.DTFC_LeftBodyWrapper table { + border-top: none; + margin-bottom: 0 !important; +} + +div.DTFC_RightBodyWrapper tbody tr:first-child th, +div.DTFC_RightBodyWrapper tbody tr:first-child td, +div.DTFC_LeftBodyWrapper tbody tr:first-child th, +div.DTFC_LeftBodyWrapper tbody tr:first-child td { + border-top: none; +} + +div.DTFC_RightFootWrapper table, +div.DTFC_LeftFootWrapper table { + border-top: none; +} + diff --git a/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.js b/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.js new file mode 100644 index 000000000000..5037d7d59f96 --- /dev/null +++ b/public/vendor/datatables/examples/resources/bootstrap/3/dataTables.bootstrap.js @@ -0,0 +1,152 @@ +/* Set the defaults for DataTables initialisation */ +$.extend( true, $.fn.dataTable.defaults, { + "sDom": "<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>", + "sPaginationType": "bootstrap", + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + } +} ); + + + + +/* Default class modification */ +$.extend( $.fn.dataTableExt.oStdClasses, { + "sWrapper": "dataTables_wrapper form-inline", + "sFilterInput": "form-control input-sm", + "sLengthSelect": "form-control input-sm" +} ); + + +/* API method to get paging information */ +$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) +{ + return { + "iStart": oSettings._iDisplayStart, + "iEnd": oSettings.fnDisplayEnd(), + "iLength": oSettings._iDisplayLength, + "iTotal": oSettings.fnRecordsTotal(), + "iFilteredTotal": oSettings.fnRecordsDisplay(), + "iPage": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), + "iTotalPages": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) + }; +}; + + +/* Bootstrap style pagination control */ +$.extend( $.fn.dataTableExt.oPagination, { + "bootstrap": { + "fnInit": function( oSettings, nPaging, fnDraw ) { + var oLang = oSettings.oLanguage.oPaginate; + var fnClickHandler = function ( e ) { + e.preventDefault(); + if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { + fnDraw( oSettings ); + } + }; + + $(nPaging).append( + '' + ); + var els = $('a', nPaging); + $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); + $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); + }, + + "fnUpdate": function ( oSettings, fnDraw ) { + var iListLength = 5; + var oPaging = oSettings.oInstance.fnPagingInfo(); + var an = oSettings.aanFeatures.p; + var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2); + + if ( oPaging.iTotalPages < iListLength) { + iStart = 1; + iEnd = oPaging.iTotalPages; + } + else if ( oPaging.iPage <= iHalf ) { + iStart = 1; + iEnd = iListLength; + } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) { + iStart = oPaging.iTotalPages - iListLength + 1; + iEnd = oPaging.iTotalPages; + } else { + iStart = oPaging.iPage - iHalf + 1; + iEnd = iStart + iListLength - 1; + } + + for ( i=0, ien=an.length ; i'+j+'') + .insertBefore( $('li:last', an[i])[0] ) + .bind('click', function (e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; + fnDraw( oSettings ); + } ); + } + + // Add / remove disabled classes from the static elements + if ( oPaging.iPage === 0 ) { + $('li:first', an[i]).addClass('disabled'); + } else { + $('li:first', an[i]).removeClass('disabled'); + } + + if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { + $('li:last', an[i]).addClass('disabled'); + } else { + $('li:last', an[i]).removeClass('disabled'); + } + } + } + } +} ); + + +/* + * TableTools Bootstrap compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Bootstrap + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "DTTT btn-group", + "buttons": { + "normal": "btn btn-default", + "disabled": "disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + }, + "print": { + "info": "DTTT_print_info modal" + }, + "select": { + "row": "active" + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} + diff --git a/public/vendor/datatables/examples/resources/bootstrap/3/index.html b/public/vendor/datatables/examples/resources/bootstrap/3/index.html new file mode 100644 index 000000000000..b4c7b182f9a2 --- /dev/null +++ b/public/vendor/datatables/examples/resources/bootstrap/3/index.html @@ -0,0 +1,442 @@ + + + + + + DataTables Bootstrap 2 example + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc.png b/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc.png new file mode 100644 index 000000000000..a88d7975fe90 Binary files /dev/null and b/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc.png differ diff --git a/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc_disabled.png b/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc_disabled.png new file mode 100644 index 000000000000..4e144cf0b1f7 Binary files /dev/null and b/public/vendor/datatables/examples/resources/bootstrap/images/sort_asc_disabled.png differ diff --git a/public/vendor/datatables/examples/resources/bootstrap/images/sort_both.png b/public/vendor/datatables/examples/resources/bootstrap/images/sort_both.png new file mode 100644 index 000000000000..18670406bc01 Binary files /dev/null and b/public/vendor/datatables/examples/resources/bootstrap/images/sort_both.png differ diff --git a/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc.png b/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc.png new file mode 100644 index 000000000000..def071ed5afd Binary files /dev/null and b/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc.png differ diff --git a/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc_disabled.png b/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc_disabled.png new file mode 100644 index 000000000000..7824973cc60f Binary files /dev/null and b/public/vendor/datatables/examples/resources/bootstrap/images/sort_desc_disabled.png differ diff --git a/public/vendor/datatables/examples/resources/de_DE.txt b/public/vendor/datatables/examples/resources/de_DE.txt new file mode 100644 index 000000000000..74db039cc9c6 --- /dev/null +++ b/public/vendor/datatables/examples/resources/de_DE.txt @@ -0,0 +1,17 @@ +{ + "processing": "Bitte warten...", + "lengthMenu": "_MENU_ Einträge anzeigen", + "zeroRecords": "Keine Einträge vorhanden.", + "info": "_START_ bis _END_ von _TOTAL_ Einträgen", + "infoEmpty": "0 bis 0 von 0 Einträgen", + "infoFiltered": "(gefiltert von _MAX_ Einträgen)", + "infoPostFix": "", + "search": "Suchen", + "url": "", + "paginate": { + "first": "Erster", + "previous": "Zurück", + "next": "Nächster", + "last": "Letzter" + } +} \ No newline at end of file diff --git a/public/vendor/datatables/examples/resources/demo.css b/public/vendor/datatables/examples/resources/demo.css new file mode 100644 index 000000000000..e83e2223ec63 --- /dev/null +++ b/public/vendor/datatables/examples/resources/demo.css @@ -0,0 +1,289 @@ + +@font-face { + /* RaleWay Thin from - https://www.theleagueofmoveabletype.com, Font Squirrel for Web Font creation with "Adjust Glyph Spacing" -50 */ + font-family: 'ralewaythin'; + src: url('font/raleway_thin-webfont.eot'); + src: url('font/raleway_thin-webfont.eot?#iefix') format('embedded-opentype'), + url('font/raleway_thin-webfont.woff') format('woff'), + url('font/raleway_thin-webfont.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + + +body { + font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; + color: #333; + background-color: #fff; +} + + +div.container { + width: 980px; + margin: 0 auto; +} + +h1 { + font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'ralewaythin', 'Helvetica Neue', Arial, Helvetica, sans-serif; + font-weight: 100; + letter-spacing: 1px; + font-size: 3em; +} + +h1 span { + font-size: 0.5em; +} + +a { + cursor: pointer; + color: #3174c7; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +div.toc ul { + color: #4E6CA3; + list-style-type: none; + padding-left: 0; +} + +div.toc li { + padding: 0.2em 1em; + border-left: 4px solid transparent; + border-bottom: 1px solid #e6e6e6; +} + +div.toc li.active { + border-left: 4px solid #458ae0; +} + + +div.toc li:first-child { + border-top: 1px solid #efefef; +} + +div.toc li:last-child { + border-bottom: 1px solid #efefef; +} + + +div.epilogue { + text-align: center; +} + +p.copyright { + font-size: 0.8em; + padding-bottom: 2em; + margin-bottom: 0; +} + +.clear { + clear: both; + height: 0; +} + + +div.info { + margin-bottom: 2em; + + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; + + + -webkit-column-rule: 1px solid #F3F3F3; + -moz-column-rule: 1px solid #F3F3F3; + -ms-column-rule: 1px solid #F3F3F3; + -o-column-rule: 1px solid #F3F3F3; + column-rule: 1px solid #F3F3F3; +} + +div.info > * { + -webkit-column-break-inside: avoid; + break-inside: avoid; +} + +div.info li { + margin-top: 0.75em; +} + +div.info p:first-child { + margin-top: 0; +} + +div.footer { + position: relative; + margin-top: 3em; + border-top: 1px solid #999; + background-color: #eee; +} + +div.footer > div.liner { + width: 960px; + margin: 0 auto; +} + +div.footer > div.gradient { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 6px; + + background: -moz-linear-gradient(top, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.2)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); /* IE10+ */ + background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */ +} + +div.toc { + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; +} + +div.toc-group { + display: inline-block; + width: 100%; +} + +div.box { + overflow: auto; + height: 8em; + padding: 1em; + color: #444; + background-color: #fcfcfc; + border: 1px solid #e0e0e0; + margin-bottom: 2em; +} + + +code { + font-family: "Source Code Pro", Consolas, Menlo, Monaco, "Courier New", monospace; + padding: 1px 4px; + font-size: 0.8em; + + color: #444; + background-color: #fcfcfc; + + border: 1px solid #e0e0e0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code.option { + color: #D14; /* red */ + background-color: #fcf6f8; + border: 1px solid #f7d6df; +} + +code.path { + color: #095c05; /* dark green */ + border: 1px solid #D6E9C6; +} + +code.tag { + color: #cad119; /* yellow */ + background-color: #f7f8e6; + border: 1px solid #D6E9C6; +} + +code.api { + color: #0c199c; /* dark blue */ + background-color: #f4f5fc; + border: 1px solid #c6cbe9; +} + +code.type { + color: #d119cf; /* purple */ + background-color: #faebfa; + border: 1px solid #f3aef2; +} + +code.event { + color: #2a839e; /* deep aqua */ + background-color: #f5fafb; + border: 1px solid #a8ddec; +} + +code.string { + color: #e8941e; /* orange */ + background-color: #fcf8f1; + border: 1px solid #f7e4c9; +} + +code.multiline { + display: inline-block; + width: 95%; +} + + +ul.tabs { + height: 40px; + margin: 20px 20px 0 0; +} + + +ul.tabs li { + display: block; + float: left; + padding: 0 20px; + height: 40px; + font-size: 1.2em; + margin: 0 5px; + cursor: pointer; + line-height: 40px; + color: #121e32; + border: 1px solid white; + border-bottom: none; + margin-top: -1px; +} + +ul.tabs li.active { + border: 1px solid #ccc; + border-bottom: 1px solid white; + margin-top: 0; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} + +ul.tabs li:hover { + background-color: #fafafa; +} + +ul.tabs li.active:hover { + background-color: white; +} + +div.tabs>div { + padding: 0 20px; + border: 1px solid #ccc; + margin-top: 1px; + display: none; + border-radius: 5px; + box-shadow: 2px 2px 2px #bbb; +} + +div.tabs>div h1 { + border-bottom: none; + margin-top: 1em; +} + +div.column_half { + float: left; + width: 49%; + padding-right: 1%; +} diff --git a/public/vendor/datatables/examples/resources/demo.js b/public/vendor/datatables/examples/resources/demo.js new file mode 100644 index 000000000000..7ca11a8e72dd --- /dev/null +++ b/public/vendor/datatables/examples/resources/demo.js @@ -0,0 +1,116 @@ + +/*global SyntaxHighlighter*/ +SyntaxHighlighter.config.tagName = 'code'; + +$(document).ready( function () { + if ( ! $.fn.dataTable ) { + return; + } + var dt110 = $.fn.dataTable.Api ? true : false; + + // Work around for WebKit bug 55740 + var info = $('div.info'); + + if ( info.height() < 115 ) { + info.css( 'height', '8em' ); + } + + var escapeHtml = function ( str ) { + return str.replace(/&/g, '&').replace(//g, '>'); + }; + + // css + var cssContainer = $('div.tabs div.css'); + if ( $.trim( cssContainer.find('code').text() ) === '' ) { + cssContainer.find('code, p:eq(0), div').css('display', 'none'); + } + + // init html + var table = $('

').append( $('table').clone() ).html(); + $('div.tabs div.table').append( + '\t\t\t'+ + escapeHtml( table )+ + '' + ); + //SyntaxHighlighter.highlight({}, $('#display-init-html')[0]); + + // Allow the demo code to run if DT 1.9 is used + if ( dt110 ) { + // json + var ajaxTab = $('ul.tabs li').eq(3).css('display', 'none'); + + $(document).on( 'init.dt', function ( e, settings ) { + var api = new $.fn.dataTable.Api( settings ); + + var show = function ( str ) { + ajaxTab.css( 'display', 'block' ); + $('div.tabs div.ajax code').remove(); + + // Old IE :-| + try { + str = JSON.stringify( str, null, 2 ); + } catch ( e ) {} + + $('div.tabs div.ajax').append( + ''+str+'' + ); + SyntaxHighlighter.highlight( {}, $('div.tabs div.ajax code')[0] ); + }; + + // First draw + var json = api.ajax.json(); + if ( json ) { + show( json ); + } + + // Subsequent draws + api.on( 'xhr.dt', function ( e, settings, json ) { + show( json ); + } ); + } ); + + // php + var phpTab = $('ul.tabs li').eq(4).css('display', 'none'); + + $(document).on( 'init.dt.demoSSP', function ( e, settings ) { + if ( settings.oFeatures.bServerSide ) { + if ( $.isFunction( settings.ajax ) ) { + return; + } + $.ajax( { + url: '../resources/examples.php', + data: { + src: settings.sAjaxSource || settings.ajax.url || settings.ajax + }, + dataType: 'text', + type: 'post', + success: function ( txt ) { + phpTab.css( 'display', 'block' ); + $('div.tabs div.php').append( + ''+txt+'' + ); + SyntaxHighlighter.highlight( {}, $('div.tabs div.php code')[0] ); + } + } ); + } + } ); + } + else { + $('ul.tabs li').eq(3).css('display', 'none'); + $('ul.tabs li').eq(4).css('display', 'none'); + } + + // Tabs + $('ul.tabs').on( 'click', 'li', function () { + $('ul.tabs li.active').removeClass('active'); + $(this).addClass('active'); + + $('div.tabs>div') + .css('display', 'none') + .eq( $(this).index() ).css('display', 'block'); + } ); + $('ul.tabs li.active').click(); +} ); + + + diff --git a/public/vendor/datatables/examples/resources/details_close.png b/public/vendor/datatables/examples/resources/details_close.png new file mode 100644 index 000000000000..fcc23c63e22f Binary files /dev/null and b/public/vendor/datatables/examples/resources/details_close.png differ diff --git a/public/vendor/datatables/examples/resources/details_open.png b/public/vendor/datatables/examples/resources/details_open.png new file mode 100644 index 000000000000..6f034d0f2d5c Binary files /dev/null and b/public/vendor/datatables/examples/resources/details_open.png differ diff --git a/public/vendor/datatables/examples/resources/examples.php b/public/vendor/datatables/examples/resources/examples.php new file mode 100644 index 000000000000..303d3bdb282c --- /dev/null +++ b/public/vendor/datatables/examples/resources/examples.php @@ -0,0 +1,10 @@ +<'large-6 columns'f>r>"+ + "t"+ + "<'row'<'large-6 columns'i><'large-6 columns'p>>", + "sPaginationType": "bootstrap", + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + } +} ); + + +/* API method to get paging information */ +$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) +{ + return { + "iStart": oSettings._iDisplayStart, + "iEnd": oSettings.fnDisplayEnd(), + "iLength": oSettings._iDisplayLength, + "iTotal": oSettings.fnRecordsTotal(), + "iFilteredTotal": oSettings.fnRecordsDisplay(), + "iPage": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), + "iTotalPages": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) + }; +}; + + +/* Bootstrap style pagination control */ +$.extend( $.fn.dataTableExt.oPagination, { + "bootstrap": { + "fnInit": function( oSettings, nPaging, fnDraw ) { + var oLang = oSettings.oLanguage.oPaginate; + var fnClickHandler = function ( e ) { + e.preventDefault(); + if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { + fnDraw( oSettings ); + } + }; + + $(nPaging).append( + '

' + ); + var els = $('a', nPaging); + $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); + $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); + }, + + "fnUpdate": function ( oSettings, fnDraw ) { + var iListLength = 5; + var oPaging = oSettings.oInstance.fnPagingInfo(); + var an = oSettings.aanFeatures.p; + var pages = []; + var i, ien, klass, host; + + // This could use some improving - however, see + // https://github.com/DataTables/DataTables/issues/163 - this will + // be changing in the near future, so not much point in doing too + // much just now + if ( oPaging.iTotalPages <= 6 ) { + for ( i=0 ; i= oPaging.iTotalPages ? + oPaging.iTotalPages : + oPaging.iPage + 2; + for ( i=oPaging.iPage+1 ; i 0 ? + oPaging.iPage - 2 : + 0; + for ( i=oPaging.iPage-1 ; i>pagesBefore ; i-- ) { + pages.unshift( i ); + } + + // Before gap + if ( pagesBefore > 1 ) { + pages.unshift( null ); + } + + // Start + if ( $.inArray( 1, pages ) === -1 && oPaging.iTotalPages > 1 ) { + pages.unshift( 1 ); + } + if ( $.inArray( 0, pages ) === -1 ) { + pages.unshift( 0 ); + } + } + + for ( i=0, ien=an.length ; i'+(page===null? '…' : page+1)+'') + .insertBefore( $('li:last', host) ) + .bind('click', function (e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; + fnDraw( oSettings ); + } ); + } ); + + // Add / remove disabled classes from the static elements + if ( oPaging.iPage === 0 ) { + $('li:first', host).addClass('unavailable'); + } else { + $('li:first', host).removeClass('unavailable'); + } + + if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { + $('li:last', host).addClass('unavailable'); + } else { + $('li:last', host).removeClass('unavailable'); + } + } + } + } +} ); + + +/* + * TableTools Foundation compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Foundation + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "DTTT button-group", + "buttons": { + "normal": "button", + "disabled": "disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + }, + "select": { + "row": "active" + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} + diff --git a/public/vendor/datatables/examples/resources/foundation/images/sort_asc.png b/public/vendor/datatables/examples/resources/foundation/images/sort_asc.png new file mode 100644 index 000000000000..a88d7975fe90 Binary files /dev/null and b/public/vendor/datatables/examples/resources/foundation/images/sort_asc.png differ diff --git a/public/vendor/datatables/examples/resources/foundation/images/sort_asc_disabled.png b/public/vendor/datatables/examples/resources/foundation/images/sort_asc_disabled.png new file mode 100644 index 000000000000..9ed137c58d24 Binary files /dev/null and b/public/vendor/datatables/examples/resources/foundation/images/sort_asc_disabled.png differ diff --git a/public/vendor/datatables/examples/resources/foundation/images/sort_both.png b/public/vendor/datatables/examples/resources/foundation/images/sort_both.png new file mode 100644 index 000000000000..18670406bc01 Binary files /dev/null and b/public/vendor/datatables/examples/resources/foundation/images/sort_both.png differ diff --git a/public/vendor/datatables/examples/resources/foundation/images/sort_desc.png b/public/vendor/datatables/examples/resources/foundation/images/sort_desc.png new file mode 100644 index 000000000000..def071ed5afd Binary files /dev/null and b/public/vendor/datatables/examples/resources/foundation/images/sort_desc.png differ diff --git a/public/vendor/datatables/examples/resources/foundation/images/sort_desc_disabled.png b/public/vendor/datatables/examples/resources/foundation/images/sort_desc_disabled.png new file mode 100644 index 000000000000..7824973cc60f Binary files /dev/null and b/public/vendor/datatables/examples/resources/foundation/images/sort_desc_disabled.png differ diff --git a/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.css b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.css new file mode 100644 index 000000000000..f4a28a9e0b33 --- /dev/null +++ b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.css @@ -0,0 +1,316 @@ +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { + padding: 4px 10px; +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable thead th:active, +table.dataTable thead td:active { + outline: none; +} +table.dataTable thead .sorting_asc, +table.dataTable thead .sorting_desc, +table.dataTable thead .sorting { + cursor: pointer; + *cursor: hand; +} +table.dataTable thead th div.DataTables_sort_wrapper { + position: relative; + padding-right: 10px; +} +table.dataTable thead th div.DataTables_sort_wrapper span { + position: absolute; + top: 50%; + margin-top: -8px; + right: -5px; +} +table.dataTable thead th.ui-state-default { + border-right-width: 0; +} +table.dataTable thead th.ui-state-default:last-child { + border-right-width: 1px; +} +table.dataTable tbody tr { + background-color: white; +} +table.dataTable tbody tr.selected { + background-color: #b0bed9; +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable th.center, +table.dataTable td.center, +table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.right, +table.dataTable td.right { + text-align: right; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #dddddd; +} +table.dataTable.row-border tbody tr:first-child th, +table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, +table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #dddddd; + border-right: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr th:first-child, +table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr:first-child th, +table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #abb9d3; +} +table.dataTable.hover tbody tr:hover, +table.dataTable.hover tbody tr.odd:hover, +table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, +table.dataTable.display tbody tr.odd:hover, +table.dataTable.display tbody tr.even:hover { + background-color: whitesmoke; +} +table.dataTable.hover tbody tr:hover.selected, +table.dataTable.hover tbody tr.odd:hover.selected, +table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, +table.dataTable.display tbody tr.odd:hover.selected, +table.dataTable.display tbody tr.even:hover.selected { + background-color: #a9b7d1; +} +table.dataTable.order-column tbody tr > .sorting_1, +table.dataTable.order-column tbody tr > .sorting_2, +table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, +table.dataTable.display tbody tr > .sorting_2, +table.dataTable.display tbody tr > .sorting_3 { + background-color: #f9f9f9; +} +table.dataTable.order-column tbody tr.selected > .sorting_1, +table.dataTable.order-column tbody tr.selected > .sorting_2, +table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, +table.dataTable.display tbody tr.selected > .sorting_2, +table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b3cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a7b5ce; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b6d0; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #f9f9f9; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fbfbfb; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fdfdfd; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #adbbd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, +table.dataTable.display tbody tr.odd:hover > .sorting_1, +table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, +table.dataTable.display tbody tr.odd:hover > .sorting_2, +table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { + background-color: #ebebeb; +} +table.dataTable.display tbody tr:hover > .sorting_3, +table.dataTable.display tbody tr.odd:hover > .sorting_3, +table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { + background-color: #eeeeee; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { + background-color: #a1aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { + background-color: #a2afc8; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { + background-color: #a4b2cb; +} + +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.55em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_paginate .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333333 !important; + border: 1px solid transparent; +} +.dataTables_wrapper .dataTables_paginate .fg-button:active { + outline: none; +} +.dataTables_wrapper .dataTables_paginate .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.dataTables_wrapper .dataTables_paginate .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* IE10+ */ + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Opera 11.10+ */ + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_length, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: #333333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; +} +.dataTables_wrapper .dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .ui-widget-header { + font-weight: normal; +} +.dataTables_wrapper .ui-toolbar { + padding: 8px; +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} diff --git a/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.js b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.js new file mode 100644 index 000000000000..3575e8228a19 --- /dev/null +++ b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.js @@ -0,0 +1,102 @@ + +(function(){ + +var DataTable = $.fn.dataTable; +var sort_prefix = 'css_right ui-icon ui-icon-'; +var toolbar_prefix = 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-'; + +/* Set the defaults for DataTables initialisation */ +$.extend( true, DataTable.defaults, { + dom: + '<"'+toolbar_prefix+'tl ui-corner-tr"lfr>'+ + 't'+ + '<"'+toolbar_prefix+'bl ui-corner-br"ip>', + renderer: 'jqueryui' +} ); + + +$.extend( DataTable.ext.classes, { + /* Full numbers paging buttons */ + "sPageButton": "fg-button ui-button ui-state-default", + "sPageButtonActive": "ui-state-disabled", + "sPageButtonDisabled": "ui-state-disabled", + + /* Features */ + "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ + "ui-buttonset-multi paging_", /* Note that the type is postfixed */ + + /* Sorting */ + "sSortAsc": "ui-state-default sorting_asc", + "sSortDesc": "ui-state-default sorting_desc", + "sSortable": "ui-state-default sorting", + "sSortableAsc": "ui-state-default sorting_asc_disabled", + "sSortableDesc": "ui-state-default sorting_desc_disabled", + "sSortableNone": "ui-state-default sorting_disabled", + "sSortIcon": "DataTables_sort_icon", + + /* Scrolling */ + "sScrollHead": "dataTables_scrollHead "+"ui-state-default", + "sScrollFoot": "dataTables_scrollFoot "+"ui-state-default", + + /* Misc */ + "sHeaderTH": "ui-state-default", + "sFooterTH": "ui-state-default", +} ); + + +DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, idx, classes ) { + $('
') + .addClass( 'DataTables_sort_wrapper' ) + .append( cell.contents() ) + .append( $('') + .addClass( classes.sSortIcon+' '+column.sSortingClassJUI ) + ) + .appendTo( cell ); + + // Attach a sort listener to update on sort + $(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) { + cell + .removeClass( classes.sSortAsc +" "+classes.sSortDesc ) + .addClass( columns[ idx ] == 'asc' ? + classes.sSortAsc : columns[ idx ] == 'desc' ? + classes.sSortDesc : + column.sSortingClass + ); + + cell + .find( 'span' ) + .removeClass( + sort_prefix+'triangle-1-n' +" "+ + sort_prefix+'triangle-1-s' +" "+ + sort_prefix+'carat-2-n-s' +" "+ + sort_prefix+'carat-1-n' +" "+ + sort_prefix+'carat-1-s' + ) + .addClass( columns[ idx ] == 'asc' ? + sort_prefix+'triangle-1-n' : columns[ idx ] == 'desc' ? + sort_prefix+'triangle-1-s' : + column.sSortingClassJUI + ); + } ); +} + + +/* + * TableTools jQuery UI compatibility + * Required TableTools 2.1+ + */ +if ( DataTable.TableTools ) { + $.extend( true, DataTable.TableTools.classes, { + "container": "DTTT_container ui-buttonset ui-buttonset-multi", + "buttons": { + "normal": "DTTT_button ui-button ui-state-default" + }, + "collection": { + "container": "DTTT_collection ui-buttonset ui-buttonset-multi" + } + } ); +} + + +}()); + diff --git a/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.scss b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.scss new file mode 100644 index 000000000000..910dc6a8906e --- /dev/null +++ b/public/vendor/datatables/examples/resources/jqueryui/dataTables.jqueryui.scss @@ -0,0 +1,408 @@ + + + // + // Colour customisation + // + +// Border between the header (and footer) and the table body +$table-header-border: 1px solid #111; + +// Border of rows / cells +$table-body-border: 1px solid #ddd; + +// Row background colour (hover, striping etc are all based on this colour and +// calculated automatically) +$table-row-background: #ffffff; + +// Row colour, when selected (tr.selected) +$table-row-selected: #B0BED9; + +// Text colour of the interaction control elements (info, filter, paging etc) +$table-control-color: #333; + +// Highlight colour of the paging button for the current page +$table-paging-button-active: #dcdcdc; + +// Hover colour of paging buttons on mouse over +$table-paging-button-hover: #111; + + + +// +// Functions / mixins +// +@function tint( $color, $percent ) { + @return mix(white, $color, $percent); +} + +@function shade( $color, $percent ) { + @return mix(black, $color, $percent); +} + +@mixin gradient( $from, $to ) { + background-color: $from; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,$to)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, $from 0%, $to 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, $from 0%, $to 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, $from 0%, $to 100%); /* IE10+ */ + background: -o-linear-gradient(top, $from 0%, $to 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, $from 0%, $to 100%); /* W3C */ +} + + +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + + /* + * Header and footer styles + */ + thead, + tfoot { + th, + td { + padding: 4px 10px; + } + + th { + font-weight: bold; + } + } + + thead th, + thead td { + &:active { + outline: none; + } + } + + // Sorting + thead { + .sorting_asc, + .sorting_desc, + .sorting { + cursor: pointer; + *cursor: hand; + } + + th div.DataTables_sort_wrapper { + position: relative; + padding-right: 10px; + + span { + position: absolute; + top: 50%; + margin-top: -8px; + right: -5px; + } + } + + th.ui-state-default { + border-right-width: 0; + + &:last-child { + border-right-width: 1px; + } + } + } + + + /* + * Body styles + */ + tbody { + tr { + background-color: $table-row-background; + + &.selected { + background-color: $table-row-selected; + } + } + + th, + td { + padding: 8px 10px; + } + } + + th.center, + td.center, + td.dataTables_empty { + text-align: center; + } + + th.right, + td.right { + text-align: right; + } + + + // Stripe classes - add "row-border" class to the table to activate + &.row-border tbody, + &.display tbody { + th, td { + border-top: $table-body-border; + } + + tr:first-child th, + tr:first-child td { + border-top: none; + } + } + + + // Stripe classes - add "cell-border" class to the table to activate + &.cell-border tbody { + th, td { + border-top: $table-body-border; + border-right: $table-body-border; + } + + tr th:first-child, + tr td:first-child { + border-left: $table-body-border; + } + + tr:first-child th, + tr:first-child td { + border-top: none; + } + } + + + // Stripe classes - add "stripe" class to the table to activate + &.stripe tbody, + &.display tbody { + tr.odd { + background-color: shade($table-row-background, 2.35%); // shade by f9 + + &.selected { + background-color: shade($table-row-selected, 2.35%); + } + } + } + + + // Hover classes - add "hover" class to the table to activate + &.hover tbody, + &.display tbody { + tr:hover, + tr.odd:hover, + tr.even:hover { + background-color: shade($table-row-background, 3.6%); // shade by f5 + + &.selected { + background-color: shade($table-row-selected, 3.6%); + } + } + } + + + // Sort column highlighting - add "hover" class to the table to activate + &.order-column, + &.display { + tbody { + tr>.sorting_1, + tr>.sorting_2, + tr>.sorting_3 { + background-color: shade($table-row-background, 2%); // shade by fa + } + + tr.selected>.sorting_1, + tr.selected>.sorting_2, + tr.selected>.sorting_3 { + background-color: shade($table-row-selected, 2%); + } + } + } + + &.display tbody, + &.order-column.stripe tbody { + tr.odd { + >.sorting_1 { background-color: shade($table-row-background, 5.4%); } // shade by f1 + >.sorting_2 { background-color: shade($table-row-background, 4.7%); } // shade by f3 + >.sorting_3 { background-color: shade($table-row-background, 3.9%); } // shade by f5 + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 5.4%); } + >.sorting_2 { background-color: shade($table-row-selected, 4.7%); } + >.sorting_3 { background-color: shade($table-row-selected, 3.9%); } + } + } + + tr.even { + >.sorting_1 { background-color: shade($table-row-background, 2%); } // shade by fa + >.sorting_2 { background-color: shade($table-row-background, 1.2%); } // shade by fc + >.sorting_3 { background-color: shade($table-row-background, 0.4%); } // shade by fe + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 2%); } + >.sorting_2 { background-color: shade($table-row-selected, 1.2%); } + >.sorting_3 { background-color: shade($table-row-selected, 0.4%); } + } + } + } + + &.display tbody, + &.order-column.hover tbody { + tr:hover, + tr.odd:hover, + tr.even:hover { + >.sorting_1 { background-color: shade($table-row-background, 8.2%); } // shade by ea + >.sorting_2 { background-color: shade($table-row-background, 7.5%); } // shade by ec + >.sorting_3 { background-color: shade($table-row-background, 6.3%); } // shade by ef + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 8.2%); } + >.sorting_2 { background-color: shade($table-row-selected, 7.5%); } + >.sorting_3 { background-color: shade($table-row-selected, 6.3%); } + } + } + } +} + +// Its not uncommon to use * {border-box} now, but it messes up the column width +// calculations, so use content-box for the table and cells +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + + + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + + // Page length options + .dataTables_length { + float: left; + } + + // Filtering input + .dataTables_filter { + float: right; + text-align: right; + + input { + margin-left: 0.5em; + } + } + + // Table info + .dataTables_info { + clear: both; + float: left; + padding-top: 0.55em; + } + + // Paging + .dataTables_paginate { + float: right; + text-align: right; + + .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + + color: $table-control-color !important; + border: 1px solid transparent; + + &:active { + outline: none; + } + } + + .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + } + + .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + } + } + + // Processing + .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + + text-align: center; + font-size: 1.2em; + + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba($table-row-background, 0)), color-stop(25%,rgba($table-row-background, 0.9)), color-stop(75%,rgba($table-row-background, 0.9)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* IE10+ */ + background: -o-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Opera 11.10+ */ + background: linear-gradient(to right, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* W3C */ + } + + .dataTables_length, + .dataTables_filter, + .dataTables_info, + .dataTables_processing, + .dataTables_paginate { + color: $table-control-color; + } + + // Scrolling + .dataTables_scroll { + clear: both; + } + + .dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; + } + + + .ui-widget-header { + font-weight: normal; + } + + .ui-toolbar { + padding: 8px; + } + + // Self clear the wrapper + &:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; + } + zoom: 1; // Poor old IE +} + + diff --git a/public/vendor/datatables/examples/resources/jqueryui/index.html b/public/vendor/datatables/examples/resources/jqueryui/index.html new file mode 100644 index 000000000000..303dbc151b22 --- /dev/null +++ b/public/vendor/datatables/examples/resources/jqueryui/index.html @@ -0,0 +1,443 @@ + + + + + + DataTables jQuery UI example + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+ 4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5.5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/resources/syntax/Syntax Highlighter license b/public/vendor/datatables/examples/resources/syntax/Syntax Highlighter license new file mode 100644 index 000000000000..e7c70ba14a4a --- /dev/null +++ b/public/vendor/datatables/examples/resources/syntax/Syntax Highlighter license @@ -0,0 +1,20 @@ +Copyright (c) 2003, 2004 Jim Weirich + +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/public/vendor/datatables/examples/resources/syntax/shCore.css b/public/vendor/datatables/examples/resources/syntax/shCore.css new file mode 100644 index 000000000000..310034574b6a --- /dev/null +++ b/public/vendor/datatables/examples/resources/syntax/shCore.css @@ -0,0 +1,389 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter a, +.syntaxhighlighter div, +.syntaxhighlighter code, +.syntaxhighlighter table, +.syntaxhighlighter table td, +.syntaxhighlighter table tr, +.syntaxhighlighter table tbody, +.syntaxhighlighter table thead, +.syntaxhighlighter table caption, +.syntaxhighlighter textarea { + -moz-border-radius: 0 0 0 0 !important; + -webkit-border-radius: 0 0 0 0 !important; + background: none !important; + border: 0 !important; + bottom: auto !important; + float: none !important; + height: auto !important; + left: auto !important; + line-height: 1.1em !important; + margin: 0 !important; + outline: 0 !important; + overflow: visible !important; + padding: 0 !important; + position: static !important; + right: auto !important; + text-align: left !important; + top: auto !important; + vertical-align: baseline !important; + width: auto !important; + box-sizing: content-box !important; + font-family: "Source Code Pro","Consolas","Monaco","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important; + font-weight: normal !important; + font-style: normal !important; + font-size: 1em !important; + min-height: inherit !important; + min-height: auto !important; +} + +.syntaxhighlighter { + width: 100% !important; + margin: 1em 0 1em 0 !important; + position: relative !important; + overflow: auto !important; + font-size: 1em !important; +} +.syntaxhighlighter.source { + overflow: hidden !important; +} +.syntaxhighlighter .bold { + font-weight: bold !important; +} +.syntaxhighlighter .italic { + font-style: italic !important; +} +.syntaxhighlighter .line { + white-space: pre !important; +} +.syntaxhighlighter table { + width: 100% !important; +} +.syntaxhighlighter table caption { + text-align: left !important; + padding: .5em 0 0.5em 1em !important; +} +.syntaxhighlighter table td.code { + width: 100% !important; +} +.syntaxhighlighter table td.code .container { + position: relative !important; +} +.syntaxhighlighter table td.code .container textarea { + box-sizing: border-box !important; + position: absolute !important; + left: 0 !important; + top: 0 !important; + width: 100% !important; + height: 100% !important; + border: none !important; + background: white !important; + padding-left: 1em !important; + overflow: hidden !important; + white-space: pre !important; +} +.syntaxhighlighter table td.gutter .line { + text-align: right !important; + padding: 2px 0.5em 2px 1em !important; +} +.syntaxhighlighter table td.code .line { + padding: 2px 1em !important; +} +.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { + padding-left: 0em !important; +} +.syntaxhighlighter.show { + display: block !important; +} +.syntaxhighlighter.collapsed table { + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar { + padding: 0.1em 0.8em 0em 0.8em !important; + font-size: 1em !important; + position: static !important; + width: auto !important; + height: auto !important; +} +.syntaxhighlighter.collapsed .toolbar span { + display: inline !important; + margin-right: 1em !important; +} +.syntaxhighlighter.collapsed .toolbar span a { + padding: 0 !important; + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar span a.expandSource { + display: inline !important; +} +.syntaxhighlighter .toolbar { + position: absolute !important; + right: 1px !important; + top: 1px !important; + font-size: 10px !important; + z-index: 10 !important; +} +.syntaxhighlighter .toolbar span.title { + display: inline !important; +} +.syntaxhighlighter .toolbar a { + display: block !important; + text-align: center !important; + text-decoration: none !important; + padding-top: 1px !important; +} +.syntaxhighlighter .toolbar a.expandSource { + display: none !important; +} +.syntaxhighlighter.ie { + font-size: .9em !important; + padding: 1px 0 1px 0 !important; +} +.syntaxhighlighter.ie .toolbar { + line-height: 8px !important; +} +.syntaxhighlighter.ie .toolbar a { + padding-top: 0px !important; +} +.syntaxhighlighter.printing .line.alt1 .content, +.syntaxhighlighter.printing .line.alt2 .content, +.syntaxhighlighter.printing .line.highlighted .number, +.syntaxhighlighter.printing .line.highlighted.alt1 .content, +.syntaxhighlighter.printing .line.highlighted.alt2 .content { + background: none !important; +} +.syntaxhighlighter.printing .line .number { + color: #bbbbbb !important; +} +.syntaxhighlighter.printing .line .content { + color: black !important; +} +.syntaxhighlighter.printing .toolbar { + display: none !important; +} +.syntaxhighlighter.printing a { + text-decoration: none !important; +} +.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { + color: black !important; +} +.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { + color: #008200 !important; +} +.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { + color: blue !important; +} +.syntaxhighlighter.printing .keyword { + color: #006699 !important; + font-weight: bold !important; +} +.syntaxhighlighter.printing .preprocessor { + color: gray !important; +} +.syntaxhighlighter.printing .variable { + color: #aa7700 !important; +} +.syntaxhighlighter.printing .value { + color: #009900 !important; +} +.syntaxhighlighter.printing .functions { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .constants { + color: #0066cc !important; +} +.syntaxhighlighter.printing .script { + font-weight: bold !important; +} +.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { + color: gray !important; +} +.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { + color: red !important; +} +.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { + color: black !important; +} + + + +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter { + background-color: white !important; + font-size: 13px !important; + overflow: visible !important; +} +.syntaxhighlighter .line.alt1 { + background-color: white !important; +} +.syntaxhighlighter .line.alt2 { + background-color: #F8F8F8 !important; +} +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #e0e0e0 !important; +} +.syntaxhighlighter .line.highlighted.number { + color: black !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { +} +.syntaxhighlighter .gutter div { + color: #5C5C5C !important; +} +.syntaxhighlighter .gutter .line.alt1, .syntaxhighlighter .gutter .line.alt2 { + background-color: white !important; +} +.odd .syntaxhighlighter .gutter .line.alt1, .odd .syntaxhighlighter .gutter .line.alt2 { + background-color: #F2F2F2 !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #4E6CA3 !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #4E6CA3 !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: blue !important; + background: white !important; + border: 1px solid #4E6CA3 !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: blue !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .toolbar { + color: white !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + font: 100%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif !important; + color: white !important; + background: #4E6CA3 !important; + float: right !important; + padding: 2px 5px !important; + clear: both; +} +.syntaxhighlighter .toolbar a:hover { + color: #b7c5df !important; + background: #39568b !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #008200 !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: blue !important; +} +.syntaxhighlighter .keyword { + color: #006699 !important; +} +.syntaxhighlighter .preprocessor { + color: gray !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #006699 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} + +.datatables_ref:hover { + text-decoration: underline; + cursor: pointer; + *cursor: hand; +} + +.syntaxhighlighter .dtapi { + color: #069; +} + +.syntaxhighlighter .dtapi:hover { + text-decoration: underline; + cursor: pointer; + *cursor: hand; +} + +.syntaxhighlighter table { + table-layout: fixed !important; +} + +.syntaxhighlighter table td.gutter { + width: 46px !important; /* enough for three digits */ +} + +.syntaxhighlighter table td.code { + width: auto !important; + overflow: auto !important; +} + diff --git a/public/vendor/datatables/examples/resources/syntax/shCore.js b/public/vendor/datatables/examples/resources/syntax/shCore.js new file mode 100644 index 000000000000..7ec9ef9bbda1 --- /dev/null +++ b/public/vendor/datatables/examples/resources/syntax/shCore.js @@ -0,0 +1,1988 @@ +/*! + * XRegExp 2.0.0 MIT License + */ +var XRegExp;XRegExp=XRegExp||function(n){"use strict";function v(n,i,r){var u;for(u in t.prototype)t.prototype.hasOwnProperty(u)&&(n[u]=t.prototype[u]);return n.xregexp={captureNames:i,isNative:!!r},n}function g(n){return(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.extended?"x":"")+(n.sticky?"y":"")}function o(n,r,u){if(!t.isRegExp(n))throw new TypeError("type RegExp expected");var f=i.replace.call(g(n)+(r||""),h,"");return u&&(f=i.replace.call(f,new RegExp("["+u+"]+","g"),"")),n=n.xregexp&&!n.xregexp.isNative?v(t(n.source,f),n.xregexp.captureNames?n.xregexp.captureNames.slice(0):null):v(new RegExp(n.source,f),null,!0)}function a(n,t){var i=n.length;if(Array.prototype.lastIndexOf)return n.lastIndexOf(t);while(i--)if(n[i]===t)return i;return-1}function s(n,t){return Object.prototype.toString.call(n).toLowerCase()==="[object "+t+"]"}function d(n){return n=n||{},n==="all"||n.all?n={natives:!0,extensibility:!0}:s(n,"string")&&(n=t.forEach(n,/[^\s,]+/,function(n){this[n]=!0},{})),n}function ut(n,t,i,u){var o=p.length,s=null,e,f;y=!0;try{while(o--)if(f=p[o],(f.scope==="all"||f.scope===i)&&(!f.trigger||f.trigger.call(u))&&(f.pattern.lastIndex=t,e=r.exec.call(f.pattern,n),e&&e.index===t)){s={output:f.handler.call(u,e,i),match:e};break}}catch(h){throw h;}finally{y=!1}return s}function b(n){t.addToken=c[n?"on":"off"],f.extensibility=n}function tt(n){RegExp.prototype.exec=(n?r:i).exec,RegExp.prototype.test=(n?r:i).test,String.prototype.match=(n?r:i).match,String.prototype.replace=(n?r:i).replace,String.prototype.split=(n?r:i).split,f.natives=n}var t,c,u,f={natives:!1,extensibility:!1},i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r={},k={},p=[],e="default",rt="class",it={"default":/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,"class":/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/},et=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,h=/([\s\S])(?=[\s\S]*\1)/g,nt=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,ft=i.exec.call(/()??/,"")[1]===n,l=RegExp.prototype.sticky!==n,y=!1,w="gim"+(l?"y":"");return t=function(r,u){if(t.isRegExp(r)){if(u!==n)throw new TypeError("can't supply flags when constructing one RegExp from another");return o(r)}if(y)throw new Error("can't call the XRegExp constructor within token definition functions");var l=[],a=e,b={hasNamedCapture:!1,captureNames:[],hasFlag:function(n){return u.indexOf(n)>-1}},f=0,c,s,p;if(r=r===n?"":String(r),u=u===n?"":String(u),i.match.call(u,h))throw new SyntaxError("invalid duplicate regular expression flag");for(r=i.replace.call(r,/^\(\?([\w$]+)\)/,function(n,t){if(i.test.call(/[gy]/,t))throw new SyntaxError("can't use flag g or y in mode modifier");return u=i.replace.call(u+t,h,""),""}),t.forEach(u,/[\s\S]/,function(n){if(w.indexOf(n[0])<0)throw new SyntaxError("invalid regular expression flag "+n[0]);});f"}else if(i)return"\\"+(+i+f);return n},e=[],r,u;if(!(s(n,"array")&&n.length))throw new TypeError("patterns must be a nonempty array");for(u=0;u1&&a(r,"")>-1&&(e=new RegExp(this.source,i.replace.call(g(this),"g","")),i.replace.call(String(t).slice(r.index),e,function(){for(var t=1;tr.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=o),r},r.test=function(n){return!!r.exec.call(this,n)},r.match=function(n){if(t.isRegExp(n)){if(n.global){var u=i.match.apply(this,arguments);return n.lastIndex=0,u}}else n=new RegExp(n);return r.exec.call(n,this)},r.replace=function(n,r){var e=t.isRegExp(n),u,f,h,o;return e?(n.xregexp&&(u=n.xregexp.captureNames),n.global||(o=n.lastIndex)):n+="",s(r,"function")?f=i.replace.call(String(this),n,function(){var t=arguments,i;if(u)for(t[0]=new String(t[0]),i=0;in.length-3)throw new SyntaxError("backreference to undefined group "+t);return n[r]||""}throw new SyntaxError("invalid token "+t);})})),e&&(n.lastIndex=n.global?0:o),f},r.split=function(r,u){if(!t.isRegExp(r))return i.split.apply(this,arguments);var e=String(this),h=r.lastIndex,f=[],o=0,s;return u=(u===n?-1:u)>>>0,t.forEach(e,r,function(n){n.index+n[0].length>o&&(f.push(e.slice(o,n.index)),n.length>1&&n.indexu?f.slice(0,u):f},u=c.on,u(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(n,t){if(n[1]==="B"&&t===e)return n[0];throw new SyntaxError("invalid escape "+n[0]);},{scope:"all"}),u(/\[(\^?)]/,function(n){return n[1]?"[\\s\\S]":"\\b\\B"}),u(/(?:\(\?#[^)]*\))+/,function(n){return i.test.call(nt,n.input.slice(n.index+n[0].length))?"":"(?:)"}),u(/\\k<([\w$]+)>/,function(n){var t=isNaN(n[1])?a(this.captureNames,n[1])+1:+n[1],i=n.index+n[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError("backreference to undefined group "+n[0]);return"\\"+t+(i===n.input.length||isNaN(n.input.charAt(i))?"":"(?:)")}),u(/(?:\s+|#.*)+/,function(n){return i.test.call(nt,n.input.slice(n.index+n[0].length))?"":"(?:)"},{trigger:function(){return this.hasFlag("x")},customFlags:"x"}),u(/\./,function(){return"[\\s\\S]"},{trigger:function(){return this.hasFlag("s")},customFlags:"s"}),u(/\(\?P?<([\w$]+)>/,function(n){if(!isNaN(n[1]))throw new SyntaxError("can't use integer as capture name "+n[0]);return this.captureNames.push(n[1]),this.hasNamedCapture=!0,"("}),u(/\\(\d+)/,function(n,t){if(!(t===e&&/^[1-9]/.test(n[1])&&+n[1]<=this.captureNames.length)&&n[1]!=="0")throw new SyntaxError("can't use octal escape or backreference to undefined group "+n[0]);return n[0]},{scope:"all"}),u(/\((?!\?)/,function(){return this.hasFlag("n")?"(?:":(this.captureNames.push(null),"(")},{customFlags:"n"}),typeof exports!="undefined"&&(exports.XRegExp=t),t}() + + +/*! + * SyntaxHighlighter by Alex Gorbatchev + * https://github.com/alexgorbatchev/SyntaxHighlighter - MIT license + */ + +// +// Begin anonymous function. This is used to contain local scope variables without polutting global scope. +// +if (typeof(SyntaxHighlighter) == 'undefined') var SyntaxHighlighter = function() { + +// CommonJS +if (typeof(require) != 'undefined' && typeof(XRegExp) == 'undefined') +{ + XRegExp = require('xregexp').XRegExp; +} + +// Shortcut object which will be assigned to the SyntaxHighlighter variable. +// This is a shorthand for local reference in order to avoid long namespace +// references to SyntaxHighlighter.whatever... +var sh = { + defaults : { + /** Additional CSS class names to be added to highlighter elements. */ + 'class-name' : '', + + /** First line number. */ + 'first-line' : 1, + + /** + * Pads line numbers. Possible values are: + * + * false - don't pad line numbers. + * true - automaticaly pad numbers with minimum required number of leading zeroes. + * [int] - length up to which pad line numbers. + */ + 'pad-line-numbers' : false, + + /** Lines to highlight. */ + 'highlight' : null, + + /** Title to be displayed above the code block. */ + 'title' : null, + + /** Enables or disables smart tabs. */ + 'smart-tabs' : true, + + /** Gets or sets tab size. */ + 'tab-size' : 4, + + /** Enables or disables gutter. */ + 'gutter' : true, + + /** Enables or disables toolbar. */ + 'toolbar' : true, + + /** Enables quick code copy and paste from double click. */ + 'quick-code' : true, + + /** Forces code view to be collapsed. */ + 'collapse' : false, + + /** Enables or disables automatic links. */ + 'auto-links' : true, + + /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */ + 'light' : false, + + 'unindent' : true, + + 'html-script' : false + }, + + config : { + space : ' ', + + /** Enables use of + + + + DataTables examples - Server-side processing + + + +
+
+

DataTables example - Server-side processing

+ +
+

There are many ways to get your data into DataTables, and if you are working with seriously large + databases, you might want to consider using the server-side options that DataTables provides. With + server-side processing enabled, all paging, searching, ordering etc actions that DataTables performs + are handed off to a server where an SQL engine (or similar) can perform these actions on the large data + set (after all, that's what the database engine is designed for!). As such, each draw of the table will + result in a new Ajax request being made to get the required data.

+ +

Server-side processing is enabled by setting the serverSide option to true and providing an Ajax data + source through the ajax option.

+ +

The examples in this section shows server-side processing in use and how it can be customised to + suit your needs.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/server_side/scripts/data.sql b/public/vendor/datatables/examples/server_side/scripts/data.sql new file mode 100644 index 000000000000..864544fcce9a --- /dev/null +++ b/public/vendor/datatables/examples/server_side/scripts/data.sql @@ -0,0 +1,79 @@ +# DataTables server-side processing example database structure and dataTables + +DROP TABLE IF EXISTS `datatables-demo`; + +CREATE TABLE `datatables-demo` ( + `id` int(10) NOT NULL auto_increment, + `first_name` varchar(250) NOT NULL default '', + `last_name` varchar(250) NOT NULL default '', + `position` varchar(250) NOT NULL default '', + `email` varchar(250) NOT NULL default '', + `office` varchar(250) NOT NULL default '', + `start_date` timestamp DEFAULT CURRENT_TIMESTAMP, + `age` int(8), + `salary` int(8), + `extn` int(8), + PRIMARY KEY (`id`) +); + +INSERT + INTO `datatables-demo` + ( id, first_name, last_name, age, position, salary, start_date, extn, email, office ) + VALUES + ( 1, 'Tiger', 'Nixon', 61, 'System Architect', 320800, '2011/04/25', 5421, 't.nixon@datatables.net', 'Edinburgh' ), + ( 2, 'Garrett', 'Winters', 63, 'Accountant', 170750, '2011/07/25', 8422, 'g.winters@datatables.net', 'Tokyo' ), + ( 3, 'Ashton', 'Cox', 66, 'Junior Technical Author', 86000, '2009/01/12', 1562, 'a.cox@datatables.net', 'San Francisco' ), + ( 4, 'Cedric', 'Kelly', 22, 'Senior Javascript Developer', 433060, '2012/03/29', 6224, 'c.kelly@datatables.net', 'Edinburgh' ), + ( 5, 'Airi', 'Satou', 33, 'Accountant', 162700, '2008/11/28', 5407, 'a.satou@datatables.net', 'Tokyo' ), + ( 6, 'Brielle', 'Williamson', 61, 'Integration Specialist', 372000, '2012/12/02', 4804, 'b.williamson@datatables.net', 'New York' ), + ( 7, 'Herrod', 'Chandler', 59, 'Sales Assistant', 137500, '2012/08/06', 9608, 'h.chandler@datatables.net', 'San Francisco' ), + ( 8, 'Rhona', 'Davidson', 55, 'Integration Specialist', 327900, '2010/10/14', 6200, 'r.davidson@datatables.net', 'Tokyo' ), + ( 9, 'Colleen', 'Hurst', 39, 'Javascript Developer', 205500, '2009/09/15', 2360, 'c.hurst@datatables.net', 'San Francisco' ), + ( 10, 'Sonya', 'Frost', 23, 'Software Engineer', 103600, '2008/12/13', 1667, 's.frost@datatables.net', 'Edinburgh' ), + ( 11, 'Jena', 'Gaines', 30, 'Office Manager', 90560, '2008/12/19', 3814, 'j.gaines@datatables.net', 'London' ), + ( 12, 'Quinn', 'Flynn', 22, 'Support Lead', 342000, '2013/03/03', 9497, 'q.flynn@datatables.net', 'Edinburgh' ), + ( 13, 'Charde', 'Marshall', 36, 'Regional Director', 470600, '2008/10/16', 6741, 'c.marshall@datatables.net', 'San Francisco' ), + ( 14, 'Haley', 'Kennedy', 43, 'Senior Marketing Designer', 313500, '2012/12/18', 3597, 'h.kennedy@datatables.net', 'London' ), + ( 15, 'Tatyana', 'Fitzpatrick', 19, 'Regional Director', 385750, '2010/03/17', 1965, 't.fitzpatrick@datatables.net', 'London' ), + ( 16, 'Michael', 'Silva', 66, 'Marketing Designer', 198500, '2012/11/27', 1581, 'm.silva@datatables.net', 'London' ), + ( 17, 'Paul', 'Byrd', 64, 'Chief Financial Officer (CFO)', 725000, '2010/06/09', 3059, 'p.byrd@datatables.net', 'New York' ), + ( 18, 'Gloria', 'Little', 59, 'Systems Administrator', 237500, '2009/04/10', 1721, 'g.little@datatables.net', 'New York' ), + ( 19, 'Bradley', 'Greer', 41, 'Software Engineer', 132000, '2012/10/13', 2558, 'b.greer@datatables.net', 'London' ), + ( 20, 'Dai', 'Rios', 35, 'Personnel Lead', 217500, '2012/09/26', 2290, 'd.rios@datatables.net', 'Edinburgh' ), + ( 21, 'Jenette', 'Caldwell', 30, 'Development Lead', 345000, '2011/09/03', 1937, 'j.caldwell@datatables.net', 'New York' ), + ( 22, 'Yuri', 'Berry', 40, 'Chief Marketing Officer (CMO)', 675000, '2009/06/25', 6154, 'y.berry@datatables.net', 'New York' ), + ( 23, 'Caesar', 'Vance', 21, 'Pre-Sales Support', 106450, '2011/12/12', 8330, 'c.vance@datatables.net', 'New York' ), + ( 24, 'Doris', 'Wilder', 23, 'Sales Assistant', 85600, '2010/09/20', 3023, 'd.wilder@datatables.net', 'Sidney' ), + ( 25, 'Angelica', 'Ramos', 47, 'Chief Executive Officer (CEO)', 1200000, '2009/10/09', 5797, 'a.ramos@datatables.net', 'London' ), + ( 26, 'Gavin', 'Joyce', 42, 'Developer', 92575, '2010/12/22', 8822, 'g.joyce@datatables.net', 'Edinburgh' ), + ( 27, 'Jennifer', 'Chang', 28, 'Regional Director', 357650, '2010/11/14', 9239, 'j.chang@datatables.net', 'Singapore' ), + ( 28, 'Brenden', 'Wagner', 28, 'Software Engineer', 206850, '2011/06/07', 1314, 'b.wagner@datatables.net', 'San Francisco' ), + ( 29, 'Fiona', 'Green', 48, 'Chief Operating Officer (COO)', 850000, '2010/03/11', 2947, 'f.green@datatables.net', 'San Francisco' ), + ( 30, 'Shou', 'Itou', 20, 'Regional Marketing', 163000, '2011/08/14', 8899, 's.itou@datatables.net', 'Tokyo' ), + ( 31, 'Michelle', 'House', 37, 'Integration Specialist', 95400, '2011/06/02', 2769, 'm.house@datatables.net', 'Sidney' ), + ( 32, 'Suki', 'Burks', 53, 'Developer', 114500, '2009/10/22', 6832, 's.burks@datatables.net', 'London' ), + ( 33, 'Prescott', 'Bartlett', 27, 'Technical Author', 145000, '2011/05/07', 3606, 'p.bartlett@datatables.net', 'London' ), + ( 34, 'Gavin', 'Cortez', 22, 'Team Leader', 235500, '2008/10/26', 2860, 'g.cortez@datatables.net', 'San Francisco' ), + ( 35, 'Martena', 'Mccray', 46, 'Post-Sales support', 324050, '2011/03/09', 8240, 'm.mccray@datatables.net', 'Edinburgh' ), + ( 36, 'Unity', 'Butler', 47, 'Marketing Designer', 85675, '2009/12/09', 5384, 'u.butler@datatables.net', 'San Francisco' ), + ( 37, 'Howard', 'Hatfield', 51, 'Office Manager', 164500, '2008/12/16', 7031, 'h.hatfield@datatables.net', 'San Francisco' ), + ( 38, 'Hope', 'Fuentes', 41, 'Secretary', 109850, '2010/02/12', 6318, 'h.fuentes@datatables.net', 'San Francisco' ), + ( 39, 'Vivian', 'Harrell', 62, 'Financial Controller', 452500, '2009/02/14', 9422, 'v.harrell@datatables.net', 'San Francisco' ), + ( 40, 'Timothy', 'Mooney', 37, 'Office Manager', 136200, '2008/12/11', 7580, 't.mooney@datatables.net', 'London' ), + ( 41, 'Jackson', 'Bradshaw', 65, 'Director', 645750, '2008/09/26', 1042, 'j.bradshaw@datatables.net', 'New York' ), + ( 42, 'Olivia', 'Liang', 64, 'Support Engineer', 234500, '2011/02/03', 2120, 'o.liang@datatables.net', 'Singapore' ), + ( 43, 'Bruno', 'Nash', 38, 'Software Engineer', 163500, '2011/05/03', 6222, 'b.nash@datatables.net', 'London' ), + ( 44, 'Sakura', 'Yamamoto', 37, 'Support Engineer', 139575, '2009/08/19', 9383, 's.yamamoto@datatables.net', 'Tokyo' ), + ( 45, 'Thor', 'Walton', 61, 'Developer', 98540, '2013/08/11', 8327, 't.walton@datatables.net', 'New York' ), + ( 46, 'Finn', 'Camacho', 47, 'Support Engineer', 87500, '2009/07/07', 2927, 'f.camacho@datatables.net', 'San Francisco' ), + ( 47, 'Serge', 'Baldwin', 64, 'Data Coordinator', 138575, '2012/04/09', 8352, 's.baldwin@datatables.net', 'Singapore' ), + ( 48, 'Zenaida', 'Frank', 63, 'Software Engineer', 125250, '2010/01/04', 7439, 'z.frank@datatables.net', 'New York' ), + ( 49, 'Zorita', 'Serrano', 56, 'Software Engineer', 115000, '2012/06/01', 4389, 'z.serrano@datatables.net', 'San Francisco' ), + ( 50, 'Jennifer', 'Acosta', 43, 'Junior Javascript Developer', 75650, '2013/02/01', 3431, 'j.acosta@datatables.net', 'Edinburgh' ), + ( 51, 'Cara', 'Stevens', 46, 'Sales Assistant', 145600, '2011/12/06', 3990, 'c.stevens@datatables.net', 'New York' ), + ( 52, 'Hermione', 'Butler', 47, 'Regional Director', 356250, '2011/03/21', 1016, 'h.butler@datatables.net', 'London' ), + ( 53, 'Lael', 'Greer', 21, 'Systems Administrator', 103500, '2009/02/27', 6733, 'l.greer@datatables.net', 'London' ), + ( 54, 'Jonas', 'Alexander', 30, 'Developer', 86500, '2010/07/14', 8196, 'j.alexander@datatables.net', 'San Francisco' ), + ( 55, 'Shad', 'Decker', 51, 'Regional Director', 183000, '2008/11/13', 6373, 's.decker@datatables.net', 'Edinburgh' ), + ( 56, 'Michael', 'Bruce', 29, 'Javascript Developer', 183000, '2011/06/27', 5384, 'm.bruce@datatables.net', 'Singapore' ), + ( 57, 'Donna', 'Snider', 27, 'Customer Support', 112000, '2011/01/25', 4226, 'd.snider@datatables.net', 'New York' ); \ No newline at end of file diff --git a/public/vendor/datatables/examples/server_side/scripts/ids-arrays.php b/public/vendor/datatables/examples/server_side/scripts/ids-arrays.php new file mode 100644 index 000000000000..68091e316ce9 --- /dev/null +++ b/public/vendor/datatables/examples/server_side/scripts/ids-arrays.php @@ -0,0 +1,81 @@ + 'id', + 'dt' => 'DT_RowId', + 'formatter' => function( $d, $row ) { + // Technically a DOM id cannot start with an integer, so we prefix + // a string. This can also be useful if you have multiple tables + // to ensure that the id is unique with a different prefix + return 'row_'.$d; + } + ), + array( 'db' => 'first_name', 'dt' => 0 ), + array( 'db' => 'last_name', 'dt' => 1 ), + array( 'db' => 'position', 'dt' => 2 ), + array( 'db' => 'office', 'dt' => 3 ), + array( + 'db' => 'start_date', + 'dt' => 4, + 'formatter' => function( $d, $row ) { + return date( 'jS M y', strtotime($d)); + } + ), + array( + 'db' => 'salary', + 'dt' => 5, + 'formatter' => function( $d, $row ) { + return '$'.number_format($d); + } + ) +); + +// SQL server connection information +$sql_details = array( + 'user' => '', + 'pass' => '', + 'db' => '', + 'host' => '' +); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * If you just want to use the basic configuration for DataTables with PHP + * server-side, there is no need to edit below this line. + */ + +require( 'ssp.class.php' ); + +echo json_encode( + SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) +); + diff --git a/public/vendor/datatables/examples/server_side/scripts/ids-objects.php b/public/vendor/datatables/examples/server_side/scripts/ids-objects.php new file mode 100644 index 000000000000..feccbf87b91e --- /dev/null +++ b/public/vendor/datatables/examples/server_side/scripts/ids-objects.php @@ -0,0 +1,80 @@ + 'id', + 'dt' => 'DT_RowId', + 'formatter' => function( $d, $row ) { + // Technically a DOM id cannot start with an integer, so we prefix + // a string. This can also be useful if you have multiple tables + // to ensure that the id is unique with a different prefix + return 'row_'.$d; + } + ), + array( 'db' => 'first_name', 'dt' => 'first_name' ), + array( 'db' => 'last_name', 'dt' => 'last_name' ), + array( 'db' => 'position', 'dt' => 'position' ), + array( 'db' => 'office', 'dt' => 'office' ), + array( + 'db' => 'start_date', + 'dt' => 'start_date', + 'formatter' => function( $d, $row ) { + return date( 'jS M y', strtotime($d)); + } + ), + array( + 'db' => 'salary', + 'dt' => 'salary', + 'formatter' => function( $d, $row ) { + return '$'.number_format($d); + } + ) +); + +$sql_details = array( + 'user' => '', + 'pass' => '', + 'db' => '', + 'host' => '' +); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * If you just want to use the basic configuration for DataTables with PHP + * server-side, there is no need to edit below this line. + */ + +require( 'ssp.class.php' ); + +echo json_encode( + SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) +); + diff --git a/public/vendor/datatables/examples/server_side/scripts/ssp.class.php b/public/vendor/datatables/examples/server_side/scripts/ssp.class.php new file mode 100644 index 000000000000..6d6ac91bbdf7 --- /dev/null +++ b/public/vendor/datatables/examples/server_side/scripts/ssp.class.php @@ -0,0 +1,390 @@ + intval( $request['draw'] ), + "recordsTotal" => intval( $recordsTotal ), + "recordsFiltered" => intval( $recordsFiltered ), + "data" => SSP::data_output( $columns, $data ) + ); + } + + + /** + * Connect to the database + * + * @param array $sql_details SQL server connection details array, with the + * properties: + * * host - host name + * * db - database name + * * user - user name + * * pass - user password + * @return resource Database connection handle + */ + static function sql_connect ( $sql_details ) + { + try { + $db = @new PDO( + "mysql:host={$sql_details['host']};dbname={$sql_details['db']}", + $sql_details['user'], + $sql_details['pass'], + array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ) + ); + } + catch (PDOException $e) { + SSP::fatal( + "An error occurred while connecting to the database. ". + "The error reported by the server was: ".$e->getMessage() + ); + } + + return $db; + } + + + /** + * Execute an SQL query on the database + * + * @param resource $db Database handler + * @param array $bindings Array of PDO binding values from bind() to be + * used for safely escaping strings. Note that this can be given as the + * SQL query string if no bindings are required. + * @param string $sql SQL query to execute. + * @return array Result from the query (all rows) + */ + static function sql_exec ( $db, $bindings, $sql=null ) + { + // Argument shifting + if ( $sql === null ) { + $sql = $bindings; + } + + $stmt = $db->prepare( $sql ); + //echo $sql; + + // Bind parameters + if ( is_array( $bindings ) ) { + for ( $i=0, $ien=count($bindings) ; $i<$ien ; $i++ ) { + $binding = $bindings[$i]; + $stmt->bindValue( $binding['key'], $binding['val'], $binding['type'] ); + } + } + + // Execute + try { + $stmt->execute(); + } + catch (PDOException $e) { + SSP::fatal( "An SQL error occurred: ".$e->getMessage() ); + } + + // Return all + return $stmt->fetchAll(); + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Internal methods + */ + + /** + * Throw a fatal error. + * + * This writes out an error message in a JSON string which DataTables will + * see and show to the user in the browser. + * + * @param string $msg Message to send to the client + */ + static function fatal ( $msg ) + { + echo json_encode( array( + "error" => $msg + ) ); + + exit(0); + } + + /** + * Create a PDO binding key which can be used for escaping variables safely + * when executing a query with sql_exec() + * + * @param array &$a Array of bindings + * @param * $val Value to bind + * @param int $type PDO field type + * @return string Bound key to be used in the SQL where this parameter + * would be used. + */ + static function bind ( &$a, $val, $type ) + { + $key = ':binding_'.count( $a ); + + $a[] = array( + 'key' => $key, + 'val' => $val, + 'type' => $type + ); + + return $key; + } + + + /** + * Pull a particular property from each assoc. array in a numeric array, + * returning and array of the property values from each item. + * + * @param array $a Array to get data from + * @param string $prop Property to read + * @return array Array of property values + */ + static function pluck ( $a, $prop ) + { + $out = array(); + + for ( $i=0, $len=count($a) ; $i<$len ; $i++ ) { + $out[] = $a[$i][$prop]; + } + + return $out; + } +} + diff --git a/public/vendor/datatables/examples/server_side/simple.html b/public/vendor/datatables/examples/server_side/simple.html new file mode 100644 index 000000000000..126f8f3808d7 --- /dev/null +++ b/public/vendor/datatables/examples/server_side/simple.html @@ -0,0 +1,306 @@ + + + + + + + DataTables example - Server-side processing + + + + + + + + + + + + +
+
+

DataTables example - Server-side processing

+ +
+

There are many ways to get your data into DataTables, and if you are working with seriously large + databases, you might want to consider using the server-side options that DataTables provides. With + server-side processing enabled, all paging, searching, ordering etc actions that DataTables performs + are handed off to a server where an SQL engine (or similar) can perform these actions on the large data + set (after all, that's what the database engine is designed for!). As such, each draw of the table will + result in a new Ajax request being made to get the required data.

+ +

Server-side processing is enabled by setting the serverSide option to true and providing an Ajax data + source through the ajax option.

+ +

This example shows a very simple table, matching the other client-side processing examples, but in + this instance using server-side processing.

+
+ + + + + + + + + + + + + + + + + + + + + + + +
First nameLast namePositionOfficeStart dateSalary
First nameLast namePositionOfficeStart dateSalary
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable( { + "processing": true, + "serverSide": true, + "ajax": "scripts/server_processing.php" + } ); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/bootstrap.html b/public/vendor/datatables/examples/styling/bootstrap.html new file mode 100644 index 000000000000..6a229ca0ee08 --- /dev/null +++ b/public/vendor/datatables/examples/styling/bootstrap.html @@ -0,0 +1,762 @@ + + + + + + + DataTables example - Bootstrap + + + + + + + + + + + + + + +
+
+

DataTables example - Bootstrap

+ +
+

DataTables can integrate seamlessly with Bootstrap using + Bootstrap's table styling options to present a + consistent interface with your Bootstrap driven site / app.

+ +

DataTables' Bootstrap integration also provides a renderer for the pagination control in DataTables + to ensure that the pagination of the table is also styled consistently by Bootstrap.

+ +

This integration is done simply by including the DataTables Bootstrap files (CSS and JS) which will + set the defaults needed for DataTables to be initialised as normal, as shown in this examples.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

body { font-size: 140%; } +
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/cell-border.html b/public/vendor/datatables/examples/styling/cell-border.html new file mode 100644 index 000000000000..fec91b43da75 --- /dev/null +++ b/public/vendor/datatables/examples/styling/cell-border.html @@ -0,0 +1,745 @@ + + + + + + + DataTables example - Base style - cell borders + + + + + + + + + + + + +
+
+

DataTables example - Base style - cell borders

+ +
+

This example shows DataTables with just the cell-border class specified, giving a + strong delineation between individual cells.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/display.html b/public/vendor/datatables/examples/styling/display.html new file mode 100644 index 000000000000..42f410a62174 --- /dev/null +++ b/public/vendor/datatables/examples/styling/display.html @@ -0,0 +1,761 @@ + + + + + + + DataTables example - Base style + + + + + + + + + + + + +
+
+

DataTables example - Base style

+ +
+

The DataTables default style file has a number of features which can be enabled based on the class + name of the table. These features are:

+ +
    +
  • stripe - Zebra striped rows
  • +
  • cell-border - Cells with a border
  • +
  • row-border - Rows with a border (only one of cell-border and + row-border should be used for a single table.
  • +
  • order-column - Highlight the cells in the column currently being ordering + upon
  • +
  • hover - Highlight a row when hovered over
  • +
+ +

These classes can be combined (simply assign multiple classes to the table) to build up the styling + that you want for your table.

+ +

The display class is a short-cut for specifying the stripe hover order-column + row-border as the class name for a table. This is shown in the example below.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/foundation.html b/public/vendor/datatables/examples/styling/foundation.html new file mode 100644 index 000000000000..e02c17c1a6ee --- /dev/null +++ b/public/vendor/datatables/examples/styling/foundation.html @@ -0,0 +1,761 @@ + + + + + + + DataTables example - Foundation + + + + + + + + + + + + + + +
+
+

DataTables example - Foundation

+ +
+

DataTables can integrate seamlessly with Foundation using + Foundations's table styling + options to present a consistent interface with your Foundation driven site / app.

+ +

DataTables' Foundation integration also provides a renderer for the pagination control in DataTables + to ensure that the pagination of the table is also styled consistently by Foundation.

+ +

This integration is done simply by including the DataTables Foundation files (CSS and JS) which will + set the defaults needed for DataTables to be initialised as normal, as shown in this examples.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/hover.html b/public/vendor/datatables/examples/styling/hover.html new file mode 100644 index 000000000000..c3f18450cbe1 --- /dev/null +++ b/public/vendor/datatables/examples/styling/hover.html @@ -0,0 +1,745 @@ + + + + + + + DataTables example - Base style - hover + + + + + + + + + + + + +
+
+

DataTables example - Base style - hover

+ +
+

This example shows DataTables with just the hover class specified. This class will + instruct DataTables' styling to highlight a row when the mouse is hovered over it.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/index.html b/public/vendor/datatables/examples/styling/index.html new file mode 100644 index 000000000000..ee31834653bd --- /dev/null +++ b/public/vendor/datatables/examples/styling/index.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + DataTables examples - Styling + + + +
+
+

DataTables example - Styling

+ +
+

When using DataTables, you want your tables to fit in with your site / app to make the end user + experience as seamless as possible. For this reason, DataTables provides an easy to customise core + stylesheet, which has a number of features that you can enable or disable as you required. Additionally + there are a number of integration packages which can be used to fit DataTables into a site which uses + some of the popular CSS libraries such as Twitter Bootstrap and Foundation. Or of course you can craft + your own CSS to fit it into your site perfectly!

+ +

This section includes examples of how DataTables can be styled using these methods.

+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/jqueryUI.html b/public/vendor/datatables/examples/styling/jqueryUI.html new file mode 100644 index 000000000000..f9e909d1b74f --- /dev/null +++ b/public/vendor/datatables/examples/styling/jqueryUI.html @@ -0,0 +1,766 @@ + + + + + + + DataTables example - jQuery UI ThemeRoller + + + + + + + + + + + + + + +
+
+

DataTables example - jQuery UI ThemeRoller

+ +
+

DataTables has the ability to integrate seamlessly with almost any styling library, and integration + files are provided for several of the popular styling libraries, including jQuery UI.

+ +

To have your table styles integrate with jQuery UI's ThemeRoller styles, simply include the + DataTables CSS and JS integration files for jQuery UI, as shown in this example. Note also that because + jQuery doesn't provide table styles like some other CSS frameworks, the CSS integration file does add + this styling information.

+ +

Please note that DataTables 1.10- actually has built-in support for jQuery UI styling integration + through the jQueryUI option. However, this option is deprecated in DataTables + 1.10 and will be removed DataTables 1.11, matching how styling integration is provided for other + libraries - a more modular, maintainable and extensible method. The method presented on this page is + the method that will be use in future.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/no-classes.html b/public/vendor/datatables/examples/styling/no-classes.html new file mode 100644 index 000000000000..c638509194e3 --- /dev/null +++ b/public/vendor/datatables/examples/styling/no-classes.html @@ -0,0 +1,745 @@ + + + + + + + DataTables example - Base style - no styling classes + + + + + + + + + + + + +
+
+

DataTables example - Base style - no styling classes

+ +
+

This example shows the base DataTables style file being used, with none of the additional feature + style classes being used.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/order-column.html b/public/vendor/datatables/examples/styling/order-column.html new file mode 100644 index 000000000000..2f59f50adf84 --- /dev/null +++ b/public/vendor/datatables/examples/styling/order-column.html @@ -0,0 +1,746 @@ + + + + + + + DataTables example - Base style - order-column + + + + + + + + + + + + +
+
+

DataTables example - Base style - order-column

+ +
+

This example shows DataTables with just the order-column class specified. Typically you + would want to use the stripe feature class in addition to order-column + (possibly hover as well), but this example shows just the ordered column highlighting.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/row-border.html b/public/vendor/datatables/examples/styling/row-border.html new file mode 100644 index 000000000000..372fad937860 --- /dev/null +++ b/public/vendor/datatables/examples/styling/row-border.html @@ -0,0 +1,745 @@ + + + + + + + DataTables example - Base style - row borders + + + + + + + + + + + + +
+
+

DataTables example - Base style - row borders

+ +
+

This example shows DataTables with just the row-border class specified, which can + create a pleasing, minimalist, interface for your tables.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/examples/styling/stripe.html b/public/vendor/datatables/examples/styling/stripe.html new file mode 100644 index 000000000000..09aca48b7a39 --- /dev/null +++ b/public/vendor/datatables/examples/styling/stripe.html @@ -0,0 +1,744 @@ + + + + + + + DataTables example - Base style - stripe + + + + + + + + + + + + +
+
+

DataTables example - Base style - stripe

+ +
+

This example shows DataTables with just the stripe class specified.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
+ +
    +
  • Javascript
  • +
  • HTML
  • +
  • CSS
  • +
  • Ajax
  • +
  • Server-side script
  • +
+ +
+
+

The Javascript shown below is used to initialise the table shown in this + example:

$(document).ready(function() { + $('#example').dataTable(); +} ); + +

In addition to the above code, the following Javascript library files are loaded for use in this + example:

+ + +
+ +
+

The HTML shown below is the raw HTML table element, before it has been enhanced by + DataTables:

+
+ +
+
+

This example uses a little bit of additional CSS beyond what is loaded from the library + files (below), in order to correctly display the table. The additional CSS used is shown + below:

+
+ +

The following CSS library files are loaded for use in this example to provide the styling of the + table:

+ + +
+ +
+

This table loads data by Ajax. The latest data that has been loaded is shown below. This data + will update automatically as any additional data is loaded.

+
+ +
+

The script used to perform the server-side processing for this table is shown below. Please note + that this is just an example script using PHP. Server-side processing scripts can be written in any + language, using the protocol described in the + DataTables documentation.

+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/public/vendor/datatables/license.txt b/public/vendor/datatables/license.txt new file mode 100644 index 000000000000..48dee1865bcc --- /dev/null +++ b/public/vendor/datatables/license.txt @@ -0,0 +1,20 @@ +Copyright (c) 2008-2013 SpryMedia Limited +http://datatables.net + +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/public/vendor/datatables/media/unit_testing/data_sources/arrays.php b/public/vendor/datatables/media/unit_testing/data_sources/arrays.php new file mode 100644 index 000000000000..91ac0272586a --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/data_sources/arrays.php @@ -0,0 +1,50 @@ + array( + array(1, 2, 3, 4, 5) + ) + ); + } + else if ( $_REQUEST['dataSrc'] === 'data' ) { + return array( + 'data' => array( + array(1, 2, 3, 4, 5) + ) + ); + } + else if ( $_REQUEST['dataSrc'] === 'nested' ) { + return array( + 'data' => array( + 'inner' => array( + array(1, 2, 3, 4, 5) + ) + ) + ); + } + else if ( $_REQUEST['dataSrc'] === 'plain' ) { + return array( + array(1, 2, 3, 4, 5) + ); + } +} + + diff --git a/public/vendor/datatables/media/unit_testing/data_sources/method.php b/public/vendor/datatables/media/unit_testing/data_sources/method.php new file mode 100644 index 000000000000..954e74a769d7 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/data_sources/method.php @@ -0,0 +1,53 @@ + intval( $_REQUEST['sEcho'] ), + 'iTotalRecords' => 1, + 'iTotalDisplayRecords' => 1, + 'aaData' => array( + array(1, 2, 3, 4, 5) + ) + ) ); + } + else { + // Client-side processing + echo json_encode( array( + 'aaData' => array( + array(1, 2, 3, 4, 5) + ) + ) ); + } +} + + +function fail() +{ + if ( isset($_REQUEST['sEcho']) ) { + // Server-side processing + echo json_encode( array( + 'sEcho' => intval( $_REQUEST['sEcho'] ), + 'iTotalRecords' => 0, + 'iTotalDisplayRecords' => 0, + 'aaData' => array() + ) ); + } + else { + // Client-side processing + echo json_encode( array( + 'aaData' => array() + ) ); + } +} + diff --git a/public/vendor/datatables/media/unit_testing/data_sources/objects.php b/public/vendor/datatables/media/unit_testing/data_sources/objects.php new file mode 100644 index 000000000000..480dbf6d2494 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/data_sources/objects.php @@ -0,0 +1,33 @@ + intval( $_REQUEST['sEcho'] ), + 'iTotalRecords' => 1, + 'iTotalDisplayRecords' => 1, + 'aaData' => array( + array( + 'engine' => 10, + 'browser' => 20, + 'platform' => 30, + 'version' => 40, + 'grade' => 50 + ) + ) + ) ); +} +else { + echo json_encode( array( + 'aaData' => array( + array( + 'engine' => 10, + 'browser' => 20, + 'platform' => 30, + 'version' => 40, + 'grade' => 50 + ) + ) + ) ); +} + diff --git a/public/vendor/datatables/media/unit_testing/data_sources/param.php b/public/vendor/datatables/media/unit_testing/data_sources/param.php new file mode 100644 index 000000000000..021225ee54e7 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/data_sources/param.php @@ -0,0 +1,42 @@ + intval( $_REQUEST['sEcho'] ), + 'iTotalRecords' => 1, + 'iTotalDisplayRecords' => 1, + 'aaData' => array( + array(1, 2, 3, 4, 5) + ), + 'post' => xss( $_POST ), + 'get' => xss( $_GET ), + 'post_length' => count( array_keys( $_POST ) ), + 'get_length' => count( array_keys( $_GET ) ) + ) ); +} +else { + echo json_encode( array( + 'aaData' => array( + array(1, 2, 3, 4, 5) + ), + 'post' => xss( $_POST ), + 'get' => xss( $_GET ), + 'post_length' => count( array_keys( $_POST ) ), + 'get_length' => count( array_keys( $_GET ) ) + ) ); +} + + + +// This script shouldn't be hosted on a public server, but to prevent attacks: +function xss ( $a ) +{ + $out = array(); + + foreach ($a as $key => $value) { + $out[ $key ] = htmlentities( $value ); + } + + return $out; +} diff --git a/public/vendor/datatables/media/unit_testing/tests/6776-scrolling-table-grows.js b/public/vendor/datatables/media/unit_testing/tests/6776-scrolling-table-grows.js new file mode 100755 index 000000000000..cfc70d5ff6da --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests/6776-scrolling-table-grows.js @@ -0,0 +1,64 @@ +// DATA_TEMPLATE: 6776 +oTest.fnStart( "Actions on a scrolling table keep width" ); + + +$(document).ready( function () { + var oTable = $('#example').dataTable( { + "bFilter": true, + "bSort": true, + "sScrollY": "100px", + "bPaginate": false + } ); + + var iWidth = $('div.dataTables_wrapper').width(); + + oTest.fnTest( + "First sort has no effect on width", + function () { $('th:eq(1)').click(); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "Second sort has no effect on width", + function () { $('th:eq(1)').click(); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "Third sort has no effect on width", + function () { $('th:eq(2)').click(); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "Filter has no effect on width", + function () { oTable.fnFilter('i'); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "Filter 2 has no effect on width", + function () { oTable.fnFilter('in'); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "No result filter has header and body at same width", + function () { oTable.fnFilter('xxx'); }, + function () { return $('#example').width() == $('div.dataTables_scrollHeadInner').width(); } + ); + + oTest.fnTest( + "Filter with no results has no effect on width", + function () { oTable.fnFilter('xxx'); }, + function () { return $('div.dataTables_wrapper').width() == iWidth; } + ); + + oTest.fnTest( + "Filter with no results has table equal to wrapper width", + function () { oTable.fnFilter('xxx'); }, + function () { return $('div.dataTables_wrapper').width() == $('#example').width(); } + ); + + oTest.fnComplete(); +} ); \ No newline at end of file diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh-151.js b/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh-151.js new file mode 100755 index 000000000000..dfea7662e701 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh-151.js @@ -0,0 +1,60 @@ +// DATA_TEMPLATE: html_table +oTest.fnStart( "Check type is correctly applied to filtering columns" ); + + +$(document).ready( function () { + // The second column is HTML type, and should be detected as such, while the first + // column is number type. We should get no results, as a test for the bug, when + // searching for http + $('#example').dataTable( { + columnDefs: [ + { + targets: [ 0 ], + searchable: false + } + ] + } ); + + oTest.fnTest( + "Check html is stripped from second column", + function () { $('#example').dataTable().fnFilter('http'); }, + function () { return $('div.dataTables_info').html() == + 'Showing 0 to 0 of 0 entries (filtered from 4 total entries)'; + } + ); + + oTest.fnTest( + "But can filter on text in links", + function () { $('#example').dataTable().fnFilter('Integrity'); }, + function () { return $('div.dataTables_info').html() == + 'Showing 1 to 3 of 3 entries (filtered from 4 total entries)'; + } + ); + + oTest.fnTest( + "And on non-link text", + function () { $('#example').dataTable().fnFilter('EInt'); }, + function () { return $('div.dataTables_info').html() == + 'Showing 1 to 1 of 1 entries (filtered from 4 total entries)'; + } + ); + + oTest.fnTest( + "No search results on non-serachable data (first column)", + function () { $('#example').dataTable().fnFilter('2'); }, + function () { return $('div.dataTables_info').html() == + 'Showing 0 to 0 of 0 entries (filtered from 4 total entries)'; + } + ); + + oTest.fnTest( + "Release search", + function () { $('#example').dataTable().fnFilter(''); }, + function () { return $('div.dataTables_info').html() == + 'Showing 1 to 4 of 4 entries'; + } + ); + + + oTest.fnComplete(); +} ); \ No newline at end of file diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh125 - stripe stripping.js b/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh125 - stripe stripping.js new file mode 100755 index 000000000000..ff56185d9da0 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/1_dom/gh125 - stripe stripping.js @@ -0,0 +1,61 @@ +// DATA_TEMPLATE: dom_data +oTest.fnStart( "Odd and even are stripped from all rows" ); + +$(document).ready( function () { + $('table tbody tr').addClass( 'odd even' ); + $('table.display').dataTable(); + + oTest.fnTest( + "Odd is applied to exactly 5 rows", + null, + function () { + return $('#example tbody tr.odd').length === 5; + } + ); + + oTest.fnTest( + "Even is applied to exactly 5 rows", + null, + function () { + return $('#example tbody tr.even').length === 5; + } + ); + + oTest.fnTest( + "First row is odd", + null, + function () { + return $('#example tbody tr:eq(0)').hasClass('odd') && + ! $('#example tbody tr:eq(0)').hasClass('even'); + } + ); + + oTest.fnTest( + "Second row is even", + null, + function () { + return $('#example tbody tr:eq(1)').hasClass('even') && + ! $('#example tbody tr:eq(1)').hasClass('odd'); + } + ); + + oTest.fnTest( + "Third row is odd", + null, + function () { + return $('#example tbody tr:eq(2)').hasClass('odd') && + ! $('#example tbody tr:eq(2)').hasClass('even'); + } + ); + + oTest.fnTest( + "Fourth row is even", + null, + function () { + return $('#example tbody tr:eq(3)').hasClass('even') && + ! $('#example tbody tr:eq(3)').hasClass('odd'); + } + ); + + oTest.fnComplete(); +} ); \ No newline at end of file diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/ajax.js b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/ajax.js new file mode 100644 index 000000000000..f43e3aedb3a5 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/ajax.js @@ -0,0 +1,589 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "ajax" ); + + +$(document).ready( function () { + var json; + var result; + + // + // As a string + // + oTest.fnWaitTest( + "Basic request as a string - getting arrays", + function () { + $('#example').dataTable( { + "ajax": "../data_sources/arrays.php" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "Basic request as a string - getting objects", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "ajax": "../data_sources/objects.php", + "columns": [ + { data: 'engine' }, + { data: 'browser' }, + { data: 'platform' }, + { data: 'version' }, + { data: 'grade' } + ] + } ); + }, + function () { + return $('tbody td').eq(1).html() === '20'; + } + ); + + oTest.fnWaitTest( + "Default request is GET - string based", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": "../data_sources/method.php?method=get" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "jQuery anti-cache parameter is sent by default - string based", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": "../data_sources/param.php" + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get._; + } + ); + + oTest.fnWaitTest( + "No other parameters sent", + null, + function () { + return json.get_length === 1; + } + ); + + + + // + // As an object + // + oTest.fnWaitTest( + "Get Ajax using url parameter only", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + // props + oTest.fnWaitTest( + "Disable cache property", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "cache": true + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && typeof json.get._ === 'undefined'; + } + ); + + oTest.fnWaitTest( + "Set an error callback", + function () { + oSession.fnRestore(); + result = false; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/rubbish", + "error": function () { + result = true; + } + } + } ); + }, + function () { + return result; + } + ); + + // type + oTest.fnWaitTest( + "type - Default request is GET", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/method.php?method=get" + } + } ); + }, + function () { + return $('tbody td').eq(1).html() === '2'; + } + ); + + oTest.fnWaitTest( + "type - Can use `type` to make a POST request", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/method.php?method=post", + "type": "POST" + } + } ); + }, + function () { + return $('tbody td').eq(2).html() === '3'; + } + ); + + oTest.fnWaitTest( + "type - Can use `type` to make a PUT request", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/method.php?method=put", + "type": "PUT" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + // data + oTest.fnWaitTest( + "data - Function based data - has empty array as input", + function () { + oSession.fnRestore(); + result = false; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + result = d.length === 0; + } + } + } ); + }, + function () { + return result; + } + ); + + oTest.fnWaitTest( + "data - Function based data - can return an object", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return { 'tapestry': 'king' }; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - multiple properties", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return { 'tapestry': 'king', 'move': 'earth' }; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king' && json.get.move === 'earth'; + } + ); + + oTest.fnWaitTest( + "data - Confirm no other parameters sent", + null, + function () { + return json.get_length === 3; + } + ); + + + oTest.fnWaitTest( + "data - Function based data - can return an array of key/value object pairs", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return [ + { 'name': 'tapestry', 'value': 'carole' } + ]; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - multiple properties", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return [ + { 'name': 'tapestry', 'value': 'carole' }, + { 'name': 'feel', 'value': 'earth move' } + ]; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole' && json.get.feel === 'earth move'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - add parameters to passed in array", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + d.push( { 'name': 'tapestry', 'value': 'carole' } ); + d.push( { 'name': 'rich', 'value': 'hue' } ); + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole' && json.get.rich === 'hue'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - send parameters by POST", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + d.push( { 'name': 'tapestry', 'value': 'king' } ); + d.push( { 'name': 'rich', 'value': 'hue' } ); + }, + "type": "POST" + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.post && json.post.tapestry === 'king' && json.post.rich === 'hue'; + } + ); + + oTest.fnWaitTest( + "data - Object based data - sends parameters defined", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": { + "too": "late", + "got": "friend" + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.too === 'late' && json.get.got === 'friend'; + } + ); + + oTest.fnWaitTest( + "data - Array based data - sends parameters defined", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/param.php", + "data": [ + { 'name': 'tapestry', 'value': 'king' }, + { 'name': 'far', 'value': 'away' } + ] + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king' && json.get.far === 'away'; + } + ); + + + // dataSrc + oTest.fnWaitTest( + "dataSrc - Default data source is aaData", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a string - read from `data`", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=data", + "dataSrc": "data" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a string - read from nested property `data.inner`", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=nested", + "dataSrc": "data.inner" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a string - read from plain array", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=plain", + "dataSrc": "" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a function, return JSON property", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=nested", + "dataSrc": function ( json ) { + return json.data.inner; + } + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a function, can manipulate the data", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=data", + "dataSrc": function ( json ) { + json.data[0][0] = "Tapestry"; + return json.data; + } + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === 'Tapestry' && + $('tbody td').eq(1).html() === '2'; + } + ); + + + + // + // As a function + // + oTest.fnTest( + "ajax as a function - first parameter is array of data", + function () { + oSession.fnRestore(); + result = null; + + $('#example').dataTable( { + "ajax": function ( data, callback, settings ) { + result = arguments; + callback( { aaData: [] } ); + } + } ); + }, + function () { + return $.isArray( result[0] ) && result[0].length === 0; + } + ); + + oTest.fnTest( + "ajax as a function - second parameter is callback function", + null, + function () { + return $.isFunction( result[1] ); + } + ); + + oTest.fnTest( + "ajax as a function - third parameter is settings object", + null, + function () { + return result[2] === $('#example').dataTable().fnSettings(); + } + ); + + oTest.fnTest( + "ajax as a function - only three parameters", + null, + function () { + return result.length === 3; + } + ); + + oTest.fnTest( + "ajax as a function - callback will insert data into the table", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": function ( data, callback, settings ) { + callback( { aaData: [[1,2,3,4,5]] } ); + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + + oTest.fnComplete(); +} ); diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/fnServerParams.js b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/fnServerParams.js new file mode 100644 index 000000000000..586e8bdb72d8 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/fnServerParams.js @@ -0,0 +1,82 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "fnServerParams" ); + + +$(document).ready( function () { + /* Check the default */ + var json = {}; + var oTable = $('#example').dataTable( { + "sAjaxSource": "../data_sources/param.php" + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + + oTest.fnWaitTest( + "jQuery anti-cache parameter was sent", + null, + function () { + return json.get && json.get._; + } + ); + + oTest.fnWaitTest( + "No other parameters sent", + null, + function () { + return 1 === $.map( json.get, function (val) { + return val; + } ).length; + } + ); + + oTest.fnWaitTest( + "Send additional parameters", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "sAjaxSource": "../data_sources/param.php", + "fnServerParams": function ( data ) { + data.push( { name: 'test', value: 'unit' } ); + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.test === 'unit'; + } + ); + + oTest.fnTest( + "jQuery anti-cache parameter was still sent", + null, + function () { + return json.get._; + } + ); + + oTest.fnWaitTest( + "Send multiple parameters", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "sAjaxSource": "../data_sources/param.php", + "fnServerParams": function ( data ) { + data.push( { name: 'test', value: 'unit' } ); + data.push( { name: 'tapestry', value: 'king' } ); + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.test === 'unit' && json.get.tapestry === 'king'; + } + ); + + oTest.fnComplete(); +} ); diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/sServerMethod.js b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/sServerMethod.js new file mode 100644 index 000000000000..2428eaa5974e --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/3_ajax/sServerMethod.js @@ -0,0 +1,49 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "sServerMethod" ); + + +$(document).ready( function () { + /* Check the default */ + var oTable = $('#example').dataTable( { + "sAjaxSource": "../data_sources/method.php?method=get" + } ); + + oTest.fnWaitTest( + "Default method was GET", + null, + function () { + // A valid request will place a single row in the table + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "Can make a POST request", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "sAjaxSource": "../data_sources/method.php?method=post", + "sServerMethod": "POST" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "Can make a PUT request", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "sAjaxSource": "../data_sources/method.php?method=put", + "sServerMethod": "PUT" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnComplete(); +} ); diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/ajax.js b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/ajax.js new file mode 100644 index 000000000000..6e53bb1cf0a9 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/ajax.js @@ -0,0 +1,587 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "ajax" ); + + +$(document).ready( function () { + var json; + var result; + + // + // As a string + // + oTest.fnWaitTest( + "Basic request as a string - getting arrays", + function () { + $('#example').dataTable( { + "serverSide": true, + "ajax": "../data_sources/arrays.php" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "Basic request as a string - getting objects", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "serverSide": true, + "ajax": "../data_sources/objects.php", + "columns": [ + { data: 'engine' }, + { data: 'browser' }, + { data: 'platform' }, + { data: 'version' }, + { data: 'grade' } + ] + } ); + }, + function () { + return $('tbody td').eq(1).html() === '20'; + } + ); + + oTest.fnWaitTest( + "Default request is GET - string based", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": "../data_sources/method.php?method=get" + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "jQuery anti-cache parameter is sent by default - string based", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": "../data_sources/param.php" + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get._; + } + ); + + oTest.fnWaitTest( + "Only the SSP parameters were also sent", + null, + function () { + return json.get_length === 36; + } + ); + + + + // + // As an object + // + oTest.fnWaitTest( + "Get Ajax using url parameter only", + function () { + oSession.fnRestore(); + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + // props + oTest.fnWaitTest( + "Set an error callback", + function () { + oSession.fnRestore(); + result = false; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/rubbish", + "error": function () { + result = true; + } + } + } ); + }, + function () { + return result; + } + ); + + // type + oTest.fnWaitTest( + "type - Default request is GET", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/method.php?method=get" + } + } ); + }, + function () { + return $('tbody td').eq(1).html() === '2'; + } + ); + + oTest.fnWaitTest( + "type - Can use `type` to make a POST request", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/method.php?method=post", + "type": "POST" + } + } ); + }, + function () { + return $('tbody td').eq(2).html() === '3'; + } + ); + + oTest.fnWaitTest( + "type - Can use `type` to make a PUT request", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/method.php?method=put", + "type": "PUT" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + // data + oTest.fnWaitTest( + "data - Function based data - has standard SSP parameters only", + function () { + oSession.fnRestore(); + result = false; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + result = d.length === 35; + } + } + } ); + }, + function () { + return result; + } + ); + + oTest.fnWaitTest( + "data - Function based data - can return an object", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return { 'tapestry': 'king' }; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - multiple properties", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return { 'tapestry': 'king', 'move': 'earth' }; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king' && json.get.move === 'earth'; + } + ); + + oTest.fnWaitTest( + "data - Confirm only SSP parameters were also sent", + null, + function () { + return json.get_length === 38; + } + ); + + + oTest.fnWaitTest( + "data - Function based data - can return an array of key/value object pairs", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return [ + { 'name': 'tapestry', 'value': 'carole' } + ]; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - multiple properties", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + return [ + { 'name': 'tapestry', 'value': 'carole' }, + { 'name': 'feel', 'value': 'earth move' } + ]; + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole' && json.get.feel === 'earth move'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - add parameters to passed in array", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + d.push( { 'name': 'tapestry', 'value': 'carole' } ); + d.push( { 'name': 'rich', 'value': 'hue' } ); + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'carole' && json.get.rich === 'hue'; + } + ); + + oTest.fnWaitTest( + "data - Function based data - send parameters by POST", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": function ( d ) { + d.push( { 'name': 'tapestry', 'value': 'king' } ); + d.push( { 'name': 'rich', 'value': 'hue' } ); + }, + "type": "POST" + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.post && json.post.tapestry === 'king' && json.post.rich === 'hue'; + } + ); + + oTest.fnWaitTest( + "data - Object based data - sends parameters defined", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": { + "too": "late", + "got": "friend" + } + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.too === 'late' && json.get.got === 'friend'; + } + ); + + oTest.fnWaitTest( + "data - Array based data - sends parameters defined", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/param.php", + "data": [ + { 'name': 'tapestry', 'value': 'king' }, + { 'name': 'far', 'value': 'away' } + ] + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.tapestry === 'king' && json.get.far === 'away'; + } + ); + + + // dataSrc + oTest.fnWaitTest( + "dataSrc - Default data source is aaData", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a string - read from `data`", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=data", + "dataSrc": "data" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a string - read from nested property `data.inner`", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=nested", + "dataSrc": "data.inner" + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a function, return JSON property", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=nested", + "dataSrc": function ( json ) { + return json.data.inner; + } + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + oTest.fnWaitTest( + "dataSrc - as a function, can manipulate the data", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "serverSide": true, + "ajax": { + "url": "../data_sources/arrays.php?dataSrc=data", + "dataSrc": function ( json ) { + json.data[0][0] = "Tapestry"; + return json.data; + } + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === 'Tapestry' && + $('tbody td').eq(1).html() === '2'; + } + ); + + + + // + // As a function + // + oTest.fnTest( + "ajax as a function - first parameter is array of data", + function () { + oSession.fnRestore(); + result = null; + + $('#example').dataTable( { + "serverSide": true, + "ajax": function ( data, callback, settings ) { + result = arguments; + callback( { + sEcho: 1, + iTotalRecords: 1, + iTotalDisplayRecords: 1, + aaData: [] + } ); + } + } ); + }, + function () { + console.log( result ); + return $.isArray( result[0] ) && result[0].length === 35; + } + ); + + oTest.fnTest( + "ajax as a function - second parameter is callback function", + null, + function () { + return $.isFunction( result[1] ); + } + ); + + oTest.fnTest( + "ajax as a function - third parameter is settings object", + null, + function () { + return result[2] === $('#example').dataTable().fnSettings(); + } + ); + + oTest.fnTest( + "ajax as a function - only three parameters", + null, + function () { + return result.length === 3; + } + ); + + oTest.fnTest( + "ajax as a function - callback will insert data into the table", + function () { + oSession.fnRestore(); + + $('#example').dataTable( { + "ajax": function ( data, callback, settings ) { + callback( { + sEcho: 1, + iTotalRecords: 1, + iTotalDisplayRecords: 1, + aaData: [[1,2,3,4,5]] + } ); + } + } ); + }, + function () { + return $('tbody td').eq(0).html() === '1'; + } + ); + + + + oTest.fnComplete(); +} ); diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerData.js b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerData.js new file mode 100644 index 000000000000..cbed47e3fb38 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerData.js @@ -0,0 +1,68 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "fnServerData for SSP sourced data" ); + +$(document).ready( function () { + var mPass; + + oTest.fnTest( + "Argument length", + function () { + $('#example').dataTable( { + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerData": function () { + mPass = arguments.length; + } + } ); + }, + function () { return mPass == 4; } + ); + + oTest.fnTest( + "Url", + function () { + $('#example').dataTable( { + "bDestroy": true, + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerData": function (sUrl, aoData, fnCallback, oSettings) { + mPass = sUrl == "../data_sources/param.php"; + } + } ); + }, + function () { return mPass; } + ); + + oTest.fnTest( + "Data array", + function () { + $('#example').dataTable( { + "bDestroy": true, + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerData": function (sUrl, aoData, fnCallback, oSettings) { + mPass = aoData.length==35; + } + } ); + }, + function () { return mPass; } + ); + + oTest.fnTest( + "Callback function", + function () { + $('#example').dataTable( { + "bDestroy": true, + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerData": function (sUrl, aoData, fnCallback, oSettings) { + mPass = typeof fnCallback == 'function'; + } + } ); + }, + function () { return mPass; } + ); + + + oTest.fnComplete(); +} ); \ No newline at end of file diff --git a/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerParams.js b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerParams.js new file mode 100644 index 000000000000..00bdd1cbc844 --- /dev/null +++ b/public/vendor/datatables/media/unit_testing/tests_onhold/4_server-side/fnServerParams.js @@ -0,0 +1,122 @@ +// DATA_TEMPLATE: empty_table +oTest.fnStart( "fnServerParams" ); + + +$(document).ready( function () { + /* Check the default */ + var json = {}; + var oTable = $('#example').dataTable( { + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php" + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + + oTest.fnWaitTest( + "jQuery anti-cache parameter was sent", + null, + function () { + return json.get && json.get._; + } + ); + + oTest.fnWaitTest( + "Default SSP parameters were sent", + null, + function () { + return 36 === $.map( json.get, function (val) { + return val; + } ).length; + } + ); + + oTest.fnWaitTest( + "Send additional parameters", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerParams": function ( data ) { + data.push( { name: 'test', value: 'unit' } ); + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.test === 'unit'; + } + ); + + oTest.fnTest( + "Default parameters were still sent", + null, + function () { + return 37 === $.map( json.get, function (val) { + return val; + } ).length; + } + ); + + oTest.fnWaitTest( + "Send multiple parameters", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerParams": function ( data ) { + data.push( { name: 'test', value: 'unit' } ); + data.push( { name: 'tapestry', value: 'king' } ); + } + } ).on('xhr', function (e, settings, o) { + json = o; + } ); + }, + function () { + return json.get && json.get.test === 'unit' && json.get.tapestry === 'king'; + } + ); + + oTest.fnWaitTest( + "Delete parameters", + function () { + oSession.fnRestore(); + json = {}; + + $('#example').dataTable( { + "bServerSide": true, + "sAjaxSource": "../data_sources/param.php", + "fnServerParams": function ( data ) { + var remove = function ( a, param ) { + for ( var i=0 ; i +Gilles van den Hoven +Michael Geary +Stefan Petre +Yehuda Katz +Corey Jewett +Klaus Hartl +Franck Marcia +Jörn Zaefferer +Paul Bakaus +Brandon Aaron +Mike Alsup +Dave Methvin +Ed Engelhardt +Sean Catchpole +Paul Mclanahan +David Serduke +Richard D. Worth +Scott González +Ariel Flesler +Jon Evans +TJ Holowaychuk +Michael Bensoussan +Robert Katić +Louis-Rémi Babé +Earle Castledine +Damian Janowski +Rich Dougherty +Kim Dalsgaard +Andrea Giammarchi +Mark Gibson +Karl Swedberg +Justin Meyer +Ben Alman +James Padolsey +David Petersen +Batiste Bieler +Alexander Farkas +Rick Waldron +Filipe Fortes +Neeraj Singh +Paul Irish +Iraê Carvalho +Matt Curry +Michael Monteleone +Noah Sloan +Tom Viner +Douglas Neiner +Adam J. Sontag +Dave Reed +Ralph Whitbeck +Carl Fürstenberg +Jacob Wright +J. Ryan Stinnett +Heungsub Lee +Colin Snover +Ryan W Tenney +Ron Otten +Jephte Clain +Anton Matzneller +Alex Sexton +Dan Heberden +Henri Wiechers +Russell Holbrook +Julian Aubourg +Gianni Alessandro Chiappetta +Scott Jehl +James Burke +Jonas Pfenniger +Xavi Ramirez +Jared Grippe +Sylvester Keil +Brandon Sterne +Mathias Bynens +Timmy Willison +Corey Frang +Anton Kovalyov +David Murdoch +Josh Varner +Charles McNulty +Jordan Boesch +Jess Thrysoee +Michael Murray +Lee Carpenter +Alexis Abril +Rob Morgan +John Firebaugh +Sam Bisbee +Gilmore Davidson +Brian Brennan +Xavier Montillet +Daniel Pihlstrom +Sahab Yazdani +Scott Hughes +Mike Sherov +Greg Hazel +Schalk Neethling +Denis Knauf +Timo Tijhof +Steen Nielsen +Anton Ryzhov +Shi Chuan +Berker Peksag +Toby Brain +Matt Mueller +Daniel Herman +Oleg Gaidarenko +Richard Gibson +Rafaël Blais Masson +Joe Presbrey +Sindre Sorhus +Arne de Bree +Vladislav Zarakovsky +Andrew E Monat +Joao Henrique de Andrade Bruni +Dominik D. Geyer +Matt Farmer +Trey Hunner +Jason Moon +Jeffery To +Kris Borchers +Vladimir Zhuravlev +Jacob Thornton +Chad Killingsworth +Nowres Rafid +David Benjamin +Uri Gilad +Chris Faulkner +Elijah Manor +Daniel Chatfield +Nikita Govorov +Wesley Walser +Michael Pennisi +Markus Staab +Benjamin Truyman +James Huston +Ismail Khair +Carl Danley +Michael Petrovich +Callum Macrae +David Bonner +Erick Ruiz de Chávez +Akintayo Akinwunmi +Dave Riddle +Greg Lavallee +Daniel Gálvez +Sai Lung Wong +Tom H Fuertes +Roland Eckl +Jay Merrifield +Allen J Schmidt Jr +Marcel Greter +Matthias Jäggli +Yiming He +Devin Cooper +Bennett Sorbo +Sebastian Burkhard +Danil Somsikov +Jean Boussier +Adam Coulombe +Andrew Plummer diff --git a/public/vendor/jquery/CONTRIBUTING.md b/public/vendor/jquery/CONTRIBUTING.md new file mode 100644 index 000000000000..6028db34d443 --- /dev/null +++ b/public/vendor/jquery/CONTRIBUTING.md @@ -0,0 +1,216 @@ +# Contributing to jQuery + +1. [Getting Involved](#getting-involved) +2. [Discussion](#discussion) +3. [How To Report Bugs](#how-to-report-bugs) +4. [Core Style Guide](#jquery-core-style-guide) +5. [Tips For Bug Patching](#tips-for-bug-patching) + + + +## Getting Involved + +There are a number of ways to get involved with the development of jQuery core. Even if you've never contributed code to an Open Source project before, we're always looking for help identifying bugs, writing and reducing test cases and documentation. + +This is the best way to contribute to jQuery core. Please read through the full guide detailing [How to Report Bugs](#how-to-report-bugs). + +## Discussion + +### Forum and IRC + +The jQuery core development team frequently tracks posts on the [jQuery Development Forum](http://forum.jquery.com/developing-jquery-core). If you have longer posts or questions please feel free to post them there. If you think you've found a bug please [file it in the bug tracker](#how-to-report-bugs). + +Additionally most of the jQuery core development team can be found in the [#jquery-dev](http://webchat.freenode.net/?channels=jquery-dev) IRC channel on irc.freenode.net. + +### Weekly Status Meetings + +Every week (unless otherwise noted) the jQuery core dev team has a meeting to discuss the progress of current work and to bring forward possible new blocker bugs for discussion. + +The meeting is held in the [#jquery-meeting](http://webchat.freenode.net/?channels=jquery-meeting) IRC channel on irc.freenode.net at [Noon EST](http://www.timeanddate.com/worldclock/fixedtime.html?month=1&day=17&year=2011&hour=12&min=0&sec=0&p1=43) on Mondays. + +[Past Meeting Notes](https://docs.google.com/document/d/1MrLFvoxW7GMlH9KK-bwypn77cC98jUnz7sMW1rg_TP4/edit?hl=en) + + +## How to Report Bugs + +### Make sure it is a jQuery bug + +Many bugs reported to our bug tracker are actually bugs in user code, not in jQuery code. Keep in mind that just because your code throws an error and the console points to a line number inside of jQuery, this does *not* mean the bug is a jQuery bug; more often than not, these errors result from providing incorrect arguments when calling a jQuery function. + +If you are new to jQuery, it is usually a much better idea to ask for help first in the [Using jQuery Forum](http://forum.jquery.com/using-jquery) or the [jQuery IRC channel](http://webchat.freenode.net/?channels=%23jquery). You will get much quicker support, and you will help avoid tying up the jQuery team with invalid bug reports. These same resources can also be useful if you want to confirm that your bug is indeed a bug in jQuery before filing any tickets. + + +### Disable any browser extensions + +Make sure you have reproduced the bug with all browser extensions and add-ons disabled, as these can sometimes cause things to break in interesting and unpredictable ways. Try using incognito, stealth or anonymous browsing modes. + + +### Try the latest version of jQuery + +Bugs in old versions of jQuery may have already been fixed. In order to avoid reporting known issues, make sure you are always testing against the [latest build](http://code.jquery.com/jquery.js). + +### Try an older version of jQuery + +Sometimes, bugs are introduced in newer versions of jQuery that do not exist in previous versions. When possible, it can be useful to try testing with an older release. + +### Reduce, reduce, reduce! + +When you are experiencing a problem, the most useful thing you can possibly do is to [reduce your code](http://webkit.org/quality/reduction.html) to the bare minimum required to reproduce the issue. This makes it *much* easier to isolate and fix the offending code. Bugs that are reported without reduced test cases take on average 9001% longer to fix than bugs that are submitted with them, so you really should try to do this if at all possible. + +## jQuery Core Style Guide + +See: [jQuery Core Style Guide](http://docs.jquery.com/JQuery_Core_Style_Guidelines) + +## Tips For Bug Patching + + +### Environment: localhost w/ PHP, Node & Grunt + +Starting in jQuery 1.8, a newly overhauled development workflow has been introduced. In this new system, we rely on node & gruntjs to automate the building and validation of source code—while you write code. + +The Ajax tests still depend on PHP running locally*, so make sure you have the following installed: + +* Some kind of localhost server program that supports PHP (any will do) +* Node.js +* NPM (comes with the latest version of Node.js) +* Grunt (install with: `npm install grunt -g` + + +Maintaining a list of platform specific instructions is outside of the scope of this document and there is plenty of existing documentation for the above technologies. + +* The PHP dependency will soon be shed in favor of an all-node solution. + + +### Build a Local Copy of jQuery + +Create a fork of the jQuery repo on github at http://github.com/jquery/jquery + +Change directory to your web root directory, whatever that might be: + +```bash +$ cd /path/to/your/www/root/ +``` + +Clone your jQuery fork to work locally + +```bash +$ git clone git@github.com:username/jquery.git +``` + +Change directory to the newly created dir jquery/ + +```bash +$ cd jquery +``` + +Add the jQuery master as a remote. I label mine "upstream" + +```bash +$ git remote add upstream git://github.com/jquery/jquery.git +``` + +Get in the habit of pulling in the "upstream" master to stay up to date as jQuery receives new commits + +```bash +$ git pull upstream master +``` + +Run the Grunt tools: + +```bash +$ grunt && grunt watch +``` + +Now open the jQuery test suite in a browser at http://localhost/test. If there is a port, be sure to include it. + +Success! You just built and tested jQuery! + + +### Fix a bug from a ticket filed at bugs.jquery.com: + +**NEVER write your patches to the master branch** - it gets messy (I say this from experience!) + +**ALWAYS USE A "TOPIC" BRANCH!** Like so (#### = the ticket #)... + +Make sure you start with your up-to-date master: + +```bash +$ git checkout master +``` + +Create and checkout a new branch that includes the ticket # + +```bash +$ git checkout -b bug_#### + +# ( Explanation: this useful command will: +# "checkout" a "-b" (branch) by the name of "bug_####" +# or create it if it doesn't exist ) +``` + +Now you're on branch: bug_#### + +Determine the module/file you'll be working in... + +Open up the corresponding /test/unit/?????.js and add the initial failing unit tests. This may seem awkward at first, but in the long run it will make sense. To truly and efficiently patch a bug, you need to be working against that bug. + +Next, open the module files and make your changes + +Run http://localhost/test --> **ALL TESTS MUST PASS** + +Once you're satisfied with your patch... + +Stage the files to be tracked: + +```bash +$ git add filename +# (you can use "git status" to list the files you've changed) +``` + + +( I recommend NEVER, EVER using "git add . " ) + +Once you've staged all of your changed files, go ahead and commit them + +```bash +$ git commit -m "Brief description of fix. Fixes #0000" +``` + +For a multiple line commit message, leave off the `-m "description"`. + +You will then be led into vi (or the text editor that you have set up) to complete your commit message. + +Then, push your branch with the bug fix commits to your github fork + +```bash +$ git push origin -u bug_#### +``` + +Before you tackle your next bug patch, return to the master: + +```bash +$ git checkout master +``` + + + +### Test Suite Tips... + +During the process of writing your patch, you will run the test suite MANY times. You can speed up the process by narrowing the running test suite down to the module you are testing by either double clicking the title of the test or appending it to the url. The following examples assume you're working on a local repo, hosted on your localhost server. + +Example: + +http://localhost/test/?filter=css + +This will only run the "css" module tests. This will significantly speed up your development and debugging. + +**ALWAYS RUN THE FULL SUITE BEFORE COMMITTING AND PUSHING A PATCH!** + + +### jQuery supports the following browsers: + +* Chrome Current-1 +* Safari Current-1 +* Firefox Current-1 +* IE 6+ +* Opera Current-1 diff --git a/public/vendor/jquery/Gruntfile.js b/public/vendor/jquery/Gruntfile.js new file mode 100644 index 000000000000..4058871d510a --- /dev/null +++ b/public/vendor/jquery/Gruntfile.js @@ -0,0 +1,496 @@ +module.exports = function( grunt ) { + + "use strict"; + + var distpaths = [ + "dist/jquery.js", + "dist/jquery.min.map", + "dist/jquery.min.js" + ], + readOptionalJSON = function( filepath ) { + var data = {}; + try { + data = grunt.file.readJSON( filepath ); + } catch(e) {} + return data; + }; + + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + dst: readOptionalJSON("dist/.destination.json"), + compare_size: { + files: distpaths + }, + selector: { + destFile: "src/selector.js", + apiFile: "src/sizzle-jquery.js", + srcFile: "src/sizzle/sizzle.js" + }, + build: { + all:{ + dest: "dist/jquery.js", + src: [ + "src/intro.js", + "src/core.js", + "src/callbacks.js", + "src/deferred.js", + "src/support.js", + "src/data.js", + "src/queue.js", + "src/attributes.js", + "src/event.js", + "src/selector.js", + "src/traversing.js", + "src/manipulation.js", + + { flag: "css", src: "src/css.js" }, + "src/serialize.js", + { flag: "event-alias", src: "src/event-alias.js" }, + { flag: "ajax", src: "src/ajax.js" }, + { flag: "ajax/script", src: "src/ajax/script.js", needs: ["ajax"] }, + { flag: "ajax/jsonp", src: "src/ajax/jsonp.js", needs: [ "ajax", "ajax/script" ] }, + { flag: "ajax/xhr", src: "src/ajax/xhr.js", needs: ["ajax"] }, + { flag: "effects", src: "src/effects.js", needs: ["css"] }, + { flag: "offset", src: "src/offset.js", needs: ["css"] }, + { flag: "dimensions", src: "src/dimensions.js", needs: ["css"] }, + { flag: "deprecated", src: "src/deprecated.js" }, + + "src/exports.js", + "src/outro.js" + ] + } + }, + + jshint: { + dist: { + src: [ "dist/jquery.js" ], + options: { + jshintrc: "src/.jshintrc" + } + }, + grunt: { + src: [ "Gruntfile.js" ], + options: { + jshintrc: ".jshintrc" + } + }, + tests: { + // TODO: Once .jshintignore is supported, use that instead. + // issue located here: https://github.com/gruntjs/grunt-contrib-jshint/issues/1 + src: [ "test/data/{test,testinit,testrunner}.js", "test/unit/**/*.js" ], + options: { + jshintrc: "test/.jshintrc" + } + } + }, + + testswarm: { + tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split(" ") + }, + + watch: { + files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ], + tasks: "dev" + }, + + uglify: { + all: { + files: { + "dist/jquery.min.js": [ "dist/jquery.js" ] + }, + options: { + banner: "/*! jQuery v<%= pkg.version %> | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */", + sourceMap: "dist/jquery.min.map", + compress: { + hoist_funs: false, + join_vars: false, + loops: false, + unused: false + }, + beautify: { + ascii_only: true + } + } + } + } + }); + + grunt.registerTask( "testswarm", function( commit, configFile ) { + var jobName, + testswarm = require( "testswarm" ), + testUrls = [], + pull = /PR-(\d+)/.exec( commit ), + config = grunt.file.readJSON( configFile ).jquery, + tests = grunt.config([ this.name, "tests" ]); + + if ( pull ) { + jobName = "jQuery pull #" + pull[ 1 ] + ""; + } else { + jobName = "jQuery commit #" + commit.substr( 0, 10 ) + ""; + } + + tests.forEach(function( test ) { + testUrls.push( config.testUrl + commit + "/test/index.html?module=" + test ); + }); + + testswarm({ + url: config.swarmUrl, + pollInterval: 10000, + timeout: 1000 * 60 * 30, + done: this.async() + }, { + authUsername: config.authUsername, + authToken: config.authToken, + jobName: jobName, + runMax: config.runMax, + "runNames[]": tests, + "runUrls[]": testUrls, + "browserSets[]": config.browserSets + }); + }); + + // Build src/selector.js + grunt.registerTask( "selector", "Build src/selector.js", function() { + + var cfg = grunt.config("selector"), + name = cfg.destFile, + sizzle = { + api: grunt.file.read( cfg.apiFile ), + src: grunt.file.read( cfg.srcFile ) + }, + compiled, parts; + + /** + + sizzle-jquery.js -> sizzle between "EXPOSE" blocks, + replace define & window.Sizzle assignment + + + // EXPOSE + if ( typeof define === "function" && define.amd ) { + define(function() { return Sizzle; }); + } else { + window.Sizzle = Sizzle; + } + // EXPOSE + + Becomes... + + Sizzle.attr = jQuery.attr; + jQuery.find = Sizzle; + jQuery.expr = Sizzle.selectors; + jQuery.expr[":"] = jQuery.expr.pseudos; + jQuery.unique = Sizzle.uniqueSort; + jQuery.text = Sizzle.getText; + jQuery.isXMLDoc = Sizzle.isXML; + jQuery.contains = Sizzle.contains; + + */ + + // Break into 3 pieces + parts = sizzle.src.split("// EXPOSE"); + // Replace the if/else block with api + parts[1] = sizzle.api; + // Rejoin the pieces + compiled = parts.join(""); + + grunt.verbose.write("Injected sizzle-jquery.js into sizzle.js"); + + // Write concatenated source to file, and ensure newline-only termination + grunt.file.write( name, compiled.replace( /\x0d\x0a/g, "\x0a" ) ); + + // Fail task if errors were logged. + if ( this.errorCount ) { + return false; + } + + // Otherwise, print a success message. + grunt.log.writeln( "File '" + name + "' created." ); + }); + + + // Special "alias" task to make custom build creation less grawlix-y + grunt.registerTask( "custom", function() { + var done = this.async(), + args = [].slice.call(arguments), + modules = args.length ? args[0].replace(/,/g, ":") : ""; + + + // Translation example + // + // grunt custom:+ajax,-dimensions,-effects,-offset + // + // Becomes: + // + // grunt build:*:*:+ajax:-dimensions:-effects:-offset + + grunt.log.writeln( "Creating custom build...\n" ); + + grunt.util.spawn({ + cmd: process.platform === "win32" ? "grunt.cmd" : "grunt", + args: [ "build:*:*:" + modules, "uglify", "dist" ] + }, function( err, result ) { + if ( err ) { + grunt.verbose.error(); + done( err ); + return; + } + + grunt.log.writeln( result.stdout.replace("Done, without errors.", "") ); + + done(); + }); + }); + + // Special concat/build task to handle various jQuery build requirements + // + grunt.registerMultiTask( + "build", + "Concatenate source (include/exclude modules with +/- flags), embed date/version", + function() { + + // Concat specified files. + var compiled = "", + modules = this.flags, + optIn = !modules["*"], + explicit = optIn || Object.keys(modules).length > 1, + name = this.data.dest, + src = this.data.src, + deps = {}, + excluded = {}, + version = grunt.config( "pkg.version" ), + excluder = function( flag, needsFlag ) { + // optIn defaults implicit behavior to weak exclusion + if ( optIn && !modules[ flag ] && !modules[ "+" + flag ] ) { + excluded[ flag ] = false; + } + + // explicit or inherited strong exclusion + if ( excluded[ needsFlag ] || modules[ "-" + flag ] ) { + excluded[ flag ] = true; + + // explicit inclusion overrides weak exclusion + } else if ( excluded[ needsFlag ] === false && + ( modules[ flag ] || modules[ "+" + flag ] ) ) { + + delete excluded[ needsFlag ]; + + // ...all the way down + if ( deps[ needsFlag ] ) { + deps[ needsFlag ].forEach(function( subDep ) { + modules[ needsFlag ] = true; + excluder( needsFlag, subDep ); + }); + } + } + }; + + // append commit id to version + if ( process.env.COMMIT ) { + version += " " + process.env.COMMIT; + } + + // figure out which files to exclude based on these rules in this order: + // dependency explicit exclude + // > explicit exclude + // > explicit include + // > dependency implicit exclude + // > implicit exclude + // examples: + // * none (implicit exclude) + // *:* all (implicit include) + // *:*:-css all except css and dependents (explicit > implicit) + // *:*:-css:+effects same (excludes effects because explicit include is trumped by explicit exclude of dependency) + // *:+effects none except effects and its dependencies (explicit include trumps implicit exclude of dependency) + src.forEach(function( filepath ) { + var flag = filepath.flag; + + if ( flag ) { + + excluder(flag); + + // check for dependencies + if ( filepath.needs ) { + deps[ flag ] = filepath.needs; + filepath.needs.forEach(function( needsFlag ) { + excluder( flag, needsFlag ); + }); + } + } + }); + + // append excluded modules to version + if ( Object.keys( excluded ).length ) { + version += " -" + Object.keys( excluded ).join( ",-" ); + // set pkg.version to version with excludes, so minified file picks it up + grunt.config.set( "pkg.version", version ); + } + + + // conditionally concatenate source + src.forEach(function( filepath ) { + var flag = filepath.flag, + specified = false, + omit = false, + message = ""; + + if ( flag ) { + if ( excluded[ flag ] !== undefined ) { + message = ( "Excluding " + flag ).red; + specified = true; + omit = true; + } else { + message = ( "Including " + flag ).green; + + // If this module was actually specified by the + // builder, then st the flag to include it in the + // output list + if ( modules[ "+" + flag ] ) { + specified = true; + } + } + + // Only display the inclusion/exclusion list when handling + // an explicit list. + // + // Additionally, only display modules that have been specified + // by the user + if ( explicit && specified ) { + grunt.log.writetableln([ 27, 30 ], [ + message, + ( "(" + filepath.src + ")").grey + ]); + } + + filepath = filepath.src; + } + + if ( !omit ) { + compiled += grunt.file.read( filepath ); + } + }); + + // Embed Version + // Embed Date + compiled = compiled.replace( /@VERSION/g, version ) + .replace( "@DATE", function () { + var date = new Date(); + + // YYYY-MM-DD + return [ + date.getFullYear(), + date.getMonth() + 1, + date.getDate() + ].join( "-" ); + }); + + // Write concatenated source to file + grunt.file.write( name, compiled ); + + // Fail task if errors were logged. + if ( this.errorCount ) { + return false; + } + + // Otherwise, print a success message. + grunt.log.writeln( "File '" + name + "' created." ); + }); + + // Process files for distribution + grunt.registerTask( "dist", function() { + var flags, paths, stored; + + // Check for stored destination paths + // ( set in dist/.destination.json ) + stored = Object.keys( grunt.config("dst") ); + + // Allow command line input as well + flags = Object.keys( this.flags ); + + // Combine all output target paths + paths = [].concat( stored, flags ).filter(function( path ) { + return path !== "*"; + }); + + // Ensure the dist files are pure ASCII + var fs = require("fs"), + nonascii = false; + + distpaths.forEach(function( filename ) { + var i, c, map, + text = fs.readFileSync( filename, "utf8" ); + + // Ensure files use only \n for line endings, not \r\n + if ( /\x0d\x0a/.test( text ) ) { + grunt.log.writeln( filename + ": Incorrect line endings (\\r\\n)" ); + nonascii = true; + } + + // Ensure only ASCII chars so script tags don't need a charset attribute + if ( text.length !== Buffer.byteLength( text, "utf8" ) ) { + grunt.log.writeln( filename + ": Non-ASCII characters detected:" ); + for ( i = 0; i < text.length; i++ ) { + c = text.charCodeAt( i ); + if ( c > 127 ) { + grunt.log.writeln( "- position " + i + ": " + c ); + grunt.log.writeln( "-- " + text.substring( i - 20, i + 20 ) ); + break; + } + } + nonascii = true; + } + + // Modify map/min so that it points to files in the same folder; + // see https://github.com/mishoo/UglifyJS2/issues/47 + if ( /\.map$/.test( filename ) ) { + text = text.replace( /"dist\//g, "\"" ); + fs.writeFileSync( filename, text, "utf-8" ); + } else if ( /\.min\.js$/.test( filename ) ) { + // Wrap sourceMap directive in multiline comments (#13274) + text = text.replace( /\n?(\/\/@\s*sourceMappingURL=)(.*)/, + function( _, directive, path ) { + map = "\n" + directive + path.replace( /^dist\//, "" ); + return ""; + }); + if ( map ) { + text = text.replace( /(^\/\*[\w\W]*?)\s*\*\/|$/, + function( _, comment ) { + return ( comment || "\n/*" ) + map + "\n*/"; + }); + } + fs.writeFileSync( filename, text, "utf-8" ); + } + + // Optionally copy dist files to other locations + paths.forEach(function( path ) { + var created; + + if ( !/\/$/.test( path ) ) { + path += "/"; + } + + created = path + filename.replace( "dist/", "" ); + grunt.file.write( created, text ); + grunt.log.writeln( "File '" + created + "' created." ); + }); + }); + + return !nonascii; + }); + + // Load grunt tasks from NPM packages + grunt.loadNpmTasks("grunt-compare-size"); + grunt.loadNpmTasks("grunt-git-authors"); + grunt.loadNpmTasks("grunt-update-submodules"); + grunt.loadNpmTasks("grunt-contrib-watch"); + grunt.loadNpmTasks("grunt-contrib-jshint"); + grunt.loadNpmTasks("grunt-contrib-uglify"); + + // Default grunt + grunt.registerTask( "default", [ "update_submodules", "selector", "build:*:*", "jshint", "uglify", "dist:*" ] ); + + // Short list as a high frequency watch task + grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] ); +}; diff --git a/public/vendor/jquery/README.md b/public/vendor/jquery/README.md new file mode 100644 index 000000000000..97b6c220fa0f --- /dev/null +++ b/public/vendor/jquery/README.md @@ -0,0 +1,415 @@ +[jQuery](http://jquery.com/) - New Wave JavaScript +================================================== + +Contribution Guides +-------------------------------------- + +In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly: + +1. [Getting Involved](http://docs.jquery.com/Getting_Involved) +2. [Core Style Guide](http://docs.jquery.com/JQuery_Core_Style_Guidelines) +3. [Tips For Bug Patching](http://docs.jquery.com/Tips_for_jQuery_Bug_Patching) + + +What you need to build your own jQuery +-------------------------------------- + +In order to build jQuery, you need to have Node.js/npm latest and git 1.7 or later. +(Earlier versions might work OK, but are not tested.) + +Windows users have two options: + +1. Install [msysgit](https://code.google.com/p/msysgit/) (Full installer for official Git) and a + [binary version of Node.js](http://nodejs.org). Make sure all two packages are installed to the same + location (by default, this is C:\Program Files\Git). +2. Install [Cygwin](http://cygwin.com/) (make sure you install the git and which packages), and + a [binary version of Node.js](http://nodejs.org/). + +Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from +[Apple's Xcode site](http://developer.apple.com/technologies/xcode.html)) and +[Homebrew](http://mxcl.github.com/homebrew/). Once Homebrew is installed, run `brew install git` to install git, +and `brew install node` to install Node.js. + +Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source +if you swing that way. Easy-peasy. + + +How to build your own jQuery +---------------------------- + +First, clone a copy of the main jQuery git repo by running: + +```bash +git clone git://github.com/jquery/jquery.git +``` + +Enter the directory and install the Node dependencies: + +```bash +cd jquery && npm install +``` + + +Make sure you have `grunt` installed by testing: + +```bash +grunt -version +``` + + + +Then, to get a complete, minified (w/ Uglify.js), linted (w/ JSHint) version of jQuery, type the following: + +```bash +grunt +``` + + +The built version of jQuery will be put in the `dist/` subdirectory. + + +### Modules (new in 1.8) + +Starting in jQuery 1.8, special builds can now be created that optionally exclude or include any of the following modules: + +- ajax +- css +- dimensions +- effects +- offset + + +Before creating a custom build for use in production, be sure to check out the latest stable version: + +```bash +git pull; git checkout $(git describe --abbrev=0 --tags) +``` + +Then, make sure all Node dependencies are installed and all Git submodules are checked out: + +```bash +npm install && grunt +``` + +To create a custom build, use the following special `grunt` commands: + +Exclude **ajax**: + +```bash +grunt custom:-ajax +``` + +Exclude **css**: + +```bash +grunt custom:-css +``` + +Exclude **deprecated**: + +```bash +grunt custom:-deprecated +``` + +Exclude **dimensions**: + +```bash +grunt custom:-dimensions +``` + +Exclude **effects**: + +```bash +grunt custom:-effects +``` + +Exclude **offset**: + +```bash +grunt custom:-offset +``` + +Exclude **all** optional modules: + +```bash +grunt custom:-ajax,-css,-deprecated,-dimensions,-effects,-offset +``` + + +Note: dependencies will be handled internally, by the build process. + + +Running the Unit Tests +-------------------------------------- + + +Start grunt to auto-build jQuery as you work: + +```bash +cd jquery && grunt watch +``` + + +Run the unit tests with a local server that supports PHP. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options: + +- Windows: [WAMP download](http://www.wampserver.com/en/) +- Mac: [MAMP download](http://www.mamp.info/en/index.html) +- Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation) +- [Mongoose (most platforms)](http://code.google.com/p/mongoose/) + + + + +Building to a different directory +--------------------------------- + +If you want to build jQuery to a directory that is different from the default location: + +```bash +grunt && grunt dist:/path/to/special/location/ +``` +With this example, the output files would be: + +```bash +/path/to/special/location/jquery.js +/path/to/special/location/jquery.min.js +``` + +If you want to add a permanent copy destination, create a file in `dist/` called ".destination.json". Inside the file, paste and customize the following: + +```json + +{ + "/Absolute/path/to/other/destination": true +} +``` + + +Additionally, both methods can be combined. + + + +Updating Submodules +------------------- + +Update the submodules to what is probably the latest upstream code. + +```bash +grunt update_submodules +``` + +Note: This task will also be run any time the default `grunt` command is used. + + + +Git for dummies +--------------- + +As the source code is handled by the version control system Git, it's useful to know some features used. + +### Submodules ### + +The repository uses submodules, which normally are handled directly by the `grunt update_submodules` command, but sometimes you want to +be able to work with them manually. + +Following are the steps to manually get the submodules: + +```bash +git clone https://github.com/jquery/jquery.git +cd jquery +git submodule init +git submodule update +``` + +Or: + +```bash +git clone https://github.com/jquery/jquery.git +cd jquery +git submodule update --init +``` + +Or: + +```bash +git clone --recursive https://github.com/jquery/jquery.git +cd jquery +``` + +If you want to work inside a submodule, it is possible, but first you need to checkout a branch: + +```bash +cd src/sizzle +git checkout master +``` + +After you've committed your changes to the submodule, you'll update the jquery project to point to the new commit, +but remember to push the submodule changes before pushing the new jquery commit: + +```bash +cd src/sizzle +git push origin master +cd .. +git add src/sizzle +git commit +``` + + +### cleaning ### + +If you want to purge your working directory back to the status of upstream, following commands can be used (remember everything you've worked on is gone after these): + +```bash +git reset --hard upstream/master +git clean -fdx +``` + +### rebasing ### + +For feature/topic branches, you should always used the `--rebase` flag to `git pull`, or if you are usually handling many temporary "to be in a github pull request" branches, run following to automate this: + +```bash +git config branch.autosetuprebase local +``` +(see `man git-config` for more information) + +### handling merge conflicts ### + +If you're getting merge conflicts when merging, instead of editing the conflicted files manually, you can use the feature +`git mergetool`. Even though the default tool `xxdiff` looks awful/old, it's rather useful. + +Following are some commands that can be used there: + +* `Ctrl + Alt + M` - automerge as much as possible +* `b` - jump to next merge conflict +* `s` - change the order of the conflicted lines +* `u` - undo an merge +* `left mouse button` - mark a block to be the winner +* `middle mouse button` - mark a line to be the winner +* `Ctrl + S` - save +* `Ctrl + Q` - quit + +[QUnit](http://docs.jquery.com/QUnit) Reference +----------------- + +### Test methods ### + +```js +expect( numAssertions ); +stop(); +start(); +``` + + +note: QUnit's eventual addition of an argument to stop/start is ignored in this test suite so that start and stop can be passed as callbacks without worrying about their parameters + +### Test assertions ### + + +```js +ok( value, [message] ); +equal( actual, expected, [message] ); +notEqual( actual, expected, [message] ); +deepEqual( actual, expected, [message] ); +notDeepEqual( actual, expected, [message] ); +strictEqual( actual, expected, [message] ); +notStrictEqual( actual, expected, [message] ); +raises( block, [expected], [message] ); +``` + + +Test Suite Convenience Methods Reference (See [test/data/testinit.js](https://github.com/jquery/jquery/blob/master/test/data/testinit.js)) +------------------------------ + +### Returns an array of elements with the given IDs ### + +```js +q( ... ); +``` + +Example: + +```js +q("main", "foo", "bar"); + +=> [ div#main, span#foo, input#bar ] +``` + +### Asserts that a selection matches the given IDs ### + +```js +t( testName, selector, [ "array", "of", "ids" ] ); +``` + +Example: + +```js +t("Check for something", "//[a]", ["foo", "baar"]); +``` + + + +### Fires a native DOM event without going through jQuery ### + +```js +fireNative( node, eventType ) +``` + +Example: + +```js +fireNative( jQuery("#elem")[0], "click" ); +``` + +### Add random number to url to stop caching ### + +```js +url( "some/url.php" ); +``` + +Example: + +```js +url("data/test.html"); + +=> "data/test.html?10538358428943" + + +url("data/test.php?foo=bar"); + +=> "data/test.php?foo=bar&10538358345554" +``` + + +### Load tests in an iframe ### + +Loads a given page constructing a url with fileName: `"./data/" + fileName + ".html"` +and fires the given callback on jQuery ready (using the jQuery loading from that page) +and passes the iFrame's jQuery to the callback. + +```js +testIframe( fileName, testName, callback ); +``` + +Callback arguments: + +```js +callback( jQueryFromIFrame, iFrameWindow, iFrameDocument ); +``` + +### Load tests in an iframe (window.iframeCallback) ### + +Loads a given page constructing a url with fileName: `"./data/" + fileName + ".html"` +The given callback is fired when window.iframeCallback is called by the page +The arguments passed to the callback are the same as the +arguments passed to window.iframeCallback, whatever that may be + +```js +testIframeWithCallback( testName, fileName, callback ); +``` + +Questions? +---------- + +If you have any questions, please feel free to ask on the +[Developing jQuery Core forum](http://forum.jquery.com/developing-jquery-core) or in #jquery on irc.freenode.net. diff --git a/public/vendor/jquery/build/release-notes.js b/public/vendor/jquery/build/release-notes.js new file mode 100644 index 000000000000..dff2c11c62ed --- /dev/null +++ b/public/vendor/jquery/build/release-notes.js @@ -0,0 +1,59 @@ +#!/usr/bin/env node +/* + * jQuery Release Note Generator + */ + +var fs = require("fs"), + http = require("http"), + extract = /(.*?)<[^"]+"component">\s*(\S+)/g, + categories = [], + version = process.argv[2]; + +if ( !/^\d+\.\d+/.test( version ) ) { + console.error( "Invalid version number: " + version ); + process.exit( 1 ); +} + +http.request({ + host: "bugs.jquery.com", + port: 80, + method: "GET", + path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version +}, function (res) { + var data = []; + + res.on( "data", function( chunk ) { + data.push( chunk ); + }); + + res.on( "end", function() { + var match, + file = data.join(""), + cur; + + while ( (match = extract.exec( file )) ) { + if ( "#" + match[1] !== match[2] ) { + var cat = match[3]; + + if ( !cur || cur !== cat ) { + if ( cur ) { + console.log(""); + } + cur = cat; + console.log( "

" + cat.charAt(0).toUpperCase() + cat.slice(1) + "

" ); + console.log("
"); + } + + }); +}).end(); + diff --git a/public/vendor/jquery/build/release.js b/public/vendor/jquery/build/release.js new file mode 100644 index 000000000000..e8313c038715 --- /dev/null +++ b/public/vendor/jquery/build/release.js @@ -0,0 +1,246 @@ +#!/usr/bin/env node +/* + * jQuery Core Release Management + */ + +// Debugging variables +var debug = false, + skipRemote = false; + +var fs = require("fs"), + child = require("child_process"), + path = require("path"); + +var releaseVersion, + nextVersion, + CDNFiles, + isBeta, + pkg, + branch, + + scpURL = "jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/", + cdnURL = "http://code.origin.jquery.com/", + repoURL = "git@github.com:jquery/jquery.git", + + // Windows needs the .cmd version but will find the non-.cmd + // On Windows, ensure the HOME environment variable is set + gruntCmd = process.platform === "win32" ? "grunt.cmd" : "grunt", + + devFile = "dist/jquery.js", + minFile = "dist/jquery.min.js", + mapFile = "dist/jquery.min.map", + + releaseFiles = { + "jquery-VER.js": devFile, + "jquery-VER.min.js": minFile, + "jquery-VER.min.map": mapFile, + "jquery.js": devFile, + "jquery.min.js": minFile, + "jquery.min.map": mapFile, + "jquery-latest.js": devFile, + "jquery-latest.min.js": minFile, + "jquery-latest.min.map": mapFile + }; + +steps( + initialize, + checkGitStatus, + tagReleaseVersion, + gruntBuild, + makeReleaseCopies, + setNextVersion, + uploadToCDN, + pushToGithub, + exit +); + +function initialize( next ) { + + if ( process.argv[2] === "-d" ) { + process.argv.shift(); + debug = true; + console.warn("=== DEBUG MODE ===" ); + } + + // First arg should be the version number being released + var newver, oldver, + rversion = /^(\d)\.(\d+)\.(\d)((?:a|b|rc)\d|pre)?$/, + version = ( process.argv[3] || "" ).toLowerCase().match( rversion ) || {}, + major = version[1], + minor = version[2], + patch = version[3], + xbeta = version[4]; + + branch = process.argv[2]; + releaseVersion = process.argv[3]; + isBeta = !!xbeta; + + if ( !branch || !major || !minor || !patch ) { + die( "Usage: " + process.argv[1] + " branch releaseVersion" ); + } + if ( xbeta === "pre" ) { + die( "Cannot release a 'pre' version!" ); + } + if ( !(fs.existsSync || path.existsSync)( "package.json" ) ) { + die( "No package.json in this directory" ); + } + pkg = JSON.parse( fs.readFileSync( "package.json" ) ); + + console.log( "Current version is " + pkg.version + "; generating release " + releaseVersion ); + version = pkg.version.match( rversion ); + oldver = ( +version[1] ) * 10000 + ( +version[2] * 100 ) + ( +version[3] ) + newver = ( +major ) * 10000 + ( +minor * 100 ) + ( +patch ); + if ( newver < oldver ) { + die( "Next version is older than current version!" ); + } + + nextVersion = major + "." + minor + "." + ( isBeta ? patch : +patch + 1 ) + "pre"; + next(); +} + +function checkGitStatus( next ) { + git( [ "status" ], function( error, stdout, stderr ) { + var onBranch = ((stdout||"").match( /On branch (\S+)/ ) || [])[1]; + if ( onBranch !== branch ) { + die( "Branches don't match: Wanted " + branch + ", got " + onBranch ); + } + if ( /Changes to be committed/i.test( stdout ) ) { + die( "Please commit changed files before attemping to push a release." ); + } + if ( /Changes not staged for commit/i.test( stdout ) ) { + die( "Please stash files before attempting to push a release." ); + } + next(); + }); +} + +function tagReleaseVersion( next ) { + updatePackageVersion( releaseVersion ); + git( [ "commit", "-a", "-m", "Tagging the " + releaseVersion + " release." ], function(){ + git( [ "tag", releaseVersion ], next, debug); + }, debug); +} + +function gruntBuild( next ) { + exec( gruntCmd, [], function( error, stdout ) { + if ( error ) { + die( error + stderr ); + } + console.log( stdout ); + next(); + }, debug); +} + +function makeReleaseCopies( next ) { + CDNFiles = {}; + Object.keys( releaseFiles ).forEach(function( key ) { + var text, + builtFile = releaseFiles[ key ], + releaseFile = key.replace( /VER/g, releaseVersion ); + + // Beta releases don't update the jquery-latest etc. copies + if ( !isBeta || key !== releaseFile ) { + + if ( /\.map$/.test( releaseFile ) ) { + // Map files need to reference the new uncompressed name; + // assume that all files reside in the same directory. + // "file":"jquery.min.js","sources":["jquery.js"] + text = fs.readFileSync( builtFile, "utf8" ) + .replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/, + "\"file\":\"" + releaseFile.replace( /\.min\.map/, ".min.js" ) + + "\",\"sources\":[\"" + releaseFile.replace( /\.min\.map/, ".js" ) + "\"]" ); + console.log( "Modifying map " + builtFile + " to " + releaseFile ); + if ( !debug ) { + fs.writeFileSync( releaseFile, text ); + } + } else { + copy( builtFile, releaseFile ); + } + + CDNFiles[ releaseFile ] = builtFile; + } + }); + next(); +} + +function setNextVersion( next ) { + updatePackageVersion( nextVersion ); + git( [ "commit", "-a", "-m", "Updating the source version to " + nextVersion ], next, debug ); +} + +function uploadToCDN( next ) { + var cmds = []; + + Object.keys( CDNFiles ).forEach(function( name ) { + cmds.push(function( nxt ){ + exec( "scp", [ name, scpURL ], nxt, debug || skipRemote ); + }); + cmds.push(function( nxt ){ + exec( "curl", [ cdnURL + name + "?reload" ], nxt, debug || skipRemote ); + }); + }); + cmds.push( next ); + + steps.apply( this, cmds ); +} + +function pushToGithub( next ) { + git( [ "push", "--tags", repoURL, branch ], next, debug || skipRemote ); +} + +//============================== + +function steps() { + var cur = 0, + steps = arguments; + (function next(){ + process.nextTick(function(){ + steps[ cur++ ]( next ); + }); + })(); +} + +function updatePackageVersion( ver ) { + console.log( "Updating package.json version to " + ver ); + pkg.version = ver; + if ( !debug ) { + fs.writeFileSync( "package.json", JSON.stringify( pkg, null, "\t" ) + "\n" ); + } +} + +function copy( oldFile, newFile ) { + console.log( "Copying " + oldFile + " to " + newFile ); + if ( !debug ) { + fs.writeFileSync( newFile, fs.readFileSync( oldFile, "utf8" ) ); + } +} + +function git( args, fn, skip ) { + exec( "git", args, fn, skip ); +} + +function exec( cmd, args, fn, skip ) { + if ( skip ) { + console.log( "# " + cmd + " " + args.join(" ") ); + fn( "", "", "" ); + } else { + console.log( cmd + " " + args.join(" ") ); + child.execFile( cmd, args, { env: process.env }, + function( err, stdout, stderr ) { + if ( err ) { + die( stderr || stdout || err ); + } + fn.apply( this, arguments ); + } + ); + } +} + +function die( msg ) { + console.error( "ERROR: " + msg ); + process.exit( 1 ); +} + +function exit() { + process.exit( 0 ); +} diff --git a/public/vendor/jquery/component.json b/public/vendor/jquery/component.json new file mode 100755 index 000000000000..291a8f1254d3 --- /dev/null +++ b/public/vendor/jquery/component.json @@ -0,0 +1,13 @@ +{ + "name": "jquery", + "version": "1.9.1", + "description": "jQuery component", + "keywords": [ + "jquery", + "component" + ], + "scripts": [ + "jquery.js" + ], + "license": "MIT" +} diff --git a/public/vendor/jquery/composer.json b/public/vendor/jquery/composer.json new file mode 100755 index 000000000000..c617840623c0 --- /dev/null +++ b/public/vendor/jquery/composer.json @@ -0,0 +1,35 @@ +{ + "name": "components/jquery", + "description": "jQuery JavaScript Library", + "type": "component", + "homepage": "http://jquery.com", + "license": "MIT", + "support": { + "irc": "irc://irc.freenode.org/jquery", + "issues": "http://bugs.jquery.com", + "forum": "http://forum.jquery.com", + "wiki": "http://docs.jquery.com/", + "source": "https://github.com/jquery/jquery" + }, + "authors": [ + { + "name": "John Resig", + "email": "jeresig@gmail.com" + } + ], + "require": { + "robloach/component-installer": "*" + }, + "extra": { + "component": { + "scripts": [ + "jquery.js" + ], + "files": [ + "jquery.min.js", + "jquery-migrate.js", + "jquery-migrate.min.js" + ] + } + } +} diff --git a/public/vendor/jquery/jquery-migrate.js b/public/vendor/jquery/jquery-migrate.js new file mode 100755 index 000000000000..8801b92a4b04 --- /dev/null +++ b/public/vendor/jquery/jquery-migrate.js @@ -0,0 +1,496 @@ +/*! + * jQuery Migrate - v1.1.0 - 2013-01-31 + * https://github.com/jquery/jquery-migrate + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT + */ +(function( jQuery, window, undefined ) { +"use strict"; + + +var warnedAbout = {}; + +// List of warnings already given; public read only +jQuery.migrateWarnings = []; + +// Set to true to prevent console output; migrateWarnings still maintained +// jQuery.migrateMute = false; + +// Show a message on the console so devs know we're active +if ( !jQuery.migrateMute && window.console && console.log ) { + console.log("JQMIGRATE: Logging is active"); +} + +// Set to false to disable traces that appear with warnings +if ( jQuery.migrateTrace === undefined ) { + jQuery.migrateTrace = true; +} + +// Forget any warnings we've already given; public +jQuery.migrateReset = function() { + warnedAbout = {}; + jQuery.migrateWarnings.length = 0; +}; + +function migrateWarn( msg) { + if ( !warnedAbout[ msg ] ) { + warnedAbout[ msg ] = true; + jQuery.migrateWarnings.push( msg ); + if ( window.console && console.warn && !jQuery.migrateMute ) { + console.warn( "JQMIGRATE: " + msg ); + if ( jQuery.migrateTrace && console.trace ) { + console.trace(); + } + } + } +} + +function migrateWarnProp( obj, prop, value, msg ) { + if ( Object.defineProperty ) { + // On ES5 browsers (non-oldIE), warn if the code tries to get prop; + // allow property to be overwritten in case some other plugin wants it + try { + Object.defineProperty( obj, prop, { + configurable: true, + enumerable: true, + get: function() { + migrateWarn( msg ); + return value; + }, + set: function( newValue ) { + migrateWarn( msg ); + value = newValue; + } + }); + return; + } catch( err ) { + // IE8 is a dope about Object.defineProperty, can't warn there + } + } + + // Non-ES5 (or broken) browser; just set the property + jQuery._definePropertyBroken = true; + obj[ prop ] = value; +} + +if ( document.compatMode === "BackCompat" ) { + // jQuery has never supported or tested Quirks Mode + migrateWarn( "jQuery is not compatible with Quirks Mode" ); +} + + +var attrFn = {}, + oldAttr = jQuery.attr, + valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || + function() { return null; }, + valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || + function() { return undefined; }, + rnoType = /^(?:input|button)$/i, + rnoAttrNodeType = /^[238]$/, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + ruseDefault = /^(?:checked|selected)$/i; + +// jQuery.attrFn +migrateWarnProp( jQuery, "attrFn", attrFn, "jQuery.attrFn is deprecated" ); + +jQuery.attr = function( elem, name, value, pass ) { + var lowerName = name.toLowerCase(), + nType = elem && elem.nodeType; + + // Since pass is used internally, we only warn and shim for new jQuery + // versions where there isn't a pass arg in the formal params + if ( pass && oldAttr.length < 4 ) { + migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); + if ( elem && !rnoAttrNodeType.test( nType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) { + return jQuery( elem )[ name ]( value ); + } + } + + // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking + // for disconnected elements we don't warn on $( " + + + + + + + + + +
+
+ +
+
hi there
+
+
+
+
+
+
+
+
+ +
+
    +
  1. Rice
  2. +
  3. Beans
  4. +
  5. Blinis
  6. +
  7. Tofu
  8. +
+ +
I'm hungry. I should...
+ ...Eat lots of food... | + ...Eat a little food... | + ...Eat no food... + ...Eat a burger... + ...Eat some funyuns... + ...Eat some funyuns... +
+ +
+ + +
+ +
+ 1 + 2 + + + + + + + + +
+
+
+
fadeIn
fadeIn
+
fadeOut
fadeOut
+ +
show
show
+
hide
hide
+
hide
hide
+ +
togglein
togglein
+
toggleout
toggleout
+
toggleout
toggleout
+ +
slideUp
slideUp
+
slideDown
slideDown
+
slideUp
slideUp
+ +
slideToggleIn
slideToggleIn
+
slideToggleOut
slideToggleOut
+ +
fadeToggleIn
fadeToggleIn
+
fadeToggleOut
fadeToggleOut
+ +
fadeTo
fadeTo
+
+ +
+ +
+
+ + + + + + + diff --git a/public/vendor/jquery/test/localfile.html b/public/vendor/jquery/test/localfile.html new file mode 100644 index 000000000000..8d3fb34a8051 --- /dev/null +++ b/public/vendor/jquery/test/localfile.html @@ -0,0 +1,75 @@ + + + + + jQuery Local File Test + + + + + +

jQuery Local File Test

+

+ Introduction +

+
    +
  • + Access this file using the "file:" protocol, +
  • +
  • + two green "OK" strings must appear below, +
  • +
  • + Empty local files will issue errors, it's a known limitation. +
  • +
+

+ Results +

+
    +
  • + Success: + + +
  • +
  • + Error: + + +
  • +
+

+ Logs: +

+
    +
+ + diff --git a/public/vendor/jquery/test/networkerror.html b/public/vendor/jquery/test/networkerror.html new file mode 100644 index 000000000000..587786610419 --- /dev/null +++ b/public/vendor/jquery/test/networkerror.html @@ -0,0 +1,84 @@ + + + + + + jQuery Network Error Test for Firefox + + + + + + +

+ jQuery Network Error Test for Firefox +

+
+ This is a test page for + + #8135 + + which was reported in Firefox when accessing properties + of an XMLHttpRequest object after a network error occured. +
+
Take the following steps:
+
    +
  1. + make sure you accessed this page through a web server, +
  2. +
  3. + stop the web server, +
  4. +
  5. + open the console, +
  6. +
  7. + click this + + , +
  8. +
  9. + wait for both requests to fail. +
  10. +
+
+ Test passes if you get two log lines: +
    +
  • + the first starting with "abort", +
  • +
  • + the second starting with "complete", +
  • +
+
+
+ Test fails if the browser notifies an exception. +
+ + diff --git a/public/vendor/jquery/test/polluted.php b/public/vendor/jquery/test/polluted.php new file mode 100644 index 000000000000..31a77c36196b --- /dev/null +++ b/public/vendor/jquery/test/polluted.php @@ -0,0 +1,110 @@ + array( + "versions" => array( "1.1.1", "1.2.0", "1.2.3", "1.3.0", "1.3.1", "1.3.2", "1.4.0", "1.4.1", "1.4.3", "1.5.0" ), + "url" => "dojo/XYZ/dojo/dojo.xd.js" + ), + "ExtCore" => array( + "versions" => array( "3.0.0", "3.1.0" ), + "url" => "ext-core/XYZ/ext-core.js" + ), + "jQuery" => array( + "versions" => array( "1.2.3", "1.2.6", "1.3.0", "1.3.1", "1.3.2", "1.4.0", "1.4.1", "1.4.2", "1.4.3", "1.4.4", "1.5.0" ), + "url" => "jquery/XYZ/jquery.min.js" + ), + "jQueryUI" => array( + "versions" => array( "1.5.2", "1.5.3", "1.6.0", "1.7.0", "1.7.1", "1.7.2", "1.7.3", "1.8.0", "1.8.1", "1.8.2", "1.8.4", "1.8.5", "1.8.6", "1.8.7", "1.8.8", "1.8.9" ), + "url" => "jqueryui/XYZ/jquery-ui.min.js" + ), + "MooTools" => array( + "versions" => array( "1.1.1", "1.1.2", "1.2.1", "1.2.2", "1.2.3", "1.2.4", "1.2.5", "1.3.0" ), + "url" => "mootools/XYZ/mootools-yui-compressed.js" + ), + "Prototype" => array( + "versions" => array( "1.6.0.2", "1.6.0.3", "1.6.1.0", "1.7.0.0" ), + "url" => "prototype/XYZ/prototype.js" + ), + "scriptaculous" => array( + "versions" => array( "1.8.1", "1.8.2", "1.8.3" ), + "url" => "scriptaculous/XYZ/scriptaculous.js" + ), + "SWFObject" => array( + "versions" => array( "2.1", "2.2" ), + "url" => "swfobject/XYZ/swfobject.js" + ), + "YUI" => array( + "versions" => array( "2.6.0", "2.7.0", "2.8.0r4", "2.8.1", "2.8.2", "3.3.0" ), + "url" => "yui/XYZ/build/yui/yui-min.js" + ) + ); + + if( count($_POST) ) { + $includes = array(); + foreach( $_POST as $name => $ver ){ + if ( empty( $libraries[ $name ] )) { + echo "unsupported library ". $name; + exit; + } + + $url = $libraries[ $name ][ "url" ]; + if( $name == "YUI" && $ver[0] == "2" ) { + $url = str_replace( "/yui", "/yuiloader", $url); + } + + if ( empty( $libraries[ $name ][ "versions" ][ $ver ] )) { + echo "library ". $name ." not supported in version ". $ver; + exit; + } + + $include = "\n"; + if( $lib == "prototype" ) { // prototype must be included first + array_unshift( $includes, $include ); + } else { + array_push( $includes, $include ); + } + } + + $includes = implode( "\n", $includes ); + $suite = file_get_contents( "index.html" ); + echo str_replace( "", $includes, $suite ); + exit; + } +?> + + + + + Run jQuery Test Suite Polluted + + + + +

jQuery Test Suite

+ +

Choose other libraries to include

+ +
+ $data ) { + echo "
$name"; + $i = 0; + foreach( $data[ "versions" ] as $ver ) { + $i++; + echo ""; + if( !($i % 4) ) echo "
"; + } + echo "
"; + } + ?> + +
+ + diff --git a/public/vendor/jquery/test/readywait.html b/public/vendor/jquery/test/readywait.html new file mode 100644 index 000000000000..4738b1b9529a --- /dev/null +++ b/public/vendor/jquery/test/readywait.html @@ -0,0 +1,70 @@ + + + + + + jQuery.holdReady Test + + + + + + + + + + +

+ jQuery.holdReady Test +

+

+ This is a test page for jQuery.readyWait and jQuery.holdReady, + see + #6781 + and + #8803. +

+

+ Test for jQuery.holdReady, which can be used + by plugins and other scripts to indicate something + important to the page is still loading and needs + to block the DOM ready callbacks that are registered + with jQuery. +

+

+ Script loaders are the most likely kind of script + to use jQuery.holdReady, but it could be used by + other things like a script that loads a CSS file + and wants to pause the DOM ready callbacks. +

+

+ Expected Result: The text + It Worked! + appears below after about 2 seconds. +

+

+ If there is an error in the console, + or the text does not show up, then the test failed. +

+
+ + diff --git a/public/vendor/jquery/test/unit/ajax.js b/public/vendor/jquery/test/unit/ajax.js new file mode 100644 index 000000000000..b3734e38b25e --- /dev/null +++ b/public/vendor/jquery/test/unit/ajax.js @@ -0,0 +1,1971 @@ +module( "ajax", { + setup: function() { + var jsonpCallback = this.jsonpCallback = jQuery.ajaxSettings.jsonpCallback; + jQuery.ajaxSettings.jsonpCallback = function() { + var callback = jsonpCallback.apply( this, arguments ); + Globals.register( callback ); + return callback; + }; + }, + teardown: function() { + jQuery( document ).off( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxError ajaxSuccess" ); + moduleTeardown.apply( this, arguments ); + } +}); + +(function() { + + if ( !jQuery.ajax || ( isLocal && !hasPHP ) ) { + return; + } + + function addGlobalEvents( expected ) { + return function() { + expected = expected || ""; + jQuery( document ).on( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxError ajaxSuccess", function( e ) { + ok( expected.indexOf(e.type) !== -1, e.type ); + }); + }; + } + +//----------- jQuery.ajax() + + ajaxTest( "jQuery.ajax() - success callbacks", 8, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"), + url: url("data/name.html"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + success: function() { + ok( true, "success" ); + }, + complete: function() { + ok( true, "complete"); + } + }); + + ajaxTest( "jQuery.ajax() - success callbacks - (url, options) syntax", 8, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"), + create: function( options ) { + return jQuery.ajax( url("data/name.html"), options ); + }, + beforeSend: function() { + ok( true, "beforeSend" ); + }, + success: function() { + ok( true, "success" ); + }, + complete: function() { + ok( true, "complete" ); + } + }); + + ajaxTest( "jQuery.ajax() - success callbacks (late binding)", 8, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"), + url: url("data/name.html"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + success: true, + afterSend: function( request ) { + request.complete(function() { + ok( true, "complete" ); + }).success(function() { + ok( true, "success" ); + }).error(function() { + ok( false, "error" ); + }); + } + }); + + ajaxTest( "jQuery.ajax() - success callbacks (oncomplete binding)", 8, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"), + url: url("data/name.html"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + success: true, + complete: function( xhr ) { + xhr.complete(function() { + ok( true, "complete" ); + }).success(function() { + ok( true, "success" ); + }).error(function() { + ok( false, "error" ); + }); + } + }); + + ajaxTest( "jQuery.ajax() - error callbacks", 8, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxError"), + url: url("data/name.php?wait=5"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + afterSend: function( request ) { + request.abort(); + }, + error: function() { + ok( true, "error" ); + }, + complete: function() { + ok( true, "complete" ); + } + }); + + ajaxTest( "jQuery.ajax() - textStatus and errorThrown values", 4, [ + { + url: url("data/name.php?wait=5"), + error: function( _, textStatus, errorThrown ) { + strictEqual( textStatus, "abort", "textStatus is 'abort' for abort" ); + strictEqual( errorThrown, "abort", "errorThrown is 'abort' for abort" ); + }, + afterSend: function( request ) { + request.abort(); + } + }, + { + url: url("data/name.php?wait=5"), + error: function( _, textStatus, errorThrown ) { + strictEqual( textStatus, "mystatus", "textStatus is 'mystatus' for abort('mystatus')" ); + strictEqual( errorThrown, "mystatus", "errorThrown is 'mystatus' for abort('mystatus')" ); + }, + afterSend: function( request ) { + request.abort("mystatus"); + } + } + ]); + + ajaxTest( "jQuery.ajax() - responseText on error", 1, { + url: url("data/errorWithText.php"), + error: function( xhr ) { + strictEqual( xhr.responseText, "plain text message", "Test jqXHR.responseText is filled for HTTP errors" ); + } + }); + + asyncTest( "jQuery.ajax() - retry with jQuery.ajax( this )", 2, function() { + var previousUrl, + firstTime = true; + jQuery.ajax({ + url: url("data/errorWithText.php"), + error: function() { + if ( firstTime ) { + firstTime = false; + jQuery.ajax( this ); + } else { + ok ( true, "Test retrying with jQuery.ajax(this) works" ); + jQuery.ajax({ + url: url("data/errorWithText.php"), + data: { + "x": 1 + }, + beforeSend: function() { + if ( !previousUrl ) { + previousUrl = this.url; + } else { + strictEqual( this.url, previousUrl, "url parameters are not re-appended" ); + start(); + return false; + } + }, + error: function() { + jQuery.ajax( this ); + } + }); + } + } + }); + }); + + ajaxTest( "jQuery.ajax() - headers", 4, { + setup: function() { + jQuery( document ).ajaxSend(function( evt, xhr ) { + xhr.setRequestHeader( "ajax-send", "test" ); + }); + }, + url: url("data/headers.php?keys=siMPle_SometHing-elsE_OthEr_ajax-send"), + headers: { + "siMPle": "value", + "SometHing-elsE": "other value", + "OthEr": "something else" + }, + success: function( data, _, xhr ) { + var i, emptyHeader, + requestHeaders = jQuery.extend( this.headers, { + "ajax-send": "test" + }), + tmp = []; + for ( i in requestHeaders ) { + tmp.push( i, ": ", requestHeaders[ i ], "\n" ); + } + tmp = tmp.join(""); + + strictEqual( data, tmp, "Headers were sent" ); + strictEqual( xhr.getResponseHeader("Sample-Header"), "Hello World", "Sample header received" ); + + emptyHeader = xhr.getResponseHeader("Empty-Header"); + if ( emptyHeader === null ) { + ok( true, "Firefox doesn't support empty headers" ); + } else { + strictEqual( emptyHeader, "", "Empty header received" ); + } + strictEqual( xhr.getResponseHeader("Sample-Header2"), "Hello World 2", "Second sample header received" ); + } + }); + + ajaxTest( "jQuery.ajax() - Accept header", 1, { + url: url("data/headers.php?keys=accept"), + headers: { + Accept: "very wrong accept value" + }, + beforeSend: function( xhr ) { + xhr.setRequestHeader("Accept", "*/*"); + }, + success: function( data ) { + strictEqual( data, "accept: */*\n", "Test Accept header is set to last value provided" ); + } + }); + + ajaxTest( "jQuery.ajax() - contentType", 2, [ + { + url: url("data/headers.php?keys=content-type"), + contentType: "test", + success: function( data ) { + strictEqual( data, "content-type: test\n", "Test content-type is sent when options.contentType is set" ); + } + }, + { + url: url("data/headers.php?keys=content-type"), + contentType: false, + success: function( data ) { + strictEqual( data, "content-type: \n", "Test content-type is not sent when options.contentType===false" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - protocol-less urls", 1, { + url: "//somedomain.com", + beforeSend: function( xhr, settings ) { + equal( settings.url, location.protocol + "//somedomain.com", "Make sure that the protocol is added." ); + return false; + }, + error: true + }); + + ajaxTest( "jQuery.ajax() - hash", 3, [ + { + url: "data/name.html#foo", + beforeSend: function( xhr, settings ) { + equal( settings.url, "data/name.html", "Make sure that the URL is trimmed." ); + return false; + }, + error: true + }, + { + url: "data/name.html?abc#foo", + beforeSend: function( xhr, settings ) { + equal( settings.url, "data/name.html?abc", "Make sure that the URL is trimmed." ); + return false; + }, + error: true + }, + { + url: "data/name.html?abc#foo", + data: { + "test": 123 + }, + beforeSend: function( xhr, settings ) { + equal( settings.url, "data/name.html?abc&test=123", "Make sure that the URL is trimmed." ); + return false; + }, + error: true + } + ]); + + ajaxTest( "jQuery.ajax() - cross-domain detection", 7, function() { + function request( url, title, crossDomainOrOptions ) { + return jQuery.extend( { + dataType: "jsonp", + url: url, + beforeSend: function( _, s ) { + ok( crossDomainOrOptions === false ? !s.crossDomain : s.crossDomain, title ); + return false; + }, + error: true + }, crossDomainOrOptions ); + } + + var loc = document.location, + samePort = loc.port || ( loc.protocol === "http:" ? 80 : 443 ), + otherPort = loc.port === 666 ? 667 : 666, + otherProtocol = loc.protocol === "http:" ? "https:" : "http:"; + + return [ + request( + loc.protocol + "//" + loc.host + ":" + samePort, + "Test matching ports are not detected as cross-domain", + false + ), + request( + otherProtocol + "//" + loc.host, + "Test different protocols are detected as cross-domain" + ), + request( + "app:/path", + "Adobe AIR app:/ URL detected as cross-domain" + ), + request( + loc.protocol + "//example.invalid:" + ( loc.port || 80 ), + "Test different hostnames are detected as cross-domain" + ), + request( + loc.protocol + "//" + loc.hostname + ":" + otherPort, + "Test different ports are detected as cross-domain" + ), + request( + "about:blank", + "Test about:blank is detected as cross-domain" + ), + request( + loc.protocol + "//" + loc.host, + "Test forced crossDomain is detected as cross-domain", + { + crossDomain: true + } + ) + ]; + }); + + ajaxTest( "jQuery.ajax() - abort", 9, { + setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxError ajaxComplete"), + url: url("data/name.php?wait=5"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + afterSend: function( xhr ) { + strictEqual( xhr.readyState, 1, "XHR readyState indicates successful dispatch" ); + xhr.abort(); + strictEqual( xhr.readyState, 0, "XHR readyState indicates successful abortion" ); + }, + error: true, + complete: function() { + ok( true, "complete" ); + } + }); + + ajaxTest( "jQuery.ajax() - events with context", 12, function() { + + var context = document.createElement("div"); + + function event( e ) { + equal( this, context, e.type ); + } + + function callback( msg ) { + return function() { + equal( this, context, "context is preserved on callback " + msg ); + }; + } + + return { + setup: function() { + jQuery( context ).appendTo("#foo") + .ajaxSend( event ) + .ajaxComplete( event ) + .ajaxError( event ) + .ajaxSuccess( event ); + }, + requests: [{ + url: url("data/name.html"), + context: context, + beforeSend: callback("beforeSend"), + success: callback("success"), + complete: callback("complete") + }, { + url: url("data/404.html"), + context: context, + beforeSend: callback("beforeSend"), + error: callback("error"), + complete: callback("complete") + }] + }; + }); + + ajaxTest( "jQuery.ajax() - events without context", 3, function() { + function nocallback( msg ) { + return function() { + equal( typeof this.url, "string", "context is settings on callback " + msg ); + }; + } + return { + url: url("data/404.html"), + beforeSend: nocallback("beforeSend"), + error: nocallback("error"), + complete: nocallback("complete") + }; + }); + + ajaxTest( "jQuery.ajax() - context modification", 1, { + url: url("data/name.html"), + context: {}, + beforeSend: function() { + this.test = "foo"; + }, + afterSend: function() { + strictEqual( this.context.test, "foo", "Make sure the original object is maintained." ); + }, + success: true + }); + + ajaxTest( "jQuery.ajax() - context modification through ajaxSetup", 3, function() { + var obj = {}; + return { + setup: function() { + jQuery.ajaxSetup({ + context: obj + }); + strictEqual( jQuery.ajaxSettings.context, obj, "Make sure the context is properly set in ajaxSettings." ); + }, + requests: [{ + url: url("data/name.html"), + success: function() { + strictEqual( this, obj, "Make sure the original object is maintained." ); + } + }, { + url: url("data/name.html"), + context: {}, + success: function() { + ok( this !== obj, "Make sure overidding context is possible." ); + } + }] + }; + }); + + ajaxTest( "jQuery.ajax() - disabled globals", 3, { + setup: addGlobalEvents(""), + global: false, + url: url("data/name.html"), + beforeSend: function() { + ok( true, "beforeSend" ); + }, + success: function() { + ok( true, "success" ); + }, + complete: function() { + ok( true, "complete" ); + } + }); + + ajaxTest( "jQuery.ajax() - xml: non-namespace elements inside namespaced elements", 3, { + url: url("data/with_fries.xml"), + dataType: "xml", + success: function( resp ) { + equal( jQuery( "properties", resp ).length, 1, "properties in responseXML" ); + equal( jQuery( "jsconf", resp ).length, 1, "jsconf in responseXML" ); + equal( jQuery( "thing", resp ).length, 2, "things in responseXML" ); + } + }); + + ajaxTest( "jQuery.ajax() - xml: non-namespace elements inside namespaced elements (over JSONP)", 3, { + url: url("data/with_fries_over_jsonp.php"), + dataType: "jsonp xml", + success: function( resp ) { + equal( jQuery( "properties", resp ).length, 1, "properties in responseXML" ); + equal( jQuery( "jsconf", resp ).length, 1, "jsconf in responseXML" ); + equal( jQuery( "thing", resp ).length, 2, "things in responseXML" ); + } + }); + + ajaxTest( "jQuery.ajax() - HEAD requests", 2, [ + { + url: url("data/name.html"), + type: "HEAD", + success: function( data, status, xhr ) { + ok( /Date/i.test( xhr.getAllResponseHeaders() ), "No Date in HEAD response" ); + } + }, + { + url: url("data/name.html"), + data: { + "whip_it": "good" + }, + type: "HEAD", + success: function( data, status, xhr ) { + ok( /Date/i.test( xhr.getAllResponseHeaders() ), "No Date in HEAD response with data" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - beforeSend", 1, { + url: url("data/name.html"), + beforeSend: function( xml ) { + this.check = true; + }, + success: function( data ) { + ok( this.check, "check beforeSend was executed" ); + } + }); + + ajaxTest( "jQuery.ajax() - beforeSend, cancel request manually", 2, { + create: function() { + return jQuery.ajax({ + url: url("data/name.html"), + beforeSend: function( xhr ) { + ok( true, "beforeSend got called, canceling" ); + xhr.abort(); + }, + success: function() { + ok( false, "request didn't get canceled" ); + }, + complete: function() { + ok( false, "request didn't get canceled" ); + }, + error: function() { + ok( false, "request didn't get canceled" ); + } + }); + }, + fail: function( _, reason ) { + strictEqual( reason, "canceled", "canceled request must fail with 'canceled' status text" ); + } + }); + + ajaxTest( "jQuery.ajax() - dataType html", 5, { + setup: function() { + Globals.register("testFoo"); + Globals.register("testBar"); + }, + dataType: "html", + url: url("data/test.html"), + success: function( data ) { + ok( data.match( /^html text/ ), "Check content for datatype html" ); + jQuery("#ap").html( data ); + strictEqual( window["testFoo"], "foo", "Check if script was evaluated for datatype html" ); + strictEqual( window["testBar"], "bar", "Check if script src was evaluated for datatype html" ); + } + }); + + ajaxTest( "jQuery.ajax() - synchronous request", 1, { + url: url("data/json_obj.js"), + dataType: "text", + async: false, + success: true, + afterSend: function( xhr ) { + ok( /^\{ "data"/.test( xhr.responseText ), "check returned text" ); + } + }); + + ajaxTest( "jQuery.ajax() - synchronous request with callbacks", 2, { + url: url("data/json_obj.js"), + async: false, + dataType: "text", + success: true, + afterSend: function( xhr ) { + var result; + xhr.done(function( data ) { + ok( true, "success callback executed" ); + result = data; + }); + ok( /^\{ "data"/.test( result ), "check returned text" ); + } + }); + + asyncTest( "jQuery.ajax(), jQuery.get[Script|JSON](), jQuery.post(), pass-through request object", 8, function() { + var target = "data/name.html"; + var successCount = 0; + var errorCount = 0; + var errorEx = ""; + var success = function() { + successCount++; + }; + jQuery( document ).on( "ajaxError.passthru", function( e, xml, s, ex ) { + errorCount++; + errorEx += ": " + xml.status; + }); + jQuery( document ).one( "ajaxStop", function() { + equal( successCount, 5, "Check all ajax calls successful" ); + equal( errorCount, 0, "Check no ajax errors (status" + errorEx + ")" ); + jQuery( document ).off("ajaxError.passthru"); + start(); + }); + Globals.register("testBar"); + + ok( jQuery.get( url(target), success ), "get" ); + ok( jQuery.post( url(target), success ), "post" ); + ok( jQuery.getScript( url("data/test.js"), success ), "script" ); + ok( jQuery.getJSON( url("data/json_obj.js"), success ), "json" ); + ok( jQuery.ajax({ + url: url( target ), + success: success + }), "generic" ); + }); + + ajaxTest( "jQuery.ajax() - cache", 12, function() { + + var re = /_=(.*?)(&|$)/g; + + function request( url, title ) { + return { + url: url, + cache: false, + beforeSend: function() { + var parameter, tmp; + while(( tmp = re.exec( this.url ) )) { + strictEqual( parameter, undefined, title + ": only one 'no-cache' parameter" ); + parameter = tmp[ 1 ]; + notStrictEqual( parameter, "tobereplaced555", title + ": parameter (if it was there) was replaced" ); + } + return false; + }, + error: true + }; + } + + return [ + request( + "data/text.php", + "no parameter" + ), + request( + "data/text.php?pizza=true", + "1 parameter" + ), + request( + "data/text.php?_=tobereplaced555", + "_= parameter" + ), + request( + "data/text.php?pizza=true&_=tobereplaced555", + "1 parameter and _=" + ), + request( + "data/text.php?_=tobereplaced555&tv=false", + "_= and 1 parameter" + ), + request( + "data/text.php?name=David&_=tobereplaced555&washere=true", + "2 parameters surrounding _=" + ) + ]; + }); + + jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) { + + ajaxTest( "jQuery.ajax() - JSONP - Query String (?n)" + label, 4, [ + { + url: "data/jsonp.php?callback=?", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data.data, "JSON results returned (GET, url callback)" ); + } + }, + { + url: "data/jsonp.php?callback=??", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data.data, "JSON results returned (GET, url context-free callback)" ); + } + }, + { + url: "data/jsonp.php/??", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data.data, "JSON results returned (GET, REST-like)" ); + } + }, + { + url: "data/jsonp.php/???json=1", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + strictEqual( jQuery.type( data ), "array", "JSON results returned (GET, REST-like with param)" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - JSONP - Explicit callback param" + label, 9, { + setup: function() { + Globals.register("functionToCleanUp"); + Globals.register("XXX"); + Globals.register("jsonpResults"); + window["jsonpResults"] = function( data ) { + ok( data["data"], "JSON results returned (GET, custom callback function)" ); + }; + }, + requests: [{ + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + jsonp: "callback", + success: function( data ) { + ok( data["data"], "JSON results returned (GET, data obj callback)" ); + } + }, { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + jsonpCallback: "jsonpResults", + success: function( data ) { + ok( data.data, "JSON results returned (GET, custom callback name)" ); + } + }, { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + jsonpCallback: "functionToCleanUp", + success: function( data ) { + ok( data["data"], "JSON results returned (GET, custom callback name to be cleaned up)" ); + strictEqual( window["functionToCleanUp"], undefined, "Callback was removed (GET, custom callback name to be cleaned up)" ); + var xhr; + jQuery.ajax({ + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + jsonpCallback: "functionToCleanUp", + beforeSend: function( jqXHR ) { + xhr = jqXHR; + return false; + } + }); + xhr.fail(function() { + ok( true, "Ajax error JSON (GET, custom callback name to be cleaned up)" ); + strictEqual( window["functionToCleanUp"], undefined, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" ); + }); + } + }, { + url: "data/jsonp.php?callback=XXX", + dataType: "jsonp", + jsonp: false, + jsonpCallback: "XXX", + crossDomain: crossDomain, + beforeSend: function() { + ok( /^data\/jsonp.php\?callback=XXX&_=\d+$/.test( this.url ), "The URL wasn't messed with (GET, custom callback name with no url manipulation)" ); + }, + success: function( data ) { + ok( data["data"], "JSON results returned (GET, custom callback name with no url manipulation)" ); + } + }] + }); + + ajaxTest( "jQuery.ajax() - JSONP - Callback in data" + label, 2, [ + { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + data: "callback=?", + success: function( data ) { + ok( data.data, "JSON results returned (GET, data callback)" ); + } + }, + { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + data: "callback=??", + success: function( data ) { + ok( data.data, "JSON results returned (GET, data context-free callback)" ); + } + } + ]); + + + ajaxTest( "jQuery.ajax() - JSONP - POST" + label, 3, [ + { + type: "POST", + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data["data"], "JSON results returned (POST, no callback)" ); + } + }, + { + type: "POST", + url: "data/jsonp.php", + data: "callback=?", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data["data"], "JSON results returned (POST, data callback)" ); + } + }, + { + type: "POST", + url: "data/jsonp.php", + jsonp: "callback", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data["data"], "JSON results returned (POST, data obj callback)" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - JSONP" + label, 3, [ + { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + success: function( data ) { + ok( data.data, "JSON results returned (GET, no callback)" ); + } + }, + { + create: function( options ) { + var request = jQuery.ajax( options ), + promise = request.then(function( data ) { + ok( data.data, "first request: JSON results returned (GET, no callback)" ); + request = jQuery.ajax( this ).done(function( data ) { + ok( data.data, "this re-used: JSON results returned (GET, no callback)" ); + }); + promise.abort = request.abort; + return request; + }); + promise.abort = request.abort; + return promise; + }, + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + success: true + } + ]); + + }); + + ajaxTest( "jQuery.ajax() - script, Remote", 2, { + setup: function() { + Globals.register("testBar"); + }, + url: window.location.href.replace( /[^\/]*$/, "" ) + "data/test.js", + dataType: "script", + success: function( data ) { + strictEqual( window["testBar"], "bar", "Script results returned (GET, no callback)" ); + } + }); + + ajaxTest( "jQuery.ajax() - script, Remote with POST", 3, { + setup: function() { + Globals.register("testBar"); + }, + url: window.location.href.replace( /[^\/]*$/, "" ) + "data/test.js", + type: "POST", + dataType: "script", + success: function( data, status ) { + strictEqual( window["testBar"], "bar", "Script results returned (POST, no callback)" ); + strictEqual( status, "success", "Script results returned (POST, no callback)" ); + } + }); + + ajaxTest( "jQuery.ajax() - script, Remote with scheme-less URL", 2, { + setup: function() { + Globals.register("testBar"); + }, + url: window.location.href.replace( /[^\/]*$/, "" ).replace( /^.*?\/\//, "//" ) + "data/test.js", + dataType: "script", + success: function( data ) { + strictEqual( window["testBar"], "bar", "Script results returned (GET, no callback)" ); + } + }); + + ajaxTest( "jQuery.ajax() - malformed JSON", 2, { + url: "data/badjson.js", + dataType: "json", + error: function( xhr, msg, detailedMsg ) { + strictEqual( msg, "parsererror", "A parse error occurred." ); + ok( /(invalid|error|exception)/i.test( detailedMsg ), "Detailed parsererror message provided" ); + } + }); + + ajaxTest( "jQuery.ajax() - script by content-type", 2, [ + { + url: "data/script.php", + data: { + "header": "script" + }, + success: true + }, + { + url: "data/script.php", + data: { + "header": "ecma" + }, + success: true + } + ]); + + ajaxTest( "jQuery.ajax() - JSON by content-type", 5, { + url: "data/json.php", + data: { + "header": "json", + "json": "array" + }, + success: function( json ) { + ok( json.length >= 2, "Check length" ); + strictEqual( json[ 0 ]["name"], "John", "Check JSON: first, name" ); + strictEqual( json[ 0 ]["age"], 21, "Check JSON: first, age" ); + strictEqual( json[ 1 ]["name"], "Peter", "Check JSON: second, name" ); + strictEqual( json[ 1 ]["age"], 25, "Check JSON: second, age" ); + } + }); + + ajaxTest( "jQuery.ajax() - JSON by content-type disabled with options", 6, { + url: url("data/json.php"), + data: { + "header": "json", + "json": "array" + }, + contents: { + "json": false + }, + success: function( text ) { + strictEqual( typeof text, "string", "json wasn't auto-determined" ); + var json = jQuery.parseJSON( text ); + ok( json.length >= 2, "Check length"); + strictEqual( json[ 0 ]["name"], "John", "Check JSON: first, name" ); + strictEqual( json[ 0 ]["age"], 21, "Check JSON: first, age" ); + strictEqual( json[ 1 ]["name"], "Peter", "Check JSON: second, name" ); + strictEqual( json[ 1 ]["age"], 25, "Check JSON: second, age" ); + } + }); + + ajaxTest( "jQuery.ajax() - simple get", 1, { + type: "GET", + url: url("data/name.php?name=foo"), + success: function( msg ) { + strictEqual( msg, "bar", "Check for GET" ); + } + }); + + ajaxTest( "jQuery.ajax() - simple post", 1, { + type: "POST", + url: url("data/name.php"), + data: "name=peter", + success: function( msg ) { + strictEqual( msg, "pan", "Check for POST" ); + } + }); + + ajaxTest( "jQuery.ajax() - data option - empty bodies for non-GET requests", 1, { + url: "data/echoData.php", + data: undefined, + type: "post", + success: function( result ) { + strictEqual( result, "" ); + } + }); + + var ifModifiedNow = new Date(); + + jQuery.each( + /* jQuery.each arguments start */ + { + " (cache)": true, + " (no cache)": false + }, + function( label, cache ) { + var isOpera = !!window.opera; + + asyncTest( "jQuery.ajax() - If-Modified-Since support" + label, 3, function() { + var url = "data/if_modified_since.php?ts=" + ifModifiedNow++; + + jQuery.ajax({ + url: url, + ifModified: true, + cache: cache, + success: function( data, status ) { + strictEqual( status, "success" ); + + jQuery.ajax({ + url: url, + ifModified: true, + cache: cache, + success: function( data, status ) { + if ( data === "FAIL" ) { + ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." ); + ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." ); + } else { + strictEqual( status, "notmodified" ); + ok( data == null, "response body should be empty" ); + } + start(); + }, + error: function() { + // Do this because opera simply refuses to implement 304 handling :( + // A feature-driven way of detecting this would be appreciated + // See: http://gist.github.com/599419 + ok( isOpera, "error" ); + ok( isOpera, "error" ); + start(); + } + }); + }, + error: function() { + strictEqual( false, "error" ); + // Do this because opera simply refuses to implement 304 handling :( + // A feature-driven way of detecting this would be appreciated + // See: http://gist.github.com/599419 + ok( isOpera, "error" ); + start(); + } + }); + }); + + asyncTest( "jQuery.ajax() - Etag support" + label, 3, function() { + var url = "data/etag.php?ts=" + ifModifiedNow++; + + jQuery.ajax({ + url: url, + ifModified: true, + cache: cache, + success: function( data, status ) { + strictEqual( status, "success" ); + + jQuery.ajax({ + url: url, + ifModified: true, + cache: cache, + success: function( data, status ) { + if ( data === "FAIL" ) { + ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." ); + ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." ); + } else { + strictEqual( status, "notmodified" ); + ok( data == null, "response body should be empty" ); + } + start(); + }, + error: function() { + // Do this because opera simply refuses to implement 304 handling :( + // A feature-driven way of detecting this would be appreciated + // See: http://gist.github.com/599419 + ok( isOpera, "error" ); + ok( isOpera, "error" ); + start(); + } + }); + }, + error: function() { + // Do this because opera simply refuses to implement 304 handling :( + // A feature-driven way of detecting this would be appreciated + // See: http://gist.github.com/599419 + ok( isOpera, "error" ); + start(); + } + }); + }); + } + /* jQuery.each arguments end */ + ); + + ajaxTest( "jQuery.ajax() - failing cross-domain (non-existing)", 1, { + // see RFC 2606 + url: "http://example.invalid", + error: function( xhr, _, e ) { + ok( true, "file not found: " + xhr.status + " => " + e ); + } + }); + + ajaxTest( "jQuery.ajax() - failing cross-domain", 1, { + url: "http://" + externalHost, + error: function( xhr, _, e ) { + ok( true, "access denied: " + xhr.status + " => " + e ); + } + }); + + ajaxTest( "jQuery.ajax() - atom+xml", 1, { + url: url("data/atom+xml.php"), + success: function() { + ok( true, "success" ); + } + }); + + asyncTest( "jQuery.ajax() - statusText", 3, function() { + jQuery.ajax( url("data/statusText.php?status=200&text=Hello") ).done(function( _, statusText, jqXHR ) { + strictEqual( statusText, "success", "callback status text ok for success" ); + ok( jqXHR.statusText === "Hello" || jqXHR.statusText === "OK", "jqXHR status text ok for success (" + jqXHR.statusText + ")" ); + jQuery.ajax( url("data/statusText.php?status=404&text=World") ).fail(function( jqXHR, statusText ) { + strictEqual( statusText, "error", "callback status text ok for error" ); + // ok( jqXHR.statusText === "World" || jQuery.browser.safari && jqXHR.statusText === "Not Found", "jqXHR status text ok for error (" + jqXHR.statusText + ")" ); + start(); + }); + }); + }); + + asyncTest( "jQuery.ajax() - statusCode", 20, function() { + + var count = 12; + + function countComplete() { + if ( ! --count ) { + start(); + } + } + + function createStatusCodes( name, isSuccess ) { + name = "Test " + name + " " + ( isSuccess ? "success" : "error" ); + return { + 200: function() { + ok( isSuccess, name ); + }, + 404: function() { + ok( !isSuccess, name ); + } + }; + } + + jQuery.each( + /* jQuery.each arguments start */ + { + "data/name.html": true, + "data/someFileThatDoesNotExist.html": false + }, + function( uri, isSuccess ) { + + jQuery.ajax( url(uri), { + statusCode: createStatusCodes( "in options", isSuccess ), + complete: countComplete + }); + + jQuery.ajax( url(uri), { + complete: countComplete + }).statusCode( createStatusCodes("immediately with method", isSuccess) ); + + jQuery.ajax( url(uri), { + complete: function( jqXHR ) { + jqXHR.statusCode( createStatusCodes("on complete", isSuccess) ); + countComplete(); + } + }); + + jQuery.ajax( url(uri), { + complete: function( jqXHR ) { + setTimeout(function() { + jqXHR.statusCode( createStatusCodes("very late binding", isSuccess) ); + countComplete(); + }, 100 ); + } + }); + + jQuery.ajax( url(uri), { + statusCode: createStatusCodes( "all (options)", isSuccess ), + complete: function( jqXHR ) { + jqXHR.statusCode( createStatusCodes("all (on complete)", isSuccess) ); + setTimeout(function() { + jqXHR.statusCode( createStatusCodes("all (very late binding)", isSuccess) ); + countComplete(); + }, 100 ); + } + }).statusCode( createStatusCodes("all (immediately with method)", isSuccess) ); + + var testString = ""; + + jQuery.ajax( url(uri), { + success: function( a, b, jqXHR ) { + ok( isSuccess, "success" ); + var statusCode = {}; + statusCode[ jqXHR.status ] = function() { + testString += "B"; + }; + jqXHR.statusCode( statusCode ); + testString += "A"; + }, + error: function( jqXHR ) { + ok( !isSuccess, "error" ); + var statusCode = {}; + statusCode[ jqXHR.status ] = function() { + testString += "B"; + }; + jqXHR.statusCode( statusCode ); + testString += "A"; + }, + complete: function() { + strictEqual( + testString, + "AB", + "Test statusCode callbacks are ordered like " + ( isSuccess ? "success" : "error" ) + " callbacks" + ); + countComplete(); + } + }); + + } + /* jQuery.each arguments end*/ + ); + }); + + ajaxTest( "jQuery.ajax() - transitive conversions", 8, [ + { + url: url("data/json.php"), + converters: { + "json myJson": function( data ) { + ok( true, "converter called" ); + return data; + } + }, + dataType: "myJson", + success: function() { + ok( true, "Transitive conversion worked" ); + strictEqual( this.dataTypes[ 0 ], "text", "response was retrieved as text" ); + strictEqual( this.dataTypes[ 1 ], "myjson", "request expected myjson dataType" ); + } + }, + { + url: url("data/json.php"), + converters: { + "json myJson": function( data ) { + ok( true, "converter called (*)" ); + return data; + } + }, + contents: false, /* headers are wrong so we ignore them */ + dataType: "* myJson", + success: function() { + ok( true, "Transitive conversion worked (*)" ); + strictEqual( this.dataTypes[ 0 ], "text", "response was retrieved as text (*)" ); + strictEqual( this.dataTypes[ 1 ], "myjson", "request expected myjson dataType (*)" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - overrideMimeType", 2, [ + { + url: url("data/json.php"), + beforeSend: function( xhr ) { + xhr.overrideMimeType( "application/json" ); + }, + success: function( json ) { + ok( json.data, "Mimetype overriden using beforeSend" ); + } + }, + { + url: url("data/json.php"), + mimeType: "application/json", + success: function( json ) { + ok( json.data, "Mimetype overriden using mimeType option" ); + } + } + ]); + + ajaxTest( "jQuery.ajax() - empty json gets to error callback instead of success callback.", 1, { + url: url("data/echoData.php"), + error: function( _, __, error ) { + equal( typeof error === "object", true, "Didn't get back error object for empty json response" ); + }, + dataType: "json" + }); + + ajaxTest( "#2688 - jQuery.ajax() - beforeSend, cancel request", 2, { + create: function() { + return jQuery.ajax({ + url: url("data/name.html"), + beforeSend: function() { + ok( true, "beforeSend got called, canceling" ); + return false; + }, + success: function() { + ok( false, "request didn't get canceled" ); + }, + complete: function() { + ok( false, "request didn't get canceled" ); + }, + error: function() { + ok( false, "request didn't get canceled" ); + } + }); + }, + fail: function( _, reason ) { + strictEqual( reason, "canceled", "canceled request must fail with 'canceled' status text" ); + } + }); + + ajaxTest( "#2806 - jQuery.ajax() - data option - evaluate function values", 1, { + url: "data/echoQuery.php", + data: { + key: function() { + return "value"; + } + }, + success: function( result ) { + strictEqual( result, "key=value" ); + } + }); + + test( "#7531 - jQuery.ajax() - Location object as url", 1, function () { + var success = false; + try { + var xhr = jQuery.ajax({ + url: window.location + }); + success = true; + xhr.abort(); + } catch (e) { + + } + ok( success, "document.location did not generate exception" ); + }); + + jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) { + ajaxTest( "#7578 - jQuery.ajax() - JSONP - default for cache option" + label, 1, { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + beforeSend: function( jqXHR, s ) { + strictEqual( this.cache, false, "cache must be false on JSON request" ); + return false; + }, + error: true + }); + }); + + ajaxTest( "#8107 - jQuery.ajax() - multiple method signatures introduced in 1.5", 4, [ + { + create: function() { + return jQuery.ajax(); + }, + done: function() { + ok( true, "With no arguments" ); + } + }, + { + create: function() { + return jQuery.ajax("data/name.html"); + }, + done: function() { + ok( true, "With only string URL argument" ); + } + }, + { + create: function() { + return jQuery.ajax( "data/name.html", {}); + }, + done: function() { + ok( true, "With string URL param and map" ); + } + }, + { + create: function( options ) { + return jQuery.ajax( options ); + }, + url: "data/name.html", + success: function() { + ok( true, "With only map" ); + } + } + ]); + + jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) { + ajaxTest( "#8205 - jQuery.ajax() - JSONP - re-use callbacks name" + label, 2, { + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + beforeSend: function( jqXHR, s ) { + s.callback = s.jsonpCallback; + }, + success: function() { + var previous = this; + strictEqual( previous.jsonpCallback, undefined, "jsonpCallback option is set back to default in callbacks" ); + jQuery.ajax({ + url: "data/jsonp.php", + dataType: "jsonp", + crossDomain: crossDomain, + beforeSend: function() { + strictEqual( this.jsonpCallback, previous.callback, "JSONP callback name is re-used" ); + return false; + } + }); + } + }); + }); + + test( "#9887 - jQuery.ajax() - Context with circular references (#9887)", 2, function () { + var success = false, + context = {}; + context.field = context; + try { + jQuery.ajax( "non-existing", { + context: context, + beforeSend: function() { + ok( this === context, "context was not deep extended" ); + return false; + } + }); + success = true; + } catch ( e ) { + console.log( e ); + } + ok( success, "context with circular reference did not generate an exception" ); + }); + + jQuery.each( [ "as argument", "in settings object" ], function( inSetting, title ) { + + function request( url, test ) { + return { + create: function() { + return jQuery.ajax( inSetting ? { url: url } : url ); + }, + done: function() { + ok( true, ( test || url ) + " " + title ); + } + }; + } + + ajaxTest( "#10093 - jQuery.ajax() - falsy url " + title, 4, [ + request( "", "empty string" ), + request( false ), + request( null ), + request( undefined ) + ]); + + }); + + ajaxTest( "#11426 - jQuery.ajax() - loading binary data shouldn't throw an exception in IE", 1, { + url: url("data/1x1.jpg"), + success: function( data ) { + ok( data === undefined || /JFIF/.test( data ), "success callback reached" ); + } + }); + + test( "#11743 - jQuery.ajax() - script, throws exception", 1, function() { + raises(function() { + jQuery.ajax({ + url: "data/badjson.js", + dataType: "script", + throws: true, + // TODO find a way to test this asynchronously, too + async: false, + // Global events get confused by the exception + global: false, + success: function() { + ok( false, "Success." ); + }, + error: function() { + ok( false, "Error." ); + } + }); + }, "exception bubbled" ); + }); + + jQuery.each( [ "method", "type" ], function( _, globalOption ) { + + function request( option ) { + var options = { + url: url("data/echoData.php"), + data: "hello", + success: function( msg ) { + strictEqual( msg, "hello", "Check for POST (no override)" ); + } + }; + if ( option ) { + options[ option ] = "GET"; + options.success = function( msg ) { + strictEqual( msg, "", "Check for no POST (overriding with " + option + ")" ); + }; + } + return options; + } + + ajaxTest( "#12004 - jQuery.ajax() - method is an alias of type - " + globalOption + " set globally", 3, { + setup: function() { + var options = {}; + options[ globalOption ] = "POST"; + jQuery.ajaxSetup( options ); + }, + requests: [ + request("type"), + request("method"), + request() + ] + }); + + }); + + ajaxTest( "#13276 - jQuery.ajax() - compatibility between XML documents from ajax requests and parsed string", 1, { + url: "data/dashboard.xml", + dataType: "xml", + success: function( ajaxXML ) { + var parsedXML = jQuery( jQuery.parseXML("blibli") ).find("tab"); + ajaxXML = jQuery( ajaxXML ); + try { + ajaxXML.find("infowindowtab").append( parsedXML ); + } catch( e ) { + strictEqual( e, undefined, "error" ); + return; + } + strictEqual( ajaxXML.find("tab").length, 3, "Parsed node was added properly" ); + } + }); + + ajaxTest( "#13292 - jQuery.ajax() - converter is bypassed for 204 requests", 3, { + url: "data/nocontent.php", + dataType: "testing", + converters: { + "* testing": function() { + throw "converter was called"; + } + }, + success: function( data, status, jqXHR ) { + strictEqual( jqXHR.status, 204, "status code is 204" ); + strictEqual( status, "nocontent", "status text is 'nocontent'" ); + strictEqual( data, undefined, "data is undefined" ); + }, + error: function( _, status, error ) { + ok( false, "error" ); + strictEqual( status, "parsererror", "Parser Error" ); + strictEqual( error, "converter was called", "Converter was called" ); + } + }); + +//----------- jQuery.ajaxPrefilter() + + ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, { + setup: function() { + jQuery.ajaxPrefilter(function( options, _, jqXHR ) { + if ( options.abortInPrefilter ) { + jqXHR.abort(); + } + }); + }, + abortInPrefilter: true, + error: function() { + ok( false, "error callback called" ); + }, + fail: function( _, reason ) { + strictEqual( reason, "canceled", "Request aborted by the prefilter must fail with 'canceled' status text" ); + } + }); + +//----------- jQuery.ajaxSetup() + + asyncTest( "jQuery.ajaxSetup()", 1, function() { + jQuery.ajaxSetup({ + url: url("data/name.php?name=foo"), + success: function( msg ) { + strictEqual( msg, "bar", "Check for GET" ); + start(); + } + }); + jQuery.ajax(); + }); + + asyncTest( "jQuery.ajaxSetup({ timeout: Number }) - with global timeout", 2, function() { + var passed = 0, + pass = function() { + ok( passed++ < 2, "Error callback executed" ); + if ( passed == 2 ) { + jQuery( document ).off("ajaxError.setupTest"); + start(); + } + }, + fail = function( a, b, c ) { + ok( false, "Check for timeout failed " + a + " " + b ); + start(); + }; + + jQuery( document ).on( "ajaxError.setupTest", pass ); + + jQuery.ajaxSetup({ + timeout: 1000 + }); + + jQuery.ajax({ + type: "GET", + url: url("data/name.php?wait=5"), + error: pass, + success: fail + }); + }); + + asyncTest( "jQuery.ajaxSetup({ timeout: Number }) with localtimeout", 1, function() { + jQuery.ajaxSetup({ + timeout: 50 + }); + jQuery.ajax({ + type: "GET", + timeout: 15000, + url: url("data/name.php?wait=1"), + error: function() { + ok( false, "Check for local timeout failed" ); + start(); + }, + success: function() { + ok( true, "Check for local timeout" ); + start(); + } + }); + }); + +//----------- jQuery.domManip() + + test( "#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events", 1, function() { + jQuery.ajaxSetup({ + type: "POST" + }); + + jQuery( document ).bind( "ajaxStart ajaxStop", function() { + ok( false, "Global event triggered" ); + }); + + jQuery("#qunit-fixture").append(""); + + jQuery( document ).unbind("ajaxStart ajaxStop"); + }); + + asyncTest( "#11402 - jQuery.domManip() - script in comments are properly evaluated", 2, function() { + jQuery("#qunit-fixture").load( "data/cleanScript.html", start ); + }); + +//----------- jQuery.get() + + asyncTest( "jQuery.get( String, Hash, Function ) - parse xml and use text() on nodes", 2, function() { + jQuery.get( url("data/dashboard.xml"), function( xml ) { + var content = []; + jQuery( "tab", xml ).each(function() { + content.push( jQuery( this ).text() ); + }); + strictEqual( content[ 0 ], "blabla", "Check first tab" ); + strictEqual( content[ 1 ], "blublu", "Check second tab" ); + start(); + }); + }); + + asyncTest( "#8277 - jQuery.get( String, Function ) - data in ajaxSettings", 1, function() { + jQuery.ajaxSetup({ + data: "helloworld" + }); + jQuery.get( url("data/echoQuery.php"), function( data ) { + ok( /helloworld$/.test( data ), "Data from ajaxSettings was used" ); + start(); + }); + }); + +//----------- jQuery.getJSON() + + asyncTest( "jQuery.getJSON( String, Hash, Function ) - JSON array", 5, function() { + jQuery.getJSON( + url("data/json.php"), + { + "json": "array" + }, + function( json ) { + ok( json.length >= 2, "Check length" ); + strictEqual( json[ 0 ]["name"], "John", "Check JSON: first, name" ); + strictEqual( json[ 0 ]["age"], 21, "Check JSON: first, age" ); + strictEqual( json[ 1 ]["name"], "Peter", "Check JSON: second, name" ); + strictEqual( json[ 1 ]["age"], 25, "Check JSON: second, age" ); + start(); + } + ); + }); + + asyncTest( "jQuery.getJSON( String, Function ) - JSON object", 2, function() { + jQuery.getJSON( url("data/json.php"), function( json ) { + if ( json && json["data"] ) { + strictEqual( json["data"]["lang"], "en", "Check JSON: lang" ); + strictEqual( json["data"].length, 25, "Check JSON: length" ); + start(); + } + }); + }); + + asyncTest( "jQuery.getJSON() - Using Native JSON", 2, function() { + var restore = "JSON" in window, + old = window.JSON; + if ( !restore ) { + Globals.register("JSON"); + } + window.JSON = { + parse: function( str ) { + ok( true, "Verifying that parse method was run" ); + window.JSON = old; + return true; + } + }; + jQuery.getJSON( url("data/json.php"), function( json ) { + strictEqual( json, true, "Verifying return value" ); + start(); + }); + }); + + asyncTest( "jQuery.getJSON( String, Function ) - JSON object with absolute url to local content", 2, function() { + jQuery.getJSON( url( window.location.href.replace( /[^\/]*$/, "" ) + "data/json.php" ), function( json ) { + strictEqual( json.data.lang, "en", "Check JSON: lang" ); + strictEqual( json.data.length, 25, "Check JSON: length" ); + start(); + }); + }); + +//----------- jQuery.getScript() + + asyncTest( "jQuery.getScript( String, Function ) - with callback", 2, function() { + Globals.register("testBar"); + jQuery.getScript( url("data/test.js"), function( data, _, jqXHR ) { + strictEqual( window["testBar"], "bar", "Check if script was evaluated" ); + start(); + }); + }); + + asyncTest( "jQuery.getScript( String, Function ) - no callback", 1, function() { + Globals.register("testBar"); + jQuery.getScript( url("data/test.js") ).done( start ); + }); + + asyncTest( "#8082 - jQuery.getScript( String, Function ) - source as responseText", 2, function() { + Globals.register("testBar"); + jQuery.getScript( url("data/test.js"), function( data, _, jqXHR ) { + strictEqual( data, jqXHR.responseText, "Same-domain script requests returns the source of the script" ); + start(); + }); + }); + +//----------- jQuery.fn.load() + + // check if load can be called with only url + asyncTest( "jQuery.fn.load( String )", 2, function() { + jQuery.ajaxSetup({ + beforeSend: function() { + strictEqual( this.type, "GET", "no data means GET request" ); + } + }); + jQuery("#first").load( "data/name.html", start ); + }); + + asyncTest( "jQuery.fn.load() - 404 error callbacks", 6, function() { + addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxError")(); + jQuery( document ).ajaxStop( start ); + jQuery("
").load( "data/404.html", function() { + ok( true, "complete" ); + }); + }); + + // check if load can be called with url and null data + asyncTest( "jQuery.fn.load( String, null )", 2, function() { + jQuery.ajaxSetup({ + beforeSend: function() { + strictEqual( this.type, "GET", "no data means GET request" ); + } + }); + jQuery("#first").load( "data/name.html", null, start ); + }); + + // check if load can be called with url and undefined data + asyncTest( "jQuery.fn.load( String, undefined )", 2, function() { + jQuery.ajaxSetup({ + beforeSend: function() { + strictEqual( this.type, "GET", "no data means GET request" ); + } + }); + jQuery("#first").load( "data/name.html", undefined, start ); + }); + + // check if load can be called with only url + asyncTest( "jQuery.fn.load( URL_SELECTOR )", 1, function() { + jQuery("#first").load( "data/test3.html div.user", function() { + strictEqual( jQuery( this ).children("div").length, 2, "Verify that specific elements were injected" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load( String, Function ) - simple: inject text into DOM", 2, function() { + jQuery("#first").load( url("data/name.html"), function() { + ok( /^ERROR/.test(jQuery("#first").text()), "Check if content was injected into the DOM" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load( String, Function ) - check scripts", 7, function() { + var verifyEvaluation = function() { + strictEqual( window["testBar"], "bar", "Check if script src was evaluated after load" ); + strictEqual( jQuery("#ap").html(), "bar", "Check if script evaluation has modified DOM"); + start(); + }; + + Globals.register("testFoo"); + Globals.register("testBar"); + + jQuery("#first").load( url("data/test.html"), function() { + ok( jQuery("#first").html().match( /^html text/ ), "Check content after loading html" ); + strictEqual( jQuery("#foo").html(), "foo", "Check if script evaluation has modified DOM" ); + strictEqual( window["testFoo"], "foo", "Check if script was evaluated after load" ); + setTimeout( verifyEvaluation, 600 ); + }); + }); + + asyncTest( "jQuery.fn.load( String, Function ) - check file with only a script tag", 3, function() { + Globals.register("testFoo"); + + jQuery("#first").load( url("data/test2.html"), function() { + strictEqual( jQuery("#foo").html(), "foo", "Check if script evaluation has modified DOM"); + strictEqual( window["testFoo"], "foo", "Check if script was evaluated after load" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load( String, Function ) - dataFilter in ajaxSettings", 2, function() { + jQuery.ajaxSetup({ + dataFilter: function() { + return "Hello World"; + } + }); + jQuery("
").load( url("data/name.html"), function( responseText ) { + strictEqual( jQuery( this ).html(), "Hello World", "Test div was filled with filtered data" ); + strictEqual( responseText, "Hello World", "Test callback receives filtered data" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load( String, Object, Function )", 2, function() { + jQuery("
").load( url("data/params_html.php"), { + "foo": 3, + "bar": "ok" + }, function() { + var $post = jQuery( this ).find("#post"); + strictEqual( $post.find("#foo").text(), "3", "Check if a hash of data is passed correctly" ); + strictEqual( $post.find("#bar").text(), "ok", "Check if a hash of data is passed correctly" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load( String, String, Function )", 2, function() { + jQuery("
").load( url("data/params_html.php"), "foo=3&bar=ok", function() { + var $get = jQuery( this ).find("#get"); + strictEqual( $get.find("#foo").text(), "3", "Check if a string of data is passed correctly" ); + strictEqual( $get.find("#bar").text(), "ok", "Check if a of data is passed correctly" ); + start(); + }); + }); + + asyncTest( "jQuery.fn.load() - callbacks get the correct parameters", 8, function() { + var slice = [].slice, + completeArgs = {}; + + jQuery.ajaxSetup({ + success: function( _, status, jqXHR ) { + completeArgs[ this.url ] = [ jqXHR.responseText, status, jqXHR ]; + }, + error: function( jqXHR, status ) { + completeArgs[ this.url ] = [ jqXHR.responseText, status, jqXHR ]; + } + }); + + jQuery.when.apply( + jQuery, + jQuery.map([ + { + type: "success", + url: "data/echoQuery.php?arg=pop" + }, + { + type: "error", + url: "data/404.php" + } + ], + function( options ) { + return jQuery.Deferred(function( defer ) { + jQuery("#foo").load( options.url, function() { + var args = arguments; + strictEqual( completeArgs[ options.url ].length, args.length, "same number of arguments (" + options.type + ")" ); + jQuery.each( completeArgs[ options.url ], function( i, value ) { + strictEqual( args[ i ], value, "argument #" + i + " is the same (" + options.type + ")" ); + }); + defer.resolve(); + }); + }); + }) + ).always( start ); + }); + + asyncTest( "#2046 - jQuery.fn.load( String, Function ) with ajaxSetup on dataType json", 1, function() { + jQuery.ajaxSetup({ + dataType: "json" + }); + jQuery( document ).ajaxComplete(function( e, xml, s ) { + strictEqual( s.dataType, "html", "Verify the load() dataType was html" ); + jQuery( document ).unbind("ajaxComplete"); + start(); + }); + jQuery("#first").load("data/test3.html"); + }); + + asyncTest( "#10524 - jQuery.fn.load() - data specified in ajaxSettings is merged in", 1, function() { + var data = { + "baz": 1 + }; + jQuery.ajaxSetup({ + data: { + "foo": "bar" + } + }); + jQuery("#foo").load( "data/echoQuery.php", data ); + jQuery( document ).ajaxComplete(function( event, jqXHR, options ) { + ok( ~options.data.indexOf("foo=bar"), "Data from ajaxSettings was used" ); + start(); + }); + }); + +//----------- jQuery.post() + + asyncTest( "jQuery.post() - data", 3, function() { + jQuery.when( + jQuery.post( + url("data/name.php"), + { + xml: "5-2", + length: 3 + }, + function( xml ) { + jQuery( "math", xml ).each(function() { + strictEqual( jQuery( "calculation", this ).text(), "5-2", "Check for XML" ); + strictEqual( jQuery( "result", this ).text(), "3", "Check for XML" ); + }); + } + ), + jQuery.ajax({ + url: url("data/echoData.php"), + type: "POST", + data: { + "test": { + "length": 7, + "foo": "bar" + } + }, + success: function( data ) { + strictEqual( data, "test%5Blength%5D=7&test%5Bfoo%5D=bar", "Check if a sub-object with a length param is serialized correctly" ); + } + }) + ).always( start ); + }); + + asyncTest( "jQuery.post( String, Hash, Function ) - simple with xml", 4, function() { + jQuery.when( + jQuery.post( + url("data/name.php"), + { + "xml": "5-2" + }, + function( xml ) { + jQuery( "math", xml ).each(function() { + strictEqual( jQuery( "calculation", this ).text(), "5-2", "Check for XML" ); + strictEqual( jQuery( "result", this ).text(), "3", "Check for XML" ); + }); + } + ), + jQuery.post( url("data/name.php?xml=5-2"), {}, function( xml ) { + jQuery( "math", xml ).each(function() { + strictEqual( jQuery( "calculation", this ).text(), "5-2", "Check for XML" ); + strictEqual( jQuery( "result", this ).text(), "3", "Check for XML" ); + }); + }) + ).always( start ); + }); + +//----------- jQuery.active + + test( "jQuery.active", 1, function() { + ok( jQuery.active === 0, "ajax active counter should be zero: " + jQuery.active ); + }); + +})(); diff --git a/public/vendor/jquery/test/unit/attributes.js b/public/vendor/jquery/test/unit/attributes.js new file mode 100644 index 000000000000..03c3d62ec807 --- /dev/null +++ b/public/vendor/jquery/test/unit/attributes.js @@ -0,0 +1,1332 @@ +module( "attributes", { + teardown: moduleTeardown +}); + +var bareObj = function( value ) { + return value; +}; + +var functionReturningObj = function( value ) { + return (function() { + return value; + }); +}; + +/* + ======== local reference ======= + bareObj and functionReturningObj can be used to test passing functions to setters + See testVal below for an example + + bareObj( value ); + This function returns whatever value is passed in + + functionReturningObj( value ); + Returns a function that returns the value +*/ + +test( "jQuery.propFix integrity test", function() { + expect( 1 ); + + // This must be maintained and equal jQuery.attrFix when appropriate + // Ensure that accidental or erroneous property + // overwrites don't occur + // This is simply for better code coverage and future proofing. + var props = { + "tabindex": "tabIndex", + "readonly": "readOnly", + "for": "htmlFor", + "class": "className", + "maxlength": "maxLength", + "cellspacing": "cellSpacing", + "cellpadding": "cellPadding", + "rowspan": "rowSpan", + "colspan": "colSpan", + "usemap": "useMap", + "frameborder": "frameBorder", + "contenteditable": "contentEditable" + }; + + if ( !jQuery.support.enctype ) { + props.enctype = "encoding"; + } + + deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" ); +}); + +test( "attr(String)", function() { + expect( 50 ); + + equal( jQuery("#text1").attr("type"), "text", "Check for type attribute" ); + equal( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" ); + equal( jQuery("#check1").attr("type"), "checkbox", "Check for type attribute" ); + equal( jQuery("#simon1").attr("rel"), "bookmark", "Check for rel attribute" ); + equal( jQuery("#google").attr("title"), "Google!", "Check for title attribute" ); + equal( jQuery("#mark").attr("hreflang"), "en", "Check for hreflang attribute" ); + equal( jQuery("#en").attr("lang"), "en", "Check for lang attribute" ); + equal( jQuery("#simon").attr("class"), "blog link", "Check for class attribute" ); + equal( jQuery("#name").attr("name"), "name", "Check for name attribute" ); + equal( jQuery("#text1").attr("name"), "action", "Check for name attribute" ); + ok( jQuery("#form").attr("action").indexOf("formaction") >= 0, "Check for action attribute" ); + equal( jQuery("#text1").attr("value", "t").attr("value"), "t", "Check setting the value attribute" ); + equal( jQuery("#text1").attr("value", "").attr("value"), "", "Check setting the value attribute to empty string" ); + equal( jQuery("
").attr("value"), "t", "Check setting custom attr named 'value' on a div" ); + equal( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existant attribute on a form" ); + equal( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" ); + + // [7472] & [3113] (form contains an input with name="action" or name="id") + var extras = jQuery("").appendTo("#testForm"); + equal( jQuery("#form").attr("action","newformaction").attr("action"), "newformaction", "Check that action attribute was changed" ); + equal( jQuery("#testForm").attr("target"), undefined, "Retrieving target does not equal the input with name=target" ); + equal( jQuery("#testForm").attr("target", "newTarget").attr("target"), "newTarget", "Set target successfully on a form" ); + equal( jQuery("#testForm").removeAttr("id").attr("id"), undefined, "Retrieving id does not equal the input with name=id after id is removed [#7472]" ); + // Bug #3685 (form contains input with name="name") + equal( jQuery("#testForm").attr("name"), undefined, "Retrieving name does not retrieve input with name=name" ); + extras.remove(); + + equal( jQuery("#text1").attr("maxlength"), "30", "Check for maxlength attribute" ); + equal( jQuery("#text1").attr("maxLength"), "30", "Check for maxLength attribute" ); + equal( jQuery("#area1").attr("maxLength"), "30", "Check for maxLength attribute" ); + + // using innerHTML in IE causes href attribute to be serialized to the full path + jQuery("").attr({ + "id": "tAnchor5", + "href": "#5" + }).appendTo("#qunit-fixture"); + equal( jQuery("#tAnchor5").attr("href"), "#5", "Check for non-absolute href (an anchor)" ); + jQuery("").appendTo("#qunit-fixture"); + equal( jQuery("#tAnchor5").prop("href"), jQuery("#tAnchor6").prop("href"), "Check for absolute href prop on an anchor" ); + + $("").appendTo("#qunit-fixture"); + equal( jQuery("#tAnchor5").prop("href"), jQuery("#scriptSrc").prop("src"), "Check for absolute src prop on a script" ); + + // list attribute is readonly by default in browsers that support it + jQuery("#list-test").attr( "list", "datalist" ); + equal( jQuery("#list-test").attr("list"), "datalist", "Check setting list attribute" ); + + // Related to [5574] and [5683] + var body = document.body, $body = jQuery( body ); + + strictEqual( $body.attr("foo"), undefined, "Make sure that a non existent attribute returns undefined" ); + + body.setAttribute( "foo", "baz" ); + equal( $body.attr("foo"), "baz", "Make sure the dom attribute is retrieved when no expando is found" ); + + $body.attr( "foo","cool" ); + equal( $body.attr("foo"), "cool", "Make sure that setting works well when both expando and dom attribute are available" ); + + body.removeAttribute("foo"); // Cleanup + + var select = document.createElement("select"), + optgroup = document.createElement("optgroup"), + option = document.createElement("option"); + + optgroup.appendChild( option ); + select.appendChild( optgroup ); + + equal( jQuery( option ).prop("selected"), true, "Make sure that a single option is selected, even when in an optgroup." ); + + var $img = jQuery("").appendTo("body"); + equal( $img.attr("width"), "215", "Retrieve width attribute an an element with display:none." ); + equal( $img.attr("height"), "53", "Retrieve height attribute an an element with display:none." ); + + // Check for style support + var styleElem = jQuery("
").appendTo("#qunit-fixture").css({ + background: "url(UPPERlower.gif)" + }); + ok( !!~styleElem.attr("style").indexOf("UPPERlower.gif"), "Check style attribute getter" ); + ok( !!~styleElem.attr("style", "position:absolute;").attr("style").indexOf("absolute"), "Check style setter" ); + + // Check value on button element (#1954) + var $button = jQuery("").insertAfter("#button"); + strictEqual( $button.attr("value"), undefined, "Absence of value attribute on a button" ); + equal( $button.attr( "value", "foobar" ).attr("value"), "foobar", "Value attribute on a button does not return innerHTML" ); + equal( $button.attr("value", "baz").html(), "text", "Setting the value attribute does not change innerHTML" ); + + // Attributes with a colon on a table element (#1591) + equal( jQuery("#table").attr("test:attrib"), undefined, "Retrieving a non-existent attribute on a table with a colon does not throw an error." ); + equal( jQuery("#table").attr( "test:attrib", "foobar" ).attr("test:attrib"), "foobar", "Setting an attribute on a table with a colon does not throw an error." ); + + var $form = jQuery("
").appendTo("#qunit-fixture"); + equal( $form.attr("class"), "something", "Retrieve the class attribute on a form." ); + + var $a = jQuery("
Click").appendTo("#qunit-fixture"); + equal( $a.attr("onclick"), "something()", "Retrieve ^on attribute without anonymous function wrapper." ); + + ok( jQuery("
").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." ); + ok( jQuery("
").attr("title") === undefined, "Make sure undefined is returned when no attribute is found." ); + equal( jQuery("
").attr( "title", "something" ).attr("title"), "something", "Set the title attribute." ); + ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." ); + equal( jQuery("
").attr("value"), undefined, "An unset value on a div returns undefined." ); + strictEqual( jQuery("").attr("value"), undefined, "An unset value on a select returns undefined." ); + + $form = jQuery("#form").attr( "enctype", "multipart/form-data" ); + equal( $form.prop("enctype"), "multipart/form-data", "Set the enctype of a form (encoding in IE6/7 #6743)" ); + +}); + +test( "attr(String) on cloned elements, #9646", function() { + expect( 4 ); + + var div, + input = jQuery(""); + + input.attr("name"); + + strictEqual( input.clone( true ).attr( "name", "test" )[ 0 ].name, "test", "Name attribute should be changed on cloned element" ); + + div = jQuery("
"); + div.attr("id"); + + strictEqual( div.clone( true ).attr( "id", "test" )[ 0 ].id, "test", "Id attribute should be changed on cloned element" ); + + input = jQuery(""); + input.attr("value"); + + strictEqual( input.clone( true ).attr( "value", "test" )[ 0 ].value, "test", "Value attribute should be changed on cloned element" ); + + strictEqual( input.clone( true ).attr( "value", 42 )[ 0 ].value, "42", "Value attribute should be changed on cloned element" ); +}); + +test( "attr(String) in XML Files", function() { + expect( 3 ); + var xml = createDashboardXML(); + equal( jQuery( "locations", xml ).attr("class"), "foo", "Check class attribute in XML document" ); + equal( jQuery( "location", xml ).attr("for"), "bar", "Check for attribute in XML document" ); + equal( jQuery( "location", xml ).attr("checked"), "different", "Check that hooks are not attached in XML document" ); +}); + +test( "attr(String, Function)", function() { + expect( 2 ); + + equal( + jQuery("#text1").attr( "value", function() { + return this.id; + }).attr("value"), + "text1", + "Set value from id" + ); + + equal( + jQuery("#text1").attr( "title", function(i) { + return i; + }).attr("title"), + "0", + "Set value with an index" + ); +}); + +test( "attr(Hash)", function() { + expect( 3 ); + var pass = true; + jQuery("div").attr({ + "foo": "baz", + "zoo": "ping" + }).each(function() { + if ( this.getAttribute("foo") != "baz" && this.getAttribute("zoo") != "ping" ) { + pass = false; + } + }); + + ok( pass, "Set Multiple Attributes" ); + + equal( + jQuery("#text1").attr({ + "value": function() { + return this["id"]; + }}).attr("value"), + "text1", + "Set attribute to computed value #1" + ); + + equal( + jQuery("#text1").attr({ + "title": function(i) { + return i; + } + }).attr("title"), + "0", + "Set attribute to computed value #2" + ); +}); + +test( "attr(String, Object)", function() { + expect( 71 ); + + var div = jQuery("div").attr("foo", "bar"), + i = 0, + fail = false; + + for ( ; i < div.length; i++ ) { + if ( div[ i ].getAttribute("foo") !== "bar" ) { + fail = i; + break; + } + } + + equal( fail, false, "Set Attribute, the #" + fail + " element didn't get the attribute 'foo'" ); + + ok( + jQuery("#foo").attr({ + "width": null + }), + "Try to set an attribute to nothing" + ); + + jQuery("#name").attr( "name", "something" ); + equal( jQuery("#name").attr("name"), "something", "Set name attribute" ); + jQuery("#name").attr( "name", null ); + equal( jQuery("#name").attr("name"), undefined, "Remove name attribute" ); + + var $input = jQuery( "", { + name: "something", + id: "specified" + }); + equal( $input.attr("name"), "something", "Check element creation gets/sets the name attribute." ); + equal( $input.attr("id"), "specified", "Check element creation gets/sets the id attribute." ); + + // As of fixing #11115, we only guarantee boolean property update for checked and selected + $input = jQuery("").attr( "checked", true ); + equal( $input.prop("checked"), true, "Setting checked updates property (verified by .prop)" ); + equal( $input[0].checked, true, "Setting checked updates property (verified by native property)" ); + $input = jQuery(""); + $select1.val( valueObj( 4 ) ); + equal( $select1.val(), "4", "Should be possible to set the val() to a newly created option" ); + + // using contents will get comments regular, text, and comment nodes + var j = jQuery("#nonnodes").contents(); + j.val( valueObj( "asdf" ) ); + equal( j.val(), "asdf", "Check node,textnode,comment with val()" ); + j.removeAttr("value"); +}; + +test( "val(String/Number)", function() { + testVal( bareObj ); +}); + +test( "val(Function)", function() { + testVal( functionReturningObj ); +}); + +test( "val(Array of Numbers) (Bug #7123)", function() { + expect( 4 ); + jQuery("#form").append(""); + var elements = jQuery("input[name=arrayTest]").val([ 1, 2 ]); + ok( elements[ 0 ].checked, "First element was checked" ); + ok( elements[ 1 ].checked, "Second element was checked" ); + ok( !elements[ 2 ].checked, "Third element was unchecked" ); + ok( !elements[ 3 ].checked, "Fourth element remained unchecked" ); + + elements.remove(); +}); + +test( "val(Function) with incoming value", function() { + expect( 10 ); + + QUnit.reset(); + var oldVal = jQuery("#text1").val(); + + jQuery("#text1").val(function( i, val ) { + equal( val, oldVal, "Make sure the incoming value is correct." ); + return "test"; + }); + + equal( document.getElementById("text1").value, "test", "Check for modified (via val(String)) value of input element" ); + + oldVal = jQuery("#text1").val(); + + jQuery("#text1").val(function( i, val ) { + equal( val, oldVal, "Make sure the incoming value is correct." ); + return 67; + }); + + equal( document.getElementById("text1").value, "67", "Check for modified (via val(Number)) value of input element" ); + + oldVal = jQuery("#select1").val(); + + jQuery("#select1").val(function( i, val ) { + equal( val, oldVal, "Make sure the incoming value is correct." ); + return "3"; + }); + + equal( jQuery("#select1").val(), "3", "Check for modified (via val(String)) value of select element" ); + + oldVal = jQuery("#select1").val(); + + jQuery("#select1").val(function( i, val ) { + equal( val, oldVal, "Make sure the incoming value is correct." ); + return 2; + }); + + equal( jQuery("#select1").val(), "2", "Check for modified (via val(Number)) value of select element" ); + + jQuery("#select1").append(""); + + oldVal = jQuery("#select1").val(); + + jQuery("#select1").val(function( i, val ) { + equal( val, oldVal, "Make sure the incoming value is correct." ); + return 4; + }); + + equal( jQuery("#select1").val(), "4", "Should be possible to set the val() to a newly created option" ); +}); + +// testing if a form.reset() breaks a subsequent call to a select element's .val() (in IE only) +test( "val(select) after form.reset() (Bug #2551)", function() { + expect( 3 ); + + jQuery("
").appendTo("#qunit-fixture"); + + jQuery("#kkk").val("gf"); + + document["kk"].reset(); + + equal( jQuery("#kkk")[ 0 ].value, "cf", "Check value of select after form reset." ); + equal( jQuery("#kkk").val(), "cf", "Check value of select after form reset." ); + + // re-verify the multi-select is not broken (after form.reset) by our fix for single-select + deepEqual( jQuery("#select3").val(), ["1", "2"], "Call val() on a multiple='multiple' select" ); + + jQuery("#kk").remove(); +}); + +var testAddClass = function( valueObj ) { + expect( 9 ); + + var div = jQuery("#qunit-fixture div"); + div.addClass( valueObj("test") ); + var pass = true; + for ( var i = 0; i < div.size(); i++ ) { + if ( !~div.get( i ).className.indexOf("test") ) { + pass = false; + } + } + ok( pass, "Add Class" ); + + // using contents will get regular, text, and comment nodes + var j = jQuery("#nonnodes").contents(); + j.addClass( valueObj("asdf") ); + ok( j.hasClass("asdf"), "Check node,textnode,comment for addClass" ); + + div = jQuery("
"); + + div.addClass( valueObj("test") ); + equal( div.attr("class"), "test", "Make sure there's no extra whitespace." ); + + div.attr( "class", " foo" ); + div.addClass( valueObj("test") ); + equal( div.attr("class"), "foo test", "Make sure there's no extra whitespace." ); + + div.attr( "class", "foo" ); + div.addClass( valueObj("bar baz") ); + equal( div.attr("class"), "foo bar baz", "Make sure there isn't too much trimming." ); + + div.removeClass(); + div.addClass( valueObj("foo") ).addClass( valueObj("foo") ); + equal( div.attr("class"), "foo", "Do not add the same class twice in separate calls." ); + + div.addClass( valueObj("fo") ); + equal( div.attr("class"), "foo fo", "Adding a similar class does not get interrupted." ); + div.removeClass().addClass("wrap2"); + ok( div.addClass("wrap").hasClass("wrap"), "Can add similarly named classes"); + + div.removeClass(); + div.addClass( valueObj("bar bar") ); + equal( div.attr("class"), "bar", "Do not add the same class twice in the same call." ); +}; + +test( "addClass(String)", function() { + testAddClass( bareObj ); +}); + +test( "addClass(Function)", function() { + testAddClass( functionReturningObj ); +}); + +test( "addClass(Function) with incoming value", function() { + expect( 52 ); + var div = jQuery("#qunit-fixture div"), + old = div.map(function() { + return jQuery(this).attr("class") || ""; + }); + + div.addClass(function( i, val ) { + if ( this.id !== "_firebugConsole" ) { + equal( val, old[ i ], "Make sure the incoming value is correct." ); + return "test"; + } + }); + + var pass = true; + for ( var i = 0; i < div.length; i++ ) { + if ( div.get(i).className.indexOf("test") == -1 ) { + pass = false; + } + } + ok( pass, "Add Class" ); +}); + +var testRemoveClass = function(valueObj) { + expect( 8 ); + + var $set = jQuery("#qunit-fixture div"), + div = document.createElement("div"); + + $set.addClass("test").removeClass( valueObj("test") ); + + ok( !$set.is(".test"), "Remove Class" ); + + $set.addClass("test").addClass("foo").addClass("bar"); + $set.removeClass( valueObj("test") ).removeClass( valueObj("bar") ).removeClass( valueObj("foo") ); + + ok( !$set.is(".test,.bar,.foo"), "Remove multiple classes" ); + + // Make sure that a null value doesn't cause problems + $set.eq( 0 ).addClass("expected").removeClass( valueObj( null ) ); + ok( $set.eq( 0 ).is(".expected"), "Null value passed to removeClass" ); + + $set.eq( 0 ).addClass("expected").removeClass( valueObj("") ); + ok( $set.eq( 0 ).is(".expected"), "Empty string passed to removeClass" ); + + // using contents will get regular, text, and comment nodes + $set = jQuery("#nonnodes").contents(); + $set.removeClass( valueObj("asdf") ); + ok( !$set.hasClass("asdf"), "Check node,textnode,comment for removeClass" ); + + + jQuery( div ).removeClass( valueObj("foo") ); + strictEqual( jQuery( div ).attr("class"), undefined, "removeClass doesn't create a class attribute" ); + + div.className = " test foo "; + + jQuery( div ).removeClass( valueObj("foo") ); + equal( div.className, "test", "Make sure remaining className is trimmed." ); + + div.className = " test "; + + jQuery( div ).removeClass( valueObj("test") ); + equal( div.className, "", "Make sure there is nothing left after everything is removed." ); +}; + +test( "removeClass(String) - simple", function() { + testRemoveClass( bareObj ); +}); + +test( "removeClass(Function) - simple", function() { + testRemoveClass( functionReturningObj ); +}); + +test( "removeClass(Function) with incoming value", function() { + expect( 52 ); + + var $divs = jQuery("#qunit-fixture div").addClass("test"), old = $divs.map(function() { + return jQuery( this ).attr("class"); + }); + + $divs.removeClass(function( i, val ) { + if ( this.id !== "_firebugConsole" ) { + equal( val, old[ i ], "Make sure the incoming value is correct." ); + return "test"; + } + }); + + ok( !$divs.is(".test"), "Remove Class" ); +}); + +test( "removeClass() removes duplicates", function() { + expect( 1 ); + + var $div = jQuery( jQuery.parseHTML("
") ); + + $div.removeClass("x"); + + ok( !$div.hasClass("x"), "Element with multiple same classes does not escape the wrath of removeClass()" ); +}); + +test("removeClass(undefined) is a no-op", function() { + expect( 1 ); + + var $div = jQuery("
"); + $div.removeClass( undefined ); + + ok( $div.hasClass("base") && $div.hasClass("second"), "Element still has classes after removeClass(undefined)" ); +}); + +var testToggleClass = function(valueObj) { + expect( 17 ); + + var e = jQuery("#firstp"); + ok( !e.is(".test"), "Assert class not present" ); + e.toggleClass( valueObj("test") ); + ok( e.is(".test"), "Assert class present" ); + e.toggleClass( valueObj("test") ); + ok( !e.is(".test"), "Assert class not present" ); + + // class name with a boolean + e.toggleClass( valueObj("test"), false ); + ok( !e.is(".test"), "Assert class not present" ); + e.toggleClass( valueObj("test"), true ); + ok( e.is(".test"), "Assert class present" ); + e.toggleClass( valueObj("test"), false ); + ok( !e.is(".test"), "Assert class not present" ); + + // multiple class names + e.addClass("testA testB"); + ok( e.is(".testA.testB"), "Assert 2 different classes present" ); + e.toggleClass( valueObj("testB testC") ); + ok( (e.is(".testA.testC") && !e.is(".testB")), "Assert 1 class added, 1 class removed, and 1 class kept" ); + e.toggleClass( valueObj("testA testC") ); + ok( (!e.is(".testA") && !e.is(".testB") && !e.is(".testC")), "Assert no class present" ); + + // toggleClass storage + e.toggleClass( true ); + ok( e[ 0 ].className === "", "Assert class is empty (data was empty)" ); + e.addClass("testD testE"); + ok( e.is(".testD.testE"), "Assert class present" ); + e.toggleClass(); + ok( !e.is(".testD.testE"), "Assert class not present" ); + ok( jQuery._data(e[ 0 ], "__className__") === "testD testE", "Assert data was stored" ); + e.toggleClass(); + ok( e.is(".testD.testE"), "Assert class present (restored from data)" ); + e.toggleClass( false ); + ok( !e.is(".testD.testE"), "Assert class not present" ); + e.toggleClass( true ); + ok( e.is(".testD.testE"), "Assert class present (restored from data)" ); + e.toggleClass(); + e.toggleClass( false ); + e.toggleClass(); + ok( e.is(".testD.testE"), "Assert class present (restored from data)" ); + + // Cleanup + e.removeClass("testD"); + QUnit.expectJqData( e[ 0 ], "__className__" ); +}; + +test( "toggleClass(String|boolean|undefined[, boolean])", function() { + testToggleClass( bareObj ); +}); + +test( "toggleClass(Function[, boolean])", function() { + testToggleClass( functionReturningObj ); +}); + +test( "toggleClass(Function[, boolean]) with incoming value", function() { + expect( 14 ); + + var e = jQuery("#firstp"), + old = e.attr("class") || ""; + + ok( !e.is(".test"), "Assert class not present" ); + + e.toggleClass(function( i, val ) { + equal( old, val, "Make sure the incoming value is correct." ); + return "test"; + }); + ok( e.is(".test"), "Assert class present" ); + + old = e.attr("class"); + + e.toggleClass(function( i, val ) { + equal( old, val, "Make sure the incoming value is correct." ); + return "test"; + }); + ok( !e.is(".test"), "Assert class not present" ); + + old = e.attr("class") || ""; + + // class name with a boolean + e.toggleClass(function( i, val, state ) { + equal( old, val, "Make sure the incoming value is correct." ); + equal( state, false, "Make sure that the state is passed in." ); + return "test"; + }, false ); + ok( !e.is(".test"), "Assert class not present" ); + + old = e.attr("class") || ""; + + e.toggleClass(function( i, val, state ) { + equal( old, val, "Make sure the incoming value is correct." ); + equal( state, true, "Make sure that the state is passed in." ); + return "test"; + }, true ); + ok( e.is(".test"), "Assert class present" ); + + old = e.attr("class"); + + e.toggleClass(function( i, val, state ) { + equal( old, val, "Make sure the incoming value is correct." ); + equal( state, false, "Make sure that the state is passed in." ); + return "test"; + }, false ); + ok( !e.is(".test"), "Assert class not present" ); +}); + +test( "addClass, removeClass, hasClass", function() { + expect( 17 ); + + var jq = jQuery("

Hi

"), x = jq[ 0 ]; + + jq.addClass("hi"); + equal( x.className, "hi", "Check single added class" ); + + jq.addClass("foo bar"); + equal( x.className, "hi foo bar", "Check more added classes" ); + + jq.removeClass(); + equal( x.className, "", "Remove all classes" ); + + jq.addClass("hi foo bar"); + jq.removeClass("foo"); + equal( x.className, "hi bar", "Check removal of one class" ); + + ok( jq.hasClass("hi"), "Check has1" ); + ok( jq.hasClass("bar"), "Check has2" ); + + jq = jQuery("

"); + + ok( jq.hasClass("class1"), "Check hasClass with line feed" ); + ok( jq.is(".class1"), "Check is with line feed" ); + ok( jq.hasClass("class2"), "Check hasClass with tab" ); + ok( jq.is(".class2"), "Check is with tab" ); + ok( jq.hasClass("cla.ss3"), "Check hasClass with dot" ); + ok( jq.hasClass("class4"), "Check hasClass with carriage return" ); + ok( jq.is(".class4"), "Check is with carriage return" ); + + jq.removeClass("class2"); + ok( jq.hasClass("class2") === false, "Check the class has been properly removed" ); + jq.removeClass("cla"); + ok( jq.hasClass("cla.ss3"), "Check the dotted class has not been removed" ); + jq.removeClass("cla.ss3"); + ok( jq.hasClass("cla.ss3") === false, "Check the dotted class has been removed" ); + jq.removeClass("class4"); + ok( jq.hasClass("class4") === false, "Check the class has been properly removed" ); +}); + +test( "contents().hasClass() returns correct values", function() { + expect( 2 ); + + var $div = jQuery("
text
"), + $contents = $div.contents(); + + ok( $contents.hasClass("foo"), "Found 'foo' in $contents" ); + ok( !$contents.hasClass("undefined"), "Did not find 'undefined' in $contents (correctly)" ); +}); + +test( "coords returns correct values in IE6/IE7, see #10828", function() { + expect( 1 ); + + var area, + map = jQuery(""); + + area = map.html("a").find("area"); + equal( area.attr("coords"), "0,0,0,0", "did not retrieve coords correctly" ); +}); diff --git a/public/vendor/jquery/test/unit/callbacks.js b/public/vendor/jquery/test/unit/callbacks.js new file mode 100644 index 000000000000..9482832db239 --- /dev/null +++ b/public/vendor/jquery/test/unit/callbacks.js @@ -0,0 +1,326 @@ +module( "callbacks", { + teardown: moduleTeardown +}); + +(function() { + +var output, + addToOutput = function( string ) { + return function() { + output += string; + }; + }, + outputA = addToOutput("A"), + outputB = addToOutput("B"), + outputC = addToOutput("C"), + tests = { + "": "XABC X XABCABCC X XBB X XABA X XX", + "once": "XABC X X X X X XABA X XX", + "memory": "XABC XABC XABCABCCC XA XBB XB XABA XC XX", + "unique": "XABC X XABCA X XBB X XAB X X", + "stopOnFalse": "XABC X XABCABCC X XBB X XA X XX", + "once memory": "XABC XABC X XA X XA XABA XC XX", + "once unique": "XABC X X X X X XAB X X", + "once stopOnFalse": "XABC X X X X X XA X XX", + "memory unique": "XABC XA XABCA XA XBB XB XAB XC X", + "memory stopOnFalse": "XABC XABC XABCABCCC XA XBB XB XA X XX", + "unique stopOnFalse": "XABC X XABCA X XBB X XA X X" + }, + filters = { + "no filter": undefined, + "filter": function( fn ) { + return function() { + return fn.apply( this, arguments ); + }; + } + }; + + function showFlags( flags ) { + if ( typeof flags === "string" ) { + return "'" + flags + "'"; + } + var output = [], key; + for ( key in flags ) { + output.push( "'" + key + "': " + flags[ key ] ); + } + return "{ " + output.join( ", " ) + " }"; + } + +jQuery.each( tests, function( strFlags, resultString ) { + + var objectFlags = {}; + + jQuery.each( strFlags.split( " " ), function() { + if ( this.length ) { + objectFlags[ this ] = true; + } + }); + + jQuery.each( filters, function( filterLabel, filter ) { + + jQuery.each({ + "string": strFlags, + "object": objectFlags + }, function( flagsTypes, flags ) { + + test( "jQuery.Callbacks( " + showFlags( flags ) + " ) - " + filterLabel, function() { + + expect( 21 ); + + // Give qunit a little breathing room + stop(); + setTimeout( start, 0 ); + + var cblist, + results = resultString.split( /\s+/ ); + + // Basic binding and firing + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add(function( str ) { + output += str; + }); + cblist.fire("A"); + strictEqual( output, "XA", "Basic binding and firing" ); + strictEqual( cblist.fired(), true, ".fired() detects firing" ); + output = "X"; + cblist.disable(); + cblist.add(function( str ) { + output += str; + }); + strictEqual( output, "X", "Adding a callback after disabling" ); + cblist.fire("A"); + strictEqual( output, "X", "Firing after disabling" ); + + // Basic binding and firing (context, arguments) + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add(function() { + equal( this, window, "Basic binding and firing (context)" ); + output += Array.prototype.join.call( arguments, "" ); + }); + cblist.fireWith( window, [ "A", "B" ] ); + strictEqual( output, "XAB", "Basic binding and firing (arguments)" ); + + // fireWith with no arguments + output = ""; + cblist = jQuery.Callbacks( flags ); + cblist.add(function() { + equal( this, window, "fireWith with no arguments (context is window)" ); + strictEqual( arguments.length, 0, "fireWith with no arguments (no arguments)" ); + }); + cblist.fireWith(); + + // Basic binding, removing and firing + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add( outputA, outputB, outputC ); + cblist.remove( outputB, outputC ); + cblist.fire(); + strictEqual( output, "XA", "Basic binding, removing and firing" ); + + // Empty + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add( outputA ); + cblist.add( outputB ); + cblist.add( outputC ); + cblist.empty(); + cblist.fire(); + strictEqual( output, "X", "Empty" ); + + // Locking + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add(function( str ) { + output += str; + }); + cblist.lock(); + cblist.add(function( str ) { + output += str; + }); + cblist.fire("A"); + cblist.add(function( str ) { + output += str; + }); + strictEqual( output, "X", "Lock early" ); + + // Ordering + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add(function() { + cblist.add( outputC ); + outputA(); + }, outputB ); + cblist.fire(); + strictEqual( output, results.shift(), "Proper ordering" ); + + // Add and fire again + output = "X"; + cblist.add(function() { + cblist.add( outputC ); + outputA(); + }, outputB ); + strictEqual( output, results.shift(), "Add after fire" ); + + output = "X"; + cblist.fire(); + strictEqual( output, results.shift(), "Fire again" ); + + // Multiple fire + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add(function( str ) { + output += str; + }); + cblist.fire("A"); + strictEqual( output, "XA", "Multiple fire (first fire)" ); + output = "X"; + cblist.add(function( str ) { + output += str; + }); + strictEqual( output, results.shift(), "Multiple fire (first new callback)" ); + output = "X"; + cblist.fire("B"); + strictEqual( output, results.shift(), "Multiple fire (second fire)" ); + output = "X"; + cblist.add(function( str ) { + output += str; + }); + strictEqual( output, results.shift(), "Multiple fire (second new callback)" ); + + // Return false + output = "X"; + cblist = jQuery.Callbacks( flags ); + cblist.add( outputA, function() { return false; }, outputB ); + cblist.add( outputA ); + cblist.fire(); + strictEqual( output, results.shift(), "Callback returning false" ); + + // Add another callback (to control lists with memory do not fire anymore) + output = "X"; + cblist.add( outputC ); + strictEqual( output, results.shift(), "Adding a callback after one returned false" ); + + // Callbacks are not iterated + output = ""; + function handler( tmp ) { + output += "X"; + } + handler.method = function() { + output += "!"; + }; + cblist = jQuery.Callbacks( flags ); + cblist.add( handler ); + cblist.add( handler ); + cblist.fire(); + strictEqual( output, results.shift(), "No callback iteration" ); + }); + }); + }); +}); + +})(); + +test( "jQuery.Callbacks( options ) - options are copied", function() { + + expect( 1 ); + + var options = { + "unique": true + }, + cb = jQuery.Callbacks( options ), + count = 0, + fn = function() { + ok( !( count++ ), "called once" ); + }; + options["unique"] = false; + cb.add( fn, fn ); + cb.fire(); +}); + +test( "jQuery.Callbacks.fireWith - arguments are copied", function() { + + expect( 1 ); + + var cb = jQuery.Callbacks("memory"), + args = ["hello"]; + + cb.fireWith( null, args ); + args[ 0 ] = "world"; + + cb.add(function( hello ) { + strictEqual( hello, "hello", "arguments are copied internally" ); + }); +}); + +test( "jQuery.Callbacks.remove - should remove all instances", function() { + + expect( 1 ); + + var cb = jQuery.Callbacks(); + + function fn() { + ok( false, "function wasn't removed" ); + } + + cb.add( fn, fn, function() { + ok( true, "end of test" ); + }).remove( fn ).fire(); +}); + +test( "jQuery.Callbacks.has", function() { + + expect( 13 ); + + var cb = jQuery.Callbacks(); + function getA() { + return "A"; + } + function getB() { + return "B"; + } + function getC() { + return "C"; + } + cb.add(getA, getB, getC); + strictEqual( cb.has(), true, "No arguments to .has() returns whether callback function(s) are attached or not" ); + strictEqual( cb.has(getA), true, "Check if a specific callback function is in the Callbacks list" ); + + cb.remove(getB); + strictEqual( cb.has(getB), false, "Remove a specific callback function and make sure its no longer there" ); + strictEqual( cb.has(getA), true, "Remove a specific callback function and make sure other callback function is still there" ); + + cb.empty(); + strictEqual( cb.has(), false, "Empty list and make sure there are no callback function(s)" ); + strictEqual( cb.has(getA), false, "Check for a specific function in an empty() list" ); + + cb.add(getA, getB, function(){ + strictEqual( cb.has(), true, "Check if list has callback function(s) from within a callback function" ); + strictEqual( cb.has(getA), true, "Check if list has a specific callback from within a callback function" ); + }).fire(); + + strictEqual( cb.has(), true, "Callbacks list has callback function(s) after firing" ); + + cb.disable(); + strictEqual( cb.has(), false, "disabled() list has no callback functions (returns false)" ); + strictEqual( cb.has(getA), false, "Check for a specific function in a disabled() list" ); + + cb = jQuery.Callbacks("unique"); + cb.add(getA); + cb.add(getA); + strictEqual( cb.has(), true, "Check if unique list has callback function(s) attached" ); + cb.lock(); + strictEqual( cb.has(), false, "locked() list is empty and returns false" ); + + +}); + +test( "jQuery.Callbacks() - adding a string doesn't cause a stack overflow", function() { + + expect( 1 ); + + jQuery.Callbacks().add( "hello world" ); + + ok( true, "no stack overflow" ); +}); diff --git a/public/vendor/jquery/test/unit/core.js b/public/vendor/jquery/test/unit/core.js new file mode 100644 index 000000000000..8a91de4cd541 --- /dev/null +++ b/public/vendor/jquery/test/unit/core.js @@ -0,0 +1,1332 @@ +module("core", { teardown: moduleTeardown }); + +test("Unit Testing Environment", function () { + expect(2); + ok( hasPHP, "Running in an environment with PHP support. The AJAX tests only run if the environment supports PHP!" ); + ok( !isLocal, "Unit tests are not ran from file:// (especially in Chrome. If you must test from file:// with Chrome, run it with the --allow-file-access-from-files flag!)" ); +}); + +test("Basic requirements", function() { + expect(7); + ok( Array.prototype.push, "Array.push()" ); + ok( Function.prototype.apply, "Function.apply()" ); + ok( document.getElementById, "getElementById" ); + ok( document.getElementsByTagName, "getElementsByTagName" ); + ok( RegExp, "RegExp" ); + ok( jQuery, "jQuery" ); + ok( $, "$" ); +}); + +testIframeWithCallback( "Conditional compilation compatibility (#13274)", "core/cc_on.html", function( cc_on, errors, $ ) { + expect( 3 ); + ok( true, "JScript conditional compilation " + ( cc_on ? "supported" : "not supported" ) ); + deepEqual( errors, [], "No errors" ); + ok( $(), "jQuery executes" ); +}); + +test("jQuery()", function() { + + var elem, i, + obj = jQuery("div"), + main = jQuery("#qunit-fixture"), + code = jQuery(""), + img = jQuery(""), + div = jQuery("

"), + exec = false, + lng = "", + expected = 21, + attrObj = { + "text": "test", + "class": "test2", + "id": "test3" + }; + + // The $(html, props) signature can stealth-call any $.fn method, check for a + // few here but beware of modular builds where these methods may be excluded. + if ( jQuery.fn.click ) { + expected++; + attrObj["click"] = function() { ok( exec, "Click executed." ); }; + } + if ( jQuery.fn.width ) { + expected++; + attrObj["width"] = 10; + } + if ( jQuery.fn.offset ) { + expected++; + attrObj["offset"] = { "top": 1, "left": 1 }; + } + if ( jQuery.fn.css ) { + expected += 2; + attrObj["css"] = { "paddingLeft": 1, "paddingRight": 1 }; + } + if ( jQuery.fn.attr ) { + expected++; + attrObj.attr = { "desired": "very" }; + } + + expect( expected ); + + // Basic constructor's behavior + equal( jQuery().length, 0, "jQuery() === jQuery([])" ); + equal( jQuery(undefined).length, 0, "jQuery(undefined) === jQuery([])" ); + equal( jQuery(null).length, 0, "jQuery(null) === jQuery([])" ); + equal( jQuery("").length, 0, "jQuery('') === jQuery([])" ); + equal( jQuery("#").length, 0, "jQuery('#') === jQuery([])" ); + + equal( jQuery(obj).selector, "div", "jQuery(jQueryObj) == jQueryObj" ); + + // can actually yield more than one, when iframes are included, the window is an array as well + equal( jQuery(window).length, 1, "Correct number of elements generated for jQuery(window)" ); + + deepEqual( jQuery("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); + +/* + // disabled since this test was doing nothing. i tried to fix it but i'm not sure + // what the expected behavior should even be. FF returns "\n" for the text node + // make sure this is handled + var crlfContainer = jQuery('

\r\n

'); + var x = crlfContainer.contents().get(0).nodeValue; + equal( x, what???, "Check for \\r and \\n in jQuery()" ); +*/ + + /* // Disabled until we add this functionality in + var pass = true; + try { + jQuery("
Testing
").appendTo(document.getElementById("iframe").contentDocument.body); + } catch(e){ + pass = false; + } + ok( pass, "jQuery('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );*/ + + equal( code.length, 1, "Correct number of elements generated for code" ); + equal( code.parent().length, 0, "Make sure that the generated HTML has no parent." ); + + equal( img.length, 1, "Correct number of elements generated for img" ); + equal( img.parent().length, 0, "Make sure that the generated HTML has no parent." ); + + equal( div.length, 4, "Correct number of elements generated for div hr code b" ); + equal( div.parent().length, 0, "Make sure that the generated HTML has no parent." ); + + equal( jQuery([1,2,3]).get(1), 2, "Test passing an array to the factory" ); + + equal( jQuery(document.body).get(0), jQuery("body").get(0), "Test passing an html node to the factory" ); + + elem = jQuery("
", attrObj ); + + if ( jQuery.fn.width ) { + equal( elem[0].style.width, "10px", "jQuery() quick setter width"); + } + + if ( jQuery.fn.offset ) { + equal( elem[0].style.top, "1px", "jQuery() quick setter offset"); + } + + if ( jQuery.fn.css ) { + equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css"); + equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css"); + } + + if ( jQuery.fn.attr ) { + equal( elem[0].getAttribute("desired"), "very", "jQuery quick setter attr"); + } + + equal( elem[0].childNodes.length, 1, "jQuery quick setter text"); + equal( elem[0].firstChild.nodeValue, "test", "jQuery quick setter text"); + equal( elem[0].className, "test2", "jQuery() quick setter class"); + equal( elem[0].id, "test3", "jQuery() quick setter id"); + + exec = true; + elem.trigger("click"); + + // manually clean up detached elements + elem.remove(); + + for ( i = 0; i < 3; ++i ) { + elem = jQuery(""); + } + equal( elem[0].defaultValue, "TEST", "Ensure cached nodes are cloned properly (Bug #6655)" ); + + // manually clean up detached elements + elem.remove(); + + for ( i = 0; i < 128; i++ ) { + lng += "12345678"; + } +}); + +test( "selector state", function() { + expect( 18 ); + + var test; + + test = jQuery( undefined ); + equal( test.selector, "", "Empty jQuery Selector" ); + equal( test.context, undefined, "Empty jQuery Context" ); + + test = jQuery( document ); + equal( test.selector, "", "Document Selector" ); + equal( test.context, document, "Document Context" ); + + test = jQuery( document.body ); + equal( test.selector, "", "Body Selector" ); + equal( test.context, document.body, "Body Context" ); + + test = jQuery("#qunit-fixture"); + equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" ); + equal( test.context, document, "#qunit-fixture Context" ); + + test = jQuery("#notfoundnono"); + equal( test.selector, "#notfoundnono", "#notfoundnono Selector" ); + equal( test.context, document, "#notfoundnono Context" ); + + test = jQuery( "#qunit-fixture", document ); + equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" ); + equal( test.context, document, "#qunit-fixture Context" ); + + test = jQuery( "#qunit-fixture", document.body ); + equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" ); + equal( test.context, document.body, "#qunit-fixture Context" ); + + // Test cloning + test = jQuery( test ); + equal( test.selector, "#qunit-fixture", "#qunit-fixture Selector" ); + equal( test.context, document.body, "#qunit-fixture Context" ); + + test = jQuery( document.body ).find("#qunit-fixture"); + equal( test.selector, "#qunit-fixture", "#qunit-fixture find Selector" ); + equal( test.context, document.body, "#qunit-fixture find Context" ); +}); + +test( "globalEval", function() { + expect( 3 ); + Globals.register("globalEvalTest"); + + jQuery.globalEval("globalEvalTest = 1;"); + equal( window.globalEvalTest, 1, "Test variable assignments are global" ); + + jQuery.globalEval("var globalEvalTest = 2;"); + equal( window.globalEvalTest, 2, "Test variable declarations are global" ); + + jQuery.globalEval("this.globalEvalTest = 3;"); + equal( window.globalEvalTest, 3, "Test context (this) is the window object" ); +}); + +test("noConflict", function() { + expect(7); + + var $$ = jQuery; + + strictEqual( jQuery, jQuery.noConflict(), "noConflict returned the jQuery object" ); + strictEqual( window["jQuery"], $$, "Make sure jQuery wasn't touched." ); + strictEqual( window["$"], original$, "Make sure $ was reverted." ); + + jQuery = $ = $$; + + strictEqual( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" ); + strictEqual( window["jQuery"], originaljQuery, "Make sure jQuery was reverted." ); + strictEqual( window["$"], original$, "Make sure $ was reverted." ); + ok( $$().pushStack([]), "Make sure that jQuery still works." ); + + window["jQuery"] = jQuery = $$; +}); + +test("trim", function() { + expect(13); + + var nbsp = String.fromCharCode(160); + + equal( jQuery.trim("hello "), "hello", "trailing space" ); + equal( jQuery.trim(" hello"), "hello", "leading space" ); + equal( jQuery.trim(" hello "), "hello", "space on both sides" ); + equal( jQuery.trim(" " + nbsp + "hello " + nbsp + " "), "hello", " " ); + + equal( jQuery.trim(), "", "Nothing in." ); + equal( jQuery.trim( undefined ), "", "Undefined" ); + equal( jQuery.trim( null ), "", "Null" ); + equal( jQuery.trim( 5 ), "5", "Number" ); + equal( jQuery.trim( false ), "false", "Boolean" ); + + equal( jQuery.trim(" "), "", "space should be trimmed" ); + equal( jQuery.trim("ipad\xA0"), "ipad", "nbsp should be trimmed" ); + equal( jQuery.trim("\uFEFF"), "", "zwsp should be trimmed" ); + equal( jQuery.trim("\uFEFF \xA0! | \uFEFF"), "! |", "leading/trailing should be trimmed" ); +}); + +test("type", function() { + expect( 28 ); + + equal( jQuery.type(null), "null", "null" ); + equal( jQuery.type(undefined), "undefined", "undefined" ); + equal( jQuery.type(true), "boolean", "Boolean" ); + equal( jQuery.type(false), "boolean", "Boolean" ); + equal( jQuery.type(Boolean(true)), "boolean", "Boolean" ); + equal( jQuery.type(0), "number", "Number" ); + equal( jQuery.type(1), "number", "Number" ); + equal( jQuery.type(Number(1)), "number", "Number" ); + equal( jQuery.type(""), "string", "String" ); + equal( jQuery.type("a"), "string", "String" ); + equal( jQuery.type(String("a")), "string", "String" ); + equal( jQuery.type({}), "object", "Object" ); + equal( jQuery.type(/foo/), "regexp", "RegExp" ); + equal( jQuery.type(new RegExp("asdf")), "regexp", "RegExp" ); + equal( jQuery.type([1]), "array", "Array" ); + equal( jQuery.type(new Date()), "date", "Date" ); + equal( jQuery.type(new Function("return;")), "function", "Function" ); + equal( jQuery.type(function(){}), "function", "Function" ); + equal( jQuery.type(new Error()), "error", "Error" ); + equal( jQuery.type(window), "object", "Window" ); + equal( jQuery.type(document), "object", "Document" ); + equal( jQuery.type(document.body), "object", "Element" ); + equal( jQuery.type(document.createTextNode("foo")), "object", "TextNode" ); + equal( jQuery.type(document.getElementsByTagName("*")), "object", "NodeList" ); + + // Avoid Lint complaints + var MyString = String; + var MyNumber = Number; + var MyBoolean = Boolean; + var MyObject = Object; + equal( jQuery.type(new MyBoolean(true)), "boolean", "Boolean" ); + equal( jQuery.type(new MyNumber(1)), "number", "Number" ); + equal( jQuery.type(new MyString("a")), "string", "String" ); + equal( jQuery.type(new MyObject()), "object", "Object" ); +}); + +asyncTest("isPlainObject", function() { + expect(15); + + var pass, iframe, doc, + fn = function() {}; + + // The use case that we want to match + ok( jQuery.isPlainObject({}), "{}" ); + + // Not objects shouldn't be matched + ok( !jQuery.isPlainObject(""), "string" ); + ok( !jQuery.isPlainObject(0) && !jQuery.isPlainObject(1), "number" ); + ok( !jQuery.isPlainObject(true) && !jQuery.isPlainObject(false), "boolean" ); + ok( !jQuery.isPlainObject(null), "null" ); + ok( !jQuery.isPlainObject(undefined), "undefined" ); + + // Arrays shouldn't be matched + ok( !jQuery.isPlainObject([]), "array" ); + + // Instantiated objects shouldn't be matched + ok( !jQuery.isPlainObject(new Date()), "new Date" ); + + // Functions shouldn't be matched + ok( !jQuery.isPlainObject(fn), "fn" ); + + // Again, instantiated objects shouldn't be matched + ok( !jQuery.isPlainObject(new fn()), "new fn (no methods)" ); + + // Makes the function a little more realistic + // (and harder to detect, incidentally) + fn.prototype["someMethod"] = function(){}; + + // Again, instantiated objects shouldn't be matched + ok( !jQuery.isPlainObject(new fn()), "new fn" ); + + // DOM Element + ok( !jQuery.isPlainObject( document.createElement("div") ), "DOM Element" ); + + // Window + ok( !jQuery.isPlainObject( window ), "window" ); + + pass = false; + try { + jQuery.isPlainObject( window.location ); + pass = true; + } catch ( e ) {} + ok( pass, "Does not throw exceptions on host objects" ); + + // Objects from other windows should be matched + window.iframeCallback = function( otherObject, detail ) { + window.iframeCallback = undefined; + iframe.parentNode.removeChild( iframe ); + ok( jQuery.isPlainObject(new otherObject()), "new otherObject" + ( detail ? " - " + detail : "" ) ); + start(); + }; + + try { + iframe = jQuery("#qunit-fixture")[0].appendChild( document.createElement("iframe") ); + doc = iframe.contentDocument || iframe.contentWindow.document; + doc.open(); + doc.write(""); + doc.close(); + } catch(e) { + window.iframeDone( Object, "iframes not supported" ); + } +}); + +test("isFunction", function() { + expect(19); + + // Make sure that false values return false + ok( !jQuery.isFunction(), "No Value" ); + ok( !jQuery.isFunction( null ), "null Value" ); + ok( !jQuery.isFunction( undefined ), "undefined Value" ); + ok( !jQuery.isFunction( "" ), "Empty String Value" ); + ok( !jQuery.isFunction( 0 ), "0 Value" ); + + // Check built-ins + // Safari uses "(Internal Function)" + ok( jQuery.isFunction(String), "String Function("+String+")" ); + ok( jQuery.isFunction(Array), "Array Function("+Array+")" ); + ok( jQuery.isFunction(Object), "Object Function("+Object+")" ); + ok( jQuery.isFunction(Function), "Function Function("+Function+")" ); + + // When stringified, this could be misinterpreted + var mystr = "function"; + ok( !jQuery.isFunction(mystr), "Function String" ); + + // When stringified, this could be misinterpreted + var myarr = [ "function" ]; + ok( !jQuery.isFunction(myarr), "Function Array" ); + + // When stringified, this could be misinterpreted + var myfunction = { "function": "test" }; + ok( !jQuery.isFunction(myfunction), "Function Object" ); + + // Make sure normal functions still work + var fn = function(){}; + ok( jQuery.isFunction(fn), "Normal Function" ); + + var obj = document.createElement("object"); + + // Firefox says this is a function + ok( !jQuery.isFunction(obj), "Object Element" ); + + // IE says this is an object + // Since 1.3, this isn't supported (#2968) + //ok( jQuery.isFunction(obj.getAttribute), "getAttribute Function" ); + + var nodes = document.body.childNodes; + + // Safari says this is a function + ok( !jQuery.isFunction(nodes), "childNodes Property" ); + + var first = document.body.firstChild; + + // Normal elements are reported ok everywhere + ok( !jQuery.isFunction(first), "A normal DOM Element" ); + + var input = document.createElement("input"); + input.type = "text"; + document.body.appendChild( input ); + + // IE says this is an object + // Since 1.3, this isn't supported (#2968) + //ok( jQuery.isFunction(input.focus), "A default function property" ); + + document.body.removeChild( input ); + + var a = document.createElement("a"); + a.href = "some-function"; + document.body.appendChild( a ); + + // This serializes with the word 'function' in it + ok( !jQuery.isFunction(a), "Anchor Element" ); + + document.body.removeChild( a ); + + // Recursive function calls have lengths and array-like properties + function callme(callback){ + function fn(response){ + callback(response); + } + + ok( jQuery.isFunction(fn), "Recursive Function Call" ); + + fn({ some: "data" }); + } + + callme(function(){ + callme(function(){}); + }); +}); + +test( "isNumeric", function() { + expect( 36 ); + + var t = jQuery.isNumeric, + Traditionalists = /** @constructor */ function(n) { + this.value = n; + this.toString = function(){ + return String(this.value); + }; + }, + answer = new Traditionalists( "42" ), + rong = new Traditionalists( "Devo" ); + + ok( t("-10"), "Negative integer string"); + ok( t("0"), "Zero string"); + ok( t("5"), "Positive integer string"); + ok( t(-16), "Negative integer number"); + ok( t(0), "Zero integer number"); + ok( t(32), "Positive integer number"); + ok( t("040"), "Octal integer literal string"); + // OctalIntegerLiteral has been deprecated since ES3/1999 + // It doesn't pass lint, so disabling until a solution can be found + //ok( t(0144), "Octal integer literal"); + ok( t("0xFF"), "Hexadecimal integer literal string"); + ok( t(0xFFF), "Hexadecimal integer literal"); + ok( t("-1.6"), "Negative floating point string"); + ok( t("4.536"), "Positive floating point string"); + ok( t(-2.6), "Negative floating point number"); + ok( t(3.1415), "Positive floating point number"); + ok( t(8e5), "Exponential notation"); + ok( t("123e-2"), "Exponential notation string"); + ok( t(answer), "Custom .toString returning number"); + equal( t(""), false, "Empty string"); + equal( t(" "), false, "Whitespace characters string"); + equal( t("\t\t"), false, "Tab characters string"); + equal( t("abcdefghijklm1234567890"), false, "Alphanumeric character string"); + equal( t("xabcdefx"), false, "Non-numeric character string"); + equal( t(true), false, "Boolean true literal"); + equal( t(false), false, "Boolean false literal"); + equal( t("bcfed5.2"), false, "Number with preceding non-numeric characters"); + equal( t("7.2acdgs"), false, "Number with trailling non-numeric characters"); + equal( t(undefined), false, "Undefined value"); + equal( t(null), false, "Null value"); + equal( t(NaN), false, "NaN value"); + equal( t(Infinity), false, "Infinity primitive"); + equal( t(Number.POSITIVE_INFINITY), false, "Positive Infinity"); + equal( t(Number.NEGATIVE_INFINITY), false, "Negative Infinity"); + equal( t(rong), false, "Custom .toString returning non-number"); + equal( t({}), false, "Empty object"); + equal( t(function(){} ), false, "Instance of a function"); + equal( t( new Date() ), false, "Instance of a Date"); + equal( t(function(){} ), false, "Instance of a function"); +}); + +test("isXMLDoc - HTML", function() { + expect(4); + + ok( !jQuery.isXMLDoc( document ), "HTML document" ); + ok( !jQuery.isXMLDoc( document.documentElement ), "HTML documentElement" ); + ok( !jQuery.isXMLDoc( document.body ), "HTML Body Element" ); + + var iframe = document.createElement("iframe"); + document.body.appendChild( iframe ); + + try { + var body = jQuery(iframe).contents()[0]; + + try { + ok( !jQuery.isXMLDoc( body ), "Iframe body element" ); + } catch(e) { + ok( false, "Iframe body element exception" ); + } + + } catch(e) { + ok( true, "Iframe body element - iframe not working correctly" ); + } + + document.body.removeChild( iframe ); +}); + +test("XSS via location.hash", function() { + expect(1); + + stop(); + jQuery["_check9521"] = function(x){ + ok( x, "script called from #id-like selector with inline handler" ); + jQuery("#check9521").remove(); + delete jQuery["_check9521"]; + start(); + }; + try { + // This throws an error because it's processed like an id + jQuery( "#" ).appendTo("#qunit-fixture"); + } catch (err) { + jQuery["_check9521"](true); + } +}); + +test("isXMLDoc - XML", function() { + expect(3); + var xml = createDashboardXML(); + ok( jQuery.isXMLDoc( xml ), "XML document" ); + ok( jQuery.isXMLDoc( xml.documentElement ), "XML documentElement" ); + ok( jQuery.isXMLDoc( jQuery("tab", xml)[0] ), "XML Tab Element" ); +}); + +test("isWindow", function() { + expect( 14 ); + + ok( jQuery.isWindow(window), "window" ); + ok( jQuery.isWindow(document.getElementsByTagName("iframe")[0].contentWindow), "iframe.contentWindow" ); + ok( !jQuery.isWindow(), "empty" ); + ok( !jQuery.isWindow(null), "null" ); + ok( !jQuery.isWindow(undefined), "undefined" ); + ok( !jQuery.isWindow(document), "document" ); + ok( !jQuery.isWindow(document.documentElement), "documentElement" ); + ok( !jQuery.isWindow(""), "string" ); + ok( !jQuery.isWindow(1), "number" ); + ok( !jQuery.isWindow(true), "boolean" ); + ok( !jQuery.isWindow({}), "object" ); + ok( !jQuery.isWindow({ setInterval: function(){} }), "fake window" ); + ok( !jQuery.isWindow(/window/), "regexp" ); + ok( !jQuery.isWindow(function(){}), "function" ); +}); + +test("jQuery('html')", function() { + expect( 15 ); + + QUnit.reset(); + jQuery["foo"] = false; + var s = jQuery("")[0]; + ok( s, "Creating a script" ); + ok( !jQuery["foo"], "Make sure the script wasn't executed prematurely" ); + jQuery("body").append(""); + ok( jQuery["foo"], "Executing a scripts contents in the right context" ); + + // Test multi-line HTML + var div = jQuery("
\r\nsome text\n

some p

\nmore text\r\n
")[0]; + equal( div.nodeName.toUpperCase(), "DIV", "Make sure we're getting a div." ); + equal( div.firstChild.nodeType, 3, "Text node." ); + equal( div.lastChild.nodeType, 3, "Text node." ); + equal( div.childNodes[1].nodeType, 1, "Paragraph." ); + equal( div.childNodes[1].firstChild.nodeType, 3, "Paragraph text." ); + + QUnit.reset(); + ok( jQuery("")[0], "Creating a link" ); + + ok( !jQuery(""; + equal( jQuery.parseHTML( html ).length, 0, "Ignore scripts by default" ); + equal( jQuery.parseHTML( html, true )[0].nodeName.toLowerCase(), "script", "Preserve scripts when requested" ); + + html += "
"; + equal( jQuery.parseHTML( html )[0].nodeName.toLowerCase(), "div", "Preserve non-script nodes" ); + equal( jQuery.parseHTML( html, true )[0].nodeName.toLowerCase(), "script", "Preserve script position"); + + equal( jQuery.parseHTML("text")[0].nodeType, 3, "Parsing text returns a text node" ); + equal( jQuery.parseHTML( "\t
" )[0].nodeValue, "\t", "Preserve leading whitespace" ); + + equal( jQuery.parseHTML("
")[0].nodeType, 3, "Leading spaces are treated as text nodes (#11290)" ); + + html = jQuery.parseHTML( "
test div
" ); + equal( html[ 0 ].parentNode.nodeType, 11, "parentNode should be documentFragment" ); + equal( html[ 0 ].innerHTML, "test div", "Content should be preserved" ); + + equal( jQuery.parseHTML("").length, 1, "Incorrect html-strings should not break anything" ); + equal( jQuery.parseHTML("")[ 1 ].parentNode.nodeType, 11, "parentNode should be documentFragment" ); +}); + +test("jQuery.parseJSON", function(){ + expect( 9 ); + + equal( jQuery.parseJSON( null ), null, "Actual null returns null" ); + equal( jQuery.isEmptyObject( jQuery.parseJSON("{}") ), true, "Empty object returns empty object" ); + deepEqual( jQuery.parseJSON("{\"test\":1}"), { "test": 1 }, "Plain object parses" ); + deepEqual( jQuery.parseJSON("\n{\"test\":1}"), { "test": 1 }, "Leading whitespaces are ignored." ); + raises(function() { + jQuery.parseJSON(); + }, null, "Undefined raises an error" ); + raises( function() { + jQuery.parseJSON( "" ); + }, null, "Empty string raises an error" ); + raises(function() { + jQuery.parseJSON("''"); + }, null, "Single-quoted string raises an error" ); + raises(function() { + jQuery.parseJSON("{a:1}"); + }, null, "Unquoted property raises an error" ); + raises(function() { + jQuery.parseJSON("{'a':1}"); + }, null, "Single-quoted property raises an error" ); +}); + +test("jQuery.parseXML", 8, function(){ + var xml, tmp; + try { + xml = jQuery.parseXML( "

A well-formed xml string

" ); + tmp = xml.getElementsByTagName( "p" )[ 0 ]; + ok( !!tmp, "

present in document" ); + tmp = tmp.getElementsByTagName( "b" )[ 0 ]; + ok( !!tmp, " present in document" ); + strictEqual( tmp.childNodes[ 0 ].nodeValue, "well-formed", " text is as expected" ); + } catch (e) { + strictEqual( e, undefined, "unexpected error" ); + } + try { + xml = jQuery.parseXML( "

Not a <well-formed xml string

" ); + ok( false, "invalid xml not detected" ); + } catch( e ) { + strictEqual( e.message, "Invalid XML:

Not a <well-formed xml string

", "invalid xml detected" ); + } + try { + xml = jQuery.parseXML( "" ); + strictEqual( xml, null, "empty string => null document" ); + xml = jQuery.parseXML(); + strictEqual( xml, null, "undefined string => null document" ); + xml = jQuery.parseXML( null ); + strictEqual( xml, null, "null string => null document" ); + xml = jQuery.parseXML( true ); + strictEqual( xml, null, "non-string => null document" ); + } catch( e ) { + ok( false, "empty input throws exception" ); + } +}); + +test("jQuery.camelCase()", function() { + + var tests = { + "foo-bar": "fooBar", + "foo-bar-baz": "fooBarBaz", + "girl-u-want": "girlUWant", + "the-4th-dimension": "the4thDimension", + "-o-tannenbaum": "OTannenbaum", + "-moz-illa": "MozIlla", + "-ms-take": "msTake" + }; + + expect(7); + + jQuery.each( tests, function( key, val ) { + equal( jQuery.camelCase( key ), val, "Converts: " + key + " => " + val ); + }); +}); diff --git a/public/vendor/jquery/test/unit/css.js b/public/vendor/jquery/test/unit/css.js new file mode 100644 index 000000000000..303ee5515362 --- /dev/null +++ b/public/vendor/jquery/test/unit/css.js @@ -0,0 +1,1036 @@ +if ( jQuery.css ) { + +module("css", { teardown: moduleTeardown }); + +test("css(String|Hash)", function() { + expect( 41 ); + + equal( jQuery("#qunit-fixture").css("display"), "block", "Check for css property \"display\"" ); + + var $child = jQuery("#nothiddendivchild").css({ "width": "20%", "height": "20%" }); + notEqual( $child.css("width"), "20px", "Retrieving a width percentage on the child of a hidden div returns percentage" ); + notEqual( $child.css("height"), "20px", "Retrieving a height percentage on the child of a hidden div returns percentage" ); + + var div = jQuery( "
" ); + + // These should be "auto" (or some better value) + // temporarily provide "0px" for backwards compat + equal( div.css("width"), "0px", "Width on disconnected node." ); + equal( div.css("height"), "0px", "Height on disconnected node." ); + + div.css({ "width": 4, "height": 4 }); + + equal( div.css("width"), "4px", "Width on disconnected node." ); + equal( div.css("height"), "4px", "Height on disconnected node." ); + + var div2 = jQuery( "
"); + clone = element.clone(); + equal( clone[ 0 ].defaultValue, "foo", "Textarea defaultValue cloned correctly" ); +}); + +test( "clone(multiple selected options) (Bug #8129)", function() { + + expect( 1 ); + + var element = jQuery(""); + + equal( element.clone().find("option:selected").length, element.find("option:selected").length, "Multiple selected options cloned correctly" ); + +}); + +test( "clone() on XML nodes", function() { + + expect( 2 ); + + var xml = createDashboardXML(), + root = jQuery(xml.documentElement).clone(), + origTab = jQuery("tab", xml).eq( 0 ), + cloneTab = jQuery("tab", root).eq( 0 ); + + origTab.text("origval"); + cloneTab.text("cloneval"); + equal( origTab.text(), "origval", "Check original XML node was correctly set" ); + equal( cloneTab.text(), "cloneval", "Check cloned XML node was correctly set" ); +}); + +test( "clone() on local XML nodes with html5 nodename", function() { + + expect( 2 ); + + var $xmlDoc = jQuery( jQuery.parseXML( "" ) ), + $meter = $xmlDoc.find( "meter" ).clone(); + + equal( $meter[ 0 ].nodeName, "meter", "Check if nodeName was not changed due to cloning" ); + equal( $meter[ 0 ].nodeType, 1, "Check if nodeType is not changed due to cloning" ); +}); + +test( "html(undefined)", function() { + + expect( 1 ); + + equal( jQuery("#foo").html("test").html(undefined).html().toLowerCase(), "test", ".html(undefined) is chainable (#5571)" ); +}); + +test( "html() on empty set", function() { + + expect( 1 ); + + strictEqual( jQuery().html(), undefined, ".html() returns undefined for empty sets (#11962)" ); +}); + +var childNodeNames = function( node ) { + return jQuery.map( node.childNodes, function( child ) { + return child.nodeName.toUpperCase(); + }).join(" "); +}; + +var testHtml = function( valueObj ) { + expect( 37 ); + + var actual, expected, tmp, + div = jQuery("
"), + fixture = jQuery("#qunit-fixture"); + + div.html( valueObj("
") ); + equal( div.children().length, 2, "Found children" ); + equal( div.children().children().length, 1, "Found grandchild" ); + + actual = []; expected = []; + tmp = jQuery("").html( valueObj("area") ).each(function() { + expected.push("AREA"); + actual.push( childNodeNames( this ) ); + }); + equal( expected.length, 1, "Expecting one parent" ); + deepEqual( actual, expected, "Found the inserted area element" ); + + equal( div.html(valueObj(5)).html(), "5", "Setting a number as html" ); + equal( div.html(valueObj(0)).html(), "0", "Setting a zero as html" ); + + div.html( valueObj(" &") ); + equal( + div[ 0 ].innerHTML.replace( /\xA0/, " " ), + " &", + "Entities are passed through correctly" + ); + + tmp = "<div>hello1</div>"; + equal( div.html(valueObj(tmp) ).html().replace( />/g, ">" ), tmp, "Escaped html" ); + tmp = "x" + tmp; + equal( div.html(valueObj( tmp )).html().replace( />/g, ">" ), tmp, "Escaped html, leading x" ); + tmp = " " + tmp.slice( 1 ); + equal( div.html(valueObj( tmp )).html().replace( />/g, ">" ), tmp, "Escaped html, leading space" ); + + actual = []; expected = []; tmp = {}; + jQuery("#nonnodes").contents().html( valueObj("bold") ).each(function() { + var html = jQuery( this ).html(); + tmp[ this.nodeType ] = true; + expected.push( this.nodeType === 1 ? "bold" : undefined ); + actual.push( html ? html.toLowerCase() : html ); + }); + deepEqual( actual, expected, "Set containing element, text node, comment" ); + ok( tmp[ 1 ], "element" ); + ok( tmp[ 3 ], "text node" ); + ok( tmp[ 8 ], "comment" ); + + actual = []; expected = []; + fixture.find("> div").html( valueObj("test") ).each(function() { + expected.push("B"); + actual.push( childNodeNames( this ) ); + }); + equal( expected.length, 7, "Expecting many parents" ); + deepEqual( actual, expected, "Correct childNodes after setting HTML" ); + + actual = []; expected = []; + fixture.html( valueObj("") ).each(function() { + expected.push("STYLE"); + actual.push( childNodeNames( this ) ); + }); + equal( expected.length, 1, "Expecting one parent" ); + deepEqual( actual, expected, "Found the inserted style element" ); + + fixture.html( valueObj("", {} ); + ok( true, "Does not allow attribute object to be treated like a doc object" ); + } catch ( e ) {} +}); + +test( "jQuery.clone - no exceptions for object elements #9587", function() { + + expect( 1 ); + + try { + jQuery("#no-clone-exception").clone(); + ok( true, "cloned with no exceptions" ); + } catch( e ) { + ok( false, e.message ); + } +}); + +test( "jQuery() & wrap[Inner/All]() handle unknown elems (#10667)", function() { + + expect( 2 ); + + var $wraptarget = jQuery( "
Target
" ).appendTo( "#qunit-fixture" ), + $section = jQuery( "
" ).appendTo( "#qunit-fixture" ); + + $wraptarget.wrapAll(""); + + notEqual( $wraptarget.parent("aside").get( 0 ).style.backgroundColor, "transparent", "HTML5 elements created with wrapAll inherit styles" ); + notEqual( $section.get( 0 ).style.backgroundColor, "transparent", "HTML5 elements create with jQuery( string ) inherit styles" ); +}); + +test( "Cloned, detached HTML5 elems (#10667,10670)", function() { + + expect( 7 ); + + var $clone, + $section = jQuery( "
" ).appendTo( "#qunit-fixture" ); + + // First clone + $clone = $section.clone(); + + // Infer that the test is being run in IE<=8 + if ( $clone[ 0 ].outerHTML && !jQuery.support.opacity ) { + // This branch tests cloning nodes by reading the outerHTML, used only in IE<=8 + equal( $clone[ 0 ].outerHTML, "
", "detached clone outerHTML matches '
'" ); + } else { + // This branch tests a known behaviour in modern browsers that should never fail. + // Included for expected test count symmetry (expecting 1) + equal( $clone[ 0 ].nodeName, "SECTION", "detached clone nodeName matches 'SECTION' in modern browsers" ); + } + + // Bind an event + $section.bind( "click", function( event ) { + ok( true, "clone fired event" ); + }); + + // Second clone (will have an event bound) + $clone = $section.clone( true ); + + // Trigger an event from the first clone + $clone.trigger("click"); + $clone.unbind("click"); + + // Add a child node with text to the original + $section.append("

Hello

"); + + // Third clone (will have child node and text) + $clone = $section.clone( true ); + + equal( $clone.find("p").text(), "Hello", "Assert text in child of clone" ); + + // Trigger an event from the third clone + $clone.trigger("click"); + $clone.unbind("click"); + + // Add attributes to copy + $section.attr({ + "class": "foo bar baz", + "title": "This is a title" + }); + + // Fourth clone (will have newly added attributes) + $clone = $section.clone( true ); + + equal( $clone.attr("class"), $section.attr("class"), "clone and element have same class attribute" ); + equal( $clone.attr("title"), $section.attr("title"), "clone and element have same title attribute" ); + + // Remove the original + $section.remove(); + + // Clone the clone + $section = $clone.clone( true ); + + // Remove the clone + $clone.remove(); + + // Trigger an event from the clone of the clone + $section.trigger("click"); + + // Unbind any remaining events + $section.unbind("click"); + $clone.unbind("click"); +}); + +test( "Guard against exceptions when clearing safeChildNodes", function() { + + expect( 1 ); + + var div; + + try { + div = jQuery("

"); + } catch(e) {} + + ok( div && div.jquery, "Created nodes safely, guarded against exceptions on safeChildNodes[ -1 ]" ); +}); + +test( "Ensure oldIE creates a new set on appendTo (#8894)", function() { + + expect( 5 ); + + strictEqual( jQuery("
").clone().addClass("test").appendTo("
").end().end().hasClass("test"), false, "Check jQuery.fn.appendTo after jQuery.clone" ); + strictEqual( jQuery("
").find("p").end().addClass("test").appendTo("
").end().end().hasClass("test"), false, "Check jQuery.fn.appendTo after jQuery.fn.find" ); + strictEqual( jQuery("
").text("test").addClass("test").appendTo("
").end().end().hasClass("test"), false, "Check jQuery.fn.appendTo after jQuery.fn.text" ); + strictEqual( jQuery("").clone().addClass("test").appendTo("
").end().end().hasClass("test"), false, "Check jQuery.fn.appendTo after clone html5 element" ); + strictEqual( jQuery("

").appendTo("

").end().length, jQuery("

test

").appendTo("
").end().length, "Elements created with createElement and with createDocumentFragment should be treated alike" ); +}); + +test( "html() - script exceptions bubble (#11743)", function() { + + expect( 2 ); + + raises(function() { + jQuery("#qunit-fixture").html(""); + ok( false, "error ignored" ); + }, "exception bubbled from inline script" ); + + raises(function() { + jQuery("#qunit-fixture").html(""); + ok( false, "error ignored" ); + }, "exception bubbled from remote script" ); +}); + +test( "checked state is cloned with clone()", function() { + + expect( 2 ); + + var elem = jQuery.parseHTML("")[ 0 ]; + elem.checked = false; + equal( jQuery(elem).clone().attr("id","clone")[ 0 ].checked, false, "Checked false state correctly cloned" ); + + elem = jQuery.parseHTML("")[ 0 ]; + elem.checked = true; + equal( jQuery(elem).clone().attr("id","clone")[ 0 ].checked, true, "Checked true state correctly cloned" ); +}); + +test( "manipulate mixed jQuery and text (#12384, #12346)", function() { + + expect( 2 ); + + var div = jQuery("
a
").append( " ", jQuery("b"), " ", jQuery("c") ), + nbsp = String.fromCharCode( 160 ); + + equal( div.text(), "a" + nbsp + "b" + nbsp+ "c", "Appending mixed jQuery with text nodes" ); + + div = jQuery("
") + .find("div") + .after( "

a

", "

b

" ) + .parent(); + equal( div.find("*").length, 3, "added 2 paragraphs after inner div" ); +}); + +testIframeWithCallback( "buildFragment works even if document[0] is iframe's window object in IE9/10 (#12266)", "manipulation/iframe-denied.html", function( test ) { + expect( 1 ); + + ok( test.status, test.description ); +}); + +test( "script evaluation (#11795)", function() { + + expect( 11 ); + + var scriptsIn, scriptsOut, + fixture = jQuery("#qunit-fixture").empty(), + objGlobal = (function() { + return this; + })(), + isOk = objGlobal.ok, + notOk = function() { + var args = arguments; + args[ 0 ] = !args[ 0 ]; + return isOk.apply( this, args ); + }; + + objGlobal.ok = notOk; + scriptsIn = jQuery([ + "", + "", + "", + "", + "
", + "", + "", + "", + "", + "
" + ].join("")); + scriptsIn.appendTo( jQuery("
") ); + objGlobal.ok = isOk; + + scriptsOut = fixture.append( scriptsIn ).find("script"); + equal( scriptsOut[ 0 ].type, "something/else", "Non-evaluated type." ); + equal( scriptsOut[ 1 ].type, "text/javascript", "Evaluated type." ); + deepEqual( scriptsOut.get(), fixture.find("script").get(), "All script tags remain." ); + + objGlobal.ok = notOk; + scriptsOut = scriptsOut.add( scriptsOut.clone() ).appendTo( fixture.find("div") ); + deepEqual( fixture.find("div script").get(), scriptsOut.get(), "Scripts cloned without reevaluation" ); + fixture.append( scriptsOut.detach() ); + deepEqual( fixture.find("> script").get(), scriptsOut.get(), "Scripts detached without reevaluation" ); + objGlobal.ok = isOk; +}); + +test( "wrapping scripts (#10470)", function() { + + expect( 2 ); + + var script = document.createElement("script"); + script.text = script.textContent = "ok( !document.eval10470, 'script evaluated once' ); document.eval10470 = true;"; + + document.eval10470 = false; + jQuery("#qunit-fixture").empty()[0].appendChild( script ); + jQuery("#qunit-fixture script").wrap(""); + strictEqual( script.parentNode, jQuery("#qunit-fixture > b")[ 0 ], "correctly wrapped" ); + jQuery( script ).remove(); +}); + +test( "insertAfter, insertBefore, etc do not work when destination is original element. Element is removed (#4087)", function() { + + expect( 10 ); + + var elems; + + jQuery.each([ + "appendTo", + "prependTo", + "insertBefore", + "insertAfter", + "replaceAll" + ], function( index, name ) { + elems = jQuery( [ + "
  • c1
    h1
  • c2
    h2
", + "
1
2
3
", + "
1
2
" + ].join("") ).appendTo( "#qunit-fixture" ); + + // complex case based on http://jsfiddle.net/pbramos/gZ7vB/ + jQuery("#test4087-complex div")[ name ]("#test4087-complex li:last-child div:last-child"); + equal( jQuery("#test4087-complex li:last-child div").length, name === "replaceAll" ? 1 : 2, name +" a node to itself, complex case." ); + + // simple case + jQuery( ".test4087-1" )[ name ](".test4087-1"); + equal( jQuery(".test4087-1").length, 1, name +" a node to itself, simple case." ); + + // clean for next test + jQuery("#test4087-complex").remove(); + jQuery("#test4087-simple").remove(); + jQuery("#test4087-multiple").remove(); + }); +}); + +test( "Index for function argument should be received (#13094)", 2, function() { + var i = 0; + + jQuery("
").before(function( index ) { + equal( index, i++, "Index should be correct" ); + }); + +}); + +test( "Make sure jQuery.fn.remove can work on elements in documentFragment", 1, function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement("div") ); + + jQuery( div ).remove(); + + equal( fragment.childNodes.length, 0, "div element was removed from documentFragment" ); +}); diff --git a/public/vendor/jquery/test/unit/offset.js b/public/vendor/jquery/test/unit/offset.js new file mode 100644 index 000000000000..08b90c3b8a8d --- /dev/null +++ b/public/vendor/jquery/test/unit/offset.js @@ -0,0 +1,549 @@ +(function() { + +if ( !jQuery.fn.offset ) { + return; +} + +var supportsScroll, supportsFixedPosition, + forceScroll = jQuery("
").css({ width: 2000, height: 2000 }), + checkSupport = function() { + // Only run once + checkSupport = false; + + var checkFixed = jQuery("
").css({ position: "fixed", top: "20px" }).appendTo("#qunit-fixture"); + + // Must append to body because #qunit-fixture is hidden and elements inside it don't have a scrollTop + forceScroll.appendTo("body"); + window.scrollTo( 200, 200 ); + supportsScroll = document.documentElement.scrollTop || document.body.scrollTop; + forceScroll.detach(); + + // Safari subtracts parent border width here (which is 5px) + supportsFixedPosition = checkFixed[0].offsetTop === 20 || checkFixed[0].offsetTop === 15; + checkFixed.remove(); + }; + +module("offset", { setup: function(){ + if ( typeof checkSupport === "function" ) { + checkSupport(); + } + + // Force a scroll value on the main window to ensure incorrect results + // if offset is using the scroll offset of the parent window + forceScroll.appendTo("body"); + window.scrollTo( 1, 1 ); + forceScroll.detach(); +}, teardown: moduleTeardown }); + +/* + Closure-compiler will roll static methods off of the jQuery object and so they will + not be passed with the jQuery object across the windows. To differentiate this, the + testIframe callbacks use the "$" symbol to refer to the jQuery object passed from + the iframe window and the "jQuery" symbol is used to access any static methods. +*/ + +test("empty set", function() { + expect(2); + strictEqual( jQuery().offset(), undefined, "offset() returns undefined for empty set (#11962)" ); + strictEqual( jQuery().position(), undefined, "position() returns undefined for empty set (#11962)" ); +}); + +test("object without getBoundingClientRect", function() { + expect(2); + + // Simulates a browser without gBCR on elements, we just want to return 0,0 + var result = jQuery({ ownerDocument: document }).offset(); + equal( result.top, 0, "Check top" ); + equal( result.left, 0, "Check left" ); +}); + +test("disconnected node", function() { + expect(2); + + var result = jQuery( document.createElement("div") ).offset(); + + equal( result.top, 0, "Check top" ); + equal( result.left, 0, "Check left" ); +}); + +testIframe("offset/absolute", "absolute", function($, iframe) { + expect(4); + + var doc = iframe.document, + tests; + + // get offset + tests = [ + { "id": "#absolute-1", "top": 1, "left": 1 } + ]; + jQuery.each( tests, function() { + equal( jQuery( this["id"], doc ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" ); + equal( jQuery( this["id"], doc ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset().left" ); + }); + + + // get position + tests = [ + { "id": "#absolute-1", "top": 0, "left": 0 } + ]; + jQuery.each( tests, function() { + equal( jQuery( this["id"], doc ).position().top, this["top"], "jQuery('" + this["id"] + "').position().top" ); + equal( jQuery( this["id"], doc ).position().left, this["left"], "jQuery('" + this["id"] + "').position().left" ); + }); +}); + +testIframe("offset/absolute", "absolute", function( $ ) { + expect(178); + + // get offset tests + var tests = [ + { "id": "#absolute-1", "top": 1, "left": 1 }, + { "id": "#absolute-1-1", "top": 5, "left": 5 }, + { "id": "#absolute-1-1-1", "top": 9, "left": 9 }, + { "id": "#absolute-2", "top": 20, "left": 20 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset().left" ); + }); + + + // get position + tests = [ + { "id": "#absolute-1", "top": 0, "left": 0 }, + { "id": "#absolute-1-1", "top": 1, "left": 1 }, + { "id": "#absolute-1-1-1", "top": 1, "left": 1 }, + { "id": "#absolute-2", "top": 19, "left": 19 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).position().top, this["top"], "jQuery('" + this["id"] + "').position().top" ); + equal( $( this["id"] ).position().left, this["left"], "jQuery('" + this["id"] + "').position().left" ); + }); + + // test #5781 + var offset = $( "#positionTest" ).offset({ "top": 10, "left": 10 }).offset(); + equal( offset.top, 10, "Setting offset on element with position absolute but 'auto' values." ); + equal( offset.left, 10, "Setting offset on element with position absolute but 'auto' values." ); + + + // set offset + tests = [ + { "id": "#absolute-2", "top": 30, "left": 30 }, + { "id": "#absolute-2", "top": 10, "left": 10 }, + { "id": "#absolute-2", "top": -1, "left": -1 }, + { "id": "#absolute-2", "top": 19, "left": 19 }, + { "id": "#absolute-1-1-1", "top": 15, "left": 15 }, + { "id": "#absolute-1-1-1", "top": 5, "left": 5 }, + { "id": "#absolute-1-1-1", "top": -1, "left": -1 }, + { "id": "#absolute-1-1-1", "top": 9, "left": 9 }, + { "id": "#absolute-1-1", "top": 10, "left": 10 }, + { "id": "#absolute-1-1", "top": 0, "left": 0 }, + { "id": "#absolute-1-1", "top": -1, "left": -1 }, + { "id": "#absolute-1-1", "top": 5, "left": 5 }, + { "id": "#absolute-1", "top": 2, "left": 2 }, + { "id": "#absolute-1", "top": 0, "left": 0 }, + { "id": "#absolute-1", "top": -1, "left": -1 }, + { "id": "#absolute-1", "top": 1, "left": 1 } + ]; + jQuery.each( tests, function() { + $( this["id"] ).offset({ "top": this["top"], "left": this["left"] }); + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset({ top: " + this["top"] + " })" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset({ left: " + this["left"] + " })" ); + + var top = this["top"], left = this["left"]; + + $( this["id"] ).offset(function(i, val){ + equal( val.top, top, "Verify incoming top position." ); + equal( val.left, left, "Verify incoming top position." ); + return { "top": top + 1, "left": left + 1 }; + }); + equal( $( this["id"] ).offset().top, this["top"] + 1, "jQuery('" + this["id"] + "').offset({ top: " + (this["top"] + 1) + " })" ); + equal( $( this["id"] ).offset().left, this["left"] + 1, "jQuery('" + this["id"] + "').offset({ left: " + (this["left"] + 1) + " })" ); + + $( this["id"] ) + .offset({ "left": this["left"] + 2 }) + .offset({ "top": this["top"] + 2 }); + equal( $( this["id"] ).offset().top, this["top"] + 2, "Setting one property at a time." ); + equal( $( this["id"] ).offset().left, this["left"] + 2, "Setting one property at a time." ); + + $( this["id"] ).offset({ "top": this["top"], "left": this["left"], "using": function( props ) { + $( this ).css({ + "top": props.top + 1, + "left": props.left + 1 + }); + }}); + equal( $( this["id"] ).offset().top, this["top"] + 1, "jQuery('" + this["id"] + "').offset({ top: " + (this["top"] + 1) + ", using: fn })" ); + equal( $( this["id"] ).offset().left, this["left"] + 1, "jQuery('" + this["id"] + "').offset({ left: " + (this["left"] + 1) + ", using: fn })" ); + }); +}); + +testIframe("offset/relative", "relative", function( $ ) { + expect(60); + + // IE is collapsing the top margin of 1px; detect and adjust accordingly + var ie = $("#relative-1").offset().top === 6; + + // get offset + var tests = [ + { "id": "#relative-1", "top": ie ? 6 : 7, "left": 7 }, + { "id": "#relative-1-1", "top": ie ? 13 : 15, "left": 15 }, + { "id": "#relative-2", "top": ie ? 141 : 142, "left": 27 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset().left" ); + }); + + + // get position + tests = [ + { "id": "#relative-1", "top": ie ? 5 : 6, "left": 6 }, + { "id": "#relative-1-1", "top": ie ? 4 : 5, "left": 5 }, + { "id": "#relative-2", "top": ie ? 140 : 141, "left": 26 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).position().top, this["top"], "jQuery('" + this["id"] + "').position().top" ); + equal( $( this["id"] ).position().left, this["left"], "jQuery('" + this["id"] + "').position().left" ); + }); + + + // set offset + tests = [ + { "id": "#relative-2", "top": 200, "left": 50 }, + { "id": "#relative-2", "top": 100, "left": 10 }, + { "id": "#relative-2", "top": -5, "left": -5 }, + { "id": "#relative-2", "top": 142, "left": 27 }, + { "id": "#relative-1-1", "top": 100, "left": 100 }, + { "id": "#relative-1-1", "top": 5, "left": 5 }, + { "id": "#relative-1-1", "top": -1, "left": -1 }, + { "id": "#relative-1-1", "top": 15, "left": 15 }, + { "id": "#relative-1", "top": 100, "left": 100 }, + { "id": "#relative-1", "top": 0, "left": 0 }, + { "id": "#relative-1", "top": -1, "left": -1 }, + { "id": "#relative-1", "top": 7, "left": 7 } + ]; + jQuery.each( tests, function() { + $( this["id"] ).offset({ "top": this["top"], "left": this["left"] }); + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset({ top: " + this["top"] + " })" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset({ left: " + this["left"] + " })" ); + + $( this["id"] ).offset({ "top": this["top"], "left": this["left"], "using": function( props ) { + $( this ).css({ + "top": props.top + 1, + "left": props.left + 1 + }); + }}); + equal( $( this["id"] ).offset().top, this["top"] + 1, "jQuery('" + this["id"] + "').offset({ top: " + (this["top"] + 1) + ", using: fn })" ); + equal( $( this["id"] ).offset().left, this["left"] + 1, "jQuery('" + this["id"] + "').offset({ left: " + (this["left"] + 1) + ", using: fn })" ); + }); +}); + +testIframe("offset/static", "static", function( $ ) { + + // IE is collapsing the top margin of 1px; detect and adjust accordingly + var ie = $("#static-1").offset().top === 6; + + expect( 80 ); + + // get offset + var tests = [ + { "id": "#static-1", "top": ie ? 6 : 7, "left": 7 }, + { "id": "#static-1-1", "top": ie ? 13 : 15, "left": 15 }, + { "id": "#static-1-1-1", "top": ie ? 20 : 23, "left": 23 }, + { "id": "#static-2", "top": ie ? 121 : 122, left: 7 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset().left" ); + }); + + + // get position + tests = [ + { "id": "#static-1", "top": ie ? 5 : 6, "left": 6 }, + { "id": "#static-1-1", "top": ie ? 12 : 14, "left": 14 }, + { "id": "#static-1-1-1", "top": ie ? 19 : 22, "left": 22 }, + { "id": "#static-2", "top": ie ? 120 : 121, "left": 6 } + ]; + jQuery.each( tests, function() { + equal( $( this["id"] ).position().top, this["top"], "jQuery('" + this["top"] + "').position().top" ); + equal( $( this["id"] ).position().left, this["left"], "jQuery('" + this["left"] +"').position().left" ); + }); + + + // set offset + tests = [ + { "id": "#static-2", "top": 200, "left": 200 }, + { "id": "#static-2", "top": 100, "left": 100 }, + { "id": "#static-2", "top": -2, "left": -2 }, + { "id": "#static-2", "top": 121, "left": 6 }, + { "id": "#static-1-1-1", "top": 50, "left": 50 }, + { "id": "#static-1-1-1", "top": 10, "left": 10 }, + { "id": "#static-1-1-1", "top": -1, "left": -1 }, + { "id": "#static-1-1-1", "top": 22, "left": 22 }, + { "id": "#static-1-1", "top": 25, "left": 25 }, + { "id": "#static-1-1", "top": 10, "left": 10 }, + { "id": "#static-1-1", "top": -3, "left": -3 }, + { "id": "#static-1-1", "top": 14, "left": 14 }, + { "id": "#static-1", "top": 30, "left": 30 }, + { "id": "#static-1", "top": 2, "left": 2 }, + { "id": "#static-1", "top": -2, "left": -2 }, + { "id": "#static-1", "top": 7, "left": 7 } + ]; + jQuery.each( tests, function() { + $( this["id"] ).offset({ "top": this["top"], "left": this["left"] }); + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset({ top: " + this["top"] + " })" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset({ left: " + this["left"] + " })" ); + + $( this["id"] ).offset({ "top": this["top"], "left": this["left"], "using": function( props ) { + $( this ).css({ + "top": props.top + 1, + "left": props.left + 1 + }); + }}); + equal( $( this["id"] ).offset().top, this["top"] + 1, "jQuery('" + this["id"] + "').offset({ top: " + (this["top"] + 1) + ", using: fn })" ); + equal( $( this["id"] ).offset().left, this["left"] + 1, "jQuery('" + this["id"] + "').offset({ left: " + (this["left"] + 1) + ", using: fn })" ); + }); +}); + +testIframe("offset/fixed", "fixed", function( $ ) { + // IE is collapsing the top margin of 1px; detect and adjust accordingly + var ie = $("#fixed-1").position().top === 2; + + expect(34); + + var tests = [ + { + "id": "#fixed-1", + "offsetTop": 1001, + "offsetLeft": 1001, + "positionTop": ie ? 2 : 0, + "positionLeft": ie ? 2 : 0 + }, + { + "id": "#fixed-2", + "offsetTop": 1021, + "offsetLeft": 1021, + "positionTop": ie ? 22 : 20, + "positionLeft": ie ? 22 : 20 + } + ]; + + jQuery.each( tests, function() { + if ( !window.supportsScroll ) { + ok( true, "Browser doesn't support scroll position." ); + ok( true, "Browser doesn't support scroll position." ); + ok( true, "Browser doesn't support scroll position." ); + ok( true, "Browser doesn't support scroll position." ); + + } else if ( window.supportsFixedPosition ) { + equal( $( this["id"] ).offset().top, this["offsetTop"], "jQuery('" + this["id"] + "').offset().top" ); + equal( $( this["id"] ).position().top, this["positionTop"], "jQuery('" + this["id"] + "').position().top" ); + equal( $( this["id"] ).offset().left, this["offsetLeft"], "jQuery('" + this["id"] + "').offset().left" ); + equal( $( this["id"] ).position().left, this["positionLeft"], "jQuery('" + this["id"] + "').position().left" ); + } else { + // need to have same number of assertions + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + } + }); + + tests = [ + { "id": "#fixed-1", "top": 100, "left": 100 }, + { "id": "#fixed-1", "top": 0, "left": 0 }, + { "id": "#fixed-1", "top": -4, "left": -4 }, + { "id": "#fixed-2", "top": 200, "left": 200 }, + { "id": "#fixed-2", "top": 0, "left": 0 }, + { "id": "#fixed-2", "top": -5, "left": -5 } + ]; + + jQuery.each( tests, function() { + if ( window.supportsFixedPosition ) { + $( this["id"] ).offset({ "top": this["top"], "left": this["left"] }); + equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset({ top: " + this["top"] + " })" ); + equal( $( this["id"] ).offset().left, this["left"], "jQuery('" + this["id"] + "').offset({ left: " + this["left"] + " })" ); + + $( this["id"] ).offset({ "top": this["top"], "left": this["left"], "using": function( props ) { + $( this ).css({ + "top": props.top + 1, + "left": props.left + 1 + }); + }}); + equal( $( this["id"] ).offset().top, this["top"] + 1, "jQuery('" + this["id"] + "').offset({ top: " + (this["top"] + 1) + ", using: fn })" ); + equal( $( this["id"] ).offset().left, this["left"] + 1, "jQuery('" + this["id"] + "').offset({ left: " + (this["left"] + 1) + ", using: fn })" ); + } else { + // need to have same number of assertions + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + } + }); + + // Bug 8316 + var $noTopLeft = $("#fixed-no-top-left"); + if ( window.supportsFixedPosition ) { + equal( $noTopLeft.offset().top, 1007, "Check offset top for fixed element with no top set" ); + equal( $noTopLeft.offset().left, 1007, "Check offset left for fixed element with no left set" ); + } else { + // need to have same number of assertions + ok( true, "Fixed position is not supported" ); + ok( true, "Fixed position is not supported" ); + } +}); + +testIframe("offset/table", "table", function( $ ) { + expect(4); + + equal( $("#table-1").offset().top, 6, "jQuery('#table-1').offset().top" ); + equal( $("#table-1").offset().left, 6, "jQuery('#table-1').offset().left" ); + + equal( $("#th-1").offset().top, 10, "jQuery('#th-1').offset().top" ); + equal( $("#th-1").offset().left, 10, "jQuery('#th-1').offset().left" ); +}); + +testIframe("offset/scroll", "scroll", function( $, win ) { + expect(24); + + // If we're going to bastardize the tests, let's just DO it + var ie = /msie [678]/i.test( navigator.userAgent ); + + if ( ie ) { + ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" ); + } else { + equal( $("#scroll-1").offset().top, 7, "jQuery('#scroll-1').offset().top" ); + } + equal( $("#scroll-1").offset().left, 7, "jQuery('#scroll-1').offset().left" ); + + if ( ie ) { + ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" ); + } else { + equal( $("#scroll-1-1").offset().top, 11, "jQuery('#scroll-1-1').offset().top" ); + } + equal( $("#scroll-1-1").offset().left, 11, "jQuery('#scroll-1-1').offset().left" ); + + // scroll offset tests .scrollTop/Left + equal( $("#scroll-1").scrollTop(), 5, "jQuery('#scroll-1').scrollTop()" ); + equal( $("#scroll-1").scrollLeft(), 5, "jQuery('#scroll-1').scrollLeft()" ); + + equal( $("#scroll-1-1").scrollTop(), 0, "jQuery('#scroll-1-1').scrollTop()" ); + equal( $("#scroll-1-1").scrollLeft(), 0, "jQuery('#scroll-1-1').scrollLeft()" ); + + // scroll method chaining + equal( $("#scroll-1").scrollTop(undefined).scrollTop(), 5, ".scrollTop(undefined) is chainable (#5571)" ); + equal( $("#scroll-1").scrollLeft(undefined).scrollLeft(), 5, ".scrollLeft(undefined) is chainable (#5571)" ); + + win.name = "test"; + + if ( !window.supportsScroll ) { + ok( true, "Browser doesn't support scroll position." ); + ok( true, "Browser doesn't support scroll position." ); + + ok( true, "Browser doesn't support scroll position." ); + ok( true, "Browser doesn't support scroll position." ); + } else { + equal( $(win).scrollTop(), 1000, "jQuery(window).scrollTop()" ); + equal( $(win).scrollLeft(), 1000, "jQuery(window).scrollLeft()" ); + + equal( $(win.document).scrollTop(), 1000, "jQuery(document).scrollTop()" ); + equal( $(win.document).scrollLeft(), 1000, "jQuery(document).scrollLeft()" ); + } + + // test jQuery using parent window/document + // jQuery reference here is in the iframe + window.scrollTo(0,0); + equal( $(window).scrollTop(), 0, "jQuery(window).scrollTop() other window" ); + equal( $(window).scrollLeft(), 0, "jQuery(window).scrollLeft() other window" ); + equal( $(document).scrollTop(), 0, "jQuery(window).scrollTop() other document" ); + equal( $(document).scrollLeft(), 0, "jQuery(window).scrollLeft() other document" ); + + // Tests scrollTop/Left with empty jquery objects + notEqual( $().scrollTop(100), null, "jQuery().scrollTop(100) testing setter on empty jquery object" ); + notEqual( $().scrollLeft(100), null, "jQuery().scrollLeft(100) testing setter on empty jquery object" ); + notEqual( $().scrollTop(null), null, "jQuery().scrollTop(null) testing setter on empty jquery object" ); + notEqual( $().scrollLeft(null), null, "jQuery().scrollLeft(null) testing setter on empty jquery object" ); + strictEqual( $().scrollTop(), null, "jQuery().scrollTop(100) testing setter on empty jquery object" ); + strictEqual( $().scrollLeft(), null, "jQuery().scrollLeft(100) testing setter on empty jquery object" ); +}); + +testIframe("offset/body", "body", function( $ ) { + expect(4); + + equal( $("body").offset().top, 1, "jQuery('#body').offset().top" ); + equal( $("body").offset().left, 1, "jQuery('#body').offset().left" ); + equal( $("#firstElement").position().left, 5, "$('#firstElement').position().left" ); + equal( $("#firstElement").position().top, 5, "$('#firstElement').position().top" ); +}); + +test("chaining", function() { + expect(3); + var coords = { "top": 1, "left": 1 }; + equal( jQuery("#absolute-1").offset(coords).selector, "#absolute-1", "offset(coords) returns jQuery object" ); + equal( jQuery("#non-existent").offset(coords).selector, "#non-existent", "offset(coords) with empty jQuery set returns jQuery object" ); + equal( jQuery("#absolute-1").offset(undefined).selector, "#absolute-1", "offset(undefined) returns jQuery object (#5571)" ); +}); + +test("offsetParent", function(){ + expect(13); + + var body = jQuery("body").offsetParent(); + equal( body.length, 1, "Only one offsetParent found." ); + equal( body[0], document.documentElement, "The html element is the offsetParent of the body." ); + + var header = jQuery("#qunit").offsetParent(); + equal( header.length, 1, "Only one offsetParent found." ); + equal( header[0], document.documentElement, "The html element is the offsetParent of #qunit." ); + + var div = jQuery("#nothiddendivchild").offsetParent(); + equal( div.length, 1, "Only one offsetParent found." ); + equal( div[0], document.getElementById("qunit-fixture"), "The #qunit-fixture is the offsetParent of #nothiddendivchild." ); + + jQuery("#nothiddendiv").css("position", "relative"); + + div = jQuery("#nothiddendivchild").offsetParent(); + equal( div.length, 1, "Only one offsetParent found." ); + equal( div[0], jQuery("#nothiddendiv")[0], "The div is the offsetParent." ); + + div = jQuery("body, #nothiddendivchild").offsetParent(); + equal( div.length, 2, "Two offsetParent found." ); + equal( div[0], document.documentElement, "The html element is the offsetParent of the body." ); + equal( div[1], jQuery("#nothiddendiv")[0], "The div is the offsetParent." ); + + var area = jQuery("#imgmap area").offsetParent(); + equal( area[0], document.documentElement, "The html element is the offsetParent of the body." ); + + div = jQuery("
").css({ "position": "absolute" }).appendTo("body"); + equal( div.offsetParent()[0], document.documentElement, "Absolutely positioned div returns html as offset parent, see #12139" ); + + div.remove(); +}); + +test("fractions (see #7730 and #7885)", function() { + expect(2); + + jQuery("body").append("
"); + + var expected = { "top": 1000, "left": 1000 }; + var div = jQuery("#fractions"); + + div.css({ + "position": "absolute", + "left": "1000.7432222px", + "top": "1000.532325px", + "width": 100, + "height": 100 + }); + + div.offset(expected); + + var result = div.offset(); + + equal( result.top, expected.top, "Check top" ); + equal( result.left, expected.left, "Check left" ); + + div.remove(); +}); + +})(); diff --git a/public/vendor/jquery/test/unit/queue.js b/public/vendor/jquery/test/unit/queue.js new file mode 100644 index 000000000000..9cecad7a53bd --- /dev/null +++ b/public/vendor/jquery/test/unit/queue.js @@ -0,0 +1,316 @@ +module( "queue", { teardown: moduleTeardown }); + +test( "queue() with other types", 14, function() { + var counter = 0; + + stop(); + + var $div = jQuery({}), + defer; + $div.promise( "foo" ).done(function() { + equal( counter, 0, "Deferred for collection with no queue is automatically resolved" ); + }); + + $div + .queue("foo",function(){ + equal( ++counter, 1, "Dequeuing" ); + jQuery.dequeue(this,"foo"); + }) + .queue("foo",function(){ + equal( ++counter, 2, "Dequeuing" ); + jQuery(this).dequeue("foo"); + }) + .queue("foo",function(){ + equal( ++counter, 3, "Dequeuing" ); + }) + .queue("foo",function(){ + equal( ++counter, 4, "Dequeuing" ); + }); + + defer = $div.promise("foo").done(function() { + equal( counter, 4, "Testing previous call to dequeue in deferred" ); + start(); + }); + + equal( $div.queue("foo").length, 4, "Testing queue length" ); + + equal( $div.queue("foo", undefined).queue("foo").length, 4, ".queue('name',undefined) does nothing but is chainable (#5571)"); + + $div.dequeue("foo"); + + equal( counter, 3, "Testing previous call to dequeue" ); + equal( $div.queue("foo").length, 1, "Testing queue length" ); + + $div.dequeue("foo"); + + equal( counter, 4, "Testing previous call to dequeue" ); + equal( $div.queue("foo").length, 0, "Testing queue length" ); + + $div.dequeue("foo"); + + equal( counter, 4, "Testing previous call to dequeue" ); + equal( $div.queue("foo").length, 0, "Testing queue length" ); + +}); + +test("queue(name) passes in the next item in the queue as a parameter", function() { + expect(2); + + var div = jQuery({}); + var counter = 0; + + div.queue("foo", function(next) { + equal(++counter, 1, "Dequeueing"); + next(); + }).queue("foo", function(next) { + equal(++counter, 2, "Next was called"); + next(); + }).queue("bar", function() { + equal(++counter, 3, "Other queues are not triggered by next()"); + }); + + div.dequeue("foo"); +}); + +test("queue() passes in the next item in the queue as a parameter to fx queues", function() { + expect(3); + stop(); + + var div = jQuery({}); + var counter = 0; + + div.queue(function(next) { + equal(++counter, 1, "Dequeueing"); + var self = this; + setTimeout(function() { next(); }, 500); + }).queue(function(next) { + equal(++counter, 2, "Next was called"); + next(); + }).queue("bar", function() { + equal(++counter, 3, "Other queues are not triggered by next()"); + }); + + jQuery.when( div.promise("fx"), div ).done(function() { + equal(counter, 2, "Deferreds resolved"); + start(); + }); +}); + +test("callbacks keep their place in the queue", function() { + expect(5); + stop(); + var div = jQuery("
"), + counter = 0; + + div.queue(function( next ) { + equal( ++counter, 1, "Queue/callback order: first called" ); + setTimeout( next, 200 ); + }).delay( 100 ).queue(function( next ) { + equal( ++counter, 2, "Queue/callback order: second called" ); + jQuery( this ).delay( 100 ).queue(function( next ) { + equal( ++counter, 4, "Queue/callback order: fourth called" ); + next(); + }); + next(); + }).queue(function( next ) { + equal( ++counter, 3, "Queue/callback order: third called" ); + next(); + }); + + div.promise("fx").done(function() { + equal(counter, 4, "Deferreds resolved"); + start(); + }); +}); + +test("delay()", function() { + expect(2); + stop(); + + var foo = jQuery({}), run = 0; + + foo.delay(100).queue(function(){ + run = 1; + ok( true, "The function was dequeued." ); + start(); + }); + + equal( run, 0, "The delay delayed the next function from running." ); +}); + +test("clearQueue(name) clears the queue", function() { + expect(2); + + stop(); + + var div = jQuery({}); + var counter = 0; + + div.queue("foo", function(next) { + counter++; + jQuery(this).clearQueue("foo"); + next(); + }).queue("foo", function(next) { + counter++; + }); + + div.promise("foo").done(function() { + ok( true, "dequeue resolves the deferred" ); + start(); + }); + + div.dequeue("foo"); + + equal(counter, 1, "the queue was cleared"); +}); + +test("clearQueue() clears the fx queue", function() { + expect(1); + + var div = jQuery({}); + var counter = 0; + + div.queue(function(next) { + counter++; + var self = this; + setTimeout(function() { jQuery(self).clearQueue(); next(); }, 50); + }).queue(function(next) { + counter++; + }); + + equal(counter, 1, "the queue was cleared"); + + div.removeData(); +}); + +asyncTest( "fn.promise() - called when fx queue is empty", 3, function() { + var foo = jQuery( "#foo" ).clone().andSelf(), + promised = false; + + foo.queue( function( next ) { + // called twice! + ok( !promised, "Promised hasn't been called" ); + setTimeout( next, 10 ); + }); + foo.promise().done( function() { + ok( promised = true, "Promised" ); + start(); + }); +}); + +asyncTest( "fn.promise( \"queue\" ) - called whenever last queue function is dequeued", 5, function() { + var foo = jQuery( "#foo" ), + test; + foo.promise( "queue" ).done( function() { + strictEqual( test, undefined, "called immediately when queue was already empty" ); + }); + test = 1; + foo.queue( "queue", function( next ) { + strictEqual( test++, 1, "step one" ); + setTimeout( next, 0 ); + }).queue( "queue", function( next ) { + strictEqual( test++, 2, "step two" ); + setTimeout( function() { + next(); + strictEqual( test++, 4, "step four" ); + start(); + }, 10 ); + }).promise( "queue" ).done( function() { + strictEqual( test++, 3, "step three" ); + }); + + foo.dequeue( "queue" ); +}); + +asyncTest( "fn.promise( \"queue\" ) - waits for animation to complete before resolving", 2, function() { + var foo = jQuery( "#foo" ), + test = 1; + + foo.animate({ + top: 100 + }, { + duration: 1, + queue: "queue", + complete: function() { + strictEqual( test++, 1, "step one" ); + } + }).dequeue( "queue" ); + + foo.promise( "queue" ).done( function() { + strictEqual( test++, 2, "step two" ); + start(); + }); + +}); + +test( ".promise(obj)", function() { + expect(2); + + var obj = {}; + var promise = jQuery( "#foo" ).promise( "promise", obj ); + + ok( jQuery.isFunction( promise.promise ), ".promise(type, obj) returns a promise" ); + strictEqual( promise, obj, ".promise(type, obj) returns obj" ); +}); + + +if ( jQuery.fn.stop ) { + test("delay() can be stopped", function() { + expect( 3 ); + stop(); + + var done = {}; + jQuery({}) + .queue( "alternate", function( next ) { + done.alt1 = true; + ok( true, "This first function was dequeued" ); + next(); + }) + .delay( 1000, "alternate" ) + .queue( "alternate", function() { + done.alt2 = true; + ok( true, "The function was dequeued immediately, the delay was stopped" ); + }) + .dequeue( "alternate" ) + + // stop( "alternate", false ) will NOT clear the queue, so it should automatically dequeue the next + .stop( "alternate", false, false ) + + // this test + .delay( 1 ) + .queue(function() { + done.default1 = true; + ok( false, "This queue should never run" ); + }) + + // stop( clearQueue ) should clear the queue + .stop( true, false ); + + deepEqual( done, { alt1: true, alt2: true }, "Queue ran the proper functions" ); + + setTimeout(function() { + start(); + }, 1500 ); + }); + + asyncTest( "queue stop hooks", 2, function() { + var foo = jQuery( "#foo" ); + + foo.queue( function( next, hooks ) { + hooks.stop = function( gotoEnd ) { + equal( !!gotoEnd, false, "Stopped without gotoEnd" ); + }; + }); + foo.stop(); + + foo.queue( function( next, hooks ) { + hooks.stop = function( gotoEnd ) { + equal( gotoEnd, true, "Stopped with gotoEnd" ); + start(); + }; + }); + + foo.stop( false, true ); + }); + +} // if ( jQuery.fn.stop ) diff --git a/public/vendor/jquery/test/unit/selector.js b/public/vendor/jquery/test/unit/selector.js new file mode 100644 index 000000000000..07e563da3af7 --- /dev/null +++ b/public/vendor/jquery/test/unit/selector.js @@ -0,0 +1,185 @@ +module("selector", { teardown: moduleTeardown }); + +/** + * This test page is for selector tests that require jQuery in order to do the selection + */ + +test("element - jQuery only", function() { + expect( 7 ); + + var fixture = document.getElementById("qunit-fixture"); + + deepEqual( jQuery("p", fixture).get(), q("firstp","ap","sndp","en","sap","first"), "Finding elements with a Node context." ); + deepEqual( jQuery("p", "#qunit-fixture").get(), q("firstp","ap","sndp","en","sap","first"), "Finding elements with a selector context." ); + deepEqual( jQuery("p", jQuery("#qunit-fixture")).get(), q("firstp","ap","sndp","en","sap","first"), "Finding elements with a jQuery object context." ); + deepEqual( jQuery("#qunit-fixture").find("p").get(), q("firstp","ap","sndp","en","sap","first"), "Finding elements with a context via .find()." ); + + ok( jQuery("#length").length, " cannot be found under IE, see #945" ); + ok( jQuery("#lengthtest input").length, " cannot be found under IE, see #945" ); + + // #7533 + equal( jQuery("

foo

").find("p").length, 1, "Find where context root is a node and has an ID with CSS3 meta characters" ); +}); + +test("class - jQuery only", function() { + expect( 4 ); + + deepEqual( jQuery(".blog", document.getElementsByTagName("p")).get(), q("mark", "simon"), "Finding elements with a context." ); + deepEqual( jQuery(".blog", "p").get(), q("mark", "simon"), "Finding elements with a context." ); + deepEqual( jQuery(".blog", jQuery("p")).get(), q("mark", "simon"), "Finding elements with a context." ); + deepEqual( jQuery("p").find(".blog").get(), q("mark", "simon"), "Finding elements with a context." ); +}); + +test("attributes - jQuery only", function() { + expect( 6 ); + + t( "Find elements with a tabindex attribute", "[tabindex]", ["listWithTabIndex", "foodWithNegativeTabIndex", "linkWithTabIndex", "linkWithNegativeTabIndex", "linkWithNoHrefWithTabIndex", "linkWithNoHrefWithNegativeTabIndex"] ); + + // #12523 + deepEqual( + jQuery.find( "[title]", null, null, jQuery("#qunit-fixture a").get().concat( document.createTextNode("") ) ), + q("google"), + "Text nodes fail attribute tests without exception" + ); + + // #12600 + ok( + jQuery("") + .prop( "value", "option" ) + .is(":input[value='12600']"), + + ":input[value=foo] selects select by attribute" + ); + ok( jQuery("").prop( "value", "option" ).is(":input[value='12600']"), + ":input[value=foo] selects text input by attribute" + ); + + // #11115 + ok( jQuery("").prop( "checked", false ).is("[checked]"), + "[checked] selects by attribute (positive)" + ); + ok( !jQuery("").prop( "checked", true ).is("[checked]"), + "[checked] selects by attribute (negative)" + ); +}); + +test("disconnected nodes", function() { + expect( 4 ); + var $opt = jQuery("").attr("value", "whipit").appendTo("#qunit-fixture").detach(); + equal( $opt.val(), "whipit", "option value" ); + equal( $opt.is(":selected"), false, "unselected option" ); + $opt.prop("selected", true); + equal( $opt.is(":selected"), true, "selected option" ); + + var $div = jQuery("
"); + equal( $div.is("div"), true, "Make sure .is('nodeName') works on disconnected nodes." ); +}); + +test("jQuery only - broken", 1, function() { + raises(function() { + // Setting context to null here somehow avoids QUnit's window.error handling + // making the e & e.message correct + // For whatever reason, without this, + // Sizzle.error will be called but no error will be seen in oldIE + jQuery.call( null, "
" ); + }, function( e ) { + return e.message.indexOf("Syntax error") >= 0; + }, "leading space invalid: $('
')" ); +}); + +testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQuery, window, document ) { + expect( 35 ); + + /** + * Returns an array of elements with the given IDs + * q & t are added here for the iFrame's context + */ + function q() { + var r = [], + i = 0; + + for ( ; i < arguments.length; i++ ) { + r.push( document.getElementById( arguments[i] ) ); + } + return r; + } + + /** + * Asserts that a select matches the given IDs + * @example t("Check for something", "//[a]", ["foo", "baar"]); + * @param {String} a - Assertion name + * @param {String} b - Sizzle selector + * @param {Array} c - Array of ids to construct what is expected + */ + function t( a, b, c ) { + var f = jQuery(b).get(), + s = "", + i = 0; + + for ( ; i < f.length; i++ ) { + s += (s && ",") + "'" + f[i].id + "'"; + } + + deepEqual(f, q.apply( q, c ), a + " (" + b + ")"); + } + + // ====== All known boolean attributes, including html5 booleans ====== + // autobuffer, autofocus, autoplay, async, checked, + // compact, controls, declare, defer, disabled, + // formnovalidate, hidden, indeterminate (property only), + // ismap, itemscope, loop, multiple, muted, nohref, noresize, + // noshade, nowrap, novalidate, open, pubdate, readonly, required, + // reversed, scoped, seamless, selected, truespeed, visible (skipping visible attribute, which is on a barprop object) + + t( "Attribute Exists", "[autobuffer]", ["video1"]); + t( "Attribute Exists", "[autofocus]", ["text1"]); + t( "Attribute Exists", "[autoplay]", ["video1"]); + t( "Attribute Exists", "[async]", ["script1"]); + t( "Attribute Exists", "[checked]", ["check1"]); + t( "Attribute Exists", "[compact]", ["dl"]); + t( "Attribute Exists", "[controls]", ["video1"]); + t( "Attribute Exists", "[declare]", ["object1"]); + t( "Attribute Exists", "[defer]", ["script1"]); + t( "Attribute Exists", "[disabled]", ["check1"]); + t( "Attribute Exists", "[formnovalidate]", ["form1"]); + t( "Attribute Exists", "[hidden]", ["div1"]); + t( "Attribute Exists", "[indeterminate]", []); + t( "Attribute Exists", "[ismap]", ["img1"]); + t( "Attribute Exists", "[itemscope]", ["div1"]); + // t( "Attribute Exists", "[loop]", ["video1"]); // IE 6/7 cannot differentiate here. loop is also used on img, input, and marquee tags as well as video/audio. getAttributeNode unfortunately also retrieves the property value. + t( "Attribute Exists", "[multiple]", ["select1"]); + t( "Attribute Exists", "[muted]", ["audio1"]); + // t( "Attribute Exists", "[nohref]", ["area1"]); // IE 6/7 keep this set to false regardless of presence. The attribute node is not retrievable. + t( "Attribute Exists", "[noresize]", ["textarea1"]); + t( "Attribute Exists", "[noshade]", ["hr1"]); + t( "Attribute Exists", "[nowrap]", ["td1", "div1"]); + t( "Attribute Exists", "[novalidate]", ["form1"]); + t( "Attribute Exists", "[open]", ["details1"]); + t( "Attribute Exists", "[pubdate]", ["article1"]); + t( "Attribute Exists", "[readonly]", ["text1"]); + t( "Attribute Exists", "[required]", ["text1"]); + t( "Attribute Exists", "[reversed]", ["ol1"]); + t( "Attribute Exists", "[scoped]", ["style1"]); + t( "Attribute Exists", "[seamless]", ["iframe1"]); + t( "Attribute Exists", "[selected]", ["option1"]); + t( "Attribute Exists", "[truespeed]", ["marquee1"]); + + // Enumerated attributes (these are not boolean content attributes) + jQuery.expandedEach = jQuery.each; + jQuery.expandedEach([ "draggable", "contenteditable", "aria-disabled" ], function( i, val ) { + t( "Enumerated attribute", "[" + val + "]", ["div1"]); + }); + t( "Enumerated attribute", "[spellcheck]", ["span1"]); + + // t( "tabindex selector does not retrieve all elements in IE6/7(#8473)", "form, [tabindex]", ["form1", "text1"] ); // sigh, FF12 QSA mistakenly includes video elements even though they have no tabindex attribute (see https://bugzilla.mozilla.org/show_bug.cgi?id=618737) + t( "Improperly named form elements do not interfere with form selections (#9570)", "form[name='formName']", ["form1"] ); +}); + +testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) { + var $cached = window["$cached"]; + + expect(3); + deepEqual( $cached(".test a").get(), [ document.getElementById("collision") ], "Select collision anchor with first sizzle" ); + equal( jQuery(".evil a").length, 0, "Select nothing with second sizzle" ); + equal( jQuery(".evil a").length, 0, "Select nothing again with second sizzle" ); +}); diff --git a/public/vendor/jquery/test/unit/serialize.js b/public/vendor/jquery/test/unit/serialize.js new file mode 100644 index 000000000000..eff2a0086921 --- /dev/null +++ b/public/vendor/jquery/test/unit/serialize.js @@ -0,0 +1,146 @@ +module("serialize", { teardown: moduleTeardown }); + +test("jQuery.param()", function() { + expect(22); + + equal( !( jQuery.ajaxSettings && jQuery.ajaxSettings.traditional ), true, "traditional flag, falsy by default" ); + + var params = {"foo":"bar", "baz":42, "quux":"All your base are belong to us"}; + equal( jQuery.param(params), "foo=bar&baz=42&quux=All+your+base+are+belong+to+us", "simple" ); + + params = {"string":"foo","null":null,"undefined":undefined}; + equal( jQuery.param(params), "string=foo&null=&undefined=", "handle nulls and undefineds properly" ); + + params = {"someName": [1, 2, 3], "regularThing": "blah" }; + equal( jQuery.param(params), "someName%5B%5D=1&someName%5B%5D=2&someName%5B%5D=3®ularThing=blah", "with array" ); + + params = {"foo": ["a", "b", "c"]}; + equal( jQuery.param(params), "foo%5B%5D=a&foo%5B%5D=b&foo%5B%5D=c", "with array of strings" ); + + params = {"foo": ["baz", 42, "All your base are belong to us"] }; + equal( jQuery.param(params), "foo%5B%5D=baz&foo%5B%5D=42&foo%5B%5D=All+your+base+are+belong+to+us", "more array" ); + + params = {"foo": { "bar": "baz", "beep": 42, "quux": "All your base are belong to us" } }; + equal( jQuery.param(params), "foo%5Bbar%5D=baz&foo%5Bbeep%5D=42&foo%5Bquux%5D=All+your+base+are+belong+to+us", "even more arrays" ); + + params = { a:[1,2], b:{ c:3, d:[4,5], e:{ x:[6], y:7, z:[8,9] }, f:true, g:false, h:undefined }, i:[10,11], j:true, k:false, l:[undefined,0], m:"cowboy hat?" }; + equal( decodeURIComponent( jQuery.param(params) ), "a[]=1&a[]=2&b[c]=3&b[d][]=4&b[d][]=5&b[e][x][]=6&b[e][y]=7&b[e][z][]=8&b[e][z][]=9&b[f]=true&b[g]=false&b[h]=&i[]=10&i[]=11&j=true&k=false&l[]=&l[]=0&m=cowboy+hat?", "huge structure" ); + + params = { "a": [ 0, [ 1, 2 ], [ 3, [ 4, 5 ], [ 6 ] ], { "b": [ 7, [ 8, 9 ], [ { "c": 10, "d": 11 } ], [ [ 12 ] ], [ [ [ 13 ] ] ], { "e": { "f": { "g": [ 14, [ 15 ] ] } } }, 16 ] }, 17 ] }; + equal( decodeURIComponent( jQuery.param(params) ), "a[]=0&a[1][]=1&a[1][]=2&a[2][]=3&a[2][1][]=4&a[2][1][]=5&a[2][2][]=6&a[3][b][]=7&a[3][b][1][]=8&a[3][b][1][]=9&a[3][b][2][0][c]=10&a[3][b][2][0][d]=11&a[3][b][3][0][]=12&a[3][b][4][0][0][]=13&a[3][b][5][e][f][g][]=14&a[3][b][5][e][f][g][1][]=15&a[3][b][]=16&a[]=17", "nested arrays" ); + + params = { "a":[1,2], "b":{ "c":3, "d":[4,5], "e":{ "x":[6], "y":7, "z":[8,9] }, "f":true, "g":false, "h":undefined }, "i":[10,11], "j":true, "k":false, "l":[undefined,0], "m":"cowboy hat?" }; + equal( jQuery.param(params,true), "a=1&a=2&b=%5Bobject+Object%5D&i=10&i=11&j=true&k=false&l=&l=0&m=cowboy+hat%3F", "huge structure, forced traditional" ); + + equal( decodeURIComponent( jQuery.param({ "a": [1,2,3], "b[]": [4,5,6], "c[d]": [7,8,9], "e": { "f": [10], "g": [11,12], "h": 13 } }) ), "a[]=1&a[]=2&a[]=3&b[]=4&b[]=5&b[]=6&c[d][]=7&c[d][]=8&c[d][]=9&e[f][]=10&e[g][]=11&e[g][]=12&e[h]=13", "Make sure params are not double-encoded." ); + + // #7945 + equal( jQuery.param({"jquery": "1.4.2"}), "jquery=1.4.2", "Check that object with a jQuery property get serialized correctly" ); + + var settings = { traditional: true }; + + if ( jQuery.ajaxSettings ) { + jQuery.ajaxSetup( settings ); + } else { + jQuery.ajaxSettings = settings; + } + + params = {"foo":"bar", "baz":42, "quux":"All your base are belong to us"}; + equal( jQuery.param(params), "foo=bar&baz=42&quux=All+your+base+are+belong+to+us", "simple" ); + + params = {"someName": [1, 2, 3], "regularThing": "blah" }; + equal( jQuery.param(params), "someName=1&someName=2&someName=3®ularThing=blah", "with array" ); + + params = {"foo": ["a", "b", "c"]}; + equal( jQuery.param(params), "foo=a&foo=b&foo=c", "with array of strings" ); + + params = {"foo[]":["baz", 42, "All your base are belong to us"]}; + equal( jQuery.param(params), "foo%5B%5D=baz&foo%5B%5D=42&foo%5B%5D=All+your+base+are+belong+to+us", "more array" ); + + params = {"foo[bar]":"baz", "foo[beep]":42, "foo[quux]":"All your base are belong to us"}; + equal( jQuery.param(params), "foo%5Bbar%5D=baz&foo%5Bbeep%5D=42&foo%5Bquux%5D=All+your+base+are+belong+to+us", "even more arrays" ); + + params = { a:[1,2], b:{ c:3, d:[4,5], e:{ x:[6], y:7, z:[8,9] }, f:true, g:false, h:undefined }, i:[10,11], j:true, k:false, l:[undefined,0], m:"cowboy hat?" }; + equal( jQuery.param(params), "a=1&a=2&b=%5Bobject+Object%5D&i=10&i=11&j=true&k=false&l=&l=0&m=cowboy+hat%3F", "huge structure" ); + + params = { "a": [ 0, [ 1, 2 ], [ 3, [ 4, 5 ], [ 6 ] ], { "b": [ 7, [ 8, 9 ], [ { "c": 10, d: 11 } ], [ [ 12 ] ], [ [ [ 13 ] ] ], { "e": { "f": { "g": [ 14, [ 15 ] ] } } }, 16 ] }, 17 ] }; + equal( jQuery.param(params), "a=0&a=1%2C2&a=3%2C4%2C5%2C6&a=%5Bobject+Object%5D&a=17", "nested arrays (not possible when jQuery.param.traditional == true)" ); + + params = { a:[1,2], b:{ c:3, d:[4,5], e:{ x:[6], y:7, z:[8,9] }, f:true, g:false, h:undefined }, i:[10,11], j:true, k:false, l:[undefined,0], m:"cowboy hat?" }; + equal( decodeURIComponent( jQuery.param(params,false) ), "a[]=1&a[]=2&b[c]=3&b[d][]=4&b[d][]=5&b[e][x][]=6&b[e][y]=7&b[e][z][]=8&b[e][z][]=9&b[f]=true&b[g]=false&b[h]=&i[]=10&i[]=11&j=true&k=false&l[]=&l[]=0&m=cowboy+hat?", "huge structure, forced not traditional" ); + + params = { "param1": null }; + equal( jQuery.param(params,false), "param1=", "Make sure that null params aren't traversed." ); + + params = {"test": {"length": 3, "foo": "bar"} }; + equal( jQuery.param( params, false ), "test%5Blength%5D=3&test%5Bfoo%5D=bar", "Sub-object with a length property" ); + + if ( jQuery.ajaxSettings === settings ) { + delete jQuery.ajaxSettings; + } else { + jQuery.ajaxSetup({ traditional: false }); + } +}); + +test("jQuery.param() Constructed prop values", function() { + expect( 4 ); + + /** @constructor */ + function Record() { + this["prop"] = "val"; + } + + var MyString = String, + MyNumber = Number, + params = { "test": new MyString("foo") }; + + equal( jQuery.param( params, false ), "test=foo", "Do not mistake new String() for a plain object" ); + + params = { "test": new MyNumber(5) }; + equal( jQuery.param( params, false ), "test=5", "Do not mistake new Number() for a plain object" ); + + params = { "test": new Date() }; + ok( jQuery.param( params, false ), "(Non empty string returned) Do not mistake new Date() for a plain object" ); + + // should allow non-native constructed objects + params = { "test": new Record() }; + equal( jQuery.param( params, false ), jQuery.param({ "test": { "prop": "val" } }), "Allow non-native constructed objects" ); +}); + +test("serialize()", function() { + expect(5); + + // Add html5 elements only for serialize because selector can't yet find them on non-html5 browsers + jQuery("#search").after( + "" + + "" + + "" + ); + + equal( jQuery("#form").serialize(), + "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3", + "Check form serialization as query string"); + + equal( jQuery("#form :input").serialize(), + "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3", + "Check input serialization as query string"); + + equal( jQuery("#testForm").serialize(), + "T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", + "Check form serialization as query string"); + + equal( jQuery("#testForm :input").serialize(), + "T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", + "Check input serialization as query string"); + + equal( jQuery("#form, #testForm").serialize(), + "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", + "Multiple form serialization as query string"); + + /* Temporarily disabled. Opera 10 has problems with form serialization. + equal( jQuery("#form, #testForm :input").serialize(), + "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=", + "Mixed form/input serialization as query string"); + */ + jQuery("#html5email, #html5number").remove(); +}); diff --git a/public/vendor/jquery/test/unit/support.js b/public/vendor/jquery/test/unit/support.js new file mode 100644 index 000000000000..60a6582610e3 --- /dev/null +++ b/public/vendor/jquery/test/unit/support.js @@ -0,0 +1,384 @@ +module("support", { teardown: moduleTeardown }); + +test("boxModel", function() { + expect( 1 ); + + equal( jQuery.support.boxModel, document.compatMode === "CSS1Compat" , "jQuery.support.boxModel is sort of tied to quirks mode but unstable since 1.8" ); +}); + +test( "zoom of doom (#13089)", function() { + expect( 1 ); + + if ( jQuery.support.inlineBlockNeedsLayout ) { + ok( document.body.style.zoom, "Added a zoom to the body (#11048, #12869)" ); + } else { + ok( !document.body.style.zoom, "No zoom added to the body" ); + } +}); +if ( jQuery.css ) { + testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) { + expect( 2 ); + var i, + passed = true, + okValue = { + "#000000": true, + "rgb(0, 0, 0)": true + }; + ok( okValue[ color ], "color was not reset (" + color + ")" ); + + for ( i in jQuery.support ) { + if ( jQuery.support[ i ] !== support[ i ] ) { + passed = false; + strictEqual( jQuery.support[ i ], support[ i ], "Support property " + i + " is different" ); + } + } + for ( i in support ) { + if ( !( i in jQuery.support ) ) { + passed = false; + strictEqual( jQuery.support[ i ], support[ i ], "Unexpected property: " + i ); + } + } + + ok( passed, "Same support properties" ); + }); +} + +testIframeWithCallback( "A background on the testElement does not cause IE8 to crash (#9823)", "support/testElementCrash.html", function() { + expect(1); + ok( true, "IE8 does not crash" ); +}); + +testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlocks", "support/shrinkWrapBlocks.html", function( shrinkWrapBlocks ) { + expect( 1 ); + strictEqual( shrinkWrapBlocks, jQuery.support.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" ); +}); + +(function() { + var expected, + userAgent = window.navigator.userAgent; + + // These tests do not have to stay + // They are here to help with upcoming support changes for 1.8 + if ( /chrome/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":true, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":false, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":true, + "optDisabled":true, + "radioValue":true, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } else if ( /opera.*version\/12\.1/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":true, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":false, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":true, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } else if ( /msie 10\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":false, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":true, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": false + }; + } else if ( /msie 9\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":false, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":true, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":false, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": false + }; + } else if ( /msie 8\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":false, + "tbody":true, + "htmlSerialize":false, + "style":false, + "hrefNormalized":true, + "opacity":false, + "cssFloat":false, + "checkOn":true, + "optSelected":false, + "getSetAttribute":true, + "enctype":true, + "html5Clone":false, + "submitBubbles":false, + "changeBubbles":false, + "focusinBubbles":true, + "deleteExpando":false, + "noCloneEvent":false, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":false, + "ajax":true, + "cors":false, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } else if ( /msie 7\.0/i.test( userAgent ) ) { + expected = { + "ajax": true, + "appendChecked": false, + "boxModel": true, + "changeBubbles": false, + "checkClone": false, + "checkOn": true, + "cors": false, + "cssFloat": false, + "deleteExpando": false, + "doesNotIncludeMarginInBodyOffset": true, + "enctype": true, + "focusinBubbles": true, + "getSetAttribute": false, + "hrefNormalized": false, + "html5Clone": false, + "htmlSerialize": false, + "inlineBlockNeedsLayout": true, + "leadingWhitespace": false, + "noCloneChecked": false, + "noCloneEvent": false, + "opacity": false, + "optDisabled": true, + "optSelected": false, + "radioValue": false, + "reliableHiddenOffsets": false, + "reliableMarginRight": true, + "shrinkWrapBlocks": false, + "submitBubbles": false, + "tbody": false, + "style": false, + "clearCloneStyle": true + }; + } else if ( /msie 6\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":false, + "tbody":false, + "htmlSerialize":false, + "style":false, + "hrefNormalized":false, + "opacity":false, + "cssFloat":false, + "checkOn":true, + "optSelected":false, + "getSetAttribute":false, + "enctype":true, + "html5Clone":false, + "submitBubbles":false, + "changeBubbles":false, + "focusinBubbles":true, + "deleteExpando":false, + "noCloneEvent":false, + "inlineBlockNeedsLayout":true, + "shrinkWrapBlocks":true, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":false, + "appendChecked":false, + "boxModel":true, + "reliableHiddenOffsets":false, + "ajax":true, + "cors":false, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } else if ( /5\.1\.1 safari/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":false, + "optSelected":true, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":false, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":true, + "optDisabled":true, + "radioValue":true, + "checkClone":false, + "appendChecked":false, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } else if ( /firefox/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":true, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":false, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":true, + "optDisabled":true, + "radioValue":true, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true, + "clearCloneStyle": true + }; + } + + if ( expected ) { + test("Verify that the support tests resolve as expected per browser", function() { + expect( 31 ); + + for ( var i in expected ) { + if ( jQuery.ajax || i !== "ajax" && i !== "cors" ) { + equal( jQuery.support[i], expected[i], "jQuery.support['" + i + "']: " + jQuery.support[i] + ", expected['" + i + "']: " + expected[i]); + } else { + ok( true, "no ajax; skipping jQuery.support['" + i + "']" ); + } + } + }); + } + +})(); diff --git a/public/vendor/jquery/test/unit/traversing.js b/public/vendor/jquery/test/unit/traversing.js new file mode 100644 index 000000000000..94ee061dc01d --- /dev/null +++ b/public/vendor/jquery/test/unit/traversing.js @@ -0,0 +1,667 @@ +module("traversing", { teardown: moduleTeardown }); + +test( "find(String)", function() { + expect( 7 ); + equal( "Yahoo", jQuery("#foo").find(".blogTest").text(), "Check for find" ); + + // using contents will get comments regular, text, and comment nodes + var j = jQuery("#nonnodes").contents(); + equal( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" ); + equal( j.find("div").andSelf().length, 3, "Check node,textnode,comment to find zero divs, but preserves pushStack" ); + + deepEqual( jQuery("#qunit-fixture").find("> div").get(), q( "foo", "nothiddendiv", "moretests", "tabindex-tests", "liveHandlerOrder", "siblingTest", "fx-test-group" ), "find child elements" ); + deepEqual( jQuery("#qunit-fixture").find("> #foo, > #moretests").get(), q( "foo", "moretests" ), "find child elements" ); + deepEqual( jQuery("#qunit-fixture").find("> #foo > p").get(), q( "sndp", "en", "sap" ), "find child elements" ); + + deepEqual( jQuery("#siblingTest, #siblingfirst").find("+ *").get(), q( "siblingnext", "fx-test-group" ), "ensure document order" ); +}); + +test( "find(node|jQuery object)", function() { + expect( 12 ); + + var $foo = jQuery("#foo"), + $blog = jQuery(".blogTest"), + $first = jQuery("#first"), + $two = $blog.add( $first ), + $fooTwo = $foo.add( $blog ); + + equal( $foo.find( $blog ).text(), "Yahoo", "Find with blog jQuery object" ); + equal( $foo.find( $blog[ 0 ] ).text(), "Yahoo", "Find with blog node" ); + equal( $foo.find( $first ).length, 0, "#first is not in #foo" ); + equal( $foo.find( $first[ 0 ]).length, 0, "#first not in #foo (node)" ); + ok( $foo.find( $two ).is(".blogTest"), "Find returns only nodes within #foo" ); + ok( $fooTwo.find( $blog ).is(".blogTest"), "Blog is part of the collection, but also within foo" ); + ok( $fooTwo.find( $blog[ 0 ] ).is(".blogTest"), "Blog is part of the collection, but also within foo(node)" ); + + equal( $two.find( $foo ).length, 0, "Foo is not in two elements" ); + equal( $two.find( $foo[ 0 ] ).length, 0, "Foo is not in two elements(node)" ); + equal( $two.find( $first ).length, 0, "first is in the collection and not within two" ); + equal( $two.find( $first ).length, 0, "first is in the collection and not within two(node)" ); + + equal( $two.find( $foo[ 0 ] ).andSelf().length, 2, "find preserves the pushStack, see #12009" ); +}); + +test("is(String|undefined)", function() { + expect(30); + ok( jQuery("#form").is("form"), "Check for element: A form must be a form" ); + ok( !jQuery("#form").is("div"), "Check for element: A form is not a div" ); + ok( jQuery("#mark").is(".blog"), "Check for class: Expected class 'blog'" ); + ok( !jQuery("#mark").is(".link"), "Check for class: Did not expect class 'link'" ); + ok( jQuery("#simon").is(".blog.link"), "Check for multiple classes: Expected classes 'blog' and 'link'" ); + ok( !jQuery("#simon").is(".blogTest"), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" ); + ok( jQuery("#en").is("[lang=\"en\"]"), "Check for attribute: Expected attribute lang to be 'en'" ); + ok( !jQuery("#en").is("[lang=\"de\"]"), "Check for attribute: Expected attribute lang to be 'en', not 'de'" ); + ok( jQuery("#text1").is("[type=\"text\"]"), "Check for attribute: Expected attribute type to be 'text'" ); + ok( !jQuery("#text1").is("[type=\"radio\"]"), "Check for attribute: Expected attribute type to be 'text', not 'radio'" ); + ok( jQuery("#text2").is(":disabled"), "Check for pseudoclass: Expected to be disabled" ); + ok( !jQuery("#text1").is(":disabled"), "Check for pseudoclass: Expected not disabled" ); + ok( jQuery("#radio2").is(":checked"), "Check for pseudoclass: Expected to be checked" ); + ok( !jQuery("#radio1").is(":checked"), "Check for pseudoclass: Expected not checked" ); + ok( jQuery("#foo").is(":has(p)"), "Check for child: Expected a child 'p' element" ); + ok( !jQuery("#foo").is(":has(ul)"), "Check for child: Did not expect 'ul' element" ); + ok( jQuery("#foo").is(":has(p):has(a):has(code)"), "Check for childs: Expected 'p', 'a' and 'code' child elements" ); + ok( !jQuery("#foo").is(":has(p):has(a):has(code):has(ol)"), "Check for childs: Expected 'p', 'a' and 'code' child elements, but no 'ol'" ); + + ok( !jQuery("#foo").is(0), "Expected false for an invalid expression - 0" ); + ok( !jQuery("#foo").is(null), "Expected false for an invalid expression - null" ); + ok( !jQuery("#foo").is(""), "Expected false for an invalid expression - \"\"" ); + ok( !jQuery("#foo").is(undefined), "Expected false for an invalid expression - undefined" ); + ok( !jQuery("#foo").is({ plain: "object" }), "Check passing invalid object" ); + + // test is() with comma-seperated expressions + ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); + ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" ); + + ok( !jQuery(window).is("a"), "Checking is on a window does not throw an exception(#10178)" ); + ok( !jQuery(document).is("a"), "Checking is on a document does not throw an exception(#10178)" ); + + ok( jQuery("#option1b").is("#select1 option:not(:first)"), "POS inside of :not() (#10970)" ); +}); + +test("is(jQuery)", function() { + expect(21); + ok( jQuery("#form").is( jQuery("form") ), "Check for element: A form is a form" ); + ok( !jQuery("#form").is( jQuery("div") ), "Check for element: A form is not a div" ); + ok( jQuery("#mark").is( jQuery(".blog") ), "Check for class: Expected class 'blog'" ); + ok( !jQuery("#mark").is( jQuery(".link") ), "Check for class: Did not expect class 'link'" ); + ok( jQuery("#simon").is( jQuery(".blog.link") ), "Check for multiple classes: Expected classes 'blog' and 'link'" ); + ok( !jQuery("#simon").is( jQuery(".blogTest") ), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" ); + ok( jQuery("#en").is( jQuery("[lang=\"en\"]") ), "Check for attribute: Expected attribute lang to be 'en'" ); + ok( !jQuery("#en").is( jQuery("[lang=\"de\"]") ), "Check for attribute: Expected attribute lang to be 'en', not 'de'" ); + ok( jQuery("#text1").is( jQuery("[type=\"text\"]") ), "Check for attribute: Expected attribute type to be 'text'" ); + ok( !jQuery("#text1").is( jQuery("[type=\"radio\"]") ), "Check for attribute: Expected attribute type to be 'text', not 'radio'" ); + ok( !jQuery("#text1").is( jQuery("input:disabled") ), "Check for pseudoclass: Expected not disabled" ); + ok( jQuery("#radio2").is( jQuery("input:checked") ), "Check for pseudoclass: Expected to be checked" ); + ok( !jQuery("#radio1").is( jQuery("input:checked") ), "Check for pseudoclass: Expected not checked" ); + ok( jQuery("#foo").is( jQuery("div:has(p)") ), "Check for child: Expected a child 'p' element" ); + ok( !jQuery("#foo").is( jQuery("div:has(ul)") ), "Check for child: Did not expect 'ul' element" ); + + // Some raw elements + ok( jQuery("#form").is( jQuery("form")[0] ), "Check for element: A form is a form" ); + ok( !jQuery("#form").is( jQuery("div")[0] ), "Check for element: A form is not a div" ); + ok( jQuery("#mark").is( jQuery(".blog")[0] ), "Check for class: Expected class 'blog'" ); + ok( !jQuery("#mark").is( jQuery(".link")[0] ), "Check for class: Did not expect class 'link'" ); + ok( jQuery("#simon").is( jQuery(".blog.link")[0] ), "Check for multiple classes: Expected classes 'blog' and 'link'" ); + ok( !jQuery("#simon").is( jQuery(".blogTest")[0] ), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" ); +}); + +test("is() with positional selectors", function() { + expect(23); + + var html = jQuery( + "

firsttest

" + ).appendTo( "body" ), + isit = function(sel, match, expect) { + equal( jQuery( sel ).is( match ), expect, "jQuery('" + sel + "').is('" + match + "')" ); + }; + + isit( "#posp", "#posp:first", true ); + isit( "#posp", "#posp:eq(2)", false ); + isit( "#posp", "#posp a:first", false ); + + isit( "#posp .firsta", "#posp a:first", true ); + isit( "#posp .firsta", "#posp a:last", false ); + isit( "#posp .firsta", "#posp a:even", true ); + isit( "#posp .firsta", "#posp a:odd", false ); + isit( "#posp .firsta", "#posp a:eq(0)", true ); + isit( "#posp .firsta", "#posp a:eq(9)", false ); + isit( "#posp .firsta", "#posp em:eq(0)", false ); + isit( "#posp .firsta", "#posp em:first", false ); + isit( "#posp .firsta", "#posp:first", false ); + + isit( "#posp .seconda", "#posp a:first", false ); + isit( "#posp .seconda", "#posp a:last", true ); + isit( "#posp .seconda", "#posp a:gt(0)", true ); + isit( "#posp .seconda", "#posp a:lt(5)", true ); + isit( "#posp .seconda", "#posp a:lt(1)", false ); + + isit( "#posp em", "#posp a:eq(0) em", true ); + isit( "#posp em", "#posp a:lt(1) em", true ); + isit( "#posp em", "#posp a:gt(1) em", false ); + isit( "#posp em", "#posp a:first em", true ); + isit( "#posp em", "#posp a em:last", true ); + isit( "#posp em", "#posp a em:eq(2)", false ); + + html.remove(); +}); + +test("index()", function() { + expect( 2 ); + + equal( jQuery("#text2").index(), 2, "Returns the index of a child amongst its siblings" ); + + equal( jQuery("
").index(), -1, "Node without parent returns -1" ); +}); + +test("index(Object|String|undefined)", function() { + expect(16); + + var elements = jQuery([window, document]), + inputElements = jQuery("#radio1,#radio2,#check1,#check2"); + + // Passing a node + equal( elements.index(window), 0, "Check for index of elements" ); + equal( elements.index(document), 1, "Check for index of elements" ); + equal( inputElements.index(document.getElementById("radio1")), 0, "Check for index of elements" ); + equal( inputElements.index(document.getElementById("radio2")), 1, "Check for index of elements" ); + equal( inputElements.index(document.getElementById("check1")), 2, "Check for index of elements" ); + equal( inputElements.index(document.getElementById("check2")), 3, "Check for index of elements" ); + equal( inputElements.index(window), -1, "Check for not found index" ); + equal( inputElements.index(document), -1, "Check for not found index" ); + + // Passing a jQuery object + // enabled since [5500] + equal( elements.index( elements ), 0, "Pass in a jQuery object" ); + equal( elements.index( elements.eq(1) ), 1, "Pass in a jQuery object" ); + equal( jQuery("#form :radio").index( jQuery("#radio2") ), 1, "Pass in a jQuery object" ); + + // Passing a selector or nothing + // enabled since [6330] + equal( jQuery("#text2").index(), 2, "Check for index amongst siblings" ); + equal( jQuery("#form").children().eq(4).index(), 4, "Check for index amongst siblings" ); + equal( jQuery("#radio2").index("#form :radio") , 1, "Check for index within a selector" ); + equal( jQuery("#form :radio").index( jQuery("#radio2") ), 1, "Check for index within a selector" ); + equal( jQuery("#radio2").index("#form :text") , -1, "Check for index not found within a selector" ); +}); + +test("filter(Selector|undefined)", function() { + expect(9); + deepEqual( jQuery("#form input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" ); + deepEqual( jQuery("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" ); + deepEqual( jQuery("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" ); + + deepEqual( jQuery("p").filter(null).get(), [], "filter(null) should return an empty jQuery object"); + deepEqual( jQuery("p").filter(undefined).get(), [], "filter(undefined) should return an empty jQuery object"); + deepEqual( jQuery("p").filter(0).get(), [], "filter(0) should return an empty jQuery object"); + deepEqual( jQuery("p").filter("").get(), [], "filter('') should return an empty jQuery object"); + + // using contents will get comments regular, text, and comment nodes + var j = jQuery("#nonnodes").contents(); + equal( j.filter("span").length, 1, "Check node,textnode,comment to filter the one span" ); + equal( j.filter("[name]").length, 0, "Check node,textnode,comment to filter the one span" ); +}); + +test("filter(Function)", function() { + expect(2); + + deepEqual( jQuery("#qunit-fixture p").filter(function() { + return !jQuery("a", this).length; + }).get(), q("sndp", "first"), "filter(Function)" ); + + deepEqual( jQuery("#qunit-fixture p").filter(function(i, elem) { return !jQuery("a", elem).length; }).get(), q("sndp", "first"), "filter(Function) using arg" ); +}); + +test("filter(Element)", function() { + expect(1); + + var element = document.getElementById("text1"); + deepEqual( jQuery("#form input").filter(element).get(), q("text1"), "filter(Element)" ); +}); + +test("filter(Array)", function() { + expect(1); + + var elements = [ document.getElementById("text1") ]; + deepEqual( jQuery("#form input").filter(elements).get(), q("text1"), "filter(Element)" ); +}); + +test("filter(jQuery)", function() { + expect(1); + + var elements = jQuery("#text1"); + deepEqual( jQuery("#form input").filter(elements).get(), q("text1"), "filter(Element)" ); +}); + + +test("filter() with positional selectors", function() { + expect(19); + + var html = jQuery( "" + + "

" + + "" + + "first" + + "" + + "" + + "test" + + "" + + "" + + "

" ).appendTo( "body" ), + filterit = function(sel, filter, length) { + equal( jQuery( sel ).filter( filter ).length, length, "jQuery( " + sel + " ).filter( " + filter + " )" ); + }; + + filterit( "#posp", "#posp:first", 1); + filterit( "#posp", "#posp:eq(2)", 0 ); + filterit( "#posp", "#posp a:first", 0 ); + + // Keep in mind this is within the selection and + // not in relation to other elements (.is() is a different story) + filterit( "#posp .firsta", "#posp a:first", 1 ); + filterit( "#posp .firsta", "#posp a:last", 1 ); + filterit( "#posp .firsta", "#posp a:last-child", 0 ); + filterit( "#posp .firsta", "#posp a:even", 1 ); + filterit( "#posp .firsta", "#posp a:odd", 0 ); + filterit( "#posp .firsta", "#posp a:eq(0)", 1 ); + filterit( "#posp .firsta", "#posp a:eq(9)", 0 ); + filterit( "#posp .firsta", "#posp em:eq(0)", 0 ); + filterit( "#posp .firsta", "#posp em:first", 0 ); + filterit( "#posp .firsta", "#posp:first", 0 ); + + filterit( "#posp .seconda", "#posp a:first", 1 ); + filterit( "#posp .seconda", "#posp em:first", 0 ); + filterit( "#posp .seconda", "#posp a:last", 1 ); + filterit( "#posp .seconda", "#posp a:gt(0)", 0 ); + filterit( "#posp .seconda", "#posp a:lt(5)", 1 ); + filterit( "#posp .seconda", "#posp a:lt(1)", 1 ); + html.remove(); +}); + +test("closest()", function() { + expect( 14 ); + + deepEqual( jQuery("body").closest("body").get(), q("body"), "closest(body)" ); + deepEqual( jQuery("body").closest("html").get(), q("html"), "closest(html)" ); + deepEqual( jQuery("body").closest("div").get(), [], "closest(div)" ); + deepEqual( jQuery("#qunit-fixture").closest("span,#html").get(), q("html"), "closest(span,#html)" ); + + deepEqual( jQuery("#qunit-fixture").closest("div:first").get(), [], "closest(div:first)" ); + deepEqual( jQuery("#qunit-fixture div").closest("body:first div:last").get(), q("fx-tests"), "closest(body:first div:last)" ); + + // Test .closest() limited by the context + var jq = jQuery("#nothiddendivchild"); + deepEqual( jq.closest("html", document.body).get(), [], "Context limited." ); + deepEqual( jq.closest("body", document.body).get(), [], "Context limited." ); + deepEqual( jq.closest("#nothiddendiv", document.body).get(), q("nothiddendiv"), "Context not reached." ); + + //Test that .closest() returns unique'd set + equal( jQuery("#qunit-fixture p").closest("#qunit-fixture").length, 1, "Closest should return a unique set" ); + + // Test on disconnected node + equal( jQuery("

").find("p").closest("table").length, 0, "Make sure disconnected closest work." ); + + // Bug #7369 + equal( jQuery("
").closest("[foo]").length, 1, "Disconnected nodes with attribute selector" ); + equal( jQuery("
text
").closest("[lang]").length, 0, "Disconnected nodes with text and non-existent attribute selector" ); + + ok( !jQuery(document).closest("#foo").length, "Calling closest on a document fails silently" ); +}); + +test("closest(jQuery)", function() { + expect(8); + var $child = jQuery("#nothiddendivchild"), + $parent = jQuery("#nothiddendiv"), + $sibling = jQuery("#foo"), + $body = jQuery("body"); + ok( $child.closest( $parent ).is("#nothiddendiv"), "closest( jQuery('#nothiddendiv') )" ); + ok( $child.closest( $parent[0] ).is("#nothiddendiv"), "closest( jQuery('#nothiddendiv') ) :: node" ); + ok( $child.closest( $child ).is("#nothiddendivchild"), "child is included" ); + ok( $child.closest( $child[0] ).is("#nothiddendivchild"), "child is included :: node" ); + equal( $child.closest( document.createElement("div") ).length, 0, "created element is not related" ); + equal( $child.closest( $sibling ).length, 0, "Sibling not a parent of child" ); + equal( $child.closest( $sibling[0] ).length, 0, "Sibling not a parent of child :: node" ); + ok( $child.closest( $body.add($parent) ).is("#nothiddendiv"), "Closest ancestor retrieved." ); +}); + +test("not(Selector|undefined)", function() { + expect(11); + equal( jQuery("#qunit-fixture > p#ap > a").not("#google").length, 2, "not('selector')" ); + deepEqual( jQuery("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" ); + deepEqual( jQuery("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" ); + deepEqual( + jQuery("#form option").not("option.emptyopt:contains('Nothing'),optgroup *,[value='1']").get(), + q("option1c", "option1d", "option2c", "option2d", "option3c", "option3d", "option3e", "option4d", "option4e", "option5a", "option5b"), + "not('complex selector')" + ); + + deepEqual( jQuery("#ap *").not("code").get(), q("google", "groups", "anchor1", "mark"), "not('tag selector')" ); + deepEqual( jQuery("#ap *").not("code, #mark").get(), q("google", "groups", "anchor1"), "not('tag, ID selector')" ); + deepEqual( jQuery("#ap *").not("#mark, code").get(), q("google", "groups", "anchor1"), "not('ID, tag selector')"); + + var all = jQuery("p").get(); + deepEqual( jQuery("p").not(null).get(), all, "not(null) should have no effect"); + deepEqual( jQuery("p").not(undefined).get(), all, "not(undefined) should have no effect"); + deepEqual( jQuery("p").not(0).get(), all, "not(0) should have no effect"); + deepEqual( jQuery("p").not("").get(), all, "not('') should have no effect"); +}); + +test("not(Element)", function() { + expect(1); + + var selects = jQuery("#form select"); + deepEqual( selects.not( selects[1] ).get(), q("select1", "select3", "select4", "select5"), "filter out DOM element"); +}); + +test("not(Function)", function() { + expect(1); + + deepEqual( jQuery("#qunit-fixture p").not(function() { return jQuery("a", this).length; }).get(), q("sndp", "first"), "not(Function)" ); +}); + +test("not(Array)", function() { + expect(2); + + equal( jQuery("#qunit-fixture > p#ap > a").not(document.getElementById("google")).length, 2, "not(DOMElement)" ); + equal( jQuery("p").not(document.getElementsByTagName("p")).length, 0, "not(Array-like DOM collection)" ); +}); + +test("not(jQuery)", function() { + expect( 1 ); + + deepEqual( jQuery("p").not(jQuery("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" ); +}); + +test("has(Element)", function() { + expect(3); + + var obj = jQuery("#qunit-fixture").has(jQuery("#sndp")[0]); + deepEqual( obj.get(), q("qunit-fixture"), "Keeps elements that have the element as a descendant" ); + + var detached = jQuery(""); + deepEqual( detached.has( detached.find("i")[0] ).get(), detached.get(), "...Even when detached" ); + + var multipleParent = jQuery("#qunit-fixture, #header").has(jQuery("#sndp")[0]); + deepEqual( obj.get(), q("qunit-fixture"), "Does not include elements that do not have the element as a descendant" ); +}); + +test("has(Selector)", function() { + expect( 5 ); + + var obj = jQuery("#qunit-fixture").has("#sndp"); + deepEqual( obj.get(), q("qunit-fixture"), "Keeps elements that have any element matching the selector as a descendant" ); + + var detached = jQuery(""); + deepEqual( detached.has("i").get(), detached.get(), "...Even when detached" ); + + var multipleParent = jQuery("#qunit-fixture, #header").has("#sndp"); + deepEqual( multipleParent.get(), q("qunit-fixture"), "Does not include elements that do not have the element as a descendant" ); + + multipleParent = jQuery("#select1, #select2, #select3").has("#option1a, #option3a"); + deepEqual( multipleParent.get(), q("select1", "select3"), "Multiple contexts are checks correctly" ); + + var multipleHas = jQuery("#qunit-fixture").has("#sndp, #first"); + deepEqual( multipleHas.get(), q("qunit-fixture"), "Only adds elements once" ); +}); + +test("has(Arrayish)", function() { + expect(4); + + var simple = jQuery("#qunit-fixture").has(jQuery("#sndp")); + deepEqual( simple.get(), q("qunit-fixture"), "Keeps elements that have any element in the jQuery list as a descendant" ); + + var detached = jQuery(""); + deepEqual( detached.has( detached.find("i") ).get(), detached.get(), "...Even when detached" ); + + var multipleParent = jQuery("#qunit-fixture, #header").has(jQuery("#sndp")); + deepEqual( multipleParent.get(), q("qunit-fixture"), "Does not include elements that do not have an element in the jQuery list as a descendant" ); + + var multipleHas = jQuery("#qunit-fixture").has(jQuery("#sndp, #first")); + deepEqual( simple.get(), q("qunit-fixture"), "Only adds elements once" ); +}); + +test("addBack()", function() { + expect(5); + deepEqual( jQuery("#en").siblings().addBack().get(), q("sndp", "en", "sap"), "Check for siblings and self" ); + deepEqual( jQuery("#foo").children().addBack().get(), q("foo", "sndp", "en", "sap"), "Check for children and self" ); + deepEqual( jQuery("#sndp, #en").parent().addBack().get(), q("foo","sndp","en"), "Check for parent and self" ); + deepEqual( jQuery("#groups").parents("p, div").addBack().get(), q("qunit-fixture", "ap", "groups"), "Check for parents and self" ); + deepEqual( jQuery("#select1 > option").filter(":first-child").addBack(":last-child").get(), q("option1a", "option1d"), "Should contain the last elems plus the *filtered* prior set elements" ); +}); + +test("siblings([String])", function() { + expect(7); + deepEqual( jQuery("#en").siblings().get(), q("sndp", "sap"), "Check for siblings" ); + deepEqual( jQuery("#sndp").siblings(":has(code)").get(), q("sap"), "Check for filtered siblings (has code child element)" ); + deepEqual( jQuery("#sndp").siblings(":has(a)").get(), q("en", "sap"), "Check for filtered siblings (has anchor child element)" ); + deepEqual( jQuery("#foo").siblings("form, b").get(), q("form", "floatTest", "lengthtest", "name-tests", "testForm"), "Check for multiple filters" ); + var set = q("sndp", "en", "sap"); + deepEqual( jQuery("#en, #sndp").siblings().get(), set, "Check for unique results from siblings" ); + deepEqual( jQuery("#option5a").siblings("option[data-attr]").get(), q("option5c"), "Has attribute selector in siblings (#9261)" ); + equal( jQuery("").siblings().length, 0, "Detached elements have no siblings (#11370)" ); +}); + +test("children([String])", function() { + expect(3); + deepEqual( jQuery("#foo").children().get(), q("sndp", "en", "sap"), "Check for children" ); + deepEqual( jQuery("#foo").children(":has(code)").get(), q("sndp", "sap"), "Check for filtered children" ); + deepEqual( jQuery("#foo").children("#en, #sap").get(), q("en", "sap"), "Check for multiple filters" ); +}); + +test("parent([String])", function() { + expect(5); + equal( jQuery("#groups").parent()[0].id, "ap", "Simple parent check" ); + equal( jQuery("#groups").parent("p")[0].id, "ap", "Filtered parent check" ); + equal( jQuery("#groups").parent("div").length, 0, "Filtered parent check, no match" ); + equal( jQuery("#groups").parent("div, p")[0].id, "ap", "Check for multiple filters" ); + deepEqual( jQuery("#en, #sndp").parent().get(), q("foo"), "Check for unique results from parent" ); +}); + +test("parents([String])", function() { + expect(5); + equal( jQuery("#groups").parents()[0].id, "ap", "Simple parents check" ); + equal( jQuery("#groups").parents("p")[0].id, "ap", "Filtered parents check" ); + equal( jQuery("#groups").parents("div")[0].id, "qunit-fixture", "Filtered parents check2" ); + deepEqual( jQuery("#groups").parents("p, div").get(), q("ap", "qunit-fixture"), "Check for multiple filters" ); + deepEqual( jQuery("#en, #sndp").parents().get(), q("foo", "qunit-fixture", "dl", "body", "html"), "Check for unique results from parents" ); +}); + +test("parentsUntil([String])", function() { + expect(9); + + var parents = jQuery("#groups").parents(); + + deepEqual( jQuery("#groups").parentsUntil().get(), parents.get(), "parentsUntil with no selector (nextAll)" ); + deepEqual( jQuery("#groups").parentsUntil(".foo").get(), parents.get(), "parentsUntil with invalid selector (nextAll)" ); + deepEqual( jQuery("#groups").parentsUntil("#html").get(), parents.not(":last").get(), "Simple parentsUntil check" ); + equal( jQuery("#groups").parentsUntil("#ap").length, 0, "Simple parentsUntil check" ); + deepEqual( jQuery("#groups").parentsUntil("#html, #body").get(), parents.slice( 0, 3 ).get(), "Less simple parentsUntil check" ); + deepEqual( jQuery("#groups").parentsUntil("#html", "div").get(), jQuery("#qunit-fixture").get(), "Filtered parentsUntil check" ); + deepEqual( jQuery("#groups").parentsUntil("#html", "p,div,dl").get(), parents.slice( 0, 3 ).get(), "Multiple-filtered parentsUntil check" ); + equal( jQuery("#groups").parentsUntil("#html", "span").length, 0, "Filtered parentsUntil check, no match" ); + deepEqual( jQuery("#groups, #ap").parentsUntil("#html", "p,div,dl").get(), parents.slice( 0, 3 ).get(), "Multi-source, multiple-filtered parentsUntil check" ); +}); + +test("next([String])", function() { + expect(5); + equal( jQuery("#ap").next()[0].id, "foo", "Simple next check" ); + equal( jQuery("#ap").next("div")[0].id, "foo", "Filtered next check" ); + equal( jQuery("#ap").next("p").length, 0, "Filtered next check, no match" ); + equal( jQuery("#ap").next("div, p")[0].id, "foo", "Multiple filters" ); + equal( jQuery("body").next().length, 0, "Simple next check, no match" ); +}); + +test("prev([String])", function() { + expect(4); + equal( jQuery("#foo").prev()[0].id, "ap", "Simple prev check" ); + equal( jQuery("#foo").prev("p")[0].id, "ap", "Filtered prev check" ); + equal( jQuery("#foo").prev("div").length, 0, "Filtered prev check, no match" ); + equal( jQuery("#foo").prev("p, div")[0].id, "ap", "Multiple filters" ); +}); + +test("nextAll([String])", function() { + expect(4); + + var elems = jQuery("#form").children(); + + deepEqual( jQuery("#label-for").nextAll().get(), elems.not(":first").get(), "Simple nextAll check" ); + deepEqual( jQuery("#label-for").nextAll("input").get(), elems.not(":first").filter("input").get(), "Filtered nextAll check" ); + deepEqual( jQuery("#label-for").nextAll("input,select").get(), elems.not(":first").filter("input,select").get(), "Multiple-filtered nextAll check" ); + deepEqual( jQuery("#label-for, #hidden1").nextAll("input,select").get(), elems.not(":first").filter("input,select").get(), "Multi-source, multiple-filtered nextAll check" ); +}); + +test("prevAll([String])", function() { + expect(4); + + var elems = jQuery( jQuery("#form").children().slice(0, 12).get().reverse() ); + + deepEqual( jQuery("#area1").prevAll().get(), elems.get(), "Simple prevAll check" ); + deepEqual( jQuery("#area1").prevAll("input").get(), elems.filter("input").get(), "Filtered prevAll check" ); + deepEqual( jQuery("#area1").prevAll("input,select").get(), elems.filter("input,select").get(), "Multiple-filtered prevAll check" ); + deepEqual( jQuery("#area1, #hidden1").prevAll("input,select").get(), elems.filter("input,select").get(), "Multi-source, multiple-filtered prevAll check" ); +}); + +test("nextUntil([String])", function() { + expect(11); + + var elems = jQuery("#form").children().slice( 2, 12 ); + + deepEqual( jQuery("#text1").nextUntil().get(), jQuery("#text1").nextAll().get(), "nextUntil with no selector (nextAll)" ); + deepEqual( jQuery("#text1").nextUntil(".foo").get(), jQuery("#text1").nextAll().get(), "nextUntil with invalid selector (nextAll)" ); + deepEqual( jQuery("#text1").nextUntil("#area1").get(), elems.get(), "Simple nextUntil check" ); + equal( jQuery("#text1").nextUntil("#text2").length, 0, "Simple nextUntil check" ); + deepEqual( jQuery("#text1").nextUntil("#area1, #radio1").get(), jQuery("#text1").next().get(), "Less simple nextUntil check" ); + deepEqual( jQuery("#text1").nextUntil("#area1", "input").get(), elems.not("button").get(), "Filtered nextUntil check" ); + deepEqual( jQuery("#text1").nextUntil("#area1", "button").get(), elems.not("input").get(), "Filtered nextUntil check" ); + deepEqual( jQuery("#text1").nextUntil("#area1", "button,input").get(), elems.get(), "Multiple-filtered nextUntil check" ); + equal( jQuery("#text1").nextUntil("#area1", "div").length, 0, "Filtered nextUntil check, no match" ); + deepEqual( jQuery("#text1, #hidden1").nextUntil("#area1", "button,input").get(), elems.get(), "Multi-source, multiple-filtered nextUntil check" ); + + deepEqual( jQuery("#text1").nextUntil("[class=foo]").get(), jQuery("#text1").nextAll().get(), "Non-element nodes must be skipped, since they have no attributes" ); +}); + +test("prevUntil([String])", function() { + expect(10); + + var elems = jQuery("#area1").prevAll(); + + deepEqual( jQuery("#area1").prevUntil().get(), elems.get(), "prevUntil with no selector (prevAll)" ); + deepEqual( jQuery("#area1").prevUntil(".foo").get(), elems.get(), "prevUntil with invalid selector (prevAll)" ); + deepEqual( jQuery("#area1").prevUntil("label").get(), elems.not(":last").get(), "Simple prevUntil check" ); + equal( jQuery("#area1").prevUntil("#button").length, 0, "Simple prevUntil check" ); + deepEqual( jQuery("#area1").prevUntil("label, #search").get(), jQuery("#area1").prev().get(), "Less simple prevUntil check" ); + deepEqual( jQuery("#area1").prevUntil("label", "input").get(), elems.not(":last").not("button").get(), "Filtered prevUntil check" ); + deepEqual( jQuery("#area1").prevUntil("label", "button").get(), elems.not(":last").not("input").get(), "Filtered prevUntil check" ); + deepEqual( jQuery("#area1").prevUntil("label", "button,input").get(), elems.not(":last").get(), "Multiple-filtered prevUntil check" ); + equal( jQuery("#area1").prevUntil("label", "div").length, 0, "Filtered prevUntil check, no match" ); + deepEqual( jQuery("#area1, #hidden1").prevUntil("label", "button,input").get(), elems.not(":last").get(), "Multi-source, multiple-filtered prevUntil check" ); +}); + +test("contents()", function() { + expect(12); + equal( jQuery("#ap").contents().length, 9, "Check element contents" ); + ok( jQuery("#iframe").contents()[0], "Check existance of IFrame document" ); + var ibody = jQuery("#loadediframe").contents()[0].body; + ok( ibody, "Check existance of IFrame body" ); + + equal( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" ); + + jQuery(ibody).append("
init text
"); + equal( jQuery("div", ibody).length, 2, "Check the original div and the new div are in IFrame" ); + + equal( jQuery("div:last", ibody).text(), "init text", "Add text to div in IFrame" ); + + jQuery("div:last", ibody).text("div text"); + equal( jQuery("div:last", ibody).text(), "div text", "Add text to div in IFrame" ); + + jQuery("div:last", ibody).remove(); + equal( jQuery("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" ); + + equal( jQuery("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" ); + + jQuery("", ibody).append("").appendTo(ibody); + jQuery("table", ibody).remove(); + equal( jQuery("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" ); + + // using contents will get comments regular, text, and comment nodes + var c = jQuery("#nonnodes").contents().contents(); + equal( c.length, 1, "Check node,textnode,comment contents is just one" ); + equal( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" ); +}); + +test("add(String|Element|Array|undefined)", function() { + expect( 15 ); + deepEqual( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" ); + deepEqual( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" ); + + // We no longer support .add(form.elements), unfortunately. + // There is no way, in browsers, to reliably determine the difference + // between form.elements and form - and doing .add(form) and having it + // add the form elements is way to unexpected, so this gets the boot. + // ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" ); + + // For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE + // use jQuery([]).add(form.elements) instead. + //equal( jQuery([]).add(jQuery("#form")[0].elements).length, jQuery(jQuery("#form")[0].elements).length, "Array in constructor must equals array in add()" ); + + var divs = jQuery("
").add("#sndp"); + ok( divs[0].parentNode, "Sort with the disconnected node last (started with disconnected first)." ); + + divs = jQuery("#sndp").add("
"); + ok( !divs[1].parentNode, "Sort with the disconnected node last." ); + + var tmp = jQuery("
"); + + var x = jQuery([]).add(jQuery("

xxx

").appendTo(tmp)).add(jQuery("

xxx

").appendTo(tmp)); + equal( x[0].id, "x1", "Check on-the-fly element1" ); + equal( x[1].id, "x2", "Check on-the-fly element2" ); + + x = jQuery([]).add(jQuery("

xxx

").appendTo(tmp)[0]).add(jQuery("

xxx

").appendTo(tmp)[0]); + equal( x[0].id, "x1", "Check on-the-fly element1" ); + equal( x[1].id, "x2", "Check on-the-fly element2" ); + + x = jQuery([]).add(jQuery("

xxx

")).add(jQuery("

xxx

")); + equal( x[0].id, "x1", "Check on-the-fly element1" ); + equal( x[1].id, "x2", "Check on-the-fly element2" ); + + x = jQuery([]).add("

xxx

").add("

xxx

"); + equal( x[0].id, "x1", "Check on-the-fly element1" ); + equal( x[1].id, "x2", "Check on-the-fly element2" ); + + var notDefined; + equal( jQuery([]).add(notDefined).length, 0, "Check that undefined adds nothing" ); + + equal( jQuery([]).add( document.getElementById("form") ).length, 1, "Add a form" ); + equal( jQuery([]).add( document.getElementById("select1") ).length, 1, "Add a select" ); +}); + +test("add(String, Context)", function() { + expect(6); + + deepEqual( jQuery( "#firstp" ).add( "#ap" ).get(), q( "firstp", "ap" ), "Add selector to selector " ); + deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap" ).get(), q( "firstp", "ap" ), "Add gEBId to selector" ); + deepEqual( jQuery( document.getElementById("firstp") ).add( document.getElementById("ap") ).get(), q( "firstp", "ap" ), "Add gEBId to gEBId" ); + + var ctx = document.getElementById("firstp"); + deepEqual( jQuery( "#firstp" ).add( "#ap", ctx ).get(), q( "firstp" ), "Add selector to selector " ); + deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap", ctx ).get(), q( "firstp" ), "Add gEBId to selector, not in context" ); + deepEqual( jQuery( document.getElementById("firstp") ).add( "#ap", document.getElementsByTagName("body")[0] ).get(), q( "firstp", "ap" ), "Add gEBId to selector, in context" ); +}); + +test("eq('-1') #10616", function() { + expect(3); + var $divs = jQuery( "div" ); + + equal( $divs.eq( -1 ).length, 1, "The number -1 returns a selection that has length 1" ); + equal( $divs.eq( "-1" ).length, 1, "The string '-1' returns a selection that has length 1" ); + deepEqual( $divs.eq( "-1" ), $divs.eq( -1 ), "String and number -1 match" ); +}); + +test("index(no arg) #10977", function() { + expect(1); + + var $list = jQuery("
  • THIS ONE
  • a
  • b
  • c
"); + jQuery("#qunit-fixture").append( $list ); + strictEqual ( jQuery( "#indextest li:not(.one,.two)" ).index() , 0, "No Argument Index Check" ); + $list.remove(); +}); diff --git a/public/vendor/jquery/test/xhtml.php b/public/vendor/jquery/test/xhtml.php new file mode 100644 index 000000000000..1d2872e34a80 --- /dev/null +++ b/public/vendor/jquery/test/xhtml.php @@ -0,0 +1,5 @@ +
cell