Merge commit WebGUI_7.6.9-beta into survey-rfe

* commit 'tags/WebGUI_7.6.9-beta': (31 commits)
  Release 7.6.9-beta
  preparing for 7.6.9 release
  fixed: Exporting to static files can leak large amounts of memory
  fixed: HTTP Proxy doesn't serve new content to visitors
  use to_json and from_json in more places instead of encode_json and decode_json
  Document the heretofore missing date template variable in
  Qualify a chained method call when getting Workflow instances.  If the
  Attempt to fix IE6 bug
  fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer
  Added a style for printing Alumni pages
  Emails sent about low stock should have status unread, not completed.
  Moved draggable.js to extras/yui-webgui/build/layout since it is now a wrapper around YUI dragdrob
  Attributions in the changelog for a patch provided to fix a bug.
  whups, left in console.logs
  Updated draggable.js to wrap the YUI
  fixed #4137: Calendar Search page has extra head tags in body
  Fix a typo typo in the Operation/Workflow POD.
  Forward port Shelf view fix.  Was not displaying child shelves, only self.
  Forward port the PayDriver bug fixes from 7.5 branch.  Labels are always
  fixed #9264: new slideShow.swf uploaded in extras/ukplayer (United Knowledge/Arjan Widlak)
  ...

Conflicts:
	lib/WebGUI/Asset/Wobject/Survey.pm
This commit is contained in:
Patrick Donelan 2009-01-22 04:39:43 +00:00
commit 1376c8ae92
60 changed files with 999 additions and 1199 deletions

View file

@ -378,10 +378,6 @@ ul.topTabs li {
margin:0px;
padding:0px;
list-style-type:none;
position:relative;zoom:1;
width:auto;
Xposition:relative;
}
ul.topTabs li {
display:block;

View file

@ -0,0 +1,3 @@
#ALUM_wrapper #topBar, #ALUM_wrapper #ALUM_doc, #ALUM_wrapper #sddm, #ALUM_wrapper #ALUM_footer {
display: none;
}

View file

