From f5377409b0b2ed712c8e605b8908f20e3dcb68b1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 10 May 2019 21:56:13 -0400 Subject: [PATCH] Cleaned up unused files, did some code tidying --- calendar.php | 88 --- client_invoices.php | 2 +- client_nav.php | 133 ---- client_quotes.php | 2 +- client_recurring.php | 2 +- clients.php | 2 +- ...er-side.php => dev-clients-server-side.php | 0 expenses.php | 2 +- footer.php | 1 + graph.php | 112 ---- graph2.php | 241 -------- invoice.php | 26 +- invoices.php | 2 +- js/app.js | 43 +- login.php | 2 +- payments.php | 2 +- play.php | 10 - quotes.php | 2 +- recurring.php | 2 +- report_income_vs_expense.php | 92 --- settings-side-nav.php | 38 -- transactions.php | 2 +- vendor/Bootstrap-3-Typeahead/.gitignore | 42 ++ vendor/Bootstrap-3-Typeahead/.jscsrc | 34 + vendor/Bootstrap-3-Typeahead/.jshintrc | 17 + vendor/Bootstrap-3-Typeahead/Gruntfile.js | 47 ++ vendor/Bootstrap-3-Typeahead/README.md | 276 +++++++++ .../bootstrap3-typeahead.js | 584 ++++++++++++++++++ .../bootstrap3-typeahead.min.js | 1 + vendor/Bootstrap-3-Typeahead/bower.json | 20 + vendor/Bootstrap-3-Typeahead/composer.json | 21 + vendor/Bootstrap-3-Typeahead/package.json | 36 ++ vendor/Bootstrap-3-Typeahead/typeaheadv4.png | Bin 0 -> 5075 bytes vendors.php | 2 +- 34 files changed, 1124 insertions(+), 762 deletions(-) delete mode 100644 calendar.php delete mode 100644 client_nav.php rename clients-server-side.php => dev-clients-server-side.php (100%) delete mode 100644 graph.php delete mode 100644 graph2.php delete mode 100644 play.php delete mode 100644 report_income_vs_expense.php delete mode 100644 settings-side-nav.php create mode 100644 vendor/Bootstrap-3-Typeahead/.gitignore create mode 100644 vendor/Bootstrap-3-Typeahead/.jscsrc create mode 100644 vendor/Bootstrap-3-Typeahead/.jshintrc create mode 100644 vendor/Bootstrap-3-Typeahead/Gruntfile.js create mode 100644 vendor/Bootstrap-3-Typeahead/README.md create mode 100644 vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.js create mode 100644 vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.min.js create mode 100644 vendor/Bootstrap-3-Typeahead/bower.json create mode 100644 vendor/Bootstrap-3-Typeahead/composer.json create mode 100644 vendor/Bootstrap-3-Typeahead/package.json create mode 100644 vendor/Bootstrap-3-Typeahead/typeaheadv4.png diff --git a/calendar.php b/calendar.php deleted file mode 100644 index f6ff7a36..00000000 --- a/calendar.php +++ /dev/null @@ -1,88 +0,0 @@ - - -
-
-
Janurary 2019
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SundayMondayTuesdayWednesdayThursdayFridaySaturday
-

1

- Security Assessment -
- INV-001 Overdue -
234567
891011121314
15161718192021
22232425262728
293031
- Calendars -
    -
  • Jobs
  • -
  • Alerts
  • -
  • Expiration
  • -
  • Payments
  • -
-
-
- -
- +
diff --git a/client_nav.php b/client_nav.php deleted file mode 100644 index b244bb89..00000000 --- a/client_nav.php +++ /dev/null @@ -1,133 +0,0 @@ - \ No newline at end of file diff --git a/client_quotes.php b/client_quotes.php index b5a1ec5b..804cdbda 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -11,7 +11,7 @@
-
Number
+
diff --git a/client_recurring.php b/client_recurring.php index 96495a70..a379004e 100644 --- a/client_recurring.php +++ b/client_recurring.php @@ -14,7 +14,7 @@
-
Number
+
diff --git a/clients.php b/clients.php index 8b4d2596..6a741e0b 100644 --- a/clients.php +++ b/clients.php @@ -1,6 +1,6 @@ - +
diff --git a/clients-server-side.php b/dev-clients-server-side.php similarity index 100% rename from clients-server-side.php rename to dev-clients-server-side.php diff --git a/expenses.php b/expenses.php index 9bc0d4f5..0b2d6181 100644 --- a/expenses.php +++ b/expenses.php @@ -16,7 +16,7 @@
-
Frequency
+
diff --git a/footer.php b/footer.php index 6cdcc78b..f088f859 100644 --- a/footer.php +++ b/footer.php @@ -24,6 +24,7 @@ + diff --git a/graph.php b/graph.php deleted file mode 100644 index 561e0f9f..00000000 --- a/graph.php +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - <?php echo $config_company_name; ?> - - - - - - - - - - - - - - - - -
- -
- -
- - - - - - - - -
-
-
-
- - Bar Chart Example
-
- -
- -
-
-
-
-
- - Pie Chart Example
-
- -
- -
-
-
- -
- - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/graph2.php b/graph2.php deleted file mode 100644 index 62bfbcbd..00000000 --- a/graph2.php +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - SB Admin - Charts - - - - - - - - - - - - - - - - -
- - - - -
- -
- - - - - -
-
- - Area Chart Example
-
- -
- -
- -
-
-
-
- - Bar Chart Example
-
- -
- -
-
-
-
-
- - Pie Chart Example
-
- -
- -
-
-
- -

- More chart examples coming soon... -

