Browse Source

Merge branch 'master' of github.com:Islandora/islandora into ISLANDORA-171

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
53ae21275b
  1. 5
      content_modeller/.buildpath
  2. 28
      content_modeller/.project
  3. 12
      content_modeller/.settings/.jsdtscope
  4. 3
      content_modeller/.settings/org.eclipse.php.core.prefs
  5. 1
      content_modeller/.settings/org.eclipse.wst.jsdt.ui.superType.container
  6. 1
      content_modeller/.settings/org.eclipse.wst.jsdt.ui.superType.name
  7. 33
      content_modeller/css/content_modeller.css
  8. 16
      content_modeller/css/jquery.jnotify.css
  9. 68
      content_modeller/css/jquery.treeview.css
  10. BIN
      content_modeller/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
  11. BIN
      content_modeller/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
  12. BIN
      content_modeller/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  13. BIN
      content_modeller/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  14. BIN
      content_modeller/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  15. BIN
      content_modeller/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  16. BIN
      content_modeller/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  17. BIN
      content_modeller/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  18. BIN
      content_modeller/css/smoothness/images/ui-icons_222222_256x240.png
  19. BIN
      content_modeller/css/smoothness/images/ui-icons_2e83ff_256x240.png
  20. BIN
      content_modeller/css/smoothness/images/ui-icons_454545_256x240.png
  21. BIN
      content_modeller/css/smoothness/images/ui-icons_888888_256x240.png
  22. BIN
      content_modeller/css/smoothness/images/ui-icons_cd0a0a_256x240.png
  23. 486
      content_modeller/css/smoothness/jquery-ui-1.8.1.custom.css
  24. BIN
      content_modeller/images/add.png
  25. BIN
      content_modeller/images/ajax-loader.gif
  26. BIN
      content_modeller/images/blue_down.png
  27. BIN
      content_modeller/images/blue_up.png
  28. BIN
      content_modeller/images/edit.gif
  29. BIN
      content_modeller/images/file.gif
  30. BIN
      content_modeller/images/folder-closed.gif
  31. BIN
      content_modeller/images/folder.gif
  32. BIN
      content_modeller/images/minus.gif
  33. BIN
      content_modeller/images/plus.gif
  34. BIN
      content_modeller/images/purge.gif
  35. BIN
      content_modeller/images/red_info.png
  36. BIN
      content_modeller/images/remove.png
  37. BIN
      content_modeller/images/treeview-black-line.gif
  38. BIN
      content_modeller/images/treeview-black.gif
  39. BIN
      content_modeller/images/treeview-default-line.gif
  40. BIN
      content_modeller/images/treeview-default.gif
  41. BIN
      content_modeller/images/treeview-famfamfam-line.gif
  42. BIN
      content_modeller/images/treeview-famfamfam.gif
  43. BIN
      content_modeller/images/treeview-gray-line.gif
  44. BIN
      content_modeller/images/treeview-gray.gif
  45. BIN
      content_modeller/images/treeview-red-line.gif
  46. BIN
      content_modeller/images/treeview-red.gif
  47. BIN
      content_modeller/images/view.gif
  48. 7
      content_modeller/islandora_content_modeller.info
  49. 4378
      content_modeller/islandora_content_modeller.module
  50. 271
      content_modeller/js/content_modeller.js
  51. 92
      content_modeller/js/jquery.cookie.js
  52. 143
      content_modeller/js/jquery.jnotify.js
  53. 254
      content_modeller/js/jquery.treeview.min.js
  54. 56
      content_modeller/treeview.inc
  55. 29
      content_modeller/treeview/changelog.txt
  56. BIN
      content_modeller/treeview/images/add.png
  57. BIN
      content_modeller/treeview/images/file.gif
  58. BIN
      content_modeller/treeview/images/folder-closed.gif
  59. BIN
      content_modeller/treeview/images/folder.gif
  60. BIN
      content_modeller/treeview/images/minus.gif
  61. BIN
      content_modeller/treeview/images/plus.gif
  62. BIN
      content_modeller/treeview/images/purge.gif
  63. BIN
      content_modeller/treeview/images/remove.png
  64. BIN
      content_modeller/treeview/images/treeview-black-line.gif
  65. BIN
      content_modeller/treeview/images/treeview-black.gif
  66. BIN
      content_modeller/treeview/images/treeview-default-line.gif
  67. BIN
      content_modeller/treeview/images/treeview-default.gif
  68. BIN
      content_modeller/treeview/images/treeview-famfamfam-line.gif
  69. BIN
      content_modeller/treeview/images/treeview-famfamfam.gif
  70. BIN
      content_modeller/treeview/images/treeview-gray-line.gif
  71. BIN
      content_modeller/treeview/images/treeview-gray.gif
  72. BIN
      content_modeller/treeview/images/treeview-red-line.gif
  73. BIN
      content_modeller/treeview/images/treeview-red.gif
  74. BIN
      content_modeller/treeview/images/view.gif
  75. 72
      content_modeller/treeview/jquery.treeview.async.js
  76. 68
      content_modeller/treeview/jquery.treeview.css
  77. 251
      content_modeller/treeview/jquery.treeview.js
  78. 15
      content_modeller/treeview/jquery.treeview.min.js
  79. 16
      content_modeller/treeview/jquery.treeview.pack.js
  80. BIN
      content_modeller/treeview/jquery.treeview.zip
  81. 92
      content_modeller/treeview/lib/jquery.cookie.js
  82. 3363
      content_modeller/treeview/lib/jquery.js
  83. 8
      content_modeller/treeview/todo
  84. 7
      fesl/fedora_fesl.info
  85. 110
      fesl/fedora_fesl.module
  86. 95
      fesl/fesl_block.inc
  87. 71
      fesl/sample_policies/access-public.xml
  88. 44
      fesl/sample_policies/collection-feslpolicy.xml
  89. 7
      workflow_client/islandora_workflow_client.info
  90. 375
      workflow_client/islandora_workflow_client.module
  91. 83
      workflow_client/plugins/create_jp2.inc
  92. 66
      workflow_client/plugins/exif.inc
  93. 69
      workflow_client/plugins/image_resize.inc
  94. 82
      workflow_client/plugins/jhove.inc
  95. 127
      workflow_client/plugins/mods_extend.inc
  96. 125
      workflow_client/plugins/solr_index.inc
  97. 67
      workflow_client/plugins/xslt.inc
  98. 31
      workflow_client/process.inc
  99. 83
      workflow_client/send.php
  100. 61
      workflow_client/test.php
  101. Some files were not shown because too many files have changed in this diff Show More

5
content_modeller/.buildpath

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>

28
content_modeller/.project

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Islandora Content Modeler</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>

12
content_modeller/.settings/.jsdtscope

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>

3
content_modeller/.settings/org.eclipse.php.core.prefs

@ -1,3 +0,0 @@
#Mon May 17 18:04:49 CDT 2010
eclipse.preferences.version=1
include_path=0;/islandora_content_modeler

1
content_modeller/.settings/org.eclipse.wst.jsdt.ui.superType.container

@ -1 +0,0 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary

1
content_modeller/.settings/org.eclipse.wst.jsdt.ui.superType.name

@ -1 +0,0 @@
Window

33
content_modeller/css/content_modeller.css

@ -1,33 +0,0 @@
.contentModeller .collection
{
width: 400px;
float: left;
}
.contentModeller .model
{
width: 475px;
float: right;
}
.contentModeller img
{
width: 16px;
padding: 0px;
vertical-align: middle;
cursor: hand;
}
.contentModeller .ajaxForm
{
margin-top: 25px;
padding: 10px;
width:300px;
border: 1px dashed black;
display: none;
}
.contentModeller #ajaxBusy
{
display: none;
}

16
content_modeller/css/jquery.jnotify.css

@ -1,16 +0,0 @@
.jnotify-item
{
height: auto;
padding: 4px 4px 4px 4px;
margin: 0 0 5px 0;
display: block;
position: relative;
}
.jnotify-item-close
{
float: right;
margin-left: 2px;
}

68
content_modeller/css/jquery.treeview.css

@ -1,68 +0,0 @@
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
margin-top: 4px;
}
.treeview .hitarea {
background: url(../images/treeview-default.gif) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url(../images/treeview-default-line.gif) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(../images/treeview-default.gif); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview-red li { background-image: url(../images/treeview-red-line.gif); }
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../images/treeview-red.gif); }
.treeview-black li { background-image: url(../images/treeview-black-line.gif); }
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../images/treeview-black.gif); }
.treeview-gray li { background-image: url(../images/treeview-gray-line.gif); }
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../images/treeview-gray.gif); }
.treeview-famfamfam li { background-image: url(../images/treeview-famfamfam-line.gif); }
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../images/treeview-famfamfam.gif); }
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 20px; }
.filetree span.folder { background: url(../images/folder.gif) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url(../images/folder-closed.gif) 0 0 no-repeat; }
.filetree span.file { background: url(../images/file.gif) 0 0 no-repeat; }

BIN
content_modeller/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

BIN
content_modeller/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

BIN
content_modeller/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

BIN
content_modeller/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

BIN
content_modeller/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

BIN
content_modeller/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

BIN
content_modeller/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

BIN
content_modeller/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

BIN
content_modeller/css/smoothness/images/ui-icons_222222_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
content_modeller/css/smoothness/images/ui-icons_2e83ff_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
content_modeller/css/smoothness/images/ui-icons_454545_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
content_modeller/css/smoothness/images/ui-icons_888888_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
content_modeller/css/smoothness/images/ui-icons_cd0a0a_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

486
content_modeller/css/smoothness/jquery-ui-1.8.1.custom.css vendored

