diff options
author | Benjamin Jones <bjones@galois.com> | 2012-10-31 10:07:48 -0700 |
---|---|---|
committer | Benjamin Jones <bjones@galois.com> | 2012-10-31 10:07:48 -0700 |
commit | f0f51ede842a469bc1d684e46b77924aeade2ff8 (patch) | |
tree | 6854f1b56a81f892988cbcbf7e9eb8e70a7e0cde | |
parent | 47e08a1a187c91c5588d0377f2344aae66f7001f (diff) |
changed fiveui.jqueryPlugins to fiveui.jquery
-rw-r--r-- | contexts/data/fiveui/injected/jquery-plugins.js | 26 | ||||
-rw-r--r-- | contexts/data/fiveui/injected/prelude.js | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/contexts/data/fiveui/injected/jquery-plugins.js b/contexts/data/fiveui/injected/jquery-plugins.js index 6dc8476..416c5b1 100644 --- a/contexts/data/fiveui/injected/jquery-plugins.js +++ b/contexts/data/fiveui/injected/jquery-plugins.js @@ -20,7 +20,7 @@ */ if (typeof goog != 'undefined') { - goog.provide('fiveui.jqueryPlugins'); + goog.provide('fiveui.jquery'); } /** @@ -29,7 +29,7 @@ if (typeof goog != 'undefined') { * * @namespace */ -fiveui.jqueryPlugins = fiveui.jqueryPlugins || {}; +fiveui.jquery = fiveui.jquery || {}; /** @@ -38,7 +38,7 @@ fiveui.jqueryPlugins = fiveui.jqueryPlugins || {}; * @param {!String} text Text to select for * @returns {!Object} A modified jQuery object */ -fiveui.jqueryPlugins.hasText = function (text) { +fiveui.jquery.hasText = function (text) { return this.filter(":contains('" + text + "')") } @@ -46,14 +46,14 @@ fiveui.jqueryPlugins.hasText = function (text) { * Color checker plugin: filters for elements whose CSS color property is * not in the given set. * - * @description Note: This is a special case of fiveui.jqueryPlugins.cssIsNot, i.e. + * @description Note: This is a special case of fiveui.jquery.cssIsNot, i.e. * $(..).notColorSet(set) == $(..).cssIsNot("color", set, fiveui.color.colorToHex) * @see {fiveui.color.colorToHex} * * @param {String[]} cset A set of allowable color strings * @returns {!Object} A modified jQuery object */ -fiveui.jqueryPlugins.notColorSet = function (cset) { +fiveui.jquery.notColorSet = function (cset) { var allowable = {}; for (var i = 0; i < cset.length; i += 1) { allowable[cset[i]] = true; } // array -> object return this.filter(function (index) { @@ -75,7 +75,7 @@ fiveui.jqueryPlugins.notColorSet = function (cset) { * @param {function(String):String} [fn] Function to apply to return values of $(this).css(prop), fn defaults to the identity function. * @returns {Object} jQuery object */ -fiveui.jqueryPlugins.cssIsNot = function (prop, set, fn) { +fiveui.jquery.cssIsNot = function (prop, set, fn) { var allowable = {}; fn = fn || function (x) { return x; }; // default is Id if (typeof set === "string") { @@ -104,7 +104,7 @@ fiveui.jqueryPlugins.cssIsNot = function (prop, set, fn) { * @param {String} [hint] Highlighted border color, defaults to "red" * @returns {!Object} A modified jQuery object */ -fiveui.jqueryPlugins.highlight = function (hint) { +fiveui.jquery.highlight = function (hint) { hint = hint || "red"; // Default is "red" return this.css("background-color", "rgba(255, 0, 0, 0.3)") .css("border-style", "solid") @@ -126,7 +126,7 @@ fiveui.jqueryPlugins.highlight = function (hint) { * @param {boolean} [log] Boolean which enables console logging of the result; default is `false`. * @returns {Object} A frequence map { "property": frequency } */ -fiveui.jqueryPlugins.propDist = function (prop, log) { +fiveui.jquery.propDist = function (prop, log) { var res = {}; log = log || false; this.each(function (i, elt) { @@ -150,12 +150,12 @@ fiveui.jqueryPlugins.propDist = function (prop, log) { /** * Register the plugins. This adds methods to the jQuery.fn namespace. */ -fiveui.jqueryPlugins.init = function () { - for (fn in fiveui.jqueryPlugins) { - f = fiveui.jqueryPlugins[fn]; +fiveui.jquery.init = function () { + for (fn in fiveui.jquery) { + f = fiveui.jquery[fn]; if (jQuery.isFunction(f) && fn != "init") { - jQuery.fn[fn] = fiveui.jqueryPlugins[fn]; + jQuery.fn[fn] = fiveui.jquery[fn]; } } } -fiveui.jqueryPlugins.init(); +fiveui.jquery.init(); diff --git a/contexts/data/fiveui/injected/prelude.js b/contexts/data/fiveui/injected/prelude.js index 5eb8d25..825f769 100644 --- a/contexts/data/fiveui/injected/prelude.js +++ b/contexts/data/fiveui/injected/prelude.js @@ -228,13 +228,13 @@ fiveui.color = {}; /** * Color check compiler. It is recommended to use the jQuery plugin - * fiveui.jqueryPlugins.cssIsNot instead. + * fiveui.jquery.cssIsNot instead. * * @param {!String} selector The HTML element selector to check. * @param {String[]} colorSet An array of strings containing the HEX values of * colors in the desired color set. * @returns {!function()} A function which checks the rule - * @see fiveui.jqueryPlugins.cssIsNot + * @see fiveui.jquery.cssIsNot */ fiveui.color.colorCheck = function (selector, colorSet) { var allowable, i, fnStr, forEachFuncStr; |