- -
- - - -
-
- -
-
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/invoice.php b/invoice.php index cbf07c72..f301cf36 100644 --- a/invoice.php +++ b/invoice.php @@ -207,10 +207,10 @@ if(isset($_GET['invoice_id'])){ ?> - + - + @@ -363,4 +363,24 @@ if(isset($_GET['invoice_id'])){ - + + \ No newline at end of file diff --git a/invoices.php b/invoices.php index a357749f..e6c24a6a 100644 --- a/invoices.php +++ b/invoices.php @@ -89,7 +89,7 @@
-
Date
+
diff --git a/js/app.js b/js/app.js index b50fb26f..270d1c83 100644 --- a/js/app.js +++ b/js/app.js @@ -3,43 +3,20 @@ if ( window.history.replaceState ) { window.history.replaceState( null, null, window.location.href ); } -//Data Tables Options -$('#dt').dataTable( { - "aaSorting": [], - "order": [], - language: { - search: '_INPUT_', - searchPlaceholder: "Enter search...", - sLengthMenu: "_MENU_", - sInfo: "records: _START_-_END_ of _TOTAL_", - paginate: { - previous: '', - next: '' - } - } -}); - // Call the dataTables jQuery plugin -$('#dataTable').DataTable(); - -$('#dT').dataTable( { - "order": [], - "columnDefs": [ - { "orderable": false, "targets":[""]} - ], - "orderCellsTop": true, +$('#dataTable').dataTable( { + order: [], language: { - search: "_INPUT_", - searchPlaceholder: "Search", - sLengthMenu: "_MENU_", - sInfo: "_START_-_END_ of _TOTAL_", - paginate: { - previous: '', - next: '' - } + search: "_INPUT_", + searchPlaceholder: "Search", + sLengthMenu: "_MENU_", + sInfo: "_START_-_END_ of _TOTAL_", + paginate: { + previous: '', + next: '' + } } - }); new EasyMDE({ diff --git a/login.php b/login.php index fee70e0e..5c3d58bd 100644 --- a/login.php +++ b/login.php @@ -57,7 +57,7 @@ if(isset($_POST['login'])){
Number
+
diff --git a/play.php b/play.php deleted file mode 100644 index a4dd74be..00000000 --- a/play.php +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -
-
Date
+
diff --git a/recurring.php b/recurring.php index 30f55591..bac868a8 100644 --- a/recurring.php +++ b/recurring.php @@ -15,7 +15,7 @@
-
Number
+
diff --git a/report_income_vs_expense.php b/report_income_vs_expense.php deleted file mode 100644 index 4f546180..00000000 --- a/report_income_vs_expense.php +++ /dev/null @@ -1,92 +0,0 @@ - - - - - -
-
-
Expense Summary
- - -
-
-
-
Frequency
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CategoryJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTotal
Category Type$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00
Category Type 2$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00
Total$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00
-
- - - - - \ No newline at end of file diff --git a/transactions.php b/transactions.php index d2b8fff4..9c105b19 100644 --- a/transactions.php +++ b/transactions.php @@ -16,7 +16,7 @@
- +
diff --git a/vendor/Bootstrap-3-Typeahead/.gitignore b/vendor/Bootstrap-3-Typeahead/.gitignore new file mode 100644 index 00000000..84d48d86 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/.gitignore @@ -0,0 +1,42 @@ +# Ignore docs files +_gh_pages +_site +.ruby-version + +# Numerous always-ignore extensions +*.diff +*.err +*.log +*.orig +*.rej +*.swo +*.swp +*.vi +*.zip +*~ + +# OS or Editor folders +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +nbproject +Thumbs.db + +# Komodo +.komodotools +*.komodoproject + +# grunt-html-validation +validation-report.json +validation-status.json + +# Folders to ignore +bower_components +node_modules diff --git a/vendor/Bootstrap-3-Typeahead/.jscsrc b/vendor/Bootstrap-3-Typeahead/.jscsrc new file mode 100644 index 00000000..9612c168 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/.jscsrc @@ -0,0 +1,34 @@ +{ + "disallowEmptyBlocks": true, + "disallowKeywords": ["with"], + "disallowMixedSpacesAndTabs": true, + "disallowMultipleLineStrings": true, + "disallowMultipleVarDecl": true, + "disallowQuotedKeysInObjects": "allButReserved", + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "disallowSpaceBeforeBinaryOperators": [","], + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "disallowSpacesInsideArrayBrackets": true, + "disallowSpacesInsideParentheses": true, + "disallowTrailingComma": true, + "disallowTrailingWhitespace": true, + "requireCamelCaseOrUpperCaseIdentifiers": true, + "requireCapitalizedConstructors": true, + "requireCommaBeforeLineBreak": true, + "requireDotNotation": true, + "requireLineFeedAtFileEnd": true, + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], + "requireSpaceAfterLineComment": true, + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, + "requireSpacesInConditionalExpression": true, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "requireSpacesInsideObjectBrackets": "allButNested", + "validateIndentation": 2, + "validateLineBreaks": "LF", + "validateQuoteMarks": "'" +} diff --git a/vendor/Bootstrap-3-Typeahead/.jshintrc b/vendor/Bootstrap-3-Typeahead/.jshintrc new file mode 100644 index 00000000..8e16297d --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/.jshintrc @@ -0,0 +1,17 @@ +{ + "asi" : true, + "browser" : true, + "node" : true, + "eqeqeq" : false, + "eqnull" : true, + "es3" : true, + "expr" : true, + "jquery" : true, + "latedef" : true, + "laxbreak" : true, + "nonbsp" : true, + "strict" : true, + "undef" : true, + "unused" : false, + "predef" : ["define"] +} diff --git a/vendor/Bootstrap-3-Typeahead/Gruntfile.js b/vendor/Bootstrap-3-Typeahead/Gruntfile.js new file mode 100644 index 00000000..6f5a4d00 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/Gruntfile.js @@ -0,0 +1,47 @@ +module.exports = function (grunt) { + 'use strict'; + + // Force use of Unix newlines + grunt.util.linefeed = '\n'; + + // Project configuration. + grunt.initConfig({ + + // Metadata. + pkg: grunt.file.readJSON('package.json'), + + + jshint: { + options: { + jshintrc: '.jshintrc' + }, + src: ['bootstrap3-typeahead.js'] + }, + jscs: { + src: "bootstrap3-typeahead.js", + options: { + config: ".jscsrc", + } + }, + uglify: { + options: { + preserveComments: 'some' + }, + core: { + files: { + 'bootstrap3-typeahead.min.js': ['bootstrap3-typeahead.js'] + } + } + } + }); + + + // These plugins provide necessary tasks. + require('load-grunt-tasks')(grunt, { scope: 'devDependencies' }); + //require('time-grunt')(grunt); + grunt.registerTask('test', ['jshint', 'jscs']); + + // Default task. + grunt.registerTask('default', ['test','uglify']); + +}; diff --git a/vendor/Bootstrap-3-Typeahead/README.md b/vendor/Bootstrap-3-Typeahead/README.md new file mode 100644 index 00000000..ecde999f --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/README.md @@ -0,0 +1,276 @@ +Bootstrap 3 Typeahead +===================== + +For simple autocomplete use cases there seems to be nothing wrong with the dropped typeahead plugin. Here you will find the typeahead autocomplete plugin for Twitter's Bootstrap 2 ready to use with Twitter's Bootstrap 3. The original code is written by [@mdo](http://twitter.com/mdo) and [@fat](http://twitter.com/fat). + +Users who migrate their website or app from Twitter's Bootstrap 2 to Bootstrap 3 can also use this plugin to keep their current autocomplete functions. See for a complete list of migrations steps: [Migrate your templates from Twitter Bootstrap 2.x to Twitter Bootstrap 3](http://bassjobsen.weblogs.fm/migrate-your-templates-from-twitter-bootstrap-2-x-to-twitter-bootstrap-3/) + +With Twitter Bootstrap 3 the typeahead plugin had been dropped. [@mdo](http://twitter.com/mdo) says: "in favor of folks using [Twitter's typeahead](https://github.com/twitter/typeahead.js). Twitter's typeahead has more features than the old bootstrap-typeahead.js and less bugs." Twitter's typeahead don't work direct with Bootstrap 3. The DOM structure of the dropdown menu used by `typeahead.js` differs from the DOM structure of the Bootstrap dropdown menu. You'll need to load some additional CSS in order to get the `typeahead.js` dropdown menu to fit the default Bootstrap theme. Try [extended Bootstrap LESS](https://github.com/bassjobsen/typeahead.js-bootstrap-css) or if your are looking for a more extended version try: [typeahead.js-bootstrap3.less](https://github.com/hyspace/typeahead.js-bootstrap3.less/blob/master/typeahead.less). + +~~`Typeahead.js` doesn't seem ready for the new Twitter Bootstrap 3 at the moment. Code is not up to date and fixes are needed. See also: +[Typeahead problems with Bootstrap 3.0 RC1](http://stackoverflow.com/questions/18167246/typeahead-problems-with-bootstrap-3-0-rc1).~~ + +Bootstrap 4 +=========== +[Bootstrap 4](http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/) is coming soon. The Bootstrap 3 Typeahead will also work with Bootstrap 4. +The look and feel of Bootstrap 4 will differ from Bootstrap 3 and so does the drop down menu. In Bootstrap 4 the typeahead dropdown menu will look like that shown in the figure below: +![Bootstrap 4 Typeahead](typeaheadv4.png). + +Download +======== + + - Download the latest [bootstrap3-typeahead.js](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.js) or [bootstrap3-typeahead.min.js](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.min.js). + + - Include it in your source after jQuery and Bootstrap's JavaScript. + +Full integration with Bootstrap 3 Typeahead +------------------------------------------- +Download the latest version of Boostrap from [Bootstrap](https://github.com/twbs/bootstrap/archive/master.zip). Copy `bootstrap3-typeahead.js` to the js/ folder. Edit `gruntfile.js` and add `bootstrap3-typeahead.js` to the plugins list. +Build your own version with typeahead with `grunt dist`. + +CSS +=== +There is no additional CSS required to use the plugin. Bootstrap's CSS contains all required styles in the `.dropdown-menu` class. The original CSS adds a `z-index` of 1051 to the dropdownmenu via the typeahead class. You could add this if you need it. +`.typeahead { z-index: 1051; }` (less or css). + +Usage +===== + + + +You'll want to set `autocomplete="off"` to prevent default browser menus from appearing over the Bootstrap typeahead dropdown. + +Via data attributes +------------------- +Add data attributes to register an element with typeahead functionality as shown in the example above. + +Via JavaScript +-------------- + +Call the typeahead manually with: + + $('.typeahead').typeahead() + +Destroys previously initialized typeaheads. This entails reverting DOM modifications and removing event handlers: + + $('.typeahead').typeahead('destroy') + +Javascript Example +============= + +Loading a collection +-------------------- + + $.get('example_collection.json', function(data){ + $("#name").typeahead({ source:data }); + },'json'); + //example_collection.json + // ["item1","item2","item3"] + +Using JSON objects instead of simple strings +-------------------------------------------- + +You can add all the properties you wish on your objects, as long as you provide a "name" attribute OR you provide your own displayText method. The other values allow you to match the selected item with something in your model. + + var $input = $('.typeahead'); + $input.typeahead({source:[{id: "someId1", name: "Display name 1"}, + {id: "someId2", name: "Display name 2"}], + autoSelect: true}); + $input.change(function() { + var current = $input.typeahead("getActive"); + if (current) { + // Some item from your model is active! + if (current.name == $input.val()) { + // This means the exact match is found. Use toLowerCase() if you want case insensitive match. + } else { + // This means it is only a partial match, you can either add a new item + // or take the active if you don't want new items + } + } else { + // Nothing is active so it is a new value (or maybe empty value) + } + }); + + +Options +======= + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-source=""`. + +
Date
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
sourcearray, function[ ]The data source to query against. May be an array of strings, an array of JSON object with a name property or a function. The function accepts two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
itemsnumber8The max number of items to display in the dropdown. Can also be set to 'all'
minLengthnumber1The minimum character length needed before triggering autocomplete suggestions. You can set it to 0 so suggestion are shown even when there is no text when lookup function is called.
showHintOnFocusboolean or "all"falseIf hints should be shown as soon as the input gets focus. If set to true, all match will be shown. If set to "all", it will display all hints, not filtering them by the current text. This can be used when you want an input that behaves a bit like a combo box plus auto completion as you type to filter the choices.
scrollHeightnumber, function0Number of pixels the scrollable parent container scrolled down (scrolled out the viewport).
matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
sorterfunctionexact match,
case sensitive,
case insensitive
Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
updaterfunctionreturns selected itemThe method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.
highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
displayTextfunctionitem.name || itemMethod used to get textual representation of an item of the sources. Accepts a single argument item and has the scope of the typeahead instance. Should return a String.
autoSelectbooleantrueAllows you to dictate whether or not the first suggestion is selected automatically. Turning autoselect off also means that the input won't clear if nothing is selected and enter or tab is hit.
afterSelectfunction$.noop()Call back function to execute after selected an item. It gets the current active item in parameter if any.
delayinteger0Adds a delay between lookups.
appendTojQuery elementnullBy defaut, the menu is added right after the input element. Use this option to add the menu to another div. It should not be used if you want to use bootstrap dropup or dropdown-menu-right classes.
fitToElementbooleanfalseSet to true if you want the menu to be the same size than the input it is attached to.
addItemJSON objectfalseAdds an item to the end of the list, for example "New Entry". This could be used, for example, to pop a dialog when an item is not found in the list of data. Example: http://cl.ly/image/2u170I1q1G3A/addItem.png
+ +Methods +======= + + .typeahead(options): Initializes an input with a typeahead. + .lookup: To trigger the lookup function externally + .getActive: To get the currently active item, you will get a String or a JSON object depending on how you initialized typeahead. Works only for the first match. + + + +Bower +===== + +To use with [Bower](http://bower.io/). Add to your bower.json file: + + + { + "name": "MyProject", + "dependencies": { + "bootstrap3-typeahead": "git://github.com/bassjobsen/Bootstrap-3-Typeahead.git#master" + } + } + +AngularJS +========= +An AngularJS directive for the Bootstrap 3 Typeahead jQuery plugin can be found at https://github.com/davidkonrad/angular-bootstrap3-typeahead. + +Bloodhound +========== +[Bloodhound](https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md) is the [typeahead.js](https://github.com/twitter/typeahead.js) suggestion engine, since version 0.10.0. Bloodhound is robust, flexible, and offers advanced functionalities such as prefetching, intelligent caching, fast lookups, and backfilling with remote data. To use Bloodhound with Bootstrap-3-Typeahead: + + // instantiate the bloodhound suggestion engine + var numbers = new Bloodhound({ + datumTokenizer: Bloodhound.tokenizers.whitespace, + queryTokenizer: Bloodhound.tokenizers.whitespace, + local: ["(A)labama","Alaska","Arizona","Arkansas","Arkansas2","Barkansas"] + }); + + // initialize the bloodhound suggestion engine + numbers.initialize(); + + $('.typeahead').typeahead( + { + items: 4, + source:numbers.ttAdapter() + }); + + +Bootstrap Tags Input +==================== +[Bootstrap Tags Input](http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/) is a jQuery plugin providing a Twitter Bootstrap user interface for managing tags. Bootstrap Tags Input has a typeahead option which allows you to set the source: + + $('input').tagsinput({ + typeahead: { + source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo'] + } + }); + +or + + $('input').tagsinput({ + typeahead: { + source: function(query) { + return $.get('http://someservice.com'); + } + } + }); + +See also: https://github.com/bassjobsen/Bootstrap-3-Typeahead/issues/40 diff --git a/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.js b/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.js new file mode 100644 index 00000000..0fde0031 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.js @@ -0,0 +1,584 @@ +/* ============================================================= + * bootstrap3-typeahead.js v4.0.2 + * https://github.com/bassjobsen/Bootstrap-3-Typeahead + * ============================================================= + * Original written by @mdo and @fat + * ============================================================= + * Copyright 2014 Bass Jobsen @bassjobsen + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +(function (root, factory) { + + 'use strict'; + + // CommonJS module is defined + if (typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery')); + } + // AMD module is defined + else if (typeof define === 'function' && define.amd) { + define(['jquery'], function ($) { + return factory ($); + }); + } else { + factory(root.jQuery); + } + +}(this, function ($) { + + 'use strict'; + // jshint laxcomma: true + + + /* TYPEAHEAD PUBLIC CLASS DEFINITION + * ================================= */ + + var Typeahead = function (element, options) { + this.$element = $(element); + this.options = $.extend({}, $.fn.typeahead.defaults, options); + this.matcher = this.options.matcher || this.matcher; + this.sorter = this.options.sorter || this.sorter; + this.select = this.options.select || this.select; + this.autoSelect = typeof this.options.autoSelect == 'boolean' ? this.options.autoSelect : true; + this.highlighter = this.options.highlighter || this.highlighter; + this.render = this.options.render || this.render; + this.updater = this.options.updater || this.updater; + this.displayText = this.options.displayText || this.displayText; + this.source = this.options.source; + this.delay = this.options.delay; + this.$menu = $(this.options.menu); + this.$appendTo = this.options.appendTo ? $(this.options.appendTo) : null; + this.fitToElement = typeof this.options.fitToElement == 'boolean' ? this.options.fitToElement : false; + this.shown = false; + this.listen(); + this.showHintOnFocus = typeof this.options.showHintOnFocus == 'boolean' || this.options.showHintOnFocus === "all" ? this.options.showHintOnFocus : false; + this.afterSelect = this.options.afterSelect; + this.addItem = false; + this.value = this.$element.val() || this.$element.text(); + }; + + Typeahead.prototype = { + + constructor: Typeahead, + + select: function () { + var val = this.$menu.find('.active').data('value'); + this.$element.data('active', val); + if (this.autoSelect || val) { + var newVal = this.updater(val); + // Updater can be set to any random functions via "options" parameter in constructor above. + // Add null check for cases when updater returns void or undefined. + if (!newVal) { + newVal = ''; + } + this.$element + .val(this.displayText(newVal) || newVal) + .text(this.displayText(newVal) || newVal) + .change(); + this.afterSelect(newVal); + } + return this.hide(); + }, + + updater: function (item) { + return item; + }, + + setSource: function (source) { + this.source = source; + }, + + show: function () { + var pos = $.extend({}, this.$element.position(), { + height: this.$element[0].offsetHeight + }); + + var scrollHeight = typeof this.options.scrollHeight == 'function' ? + this.options.scrollHeight.call() : + this.options.scrollHeight; + + var element; + if (this.shown) { + element = this.$menu; + } else if (this.$appendTo) { + element = this.$menu.appendTo(this.$appendTo); + this.hasSameParent = this.$appendTo.is(this.$element.parent()); + } else { + element = this.$menu.insertAfter(this.$element); + this.hasSameParent = true; + } + + if (!this.hasSameParent) { + // We cannot rely on the element position, need to position relative to the window + element.css("position", "fixed"); + var offset = this.$element.offset(); + pos.top = offset.top; + pos.left = offset.left; + } + // The rules for bootstrap are: 'dropup' in the parent and 'dropdown-menu-right' in the element. + // Note that to get right alignment, you'll need to specify `menu` in the options to be: + // '' + var dropup = $(element).parent().hasClass('dropup'); + var newTop = dropup ? 'auto' : (pos.top + pos.height + scrollHeight); + var right = $(element).hasClass('dropdown-menu-right'); + var newLeft = right ? 'auto' : pos.left; + // it seems like setting the css is a bad idea (just let Bootstrap do it), but I'll keep the old + // logic in place except for the dropup/right-align cases. + element.css({ top: newTop, left: newLeft }).show(); + + if (this.options.fitToElement === true) { + element.css("width", this.$element.outerWidth() + "px"); + } + + this.shown = true; + return this; + }, + + hide: function () { + this.$menu.hide(); + this.shown = false; + return this; + }, + + lookup: function (query) { + var items; + if (typeof(query) != 'undefined' && query !== null) { + this.query = query; + } else { + this.query = this.$element.val() || this.$element.text() || ''; + } + + if (this.query.length < this.options.minLength && !this.options.showHintOnFocus) { + return this.shown ? this.hide() : this; + } + + var worker = $.proxy(function () { + + if ($.isFunction(this.source)) { + this.source(this.query, $.proxy(this.process, this)); + } else if (this.source) { + this.process(this.source); + } + }, this); + + clearTimeout(this.lookupWorker); + this.lookupWorker = setTimeout(worker, this.delay); + }, + + process: function (items) { + var that = this; + + items = $.grep(items, function (item) { + return that.matcher(item); + }); + + items = this.sorter(items); + + if (!items.length && !this.options.addItem) { + return this.shown ? this.hide() : this; + } + + if (items.length > 0) { + this.$element.data('active', items[0]); + } else { + this.$element.data('active', null); + } + + // Add item + if (this.options.addItem){ + items.push(this.options.addItem); + } + + if (this.options.items == 'all') { + return this.render(items).show(); + } else { + return this.render(items.slice(0, this.options.items)).show(); + } + }, + + matcher: function (item) { + var it = this.displayText(item); + return ~it.toLowerCase().indexOf(this.query.toLowerCase()); + }, + + sorter: function (items) { + var beginswith = []; + var caseSensitive = []; + var caseInsensitive = []; + var item; + + while ((item = items.shift())) { + var it = this.displayText(item); + if (!it.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item); + else if (~it.indexOf(this.query)) caseSensitive.push(item); + else caseInsensitive.push(item); + } + + return beginswith.concat(caseSensitive, caseInsensitive); + }, + + highlighter: function (item) { + var html = $('
'); + var query = this.query; + var i = item.toLowerCase().indexOf(query.toLowerCase()); + var len = query.length; + var leftPart; + var middlePart; + var rightPart; + var strong; + if (len === 0) { + return html.text(item).html(); + } + while (i > -1) { + leftPart = item.substr(0, i); + middlePart = item.substr(i, len); + rightPart = item.substr(i + len); + strong = $('').text(middlePart); + html + .append(document.createTextNode(leftPart)) + .append(strong); + item = rightPart; + i = item.toLowerCase().indexOf(query.toLowerCase()); + } + return html.append(document.createTextNode(item)).html(); + }, + + render: function (items) { + var that = this; + var self = this; + var activeFound = false; + var data = []; + var _category = that.options.separator; + + $.each(items, function (key,value) { + // inject separator + if (key > 0 && value[_category] !== items[key - 1][_category]){ + data.push({ + __type: 'divider' + }); + } + + // inject category header + if (value[_category] && (key === 0 || value[_category] !== items[key - 1][_category])){ + data.push({ + __type: 'category', + name: value[_category] + }); + } + data.push(value); + }); + + items = $(data).map(function (i, item) { + if ((item.__type || false) == 'category'){ + return $(that.options.headerHtml).text(item.name)[0]; + } + + if ((item.__type || false) == 'divider'){ + return $(that.options.headerDivider)[0]; + } + + var text = self.displayText(item); + i = $(that.options.item).data('value', item); + i.find('a').html(that.highlighter(text, item)); + if (text == self.$element.val()) { + i.addClass('active'); + self.$element.data('active', item); + activeFound = true; + } + return i[0]; + }); + + if (this.autoSelect && !activeFound) { + items.filter(':not(.dropdown-header)').first().addClass('active'); + this.$element.data('active', items.first().data('value')); + } + this.$menu.html(items); + return this; + }, + + displayText: function (item) { + return typeof item !== 'undefined' && typeof item.name != 'undefined' && item.name || item; + }, + + next: function (event) { + var active = this.$menu.find('.active').removeClass('active'); + var next = active.next(); + + if (!next.length) { + next = $(this.$menu.find('li')[0]); + } + + next.addClass('active'); + }, + + prev: function (event) { + var active = this.$menu.find('.active').removeClass('active'); + var prev = active.prev(); + + if (!prev.length) { + prev = this.$menu.find('li').last(); + } + + prev.addClass('active'); + }, + + listen: function () { + this.$element + .on('focus', $.proxy(this.focus, this)) + .on('blur', $.proxy(this.blur, this)) + .on('keypress', $.proxy(this.keypress, this)) + .on('input', $.proxy(this.input, this)) + .on('keyup', $.proxy(this.keyup, this)); + + if (this.eventSupported('keydown')) { + this.$element.on('keydown', $.proxy(this.keydown, this)); + } + + this.$menu + .on('click', $.proxy(this.click, this)) + .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + .on('mouseleave', 'li', $.proxy(this.mouseleave, this)) + .on('mousedown', $.proxy(this.mousedown,this)); + }, + + destroy : function () { + this.$element.data('typeahead',null); + this.$element.data('active',null); + this.$element + .off('focus') + .off('blur') + .off('keypress') + .off('input') + .off('keyup'); + + if (this.eventSupported('keydown')) { + this.$element.off('keydown'); + } + + this.$menu.remove(); + this.destroyed = true; + }, + + eventSupported: function (eventName) { + var isSupported = eventName in this.$element; + if (!isSupported) { + this.$element.setAttribute(eventName, 'return;'); + isSupported = typeof this.$element[eventName] === 'function'; + } + return isSupported; + }, + + move: function (e) { + if (!this.shown) return; + + switch (e.keyCode) { + case 9: // tab + case 13: // enter + case 27: // escape + e.preventDefault(); + break; + + case 38: // up arrow + // with the shiftKey (this is actually the left parenthesis) + if (e.shiftKey) return; + e.preventDefault(); + this.prev(); + break; + + case 40: // down arrow + // with the shiftKey (this is actually the right parenthesis) + if (e.shiftKey) return; + e.preventDefault(); + this.next(); + break; + } + }, + + keydown: function (e) { + this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]); + if (!this.shown && e.keyCode == 40) { + this.lookup(); + } else { + this.move(e); + } + }, + + keypress: function (e) { + if (this.suppressKeyPressRepeat) return; + this.move(e); + }, + + input: function (e) { + // This is a fixed for IE10/11 that fires the input event when a placehoder is changed + // (https://connect.microsoft.com/IE/feedback/details/810538/ie-11-fires-input-event-on-focus) + var currentValue = this.$element.val() || this.$element.text(); + if (this.value !== currentValue) { + this.value = currentValue; + this.lookup(); + } + }, + + keyup: function (e) { + if (this.destroyed) { + return; + } + switch (e.keyCode) { + case 40: // down arrow + case 38: // up arrow + case 16: // shift + case 17: // ctrl + case 18: // alt + break; + + case 9: // tab + case 13: // enter + if (!this.shown) return; + this.select(); + break; + + case 27: // escape + if (!this.shown) return; + this.hide(); + break; + } + + + }, + + focus: function (e) { + if (!this.focused) { + this.focused = true; + if (this.options.showHintOnFocus && this.skipShowHintOnFocus !== true) { + if(this.options.showHintOnFocus === "all") { + this.lookup(""); + } else { + this.lookup(); + } + } + } + if (this.skipShowHintOnFocus) { + this.skipShowHintOnFocus = false; + } + }, + + blur: function (e) { + if (!this.mousedover && !this.mouseddown && this.shown) { + this.hide(); + this.focused = false; + } else if (this.mouseddown) { + // This is for IE that blurs the input when user clicks on scroll. + // We set the focus back on the input and prevent the lookup to occur again + this.skipShowHintOnFocus = true; + this.$element.focus(); + this.mouseddown = false; + } + }, + + click: function (e) { + e.preventDefault(); + this.skipShowHintOnFocus = true; + this.select(); + this.$element.focus(); + this.hide(); + }, + + mouseenter: function (e) { + this.mousedover = true; + this.$menu.find('.active').removeClass('active'); + $(e.currentTarget).addClass('active'); + }, + + mouseleave: function (e) { + this.mousedover = false; + if (!this.focused && this.shown) this.hide(); + }, + + /** + * We track the mousedown for IE. When clicking on the menu scrollbar, IE makes the input blur thus hiding the menu. + */ + mousedown: function (e) { + this.mouseddown = true; + this.$menu.one("mouseup", function(e){ + // IE won't fire this, but FF and Chrome will so we reset our flag for them here + this.mouseddown = false; + }.bind(this)); + }, + + }; + + + /* TYPEAHEAD PLUGIN DEFINITION + * =========================== */ + + var old = $.fn.typeahead; + + $.fn.typeahead = function (option) { + var arg = arguments; + if (typeof option == 'string' && option == 'getActive') { + return this.data('active'); + } + return this.each(function () { + var $this = $(this); + var data = $this.data('typeahead'); + var options = typeof option == 'object' && option; + if (!data) $this.data('typeahead', (data = new Typeahead(this, options))); + if (typeof option == 'string' && data[option]) { + if (arg.length > 1) { + data[option].apply(data, Array.prototype.slice.call(arg, 1)); + } else { + data[option](); + } + } + }); + }; + + $.fn.typeahead.defaults = { + source: [], + items: 8, + menu: '', + item: '
  • ', + minLength: 1, + scrollHeight: 0, + autoSelect: true, + afterSelect: $.noop, + addItem: false, + delay: 0, + separator: 'category', + headerHtml: '', + headerDivider: '' + }; + + $.fn.typeahead.Constructor = Typeahead; + + /* TYPEAHEAD NO CONFLICT + * =================== */ + + $.fn.typeahead.noConflict = function () { + $.fn.typeahead = old; + return this; + }; + + + /* TYPEAHEAD DATA-API + * ================== */ + + $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { + var $this = $(this); + if ($this.data('typeahead')) return; + $this.typeahead($this.data()); + }); + +})); diff --git a/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.min.js b/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.min.js new file mode 100644 index 00000000..93d4c925 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/bootstrap3-typeahead.min.js @@ -0,0 +1 @@ +(function(root,factory){"use strict";if(typeof module!=="undefined"&&module.exports){module.exports=factory(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else{factory(root.jQuery)}})(this,function($){"use strict";var Typeahead=function(element,options){this.$element=$(element);this.options=$.extend({},$.fn.typeahead.defaults,options);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.select=this.options.select||this.select;this.autoSelect=typeof this.options.autoSelect=="boolean"?this.options.autoSelect:true;this.highlighter=this.options.highlighter||this.highlighter;this.render=this.options.render||this.render;this.updater=this.options.updater||this.updater;this.displayText=this.options.displayText||this.displayText;this.source=this.options.source;this.delay=this.options.delay;this.$menu=$(this.options.menu);this.$appendTo=this.options.appendTo?$(this.options.appendTo):null;this.fitToElement=typeof this.options.fitToElement=="boolean"?this.options.fitToElement:false;this.shown=false;this.listen();this.showHintOnFocus=typeof this.options.showHintOnFocus=="boolean"||this.options.showHintOnFocus==="all"?this.options.showHintOnFocus:false;this.afterSelect=this.options.afterSelect;this.addItem=false;this.value=this.$element.val()||this.$element.text()};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").data("value");this.$element.data("active",val);if(this.autoSelect||val){var newVal=this.updater(val);if(!newVal){newVal=""}this.$element.val(this.displayText(newVal)||newVal).text(this.displayText(newVal)||newVal).change();this.afterSelect(newVal)}return this.hide()},updater:function(item){return item},setSource:function(source){this.source=source},show:function(){var pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});var scrollHeight=typeof this.options.scrollHeight=="function"?this.options.scrollHeight.call():this.options.scrollHeight;var element;if(this.shown){element=this.$menu}else if(this.$appendTo){element=this.$menu.appendTo(this.$appendTo);this.hasSameParent=this.$appendTo.is(this.$element.parent())}else{element=this.$menu.insertAfter(this.$element);this.hasSameParent=true}if(!this.hasSameParent){element.css("position","fixed");var offset=this.$element.offset();pos.top=offset.top;pos.left=offset.left}var dropup=$(element).parent().hasClass("dropup");var newTop=dropup?"auto":pos.top+pos.height+scrollHeight;var right=$(element).hasClass("dropdown-menu-right");var newLeft=right?"auto":pos.left;element.css({top:newTop,left:newLeft}).show();if(this.options.fitToElement===true){element.css("width",this.$element.outerWidth()+"px")}this.shown=true;return this},hide:function(){this.$menu.hide();this.shown=false;return this},lookup:function(query){var items;if(typeof query!="undefined"&&query!==null){this.query=query}else{this.query=this.$element.val()||this.$element.text()||""}if(this.query.length0){this.$element.data("active",items[0])}else{this.$element.data("active",null)}if(this.options.addItem){items.push(this.options.addItem)}if(this.options.items=="all"){return this.render(items).show()}else{return this.render(items.slice(0,this.options.items)).show()}},matcher:function(item){var it=this.displayText(item);return~it.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){var beginswith=[];var caseSensitive=[];var caseInsensitive=[];var item;while(item=items.shift()){var it=this.displayText(item);if(!it.toLowerCase().indexOf(this.query.toLowerCase()))beginswith.push(item);else if(~it.indexOf(this.query))caseSensitive.push(item);else caseInsensitive.push(item)}return beginswith.concat(caseSensitive,caseInsensitive)},highlighter:function(item){var html=$("
    ");var query=this.query;var i=item.toLowerCase().indexOf(query.toLowerCase());var len=query.length;var leftPart;var middlePart;var rightPart;var strong;if(len===0){return html.text(item).html()}while(i>-1){leftPart=item.substr(0,i);middlePart=item.substr(i,len);rightPart=item.substr(i+len);strong=$("").text(middlePart);html.append(document.createTextNode(leftPart)).append(strong);item=rightPart;i=item.toLowerCase().indexOf(query.toLowerCase())}return html.append(document.createTextNode(item)).html()},render:function(items){var that=this;var self=this;var activeFound=false;var data=[];var _category=that.options.separator;$.each(items,function(key,value){if(key>0&&value[_category]!==items[key-1][_category]){data.push({__type:"divider"})}if(value[_category]&&(key===0||value[_category]!==items[key-1][_category])){data.push({__type:"category",name:value[_category]})}data.push(value)});items=$(data).map(function(i,item){if((item.__type||false)=="category"){return $(that.options.headerHtml).text(item.name)[0]}if((item.__type||false)=="divider"){return $(that.options.headerDivider)[0]}var text=self.displayText(item);i=$(that.options.item).data("value",item);i.find("a").html(that.highlighter(text,item));if(text==self.$element.val()){i.addClass("active");self.$element.data("active",item);activeFound=true}return i[0]});if(this.autoSelect&&!activeFound){items.filter(":not(.dropdown-header)").first().addClass("active");this.$element.data("active",items.first().data("value"))}this.$menu.html(items);return this},displayText:function(item){return typeof item!=="undefined"&&typeof item.name!="undefined"&&item.name||item},next:function(event){var active=this.$menu.find(".active").removeClass("active");var next=active.next();if(!next.length){next=$(this.$menu.find("li")[0])}next.addClass("active")},prev:function(event){var active=this.$menu.find(".active").removeClass("active");var prev=active.prev();if(!prev.length){prev=this.$menu.find("li").last()}prev.addClass("active")},listen:function(){this.$element.on("focus",$.proxy(this.focus,this)).on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("input",$.proxy(this.input,this)).on("keyup",$.proxy(this.keyup,this));if(this.eventSupported("keydown")){this.$element.on("keydown",$.proxy(this.keydown,this))}this.$menu.on("click",$.proxy(this.click,this)).on("mouseenter","li",$.proxy(this.mouseenter,this)).on("mouseleave","li",$.proxy(this.mouseleave,this)).on("mousedown",$.proxy(this.mousedown,this))},destroy:function(){this.$element.data("typeahead",null);this.$element.data("active",null);this.$element.off("focus").off("blur").off("keypress").off("input").off("keyup");if(this.eventSupported("keydown")){this.$element.off("keydown")}this.$menu.remove();this.destroyed=true},eventSupported:function(eventName){var isSupported=eventName in this.$element;if(!isSupported){this.$element.setAttribute(eventName,"return;");isSupported=typeof this.$element[eventName]==="function"}return isSupported},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:if(e.shiftKey)return;e.preventDefault();this.prev();break;case 40:if(e.shiftKey)return;e.preventDefault();this.next();break}},keydown:function(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27]);if(!this.shown&&e.keyCode==40){this.lookup()}else{this.move(e)}},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},input:function(e){var currentValue=this.$element.val()||this.$element.text();if(this.value!==currentValue){this.value=currentValue;this.lookup()}},keyup:function(e){if(this.destroyed){return}switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break}},focus:function(e){if(!this.focused){this.focused=true;if(this.options.showHintOnFocus&&this.skipShowHintOnFocus!==true){if(this.options.showHintOnFocus==="all"){this.lookup("")}else{this.lookup()}}}if(this.skipShowHintOnFocus){this.skipShowHintOnFocus=false}},blur:function(e){if(!this.mousedover&&!this.mouseddown&&this.shown){this.hide();this.focused=false}else if(this.mouseddown){this.skipShowHintOnFocus=true;this.$element.focus();this.mouseddown=false}},click:function(e){e.preventDefault();this.skipShowHintOnFocus=true;this.select();this.$element.focus();this.hide()},mouseenter:function(e){this.mousedover=true;this.$menu.find(".active").removeClass("active");$(e.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=false;if(!this.focused&&this.shown)this.hide()},mousedown:function(e){this.mouseddown=true;this.$menu.one("mouseup",function(e){this.mouseddown=false}.bind(this))}};var old=$.fn.typeahead;$.fn.typeahead=function(option){var arg=arguments;if(typeof option=="string"&&option=="getActive"){return this.data("active")}return this.each(function(){var $this=$(this);var data=$this.data("typeahead");var options=typeof option=="object"&&option;if(!data)$this.data("typeahead",data=new Typeahead(this,options));if(typeof option=="string"&&data[option]){if(arg.length>1){data[option].apply(data,Array.prototype.slice.call(arg,1))}else{data[option]()}}})};$.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1,scrollHeight:0,autoSelect:true,afterSelect:$.noop,addItem:false,delay:0,separator:"category",headerHtml:'',headerDivider:''};$.fn.typeahead.Constructor=Typeahead;$.fn.typeahead.noConflict=function(){$.fn.typeahead=old;return this};$(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var $this=$(this);if($this.data("typeahead"))return;$this.typeahead($this.data())})}); diff --git a/vendor/Bootstrap-3-Typeahead/bower.json b/vendor/Bootstrap-3-Typeahead/bower.json new file mode 100644 index 00000000..424139bb --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/bower.json @@ -0,0 +1,20 @@ +{ + "name": "bootstrap3-typeahead", + "version": "4.0.2", + "authors": [ + "bassjobsen" + ], + "main": [ + "bootstrap3-typeahead.js" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "jquery": ">=1.7.0" + } +} diff --git a/vendor/Bootstrap-3-Typeahead/composer.json b/vendor/Bootstrap-3-Typeahead/composer.json new file mode 100644 index 00000000..2caf6f74 --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/composer.json @@ -0,0 +1,21 @@ +{ + "name": "bassjobsen/bootstrap-3-typeahead", + "type": "component", + "license": "Apache-2.0", + "description": "Bootstrap 3 Typeahead", + "minimum-stability": "dev", + "authors": [ + { + "name": "Bass Jobsen", + "email": "bass@w3masters.nl" + } + ], + "extra": { + "component": { + "files": [ + "bootstrap3-typeahead.js", + "bootstrap3-typeahead.min.js" + ] + } + } +} diff --git a/vendor/Bootstrap-3-Typeahead/package.json b/vendor/Bootstrap-3-Typeahead/package.json new file mode 100644 index 00000000..0c0ec07e --- /dev/null +++ b/vendor/Bootstrap-3-Typeahead/package.json @@ -0,0 +1,36 @@ +{ + "name": "bootstrap-3-typeahead", + "description": "Bootstrap 3 Typeahead: The typeahead autocomplete plugin for Twitter's Bootstrap 2 ready to use with Bootstrap 3.", + "version": "4.0.2", + "main": "bootstrap3-typeahead.js", + "keywords": [ + "typeahead", + "autocomplete", + "plugin", + "jquery", + "bootstrap" + ], + "homepage": "https://github.com/bassjobsen/Bootstrap-3-Typeahead/", + "author": "Bass Jobsen", + "scripts": { + "test": "grunt test" + }, + "repository": { + "type": "git", + "url": "https://github.com/bassjobsen/Bootstrap-3-Typeahead.git" + }, + "bugs": { + "url": "https://github.com/bassjobsen/Bootstrap-3-Typeahead/issues" + }, + "license": "MIT", + "devDependencies": { + "grunt": "~0.4.5", + "grunt-contrib-jshint": "~0.10.0", + "grunt-contrib-uglify": "~0.6.0", + "grunt-jscs": "~0.8.1", + "load-grunt-tasks": "~0.6.0" + }, + "engines": { + "node": "~0.10.1" + } +} diff --git a/vendor/Bootstrap-3-Typeahead/typeaheadv4.png b/vendor/Bootstrap-3-Typeahead/typeaheadv4.png new file mode 100644 index 0000000000000000000000000000000000000000..b6e34014b32595d692b4e03b7dbb15ad3b884709 GIT binary patch literal 5075 zcmZ`-2Q*yk_LoNV=$+tdAw=(_kkMiian%S$8C|0H(FvoMV2Fqy>gc^h8=XWSWke0Z zD8nd&d2{dkzxVF_ulLqj-}%nk-#P1id+q)Ee!sonJ=XpYN+WEW*lLR z-6kg7B{PdS2oo_#8=yvn|Ks}DR+K`pkiO9{b|)etr~6}EBg)EVCKyRPG@q%HERj<& za1wcOu`3ZwEFS7c9#34Ioo!q^h@QCFSbEr4-}Sclu)7P;eD>Thgo=rXh)z*c?UBCE z-0q_9EB)iEzJr-cs*ha^48KaOJ1Pc~?ObkyY)yE`L>F5{jkAg~(l;tHoAe#Lgx}YW z*A5?M+1}GejT60ew}1Ocr}yitM-*u+cZfGmNC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