@ -1,486 +0,0 @@
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
.ui-widget-content a { color: #222222; }
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
.ui-widget-header a { color: #222222; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Resizable
----------------------------------*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Accordion
----------------------------------*/
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
/* IE7-/Win - Fix extra vertical space in lists */
.ui-accordion a { zoom: 1; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
----------------------------------*/
.ui-autocomplete { position: absolute; cursor: default; }
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/* Menu
----------------------------------*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
/* Button
----------------------------------*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/* Dialog
----------------------------------*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/* Slider
----------------------------------*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
----------------------------------*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/* Datepicker
----------------------------------*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/* Progressbar
----------------------------------*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }

BIN
content_modeller/images/add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

BIN
content_modeller/images/ajax-loader.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

BIN
content_modeller/images/blue_down.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
content_modeller/images/blue_up.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

BIN
content_modeller/images/edit.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

BIN
content_modeller/images/file.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

BIN
content_modeller/images/folder-closed.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

BIN
content_modeller/images/folder.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

BIN
content_modeller/images/minus.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

BIN
content_modeller/images/plus.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

BIN
content_modeller/images/purge.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

BIN
content_modeller/images/red_info.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
content_modeller/images/remove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 745 B

BIN
content_modeller/images/treeview-black-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/images/treeview-black.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/images/treeview-default-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
content_modeller/images/treeview-default.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/images/treeview-famfamfam-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

BIN
content_modeller/images/treeview-famfamfam.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
content_modeller/images/treeview-gray-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/images/treeview-gray.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/images/treeview-red-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/images/treeview-red.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/images/view.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

7
content_modeller/islandora_content_modeller.info

@ -1,7 +0,0 @@
; $Id$
name = Islandora Content Modeller
dependencies[] = fedora_repository
description = Allows you to manage and build content models for Islandora/Fedora.
package = Fedora Repository
version = 6.1dev
core = 6.x

4378
content_modeller/islandora_content_modeller.module

File diff suppressed because it is too large Load Diff

271
content_modeller/js/content_modeller.js

@ -1,271 +0,0 @@
var collection = new Array('Root');
var model = false;
$(document).ready(function () {
$(document).ajaxStart(function(){
$('#ajaxBusy').show();
}).ajaxStop(function(){
$('#ajaxBusy').hide();
});
$('#Notification').jnotifyInizialize({
oneAtTime: false,
appendType: 'append'
})
.css({
'marginTop': '20px',
'left': '20px',
'width': '500px',
'z-index': '9999'
});
updateCollectionTree();
updateModelList();
$('.refresh').click(function () {
$('#Notification').jnotifyAddMessage({text: 'Refreshed collection '+collection[collection.length-1]+' and model '+(model==false?'list':model)+'.', permanent: false});
updateCollectionTree();
if (model == false)
updateModelList();
else
updateModelTree();
return false;
});
$('.list').click(function () {
$('#Notification').jnotifyAddMessage({text: 'Refreshed model list.', permanent: false});
model = false;
updateModelList();
return false;
});
function updateBreadcrumbs()
{
var content = '';
for (var i = 0; i < collection.length; i++)
{
content += '<a href="#" class="collection_crumb" id="'+i+'">'+collection[i]+'</a> /';
}
$('#collection_crumbs').html(content);
}
function handleForm()
{
$('#edit-form-module').change(function () {
$.get('modeller/ajax/getFiles/', { module: $('#edit-form-module').val() }, function (data) {
$('#edit-form-filename-select').html(data);
});
$('#edit-form-class-select, #edit-form-method-select, #edit-form-handler-select').html('');
});
$('.form-item #edit-form-filename').hide();
$('.form-item #edit-form-filename').before('<select id="edit-form-filename-select"></select>');
$('#edit-form-filename-select').change(function () {
$('#edit-form-filename').val($('#edit-form-filename-select').val());
$.get('modeller/ajax/getClasses/', { module: $('#edit-form-module').val(),
file: $('#edit-form-filename').val(),
className: $('#edit-form-class').val() },
function (data) { $('#edit-form-class-select').html(data); });
});
$('.form-item #edit-form-class').hide();
$('.form-item #edit-form-class').before('<select id="edit-form-class-select"></select>');
$('#edit-form-class-select').change(function () {
$('#edit-form-class').val($('#edit-form-class-select').val());
$.get('modeller/ajax/getMethods/', { module: $('#edit-form-module').val(),
file: $('#edit-form-filename').val(),
className: $('#edit-form-class').val() },
function (data) {
$('#edit-form-method-select').html(data);
$('#edit-form-handler-select').html(data);
});
});
if ($('#edit-form-file').val() || $('#edit-form-class').val() || $('#edit-form-filename').val())
{
$.get('modeller/ajax/getFiles/', { module: $('#edit-form-module').val(), file: $('#edit-form-filename').val() }, function (data) {
$('#edit-form-filename-select').html(data);
});
$.get('modeller/ajax/getClasses/', { module: $('#edit-form-module').val(), file: $('#edit-form-filename').val(), className: $('#edit-form-class').val() }, function (data) {
$('#edit-form-class-select').html(data);
});
}
$('.form-item #edit-form-method, .form-item #edit-form-handler').hide();
$('.form-item #edit-form-method').before('<select id="edit-form-method-select"></select>');
$('.form-item #edit-form-handler').before('<select id="edit-form-handler-select"></select>');
$('#edit-form-method-select').change(function () {
$('#edit-form-method').val($('#edit-form-method-select').val());
});
$('#edit-form-handler-select').change(function () {
$('#edit-form-handler').val($('#edit-form-handler-select').val());
});
if ( $('#edit-form-class').val())
{
$.get('modeller/ajax/getMethods/', { module: $('#edit-form-module').val(), file: $('#edit-form-filename').val(), className: $('#edit-form-class').val(), method: $('#edit-form-method').val() }, function (data) {
$('#edit-form-method-select').html(data);
});
$.get('modeller/ajax/getMethods/', { module: $('#edit-form-module').val(), file: $('#edit-form-filename').val(), className: $('#edit-form-class').val(), method: $('#edit-form-handler').val() }, function (data) {
$('#edit-form-handler-select').html(data);
});
}
$('#ajaxForm #cancel').click(function (d) {
$('#ajaxForm').fadeOut();
return false;
});
$('#ajaxForm form').submit(function (d) {
$.post(d.target.action,
$('#'+d.target.id).serialize()+'&op=Save',
function (data)
{
lines = data.split(':');
if (lines.shift() == 'success')
{
$('#Notification').jnotifyAddMessage({text: lines.join(':'), permanent: false});
$('#ajaxForm').fadeOut();
if (model == false)
updateModelList();
else
updateModelTree();
updateCollectionTree();
} else
{
$('#ajaxForm').html(data);
handleForm();
}
});
return false;
});
}
function buttonIcons()
{
$('.ajaxButtonIcon').unbind();
$('.ajaxButtonIcon').click(function () {
$.get('modeller/ajax/button', { formReq: this.id}, function (data) {
lines = data.split(':');
if (lines.shift() == 'success')
{
$('#Notification').jnotifyAddMessage({text: lines.join(':'), permanent: false});
if (model == false)
updateModelList();
else
updateModelTree();
updateCollectionTree();
} else
{
$('#Notification').jnotifyAddMessage({text: data, permanent: false, type: 'error'});
}
});
});
}
function formIcons()
{
$('.ajaxFormIcon').unbind();
$('.ajaxFormIcon').click(function () {
var params=this.id.split(' ');
var formName=params.shift();
$.get('modeller/ajax/processForm/'+formName, { formReq: params.join(' ')}, function (data) {
if (data == '')
{
$('#Notification').jnotifyAddMessage({text: 'Error: Unable to load requested form <b>\''+formName+'\'</b>.', permanent: false, type: 'error'});
} else
{
$('#ajaxForm').html(data).fadeIn();
handleForm();
}
});
return false;
});
}
function updateModelList() {
$.get('modeller/ajax/listModels' , function (j) {
$('#model_tree').html(j);
$('#model_tree ul').treeview({ animated: "fast",
collapsed: true,
unique: false,
persist: "cookie",
cookieId: "modelTree"});
$(".list_model").click( function () {
model = this.id;
updateModelTree();
$('#Notification').jnotifyAddMessage({text: 'Displayed model '+this.id, permanent: false});
return false;
});
buttonIcons();
formIcons();
});
}
function updateModelTree() {
$.get('modeller/ajax/model', { model_pid: model} , function (j) {
$('#model_tree').html(j);
$('#model_tree ul').treeview({ animated: "fast",
collapsed: true,
unique: false,
persist: "cookie",
cookieId: "modelTree"});
buttonIcons();
formIcons();
});
}
function updateCollectionTree() {
collection_pid = collection[collection.length-1];
if (collection_pid == 'Root')
collection_pid = false;
$.get('modeller/ajax/collection', { collection_pid: collection_pid} , function (j) {
updateBreadcrumbs();
$('#collection_tree').html(j);
$('#collection_tree ul').treeview({ animated: "fast",
collapsed: true,
unique: false,
persist: "cookie",
cookieId: "collectionTree" });
buttonIcons();
formIcons();
$(".collection_model").click( function () {
model = this.id;
updateModelTree();
$('#Notification').jnotifyAddMessage({text: 'Displayed model '+this.id, permanent: false});
return false;
});
$(".collection_child").click( function () {
collection.push(this.id);
updateCollectionTree();
$('#Notification').jnotifyAddMessage({text: 'Switched to collection '+this.id, permanent: false});
return false;
});
$(".collection_crumb").click( function () {
var pop_no = collection.length-this.id-1;
for (var i =0; i < pop_no; i++)
collection.pop();
updateCollectionTree();
$('#Notification').jnotifyAddMessage({text: 'Switched to collection '+collection[collection.length-1], permanent: false});
return false;
});
});
}
});

92
content_modeller/js/jquery.cookie.js

@ -1,92 +0,0 @@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
var path = options.path ? '; path=' + options.path : '';
var domain = options.domain ? '; domain=' + options.domain : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};

143
content_modeller/js/jquery.jnotify.js

@ -1,143 +0,0 @@
/**
* jQuery.jNotify
* jQuery Notification Engine
*
* Copyright (c) 2010 Fabio Franzini
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notify and this permission notify shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author Fabio Franzini
* @copyright 2010 www.fabiofranzini.com
* @version 1
**/
(function(jQuery) {
jQuery.fn.jnotifyInizialize = function(options) {
var element = this;
var defaults = {
oneAtTime: false,
appendType: 'append'
};
var options = jQuery.extend({}, defaults, options);
this.addClass('notify-wrapper');
if (options.oneAtTime)
this.addClass('notify-wrapper-oneattime');
if (options.appendType == 'prepend' && options.oneAtTime == false)
this.addClass('notify-wrapper-prepend');
return this;
};
jQuery.fn.jnotifyAddMessage = function(options) {
var notifyWrapper = this;
if (notifyWrapper.hasClass('notify-wrapper')) {
var defaults = {
text: '',
type: 'message',
showIcon: true,
permanent: false,
disappearTime: 3000
};
var options = jQuery.extend({}, defaults, options);
var styleClass;
var iconClass;
switch (options.type) {
case 'message':
{
styleClass = 'ui-state-highlight';
iconClass = 'ui-icon-info';
}
break;
case 'error':
{
styleClass = 'ui-state-error';
iconClass = 'ui-icon-alert';
}
break;
default:
{
styleClass = 'ui-state-highlight';
iconClass = 'ui-icon-info';
}
break;
}
if (notifyWrapper.hasClass('notify-wrapper-oneattime')) {
this.children().remove();
}
var notifyItemWrapper = jQuery('<div class="jnotify-item-wrapper"></div>');
var notifyItem = jQuery('<div class="ui-corner-all jnotify-item"></div>')
.addClass(styleClass);
if (notifyWrapper.hasClass('notify-wrapper-prepend'))
notifyItem.prependTo(notifyWrapper);
else
notifyItem.appendTo(notifyWrapper);
notifyItem.wrap(notifyItemWrapper);
if (options.showIcon)
jQuery('<span class="ui-icon" style="float:left; margin-right: .3em;" />')
.addClass(iconClass)
.appendTo(notifyItem);
jQuery('<span></span>').html(options.text).appendTo(notifyItem);
jQuery('<div class="jnotify-item-close"><span class="ui-icon ui-icon-circle-close"/></div>')
.prependTo(notifyItem)
.click(function() { remove(notifyItem) });
// IEsucks
if (navigator.userAgent.match(/MSIE (\d+\.\d+);/)) {
notifyWrapper.css({ top: document.documentElement.scrollTop });
//http://groups.google.com/group/jquery-dev/browse_thread/thread/ba38e6474e3e9a41
notifyWrapper.removeClass('IEsucks');
}
// ------
if (!options.permanent) {
setTimeout(function() { remove(notifyItem); }, options.disappearTime);
}
}
function remove(obj) {
obj.animate({ opacity: '0' }, 600, function() {
obj.parent().animate({ height: '0px' }, 300,
function() {
obj.parent().remove();
// IEsucks
if (navigator.userAgent.match(/MSIE (\d+\.\d+);/)) {
//http://groups.google.com/group/jquery-dev/browse_thread/thread/ba38e6474e3e9a41
obj.parent().parent().removeClass('IEsucks');
}
// -------
});
});
}
};
})(jQuery);

254
content_modeller/js/jquery.treeview.min.js vendored

@ -1,254 +0,0 @@
/*
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
*
*/
;(function($) {
$.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
c1Elements.removeClass(c1).addClass(c2);
return this;
},
replaceClass: function(c1, c2) {
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
this.animate({ height: "toggle" }, animated, callback) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
if(callback)
callback.apply(this, arguments);
});
},
heightHide: function(animated, callback) {
if (animated) {
this.animate({ height: "hide" }, animated, callback);
} else {
this.hide();
if (callback)
this.each(callback);
}
},
prepareBranches: function(settings) {
if (!settings.prerendered) {
// mark last tree items
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
// collapse whole tree, or only those marked as closed, anyway except those marked as open
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
}
// return all items with sublists
return this.filter(":has(>ul)");
},
applyClasses: function(settings, toggler) {
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
// handle open ones
this.not(":has(>ul:hidden)")
.addClass(CLASSES.collapsable)
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
// create hitarea
this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
var classes = "";
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
$(this).addClass( classes );
});
}
// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
},
treeview: function(settings) {
if (!settings.cookieId) {
settings = $.extend({
cookieId: "treeview"
}, settings);
}
if (settings.add) {
return this.trigger("add", [settings.add]);
}
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
return callback.apply($(this).parent()[0], arguments);
};
}
// factory for treecontroller
function treeController(tree, control) {
// factory for click handlers
function handler(filter) {
return function() {
// reuse toggle event handler, applying the elements to toggle
// start searching for all hitareas
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
// for plain toggle, no filter is provided, otherwise we need to check the parent element
return filter ? $(this).parent("." + filter).length : true;
}) );
return false;
};
}
// click on first element to collapse tree
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
// click on second to expand tree
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
// click on third to toggle tree
$("a:eq(2)", control).click( handler() );
}
// handle toggle event
function toggler() {
$(this)
.parent()
// swap classes for hitarea
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
// swap classes for parent li
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
// find child lists
.find( ">ul" )
// toggle them
.heightToggle( settings.animated, settings.toggle );
if ( settings.unique ) {
$(this).parent()
.siblings()
// swap classes for hitarea
.find(">.hitarea")
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find( ">ul" )
.heightHide( settings.animated, settings.toggle );
}
}
function serialize() {
function binary(arg) {
return arg ? 1 : 0;
}
var data = [];
branches.each(function(i, e) {
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
});
$.cookie(settings.cookieId, data.join("") );
}
function deserialize() {
var stored = $.cookie(settings.cookieId);
if ( stored ) {
var data = stored.split("");
branches.each(function(i, e) {
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
});
}
}
// add treeview class to activate styles
this.addClass("treeview");
// prepare branches and find all tree items with child lists
var branches = this.find("li").prepareBranches(settings);
switch(settings.persist) {
case "cookie":
var toggleCallback = settings.toggle;
settings.toggle = function() {
serialize();
if (toggleCallback) {
toggleCallback.apply(this, arguments);
}
};
deserialize();
break;
case "location":
var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
if ( current.length ) {
current.addClass("selected").parents("ul, li").add( current.next() ).show();
}
break;
}
branches.applyClasses(settings, toggler);
// if control option is set, create the treecontroller and show it
if ( settings.control ) {
treeController(this, settings.control);
$(settings.control).show();
}
return this.bind("add", function(event, branches) {
$(branches).prev()
.removeClass(CLASSES.last)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable)
.find(">.hitarea")
.removeClass(CLASSES.lastCollapsableHitarea)
.removeClass(CLASSES.lastExpandableHitarea);
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
});
}
});
// classes used by the plugin
// need to be styled via external stylesheet, see first example
var CLASSES = $.fn.treeview.classes = {
open: "open",
closed: "closed",
expandable: "expandable",
expandableHitarea: "expandable-hitarea",
lastExpandableHitarea: "lastExpandable-hitarea",
collapsable: "collapsable",
collapsableHitarea: "collapsable-hitarea",
lastCollapsableHitarea: "lastCollapsable-hitarea",
lastCollapsable: "lastCollapsable",
lastExpandable: "lastExpandable",
last: "last",
hitarea: "hitarea"
};
// provide backwards compability
$.fn.Treeview = $.fn.treeview;
})(jQuery);