@ -1,458 +0,0 @@
//Confugration
//sets the drag accruacy
//a value of 0 is most accurate. The number can be raised to improve performance.
var accuracy = 2;
//list of the content item names. Could be searched for, but hard coded for performance
var draggableObjectList=new Array();
var dragableList=new Array();
//Internal Config (Do not Edit)
//browser check
var dom=document.getElementById&&!document.all
var docElement = document.documentElement;
var pageURL = "";
var dragging=false;
var z,x,y
var accuracyCount =0;
var startTD = null;
var endTD = null;
var topelement=dom? "HTML" : "BODY"
var currentDiv = null;
var clipboard = null;
var contra = "";
var pageHeight=0;
var pageWidth=0;
var scrollJump=50;
var blankCount=1;
var draggableListOrigClassNames = []; // make sure that we're preserving the locked-asset class, if present
//checks the key Events for copy and paste operations
//ctrlC ctrlV shiftP shiftY
function dragable_checkKeyEvent(e) {
e=dom? e : event;
if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode==37 || e.keyCode==39 || e.keyCode == 66 || e.keyCode == 65){
contra+=e.keyCode;
if (contra.indexOf("38403840373937396665") != -1) {
alert("WebGUI was created by Plain Black Corporation");
contra="";
}
}else {
contra = "";
}
if (currentDiv == null) {
return;
}
if ((e.keyCode == 67 && e.ctrlKey) || (e.keyCode==89 && e.shiftKey)) {
clipboard=currentDiv;
return;
}else if ((e.keyCode == 86 && e.ctrlKey) || (e.keyCode==80 && e.shiftKey)) {
if (clipboard != currentDiv && !dragable_isBlank(clipboard)) {
dragable_moveContent(clipboard,currentDiv);
}
}
}
//goes up the parent tree until class is found. If not found, returns null
function dragable_getObjectByClass(target,clazz) {
var classMatch = new RegExp("\\b" + clazz + "\\b");
while (target.tagName!=topelement && target.className.search(classMatch) == -1){
target=dom? target.parentNode : target.parentElement
}
if (target.className.search(classMatch) != -1){
return target;
}else {
return null;
}
}
//checks to see if the scroll bars need to be adjusted
function dragable_adjustScrollBars(e) {
scrY=0;
scrX=0;
if (e.clientY > docElement.clientHeight-scrollJump) {
if (e.clientY + docElement.scrollTop < pageHeight - (scrollJump + 60)) {
scrY=scrollJump;
window.scroll(docElement.scrollLeft,docElement.scrollTop + scrY);
y-=scrY;
}
}else if (e.clientY < scrollJump) {
if (docElement.scrollTop < scrollJump) {
scrY = docElement.scrollTop;
}else {
scrY=scrollJump;
}
window.scroll(docElement.scrollLeft,docElement.scrollTop - scrY);
y+=scrY;
}
if (e.clientX > docElement.clientWidth-scrollJump) {
if (e.clientX + docElement.scrollLeft < pageWidth - (scrollJump + 60)) {
scrX=scrollJump;
window.scroll(docElement.scrollLeft + scrX,docElement.scrollTop);
x-=scrX;
}
}else if (e.clientX < scrollJump) {
if (docElement.scrollLeft < scrollJump) {
scrX = docElement.scrollLeft;
}else {
scrX=scrollJump;
}
window.scroll(docElement.scrollLeft - scrX,docElement.scrollTop);
x+=scrX;
}
}
//initialization routine, must be called on load. Sets up event handlers
function dragable_init(url) {
docElement = document.documentElement;
if (document.compatMode == "BackCompat") {
docElement = document.body;
}
pageURL = url;
//window.scroll(10,500);
//set up event handlers
document.onmouseup=dragable_dragStop;
document.onkeydown=dragable_checkKeyEvent;
document.onmousemove=dragable_move;
//fill the draggableObject list
obj = document.getElementById("position1");
contentCount=2;
while (obj != null) {
tbody = dragable_getElementChildren(obj);
children = dragable_getElementChildren(tbody[0]);
if (children.length == 0) {
//stick in a blank
dragable_appendBlankRow(tbody[0]);
}else {
for (i = 0; i< children.length;i++) {
draggableObjectList[draggableObjectList.length] = children[i];
dragableList[dragableList.length]=document.getElementById(children[i].id + "_div");
draggableListOrigClassNames[draggableListOrigClassNames.length] = dragableList[dragableList.length - 1].className;
}
}
obj = document.getElementById("position" + contentCount);
contentCount++;
}
for (i=0;i<draggableObjectList.length;i++) {
eval("document.getElementById('" + draggableObjectList[i].id + "').onmousedown=dragable_dragStart");
}
}
//called on mouse move.
function dragable_move(e){
e=dom? e : event;
if (dragging){
if (accuracyCount==accuracy) {
tmp = dragable_spy(dom? e.pageX: (e.clientX + docElement.scrollLeft),dom? e.pageY: (e.clientY + docElement.scrollTop));
if (tmp.length != 0) {
dragable_dragOver(tmp[0],tmp[1]);
}else {
//only occurs if not found
if (endTD != null) {
if (!dragable_isBlank(endTD)) {
document.getElementById(endTD.id + "_div").className="dragable";
}else {
endTD.className="blank";
}
endTDPos=null;
endTD=null;
}
}
accuracyCount=0;
}else {
accuracyCount++;
}
dragable_adjustScrollBars(e);
// alert('x is: '+ (temp1+e.clientX-x));
z.style.left=(temp1+e.clientX-x)+"px";
z.style.top=(temp2+e.clientY-y)+"px";
return false
}else {
tmp = dragable_spy(dom? e.pageX: (e.clientX + docElement.scrollLeft),dom? e.pageY: (e.clientY + docElement.scrollTop));
if (tmp.length == 0) {
currentDiv = null;
}else {
currentDiv = tmp[0];
}
}
}
function dragable_dragStart(e){
e=dom? e : event;
var fObj=dom? e.target : e.srcElement
if (fObj.className.search(/\bdragTrigger\b/) == -1) {
return;
}
fObj = dragable_getObjectByClass(fObj,"dragable");
if (fObj == null) return;
//set the start td
startTD=document.getElementById(fObj.id.substr(0,fObj.id.indexOf("_div")));
fObj.className="dragging";
//set the page height and width in a var since IE changes them when scrolling
pageHeight = docElement.scrollHeight;
pageWidth = docElement.scrollWidth;
dragging=true
z=fObj;
temp1=z.style.left;
temp1=temp1.replace(/px/g,'')+0;
temp1=parseInt(temp1);
temp2=z.style.top;
temp2=temp2.replace(/px/g,'')+0;
temp2=parseInt(temp2);
// alert(temp1,temp2);
x=e.clientX;
y=e.clientY;
return false
}
function dragable_isBlank(td) {
if (td.id.indexOf("blank") != -1) {
return true;
}
return false;
}
//returns an array. array[0] holds the tr object, and array[1] holds the position (top or bottom)
function dragable_spy(x, y) {
var returnArray = new Array();
for (i=0;i<draggableObjectList.length;i++) {
td = draggableObjectList[i];
//this is a hack
if (td == null || td == startTD) continue;
var fObj=td;
y1=0;
x1=0
while (fObj!=null && fObj.tagName!=topelement){
y1+=fObj.offsetTop;
x1+=fObj.offsetLeft;
fObj=fObj.offsetParent;
}
if (x >x1 && x < (x1 + td.offsetWidth)) {
if (y> y1 && y< (y1 + (td.offsetHeight/2))) {
returnArray[0] = td;
returnArray[1] = "top";
return returnArray;
}else if (y> y1 && y< (y1 + td.offsetHeight)) {
returnArray[0] = td;
returnArray[1] = "bottom";
return returnArray;
}
}
}
return returnArray;
}
//Called when a content item is dragged over
function dragable_dragOver(obj,position) {
if (endTD == obj && endTDPos == position ) {
return;
}
if(endTD != null && endTD != obj) {
if (dragable_isBlank(endTD)) {
document.getElementById(endTD.id).className="blank";
}else {
document.getElementById(endTD.id + "_div").className="dragable";
}
}
if (dragable_isBlank(obj)) {
divName = td.id;
}else {
divName = td.id + "_div";
}
if (dragable_isBlank(obj)) {
document.getElementById(divName).className="blankOver";
endTDPos=null;
}else if (position == "top") {
endTDPos=position;
document.getElementById(divName).className="draggedOverTop";
}else {
endTDPos=position;
document.getElementById(divName).className="draggedOverBottom";
}
endTD=obj;
}
//called on mouse up, If an element is being dragged, this method does the right thing.
function dragable_dragStop(e) {
dragging=false;
if (z) {
if (endTD !=null && startTD!=null) {
dragable_moveContent(startTD,endTD,endTDPos);
startTD=null;
if (dragable_isBlank(endTD)) {
divName = endTD.id;
}else {
divName=endTD.id + "_div";
document.getElementById(divName).className="dragable";
}
var url = pageURL + dragable_getContentMap();
//window.alert(url);
document.getElementById("dragSubmitter").src = url;
}
for(i=0;i<dragableList.length;i++) {
dragableList[i].style.top=0+"px";
dragableList[i].style.left=0+"px";
dragableList[i].className = draggableListOrigClassNames[i];
// dragableList[i].className="dragable";
}
//this is a ie hack for a render bug
for(i=0;i<draggableObjectList.length;i++) {
if (draggableObjectList[i]) {
draggableObjectList[i].style.top=1+"px";
draggableObjectList[i].style.left=1+"px";
draggableObjectList[i].style.top=0+"px";
draggableObjectList[i].style.left=0+"px";
}
}
}
startTD=null;
if (endTD != null) {
endTD.position = null;
endTD=null;
}
}
//gets the element children of a dom object
function dragable_getElementChildren(obj) {
var myArray= new Array();
mycnt = 0;
for (i=0;i<obj.childNodes.length;i++) {
if (obj.childNodes[i].nodeType==1) {
myArray[mycnt] = obj.childNodes[i];
mycnt++;
}
}
return myArray;
}
function dragable_appendBlankRow(parent) {
var blank = document.getElementById("blank");
blank.className="blank";
blankClone = blank.cloneNode(true);
blankClone.id = "blank" + new Date().getTime() + blankCount++;
draggableObjectList[draggableObjectList.length] = blankClone;
parent.appendChild(blankClone);
blankClone.style.top=0+"px";
blankClone.style.left=0+"px";
blank.className="hidden";
}
//moves a table row from one table to another. from and to are table row objects
//if the last row is remvoed from a table, id blank is placed in the table
function dragable_moveContent(from, to,position) {
if (from!=to && from && to) {
var fromParent = from.parentNode;
fromParent.removeChild(from);
if (dragable_getElementChildren(fromParent).length == 0) {
dragable_appendBlankRow(fromParent);
}
var toParent = to.parentNode;
var toChildren = dragable_getElementChildren(toParent);
if (toChildren[0].id.indexOf("blank") != -1) {
toParent.removeChild(document.getElementById(toChildren[0].id));
toParent.appendChild(from);
}else if (position == "top"){
toParent.insertBefore( from, to );
}else {
children = dragable_getElementChildren(toParent);
i=0;
while(children[i] != to && i < children.length) {
i++;
}
if (i == children.length - 1) {
toParent.appendChild(from);
}else {
toParent.insertBefore(from,children[i+1]);
}
}
}
}
function dragable_getContentMap() {
//ex 1001,2004;896,494,10010
contentMap = "";
contentCount=1;
var contentArea = document.getElementById("position1");
while (contentArea) {
if ((contentMap != "") || (contentArea.id == 'position2')) {
contentMap+=".";
}
//get down to the tr area
children = dragable_getElementChildren(contentArea);
children=dragable_getElementChildren(children[0]);
for (i=0;i<children.length;i++) {
if (contentMap != "" && (contentMap.lastIndexOf(".") != contentMap.length-1)) {
contentMap+=",";
}
if (children[i].id.indexOf("blank") == -1) {
contentMap+=children[i].id.replace(/^td/,"");
}
}
contentCount++;
contentArea = document.getElementById("position" + contentCount);
}
return contentMap;
}

