- spinner.zip
- CustomControls
- bin
- calendar
- css
- img
- ui-bg_flat_0_aaaaaa_40x100.png
- ui-bg_flat_75_ffffff_40x100.png
- ui-bg_glass_55_fbf9ee_1x400.png
- ui-bg_glass_65_ffffff_1x400.png
- ui-bg_glass_75_dadada_1x400.png
- ui-bg_glass_75_e6e6e6_1x400.png
- ui-bg_glass_95_fef1ec_1x400.png
- ui-bg_highlight-soft_75_cccccc_1x100.png
- ui-icons_222222_256x240.png
- ui-icons_2e83ff_256x240.png
- ui-icons_454545_256x240.png
- ui-icons_888888_256x240.png
- ui-icons_cd0a0a_256x240.png
- js
- colorpicker
- css
- img
- colorpicker_overlay.png
- colorpicker_select.gif
- custom_background.png
- custom_cancel.png
- custom_hex.png
- custom_hsb_b.png
- custom_hsb_h.png
- custom_hsb_s.png
- custom_indic.gif
- custom_rgb_b.png
- custom_rgb_g.png
- custom_rgb_r.png
- custom_submit.png
- js
- elrte
- css
- img
- elrte-toolbar.png
- pixel.gif
- js
- lang
- obj
- Debug
- DesignTimeResolveAssemblyReferences.cache
- DesignTimeResolveAssemblyReferencesInput.cache
- ResGen.read.1.tlog
- ResGen.write.1.tlog
- TempPE
- VisualJS.Web.Forms.SliderControl.resources
- WebControls.csproj.FileListAbsolute.txt
- WebControls.dll
- WebControls.pdb
- x86
- Debug
- DesignTimeResolveAssemblyReferencesInput.cache
- ResGen.read.1.tlog
- ResGen.write.1.tlog
- TempPE
- VisualJS.Web.Forms.SliderControl.resources
- WebControls.csproj.FileListAbsolute.txt
- WebControls.dll
- WebControls.pdb
- Properties
- slider
- css
- img
- arrows.png
- bullets.png
- loading.gif
- js
- spinner
- css
- img
- ui-bg_diagonals-thick_18_b81900_40x40.png
- ui-bg_diagonals-thick_20_666666_40x40.png
- ui-bg_flat_10_000000_40x100.png
- ui-bg_glass_100_f6f6f6_1x400.png
- ui-bg_glass_100_fdf5ce_1x400.png
- ui-bg_glass_65_ffffff_1x400.png
- ui-bg_gloss-wave_35_f6a828_500x100.png
- ui-bg_highlight-soft_100_eeeeee_1x100.png
- ui-bg_highlight-soft_75_ffe45c_1x100.png
- ui-icons_222222_256x240.png
- ui-icons_228ef1_256x240.png
- ui-icons_ef8c08_256x240.png
- ui-icons_ffd27a_256x240.png
- ui-icons_ffffff_256x240.png
- js
- Web
- WebControls.csproj
- WebControls.csproj.user
- SpinnerTest
- VisualJSSetup_1.042.zip
- spinner-noexe.zip
|
VSJS_ColorPicker.prototype = new VSJS_CBase();
function VSJS_ColorPicker(_name) {
VSJS_CBase.call(this);
var _this = this;
_this.CID = "ColorPicker";
_this.InitializeLayer(_name, "TEXT", false);
var _i = _this.GetInputElement();
VSJS_MaskedTextBox.MaskBinder(_this);
_i.className = "VSJS_TextBox";
var _l = _this.GetLayerElement();
_this.leaved = function () {
_this.cShow.style.backgroundColor = _this.Text();
};
JTool.AttachElementEvent(_i, "blur", _this.leaved);
JTool.AttachElementEvent(_i, "keyup", function () {
if (_this._Rendered && !JTool.Touch) {
$(_i).ColorPickerSetColor(_this.Text());
};
});
_this.TextUpdated = function (txt) {
if (_this._Rendered && !JTool.Touch) {
$(_i).ColorPickerSetColor(txt);
_this.cShow.style.backgroundColor = txt;
};
};
_l.style.overflow = "hidden";
_this.cShow = document.createElement("div");
_this.cShow.style.cssText = "position:absolute;display:block;border:solid 1px #000;width:15px;height:15px;z-index:2;top:2px;right:3px;";
_l.appendChild(_this.cShow);
_this.cShow.onmousedown = function () {
if (_this._Rendered && !JTool.Touch) {
$(_i).ColorPickerShow();
};
};
_this.bdDiff = -1;
_this.borderStyle = LayerBase.Border.Fixed3D;
_this.OnSizeChanged = function (w, h) {
if (w <= 1 || h <= 1) {
return;
};
if (_this.bdDiff == -1) {
_this.bdDiff = 4;
};
_i.style.width = w - _this.bdDiff + "px";
_i.style.height = h - _this.bdDiff + "px";
};
_this.BorderStyleUpdated = function (s) {
var oldBd = _this.bdDiff;
switch (s) {
case LayerBase.Border.None:
_this.bdDiff = 0;
_i.style.boxShadow = "none";
break;
case LayerBase.Border.FixedSingle:
case LayerBase.Border.Fixed3D:
_this.bdDiff = 4;
_i.style.boxShadow = "";
break;
default:
_this.bdDiff = 4;
_i.style.boxShadow = "";
};
if (oldBd == -1) {
oldBd = _this.bdDiff;
};
var sz = _this.Size();
var d = oldBd - _this.bdDiff;
_this.OnSizeChanged(sz.w - d, sz.h - d);
};
_this.OnRenderCompleted = function () {
_l._frm = _this._Form;
var txt = _this.Text();
if (!JTool.Touch) {
$(_i).ColorPicker({
onSubmit: function (hsb, hex, rgb, el) {
if (hex.length == 0) {
return;
};
var cc = JTool.Trim(hex);
if (cc.charAt(0) != '#') {
cc = "#" + cc;
};
$(_i).val(cc);
_this.cShow.style.backgroundColor = cc;
$(_i).ColorPickerHide();
if (_this.OnChanged != null) {
_this.OnChanged(_this.Name, null);
};
},
onCancel: function () {
$(_i).ColorPickerHide();
}
});
$(_i).ColorPickerSetColor(txt);
_this.cShow.style.backgroundColor = txt;
};
_this.Mask();
_this.stChangedIndex = _this._Form.InnerStatusChanged.push(_this.StChanged) - 1;
};
_this.clientSize = { w: 0, h: 0 };
_this.OnControlRemoved = function () {
if (_this._Rendered) {
_this.Hide();
};
if (_this.stChangedIndex != null) {
_this._Form.InnerStatusChanged[_this.stChangedIndex] = null;
};
};
_this.Show = function () {
if (_this._Rendered && !JTool.Touch) {
$(_i).ColorPickerShow();
};
};
_this.Hide = function () {
if (_this._Rendered && !JTool.Touch) {
$(_i).ColorPickerHide();
};
};
_this.StChanged = function (name, sta) {
_this.Hide();
};
_this.CharacterCasing("upper");
_this.Text("FFFFFF");
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.