Initial commit. Transferred from an Eclipse/Brainstorm environment to NodeJS.

This commit is contained in:
Wynne Crisman
2015-10-25 15:20:42 -07:00
commit 7bba9dc2b0
386 changed files with 22589 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
//
//Notes:
//Requires that the element getting the shadow have a fixed height and width defined in the css, and that both a left and right or top and bottom reference be provided.
//
(function($) {
$.fn.buildShadowText = function() {
for(var index = 0; index < this.length; index++) {
var next = $(this[index]);
//Setup all the shadow text fields to show their shadow text when the field is empty and out of focus.//
var shadowText = next.attr('shadow-text');
var val = next.val();
if(!val || val.length == 0) {
next.data('originalColor', next.css('color'));
next.css('color', '#999');
next.data('isShowingShadowText', true);
next.val(shadowText);
}
next.focus(function() {
var next = $(this);
var isShowing = next.data('isShowingShadowText');
if(isShowing) {
next.css('color', next.data('originalColor'));
next.val("");
next.data('isShowingShadowText', false);
}
});
next.blur(function() {
var next = $(this);
var shadowText = next.attr('shadow-text');
var val = next.val();
if(!val || val.length == 0) {
next.data('originalColor', next.css('color'));
next.css('color', '#999');
next.data('isShowingShadowText', true);
next.val(shadowText);
}
});
}
return this;
}
})(jQuery);