View file

@ -1,292 +0,0 @@
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version;
var axo;
var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
}
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '<object ';
for (var i in objAttrs)
{
str += i + '="' + objAttrs[i] + '" ';
}
str += '>';
for (var i in params)
{
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
}
str += '</object>';
}
else
{
str += '<embed ';
for (var i in embedAttrs)
{
str += i + '="' + embedAttrs[i] + '" ';
}
str += '> </embed>';
}
document.write(str);
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret =
AC_GetArgs
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblclick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}

View file

@ -9,7 +9,7 @@
<image_source>/extras/ukplayer/dummycontent/explain.jpg</image_source>
<duration>5</duration>
<thumb_source>/extras/ukplayer/dummycontent/explain.jpg</thumb_source>
<sound_source>dummycontent/transporter.mp3</sound_source>
<sound_source>/extras/ukplayer/dummycontent/transporter.mp3</sound_source>
</slide>
<slide>
<width>400</width>
@ -19,7 +19,7 @@
<image_source>/extras/ukplayer/dummycontent/united-knowledge-logo.jpg</image_source>
<duration>5</duration>
<thumb_source>/extras/ukplayer/dummycontent/united-knowledge-logo.jpg</thumb_source>
<sound_source>dummycontent/transporter.mp3</sound_source>
<sound_source>/extras/ukplayer/dummycontent/transporter.mp3</sound_source>
</slide>
</slides>
</content>