56
content_modeller/treeview.inc

@ -1,56 +0,0 @@
<?php
// $Id$
class treeview {
private $type;
private $content = '';
private $icons = '';
private $id = NULL;
private $children = array();
function __construct($content, $type = NULL, $icons = NULL, $id = NULL) {
$this->type = $type;
$this->content = $content;
$this->id = $id;
$this->icons = $icons;
}
function buildTree($class = NULL, $includeul = TRUE) {
$ret = '';
if ($includeul)
$ret .= '<ul ' . ($this->id != NULL ? 'id="'. $this->id .'"' : '') . ($class != NULL ? 'class="'. $class .'"' : '') .'>';
$ret .= '<li>';
if ($this->type != NULL) {
$ret .='<span class="'. $this->type .'">';
}
$ret .= $this->content;
if ($this->type != NULL) {
$ret .= '</span>';
}
$ret .= $this->icons;
if (count($this->children) > 0) {
if ($includeul)
$ret .= '<ul>';
else
$ret .= '<ul '. ($this->id != NULL ? 'id="' . $this->id .'"' : '') .'>';
foreach ($this->children as $tree) {
$ret .= $tree->buildTree(NULL, FALSE);
}
$ret .= '</ul>';
}
$ret .= '</li>';
if ($includeul)
$ret .= '</ul>';
return $ret;
}
function addChild($content, $type = 'file', $icons = NULL, $id = NULL) {
$tree = (is_object($content) && get_class($content) == 'treeview') ? $content : new treeview($content, $type, $icons, $id);
$this->children[] = $tree;
return $tree;
}
}

29
content_modeller/treeview/changelog.txt

@ -1,29 +0,0 @@
1.4
---
* Added changelog (this file)
* Fixed tree control to search only for anchors, allowing images or other elements inside the controls, while keeping the control usable with the keyboard
* Restructured folder layout: root contains plugin resources, lib contains script dependencies, demo contains demos and related files
* Added prerendered option: If set to true, assumes all hitarea divs and classes already rendered, speeding up initialization for big trees, but more obtrusive
* Added jquery.treeview.async.js for ajax-lazy-loading trees, see async.html demo
* Exposed $.fn.treeview.classes for custom classes if necessary
* Show treecontrol only when JavaScript is enabled
* Completely reworked themeing via CSS sprites, resulting in only two files per theme
* updated dotted, black, gray and red theme
* added famfamfam theme (no lines)
* Improved cookie persistence to allow multiple persisted trees per page via cookieId option
* Improved location persistence by making it case-insensitive
* Improved swapClass and replaceClass plugin implementations
* Added folder-closed.gif to filetree example
1.3
---
* Fixes for all outstanding bugs
* Added persistence features
* location based: click on a link in the treeview and reopen that link after the page loaded
* cookie based: save the state of the tree in a cookie on each click and load that on reload
* smoothed animations, fixing flickering in both IE and Opera
* Tested in Firefox 2, IE 6 & 7, Opera 9, Safari 3
* Moved documentation to jQuery wiki
* Requires jQuery 1.2+

BIN
content_modeller/treeview/images/add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

BIN
content_modeller/treeview/images/file.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

BIN
content_modeller/treeview/images/folder-closed.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

BIN
content_modeller/treeview/images/folder.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

BIN
content_modeller/treeview/images/minus.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

BIN
content_modeller/treeview/images/plus.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

BIN
content_modeller/treeview/images/purge.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

BIN
content_modeller/treeview/images/remove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 745 B

BIN
content_modeller/treeview/images/treeview-black-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/treeview/images/treeview-black.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/treeview/images/treeview-default-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
content_modeller/treeview/images/treeview-default.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/treeview/images/treeview-famfamfam-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

BIN
content_modeller/treeview/images/treeview-famfamfam.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
content_modeller/treeview/images/treeview-gray-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/treeview/images/treeview-gray.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/treeview/images/treeview-red-line.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
content_modeller/treeview/images/treeview-red.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
content_modeller/treeview/images/view.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

72
content_modeller/treeview/jquery.treeview.async.js

@ -1,72 +0,0 @@
/*
* Async Treeview 0.1 - Lazy-loading extension for Treeview
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id$
*
*/
;(function($) {
function load(settings, root, child, container) {
$.getJSON(settings.url, {root: root}, function(response) {
function createNode(parent) {
var current = $("<li/>").attr("id", this.id || "").html("<span>" + this.text + "</span>").appendTo(parent);
if (this.classes) {
current.children("span").addClass(this.classes);
}
if (this.expanded) {
current.addClass("open");
}
if (this.hasChildren || this.children && this.children.length) {
var branch = $("<ul/>").appendTo(current);
if (this.hasChildren) {
current.addClass("hasChildren");
createNode.call({
text:"placeholder",
id:"placeholder",
children:[]
}, branch);
}
if (this.children && this.children.length) {
$.each(this.children, createNode, [branch])
}
}
}
$.each(response, createNode, [child]);
$(container).treeview({add: child});
});
}
var proxied = $.fn.treeview;
$.fn.treeview = function(settings) {
if (!settings.url) {
return proxied.apply(this, arguments);
}
var container = this;
load(settings, "source", this, container);
var userToggle = settings.toggle;
return proxied.call(this, $.extend({}, settings, {
collapsed: true,
toggle: function() {
var $this = $(this);
if ($this.hasClass("hasChildren")) {
var childList = $this.removeClass("hasChildren").find("ul");
childList.empty();
load(settings, this.id, childList, container);
}
if (userToggle) {
userToggle.apply(this, arguments);
}
}
}));
};
})(jQuery);

68
content_modeller/treeview/jquery.treeview.css

@ -1,68 +0,0 @@
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
background-color: white;
margin-top: 4px;
}
.treeview .hitarea {
background: url(images/treeview-default.gif) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview-red li { background-image: url(images/treeview-red-line.gif); }
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); }
.treeview-black li { background-image: url(images/treeview-black-line.gif); }
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); }
.treeview-gray li { background-image: url(images/treeview-gray-line.gif); }
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); }
.treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); }
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); }
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
.filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; }
.filetree span.file { background: url(images/file.gif) 0 0 no-repeat; }

251
content_modeller/treeview/jquery.treeview.js

