1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.DDView</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.DDView-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.DDView-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.DDView-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.DDView-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
57 <tr><td class="label">Defined In:</td><td class="hd-info">
59 <a href="./src/Roo_DDView.js.html">Roo/DDView.js</a>.
62 <tr><td class="label">Class:</td><td class="hd-info">DDView</td></tr>
70 <!-- ============================== class summary ========================== -->
71 <div class="description">
72 A DnD enabled version of Roo.View.
76 <!-- ============================== Class comment block... ========================== -->
78 <div class="comments">
79 <b>Class Comments / Notes</B> =>
80 <u onclick="parent.CommentDialog.showCommentId = 'Roo.DDView';">[Add Your comment/notes about this class]</u>
82 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
83 src="/blog.php/GtkDjsComments/Roo.DDView.html"></iframe>
88 <!-- ============================== config options ========================== -->
93 <div class="hr"></div>
94 <a id="Roo.DDView-configs"></a>
100 <table cellspacing="0" class="member-table">
101 <caption>Config Options (Usually are also Properties)</caption>
105 <th class="sig-header" colspan="2">Options</th>
107 <th class="msource-header">Defined By</th>
114 <tr class="config-row expandable config-row-alt0 notInherited">
115 <td class="micon"><a class="exi" href="#expand"> </a></td>
118 <a id="Roo.DDView-cfg-allowCopy" name=".allowCopy"></a>
119 <div class="fixedFont">
120 <b class="itemname">allowCopy</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
126 <div class="short">Causes ctrl/drag operations to copy nodes rather than move.</div>
130 <div class="long">Causes ctrl/drag operations to copy nodes rather than move.</div>
144 <tr class="config-row expandable config-row-alt1 notInherited">
145 <td class="micon"><a class="exi" href="#expand"> </a></td>
148 <a id="Roo.DDView-cfg-copy" name=".copy"></a>
149 <div class="fixedFont">
150 <b class="itemname">copy</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
156 <div class="short">Causes drag operations to copy nodes rather than move.</div>
160 <div class="long">Causes drag operations to copy nodes rather than move.</div>
174 <tr class="config-row expandable config-row-alt0 notInherited">
175 <td class="micon"><a class="exi" href="#expand"> </a></td>
178 <a id="Roo.DDView-cfg-dragGroup" name=".dragGroup"></a>
179 <div class="fixedFont">
180 <b class="itemname">dragGroup</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array
186 <div class="short">The ddgroup name(s) for the View's DragZone.</div>
190 <div class="long">The ddgroup name(s) for the View's DragZone.</div>
204 <tr class="config-row expandable config-row-alt1 notInherited">
205 <td class="micon"><a class="exi" href="#expand"> </a></td>
208 <a id="Roo.DDView-cfg-dropGroup" name=".dropGroup"></a>
209 <div class="fixedFont">
210 <b class="itemname">dropGroup</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array
216 <div class="short">The ddgroup name(s) for the View's DropZone.</div>
220 <div class="long">The ddgroup name(s) for the View's DropZone.</div>
244 <!-- ============================== public properties ==================== -->
248 <a id="Roo.DDView-props"></a>
254 <table cellspacing="0" class="member-table">
255 <caption class="Empty">Public Properties - Has None</caption>
261 <!-- ============================== methods summary / details ======================== -->
264 <a id="Roo.DDView-methods"></a>
265 <!-- constructor?? -->
272 <!-- then dynamics first -->
279 <table cellspacing="0" class="member-table">
280 <caption>Public Methods</caption>
282 <th class="sig-header" colspan="2">Method</th>
283 <th class="msource-header">Defined By</th>
293 <tr class="method-row config-row-alt0 expandable notInherited">
294 <td class="micon"><a class="exi" href="#expand"> </a></td>
298 <a id="Roo-method-DDView" name=".DDView"></a>
299 <div class="fixedFont">
300 <span class="attributes">new <B>Roo.</B></span><b class="itemname">DDView</b>
302 (Element/String <B><i>container</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>tpl</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
310 <div class="short">Create a new Roo.DDView</div>
317 Create a new Roo.DDView
320 <dl class="detailList">
321 <dt class="heading">Parameters:</dt>
324 <span class="fixedFont">Element/String</span> <b>container</b>
327 <dd>The Element in which to create the View.</dd>
330 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>tpl</b>
333 <dd>The template string used to create the markup for each element of the View</dd>
336 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
339 <dd>The configuration properties. These include all the config options of<br/>{<b>link</b> Roo.View} plus some specific to this class.<br><br/><p><br/>Drag/drop is implemented by adding {<b>link</b> Roo.data.Record}s to the target DDView. If copying is<br/>not being performed, the original {<b>link</b> Roo.data.Record} is removed from the source DDView.<br><br/><p><br/>The following extra CSS rules are needed to provide insertion point highlighting:<pre><code><br/>.x-view-drag-insert-above {<br/> border-top:1px dotted #3366cc;<br/>}<br/>.x-view-drag-insert-below {<br/> border-bottom:1px dotted #3366cc;<br/>}<br/></code></pre></dd>
363 <tr class="method-row config-row-alt1 expandable notInherited">
364 <td class="micon"><a class="exi" href="#expand"> </a></td>
368 <a id="Roo.DDView-method-getContextMenu" name=".getContextMenu"></a>
369 <div class="fixedFont">
370 <span class="attributes"></span><b class="itemname">getContextMenu</b>
379 <div class="short">Return the context menu for this DDView.</div>
385 Return the context menu for this DDView.
414 <tr class="method-row config-row-alt0 expandable notInherited">
415 <td class="micon"><a class="exi" href="#expand"> </a></td>
419 <a id="Roo.DDView-method-getDragData" name=".getDragData"></a>
420 <div class="fixedFont">
421 <span class="attributes"></span><b class="itemname">getDragData</b>
430 <div class="short">Create the drag data which consists of an object which has the property "ddel" as<br/> the drag proxy element.</div>
436 Create the drag data which consists of an object which has the property "ddel" as<br/> the drag proxy element.
465 <tr class="method-row config-row-alt1 expandable notInherited">
466 <td class="micon"><a class="exi" href="#expand"> </a></td>
470 <a id="Roo.DDView-method-getDropPoint" name=".getDropPoint"></a>
471 <div class="fixedFont">
472 <span class="attributes"></span><b class="itemname">getDropPoint</b>
481 <div class="short">Decide whether to drop above or below a View node.</div>
487 Decide whether to drop above or below a View node.
516 <tr class="method-row config-row-alt0 expandable notInherited">
517 <td class="micon"><a class="exi" href="#expand"> </a></td>
521 <a id="Roo.DDView-method-getName" name=".getName"></a>
522 <div class="fixedFont">
523 <span class="attributes"></span><b class="itemname">getName</b>
532 <div class="short">Allows this class to be an Roo.form.Field so it can be found using {<b>link</b> Roo.form.BasicForm<b>findField</b>}.</div>
538 Allows this class to be an Roo.form.Field so it can be found using {<b>link</b> Roo.form.BasicForm<b>findField</b>}.
567 <tr class="method-row config-row-alt1 expandable notInherited">
568 <td class="micon"><a class="exi" href="#expand"> </a></td>
572 <a id="Roo.DDView-method-getTargetFromEvent" name=".getTargetFromEvent"></a>
573 <div class="fixedFont">
574 <span class="attributes"></span><b class="itemname">getTargetFromEvent</b>
583 <div class="short">Part of the Roo.dd.DropZone interface.</div>
589 Part of the Roo.dd.DropZone interface. If no target node is found, the<br/> whole Element becomes the target, and this causes the drop gesture to append.
618 <tr class="method-row config-row-alt0 expandable notInherited">
619 <td class="micon"><a class="exi" href="#expand"> </a></td>
623 <a id="Roo.DDView-method-getValue" name=".getValue"></a>
624 <div class="fixedFont">
625 <span class="attributes"></span><b class="itemname">getValue</b>
633 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
642 <div class="short"></div>
659 <dl class="detailList">
660 <dt class="heading">Returns:</dt>
662 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> a parenthesised list of the ids of the Records in the View.</dd>
684 <tr class="method-row config-row-alt1 expandable notInherited">
685 <td class="micon"><a class="exi" href="#expand"> </a></td>
689 <a id="Roo.DDView-method-onDblClick" name=".onDblClick"></a>
690 <div class="fixedFont">
691 <span class="attributes"></span><b class="itemname">onDblClick</b>
700 <div class="short">Double click fires the event, but also, if this is draggable, and there is only one other<br/> related DropZone, it transfers the selected node.</div>
706 Double click fires the event, but also, if this is draggable, and there is only one other<br/> related DropZone, it transfers the selected node.
735 <tr class="method-row config-row-alt0 expandable notInherited">
736 <td class="micon"><a class="exi" href="#expand"> </a></td>
740 <a id="Roo.DDView-method-remove" name=".remove"></a>
741 <div class="fixedFont">
742 <span class="attributes"></span><b class="itemname">remove</b>
744 (<a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Number <B><i>selectedIndices</i></B>)
751 <div class="short">Remove {<b>link</b> Roo.data.Record}s at the specified indices.</div>
757 Remove {<b>link</b> Roo.data.Record}s at the specified indices.
764 <dl class="detailList">
765 <dt class="heading">Parameters:</dt>
768 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Number</span> <b>selectedIndices</b>
771 <dd>The index (or Array of indices) of Records to remove.</dd>
797 <tr class="method-row config-row-alt1 expandable notInherited">
798 <td class="micon"><a class="exi" href="#expand"> </a></td>
802 <a id="Roo.DDView-method-setDeletable" name=".setDeletable"></a>
803 <div class="fixedFont">
804 <span class="attributes"></span><b class="itemname">setDeletable</b>
806 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>imageUrl</i></B>)
813 <div class="short">Utility method.</div>
819 Utility method. Add a delete option to the DDView's context menu.
826 <dl class="detailList">
827 <dt class="heading">Parameters:</dt>
830 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>imageUrl</b>
833 <dd>The URL of the "delete" icon image.</dd>
859 <tr class="method-row config-row-alt0 expandable notInherited">
860 <td class="micon"><a class="exi" href="#expand"> </a></td>
864 <a id="Roo.DDView-method-setDraggable" name=".setDraggable"></a>
865 <div class="fixedFont">
866 <span class="attributes"></span><b class="itemname">setDraggable</b>
875 <div class="short">Specify to which ddGroup items in this DDView may be dragged.</div>
881 Specify to which ddGroup items in this DDView may be dragged.
910 <tr class="method-row config-row-alt1 expandable notInherited">
911 <td class="micon"><a class="exi" href="#expand"> </a></td>
915 <a id="Roo.DDView-method-setDroppable" name=".setDroppable"></a>
916 <div class="fixedFont">
917 <span class="attributes"></span><b class="itemname">setDroppable</b>
926 <div class="short">Specify from which ddGroup this DDView accepts drops.</div>
932 Specify from which ddGroup this DDView accepts drops.
961 <tr class="method-row config-row-alt0 expandable notInherited">
962 <td class="micon"><a class="exi" href="#expand"> </a></td>
966 <a id="Roo.DDView-method-setValue" name=".setValue"></a>
967 <div class="fixedFont">
968 <span class="attributes"></span><b class="itemname">setValue</b>
977 <div class="short">Loads the View from a JSON string representing the Records to put into the Store.</div>
983 Loads the View from a JSON string representing the Records to put into the Store.
1004 <td class="msource">
1015 <!-- ============================== events summary / details ======================== -->
1018 <a id="Roo.DDView-events"></a>
1024 <table cellspacing="0" class="member-table">
1025 <caption class="Empty">Events - Has None</caption>
1036 <!-- ============================== footer ================================= -->
1037 <div class="fineprint" style="clear:both">
1039 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Tue Jul 27 2010 11:08:31 GMT+0800 (HKT)
1041 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>