Binary file not shown.

View file

@ -1,245 +1,250 @@
United Knowledge Slideshow Player - readme.txt
Copyright: United Knowledge, 2008
Under the terms of the GNU General Public License, version 2
**********************************************************************************************
* *
* The configuration XML *
* *
**********************************************************************************************
With the configuration .xml file you can customize the look and the behaviour of the
slideshow. It contains the following properties (the values are example values; there are
default values for most, but we recommend setting ALL properties yourself).
**********************************************************************************************
* Structure of the xml *
**********************************************************************************************
<config>
[properties go here]
</config>
**********************************************************************************************
* General properties *
**********************************************************************************************
<content_url>/someUrl/someXmlFile.xml</content_url>
The url to the .xml file that contains the content.
Value: an absolute or relative url to an xml file
<width>400</width>
<height>300</height>
The width and height of the player itself (this value is overwritten by the flashVars
but the tags need to be here).
Value: number in px
<default_duration>8</default_duration>
The duration of each slide. This can be overwritten by setting the duration per slide
in the content .xml file.
Value: number in seconds
<default_slidewidth>400</default_slidewidth>
<default_slideheight>300</default_slideheight>
If the width or height of a slide is larger than the values specified here, the slide
will be resized proportionally. Slides that are smaller than the slidshow will not be
resized.
Value: number in px
<background_color>0xeeeeee</background_color>
The background color for the slideshow. This will be visible during the transitions
and when a slide is smaller than the slideshow.
Value: 0x followed by hexadecimal color
**********************************************************************************************
* Text properties *
**********************************************************************************************
<font>Verdana</font>
The font of the text in the slideshow.
Value: Verdana, Arial or TimesNewRoman
<font_size>12</font_size>
The font size of the text in the slideshow.
Value: number in px
<font_color>0xffffff</font_color>
The color of the text in the slideshow.
Value: 0x followed by hexadecimal color
<text_border_color>0xffffff</text_border_color>
The color of the border of the textarea.
Value: 0x followed by hexadecimal color
<text_bg_color>0x000000</text_bg_color>
The background color of the textarea.
Value: 0x followed by hexadecimal color
<text_autohide>false</text_autohide>
When set to true the textarea will hide after a few seconds.
Value: true or false
**********************************************************************************************
* Controls properties *
**********************************************************************************************
<controls_color>0xffffff</controls_color>
The color of the buttons.
Value: 0x followed by hexadecimal color
<controls_border_color>0xffffff</controls_border_color>
The color of the border of the area with the buttons.
Value: 0x followed by hexadecimal color
<controls_bg_color>0x000000</controls_bg_color>
The background color of the area with the buttons.
Value: 0x followed by hexadecimal color
<controls_autohide>true</controls_autohide>
When set to true the controls will hide after a few seconds.
Value: true or false
**********************************************************************************************
* Thumbnail properties *
**********************************************************************************************
<thumbnail_width>40</thumbnail_width>
<thumbnail_height>30</thumbnail_height>
The height and width of each thumbnail image in the bar at the bottom of the
slideshow.
Value: number in px
<thumbnail_border_color>0x888888</thumbnail_border_color>
The color of the border of each thumbnail image.
Value: 0x followed by hexadecimal color
<menu_autohide>true</menu_autohide>
When set to true the thumbnail bar will hide after a few seconds.
Value: true or false
<menu_dead_zone_width>160</menu_dead_zone_width>
The width of the area in the center of the thumbnail bar in which the user can hover
the mouse, without the thumbnail bar moving to the left or to the right.
Value: number in px
<menu_gaps>6</menu_gaps>
The width of the gap between two thumbnail images.
Value: number in px
**********************************************************************************************
* Behaviour properties *
**********************************************************************************************
<mute_at_start>true</mute_at_start>
If true the slideshow will start with the sound muted.
Value: true or false
<autostart>false</autostart>
If true the slideshow will start upon loading. If false a play button will be
displayed.
Value: true or false
<autopause>true</autopause>
If true the slideshow will pause when clicking on a thumbnail or clicking the
previous or next buttons.
Value: true or false
<loop>false</loop>
If true the slideshow will loop. If false, when the last slide has been displayed,
the slideshow will move back to the first slide and show a play button.
Value: true or false
**********************************************************************************************
* Error messages *
**********************************************************************************************
<error_message_content><![CDATA[Content Xml not found]]></error_message_content>
<error_message_image><![CDATA[Image not found]]></error_message_image>
Value: any text in CDATA tags: <![CDATA[ ... ]]>
**********************************************************************************************
* *
* The content XML *
* *
**********************************************************************************************
The content .xml file contains the properties for each slide.
**********************************************************************************************
* Structure of the xml *
**********************************************************************************************
<content>
<slides>
<slide>[properties go here]</slide>
<slide>[properties go here]</slide>
...
</slides>
</content>
**********************************************************************************************
* Properties in the slide tag *
**********************************************************************************************
<title><![CDATA[My first slide]]></title>
The title of the slide.
Value: any text in CDATA tags: <![CDATA[ ... ]]>
<description><![CDATA[This is my first slide!]]></description>
The description of the slide.
Value: any text in CDATA tags: <![CDATA[ ... ]]>
<image_source>/someUrl/someImg.jpg</image_source>
The url to the slide image.
Value: an absolute or relative url to a .jpg, .gif or .png file
<thumb_source>/someUrl/someImg_thumb.jpg</thumb_source>
The url to the thumbnail of the slide image.
Value: an absolute or relative url to a .jpg, .gif or .png file
<sound_source>/someUrl/someImg_thumb.jpg</sound_source>
The url to the sound file that will be played when the slide is displayed. It will be
played once for the duration of the slide (if the duration of the sound file is longer
than the set duration of the slide it will be cut off). This property is optional.
Value: an absolute or relative url to a .mp3 file
<duration>8</duration>
The duration for this specific slide. This value will overwrite the duration value set
in the configuration xml. This property is optional.
Value: number in seconds
<width>400</width>
<height>300</height>
The width and height of the slide. This will overwrite the default_slidewidth and
default_slideheight set in the configuration xml. The width and height properties are
optional.
Value: number in px
**********************************************************************************************
* eof *
United Knowledge Slideshow Player - readme.txt
Copyright: United Knowledge, 2008
The Slideshow PLayer is licensed under the terms of the GNU General Public License, version 2
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
SWFObject 2, the code used to display the Slideshow, is licensed under the MIT License
http://www.opensource.org/licenses/mit-license.php
**********************************************************************************************
* *
* The configuration XML *
* *
**********************************************************************************************
With the configuration .xml file you can customize the look and the behaviour of the
slideshow. It contains the following properties (the values are example values; there are
default values for most, but we recommend setting ALL properties yourself).
**********************************************************************************************
* Structure of the xml *
**********************************************************************************************
<config>
[properties go here]
</config>
**********************************************************************************************
* General properties *
**********************************************************************************************
<content_url>/someUrl/someXmlFile.xml</content_url>
The url to the .xml file that contains the content.
Value: an absolute or relative url to an xml file
<width>400</width>
<height>300</height>
The width and height of the player itself (this value is overwritten by the flashVars
but the tags need to be here).
Value: number in px
<default_duration>8</default_duration>
The duration of each slide. This can be overwritten by setting the duration per slide
in the content .xml file.
Value: number in seconds
<default_slidewidth>400</default_slidewidth>
<default_slideheight>300</default_slideheight>
If the width or height of a slide is larger than the values specified here, the slide
will be resized proportionally. Slides that are smaller than the slidshow will not be
resized.
Value: number in px
<background_color>0xeeeeee</background_color>
The background color for the slideshow. This will be visible during the transitions
and when a slide is smaller than the slideshow.
Value: 0x followed by hexadecimal color
**********************************************************************************************
* Text properties *
**********************************************************************************************
<font>Verdana</font>
The font of the text in the slideshow.
Value: Verdana, Arial or TimesNewRoman
<font_size>12</font_size>
The font size of the text in the slideshow.
Value: number in px
<font_color>0xffffff</font_color>
The color of the text in the slideshow.
Value: 0x followed by hexadecimal color
<text_border_color>0xffffff</text_border_color>
The color of the border of the textarea.
Value: 0x followed by hexadecimal color
<text_bg_color>0x000000</text_bg_color>
The background color of the textarea.
Value: 0x followed by hexadecimal color
<text_autohide>false</text_autohide>
When set to true the textarea will hide after a few seconds.
Value: true or false
**********************************************************************************************
* Controls properties *
**********************************************************************************************
<controls_color>0xffffff</controls_color>
The color of the buttons.
Value: 0x followed by hexadecimal color
<controls_border_color>0xffffff</controls_border_color>
The color of the border of the area with the buttons.
Value: 0x followed by hexadecimal color
<controls_bg_color>0x000000</controls_bg_color>
The background color of the area with the buttons.
Value: 0x followed by hexadecimal color
<controls_autohide>true</controls_autohide>
When set to true the controls will hide after a few seconds.
Value: true or false
**********************************************************************************************
* Thumbnail properties *
**********************************************************************************************
<thumbnail_width>40</thumbnail_width>
<thumbnail_height>30</thumbnail_height>
The height and width of each thumbnail image in the bar at the bottom of the
slideshow.
Value: number in px
<thumbnail_border_color>0x888888</thumbnail_border_color>
The color of the border of each thumbnail image.
Value: 0x followed by hexadecimal color
<menu_autohide>true</menu_autohide>
When set to true the thumbnail bar will hide after a few seconds.
Value: true or false
<menu_dead_zone_width>160</menu_dead_zone_width>
The width of the area in the center of the thumbnail bar in which the user can hover
the mouse, without the thumbnail bar moving to the left or to the right.
Value: number in px
<menu_gaps>6</menu_gaps>
The width of the gap between two thumbnail images.
Value: number in px
**********************************************************************************************
* Behaviour properties *
**********************************************************************************************
<mute_at_start>true</mute_at_start>
If true the slideshow will start with the sound muted.
Value: true or false
<autostart>false</autostart>
If true the slideshow will start upon loading. If false a play button will be
displayed.
Value: true or false
<autopause>true</autopause>
If true the slideshow will pause when clicking on a thumbnail or clicking the
previous or next buttons.
Value: true or false
<loop>false</loop>
If true the slideshow will loop. If false, when the last slide has been displayed,
the slideshow will move back to the first slide and show a play button.
Value: true or false
**********************************************************************************************
* Error messages *
**********************************************************************************************
<error_message_content><![CDATA[Content Xml not found]]></error_message_content>
<error_message_image><![CDATA[Image not found]]></error_message_image>
Value: any text in CDATA tags: <![CDATA[ ... ]]>
**********************************************************************************************
* *
* The content XML *
* *
**********************************************************************************************
The content .xml file contains the properties for each slide.
**********************************************************************************************
* Structure of the xml *
**********************************************************************************************
<content>
<slides>
<slide>[properties go here]</slide>
<slide>[properties go here]</slide>
...
</slides>
</content>
**********************************************************************************************
* Properties in the slide tag *
**********************************************************************************************
<title><![CDATA[My first slide]]></title>
The title of the slide.
Value: any text in CDATA tags: <![CDATA[ ... ]]>
<description><![CDATA[This is my first slide!]]></description>
The description of the slide.
Value: any text in CDATA tags: <![CDATA[ ... ]]>
<image_source>/someUrl/someImg.jpg</image_source>
The url to the slide image.
Value: an absolute or relative url to a .jpg, .gif or .png file
<thumb_source>/someUrl/someImg_thumb.jpg</thumb_source>
The url to the thumbnail of the slide image.
Value: an absolute or relative url to a .jpg, .gif or .png file
<sound_source>/someUrl/someImg_thumb.jpg</sound_source>
The url to the sound file that will be played when the slide is displayed. It will be
played once for the duration of the slide (if the duration of the sound file is longer
than the set duration of the slide it will be cut off). This property is optional.
Value: an absolute or relative url to a .mp3 file
<duration>8</duration>
The duration for this specific slide. This value will overwrite the duration value set
in the configuration xml. This property is optional.
Value: number in seconds
<width>400</width>
<height>300</height>
The width and height of the slide. This will overwrite the default_slidewidth and
default_slideheight set in the configuration xml. The width and height properties are
optional.
Value: number in px
**********************************************************************************************
* eof *
**********************************************************************************************