@ -1,251 +0,0 @@
/*
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
*
*/
;(function($) {
$.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
c1Elements.removeClass(c1).addClass(c2);
return this;
},
replaceClass: function(c1, c2) {
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
this.animate({ height: "toggle" }, animated, callback) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
if(callback)
callback.apply(this, arguments);
});
},
heightHide: function(animated, callback) {
if (animated) {
this.animate({ height: "hide" }, animated, callback);
} else {
this.hide();
if (callback)
this.each(callback);
}
},
prepareBranches: function(settings) {
if (!settings.prerendered) {
// mark last tree items
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
// collapse whole tree, or only those marked as closed, anyway except those marked as open
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
}
// return all items with sublists
return this.filter(":has(>ul)");
},
applyClasses: function(settings, toggler) {
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
// handle open ones
this.not(":has(>ul:hidden)")
.addClass(CLASSES.collapsable)
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
// create hitarea
this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
var classes = "";
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
$(this).addClass( classes );
});
}
// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
},
treeview: function(settings) {
settings = $.extend({
cookieId: "treeview"
}, settings);
if (settings.add) {
return this.trigger("add", [settings.add]);
}
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
return callback.apply($(this).parent()[0], arguments);
};
}
// factory for treecontroller
function treeController(tree, control) {
// factory for click handlers
function handler(filter) {
return function() {
// reuse toggle event handler, applying the elements to toggle
// start searching for all hitareas
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
// for plain toggle, no filter is provided, otherwise we need to check the parent element
return filter ? $(this).parent("." + filter).length : true;
}) );
return false;
};
}
// click on first element to collapse tree
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
// click on second to expand tree
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
// click on third to toggle tree
$("a:eq(2)", control).click( handler() );
}
// handle toggle event
function toggler() {
$(this)
.parent()
// swap classes for hitarea
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
// swap classes for parent li
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
// find child lists
.find( ">ul" )
// toggle them
.heightToggle( settings.animated, settings.toggle );
if ( settings.unique ) {
$(this).parent()
.siblings()
// swap classes for hitarea
.find(">.hitarea")
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find( ">ul" )
.heightHide( settings.animated, settings.toggle );
}
}
function serialize() {
function binary(arg) {
return arg ? 1 : 0;
}
var data = [];
branches.each(function(i, e) {
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
});
$.cookie(settings.cookieId, data.join("") );
}
function deserialize() {
var stored = $.cookie(settings.cookieId);
if ( stored ) {
var data = stored.split("");
branches.each(function(i, e) {
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
});
}
}
// add treeview class to activate styles
this.addClass("treeview");
// prepare branches and find all tree items with child lists
var branches = this.find("li").prepareBranches(settings);
switch(settings.persist) {
case "cookie":
var toggleCallback = settings.toggle;
settings.toggle = function() {
serialize();
if (toggleCallback) {
toggleCallback.apply(this, arguments);
}
};
deserialize();
break;
case "location":
var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
if ( current.length ) {
current.addClass("selected").parents("ul, li").add( current.next() ).show();
}
break;
}
branches.applyClasses(settings, toggler);
// if control option is set, create the treecontroller and show it
if ( settings.control ) {
treeController(this, settings.control);
$(settings.control).show();
}
return this.bind("add", function(event, branches) {
$(branches).prev()
.removeClass(CLASSES.last)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable)
.find(">.hitarea")
.removeClass(CLASSES.lastCollapsableHitarea)
.removeClass(CLASSES.lastExpandableHitarea);
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
});
}
});
// classes used by the plugin
// need to be styled via external stylesheet, see first example
var CLASSES = $.fn.treeview.classes = {
open: "open",
closed: "closed",
expandable: "expandable",
expandableHitarea: "expandable-hitarea",
lastExpandableHitarea: "lastExpandable-hitarea",
collapsable: "collapsable",
collapsableHitarea: "collapsable-hitarea",
lastCollapsableHitarea: "lastCollapsable-hitarea",
lastCollapsable: "lastCollapsable",
lastExpandable: "lastExpandable",
last: "last",
hitarea: "hitarea"
};
// provide backwards compability
$.fn.Treeview = $.fn.treeview;
})(jQuery);

15
content_modeller/treeview/jquery.treeview.min.js vendored

