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>
131 Causes ctrl/drag operations to copy nodes rather than move.
147 <tr class="config-row expandable config-row-alt1 notInherited">
148 <td class="micon"><a class="exi" href="#expand"> </a></td>
151 <a id="Roo.DDView-cfg-copy" name=".copy"></a>
152 <div class="fixedFont">
153 <b class="itemname">copy</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
159 <div class="short">Causes drag operations to copy nodes rather than move.</div>
164 Causes drag operations to copy nodes rather than move.
180 <tr class="config-row expandable config-row-alt0 notInherited">
181 <td class="micon"><a class="exi" href="#expand"> </a></td>
184 <a id="Roo.DDView-cfg-dragGroup" name=".dragGroup"></a>
185 <div class="fixedFont">
186 <b class="itemname">dragGroup</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array
192 <div class="short">The ddgroup name(s) for the View's DragZone.</div>
197 The ddgroup name(s) for the View's DragZone.
213 <tr class="config-row expandable config-row-alt1 notInherited">
214 <td class="micon"><a class="exi" href="#expand"> </a></td>
217 <a id="Roo.DDView-cfg-dropGroup" name=".dropGroup"></a>
218 <div class="fixedFont">
219 <b class="itemname">dropGroup</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array
225 <div class="short">The ddgroup name(s) for the View's DropZone.</div>
230 The ddgroup name(s) for the View's DropZone.
256 <!-- ============================== public properties ==================== -->
260 <a id="Roo.DDView-props"></a>
266 <table cellspacing="0" class="member-table">
267 <caption class="Empty">Public Properties - Has None</caption>
273 <!-- ============================== methods summary / details ======================== -->
276 <a id="Roo.DDView-methods"></a>
277 <!-- constructor?? -->
284 <!-- then dynamics first -->
291 <table cellspacing="0" class="member-table">
292 <caption>Public Methods</caption>
294 <th class="sig-header" colspan="2">Method</th>
295 <th class="msource-header">Defined By</th>
305 <tr class="method-row config-row-alt0 expandable notInherited">
306 <td class="micon"><a class="exi" href="#expand"> </a></td>
310 <a id="Roo-method-DDView" name=".DDView"></a>
311 <div class="fixedFont">
312 <span class="attributes">new <B>Roo.</B></span><b class="itemname">DDView</b>
314 (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>)
322 <div class="short">Create a new Roo.DDView</div>
329 Create a new Roo.DDView
332 <dl class="detailList">
333 <dt class="heading">Parameters:</dt>
336 <span class="fixedFont">Element/String</span> <b>container</b>
339 <dd>The Element in which to create the View.</dd>
342 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>tpl</b>
345 <dd>The template string used to create the markup for each element of the View</dd>
348 <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>
351 <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>
375 <tr class="method-row config-row-alt1 expandable notInherited">
376 <td class="micon"><a class="exi" href="#expand"> </a></td>
380 <a id="Roo.DDView-method-getContextMenu" name=".getContextMenu"></a>
381 <div class="fixedFont">
382 <span class="attributes"></span><b class="itemname">getContextMenu</b>
391 <div class="short">Return the context menu for this DDView.</div>
397 Return the context menu for this DDView.
426 <tr class="method-row config-row-alt0 expandable notInherited">
427 <td class="micon"><a class="exi" href="#expand"> </a></td>
431 <a id="Roo.DDView-method-getDragData" name=".getDragData"></a>
432 <div class="fixedFont">
433 <span class="attributes"></span><b class="itemname">getDragData</b>
442 <div class="short">Create the drag data which consists of an object which has the property "ddel" as<br/> the drag proxy element.</div>
448 Create the drag data which consists of an object which has the property "ddel" as<br/> the drag proxy element.
477 <tr class="method-row config-row-alt1 expandable notInherited">
478 <td class="micon"><a class="exi" href="#expand"> </a></td>
482 <a id="Roo.DDView-method-getDropPoint" name=".getDropPoint"></a>
483 <div class="fixedFont">
484 <span class="attributes"></span><b class="itemname">getDropPoint</b>
493 <div class="short">Decide whether to drop above or below a View node.</div>
499 Decide whether to drop above or below a View node.
528 <tr class="method-row config-row-alt0 expandable notInherited">
529 <td class="micon"><a class="exi" href="#expand"> </a></td>
533 <a id="Roo.DDView-method-getName" name=".getName"></a>
534 <div class="fixedFont">
535 <span class="attributes"></span><b class="itemname">getName</b>
544 <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>
550 Allows this class to be an Roo.form.Field so it can be found using {<b>link</b> Roo.form.BasicForm<b>findField</b>}.
579 <tr class="method-row config-row-alt1 expandable notInherited">
580 <td class="micon"><a class="exi" href="#expand"> </a></td>
584 <a id="Roo.DDView-method-getTargetFromEvent" name=".getTargetFromEvent"></a>
585 <div class="fixedFont">
586 <span class="attributes"></span><b class="itemname">getTargetFromEvent</b>
595 <div class="short">Part of the Roo.dd.DropZone interface.</div>
601 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.
630 <tr class="method-row config-row-alt0 expandable notInherited">
631 <td class="micon"><a class="exi" href="#expand"> </a></td>
635 <a id="Roo.DDView-method-getValue" name=".getValue"></a>
636 <div class="fixedFont">
637 <span class="attributes"></span><b class="itemname">getValue</b>
645 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
654 <div class="short"></div>
671 <dl class="detailList">
672 <dt class="heading">Returns:</dt>
674 <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>
696 <tr class="method-row config-row-alt1 expandable notInherited">
697 <td class="micon"><a class="exi" href="#expand"> </a></td>
701 <a id="Roo.DDView-method-onDblClick" name=".onDblClick"></a>
702 <div class="fixedFont">
703 <span class="attributes"></span><b class="itemname">onDblClick</b>
712 <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>
718 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.
747 <tr class="method-row config-row-alt0 expandable notInherited">
748 <td class="micon"><a class="exi" href="#expand"> </a></td>
752 <a id="Roo.DDView-method-remove" name=".remove"></a>
753 <div class="fixedFont">
754 <span class="attributes"></span><b class="itemname">remove</b>
756 (<a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Number <B><i>selectedIndices</i></B>)
763 <div class="short">Remove {<b>link</b> Roo.data.Record}s at the specified indices.</div>
769 Remove {<b>link</b> Roo.data.Record}s at the specified indices.
776 <dl class="detailList">
777 <dt class="heading">Parameters:</dt>
780 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Number</span> <b>selectedIndices</b>
783 <dd>The index (or Array of indices) of Records to remove.</dd>
809 <tr class="method-row config-row-alt1 expandable notInherited">
810 <td class="micon"><a class="exi" href="#expand"> </a></td>
814 <a id="Roo.DDView-method-setDeletable" name=".setDeletable"></a>
815 <div class="fixedFont">
816 <span class="attributes"></span><b class="itemname">setDeletable</b>
818 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>imageUrl</i></B>)
825 <div class="short">Utility method.</div>
831 Utility method. Add a delete option to the DDView's context menu.
838 <dl class="detailList">
839 <dt class="heading">Parameters:</dt>
842 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>imageUrl</b>
845 <dd>The URL of the "delete" icon image.</dd>
871 <tr class="method-row config-row-alt0 expandable notInherited">
872 <td class="micon"><a class="exi" href="#expand"> </a></td>
876 <a id="Roo.DDView-method-setDraggable" name=".setDraggable"></a>
877 <div class="fixedFont">
878 <span class="attributes"></span><b class="itemname">setDraggable</b>
887 <div class="short">Specify to which ddGroup items in this DDView may be dragged.</div>
893 Specify to which ddGroup items in this DDView may be dragged.
922 <tr class="method-row config-row-alt1 expandable notInherited">
923 <td class="micon"><a class="exi" href="#expand"> </a></td>
927 <a id="Roo.DDView-method-setDroppable" name=".setDroppable"></a>
928 <div class="fixedFont">
929 <span class="attributes"></span><b class="itemname">setDroppable</b>
938 <div class="short">Specify from which ddGroup this DDView accepts drops.</div>
944 Specify from which ddGroup this DDView accepts drops.
973 <tr class="method-row config-row-alt0 expandable notInherited">
974 <td class="micon"><a class="exi" href="#expand"> </a></td>
978 <a id="Roo.DDView-method-setValue" name=".setValue"></a>
979 <div class="fixedFont">
980 <span class="attributes"></span><b class="itemname">setValue</b>
989 <div class="short">Loads the View from a JSON string representing the Records to put into the Store.</div>
995 Loads the View from a JSON string representing the Records to put into the Store.
1016 <td class="msource">
1027 <!-- ============================== events summary / details ======================== -->
1030 <a id="Roo.DDView-events"></a>
1036 <table cellspacing="0" class="member-table">
1037 <caption class="Empty">Events - Has None</caption>
1048 <!-- ============================== footer ================================= -->
1049 <div class="fineprint" style="clear:both">
1051 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Mon Mar 21 2016 14:31:23 GMT+0800 (HKT)
1053 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>