Skip to content

Commit c781cfa

Browse files
authored
Merge pull request #18 from dgt41/aautocomplete
jQuery autocomplete moved to vendor, fetched with grunt
2 parents d61c874 + 8acf381 commit c781cfa

File tree

7 files changed

+41
-4
lines changed

7 files changed

+41
-4
lines changed

components/com_finder/views/search/tmpl/default_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
if ($this->params->get('show_autosuggest', 1))
4040
{
41-
JHtml::_('script', 'media/jui/js/jquery.autocomplete.min.js', false, false, false, false, true);
41+
JHtml::_('script', 'media/vendor/autocomplete/js/jquery.autocomplete.min.js', false, false, false, false, true);
4242

4343
$script .= "
4444
var suggest = jQuery('#q').autocomplete({

dev/Gruntfile.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = function(grunt) {
3333
'../media/vendor/punycode/*',
3434
'../media/vendor/codemirror/*',
3535
'../media/vendor/combobox/*',
36+
'../media/vendor/autocomplete/*',
3637
],
3738
expand: true,
3839
options: {
@@ -68,6 +69,13 @@ module.exports = function(grunt) {
6869
branch : 'master',
6970
directory : 'assets/tmp/jcrop'
7071
}
72+
},
73+
cloneAutojs: {
74+
options: {
75+
repository: 'https://github.com/devbridge/jQuery-Autocomplete',
76+
branch : 'master',
77+
directory : 'assets/tmp/autocomplete'
78+
}
7179
}
7280
},
7381

@@ -230,6 +238,13 @@ module.exports = function(grunt) {
230238
dest: '../media/vendor/jcrop/js/',
231239
filter: 'isFile'
232240
},
241+
{ // autocomplete
242+
expand: true,
243+
cwd: 'assets/tmp/autocomplete/dist',
244+
src: ['jquery.autocomplete.min.js', 'jquery.autocomplete.js', 'license.txt'],
245+
dest: '../media/vendor/autocomplete/js/',
246+
filter: 'isFile'
247+
},
233248
{ //Font Awesome css files
234249
expand: true,
235250
cwd: 'assets/node_modules/font-awesome/css/',
@@ -362,7 +377,6 @@ module.exports = function(grunt) {
362377
grunt.loadNpmTasks('grunt-contrib-copy');
363378
grunt.loadNpmTasks('grunt-contrib-concat');
364379
grunt.loadNpmTasks('grunt-contrib-cssmin');
365-
grunt.loadNpmTasks('grunt-contrib-cssmin');
366380
grunt.loadNpmTasks('grunt-shell');
367381
grunt.loadNpmTasks('grunt-git');
368382

@@ -373,10 +387,11 @@ module.exports = function(grunt) {
373387
'gitclone:cloneCodemirror',
374388
'gitclone:cloneCombobox',
375389
'gitclone:cloneCropjs',
390+
'gitclone:cloneAutojs',
376391
'concat:someFiles',
377392
'copy:fromSource',
378393
'uglify:allJs',
379394
'cssmin:allCss'
380395
]
381396
);
382-
};
397+
};

dev/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ possible commands:
1212
- `grunt gitclone:cloneCodemirror`.....fetches latest codemirror to assets/tmp folder
1313
- `grunt gitclone:cloneCombobox`.......fetches latest combobox to assets/tmp folder
1414
- `grunt gitclone:cloneCropjs`.........fetches latest combobox to assets/tmp folder
15+
- `grunt gitclone:cloneAutojs`.........fetches latest autocomplete to assets/tmp folder
1516
- `grunt concat:someFiles`.............concatenates some codemirror files
1617
- `grunt copy:fromSource`..............copy everything to media/vendor/*
1718
- `grunt uglify:allJs`.................minifies various javascripts
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright 2012 DevBridge and other contributors
2+
http://www.devbridge.com/projects/autocomplete/jquery/
3+
4+
Permission is hereby granted, free of charge, to any person obtaining
5+
a copy of this software and associated documentation files (the
6+
"Software"), to deal in the Software without restriction, including
7+
without limitation the rights to use, copy, modify, merge, publish,
8+
distribute, sublicense, and/or sell copies of the Software, and to
9+
permit persons to whom the Software is furnished to do so, subject to
10+
the following conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

modules/mod_finder/tmpl/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
*/
129129
if ($params->get('show_autosuggest', 1))
130130
{
131-
JHtml::_('script', 'media/jui/js/jquery.autocomplete.min.js', false, false, false, false, true);
131+
JHtml::_('script', 'media/vendor/autocomplete/js/jquery.autocomplete.min.js', false, false, false, false, true);
132132

133133
$script .= "
134134
var suggest = jQuery('#mod-finder-searchword" . $module->id . "').autocomplete({

0 commit comments

Comments
 (0)