@ -1,15 +0,0 @@
/*
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
*
*/;(function($){$.extend($.fn,{swapClass:function(c1,c2){var c1Elements=this.filter('.'+c1);this.filter('.'+c2).removeClass(c2).addClass(c1);c1Elements.removeClass(c1).addClass(c2);return this;},replaceClass:function(c1,c2){return this.filter('.'+c1).removeClass(c1).addClass(c2).end();},hoverClass:function(className){className=className||"hover";return this.hover(function(){$(this).addClass(className);},function(){$(this).removeClass(className);});},heightToggle:function(animated,callback){animated?this.animate({height:"toggle"},animated,callback):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(callback)callback.apply(this,arguments);});},heightHide:function(animated,callback){if(animated){this.animate({height:"hide"},animated,callback);}else{this.hide();if(callback)this.each(callback);}},prepareBranches:function(settings){if(!settings.prerendered){this.filter(":last-child:not(ul)").addClass(CLASSES.last);this.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").find(">ul").hide();}return this.filter(":has(>ul)");},applyClasses:function(settings,toggler){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event){toggler.apply($(this).next());}).add($("a",this)).hoverClass();if(!settings.prerendered){this.filter(":has(>ul:hidden)").addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable);this.not(":has(>ul:hidden)").addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable);this.prepend("<div class=\""+CLASSES.hitarea+"\"/>").find("div."+CLASSES.hitarea).each(function(){var classes="";$.each($(this).parent().attr("class").split(" "),function(){classes+=this+"-hitarea ";});$(this).addClass(classes);});}this.find("div."+CLASSES.hitarea).click(toggler);},treeview:function(settings){settings=$.extend({cookieId:"treeview"},settings);if(settings.add){return this.trigger("add",[settings.add]);}if(settings.toggle){var callback=settings.toggle;settings.toggle=function(){return callback.apply($(this).parent()[0],arguments);};}function treeController(tree,control){function handler(filter){return function(){toggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){return filter?$(this).parent("."+filter).length:true;}));return false;};}$("a:eq(0)",control).click(handler(CLASSES.collapsable));$("a:eq(1)",control).click(handler(CLASSES.expandable));$("a:eq(2)",control).click(handler());}function toggler(){$(this).parent().find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightToggle(settings.animated,settings.toggle);if(settings.unique){$(this).parent().siblings().find(">.hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightHide(settings.animated,settings.toggle);}}function serialize(){function binary(arg){return arg?1:0;}var data=[];branches.each(function(i,e){data[i]=$(e).is(":has(>ul:visible)")?1:0;});$.cookie(settings.cookieId,data.join(""));}function deserialize(){var stored=$.cookie(settings.cookieId);if(stored){var data=stored.split("");branches.each(function(i,e){$(e).find(">ul")[parseInt(data[i])?"show":"hide"]();});}}this.addClass("treeview");var branches=this.find("li").prepareBranches(settings);switch(settings.persist){case"cookie":var toggleCallback=settings.toggle;settings.toggle=function(){serialize();if(toggleCallback){toggleCallback.apply(this,arguments);}};deserialize();break;case"location":var current=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase();});if(current.length){current.addClass("selected").parents("ul, li").add(current.next()).show();}break;}branches.applyClasses(settings,toggler);if(settings.control){treeController(this,settings.control);$(settings.control).show();}return this.bind("add",function(event,branches){$(branches).prev().removeClass(CLASSES.last).removeClass(CLASSES.lastCollapsable).removeClass(CLASSES.lastExpandable).find(">.hitarea").removeClass(CLASSES.lastCollapsableHitarea).removeClass(CLASSES.lastExpandableHitarea);$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings,toggler);});}});var CLASSES=$.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};$.fn.Treeview=$.fn.treeview;})(jQuery);

16
content_modeller/treeview/jquery.treeview.pack.js

@ -1,16 +0,0 @@
/*
* Treeview 1.4 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
*
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){$.1l($.F,{E:4(b,c){l a=3.n(\'.\'+b);3.n(\'.\'+c).o(c).m(b);a.o(b).m(c);8 3},s:4(a,b){8 3.n(\'.\'+a).o(a).m(b).P()},1n:4(a){a=a||"1j";8 3.1j(4(){$(3).m(a)},4(){$(3).o(a)})},1h:4(b,a){b?3.1g({1e:"p"},b,a):3.x(4(){T(3)[T(3).1a(":U")?"H":"D"]();7(a)a.A(3,O)})},12:4(b,a){7(b){3.1g({1e:"D"},b,a)}1L{3.D();7(a)3.x(a)}},11:4(a){7(!a.1k){3.n(":r-1H:G(9)").m(k.r);3.n((a.1F?"":"."+k.X)+":G(."+k.W+")").6(">9").D()}8 3.n(":y(>9)")},S:4(b,c){3.n(":y(>9):G(:y(>a))").6(">1z").C(4(a){c.A($(3).19())}).w($("a",3)).1n();7(!b.1k){3.n(":y(>9:U)").m(k.q).s(k.r,k.t);3.G(":y(>9:U)").m(k.u).s(k.r,k.v);3.1r("<J 14=\\""+k.5+"\\"/>").6("J."+k.5).x(4(){l a="";$.x($(3).B().1o("14").13(" "),4(){a+=3+"-5 "});$(3).m(a)})}3.6("J."+k.5).C(c)},z:4(g){g=$.1l({N:"z"},g);7(g.w){8 3.1K("w",[g.w])}7(g.p){l d=g.p;g.p=4(){8 d.A($(3).B()[0],O)}}4 1m(b,c){4 L(a){8 4(){K.A($("J."+k.5,b).n(4(){8 a?$(3).B("."+a).1i:1I}));8 1G}}$("a:10(0)",c).C(L(k.u));$("a:10(1)",c).C(L(k.q));$("a:10(2)",c).C(L())}4 K(){$(3).B().6(">.5").E(k.Z,k.Y).E(k.I,k.M).P().E(k.u,k.q).E(k.v,k.t).6(">9").1h(g.1f,g.p);7(g.1E){$(3).B().1D().6(">.5").s(k.Z,k.Y).s(k.I,k.M).P().s(k.u,k.q).s(k.v,k.t).6(">9").12(g.1f,g.p)}}4 1d(){4 1C(a){8 a?1:0}l b=[];j.x(4(i,e){b[i]=$(e).1a(":y(>9:1B)")?1:0});$.V(g.N,b.1A(""))}4 1c(){l b=$.V(g.N);7(b){l a=b.13("");j.x(4(i,e){$(e).6(">9")[1y(a[i])?"H":"D"]()})}}3.m("z");l j=3.6("Q").11(g);1x(g.1w){18"V":l h=g.p;g.p=4(){1d();7(h){h.A(3,O)}};1c();17;18"1b":l f=3.6("a").n(4(){8 3.16.15()==1b.16.15()});7(f.1i){f.m("1v").1u("9, Q").w(f.19()).H()}17}j.S(g,K);7(g.R){1m(3,g.R);$(g.R).H()}8 3.1t("w",4(a,b){$(b).1s().o(k.r).o(k.v).o(k.t).6(">.5").o(k.I).o(k.M);$(b).6("Q").1q().11(g).S(g,K)})}});l k=$.F.z.1J={W:"W",X:"X",q:"q",Y:"q-5",M:"t-5",u:"u",Z:"u-5",I:"v-5",v:"v",t:"t",r:"r",5:"5"};$.F.1p=$.F.z})(T);',62,110,'|||this|function|hitarea|find|if|return|ul||||||||||||var|addClass|filter|removeClass|toggle|expandable|last|replaceClass|lastExpandable|collapsable|lastCollapsable|add|each|has|treeview|apply|parent|click|hide|swapClass|fn|not|show|lastCollapsableHitarea|div|toggler|handler|lastExpandableHitarea|cookieId|arguments|end|li|control|applyClasses|jQuery|hidden|cookie|open|closed|expandableHitarea|collapsableHitarea|eq|prepareBranches|heightHide|split|class|toLowerCase|href|break|case|next|is|location|deserialize|serialize|height|animated|animate|heightToggle|length|hover|prerendered|extend|treeController|hoverClass|attr|Treeview|andSelf|prepend|prev|bind|parents|selected|persist|switch|parseInt|span|join|visible|binary|siblings|unique|collapsed|false|child|true|classes|trigger|else'.split('|'),0,{}))

BIN
content_modeller/treeview/jquery.treeview.zip

Binary file not shown.

92
content_modeller/treeview/lib/jquery.cookie.js

@ -1,92 +0,0 @@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @example $.cookie('the_cookie', 'the_value');
* @desc Set the value of a cookie.
* @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
* @desc Create a cookie with all available options.
* @example $.cookie('the_cookie', 'the_value');
* @desc Create a session cookie.
* @example $.cookie('the_cookie', null);
* @desc Delete a cookie by passing null as value.
*
* @param String name The name of the cookie.
* @param String value The value of the cookie.
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
* when the the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
* require a secure protocol (like HTTPS).
* @type undefined
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
/**
* Get the value of a cookie with the given name.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String name The name of the cookie.
* @return The value of the cookie.
* @type String
*
* @name $.cookie
* @cat Plugins/Cookie
* @author Klaus Hartl/klaus.hartl@stilbuero.de
*/
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
var path = options.path ? '; path=' + options.path : '';
var domain = options.domain ? '; domain=' + options.domain : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};

3363
content_modeller/treeview/lib/jquery.js vendored

File diff suppressed because it is too large Load Diff

8
content_modeller/treeview/todo

@ -1,8 +0,0 @@
1.5
---
* add classes and rules for root items
* lazy-loading: render the complete tree, but only apply hitzones and hiding of children to the first level on load
* async treeview
* support animations
* support persist options

7
fesl/fedora_fesl.info

@ -1,7 +0,0 @@
; $Id$
name = Islandora FeSL
description = Provides a block that lists collections that a user can read/write based on the drupal roles that they belong to. Also includes a method used for determining when to display ingest/edit/purge icons for a specific user.
package = Fedora Repository
dependencies[] = fedora_repository
version = 6.1dev
core = 6.x

110
fesl/fedora_fesl.module

@ -1,110 +0,0 @@
<?php
// $Id$
function fedora_fesl_check_roles($checkPid,$checkPerm='write') {
global $user;
$ret = FALSE;
if ($user != null) {
$cache_key = 'fedora_fesl_check_roles'.md5($user->name.$checkPid.$checkPerm);
if (($output = cache_get($cache_key))===0)
{
$roles = $user->roles;
if (in_array('administrator',$roles)) {
$ret = true;
} else
{
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$found = array();
foreach ($roles as $role) {
if (preg_match('/^(([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+)\s+(write|read)/',$role,$matches)) {
$pid = $matches[1];
$perm = $matches[6];
if ($perm == $checkPerm) {
$found[]=$pid;
}
}
}
if (count($found) > 0) {
if (in_array($checkPid,$found)) {
$ret = TRUE;
}
$item=new Fedora_Item($checkPid);
$rels=$item->get_relationships();
if (count($rels) > 0) {
foreach ($rels as $rel) {
$ret = $ret || fedora_fesl_check_roles($rel['object'],$checkPerm);
}
}
}
}
cache_set($cache_key,$ret,'cache',time()+variable_get('fedora_image_blocks_cache_time',3600));
} else {
if (is_object($output))
{
$ret=$output->data;
}
}
}
return $ret;
}
function fedora_fesl_block($op = 'list', $delta = 0, $edit = array()) {
// The $op parameter determines what piece of information is being requested.
switch ($op) {
case 'list':
// If $op is "list", we just need to return a list of block descriptions.
// This is used to provide a list of possible blocks to the administrator,
// end users will not see these descriptions.
$blocks[0] = array(
'info' => t('FeSL Collections Listing Block'),
);
return $blocks;
case 'configure':
$form = array();
switch ($delta) {
case 0:
/* $form['fedora_image_rotator_block_numimages'] = array(
'#type'=>'textfield',
'#title' => t('The number of images to display in the block.'),
'#default_value' => variable_get('fedora_image_rotator_block_numimages',1));*/
break;
}
return $form;
case 'save':
// If $op is "save", we need to save settings from the configuration form.
// Since the first block is the only one that allows configuration, we
// need to check $delta to make sure we only save it.
switch ($delta) {
case 0:
// variable_set('fedora_image_rotator_block_query', $edit['fedora_image_rotator_block_query']);
break;
}
return;
case 'view': default:
// If $op is "view", then we need to generate the block for display
// purposes. The $delta parameter tells us which block is being requested.
switch ($delta) {
case 0:
module_load_include('inc', 'fedora_fesl', 'fesl_block');
$block['subject'] = t('My Collections');
$block['content'] = _fedora_fesl_block_content();
break;
}
return $block;
}
}

95
fesl/fesl_block.inc

@ -1,95 +0,0 @@
<?
// $Id$
/*
* @file fesl_block.inc
*/
function _fedora_fesl_block_content() {
module_load_include('inc', 'fedora_repository', 'CollectionClass');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
global $user;
if ($user != null && $user->uid != 0) {
$roles = $user->roles;
$write = array(); $read = array();
$content ='';
foreach ($roles as $role) {
if (preg_match('/^(([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+)\s+(write|read)/',$role,$matches)) {
$pid = $matches[1];
$perm = $matches[6];
switch (strtolower($perm))
{
case 'write':
$write[]='$object <dc:identifier> \''.$pid.'\'';
break;
case 'read':
$read[]=$pid;
break;
}
}
}
$content .= t('This page lists the collections which your user has special access to. You may add, edit, or delete from any collections listed under "Write Access". You have full read access to any collections listed under "Read Access". The permissions listed here also extend to any child collections within the collections listed.');
$content .= '<h3>Write Access</h3>';
if (count($write) > 0) {
$itqlquery = 'select $object $title from <#ri>
where ('.join(' or ', $write).')
and $object <dc:title> $title';
$content .= _fedora_fesl_block_getList($itqlquery);
} else if (in_array('administrator',$user->roles)) {
$content .= t('You are an administrator with write access to everything.');
} else {
$content .= t('You do not have write access to any collections.');
}
$content .= '<h3>Read Access</h3>';
if (count($read) > 0) {
$itqlquery = 'select $object $title from <#ri>
where ('.join(' or ', $read).')
and $object <dc:title> $title';
$content .= _fedora_fesl_block_getList($itqlquery);
} else {
$content .= t('You do not have read access to any non-public collections.');
}
return $content;
}
}
function _fedora_fesl_block_getList($itqlquery)
{
global $base_url;
$collection = new CollectionClass(null);
$results = $collection->getRelatedItems(null, $itqlquery);
$resultsdoc = new DomDocument();
$resultsdoc->loadXML($results);
$resultslist = $resultsdoc->getElementsByTagName('result');
if ( $resultslist->length == 0 ) {
return '';
}
$content = '';
for ($i=0;$i<$resultslist->length;$i++) {
$randresult=$resultslist->item($i);
$objs = $randresult->getElementsByTagName('object');
$obj = $objs->item(0);
$pid = substr( $obj->getAttribute('uri'), 12);
$titles = $randresult->getElementsByTagName('title');
$title = $titles->item(0);
$content .= '<a href="'.$base_url.'/fedora/repository/'.$pid.'"/>'.$title->nodeValue.'</a><br/>';
}
return $content;
}

71
fesl/sample_policies/access-public.xml

@ -1,71 +0,0 @@
<Policy PolicyId="access-public"
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides"
xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os"
xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os http://docs.oasis-open.org/xacml/2.0/access_control-xacml-2.0-policy-schema-os.xsd urn:oasis:names:tc:xacml:2.0:context:schema:os http://docs.oasis-open.org/xacml/2.0/access_control-xacml-2.0-context-schema-os.xsd">
<Description>A bootstrap policy to allow public users to read the repository itself (not necessarily any items within)</Description>
<Target>
<Subjects>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">anonymous</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">anonymous</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">authenticated user</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">authenticated user</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
</Subjects>
<Actions>
<Action>
<ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
<ActionAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:action:id" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</ActionMatch>
</Action>
</Actions>
</Target>
<Rule Effect="Permit" RuleId="au:edu:mq:melcoe:ramp:fedora:xacml:2.0:rule:generic-permit">
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of">
<ResourceAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:resource:datastream:id"
DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">WORKFLOW</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">WORKFLOW_TMPL</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ISLANDORACM</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">COLLECTION_POLICY</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">COLLECTION_POLICY_TMPL</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">FESLPOLICY</AttributeValue>
</Apply>
</Apply>
</Apply>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-at-least-one-member-of">
<EnvironmentAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:environment:httpRequest:clientIpAddress"
DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">0:0:0:0:0:0:0:1</AttributeValue>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">127.0.0.1</AttributeValue>
</Apply>
</Apply>
</Apply>
</Condition>
</Rule>
</Policy>

44
fesl/sample_policies/collection-feslpolicy.xml

@ -1,44 +0,0 @@
<Policy PolicyId="access-archives"
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides"
xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os"
xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:policy:schema:os http://docs.oasis-open.org/xacml/2.0/access_control-xacml-2.0-policy-schema-os.xsd urn:oasis:names:tc:xacml:2.0:context:schema:os http://docs.oasis-open.org/xacml/2.0/access_control-xacml-2.0-context-schema-os.xsd">
<Description>Allows users in the "uofm:archives write" group to have unlimited access to all resources in the uofm:archives collection.</Description>
<Target>
<Subjects>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">uofm:archives write</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:fedora:names:fedora:2.1:subject:role" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">uofm:archives write</AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</SubjectMatch>
</Subject>
</Subjects>
<Resources>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/islandora:top/uofm:archives/.*</AttributeValue>
<ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI"/>
</ResourceMatch>
</Resource>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">/islandora:top/uofm:archives</AttributeValue>
<ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI"/>
</ResourceMatch>
</Resource>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">/FedoraRepository</AttributeValue>
<ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#anyURI"/>
</ResourceMatch>
</Resource>
</Resources>
</Target>
<Rule Effect="Permit" RuleId="au:edu:mq:melcoe:ramp:fedora:xacml:2.0:rule:generic-permit"/>
</Policy>

7
workflow_client/islandora_workflow_client.info

@ -1,7 +0,0 @@
; $Id$
name = Islandora Workflow Client
dependencies[] = fedora_repository
description = A STOMP client that listens for JMS messages from Fedora. On receiving a message, it will get the workflow datastream from the updated object and determine if any processes need to be run. Processes must be registered as plugins to this module for them to be updated. Ensure that the apim messages are configured as a QUEUE so that the messages persist when the workflow client is not running.
package = Fedora Repository
version = 6.1dev
core = 6.x

375
workflow_client/islandora_workflow_client.module

@ -1,375 +0,0 @@
<?php
function islandora_workflow_client_menu()
{
$items['admin/settings/workflow_client'] = array(
'title' => 'Islandora Workflow Client',
'description' => 'Manage Islandora Workflows',
'page callback' => 'islandora_workflow_client_manage',
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM
);
return $items;
}
function islandora_workflow_client_search_submit($form,&$form_state)
{
$url ='admin/settings/workflow_client/'.$form['process_name']['#value'];
if (trim($form['process_id']['#value']) !== '') {
$url.='/'.$form['process_id']['#value'];
} else {
$url .= '/-/';
}
if (trim($form['collection_pid']['#value']) !== '') {
$url.='/'.$form['collection_pid']['#value'];
} else {
$url .= '/-/';
}
drupal_goto($url);
}
function islandora_workflow_client_search(&$form_state,$terms=null,$process_id=null,$collection=null)
{
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$form = array();
$form['process_name'] = array(
'#type' => 'textfield',
'#required'=> TRUE,
'#title' => t('Search by Process Name'),
'#default_value' => ($terms!=null?$terms:''),
'#description' => t('Returns a list of objects that match the process name(s) entered. Separate multiple names by spaces.'),
);
$form['process_id'] = array(
'#type' => 'textfield',
'#title' => t('Search by Process ID'),
'#default_value' => ($process_id!=null?$process_id:''),
'#description' => t('Returns only objects that match the also match the process id entered. '),
);
$form['collection_pid'] = array(
'#type' => 'textfield',
'#title' => t('Search by Collection PID'),
'#default_value' => ($collection!=null?$collection:''),
'#description' => t('Returns only objects that match the also match the collection pid(s) entered. Separate multiple PIDs by spaces.'),
);
$form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
return $form;
}
function islandora_workflow_client_manage($terms = null, $process_id= null, $collection = null, $queue= null, $queueProcess = null)
{
if ($collection == 'none' || $collection == '-') {
$collection = null;
}
if ($process_id == 'none' || $process_id == '-') {
$process_id = null;
}
$output = '';
if (trim($terms) != '')
{
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'islandora_workflow_client', 'workflow');
if (module_load_include('php', 'islandora_solr_search', 'Solr/Service') === FALSE)
{
drupal_set_message(t('Error: Islandora_solr_search module is required to search by process.'));
} else
{
$host = variable_get('islandora_solr_search_block_host','localhost');
$port = variable_get('islandora_solr_search_block_port','8080');
$appName = variable_get('islandora_solr_search_block_app_name','solr');
$solr = new Apache_Solr_Service($host, $port, '/'.$appName.'/');
try
{
if ($solr->ping())
{
$q = preg_split('/\s+/',$terms);
foreach ($q as $key=>$bit)
{
$q[$key]='workflow_process_t:'.htmlentities($bit);
}
$query = join(' OR ',$q);
if (trim($collection) != '')
{
$q= preg_split('/\s/',$collection);
foreach ($q as $key=>$bit)
{
$q[$key]='related_item_identifier_t:'.htmlentities(preg_replace('/\:/','/',$bit));
}
$query .= ' AND ('. join(' OR ',$q).')';
}
$results = $solr->search($query,0,100);
$pids=array();
$processes = array();
if ($results->response->numFound ==0 )
{
drupal_set_message(t('No processes found.'));
} else
{
foreach($results->response->docs as $doc)
{
$id = preg_replace('/\//',':',$doc->id);
$collection_pid = preg_replace('/\//',':',$doc->related_item_identifier_t);
$pids[]=$id;
if (!is_array($doc->workflow_process_t))
{
if (!is_array($processes[$doc->workflow_process_t]))
$processes[$doc->workflow_process_t]=array($id);
else
$processes[$doc->workflow_process_t][]=$id;
} else
{
foreach ($doc->workflow_process_t as $process)
{
if (!is_array($processes[$process]))
$processes[$process]=array($id);
else
$processes[$process][]=$id;
}
}
}
}
$workflows=array();
foreach ($pids as $pid)
{
$workflows[$pid]=Workflow::loadFromObject($pid);
}
if (count($processes) > 0)
{
$errors=array();
$headers = array('Process Name', '# Waiting to Run', '# Completed', '# Errors', 'Action');
$rows=array();
foreach ($processes as $name=>$pids)
{
$errCount = 0;
$waitCount =0;
$completeCount = 0;
$display = false;
foreach ($pids as $pid)
{
if ( isset($workflows[$pid]) && $workflows[$pid] !== false )
{
$display = true;
$procs = $workflows[$pid]->getProcesses();
$updated = FALSE;
foreach ($procs as $id=>$n)
{
if ($process_id == null || $id == $process_id)
{
if ($name == $n)
{
$proc=$workflows[$pid]->getProcess($id);
if (($queue == 'queue'|| ($queue =='errorQueue' && $proc['state'] == 'error')) && $queueProcess == $n)
{
$workflows[$pid]->setState($id,'waiting');
$updated=TRUE;
}
switch ($proc['state'])
{
case 'completed':
$completeCount++;
break;
case 'waiting':
$waitCount++;
break;
case 'error':
$errCount++;
$errors[]=$proc;
break;
}
}
}
if ($updated)
{
$workflows[$pid]->saveToFedora();
}
}
}
}
if ($display) {
$rows[]= array($name, $waitCount,$completeCount,$errCount,
l('Add All to Queue','admin/settings/workflow_client/'.$terms.'/'.(trim($process_id)==''?'none':$process_id).'/'.(trim($collection)==''?'none':$collection).'/queue/'.$name).'<br/>'.
l('Add Errors to Queue','admin/settings/workflow_client/'.$terms.'/'.(trim($process_id)==''?'none':$process_id).'/'.(trim($collection)==''?'none':$collection).'/errorQueue/'.$name));
}
}
if ($queue == 'queue' || $queue == 'errorQueue')
{
drupal_goto('admin/settings/workflow_client/'.$terms.(trim($collection)==''?'/'.$collection:''));
}
$output.='<h3>Search for '.($process_id!=null?'process id '.$process_id.' with terms ':'').' "'.$terms.'" '.(trim($collection)!=''?'in collection(s) "'.$collection.'" ':'').'returned Processes:</h3>';
$output.=theme('table',$headers,$rows);
if (count ($errors) > 0)
{
$output.='<h3>Found Errors</h3>';
foreach ($errors as $proc)
{
$output.='<b>Process id: </b> '.$proc['id'].'<br/>';
$output.='<b>Process name: </b> '.$proc['name'].'<br/>';
$output.='<b># Attempts: </b> '.$proc['attempts'].'<br/>';
$output.='<b>Timestamp: </b> '.$proc['timestamp'].'<br/>';
$output.='<b>Message: </b> '.$proc['message'].'<br/>';
}
}
}
} else
{
drupal_set_message(t('Unable to connect to Solr at "%solr" for solr_index process on "%pid".',array('%pid'=>$pid,'%solr'=>$host.':'.$port.'/'.$appName.'/')));
}
} catch (Exception $e)
{
drupal_set_message(t('Caught exception from Solr at %solr for solr_index process on "%pid": %msg', array('%pid'=>$pid,'%solr'=>$host.':'.$port.'/'.$appName.'/','%msg'=>$e->getMessage())));
}
}
}
$output .= drupal_get_form('islandora_workflow_client_search',$form,NULL, $terms, $process_id, $collection);
return $output;
}
function islandora_workflow_client_cron()
{
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'islandora_workflow_client', 'workflow');
ob_start();
echo 'workflow client running'."\n";
$con = new Stomp(variable_get('fedora_stomp_url', 'tcp://localhost:61613'));
$queue='/queue/fedora.apim.update';
$con->subscribe($queue);
$messagesToSend=array();
for ($i=0;$i<100;$i++) {
$msg = $con->readFrame();
if ($msg != null) {
$con->ack($msg);
$xmlobj = simplexml_load_string($msg->body);
$dsid=null; $pid=null;
$logMessage = '';
foreach ($xmlobj->category as $cat) {
switch ($cat['scheme']) {
case 'fedora-types:dsID':
$dsid=(string)$cat['term'];
break;
case 'fedora-types:pid':
$pid=(string)$cat['term'];
break;
case 'fedora-types:logMessage':
$logMessage=(string)$cat['term'];
break;
}
}
echo $pid.' '.$xmlobj->title ."\n";
if ($pid !== NULL && $xmlobj->title =='purgeObject') { // delete the object from the solr index.
if (module_load_include('php', 'islandora_solr_search', 'Solr/Service') === FAlSE) {
echo t('Unable to load Solr/Service from islandora_solr_search module on "%pid" for process solr_index.', array('%pid' => $pid)).'<br/>';
} else {
$host = variable_get('islandora_solr_search_block_host', 'localhost');
$port = variable_get('islandora_solr_search_block_port', '8080');
$appName = variable_get('islandora_solr_search_block_app_name', 'solr');
$solr = new Apache_Solr_Service($host, $port, '/'. $appName .'/');
try {
if ($solr->ping()) {
$solr->deleteById($pid);
$solr->commit();
$solr->optimize();
} else {
echo t('Unable to connect to Solr at "%solr" for solr_index process on "%pid".', array('%pid' => $pid, '%solr' => $host .':'. $port . '/'. $appName .'/')).'<br/>';
}
}
catch (Exception $e) {
echo t('Caught exception from Solr at %solr for solr_index process on "%pid": %msg', array('%pid' => $pid, '%solr' => $host .':'. $port .'/'. $appName .'/', '%msg' => $e->getMessage())).'<br/>';
}
}
} else if ($pid !== NULL && ($wf= Workflow::loadFromObject($pid)) !== FALSE) {
if (!$wf->validate()) {
// var_dump(Workflow::$errors);
$con->send($queue,$msg->body);
} else {
$saveFlag=FALSE;
if ($dsid !== NULL) {
$saveFlag = $wf->resetDependancies($dsid,$logMessage);
}
$procs = $wf->getReadyProcesses();
foreach ($procs as $id=>$proc) {
if (module_load_include('inc','islandora_workflow_client','plugins/'.$proc)!==FALSE && class_exists($proc))
{
$procClass = new $proc($wf,$id);
$procClass->run();
$saveFlag = true;
}
}
// saves the workflow. Note that this will also triger a JMS message so if there are still things
// to do in the workflow, then it will be put back on the queue.
if ($saveFlag)
{
// echo htmlentities($wf->dumpXml()); exit();
$wf->saveToFedora();
} else if (count($wf->getReadyProcesses()) > 0) {
// If there is still more to do and we dont need to save the workflow datastream, then
// that means there is a process that does not have a corresponding plugin (perhaps it is handled
// by another client?), so put it back on the queue.
$messagesToSend[] = $msg->body;
}
}
}
} else {
echo '.';
}
}
// Messages to send are sent out after we're done
// so that we dont try and process messages we put back on the queue immediately.
foreach ($messagesToSend as $msg) {
$con->send($queue,$msg);
}
$dump=ob_get_contents();
ob_end_clean();
if (trim($dump) !== '') {
watchdog('workflow','<pre>'.$dump.'</pre>',array(),WATCHDOG_NOTICE);
}
}

