Make sure invokeOperation is set once
[controller.git] / opendaylight / adsal / web / root / src / main / resources / js / fuelux / util.js
1 /*
2  * Fuel UX Utilities
3  * https://github.com/ExactTarget/fuelux
4  *
5  * Copyright (c) 2012 ExactTarget
6  * Licensed under the MIT license.
7  */
8
9 define(['require','jquery'],function (require) {
10
11         var $ = require('jquery');
12
13         // custom case-insensitive match expression
14         function fuelTextExactCI(elem, text) {
15                 return (elem.textContent || elem.innerText || $(elem).text() || '').toLowerCase() === (text || '').toLowerCase();
16         }
17
18         $.expr[':'].fuelTextExactCI = $.expr.createPseudo ?
19                 $.expr.createPseudo(function (text) {
20                         return function (elem) {
21                                 return fuelTextExactCI(elem, text);
22                         };
23                 }) :
24                 function (elem, i, match) {
25                         return fuelTextExactCI(elem, match[3]);
26                 };
27
28 });