]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Documents/Popup_picker.html
Release 6.4.0
[Github/sugarcrm.git] / modules / Documents / Popup_picker.html
1 <!--
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 -->
38
39 <!-- BEGIN: main -->
40 <!-- BEGIN: SearchHeader -->
41 <table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
42 <tr>
43 <td>
44 <form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
45 <table width="100%" border="0" cellspacing="0" cellpadding="0">
46
47 <tr>
48 <td scope="row" nowrap="nowrap">{MOD.LBL_DOC_NAME}</td>
49 <td  nowrap="nowrap"><input type="text" name="document_name"  size="10" value="{DOCUMENT_NAME}"/></td>
50 <td scope="row" nowrap="nowrap">{MOD.LBL_DET_IS_TEMPLATE}</td>
51 <td  nowrap="nowrap"><select name="is_template"  >{IS_TEMPLATE_OPTIONS}</select></td>
52 </tr>
53 <tr>
54 <td scope="row" nowrap="nowrap">{MOD.LBL_DET_TEMPLATE_TYPE}</td>
55 <td  nowrap="nowrap"><select name="template_type"  >{TEMPLATE_TYPE_OPTIONS}</select></td>
56 <td scope="row" nowrap="nowrap">{MOD.LBL_CATEGORY_VALUE}</td>
57 <td  nowrap="nowrap"><select name="category_id"  >{CATEGORY_OPTIONS}</select></td>
58 </tr>
59 <tr>
60 <td scope="row" nowrap="nowrap">{MOD.LBL_SUBCATEGORY_VALUE}</td>
61 <td  nowrap="nowrap"><select name="subcategory_id"  >{SUB_CATEGORY_OPTIONS}</select></td>
62 <td align="right" colspan=2>
63 <input type="hidden" name="module" value="{MODULE_NAME}" />
64 <input type="hidden" name="action" value="Popup" />
65 <input type="hidden" name="query" value="true" />
66 <input type="hidden" name="func_name" value="" />
67 <input type="hidden" name="request_data" value="{request_data}" />
68 <input type="hidden" name="populate_parent" value="false" />
69 <input type="hidden" name="record_id" value="" />
70 <input type="submit" name="button" class="button"
71     id="search_form_submit"
72         title="{APP.LBL_SEARCH_BUTTON_TITLE}"
73         accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
74         value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
75 </td>
76 </tr>
77 </table>
78 </form>
79 </td>
80 </tr>
81 </table>
82 <!-- BEGIN: TreeView -->
83 <script type="text/javascript" src="include/javascript/popup_helper.js?v={VERSION_MARK}"></script>
84 <script type='text/javascript' src='include/javascript/yui/build/connection/connection.js'></script>
85 {SITEURL}
86 {TREEHEADER}
87 {SET_RETURN_JS}
88
89 <script>
90 function select_document(treeid) {
91         var node=YAHOO.namespace(treeid).selectednode;
92         send_back('Documents',node.data.id);
93 }
94
95 function populate_parent_search(treeid) {
96         var node=YAHOO.namespace(treeid).selectednode;
97                 
98         if (node.depth==1) {
99                 new_subcategory_id=node.data.id;
100                 if (new_subcategory_id == 'null') new_subcategory_id='';
101                 new_category_id=node.parent.data.id;
102                 if (new_category_id == 'null') new_category_id='';
103         } else {
104                 new_category_id=node.data.id;
105                 if (new_category_id == 'null') new_category_id='';
106                 new_subcategory_id='';  
107         }
108
109         if(!window.opener.document.getElementById('Documentsadvanced_searchSearchForm')) {
110                 window.opener.location = 'index.php?searchFormTab=advanced_search&module=Documents&action=index&query=true&category_id_advanced' +'='+escape(new_category_id)+'&subcategory_id_advanced='+escape(new_subcategory_id);
111         } else {
112                 var searchTab = (window.opener.document.getElementById('Documentsadvanced_searchSearchForm').style.display == '') ? 'advanced' : 'basic';
113                 window.opener.location = 'index.php?searchFormTab='+searchTab+'_search&module=Documents&action=index&query=true&category_id_'+searchTab+'='+escape(new_category_id)+'&subcategory_id_'+searchTab+'='+escape(new_subcategory_id);
114         }
115         window.close();
116 }
117
118 function populate_search(treeid) {
119         var node=YAHOO.namespace(treeid).selectednode;
120
121         if (node.depth==1) {
122                 new_subcategory_id=node.data.id;
123                 if (new_subcategory_id == 'null') new_subcategory_id='';
124                 new_category_id=node.parent.data.id;
125                 if (new_category_id == 'null') new_category_id='';
126         } else {
127                 new_category_id=node.data.id;
128                 if (new_category_id == 'null') new_category_id='';
129                 new_subcategory_id='';  
130         }
131
132
133         document.popup_query_form.subcategory_id.value=new_subcategory_id;
134         document.popup_query_form.category_id.value=new_category_id;
135         
136         document.popup_query_form.submit();
137 }
138 </script>
139
140 <table cellpadding="0" cellspacing="0" style="border-left:1px solid; border-right:1px solid; border-bottom:1px solid" width="100%" class="edit view">
141
142 <tr>
143         <td width="100%" valign="top" style="border-right: 1px">
144                 <div id="doctree">
145                         {TREEINSTANCE}
146                 </div>
147         </td>
148 </tr>
149 </table>
150 <!-- END: TreeView -->
151
152
153
154 <!-- END: SearchHeader -->
155 <table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
156 <!-- BEGIN: list_nav_row -->
157 {PAGINATION}
158 <!-- END: list_nav_row -->
159 <tr height="20" >
160 <td scope="col" width="33%"  nowrap="nowrap"><a href="{ORDER_BY}document_name" class="listViewThLinkS1">{MOD.LBL_LIST_DOCUMENT}{arrow_start}{name_arrow}{arrow_end}</a></td>
161 <td scope="col" width="33%"  nowrap="nowrap">{MOD.LBL_LIST_REVISION}</td>
162 <td scope="col" width="34%"  nowrap="nowrap">{MOD.LBL_LIST_STATUS}</td>
163 </tr>
164 <!-- BEGIN: row -->
165 <tr height="20" class="{ROW_COLOR}S1">
166 <td scope="row" valign="top"><a href="#" onclick="send_back('Documents','{DOCUMENT.ID}');" >{DOCUMENT.DOCUMENT_NAME}</a></td>
167 <td valign="top">{DOCUMENT.LATEST_REVISION}</td>
168 <td valign="top">{DOCUMENT.STATUS_ID}</td>
169 </tr>
170
171 <!-- END: row -->
172 </table>
173 {ASSOCIATED_JAVASCRIPT_DATA}
174 <!-- END: main -->