Project

General

Profile

1
<%@ taglib prefix="s" uri="/struts-tags"%>
2
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
3
<%@ page contentType="text/html; charset=UTF-8"%>
4

    
5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
6
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7
   
8
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
9

    
10
<head>
11
	<sx:head />
12
	
13
	<title>DRIVER 
14
        <s:if test="%{#request.collectionQuery == null }">
15
            Create collection folder
16
        </s:if>
17
        <s:else>
18
            Create collection 
19
         </s:else>
20
     </title>
21
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
22
	
23
	<link type="text/css" href='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/<s:property value="#application['webInterfaceLayoutManager'].cssFileName" />' rel="stylesheet" />
24
	<link type="text/css" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/Roar/Roar.css" rel="stylesheet" />
25
	<link type="text/css" rel="stylesheet"  href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/yahooAssets/tree.css" />
26

    
27
	<link rel="shortcut icon" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/favicon.ico" />
28
	
29
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/Yahoo/treeview-min.js" />
30
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/dateFormat.js"></script>
31
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3-core.js"></script>
32
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3.1-more.js"></script>
33
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/smarthoverbox.js"></script>
34
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/Roar/Roar.js"></script>
35
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/selectTreeView.js"></script>
36

    
37
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/SqueezeBox/SqueezeBox.js"></script>
38
	<link href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/SqueezeBox/assets/SqueezeBox.css" rel="stylesheet" type="text/css" />
39
	<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/collections.js"></script>
40

    
41
	<script language="javascript">
42
		function check() {
43
			var name = document.getElementById('collectionName');
44
			var subject = document.getElementById('collectionSubject');
45
			var description = document.getElementById('collectionDescription');
46
			var collectionFatherId = document.getElementById('collectionFatherId');
47
			
48
			if (isEmpty(name)) {
49
				alert('Collection Name is empty');
50
				name.focus();
51
			} else if (isEmpty(subject)) {
52
				alert('Subject is empty');
53
				subject.focus();
54
			} else if (isEmpty(description)) {
55
				alert('Collection Description is empty');
56
				description.focus();
57
			} else if (isEmpty(collectionFatherId)) {
58
				alert('Collection must be placed in a user folder');
59
			} else
60
				saveCollection();
61
		}
62

    
63
		function isEmpty(field) {
64
			if (field.value == "" || field.value == null || 
65
					!isNaN(field.value) || field.value.charAt(0) == ' ') 
66
				return true;
67
			else
68
				return false;
69
		}