83
workflow_client/plugins/create_jp2.inc

@ -1,83 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class create_jp2 extends Process {
protected function process($pid, $parameters) {
$required_params = array('dsid');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[] = $param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for create_jp2 process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for create_jp2 process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$ds = $dslist[$parameters['dsid']];
$file = '/tmp/'. $ds['label'];
$objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $parameters['dsid'], FALSE, NULL, $file);
$returnValue = TRUE;
$output=array();
$command='/usr/local/kakadu/kdu_compress -i "'. $file . '" -o "'. $file .'.jp2" -rate 0.5 Clayers=1 Clevels=7 "Cprecincts={256,256},{256,256},{256,256},{128,128},{128,128},{64,64},{64,64},{32,32},{16,16}" "Corder=RPCL" "ORGgen_plt=yes" "ORGtparts=R" "Cblk={32,32}" Cuse_sop=yes -num_threads 2';
exec($command, $output, $returnValue);
if (!file_exists($file .'.jp2')) {
$this->setMessage('command failed: '. htmlentities($command ."\n" . join("\n", $output) ."\n return value: $returnValue"));
@unlink($file);
return FALSE;
}
$returnValue = TRUE;
$output=array();
$command='/usr/local/kakadu/kdu_compress -i "'. $file . '" -o "'. $file .'_lossless.jp2" -rate -,0.5 Clayers=2 Creversible=yes Clevels=8 "Cprecincts={256,256},{256,256},{128,128}" Corder="RPCL" ORGgen_plt="yes" ORGtparts="R" Cblk="{32,32} -num_threads 2"';
exec($command, $output, $returnValue);
if (!file_exists($file .'_lossless.jp2')) {
$this->setMessage('command failed: '. htmlentities($command ."\n". join("\n", $output) ."\n return value: $returnValue"));
@unlink($file);
return FALSE;
}
if (file_exists($file.'.jp2') && file_exists($file.'_lossless.jp2')) {
if (isset($dslist['JP2'])) {
$item->purge_datastream('JP2');
}
if (isset($dslist['LOSSLESS_JP2'])) {
$item->purge_datastream('LOSSLESS_JP2');
}
$ret = $item->add_datastream_from_file($file .'.jp2', 'JP2' , $ds['label'] .'.jp2');
$ret = $ret && $item->add_datastream_from_file($file .'_lossless.jp2', 'LOSSLESS_JP2', $ds['label'] .'_lossless.jp2');
@unlink($file);
@unlink($file .'.jp2');
@unlink($file .'_lossless.jp2');
if (!$ret) {
$this->setMessage(t('Unable to add datastream "%dsid" to "%pid".', array('%dsid' => $dest_ds, '%pid' => $pid)));
return FALSE;
}
return TRUE;
}
}
}

