replacing corrupted files
|
@ -25,7 +25,7 @@
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Config_File.class.php 1430 2005-08-01 19:26:00Z maroy $ */
|
/* $Id: Config_File.class.php,v 1.6 2005/08/01 19:25:59 maroy Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config file reading class
|
* Config file reading class
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
* @version 2.6.6
|
* @version 2.6.6
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Smarty.class.php 1430 2005-08-01 19:26:00Z maroy $ */
|
/* $Id: Smarty.class.php,v 1.6 2005/08/01 19:25:59 maroy Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DIR_SEP isn't used anymore, but third party apps might
|
* DIR_SEP isn't used anymore, but third party apps might
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* @package Smarty
|
* @package Smarty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: Smarty_Compiler.class.php 1430 2005-08-01 19:26:00Z maroy $ */
|
/* $Id: Smarty_Compiler.class.php,v 1.6 2005/08/01 19:25:59 maroy Exp $ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template compiling class
|
* Template compiling class
|
||||||
|
|
|
@ -237,7 +237,7 @@ $mask = array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Sample rate',
|
'label' => 'Sample rate',
|
||||||
'rule' => 'numeric',
|
'rule' => 'numeric',
|
||||||
|
'attributes'=> array('disabled' => 'on'),
|
||||||
'id3' => array('Samplerate')
|
'id3' => array('Samplerate')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -1,149 +1,295 @@
|
||||||
/**************************************************
|
// ----------------------------------------------------------------------------
|
||||||
* dom-drag.js
|
// (c) Copyright, DTLink, LLC 1997-2005
|
||||||
* 09.25.2001
|
// http://www.dtlink.com
|
||||||
* www.youngpup.net
|
//
|
||||||
**************************************************
|
// DragList - Drag and Drop Ordered Lists
|
||||||
* 10.28.2001 - fixed minor bug where events
|
//
|
||||||
* sometimes fired off the handle, not the root.
|
// Javascript Support file for formVista <draglist> fvml tag.
|
||||||
**************************************************
|
//
|
||||||
* 05.30.2005 - added a workaround for firefox
|
// For more information please see:
|
||||||
* activating links when finished dragging.
|
//
|
||||||
* mmosier@astrolabe.com
|
// http://www.formvista.com/otherprojects/draglist.html
|
||||||
**************************************************/
|
//
|
||||||
|
// For questions or comments please contact us at:
|
||||||
|
//
|
||||||
|
// http://www.formvista.com/contact.html
|
||||||
|
//
|
||||||
|
// LICENSE: This file is governed by the new BSD license. For more information
|
||||||
|
// please see the LICENSE.txt file accompanying this package.
|
||||||
|
//
|
||||||
|
// REVISION HISTORY:
|
||||||
|
//
|
||||||
|
// 2004-11-12 YmL:
|
||||||
|
// . initial revision.
|
||||||
|
//
|
||||||
|
// 2005-05-28 YmL:
|
||||||
|
// . pulled out of formVista, relicensed and packaged as a standalone implementation.
|
||||||
|
//
|
||||||
|
// 2005-06-02 mtmosier:
|
||||||
|
// . added horizontal dragging support.
|
||||||
|
//
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
var Drag = {
|
/**
|
||||||
|
* constructor for dragList class
|
||||||
|
*/
|
||||||
|
|
||||||
obj : null,
|
function fv_dragList( name )
|
||||||
|
|
||||||
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
|
|
||||||
{
|
{
|
||||||
o.onmousedown = Drag.start;
|
|
||||||
|
|
||||||
o.hmode = bSwapHorzRef ? false : true ;
|
// name of this dragList. Must match the id of the root DIV tag.
|
||||||
o.vmode = bSwapVertRef ? false : true ;
|
|
||||||
|
|
||||||
o.root = oRoot && oRoot != null ? oRoot : o ;
|
this.dragListRootId = name;
|
||||||
|
|
||||||
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
|
// array of item offsets
|
||||||
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
|
|
||||||
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
|
|
||||||
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
|
|
||||||
|
|
||||||
o.minX = typeof minX != 'undefined' ? minX : null;
|
this.offsetsX = new Array();
|
||||||
o.minY = typeof minY != 'undefined' ? minY : null;
|
this.offsetsY = new Array();
|
||||||
o.maxX = typeof maxX != 'undefined' ? maxX : null;
|
|
||||||
o.maxY = typeof maxY != 'undefined' ? maxY : null;
|
|
||||||
|
|
||||||
o.xMapper = fXMapper ? fXMapper : null;
|
|
||||||
o.yMapper = fYMapper ? fYMapper : null;
|
|
||||||
|
|
||||||
o.root.onDragStart = new Function();
|
|
||||||
o.root.onDragEnd = new Function();
|
|
||||||
o.root.onDrag = new Function();
|
|
||||||
},
|
|
||||||
|
|
||||||
start : function(e)
|
|
||||||
{
|
|
||||||
var o = Drag.obj = this;
|
|
||||||
e = Drag.fixE(e);
|
|
||||||
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
|
|
||||||
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
|
|
||||||
o.root.onDragStart(x, y);
|
|
||||||
|
|
||||||
o.startX = x;
|
|
||||||
o.startY = y;
|
|
||||||
o.lastMouseX = e.clientX;
|
|
||||||
o.lastMouseY = e.clientY;
|
|
||||||
|
|
||||||
if (o.hmode) {
|
|
||||||
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
|
|
||||||
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
|
|
||||||
} else {
|
|
||||||
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
|
|
||||||
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o.vmode) {
|
|
||||||
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
|
|
||||||
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
|
|
||||||
} else {
|
|
||||||
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
|
|
||||||
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.onmousemove = Drag.drag;
|
|
||||||
document.onmouseup = Drag.end;
|
|
||||||
|
|
||||||
if (o.linkDisabled) {
|
|
||||||
var hrefs = o.root.getElementsByTagName("a");
|
|
||||||
for (var i = 0; i < hrefs.length; i++) {
|
|
||||||
hrefs[i].onclick = hrefs[i].prevOnclick;
|
|
||||||
hrefs[i].prevOnclick = null;
|
|
||||||
}
|
|
||||||
o.linkDisabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
drag : function(e)
|
|
||||||
{
|
|
||||||
e = Drag.fixE(e);
|
|
||||||
var o = Drag.obj;
|
|
||||||
|
|
||||||
var ey = e.clientY;
|
|
||||||
var ex = e.clientX;
|
|
||||||
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
|
|
||||||
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
|
|
||||||
var nx, ny;
|
|
||||||
|
|
||||||
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
|
|
||||||
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
|
|
||||||
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
|
|
||||||
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
|
|
||||||
|
|
||||||
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
|
|
||||||
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
|
|
||||||
|
|
||||||
if (o.xMapper) nx = o.xMapper(y)
|
|
||||||
else if (o.yMapper) ny = o.yMapper(x)
|
|
||||||
|
|
||||||
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
|
|
||||||
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
|
|
||||||
Drag.obj.lastMouseX = ex;
|
|
||||||
Drag.obj.lastMouseY = ey;
|
|
||||||
|
|
||||||
var threshold = 4;
|
|
||||||
if (!o.linkDisabled) {
|
|
||||||
if (Math.abs(nx - o.startX) > threshold || Math.abs(ny - o.startY) > threshold) {
|
|
||||||
var hrefs = o.root.getElementsByTagName("a");
|
|
||||||
for (var i = 0; i < hrefs.length; i++) {
|
|
||||||
hrefs[i].prevOnclick = hrefs[i].onclick;
|
|
||||||
hrefs[i].onclick = function() { return false; };
|
|
||||||
}
|
|
||||||
o.linkDisabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
end : function()
|
|
||||||
{
|
|
||||||
document.onmousemove = null;
|
|
||||||
document.onmouseup = null;
|
|
||||||
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
|
|
||||||
parseInt(Drag.obj.root.style[Drag.obj.vmode
|
|
||||||
? "top" : "bottom"]), Drag.obj.root);
|
|
||||||
Drag.obj = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
fixE : function(e)
|
|
||||||
{
|
|
||||||
if (typeof e == 'undefined') e = window.event;
|
|
||||||
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
|
|
||||||
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
|
|
||||||
return e;
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
// ----------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* setup the draglist prior to use
|
||||||
|
*
|
||||||
|
* @param string orientation defaults to vert. if set to "horz" renders horizontally.
|
||||||
|
* @param string itemTagName. if null defaults to "div". Can be "span".
|
||||||
|
*/
|
||||||
|
|
||||||
|
fv_dragList.prototype.setup = function( orientation, itemTagName )
|
||||||
|
{
|
||||||
|
|
||||||
|
var horizontal;
|
||||||
|
|
||||||
|
if ( orientation == "horz" )
|
||||||
|
horizontal = true;
|
||||||
|
else
|
||||||
|
horizontal = false;
|
||||||
|
|
||||||
|
this.listRoot = document.getElementById( this.dragListRootId );
|
||||||
|
this.listItems = this.getListItems( itemTagName );
|
||||||
|
|
||||||
|
for (var i = 0; i < this.listItems.length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( this.listItems[i] == undefined )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( horizontal )
|
||||||
|
{
|
||||||
|
Drag.init(this.listItems[i], null, null, null, 0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Drag.init(this.listItems[i], null, 0, 0, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------
|
||||||
|
// on drag method
|
||||||
|
|
||||||
|
this.listItems[i].onDrag = function( x, y, thisElem )
|
||||||
|
{
|
||||||
|
|
||||||
|
x = thisElem.offsetLeft;
|
||||||
|
y = thisElem.offsetTop;
|
||||||
|
|
||||||
|
// this is a callback from the dom-drag code. From within this
|
||||||
|
// function "this" does not refer to the fv_draglist function.
|
||||||
|
|
||||||
|
draglist = getDragList( thisElem );
|
||||||
|
|
||||||
|
draglist.recalcOffsets( itemTagName );
|
||||||
|
|
||||||
|
var pos = draglist.getCurrentOffset( thisElem, itemTagName );
|
||||||
|
|
||||||
|
//var listItems = this.getListItems( itemTagName );
|
||||||
|
|
||||||
|
// if bottom edge is below top of lower item.
|
||||||
|
|
||||||
|
var testMoveUp;
|
||||||
|
var testMoveDown;
|
||||||
|
if ( horizontal )
|
||||||
|
{
|
||||||
|
testMoveUp = (x + draglist.getDivWidth(thisElem) > draglist.offsetsX[pos + 1] + draglist.getDivWidth( draglist.listItems[pos + 1] ));
|
||||||
|
testMoveDown = x < draglist.offsetsX[pos - 1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
testMoveUp = (y + draglist.getDivHeight(thisElem) > draglist.offsetsY[pos + 1] + draglist.getDivHeight( draglist.listItems[pos + 1] ));
|
||||||
|
testMoveDown = y < draglist.offsetsY[pos - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (( pos != draglist.listItems.length - 1) && testMoveUp )
|
||||||
|
{
|
||||||
|
draglist.listRoot.removeChild(thisElem);
|
||||||
|
|
||||||
|
if ( pos + 1 == draglist.listItems.length )
|
||||||
|
{
|
||||||
|
draglist.listRoot.appendChild( thisElem );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
draglist.listRoot.insertBefore(thisElem, draglist.listItems[pos+1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
thisElem.style["top"] = "0px";
|
||||||
|
thisElem.style["left"] = "0px";
|
||||||
|
}
|
||||||
|
else if ( pos != 0 && testMoveDown )
|
||||||
|
{
|
||||||
|
draglist.listRoot.removeChild(thisElem);
|
||||||
|
draglist.listRoot.insertBefore(thisElem, draglist.listItems[pos-1]);
|
||||||
|
thisElem.style["top"] = "0px";
|
||||||
|
thisElem.style["left"] = "0px";
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.listItems[i].onDragEnd = function(x,y,thisElem)
|
||||||
|
{
|
||||||
|
thisElem.style["top"] = "0px";
|
||||||
|
thisElem.style["left"] = "0px";
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end of for loop.
|
||||||
|
|
||||||
|
this.recalcOffsets( itemTagName );
|
||||||
|
|
||||||
|
} // end of setup.
|
||||||
|
|
||||||
|
// ----------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update the order value fields and submit the form.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fv_dragList.prototype.do_submit = function( formName, dragListRootId )
|
||||||
|
{
|
||||||
|
|
||||||
|
var listOrderItems = this.listRoot.getElementsByTagName("input");
|
||||||
|
|
||||||
|
for (var i = 0; i < listOrderItems.length; i++)
|
||||||
|
{
|
||||||
|
listOrderItems[i].value = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
expr = "document." + formName + ".submit()";
|
||||||
|
|
||||||
|
eval( expr );
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------
|
||||||
|
// "Private" methods.
|
||||||
|
// ----------------------------------------------
|
||||||
|
|
||||||
|
fv_dragList.prototype.recalcOffsets = function( itemTagName )
|
||||||
|
{
|
||||||
|
var listItems = this.getListItems( itemTagName );
|
||||||
|
|
||||||
|
for (var i = 0; i < listItems.length; i++)
|
||||||
|
{
|
||||||
|
this.offsetsX[i] = listItems[i].offsetLeft;
|
||||||
|
this.offsetsY[i] = listItems[i].offsetTop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fv_dragList.prototype.getCurrentOffset = function(elem, itemTagName)
|
||||||
|
{
|
||||||
|
var listItems = this.getListItems( itemTagName );
|
||||||
|
|
||||||
|
for (var i = 0; i < listItems.length; i++)
|
||||||
|
{
|
||||||
|
if (listItems[i] == elem)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fv_dragList.prototype.getDivWidth = function(elem)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (( elem == undefined) || ( elem.offsetWidth == undefined ))
|
||||||
|
return( 0 );
|
||||||
|
|
||||||
|
value = elem.offsetWidth;
|
||||||
|
if (isNaN(value))
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return( value );
|
||||||
|
}
|
||||||
|
|
||||||
|
fv_dragList.prototype.getDivHeight = function(elem)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (( elem == undefined) || ( elem.offsetHeight == undefined ))
|
||||||
|
return( 0 );
|
||||||
|
|
||||||
|
value = elem.offsetHeight;
|
||||||
|
if (isNaN(value))
|
||||||
|
{
|
||||||
|
value = 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
return( value );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return list of draggable items
|
||||||
|
*/
|
||||||
|
|
||||||
|
fv_dragList.prototype.getListItems = function( itemTagName )
|
||||||
|
{
|
||||||
|
if ( itemTagName == undefined )
|
||||||
|
{
|
||||||
|
itemTagName = "div";
|
||||||
|
}
|
||||||
|
|
||||||
|
var listItems = this.listRoot.getElementsByTagName( itemTagName );
|
||||||
|
|
||||||
|
return( listItems );
|
||||||
|
}
|
||||||
|
|
||||||
|
// end of draglist class definition.
|
||||||
|
|
||||||
|
// -------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add a new dragList to the list of draglists on this page
|
||||||
|
*
|
||||||
|
* This implementatoin supports multiple managed draglists on
|
||||||
|
* a single page. The index is contained in a global dragListIndex
|
||||||
|
* array that must be declared in the page.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function addDragList( draglist )
|
||||||
|
{
|
||||||
|
dragListIndex[ draglist.dragListRootId ] = draglist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* given a draggable div element, return the draglist it belongs to
|
||||||
|
*
|
||||||
|
* @see fv_draglist.prototype.setup
|
||||||
|
* @todo this should probably be a method inside the draglist class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getDragList( elem )
|
||||||
|
{
|
||||||
|
|
||||||
|
// given a list item return the drag list it belongs to.
|
||||||
|
|
||||||
|
var draglistContainer = elem.parentNode;
|
||||||
|
|
||||||
|
var draglist = dragListIndex[ draglistContainer.id ];
|
||||||
|
|
||||||
|
return( draglist );
|
||||||
|
}
|
||||||
|
|
||||||
|
// END
|
||||||
|
|
Before Width: | Height: | Size: 960 B After Width: | Height: | Size: 961 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 548 B |