70

    
71
window.addEvent('domready', function() {
72
        SqueezeBox.initialize();
73
        /**
74
         * That CSS selector will find all <a> elements with the
75
         * attribute rel="popup" and href starting with a #.
76
         */
77
        SqueezeBox.assign($$('a[rel=popup][href^=#]'), {
78
                handler: 'adopt',
79
                overlayOpacity: 0.4,
80
                minSize: {x: 200, y: 200},
81
                maxSize: {x: 800, y:700},
82
                automaticResize: true,
83
                onOpen: function() {
84
                        this.content.getChildren().setStyle('display','block');
85
                        this.showContent();
86
                }, // unhide the divs
87
                onClose: function() {
88
                        var parent_id = $(this.url.match(/#([\w-]+)$/)[1]).get('id') + "_container";            // get the original parent id
89
                        this.content.getChildren().inject($(parent_id)).setStyle('display', 'none');    // inject back to parent and hide
90
                }
91
        });
92
        /**
93
         * Now hide corresponding divs 
94
         */
95
        $$('a[rel=popup][href^=#]').each(function(el) {
96
                        $(el.get('href').match(/#([\w-]+)$/)[1]).setStyle('display', 'none');
97
        });
98
});
99

    
100

    
101

    
102
	</script>
103
</head>
104

    
105
<body onload="javascript:formTree(true);">
106
	<div id="center">
107
		<div id="wrapper" class="wrapper_shadowleft wrapper_shadowright">
108
			<div id="container">
109
				<jsp:include page="/pages/banner.jsp" />
110
				<jsp:include page="/pages/menu.jsp">
111
					<jsp:param name="requestor" value="index" />
112
				</jsp:include>
113
				
114
				<div id="leftcolumn">
115
                	<b class="curved_top">
116
                        <b class="curved_t1"></b>
117
                        <b class="curved_t2"></b>
118
                        <b class="curved_t3"></b>
119
                        <b class="curved_t4"></b>
120
                    </b>
121
                    <div class="curved_container clearfix">
122
                        <div class="featured_top leftcolumn_top">Collections</div>
123
			
124
                        <div class="mydrivermenu2">
125
                                    <div class="tipHdr">tip</div>
126
                                    <div class="tipSection">
127
                                        <p>Create collections to reference your favourite documents.</p>
128
                                        <p>Use hierarchies and collection folders to better organize your space.</p>
129
                                        <p><a href="Help.action?type=collection">Learn more...</a></p>
130
                                    </div>
131
                                </div>
132
                    </div>
133
                    <b class="curved_bottom">
134
                        <b class="curved_b4"></b>
135
                        <b class="curved_b3"></b>
136
                        <b class="curved_b2"></b>
137
                        <b class="curved_b1"></b>
138
                    </b>
139
               </div>
140
			
141
				<div id="maincolumn2">
142
                	<div id="collectionPage">
143
                    	<b class="curved_top">
144
                            <b class="curved_t1"></b>
145
                            <b class="curved_t2"></b>
146
                            <b class="curved_t3"></b>
147
                            <b class="curved_t4"></b>
148
                        </b>
149
                        <div class="curved_container clearfix">
150
                            <div class="featured_top collectionPage_top">
151
                                <img src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/icons/collection.png" alt="DRIVER Collections" width="16" height="16" class="absmiddle" />
152
                                &nbsp;
153
                                <s:if test="%{#request.collectionQuery == null }">
154
                                Collection hierarchy - create a collection folder
155
                                </s:if>
156
                                <s:else>
157
                                Create collection
158
                                </s:else>    
159
                            </div>
160
                            
161
							<div class="mydriveritem col1">
162
                                <div class="content">
163
                                
164
	                                <s:if test="%{#request.collectionQuery == null }">
165
	                                    <div class="collectionField"> 
166
                                            <span class="collectionFieldComments">Create collection folders to organize your collections</span>
167
                                         </div>
168
                                    </s:if>
169
                                    <s:else>
170
                                        <div class="collectionField">
171
                                    <!--NMI
172
                                            <a  class="ovalbutton right" href="CreateCollection.action"><span>Create a collection folder</span></a>
173
                                    -->
174
									        <span class="collectionFieldComments">Use the following form to enter the collection information.</span>
175
                                         </div>
176
                                    </s:else>
177
                                    
178
                                    <jsp:include page="/pages/userMenu.jsp"></jsp:include>
179
                                    <div class="collectionField">&nbsp;</div>    
180
                                    <div class="collectionField">
181
                                    	<span class="collectionFieldComments">
182
                                            <s:if test="%{#request.collectionQuery == null }">
183
                                            	Choose parent collection folder to build your collection hierarhy:
184
                                            </s:if>
185
                                            <s:else>
186
                                                Choose collection folder to place the new collection: 
187
                                             </s:else>
188
                                        </span>
189
                                    </div>
190
                                    <div class="collectionField">
191
                                        <span class="collFieldNm">Current collection folder:</span> 
192
                                        <span id="collectionFather">My collections</span>
193
                                         <input type="hidden" id="collectionFatherId" value="InfoSpace" />
194
                                    	&nbsp;	
195
                                        <a class="ovalbutton" href="#tree" rel="popup"><span>Change...</span></a> &nbsp;&nbsp;&nbsp;
196
                                    </div>
197
                                    
198
                                    <div class="collectionField">
199
                                    
200
                                    <table class="collectionTbl">
201
			                             <tr class="collectionField">
202
                                            <td class="collFieldNm" width="30%">Name*</td>
203
                                            <td class="collectionField"><input type="text" name="name" id="collectionName" /></td>
204
                                        </tr>
205
                                        <tr class="collectionField">
206
                                            <td class="collFieldNm">Subject*</td>
207
                                            <td class="collectionField"><input type="text" name="subject" id="collectionSubject" /></td>
208
                                        </tr>
209
                                        <tr class="collectionField">
210
                                            <td class="collFieldNm">Description*</td>
211
                                            <td class="collectionField"><input type="text" name="description" id="collectionDescription" /></td>
212
                                        </tr>
213
                                        <tr class="collectionField">
214
                                            <td class="collFieldNm">Private 
215
                                            
216
                                            </td>
217
                                            <td class="collectionField"><input type="checkbox" name="Visible" value="Visible" id="collectionPrivate" />&nbsp;<span class="collectionFieldComments">not visible to other users</span></td>
218
                                        </tr>
219
                                        <tr class="collectionField">
220
                                            <td class="collFieldNm" >Query/Criteria</td>
221
                                            <td class="collectionField">
222
                                                <s:if test="%{#request.collectionQuery != null }">
223
                                                    <div id="collectionQueryCriteria"><s:property value="#request.collectionQuery" /></div>
224
                                                </s:if>
225
                                                <s:else>
226
                                                    <span class="collectionFieldComments">No query defined. This is a collection folder.</span>&nbsp;&nbsp;&nbsp;
227
                                                </s:else>
228
                                            </td>
229
                                        </tr>
230
                                        <tr class="collectionField">
231
                                            <td class="collFieldNm" >Owner</td>
232
                                            <td class="collectionField"><s:property value="#session.user.email" /></td>
233
                                        </tr>
234
                                        <tr class="collectionField">
235
                                            <td class="collFieldNm" >Collection image URL</td>
236
                                            <td class="collectionField"><input type="text" name="iconUrl" id="collectionIconUrl" /></td>
237
                                        </tr>
238
                                    </table>
239
                                    
240
                                    
241
                                    
242
                                    </div>
243
                                    
244
                                    <div class="collectionField">
245
                                    	<input type="button" value="Save" onclick="javascript:check();" />
246
                                    </div>
247
                                    <div class="collectionField">
248
                                    	&nbsp;
249
                                    </div>
250
                                    <div class="collectionField">
251
                                    	<span class="collectionFieldComments">fields with (*) are mandatory</span>
252
                                    </div>
253
                                </div>
254
							</div>
255
						</div>
256
                        <b class="curved_bottom">
257
                            <b class="curved_b4"></b>
258
                            <b class="curved_b3"></b>
259
                            <b class="curved_b2"></b>
260
                            <b class="curved_b1"></b>
261
                        </b>
262
                    </div>
263
                </div>
264
				<div id="footer"><s:action name="FooterPage" executeResult="true"/></div>
265
			</div>
266
		</div>
267
	</div>	
268

    
269
        <div id="tree_container" class="optiontable_container">
270
                <div id="tree" class="optiontable_content">
271
                        <div class="optiontable_content2">
272
                        	<div id="expandcontractdiv">
273
                        	        <a id="expand" href="#">Expand all</a> &nbsp;&nbsp;<a id="collapse" href="#">Collapse all</a>
274
                        	</div>
275
                        	<div id="treeDiv1"></div>
276
				<br/><br/>
277
				<a href="#" onclick="javascript:hideTree();" align="center" class="ovalbutton">ok</a>
278
                        </div>
279
                </div>
280
        </div>
281
</body>
282
</html>
(4-4/25)