
From: Samuel Guimarães <sguimaraes943@gmail.com> Signed-off-by: Samuel Guimarães <sguimaraes943@gmail.com> --- configure.ac | 1 + ui/libs/Makefile.am | 2 +- ui/libs/jquery-containsNC/LICENSE | 21 +++++++++++++++++++++ ui/libs/jquery-containsNC/Makefile.am | 22 ++++++++++++++++++++++ ui/libs/jquery-containsNC/jquery.containsNC.js | 3 +++ ui/pages/wok-ui.html.tmpl | 1 + 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 ui/libs/jquery-containsNC/LICENSE create mode 100644 ui/libs/jquery-containsNC/Makefile.am create mode 100644 ui/libs/jquery-containsNC/jquery.containsNC.js diff --git a/configure.ac b/configure.ac index 0a5ce80..8b35de6 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,7 @@ AC_CONFIG_FILES([ ui/libs/bootstrap-switch/dist/Makefile ui/libs/bootstrap-switch/dist/js/Makefile ui/libs/bootstrap-switch/dist/css/Makefile + ui/libs/jquery-containsNC/Makefile ui/libs/bootstrap-editable/Makefile ui/libs/bootstrap-editable/dist/Makefile ui/libs/bootstrap-editable/dist/js/Makefile diff --git a/ui/libs/Makefile.am b/ui/libs/Makefile.am index c876b8b..c31bb1d 100644 --- a/ui/libs/Makefile.am +++ b/ui/libs/Makefile.am @@ -17,4 +17,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead +SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC diff --git a/ui/libs/jquery-containsNC/LICENSE b/ui/libs/jquery-containsNC/LICENSE new file mode 100644 index 0000000..7c2c160 --- /dev/null +++ b/ui/libs/jquery-containsNC/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 friedolinfoerder + +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. \ No newline at end of file diff --git a/ui/libs/jquery-containsNC/Makefile.am b/ui/libs/jquery-containsNC/Makefile.am new file mode 100644 index 0000000..0381443 --- /dev/null +++ b/ui/libs/jquery-containsNC/Makefile.am @@ -0,0 +1,22 @@ +# +# Project Wok +# +# Copyright IBM Corp, 2015-2016 +# +# Code derived from Project Kimchi +# +# 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. + +containsncdir = $(datadir)/wok/ui/libs/jquery-containsNC + +dist_containsnc_DATA = $(wildcard *.js) $(NULL) diff --git a/ui/libs/jquery-containsNC/jquery.containsNC.js b/ui/libs/jquery-containsNC/jquery.containsNC.js new file mode 100644 index 0000000..6372285 --- /dev/null +++ b/ui/libs/jquery-containsNC/jquery.containsNC.js @@ -0,0 +1,3 @@ +jQuery.expr[":"].containsNC = function(elem, i, match) { + return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || '').toLowerCase()) > -1; +}; \ No newline at end of file diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl index 694e5a4..4d56a24 100644 --- a/ui/pages/wok-ui.html.tmpl +++ b/ui/pages/wok-ui.html.tmpl @@ -71,6 +71,7 @@ <link rel="stylesheet" href="$href('css/wok.css')"> <script src="$href('libs/es5-shim/es5-shim.min.js')"></script> <script src="$href('libs/jquery/jquery.min.js')"></script> + <script src="$href('libs/jquery-containsNC/jquery.containsNC.js')"></script> <script src="$href('libs/jquery-ui/jquery-ui.min.js')"></script> <script src="$href('libs/jquery-ui/jquery-ui-i18n.min.js')"></script> <script src="$href('libs/jquery-i18n/jquery.i18n.min.js')"></script> -- 1.9.3