Binary file not shown.

View file

@ -1,70 +1,54 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>slideshow</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="/extras/ukplayer/AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
This is the United Knowledge Player for WebGUI.
It enables you to display foto's as a movie. The
configuration options can be found in the readme
file here:
/extras/ukplayer/readme.txt
There are three example files to show you how to
use this player:
/extras/ukplayer/slideshow.html
/extras/ukplayer/config.xml
/extras/ukplayer/content.xml
This player is Free Software under the GPL v2
Check out the latest source on:
http://195.64.86.55/ukslideshow/trunk .
copyright 2008 United Knowledge http://www.unitedknowledge.nl/
-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '400',
'height', '300',
'src', 'swc/assets',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'slideShow',
'bgcolor', '#ffffff',
'name', 'coverflow',
'menu', 'true',
// note: the width & height in the flashVars below MUST match the width & height set above
'flashVars', 'config=/extras/ukplayer/config.xml&width=400&height=300&backgroundColor=0xCCCCCC&fontColor=&textBorderColor=&textBackgroundColor=&controlsColor=&controlsBorderColor=&controlsBackgroundColor=',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', '/extras/ukplayer/slideShow',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400" height="300" id="swc/assets" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="flashVars" value="config=/extras/ukplayer/config.xml" />
<param name="movie" value="/extras/ukplayer/slideShow.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="/extras/ukplayer/slideShow.swf" quality="high" bgcolor="#ffffff" width="400" height="300" name="swc/assets" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" flashvars="config=/extras/ukplayer/config.xml" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
<!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Strict/EN" "http:/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http:/www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>UKplayer Slideshow Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/extras/ukplayer/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myFlashContent","9.0.0","/extras/ukplayer/expressInstall.swf");
</script>
</head>
<body>
<!--
This is the United Knowledge Player for WebGUI.
It enables you to display foto's as a movie. The
configuration options can be found in the readme
file here:
/extras/ukplayer/readme.txt
There are three example files to show you how to
use this player:
/extras/ukplayer/slideshow.html
/extras/ukplayer/config.xml
/extras/ukplayer/content.xml
This player is Free Software under the GPL v2
Check out the latest source on:
http:/195.64.86.55/ukslideshow/trunk .
Copyright 2008 United Knowledge http:/www.unitedknowledge.nl/
-->
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300" id="myFlashContent">
<param name="movie" value="/extras/ukplayer/slideShow.swf" />
<param name="flashvars" value="config=/extras/ukplayer/config.xml" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="/extras/ukplayer/slideShow.swf" width="400" height="300">
<param name="flashvars" value="config=/extras/ukplayer/config.xml" />
<!--<![endif]-->
<a href="http:/www.adobe.com/go/getflashplayer">
<img src="http:/www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<p>Code generated with the <a href="http:/www.bobbyvandersluis.com/swfobject/generator/index.html">SWFObject 2 HTML and JavaScript generator</a>.</p>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,373 @@
//Confugration
//sets the drag accruacy
//a value of 0 is most accurate. The number can be raised to improve performance.
var accuracy = 2;
//list of the content item names. Could be searched for, but hard coded for performance
var draggableObjectList=new Array();
//Internal Config (Do not Edit)
//browser check
var dom=document.getElementById&&!document.all
var docElement = document.documentElement;
var pageURL = "";
var topelement=dom? "HTML" : "BODY"
var pageHeight=0;
var pageWidth=0;
var scrollJump=50;
var blankCount=1;
var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var DDM = YAHOO.util.DragDropMgr;
//goes up the parent tree until class is found. If not found, returns null
function dragable_getObjectByClass(target,clazz) {
var classMatch = new RegExp("\\b" + clazz + "\\b");
while (target.tagName!=topelement && target.className.search(classMatch) == -1){
target=dom? target.parentNode : target.parentElement
}
if (target.className.search(classMatch) != -1){
return target;
}else {
return null;
}
}
YAHOO.webgui = {};
YAHOO.webgui.DDList = function(id, sGroup, config) {
YAHOO.webgui.DDList.superclass.constructor.call(this, id, sGroup, config);
this.logger = this.logger || YAHOO;
var el = this.getDragEl();
Dom.setStyle(el, "opacity", 0.67); // The proxy is slightly transparent
this.goingUp = false;
this.lastY = 0;
};
YAHOO.extend(YAHOO.webgui.DDList, YAHOO.util.DDProxy, {
startDrag: function(x, y) {
this.logger.log(this.id + " startDrag");
// make the proxy look like the source element
var dragEl = this.getDragEl();
var clickEl = this.getEl();
Dom.setStyle(clickEl, "visibility", "hidden");
dragEl.innerHTML = clickEl.innerHTML;
Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color"));
Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor"));
Dom.setStyle(dragEl, "border", "2px solid gray");
},
//Put things back like they were
onDragOut: function(e,id){
var obj = Dom.get(id);
if (dragable_isBlank(obj)) {
document.getElementById(id).className="blank";
}else if (obj.className == 'draggedOverTop' || obj.className == 'draggedOverBottom') {
document.getElementById(id).className="dragable";
}
},
endDrag: function(e) {
var srcEl = this.getEl();
var proxy = this.getDragEl();
// Show the proxy element and animate it to the src element's location
Dom.setStyle(proxy, "visibility", "");
var a = new YAHOO.util.Motion(
proxy, {
points: {
to: Dom.getXY(srcEl)
}
},
0.2,
YAHOO.util.Easing.easeOut
)
var proxyid = proxy.id;
var thisid = this.id;
// Hide the proxy and show the source element when finished with the animation
a.onComplete.subscribe(function() {
Dom.setStyle(proxyid, "visibility", "hidden");
Dom.setStyle(thisid, "visibility", "");
});
a.animate();
},
onDragDrop: function(e, id) {
var position;
if(this.goingUp){
position = "top";
}else{
position = "bottom";
}
var target = this.getEl().parentNode.parentNode;
var destination = Dom.get(id);
if(!dragable_isBlank(destination)){
destination.className = "dragable";
destination = Dom.get(id).parentNode.parentNode;
}
dragable_moveContent(target, destination ,position);
var url = pageURL + dragable_getContentMap();
document.getElementById("dragSubmitter").src = url;
return;
// If there is one drop interaction, the li was dropped either on the list,
// or it was dropped on the current location of the source element.
if (DDM.interactionInfo.drop.length === 1) {
// The position of the cursor at the time of the drop (YAHOO.util.Point)
var pt = DDM.interactionInfo.point;
// The region occupied by the source element at the time of the drop
var region = DDM.interactionInfo.sourceRegion;
// Check to see if we are over the source element's location. We will
// append to the bottom of the list once we are sure it was a drop in
// the negative space (the area of the list without any list items)
if (!region.intersect(pt)) {
var destEl = Dom.get(id);
var destDD = DDM.getDDById(id);
destEl.appendChild(this.getEl());
destDD.isEmpty = false;
DDM.refreshCache();
}
}
},
onDrag: function(e) {
// Keep track of the direction of the drag for use during onDragOver
var y = Event.getPageY(e);
if (y < this.lastY) {
this.goingUp = true;
} else if (y > this.lastY) {
this.goingUp = false;
}
this.lastY = y;
dragable_adjustScrollBars(e);
},
onDragOver: function(e, id) {
var srcEl = this.getEl();
if(srcEl.id == id){return;}
var obj = Dom.get(id);
// We are only concerned with list items, we ignore the dragover
// notifications for the list.
if (dragable_isBlank(obj)) {
document.getElementById(id).className="blankOver";
}else if (this.goingUp) {
document.getElementById(id).className="draggedOverTop";
}else {
document.getElementById(id).className="draggedOverBottom";
}
/* if (destEl.nodeName.toLowerCase() == "li") {
var orig_p = srcEl.parentNode;
var p = destEl.parentNode;
if (this.goingUp) {
p.insertBefore(srcEl, destEl); // insert above
} else {
p.insertBefore(srcEl, destEl.nextSibling); // insert below
}
DDM.refreshCache();
}
*/
}
});
//initialization routine, must be called on load. Sets up event handlers
function dragable_init(url) {
docElement = document.documentElement;
if (document.compatMode == "BackCompat") {
docElement = document.body;
}
pageURL = url;
//window.scroll(10,500);
//set up event handlers
// document.onmouseup=dragable_dragStop;
// document.onkeydown=dragable_checkKeyEvent;
//fill the draggableObject list
obj = document.getElementById("position1");
contentCount=2;
while (obj != null) {
tbody = dragable_getElementChildren(obj);
children = dragable_getElementChildren(tbody[0]);
if (children.length == 0) {
//stick in a blank
var blank_id =dragable_appendBlankRow(tbody[0]);
new YAHOO.util.DDTarget(blank_id);
}else {
for (i = 0; i< children.length;i++) {
draggableObjectList[draggableObjectList.length] = children[i];
new YAHOO.webgui.DDList(document.getElementById(children[i].id + "_div"));
new YAHOO.util.DDTarget(document.getElementById(children[i].id + "_div"));
}
}
obj = document.getElementById("position" + contentCount);
contentCount++;
}
}
//checks to see if the scroll bars need to be adjusted
function dragable_adjustScrollBars(e) {
scrY=0;
scrX=0;
if (e.clientY > docElement.clientHeight-scrollJump) {
if (e.clientY + docElement.scrollTop < pageHeight - (scrollJump + 60)) {
scrY=scrollJump;
window.scroll(docElement.scrollLeft,docElement.scrollTop + scrY);
y-=scrY;
}
}else if (e.clientY < scrollJump) {
if (docElement.scrollTop < scrollJump) {
scrY = docElement.scrollTop;
}else {
scrY=scrollJump;
}
window.scroll(docElement.scrollLeft,docElement.scrollTop - scrY);
y+=scrY;
}
if (e.clientX > docElement.clientWidth-scrollJump) {
if (e.clientX + docElement.scrollLeft < pageWidth - (scrollJump + 60)) {
scrX=scrollJump;
window.scroll(docElement.scrollLeft + scrX,docElement.scrollTop);
x-=scrX;
}
}else if (e.clientX < scrollJump) {
if (docElement.scrollLeft < scrollJump) {
scrX = docElement.scrollLeft;
}else {
scrX=scrollJump;
}
window.scroll(docElement.scrollLeft - scrX,docElement.scrollTop);
x+=scrX;
}
}
function dragable_isBlank(td) {
if (td.id.indexOf("blank") != -1) {
return true;
}
return false;
}
//gets the element children of a dom object
function dragable_getElementChildren(obj) {
var myArray= new Array();
mycnt = 0;
for (i=0;i<obj.childNodes.length;i++) {
if (obj.childNodes[i].nodeType==1) {
myArray[mycnt] = obj.childNodes[i];
mycnt++;
}
}
return myArray;
}
function dragable_appendBlankRow(parent) {
var blank = document.getElementById("blank");
blank.className="blank";
blankClone = blank.cloneNode(true);
blankClone.id = "blank" + new Date().getTime() + blankCount++;
draggableObjectList[draggableObjectList.length] = blankClone;
parent.appendChild(blankClone);
blankClone.style.top=0+"px";
blankClone.style.left=0+"px";
blank.className="hidden";
return blankClone.id;
}
//moves a table row from one table to another. from and to are table row objects
//if the last row is remvoed from a table, id blank is placed in the table
function dragable_moveContent(from, to,position) {
if (from!=to && from && to) {
var fromParent = from.parentNode;
fromParent.removeChild(from);
if (dragable_getElementChildren(fromParent).length == 0) {
var blank_id = dragable_appendBlankRow(fromParent);
new YAHOO.util.DDTarget(blank_id);
}
var toParent = to.parentNode;
var toChildren = dragable_getElementChildren(toParent);
if (toChildren[0].id.indexOf("blank") != -1) {
toParent.removeChild(document.getElementById(toChildren[0].id));
toParent.appendChild(from);
}else if (position == "top"){
toParent.insertBefore( from, to );
}else {
children = dragable_getElementChildren(toParent);
i=0;
while(children[i] != to && i < children.length) {
i++;
}
if (i == children.length - 1) {
toParent.appendChild(from);
}else {
toParent.insertBefore(from,children[i+1]);
}
}
}
}
function dragable_getContentMap() {
//ex 1001,2004;896,494,10010
contentMap = "";
contentCount=1;
var contentArea = document.getElementById("position1");
while (contentArea) {
if ((contentMap != "") || (contentArea.id == 'position2')) {
contentMap+=".";
}
//get down to the tr area
children = dragable_getElementChildren(contentArea);
children=dragable_getElementChildren(children[0]);
for (i=0;i<children.length;i++) {
if (contentMap != "" && (contentMap.lastIndexOf(".") != contentMap.length-1)) {
contentMap+=",";
}
if (children[i].id.indexOf("blank") == -1) {
contentMap+=children[i].id.replace(/^td/,"");
}
}
contentCount++;
contentArea = document.getElementById("position" + contentCount);
}
return contentMap;
}