X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fresources%2Fjs%2Ffuelux%2Futil.js;fp=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fresources%2Fjs%2Ffuelux%2Futil.js;h=469e9dbc75aab6302f25abdc6dbcf749d495703a;hb=a98556048975c29541849689396e58c813b7558e;hp=0000000000000000000000000000000000000000;hpb=abe7cd0f3412d447cf054e618ce1c7c7fa096745;p=controller.git diff --git a/opendaylight/web/root/src/main/resources/js/fuelux/util.js b/opendaylight/web/root/src/main/resources/js/fuelux/util.js new file mode 100755 index 0000000000..469e9dbc75 --- /dev/null +++ b/opendaylight/web/root/src/main/resources/js/fuelux/util.js @@ -0,0 +1,28 @@ +/* + * Fuel UX Utilities + * https://github.com/ExactTarget/fuelux + * + * Copyright (c) 2012 ExactTarget + * Licensed under the MIT license. + */ + +define(['require','jquery'],function (require) { + + var $ = require('jquery'); + + // custom case-insensitive match expression + function fuelTextExactCI(elem, text) { + return (elem.textContent || elem.innerText || $(elem).text() || '').toLowerCase() === (text || '').toLowerCase(); + } + + $.expr[':'].fuelTextExactCI = $.expr.createPseudo ? + $.expr.createPseudo(function (text) { + return function (elem) { + return fuelTextExactCI(elem, text); + }; + }) : + function (elem, i, match) { + return fuelTextExactCI(elem, match[3]); + }; + +}); \ No newline at end of file