webgui/www/extras/yui-ext/docs/overview-summary-CheckboxEditor.js.html
JT Smith 4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00

116 lines
4 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
parent.document.title="CheckboxEditor.js Overview";
}
</script>
</head>
<body bgcolor="white" onload="asd();" style="margin:15px;">
<center>
<h2>CheckboxEditor.js</h2>
</center>
<h4>Summary</h4>
<p>
</p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2" class="title-cell">
<b>Class Summary</b>
</td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td width="15%"><b><a href="YAHOO.ext.grid.CheckboxEditor.html">YAHOO.ext.grid.CheckboxEditor</a></b></td>
<td>&nbsp;</td>
</tr>
</table>
<hr/>
<!-- ========== METHOD SUMMARY =========== -->
<!-- ========== END METHOD SUMMARY =========== -->
<pre class="sourceview">
YAHOO.ext.grid.CheckboxEditor = <span class="reserved">function</span>(){
var div = document.createElement(<span class="literal">'span'</span>);
div.className = <span class="literal">'ygrid-editor ygrid-checkbox-editor'</span>;
var cb = document.createElement(<span class="literal">'input'</span>);
cb.type = <span class="literal">'checkbox'</span>;
cb.setAttribute(<span class="literal">'autocomplete'</span>, <span class="literal">'off'</span>);
div.appendChild(cb);
document.body.appendChild(div);
YAHOO.ext.grid.CheckboxEditor.superclass.constructor.call(<span class="reserved">this</span>, div);
div.tabIndex = <span class="literal">''</span>;
cb.tabIndex = 1;
<span class="reserved">this</span>.cb = getEl(cb, true);
};
YAHOO.extendX(YAHOO.ext.grid.CheckboxEditor, YAHOO.ext.grid.CellEditor);
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.fitToCell = <span class="reserved">function</span>(box){
<span class="reserved">this</span>.element.setBox(box, true);
};
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.setValue = <span class="reserved">function</span>(value){
<span class="reserved">this</span>.cb.dom.checked = (value === true || value === <span class="literal">'true'</span> || value === 1 || value === <span class="literal">'1'</span>);
};
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.getValue = <span class="reserved">function</span>(){
<span class="reserved">return</span> <span class="reserved">this</span>.cb.dom.checked;
};
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.show = <span class="reserved">function</span>(){
<span class="reserved">this</span>.element.show();
<span class="reserved">this</span>.cb.focus();
};
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.initEvents = <span class="reserved">function</span>(){
var stopOnEnter = <span class="reserved">function</span>(e){
<span class="reserved">if</span>(e.browserEvent.keyCode == e.RETURN){
<span class="reserved">this</span>.stopEditing(true);
}
}
<span class="reserved">this</span>.cb.mon(<span class="literal">'keydown'</span>, stopOnEnter, <span class="reserved">this</span>, true);
<span class="reserved">this</span>.cb.on(<span class="literal">'blur'</span>, <span class="reserved">this</span>.stopEditing, <span class="reserved">this</span>, true);
};
YAHOO.ext.grid.CheckboxEditor.<span class="reserved">prototype</span>.hide = <span class="reserved">function</span>(){
try{
<span class="reserved">this</span>.cb.dom.blur();
}catch(e){}
<span class="reserved">this</span>.element.hide();
};</pre>
<hr>
<hr>
<font size="-1">
</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sat Oct 14 06:07:10 2006</div>
</body>
</html>