Changeset 5938
- Timestamp:
- Jan 27, 2012, 3:17:51 PM (11 years ago)
- Location:
- trunk/www
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/admin/extensions/frameset.jsp
r5919 r5938 36 36 %> 37 37 38 <base:page type=" popup" title="">39 <base:head scripts="dragdrop.js">38 <base:page type="frameset" title=""> 39 <base:head scripts="dragdrop.js"> 40 40 <script> 41 41 … … 52 52 </script> 53 53 </base:head> 54 55 54 <base:body> 56 55 <div class="absolutefull" onmousemove="DragDrop.drag(event)" onmouseup="DragDrop.endDrag(event)"> -
trunk/www/admin/extensions/manager.jsp
r5918 r5938 38 38 %> 39 39 <base:page type="default" title="Installed extensions & plug-ins"> 40 <base:head > 41 <script language="JavaScript"> 42 </script> 43 </base:head> 44 <base:body attributes="onresize='setTimer();'"> 40 <base:head></base:head> 41 <base:body> 45 42 <h1>Installed extensions & plug-ins</h1> 46 43 <div class="content"> -
trunk/www/filemanager/directories/list_directories.jsp
r5555 r5938 137 137 function initialise() 138 138 { 139 if (parent && parent.parent && parent.parent.adjustIFrameSize) parent.parent.adjustIFrameSize();140 139 IconStore.init(); 141 140 var path = getRoot()+'images/joust/'; … … 363 362 { 364 363 %> 365 <base:body onload="initialise()" 366 style="padding-left: 0px; padding-right: 0px;" >367 <div id="main" class="joust" style="width:100%;">368 <tbl:toolbar >364 <base:body onload="initialise()"> 365 <div id="main" class="absolutefull joust" 366 onmousemove="parent.DragDrop.drag(event)" onmouseup="parent.DragDrop.endDrag(event)"> 367 <tbl:toolbar subclass="bottomborder"> 369 368 <tbl:button 370 369 image="refresh.gif" … … 380 379 /> 381 380 </tbl:toolbar> 382 <div id="joust" class="boxedbottom" style="overflow: auto;"> 383 </div> 381 <div id="joust" style="overflow: auto;"></div> 384 382 </div> 385 383 </base:body> -
trunk/www/filemanager/files/list_files.jsp
r5935 r5938 436 436 </base:head> 437 437 438 <base:body style="padding-left: 0px; padding-right: 0px;"onload="updateSearchResults()">438 <base:body onload="updateSearchResults()"> 439 439 <m:menu 440 440 id="move" … … 471 471 472 472 </m:menu> 473 <div id="main"> 473 <div id="main" class="absolutefull" 474 onmousemove="parent.DragDrop.drag(event)" onmouseup="parent.DragDrop.endDrag(event)"> 474 475 <% 475 476 if (cc.getMessage() != null) -
trunk/www/filemanager/files/view_file.jsp
r5937 r5938 185 185 </base:head> 186 186 <base:body> 187 <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false"> 187 <div class="absolutefull" 188 onmousemove="parent.DragDrop.drag(event)" onmouseup="parent.DragDrop.endDrag(event)"> 189 190 <t:tabcontrol 191 subclass="content mastertabcontrol" 192 style="top: 0px;" 193 id="main" active="<%=tab%>" switch="switchTab" remember="false"> 188 194 <t:tab id="properties" title="Properties"> 189 <tbl:toolbar 190 > 191 <tbl:button 192 disabled="<%=writePermission ? false : true%>" 193 image="edit.gif" 194 onclick="editItem()" 195 title="Edit…" 196 tooltip="<%=writePermission ? "Edit this file" : "You do not have permission to edit this file"%>" 197 /> 198 <tbl:button 199 visible="<%=editable%>" 200 image="file_edit.png" 201 onclick="editFileData()" 202 title="Edit file…" 203 tooltip="Edit the contents of this file" 204 /> 205 <tbl:button 206 disabled="<%=deletePermission ? false : true%>" 207 image="delete.gif" 208 onclick="deleteItem()" 209 title="Delete" 210 visible="<%=!file.isRemoved()%>" 211 tooltip="<%=deletePermission ? "Delete this file" : "You do not have permission to delete this file"%>" 212 /> 213 <tbl:button 214 disabled="<%=writePermission ? false : true%>" 215 image="restore.gif" 216 onclick="restoreItem()" 217 title="Restore" 218 visible="<%=file.isRemoved()%>" 219 tooltip="<%=writePermission ? "Restore this file" : "You do not have permission to restore this file"%>" 220 /> 221 <tbl:button 222 disabled="<%=sharePermission ? false : true%>" 223 image="share.gif" 224 onclick="shareItem()" 225 title="Share…" 226 tooltip="<%=sharePermission ? "Share this file to other user, groups and projects" : "You do not have permission to share this file"%>" 227 /> 228 <tbl:button 229 disabled="<%=setOwnerPermission ? false : true%>" 230 image="take_ownership.png" 231 onclick="setOwner()" 232 title="Set owner…" 233 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 234 /> 235 <tbl:button 236 disabled="<%=!writePermission%>" 237 image="<%=writePermission ? "compress.png" : "compress_disabled.png"%>" 238 onclick="compress()" 239 title="Compress…" 240 visible="<%=!file.isCompressed() && location == Location.PRIMARY%>" 241 tooltip="Store this file in a compressed format on the disk" 242 /> 243 <tbl:button 244 disabled="<%=!writePermission%>" 245 image="<%=writePermission ? "decompress.png" : "decompress_disabled.png"%>" 246 onclick="decompress()" 247 title="Decompress…" 248 visible="<%=file.isCompressed() && location == Location.PRIMARY%>" 249 tooltip="Decompress this file and store it in it's normal format on the disk" 250 /> 251 <tbl:button 252 image="import.gif" 253 onclick="runPlugin('ImportItem')" 254 title="Import…" 255 tooltip="Import data" 256 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 257 /> 258 <tbl:button 259 image="export.gif" 260 onclick="runPlugin('ExportItem')" 261 title="Export…" 262 tooltip="Export data" 263 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 264 /> 265 <tbl:button 266 image="runplugin.gif" 267 onclick="runPlugin('RunPlugin')" 268 title="Run plugin…" 269 tooltip="Run a plugin" 270 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 271 /> 272 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 273 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 274 <tbl:button 275 image="help.png" 276 onclick="<%="Main.openHelp('" + ID +"', 'file.view.properties')"%>" 277 title="Help…" 278 tooltip="Get help about this page" 279 /> 280 </tbl:toolbar> 281 <div class="boxedbottom"> 282 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(file)%></i></div> 283 <% 284 if (file.isRemoved() || file.isShared()) 285 { 286 %> 287 <div class="itemstatus"> 195 <div> 196 <table class="fullform bottomborder"> 197 <tr> 198 <th class="itemstatus"> 288 199 <base:icon 289 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 290 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 291 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 292 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 200 image="shared.gif" 201 visible="<%=file.isShared()%>" 202 tooltip="This item is shared to other users, groups and/or projects" 203 /> 204 <base:icon 205 image="deleted.gif" 206 onclick="deleteItemPermanently()" 207 tooltip="This item has been flagged for deletion. Click to delete it now." 208 enabled="<%=deletePermanentlyPermission %>" 209 visible="<%=isRemoved%>" 210 /> 293 211 <base:icon image="used.gif" 294 212 onclick="showUsingItems()" 295 tooltip="Show the items that are using this one" 296 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 297 <base:icon image="shared.gif" 298 visible="<%=file.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 299 </div> 300 <% 301 } 302 %> 303 <table class="form" cellspacing=0> 304 <tr> 305 <td class="prompt">File</td> 213 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 214 visible="<%=isRemoved && isUsed%>" /> 215 </th> 216 <td style="padding: 0px;"> 217 <tbl:toolbar subclass="bottomborder"> 218 <tbl:button 219 disabled="<%=writePermission ? false : true%>" 220 image="edit.gif" 221 onclick="editItem()" 222 title="Edit…" 223 tooltip="<%=writePermission ? "Edit this file" : "You do not have permission to edit this file"%>" 224 /> 225 <tbl:button 226 visible="<%=editable%>" 227 image="file_edit.png" 228 onclick="editFileData()" 229 title="Edit file…" 230 tooltip="Edit the contents of this file" 231 /> 232 <tbl:button 233 disabled="<%=deletePermission ? false : true%>" 234 image="delete.gif" 235 onclick="deleteItem()" 236 title="Delete" 237 visible="<%=!file.isRemoved()%>" 238 tooltip="<%=deletePermission ? "Delete this file" : "You do not have permission to delete this file"%>" 239 /> 240 <tbl:button 241 disabled="<%=writePermission ? false : true%>" 242 image="restore.gif" 243 onclick="restoreItem()" 244 title="Restore" 245 visible="<%=file.isRemoved()%>" 246 tooltip="<%=writePermission ? "Restore this file" : "You do not have permission to restore this file"%>" 247 /> 248 <tbl:button 249 disabled="<%=sharePermission ? false : true%>" 250 image="share.gif" 251 onclick="shareItem()" 252 title="Share…" 253 tooltip="<%=sharePermission ? "Share this file to other user, groups and projects" : "You do not have permission to share this file"%>" 254 /> 255 <tbl:button 256 disabled="<%=setOwnerPermission ? false : true%>" 257 image="take_ownership.png" 258 onclick="setOwner()" 259 title="Set owner…" 260 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 261 /> 262 <tbl:button 263 disabled="<%=!writePermission%>" 264 image="compress.png" 265 onclick="compress()" 266 title="Compress…" 267 visible="<%=!file.isCompressed() && location == Location.PRIMARY%>" 268 tooltip="Store this file in a compressed format on the disk" 269 /> 270 <tbl:button 271 disabled="<%=!writePermission%>" 272 image="decompress.png" 273 onclick="decompress()" 274 title="Decompress…" 275 visible="<%=file.isCompressed() && location == Location.PRIMARY%>" 276 tooltip="Decompress this file and store it in it's normal format on the disk" 277 /> 278 <tbl:button 279 image="import.gif" 280 onclick="runPlugin('ImportItem')" 281 title="Import…" 282 tooltip="Import data" 283 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 284 /> 285 <tbl:button 286 image="export.gif" 287 onclick="runPlugin('ExportItem')" 288 title="Export…" 289 tooltip="Export data" 290 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 291 /> 292 <tbl:button 293 image="runplugin.gif" 294 onclick="runPlugin('RunPlugin')" 295 title="Run plugin…" 296 tooltip="Run a plugin" 297 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 298 /> 299 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 300 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 301 <tbl:button 302 image="help.png" 303 onclick="<%="Main.openHelp('" + ID +"', 'file.view.properties')"%>" 304 title="Help…" 305 tooltip="Get help about this page" 306 /> 307 </tbl:toolbar> 308 </td> 309 </tr> 310 <tr> 311 <th>File</th> 306 312 <td><%=HTML.encodeTags(path)%></td> 307 313 </tr> 308 314 <tr> 309 <td class="prompt">Write protected</td> 315 <th>Type</th> 316 <td><base:propertyvalue item="<%=file%>" property="itemSubtype" /></td> 317 </tr> 318 <tr> 319 <th>Write protected</th> 310 320 <td><%=file.isWriteProtected() ? "yes" : "no"%></td> 311 321 </tr> 312 <tr>313 <td class="prompt">Type</td>314 <td><base:propertyvalue item="<%=file%>" property="itemSubtype" /></td>315 </tr>316 <tr>317 <td class="prompt">MIME type</td>318 <td><%=HTML.encodeTags(file.getMimeType())%></td>319 </tr>320 <tr>321 <td class="prompt">Character set</td>322 <td><%=HTML.encodeTags(file.getCharacterSet() == null ? "n/a" : file.getCharacterSet())%></td>323 </tr>324 322 <% 325 323 File.Action action = file.getAction(); 326 324 %> 327 <tr 328 <t d class="prompt">Location</td>325 <tr> 326 <th>Location</th> 329 327 <td><%=location%> 330 328 <% … … 409 407 %> 410 408 <tr> 411 <t d class="prompt">URL</td>409 <th class="subprompt">- URL</th> 412 410 <td><%=HTML.niceFormat(file.getUrl(), HTML.LINK_URL)%></td> 413 411 </tr> 414 412 <tr> 415 <t d class="prompt">File server</td>413 <th class="subprompt">- file server</th> 416 414 <td><base:propertyvalue item="<%=file%>" property="fileServer" /></td> 417 415 </tr> … … 420 418 %> 421 419 <tr> 422 <td class="prompt">Size</td> 420 <th>MIME type</th> 421 <td><%=HTML.encodeTags(file.getMimeType())%></td> 422 </tr> 423 <tr> 424 <th class="subprompt">- character set</th> 425 <td><%=HTML.encodeTags(file.getCharacterSet() == null ? "n/a" : file.getCharacterSet())%></td> 426 </tr> 427 <tr> 428 <th>Size</th> 423 429 <td title="<%=file.getSize()%> bytes"><%=bytes%></td> 424 430 </tr> … … 428 434 %> 429 435 <tr> 430 <t d class="prompt">Compressed Size</td>436 <th class="subprompt">- compressed size</th> 431 437 <td title="<%=file.getCompressedSize()%> bytes"><%=Values.formatBytes(file.getCompressedSize())%></td> 432 438 </tr> … … 435 441 %> 436 442 <tr> 437 <t d class="prompt">Last update</td>443 <th>Last update</th> 438 444 <td><%=dateTimeFormatter.format(file.getLastUpdate())%></td> 439 445 </tr> 440 446 <tr> 441 <td class="prompt">Owner</td> 447 <th>MD5</th> 448 <td><%=HTML.encodeTags(file.getMd5())%></td> 449 </tr> 450 <tr> 451 <th>Owner</th> 442 452 <td><base:propertyvalue item="<%=file%>" property="owner" /></td> 443 453 </tr> 444 454 <tr> 445 <t d class="prompt">MD5</td>446 <td><%= HTML.encodeTags(file.getMd5())%></td>447 </tr> 448 <tr> 449 <t d class="prompt">Description</td>455 <th>Permissions</th> 456 <td><%=PermissionUtil.getFullPermissionNames(file)%></td> 457 </tr> 458 <tr> 459 <th>Description</th> 450 460 <td><%=HTML.niceFormat(file.getDescription())%></td> 451 461 </tr> 452 462 </table> 463 </div> 453 464 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 454 465 <jsp:param name="ID" value="<%=ID%>" /> … … 457 468 <jsp:param name="title" value="Other items related to this file" /> 458 469 </jsp:include> 459 <% 460 // Tables with users/groups/projects that this item is shared to 461 MultiPermissions mp = new MultiPermissions(Collections.singleton(file)); 462 ItemResultList<User> users = mp.getUsers().list(dc); 463 ItemResultList<Group> groups = mp.getGroups().list(dc); 464 ItemResultList<Project> projects = mp.getProjects().list(dc); 465 int totalShare = users.size() + groups.size() + projects.size(); 466 467 if (totalShare > 0) 468 { 469 %> 470 <base:section 471 id="sharedTo" 472 title="<%="Shared to (" + totalShare + ")"%>" 473 context="<%=cc%>" 474 > 475 <tbl:table 476 id="itemsSharedTo" 477 478 columns="all" 479 > 480 <tbl:columndef 481 id="itemType" 482 title="Item type" 483 /> 484 <tbl:columndef 485 id="name" 486 title="Name" 487 /> 488 <tbl:columndef 489 id="permissions" 490 title="Permissions" 491 /> 492 <tbl:data> 493 <tbl:columns> 494 </tbl:columns> 495 <tbl:rows> 496 <% 497 for (Project project : projects) 498 { 499 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 500 %> 501 <tbl:row> 502 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 503 <tbl:cell column="name"><base:icon 504 image="deleted.gif" 505 tooltip="This item has been scheduled for deletion" 506 visible="<%=project.isRemoved()%>" 507 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 508 <tbl:cell column="permissions"> 509 <%=PermissionUtil.translatePermissionsToString(permissions)%> 510 </tbl:cell> 511 </tbl:row> 512 <% 513 } 514 for (Group group : groups) 515 { 516 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 517 %> 518 <tbl:row> 519 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 520 <tbl:cell column="name"><base:icon 521 image="deleted.gif" 522 tooltip="This item has been scheduled for deletion" 523 visible="<%=group.isRemoved()%>" 524 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 525 <tbl:cell column="permissions"> 526 <%=PermissionUtil.translatePermissionsToString(permissions)%> 527 </tbl:cell> 528 </tbl:row> 529 <% 530 } 531 for (User user : users) 532 { 533 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 534 %> 535 <tbl:row> 536 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 537 <tbl:cell column="name"><base:icon 538 image="deleted.gif" 539 tooltip="This item has been scheduled for deletion" 540 visible="<%=user.isRemoved()%>" 541 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 542 <tbl:cell column="permissions"> 543 <%=PermissionUtil.translatePermissionsToString(permissions)%> 544 </tbl:cell> 545 </tbl:row> 546 <% 547 } 548 %> 549 </tbl:rows> 550 </tbl:data> 551 </tbl:table> 552 </base:section> 553 <% 554 } 555 else 556 { 557 %> 558 <h4>Shared to</h4> 559 This file is not shared 560 (or, you don't have permission to view the ones it is shared to). 561 <% 562 } 563 %> 564 </div> 565 </form> 566 </t:tab> 470 <jsp:include page="../../common/share/list_share.jsp"> 471 <jsp:param name="ID" value="<%=ID%>" /> 472 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 473 <jsp:param name="item_id" value="<%=itemId%>" /> 474 <jsp:param name="title" value="Shared to" /> 475 </jsp:include> 476 </t:tab> 567 477 <t:tab id="history" title="Change history" 568 478 tooltip="Displays a log of all modifications made to this item" … … 582 492 </t:tab> 583 493 </t:tabcontrol> 494 </div> 584 495 </base:body> 585 496 </base:page> -
trunk/www/filemanager/frameset.jsp
r5426 r5938 64 64 65 65 <base:page type="frameset" title=""> 66 <base:head /> 67 <frameset cols="250,*" frameborder="yes" border="5" > 68 <frame name="directories" 69 src="directories/list_directories.jsp?ID=<%=ID%>&mode=<%=mode%>&sync=<%=syncWithDirectory%>" 70 scrolling="auto" marginwidth="0" marginheight="0" frameborder="1"> 71 <frame name="files" 72 src="<%=fileSrc%>" 73 scrolling="auto" marginwidth="0" marginheight="0" frameborder="1"> 74 </frameset> 66 <base:head scripts="dragdrop.js"> 67 <script> 68 69 function repositionX(deltaX, deltaY) 70 { 71 var f1 = document.getElementById('f1'); 72 var d1 = document.getElementById('d1'); 73 var f2 = document.getElementById('f2'); 74 75 f1.style.width = (parseInt(f1.style.width) +deltaX) + 'px'; 76 d1.style.left = (parseInt(d1.style.left) + deltaX) + 'px'; 77 f2.style.left = (parseInt(f2.style.left) + deltaX) + 'px'; 78 } 79 </script> 80 </base:head> 81 <base:body> 82 <div class="absolutefull" onmousemove="DragDrop.drag(event)" onmouseup="DragDrop.endDrag(event)"> 83 <div id="f1" class="absolutefull topborder" style="width: 244px;"><iframe name="directories" 84 src="directories/list_directories.jsp?ID=<%=ID%>&mode=<%=mode%>&sync=<%=syncWithDirectory%>" 85 style="width: 100%; height: 100%;" 86 ></iframe></div> 87 88 <div id="d1" class="absolutefull filled leftborder rightborder topborder" 89 style="left: 244px; width: 4px; cursor: col-resize; z-index: 99;" 90 onmousedown="DragDrop.beginDrag(event, true, false, repositionX)" 91 ></div> 92 93 <div id="f2" class="absolutefull" style="left: 250px;"><iframe name="files" 94 src="<%=fileSrc%>" 95 style="width: 100%; height: 100%;" 96 ></iframe></div> 97 </div> 98 </div> 99 </base:body> 75 100 </base:page> 76 101 -
trunk/www/filemanager/manager.jsp
r5426 r5938 39 39 %> 40 40 <base:page title="Files and directories"> 41 <base:head > 42 <script language="JavaScript"> 43 var timer = 0; 44 var inCall = false; 45 function adjustIFrameSize() 46 { 47 if (inCall) return; 48 inCall = true; 49 var iframeElement = document.getElementById("idManager"); 50 // Find the top coordinate of the IFrame 51 var offsetTop = 1; 52 var offsetTrail = iframeElement; 53 while (offsetTrail) 54 { 55 offsetTop += offsetTrail.offsetTop; 56 offsetTrail = offsetTrail.offsetParent; 57 } 58 59 // Find the browser window height 60 var windowHeight = Main.getWindowHeight(); 61 iframeElement.height = windowHeight-offsetTop; 62 63 // Adjust the height of the frames 64 var iframe = window.frames['manager']; 65 var directories = iframe.frames['directories'].document.getElementById('main'); 66 if (directories) directories.style.height = (iframeElement.height-10)+'px'; 67 var joust = iframe.frames['directories'].document.getElementById('joust'); 68 if (joust) joust.style.height = (iframeElement.height-40)+'px'; 69 var files = iframe.frames['files'].document.getElementById('main'); 70 if (files) files.style.height = iframeElement.height+'px'; 71 inCall = false; 72 } 73 function setTimer() 74 { 75 if (inCall) return; 76 if (timer) clearTimeout(timer); 77 timer = setTimeout('adjustIFrameSize()', 150); 78 } 79 </script> 80 </base:head> 81 <base:body attributes="onresize='setTimer();'"> 82 <iframe name="manager" id="idManager" src="frameset.jsp?ID=<%=ID%>&file_id=<%=fileId%>" width="100%" 83 frameborder="0" vspace="0" hspace="0" 84 marginwidth="0" marginheight="0" scrolling="no" 85 style="overflow: visible"></iframe> 41 <base:head></base:head> 42 <base:body> 43 <h1>Files and directories</h1> 44 <div class="content"> 45 <div class="absolutefull"><iframe 46 name="manager" id="idManager" src="frameset.jsp?ID=<%=ID%>&file_id=<%=fileId%>" 47 style="width: 100%; height: 100%;"></iframe></div> 48 </div> 86 49 </base:body> 87 50 </base:page> -
trunk/www/include/styles/main.css
r5935 r5938 70 70 } 71 71 72 /* Linked elements should display a pointer cursor and be underlined */72 /* Linked elements should display a pointer cursor and be underlined on hover only */ 73 73 a, label, .link 74 74 { 75 75 color: #0000CC; 76 76 cursor: pointer; 77 text-decoration: none; 77 78 } 78 79 … … 128 129 129 130 /* h2 is a section header */ 130 body.defaulth2131 h2 131 132 { 132 133 font-size: 1.10em; … … 691 692 } 692 693 693 a {694 color: #0000CC;695 text-decoration: none;696 }697 698 form {699 margin-top: 0px;700 }701 702 {703 text-decoration: underline;704 }705 706 694 707 695 .boxed { -
trunk/www/include/styles/table.css
r5935 r5938 32 32 .itemlist 33 33 { 34 width: 100%; 34 35 background: #E8E8E8; 36 padding: 0px; 37 margin: 0px; 35 38 } 36 39 … … 56 59 } 57 60 61 /* A table header column */ 58 62 .itemlist table.data > thead > tr > th 59 63 { 60 64 font-weight: bold; 61 65 white-space: nowrap; 62 border- right: 1px dotted #A0A0A0;66 border-left: 1px dotted #A0A0A0; 63 67 padding: 1px 3px 1px 3px; 64 68 vertical-align: middle; 65 69 text-align: left; 66 70 } 71 72 /* Header column that contains index number of item */ 73 .itemlist table.data th.index 74 { 75 border: 0px; 76 text-align: right; 77 width: 3em; 78 } 79 80 /* Header column that contains checkbox/radiobutton for each item */ 81 .itemlist table.data th.check 82 { 83 border: 0px; 84 text-align: center; 85 width: 2em; 86 } 87 88 /* Header column that contains icons for each item */ 89 .itemlist table.data th.icons 90 { 91 width: 40px; /* Should be enough to hold two icons */ 92 border: 0px; 93 } 94 67 95 68 96 /* The <tbody> section defining data rows */ … … 86 114 .itemlist table.data td.cell 87 115 { 88 border-right: 1px dotted #A0A0A0; 89 padding: 1px 3px 1px 3px; 90 vertical-align: middle; 91 } 92 116 border-left: 1px dotted #A0A0A0; 117 padding: 1px 3px 1px 3px; 118 vertical-align: middle; 119 } 93 120 94 121 /* -
trunk/www/include/styles/toolbar.css
r5937 r5938 32 32 .toolbar 33 33 { 34 width: 100%;35 34 background: #E8E8E8; 36 35 padding: 0px; -
trunk/www/views/trashcan/view_item.jsp
r5937 r5938 75 75 final int itemId = Values.getInt(request.getParameter("item_id")); 76 76 final Item itemType = Item.valueOf(request.getParameter("item_type")); 77 final ItemContext cc = sc.getCurrentContext(Item.SYSTEM, "trashcan"); 77 78 final DbControl dc = sc.newDbControl(); 78 79 try … … 186 187 </base:head> 187 188 <base:body> 188 <p> 189 <p:path> 190 <p:pathelement title="Trashcan" href="<%="index.jsp?ID="+ID%>" /> 191 <p:pathelement title="<%=itemType.toString() + ": " + HTML.encodeTags(name)%>" /> 192 </p:path> 193 194 <t:tabcontrol id="main"> 189 <p:path><p:pathelement title="Trashcan" href="<%="index.jsp?ID="+ID%>" 190 /><p:pathelement title="<%=itemType.toString() + ": " + HTML.encodeTags(name)%>" 191 /></p:path> 192 193 <t:tabcontrol id="main" subclass="content mastertabcontrol"> 195 194 <t:tab id="properties" title="Properties"> 196 197 <tbl:toolbar 198 > 199 <tbl:button 200 disabled="<%=writePermission ? false : true%>" 201 image="edit.gif" 202 onclick="editItem()" 203 title="Edit…" 204 tooltip="<%=writePermission ? "Edit this item" : "You do not have permission to edit this item"%>" 205 /> 206 <tbl:button 207 disabled="<%=deletePermission ? false : true%>" 208 image="<%=deletePermission ? "delete_permanently.png" : "delete_permanently_disabled.png"%>" 209 onclick="deleteItem()" 210 title="Delete permanently…" 211 visible="<%=!isUsed%>" 212 tooltip="<%=deletePermission ? "Permanently delete this item" : "You do not have permission to delete this item"%>" 213 /> 214 <tbl:button 215 disabled="<%=writePermission ? false : true%>" 216 image="restore.gif" 217 onclick="restoreItem()" 218 title="Restore" 219 visible="<%=isRemoved%>" 220 tooltip="<%=writePermission ? "Restore this item" : "You do not have permission to restore this item"%>" 221 /> 222 <tbl:button 223 disabled="<%=sharePermission ? false : true%>" 224 image="share.gif" 225 onclick="shareItem()" 226 title="Share…" 227 visible="<%=shareable != null%>" 228 tooltip="<%=sharePermission ? "Share this item to other user, groups and projects" : "You do not have permission to share this scan"%>" 229 /> 230 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 231 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 232 <tbl:button 233 image="help.png" 234 onclick="<%="Main.openHelp('" + ID +"', 'trash.view.properties')"%>" 235 title="Help…" 236 tooltip="Get help about this page" 237 /> 238 </tbl:toolbar> 239 240 <div class="boxedbottom"> 241 <div class="itemstatus">Permissions on this item: 242 <i><%=PermissionUtil.getFullPermissionNames(item)%></i></div> 243 <% 244 if (isRemoved || isShared || isUsed) 245 { 246 %> 247 <div class="itemstatus"> 248 <base:icon image="deleted.gif" 249 visible="<%=isRemoved%>" style="margin-bottom: 2px;"> This item has been flagged for deletion<br></base:icon> 250 <base:icon image="shared.gif" 251 visible="<%=isShared%>" style="margin-bottom: 2px;"> This item is shared to other user, groups and/or projects<br></base:icon> 195 <div> 196 <table class="fullform bottomborder"> 197 <tr> 198 <th class="itemstatus"> 199 <base:icon 200 image="shared.gif" 201 visible="<%=isShared%>" 202 tooltip="This item is shared to other users, groups and/or projects" 203 /> 204 <base:icon 205 image="deleted.gif" 206 tooltip="This item has been flagged for deletion." 207 visible="<%=isRemoved%>" 208 /> 252 209 <base:icon image="used.gif" 253 visible="<%=isUsed%>" style="margin-bottom: 2px;"> This item is used by other items and can't be permanently deleted</base:icon> 254 </div> 255 <% 256 } 257 %> 258 <table class="form" cellspacing=0> 210 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 211 visible="<%=isUsed%>" /> 212 </th> 213 <td style="padding: 0px;"> 214 <tbl:toolbar subclass="bottomborder"> 215 216 <tbl:button 217 disabled="<%=writePermission ? false : true%>" 218 image="edit.gif" 219 onclick="editItem()" 220 title="Edit…" 221 tooltip="<%=writePermission ? "Edit this item" : "You do not have permission to edit this item"%>" 222 /> 223 <tbl:button 224 disabled="<%=deletePermission ? false : true%>" 225 image="<%=deletePermission ? "delete_permanently.png" : "delete_permanently_disabled.png"%>" 226 onclick="deleteItem()" 227 title="Delete permanently…" 228 visible="<%=!isUsed%>" 229 tooltip="<%=deletePermission ? "Permanently delete this item" : "You do not have permission to delete this item"%>" 230 /> 231 <tbl:button 232 disabled="<%=writePermission ? false : true%>" 233 image="restore.gif" 234 onclick="restoreItem()" 235 title="Restore" 236 visible="<%=isRemoved%>" 237 tooltip="<%=writePermission ? "Restore this item" : "You do not have permission to restore this item"%>" 238 /> 239 <tbl:button 240 disabled="<%=sharePermission ? false : true%>" 241 image="share.gif" 242 onclick="shareItem()" 243 title="Share…" 244 visible="<%=shareable != null%>" 245 tooltip="<%=sharePermission ? "Share this item to other user, groups and projects" : "You do not have permission to share this scan"%>" 246 /> 247 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 248 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 249 <tbl:button 250 image="help.png" 251 onclick="<%="Main.openHelp('" + ID +"', 'trash.view.properties')"%>" 252 title="Help…" 253 tooltip="Get help about this page" 254 /> 255 </tbl:toolbar> 256 </td> 257 </tr> 259 258 <tr> 260 <t d class="prompt">Type</td>259 <th>Type</th> 261 260 <td><%=itemType.toString()%></td> 262 261 </tr> 263 262 <tr> 264 <t d class="prompt">Name</td>263 <th>Name</th> 265 264 <td><%=link%></td> 266 265 </tr> 267 266 <tr> 268 <t d class="prompt">Description</td>267 <th>Description</th> 269 268 <td><%=HTML.niceFormat(description)%></td> 270 269 </tr> 271 270 </table> 271 </div> 272 272 273 273 <% … … 275 275 { 276 276 %> 277 <h4 class="docked">Items using <%=itemType.toString()%>: <%=HTML.encodeTags(name)%></h4> 278 <tbl:table 279 id="usingItems" 280 281 columns="all" 282 > 283 <tbl:hidden 284 name="item_type" 285 value="<%=itemType.name()%>" 286 /> 287 <tbl:hidden 288 name="item_id" 289 value="<%=String.valueOf(itemId)%>" 290 /> 291 <tbl:columndef 292 id="name" 293 title="Name/ID" 294 /> 295 <tbl:columndef 296 id="type" 297 title="Type" 298 /> 299 <tbl:columndef 300 id="description" 301 title="Description" 302 /> 303 <tbl:toolbar> 304 <tbl:button 305 image="delete.gif" 306 onclick="deleteItems()" 307 title="Delete" 308 tooltip="Mark the selected items for deletion" 309 /> 310 <tbl:button 311 image="restore.gif" 312 onclick="restoreItems()" 313 title="Restore" 314 tooltip="Restore the selected item" 315 /> 316 </tbl:toolbar> 317 <tbl:data> 318 <tbl:columns> 319 <tbl:header 320 clazz="index" 321 > </tbl:header> 322 <tbl:header 323 clazz="check" 324 ><base:icon 325 image="check_uncheck.gif" 326 tooltip="Check/uncheck all" 327 onclick="Forms.checkUncheck(document.forms['usingItems'], /item:/)" style="align: left;" 328 /></tbl:header> 329 <tbl:header 330 clazz="icons" 331 > </tbl:header> 332 </tbl:columns> 333 <tbl:rows> 334 <% 335 int index = 0; 336 for (ItemProxy proxy : usingItems) 337 { 338 index++; 339 boolean denied = false; 340 boolean writePermissionOnUsedBy = false; 341 boolean usedByIsRemoved = false; 342 boolean usedByRemovable = false; 343 boolean usedByIsUsed = false; 344 BasicItem usedBy = null; 345 String usedByName = String.valueOf(proxy.getId()); 346 String usedByDescription = ""; 347 try 277 <base:section 278 id="useditems" 279 title="<%="Items using " + HTML.encodeTags(name) + " (" + usingItems.size() + ")"%>" 280 context="<%=cc %>" 281 > 282 <tbl:toolbar subclass="leftborder topborder rightborder"> 283 <tbl:button 284 image="delete.gif" 285 onclick="deleteItems()" 286 title="Delete" 287 tooltip="Mark the selected items for deletion" 288 /> 289 <tbl:button 290 image="restore.gif" 291 onclick="restoreItems()" 292 title="Restore" 293 tooltip="Restore the selected item" 294 /> 295 </tbl:toolbar> 296 <tbl:table 297 id="usingItems" 298 columns="all" 299 > 300 <tbl:hidden 301 name="item_type" 302 value="<%=itemType.name()%>" 303 /> 304 <tbl:hidden 305 name="item_id" 306 value="<%=String.valueOf(itemId)%>" 307 /> 308 <tbl:columndef 309 id="name" 310 title="Name/ID" 311 /> 312 <tbl:columndef 313 id="type" 314 title="Type" 315 /> 316 <tbl:columndef 317 id="description" 318 title="Description" 319 /> 320 <tbl:data> 321 <tbl:headers> 322 <tbl:headerrow> 323 <tbl:header 324 clazz="index" 325 > </tbl:header> 326 <tbl:header 327 clazz="check" 328 ><base:icon 329 image="check_uncheck.gif" 330 tooltip="Check/uncheck all" 331 onclick="Forms.checkUncheck(document.forms['usingItems'], /item:/)" style="align: left;" 332 /></tbl:header> 333 <tbl:header 334 clazz="icons" 335 > </tbl:header> 336 <tbl:columnheaders /> 337 </tbl:headerrow> 338 </tbl:headers> 339 <tbl:rows> 340 <% 341 int index = 0; 342 for (ItemProxy proxy : usingItems) 348 343 { 349 usedBy = proxy.getItem(dc); 350 writePermissionOnUsedBy = usedBy.hasPermission(Permission.WRITE); 351 usedByIsUsed = usedBy.isUsed(); 352 if (usedBy instanceof Removable) 344 index++; 345 boolean denied = false; 346 boolean writePermissionOnUsedBy = false; 347 boolean usedByIsRemoved = false; 348 boolean usedByRemovable = false; 349 boolean usedByIsUsed = false; 350 BasicItem usedBy = null; 351 String usedByName = String.valueOf(proxy.getId()); 352 String usedByDescription = ""; 353 try 353 354 { 354 usedByRemovable = true; 355 usedByIsRemoved = ((Removable)usedBy).isRemoved(); 355 usedBy = proxy.getItem(dc); 356 writePermissionOnUsedBy = usedBy.hasPermission(Permission.WRITE); 357 usedByIsUsed = usedBy.isUsed(); 358 if (usedBy instanceof Removable) 359 { 360 usedByRemovable = true; 361 usedByIsRemoved = ((Removable)usedBy).isRemoved(); 362 } 363 if (usedBy instanceof File) 364 { 365 File file = (File)usedBy; 366 usedByName = file.getPath().toString(); 367 usedByDescription = file.getDescription(); 368 } 369 else if (usedBy instanceof Directory) 370 { 371 Directory dir = (Directory)usedBy; 372 usedByName = dir.getPath().toString(); 373 usedByDescription = dir.getDescription(); 374 } 375 else if (usedBy instanceof Nameable) 376 { 377 Nameable nameable = (Nameable)usedBy; 378 usedByName = nameable.getName(); 379 usedByDescription = nameable.getDescription(); 380 } 381 else 382 { 383 usedByName = usedBy.toString(); 384 } 356 385 } 357 if (usedBy instanceof File)386 catch (PermissionDeniedException ex) 358 387 { 359 File file = (File)usedBy; 360 usedByName = file.getPath().toString(); 361 usedByDescription = file.getDescription(); 388 denied = true; 362 389 } 363 else if (usedBy instanceof Directory) 364 { 365 Directory dir = (Directory)usedBy; 366 usedByName = dir.getPath().toString(); 367 usedByDescription = dir.getDescription(); 368 } 369 else if (usedBy instanceof Nameable) 370 { 371 Nameable nameable = (Nameable)usedBy; 372 usedByName = nameable.getName(); 373 usedByDescription = nameable.getDescription(); 374 } 375 else 376 { 377 usedByName = usedBy.toString(); 378 } 379 } 380 catch (PermissionDeniedException ex) 381 { 382 denied = true; 390 %> 391 <tbl:row> 392 <tbl:header 393 clazz="index" 394 ><%=index%></tbl:header> 395 <tbl:header 396 clazz="check" 397 ><% 398 if (usedByRemovable) 399 { 400 %><input 401 type="checkbox" 402 name="item:<%=proxy.getType().name()%>" 403 value="<%=proxy.getId()%>" 404 ><% 405 } 406 %></tbl:header> 407 <tbl:header 408 clazz="icons" 409 ><base:icon 410 image="deleted.gif" 411 tooltip="This item has been scheduled for deletion" 412 visible="<%=usedByIsRemoved%>" 413 /> 414 <base:icon 415 image="used.gif" 416 tooltip="This item is used by other items" 417 visible="<%=usedByIsRemoved && usedByIsUsed%>" 418 onclick="<%="showUsingItems('" + usedBy.getType().name() + "', " + usedBy.getId() + ")"%>" 419 /> </tbl:header> 420 <tbl:cell column="name"><%=Base.getLink(ID, HTML.encodeTags(usedByName), proxy.getType(), proxy.getId(), writePermissionOnUsedBy)%></tbl:cell> 421 <tbl:cell column="type"><%=proxy.getType().toString()%></tbl:cell> 422 <tbl:cell column="description"><%=HTML.niceFormat(usedByDescription)%></tbl:cell> 423 </tbl:row> 424 <% 383 425 } 384 426 %> 385 <tbl:row> 386 <tbl:header 387 clazz="index" 388 ><%=index%></tbl:header> 389 <tbl:header 390 clazz="check" 391 ><% 392 if (usedByRemovable) 393 { 394 %><input 395 type="checkbox" 396 name="item:<%=proxy.getType().name()%>" 397 value="<%=proxy.getId()%>" 398 ><% 399 } 400 %></tbl:header> 401 <tbl:header 402 clazz="icons" 403 ><base:icon 404 image="deleted.gif" 405 tooltip="This item has been scheduled for deletion" 406 visible="<%=usedByIsRemoved%>" 407 /> 408 <base:icon 409 image="used.gif" 410 tooltip="This item is used by other items" 411 visible="<%=usedByIsRemoved && usedByIsUsed%>" 412 onclick="<%="showUsingItems('" + usedBy.getType().name() + "', " + usedBy.getId() + ")"%>" 413 /> </tbl:header> 414 <tbl:cell column="name"><%=Base.getLink(ID, HTML.encodeTags(usedByName), proxy.getType(), proxy.getId(), writePermissionOnUsedBy)%></tbl:cell> 415 <tbl:cell column="type"><%=proxy.getType().toString()%></tbl:cell> 416 <tbl:cell column="description"><%=HTML.niceFormat(usedByDescription)%></tbl:cell> 417 </tbl:row> 418 <% 419 } 420 %> 421 </tbl:rows> 422 </tbl:data> 423 </tbl:table> 427 </tbl:rows> 428 </tbl:data> 429 </tbl:table> 430 </base:section> 424 431 <% 425 432 } 426 433 if (item instanceof SharedItem) 427 434 { 428 // Tables with users/groups/projects that this item is shared to 429 MultiPermissions mp = new MultiPermissions(Collections.singleton((SharedItem)item)); 430 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 431 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 432 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 433 434 if (users.hasNext() || groups.hasNext() || projects.hasNext()) 435 { 436 %> 437 <h4 class="docked">Shared to</h4> 438 <tbl:table 439 id="itemsSharedTo" 440 441 columns="all" 442 > 443 <tbl:columndef 444 id="itemType" 445 title="Item type" 446 /> 447 <tbl:columndef 448 id="name" 449 title="Name" 450 /> 451 <tbl:columndef 452 id="permissions" 453 title="Permissions" 454 /> 455 <tbl:data> 456 <tbl:columns> 457 </tbl:columns> 458 <tbl:rows> 459 <% 460 while(projects.hasNext()) 461 { 462 Project project = projects.next(); 463 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 464 %> 465 <tbl:row> 466 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 467 <tbl:cell column="name"><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 468 <tbl:cell column="permissions"> 469 <%=PermissionUtil.translatePermissionsToString(permissions)%> 470 </tbl:cell> 471 </tbl:row> 472 <% 473 } 474 while(groups.hasNext()) 475 { 476 Group group = groups.next(); 477 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 478 %> 479 <tbl:row> 480 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 481 <tbl:cell column="name"><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 482 <tbl:cell column="permissions"> 483 <%=PermissionUtil.translatePermissionsToString(permissions)%> 484 </tbl:cell> 485 </tbl:row> 486 <% 487 } 488 while (users.hasNext()) 489 { 490 User user = users.next(); 491 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 492 %> 493 <tbl:row> 494 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 495 <tbl:cell column="name"><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 496 <tbl:cell column="permissions"> 497 <%=PermissionUtil.translatePermissionsToString(permissions)%> 498 </tbl:cell> 499 </tbl:row> 500 <% 501 } 502 %> 503 </tbl:rows> 504 </tbl:data> 505 </tbl:table> 506 <% 507 } 508 else 509 { 510 %> 511 <h4>Shared to</h4> 512 This <%=itemType %> is not shared 513 (or, you don't have permission to view the ones it is shared to). 514 <% 515 } 435 %> 436 <jsp:include page="../../common/share/list_share.jsp"> 437 <jsp:param name="ID" value="<%=ID%>" /> 438 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 439 <jsp:param name="item_id" value="<%=itemId%>" /> 440 <jsp:param name="title" value="Shared to" /> 441 </jsp:include> 442 <% 516 443 } 517 444 %>
Note: See TracChangeset
for help on using the changeset viewer.