66
workflow_client/plugins/exif.inc

@ -1,66 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class exif extends Process {
protected function process($pid, $parameters) {
$required_params = array('dsid');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[]=$param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for exif process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for exif process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$ds = $dslist[$parameters['dsid']];
$file = '/tmp/'. $ds['label'];
$dest_ds = isset($parameters['dest_ds']) ? $parameters['dest_ds'] : 'EXIF';
$objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $parameters['dsid'], FALSE, NULL, $file);
if (!file_exists($file)) {
$this->setMessage('couldnt get datastream '. $parameters['dsid'] .' as '. $file);
return FALSE;
}
$system = getenv('System');
$returnValue=TRUE;
$output=array();
$command = '/usr/local/exif/exiftool -X '. $file;
exec($command, $output, $returnValue);
if ($returnValue == '0') {
if (isset($dslist[$dest_ds])) {
$item->purge_datastream($dest_ds);
}
$ret = $item->add_datastream_from_string(join("\n",$output), $dest_ds, 'EXIF_Technical_Metadata.xml' , 'text/xml', 'X','Added by workflow process EXIF.');
@unlink($file);
@unlink($file . $file_suffix);
if (!$ret) {
$this->setMessage(t('Unable to add datastream "%dsid" to "%pid".', array('%dsid' => $dest_ds, '%pid' => $pid)));
return FALSE;
}
return TRUE;
}
}
}

69
workflow_client/plugins/image_resize.inc

@ -1,69 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class image_resize extends Process {
protected function process($pid, $parameters) {
$required_params = array('dsid', 'width', 'file_ext');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[]=$param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for image_resize process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for image_resize process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$ds = $dslist[$parameters['dsid']];
$file = '/tmp/'. $ds['label'];
$dest_ds = isset($parameters['dest_ds']) ? $parameters['dest_ds'] : 'TN';
$objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $parameters['dsid'], FALSE, NULL, $file);
$system = getenv('System');
$file_suffix = '_'. $dest_ds . '.'. $parameters['file_ext'];
$returnValue = TRUE;
$output = array();
$command = 'convert -resize '. $parameters['width'].(isset($parameters['height'])?'x'.$parameters['height']:'') .' -quality 85 '. $file . '[0] -strip '. $file . $file_suffix .' 2>&1 &';
exec($command, $output, $returnValue);
if (!file_exists($file . $file_suffix)) {
$this->setMessage('command failed: '. htmlentities($command ."\n". join("\n", $output) ."\n return value: $returnValue"));
@unlink($file);
return FALSE;
}
if ($returnValue == '0') {
if (isset($dslist[$dest_ds])) {
$item->purge_datastream($dest_ds);
}
$ret = $item->add_datastream_from_file($file . $file_suffix, $dest_ds, $ds['label'] . $file_suffix);
@unlink($file);
@unlink($file . $file_suffix);
if (!$ret) {
$this->setMessage(t('Unable to add datastream "%dsid" to "%pid".', array('%dsid' => $dest_ds, '%pid' => $pid)));
return FALSE;
}
return TRUE;
}
}
}

82
workflow_client/plugins/jhove.inc

@ -1,82 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class jhove extends Process {
protected function process($pid, $parameters) {
$required_params = array('dsid');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[]=$param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for image_resize process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for image_resize process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$ds = $dslist[$parameters['dsid']];
$file = '/tmp/'. $ds['label'];
$dest_ds = isset($parameters['dest_ds']) ? $parameters['dest_ds'] : 'JHOVE';
$objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $parameters['dsid'], FALSE, NULL, $file);
if (!file_exists($file)) {
$this->setMessage('couldnt get datastream '. $parameters['dsid'] .' as '. $file);
return FALSE;
}
$system = getenv('System');
$file_suffix = '.jhove.xml';
$returnValue=TRUE;
$output=array();
$command = '/usr/local/jhove/jhove -c /usr/local/jhove/conf/jhove.conf '. $file . ' -h xml -o '. $file . $file_suffix;
exec($command, $output, $returnValue);
if (!file_exists($file . $file_suffix)) {
$this->setMessage('command failed: '. htmlentities($command ."\n" . join("\n", $output) ."\n return value: $returnValue"));
@unlink($file);
return FALSE;
}
if ($returnValue == '0') {
if (isset($dslist[$dest_ds])) {
$item->purge_datastream($dest_ds);
}
$xmlDoc = new DOMDocument();
$xmlDoc->load($file . $file_suffix);
$xslDoc = new DOMDocument();
$xslDoc->load(drupal_get_path('module', 'islandora_workflow_client') .'/xsl/jhove-mix.xsl');
$proc = new XSLTProcessor();
$proc->importStylesheet($xslDoc);
file_put_contents('/tmp/mix.xml', $proc->transformToXML($xmlDoc));
$ret = $item->add_datastream_from_string($proc->transformToXML($xmlDoc), $dest_ds, $ds['label'] . $file_suffix, 'text/xml', 'X','Added by workflow process jhove.');
@unlink($file);
@unlink($file . $file_suffix);
if (!$ret) {
$this->setMessage(t('Unable to add datastream "%dsid" to "%pid".', array('%dsid' => $dest_ds, '%pid' => $pid)));
return FALSE;
}
return TRUE;
}
}
}

127
workflow_client/plugins/mods_extend.inc

@ -1,127 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class mods_extend extends Process {
static $MODS_NS = 'http://www.loc.gov/mods/v3';
protected function process($pid, $parameters) {
$required_params = array('dsid');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[]=$param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for mods_extend process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for mods_extend process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
if (!isset($dslist['RELS-EXT'])) {
$this->setMessage(t('Datastream "RELS-EXT" could not be found for mods_extend process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$modsDom = DOMDocument::loadXML($item->get_datastream_dissemination($parameters['dsid']));
$relsExtDom = DOMDocument::loadXML($item->get_datastream_dissemination('RELS-EXT'));
if ($modsDom === FALSE) {
$this->setMessage(t('Unable to load/interpret MODS Document from "%dsid" for mods_extend process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$modsRoot = $modsDom->getElementsByTagNameNS(mods_extend::$MODS_NS, 'mods');
if ($modsRoot->length > 0) {
$modsRoot=$modsRoot->item(0);
/* Remove any pre-existing relatedItems,
physicalDescriptions (mimetypes), or HDL Identifiers
*/
for ($i = $modsRoot->childNodes->length-1; $i >= 0; $i--) {
$node = $modsRoot->childNodes->item($i);
switch ($node->nodeName) {
case 'mods:relatedItem':
case 'mods:physicalDescription':
$modsRoot->removeChild($node);
break;
case 'mods:identifier':
if ($node->getAttribute('type') == 'hdl') {
$modsRoot->removeChild($node);
}
if ($node->getAttribute('type') == 'pid') {
$modsRoot->removeChild($node);
}
break;
}
}
$relationships = array('isMemberOfCollection','isMemberOf','isPartOf');
foreach ($relationships as $relationship)
{
$collections= $relsExtDom->getElementsByTagName($relationship);
for ($i=0; $i < $collections->length; $i++) {
$collection = $collections->item($i);
list(, $ident) = explode('/', $collection->getAttribute('rdf:resource'));
$collection = new fedora_item($ident);
$dc = new SimpleXMLElement($collection->get_datastream_dissemination('DC'), NULL, FALSE, 'http://purl.org/dc/elements/1.1/');
$relatedItem = $modsDom->createElement('mods:relatedItem');
$relatedItem->setAttribute('type', 'host');
$titleInfo = $modsDom->createElement('mods:titleInfo');
$title = $modsDom->createElement('mods:title', $dc->title);
$titleInfo->appendChild($title);
$relatedItem->appendChild($titleInfo);
$identifier = $modsDom->createElement('mods:identifier', $ident);
$identifier->setAttribute('type', 'pid');
$relatedItem->appendChild($identifier);
$ident = preg_replace('/^.*\:/', '10719/', $ident);
$identifier = $modsDom->createElement('mods:identifier', $ident);
$identifier->setAttribute('type', 'hdl');
$relatedItem->appendChild($identifier);
$modsRoot->appendChild($relatedItem);
}
}
$identifier = $modsDom->createElement('mods:identifier', $pid);
$identifier->setAttribute('type', 'pid');
$modsRoot->appendChild($identifier);
$ident= preg_replace('/^.*\:/', '10719/', $pid);
$identifier = $modsDom->createElement('mods:identifier', $ident);
$identifier->setAttribute('type', 'hdl');
$modsRoot->appendChild($identifier);
if (isset($dslist['OBJ']['MIMEType']) && trim($dslist['OBJ']['MIMEType']) != '') {
$physDesc =$modsDom->createElement('mods:physicalDescription');
$internetMediaType = $modsDom->createElement('mods:internetMediaType', htmlspecialchars(trim($dslist['OBJ']['MIMEType'])));
$physDesc->appendChild($internetMediaType);
$modsRoot->appendChild($physDesc);
}
// add in record information type?
$item->modify_datastream_by_value( $modsDom->saveXML(), 'MODS', "MODS Record", 'text/xml',false, 'Modified by workflow process mods_extend.');
RETURN TRUE;
}
else {
$this->setMessage(t('Could not find MODS root element in "%dsid" for mods_extend process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
}
}

125
workflow_client/plugins/solr_index.inc

@ -1,125 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class solr_index extends Process {
protected function process($pid, $parameters) {
$required_params = array('dsid');
$missing_params = array();
foreach ($required_params as $param)
if (!isset($parameters[$param]))
$missing_params[] = $param;
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for solr_index process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
if (!isset($parameters['xslt']) && !isset($parameters['xslt_file'])) {
$this->setMessage(t('Must include either "xslt_file" or "xslt" parameter to specify which template to apply on "%pid" for process solr_index.', array('%pid' => $pid)));
return FALSE;
}
if (module_load_include('php', 'islandora_solr_search', 'Solr/Service') === FAlSE) {
$this->setMessage(t('Unable to load Solr/Service from islandora_solr_search module on "%pid" for process solr_index.', array('%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ContentModel');
$xsltDom = NULL;
if (isset($parameters['xslt'])) {
list($template_pid, $template_dsid) = explode('/', $parameters['xslt']);
$template_item = new fedora_item($template_pid);
$dslist = $template_item->get_datastreams_list_as_array();
if (!isset($dslist[$template_dsid])) {
$this->setMessage(t('Datastream "%dsid" for template "%template" could not be found for xslt process on "%pid"', array('%template' => $parameters['xslt'], '%dsid' => $template_dsid, '%pid' => $pid)));
return FALSE;
}
$xsltDom = DOMDocument::loadXML($template_item->get_datastream_dissemination($template_dsid));
}
else {
$xsltDom = new DOMDocument();
$xsltDom->load(drupal_get_path('module', 'islandora_workflow_client') .'/xsl/'. trim($parameters['xslt_file']));
}
if ($xsdlDom === FALSE) {
$this->setMessage(t('Unable to load xslt.'));
return FALSE;
}
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for solr_index process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$dom = DOMDocument::loadXML($item->get_datastream_dissemination($parameters['dsid']));
if ($dom === FALSE) {
$this->setMessage(t('Unable to load/interpret DOM Document from "%dsid" for solr_index process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$proc = new XSLTProcessor();
$proc->importStylesheet($xsltDom);
$solrDom = $proc->transformToDOC($dom);
if ($solrDoc === FALSE) {
$this->setMessage(t('Document transform failed.'));
return FALSE;
}
$doc = $solrDom->getElementsByTagName('doc');
if ($doc->length > 0) {
$doc=$doc->item(0);
$workflow = Workflow::loadFromObject($pid);
$procs= $workflow->getProcesses();
foreach ($procs as $id => $proc) {
$field=$solrDom->createElement('field', $proc);
$field->setAttribute('name', 'workflow_process_t');
$doc->appendChild($field);
}
if (($cm = ContentModel::loadFromObject($pid)) !== FALSE) {
$field=$solrDom->createElement('field', $cm->pid);
$field->setAttribute('name', 'cmodel_t');
$doc->appendChild($field);
}
if (isset($dslist['DC']))
{
$dc = $item->get_datastream('DC');
$field=$solrDom->createElement('field',$dc->createDate);
$field->setAttribute('name','created_d');
$doc->appendChild($field);
}
}
$host = variable_get('islandora_solr_search_block_host', 'localhost');
$port = variable_get('islandora_solr_search_block_port', '8080');
$appName = variable_get('islandora_solr_search_block_app_name', 'solr');
$solr = new Apache_Solr_Service($host, $port, '/'. $appName .'/');
try {
if ($solr->ping()) {
$solr->add($solrDom->saveXML());
$solr->commit();
$solr->optimize();
return TRUE;
}
else {
$this->setMessage(t('Unable to connect to Solr at "%solr" for solr_index process on "%pid".', array('%pid' => $pid, '%solr' => $host .':'. $port . '/'. $appName .'/')));
return FALSE;
}
}
catch (Exception $e) {
$this->setMessage(t('Caught exception from Solr at %solr for solr_index process on "%pid": %msg', array('%pid' => $pid, '%solr' => $host .':'. $port .'/'. $appName .'/', '%msg' => $e->getMessage())));
return FALSE;
}
}
}

67
workflow_client/plugins/xslt.inc

@ -1,67 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'process');
class xslt extends Process {
protected function process($pid, $parameters) {
$required_params = array('dest_dsid', 'dsid');
$missing_params = array();
foreach ($required_params as $param) {
if (!isset($parameters[$param])) {
$missing_params[]=$param;
}
}
if (count($missing_params) > 0) {
$this->setMessage(t('Missing parameter(s) "%params" for xslt process on "%pid"', array('%params' => join(',', $missing_params), '%pid' => $pid)));
return FALSE;
}
if (!isset($parameters['xslt']) && !isset($parameters['xslt_file'])) {
$this->setMessage(t('Must include either "xslt_file" or "xslt" parameter to specify which template to apply on "%pid"', array('%pid' => $pid)));
return FALSE;
}
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$xsltDom = NULL;
if (isset($parameters['xslt'])) {
list($template_pid, $template_dsid) = explode('/', $parameters['xslt']);
$template_item = new fedora_item($template_pid);
$dslist = $template_item->get_datastreams_list_as_array();
if (!isset($dslist[$template_dsid])) {
$this->setMessage(t('Datastream "%dsid" for template "%template" could not be found for xslt process on "%pid"', array('%template' => $parameters['xslt'], '%dsid' => $template_dsid, '%pid' => $pid)));
return FALSE;
}
$xsltDom = DOMDocument::loadXML($template_item->get_datastream_dissemination($template_dsid));
}
else {
$xsltDom = new DOMDocument();
$xsltDom->load(drupal_get_path('module', 'islandora_workflow_client') .'/xsl/'. trim($parameters['xslt_file']));
}
$item = new fedora_item($pid);
$dslist = $item->get_datastreams_list_as_array();
if (!isset($dslist[$parameters['dsid']])) {
$this->setMessage(t('Datastream "%dsid" could not be found for xslt process on "%pid"', array('%dsid' => $parameters['dsid'], '%pid' => $pid)));
return FALSE;
}
$modsDom = DOMDocument::loadXML($item->get_datastream_dissemination($parameters['dsid']));
$proc = new XSLTProcessor();
$proc->importStylesheet($xsltDom);
$dc = $proc->transformToXML($modsDom);
if (isset($dslist[$parameters['dest_dsid']])) {
$item->modify_datastream_by_value( $dc, $parameters['dest_dsid'], isset($parameters['dest_label']) ? $parameters['dest_label'] : $dslist[$parameters['dest_dsid']]['label'], 'text/xml',false, 'Modified by workflow process xslt.');
}
else {
$item->add_datastream_from_string( $dc, $parameters['dest_dsid'], isset($parameters['dest_label']) ? $parameters['dest_label'] : NULL, 'text/xml', 'X','Added by workflow process xslt.');
}
}
}

31
workflow_client/process.inc

@ -1,31 +0,0 @@
<?php
// $Id$
module_load_include('inc', 'islandora_workflow_client', 'workflow');
abstract class Process {
private $workflow;
private $process;
private $message = NULL;
function __construct(&$wf, $processId) {
$this->workflow = &$wf;
$this->process=$wf->getProcess($processId);
}
public function run() {
$ret = $this->process($this->workflow->pid, $this->process['params']);
$state = ($ret === FALSE) ? 'error' : 'completed';
$this->workflow->recordAttempt($this->process['id'], $state, $this->message);
return $ret;
}
protected function setMessage($msg) {
$this->message = $msg;
}
abstract protected function process($pid, $parameters);
}

83
workflow_client/send.php

@ -1,83 +0,0 @@
<?php
/**
*
* Copyright (C) 2009 Progress Software, Inc. All rights reserved.
* http://fusesource.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
To successfully run this example, you must first start the broker with stomp+ssl enabled.
You can do that by executing:
$ ${ACTIVEMQ_HOME}/bin/activemq xbean:activemq-connectivity.xml
Then you can execute this example with:
$ php connectivity.php
*/
// include a library
// make a connection
try
{
$con = new Stomp("tcp://192.168.56.101:61613");
// connect
#// send a message to the queue
$msg = '<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fedora-types="http://www.fedora.info/definitions/1/0/types/">
<id>urn:uuid:19aab165-c920-40a1-a349-443f60f84567</id>
<updated>2010-08-08T15:57:08.659Z</updated>
<author>
<name>umroymr2</name>
<uri>http://192.168.56.101:8080/fedora</uri>
</author>
<title type="text">modifyDatastreamByValue</title>
<category term="uofm:highResImage" scheme="fedora-types:pid" label="xsd:string"></category>
<category term="ISLANDORACM" scheme="fedora-types:dsID" label="xsd:string"></category>
<category term="" scheme="fedora-types:altIDs" label="fedora-types:ArrayOfString"></category>
<category term="High Resolution Image" scheme="fedora-types:dsLabel" label="xsd:string"></category>
<category term="" scheme="fedora-types:formatURI" label="xsd:string"></category>
<category term="[OMITTED]" scheme="fedora-types:dsContent" label="xsd:base64Binary"></category>
<category term="DISABLED" scheme="fedora-types:checksumType" label="xsd:string"></category>
<category term="none" scheme="fedora-types:checksum" label="xsd:string"></category>
<category term="Modified by Islandora API." scheme="fedora-types:logMessage" label="xsd:string"></category>
<category term="false" scheme="fedora-types:force" label="xsd:boolean"></category>
<summary type="text">uofm:highResImage</summary>
<content type="text">2010-08-08T15:57:08.657Z</content>
<category term="3.3" scheme="info:fedora/fedora-system:def/view#version"></category>
<category term="info:fedora/fedora-system:ATOM-APIM-1.0" scheme="http://www.fedora.info/definitions/1/0/types/formatURI"></category>
</entry>';
$con->send("/queue/fedora.apim.update", $msg);
#echo "Sent message with body 'test'\n";
// subscribe to the queue
#$con->subscribe("/topic/fedora.apim.update");
// receive a message from the queue
#$msg = $con->readFrame();
// do what you want with the message
#if ( $msg != null) {
# echo "Received message with body '$msg->body'\n";
# // mark the message as received in the queue
# $con->ack($msg);
#} else {
# echo "Failed to receive a message\n";
#}
// disconnect
} catch (StompException $e)
{
echo "StompException!";
var_dump($e);
}
?>

61
workflow_client/test.php

@ -1,61 +0,0 @@
<?php
/**
*
* Copyright (C) 2009 Progress Software, Inc. All rights reserved.
* http://fusesource.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
To successfully run this example, you must first start the broker with stomp+ssl enabled.
You can do that by executing:
$ ${ACTIVEMQ_HOME}/bin/activemq xbean:activemq-connectivity.xml
Then you can execute this example with:
$ php connectivity.php
*/
// include a library
#require_once("Stomp.php");
// make a connection
try
{
$con = new Stomp("tcp://localhost:61613");
// connect
#$con->connect();
#// send a message to the queue
#$con->send("/topic/fedora.apim.update", "test");
#echo "Sent message with body 'test'\n";
// subscribe to the queue
$con->subscribe("/queue/fedora.apim.update");
// receive a message from the queue
while (true)
{
$msg = $con->readFrame();
// do what you want with the message
if ( $msg != null) {
$con->ack($msg);
echo "Received message with body '$msg->body'\n";
// mark the message as received in the queue
var_dump($msg->headers['pid']);
} else {
echo "Failed to receive a message\n";
}
}
// disconnect
#$con->disconnect();
} catch (StompException $e)
{
echo "StompException!";
var_dump($e);
}
?>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save