

var LibJs = {
_instances: {},
user: 'nobody',
groups: [],
createId: function() {
do {
for (var id = '', i = 0; i < 6; i ++)
id += '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmmnopqrstuvwxyz'.charAt(Math.floor(63 * Math.random()));
} while (this._instances[id]);
return id;
},
register: function(obj) {
id = this.createId();
this._instances[id] = obj;
return id;
},
get: function(nodeId) {
if (!this._instances[nodeId])
throw new LibJs.Exception(new Error(), 'L.001', nodeId, [nodeId]);
return this._instances[nodeId];
},
is: function(nodeId) {
return typeof this._instances[nodeId] != 'undefined';
},
remove:  function(nodeId) {
if (delete this._instances[nodeId] == false)
throw new LibJs.Exception(new Error(), 'L.002', nodeId, [nodeId])
},
start: function(loader, element) {
try {
this.running = true;
this.Lang.code = this.Config.defaultLang;
LibJs.XWin.start(loader, element);
this.Daemon.addEvent(this.System.bind(this.Notify, this.Notify.__execute), 200);
this.Daemon.addEvent(this.System.bind(this, this.__checkUrl), 200);
this.Daemon.addEvent(this.System.bind(this, this.__sync), 60000);
this.Daemon.addEvent(this.System.bind(this, this.__GC), 3000);
this.Daemon.start();
} catch(e) {
this.__atExit();
}
},
__checkUrl: function() {
var match = /^#([a-z0-9_]{6})/i.exec(location.hash);
if (!match && !LibJs.XWin.getActivePage())
match = [ '', this.Config.rootId ];
if (match && match[1] != $L(LibJs.XWin.body).active && typeof $L(LibJs.XWin.body).render == 'function')
$L(LibJs.XWin.body).render(match[1]);
},
__sync: function() {
var transaction = LibJs.Server.start();
if (!this.Lang.__sendMissing(transaction))
LibJs.Server.send({ type: 'noop' }, transaction);
LibJs.Server.commit(transaction, null, function() {});
},
__GC: function() {
var size = 0; removed = 0;
try {
for (var nodeId in this._instances)
if (this._instances[nodeId].getState() != ''
&& this._instances[nodeId].parent.length > 0
&& typeof this._instances[this._instances[nodeId].parent] == 'undefined'
&& typeof this.XWin._handles[nodeId] == 'undefined'
) {
removed++;
this.remove(nodeId);
} else
size++;
} catch (error) {
$L(LibJs.XWin.body).setLabel('error', $C('error', { properties: { text: $S('core', 'error_garbage_collector'), error: error}}));
$L(LibJs.XWin.body).setState('rendered');
}
if (LibJs.Config.Debug.collector)
window.status = 'Heap: ' + size + ' nodes, removed: ' + removed + ' nodes';
},
__atExit: function() {
this.running = false;
clearInterval(LibJs.Daemon.handler);
for (var nodeId in this._instances)
delete this._instances[nodeId];
LibJs.Factory.__atExit();
LibJs.Event.__atExit();
},
createDOMElement: function(name, options) {
var node = document.createElement(name);
options = options || {};
if (options.className)
node.className = options.className;
LibJs.System.extendObject(node, options.attributes || {});
for (name in options.style || {})
node.style[name] = options.style[name];
for (var i = 0; i < (options.children || []).length; i++)
node.appendChild(options.children[i]);
if (name == 'img' && parseFloat(navigator.appVersion.split("MSIE")[1]) >= 5.5 && options.attributes && options.attributes.src && options.attributes.src.substr(options.attributes.src.length - 3).toLowerCase() == 'png') {
var span = document.createElement('span');
span.style['filter'] = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + options.attributes.src + '\', sizingMethod=\'image\')';
span.appendChild(node);
node = span;
}
return node;
}
}
$L = function(id) { return LibJs.get(id); }
$D = function(id) { return $L(id).getDomSet(); }
$E = LibJs.createDOMElement;
$C = function(name, options) { return LibJs.Component.create(name, options, LibJs.Component, 'fetchComponent') };
$F = function(name, options) { return LibJs.Component.create(name, options, LibJs.Factory.Component, 'fetchFactoryComponent'); };
$A = function(name, options) { return LibJs.Component.create(name, options, LibJs.Admin, 'fetchAdminComponent'); };
$X = function(name, options) { return LibJs.Component.create(name, options, LibJs.XWin.Component, 'fetchXWinComponent'); };
$T = function(text) { return document.createTextNode(text); };
$W = function(widgetId) {
if (!LibJs.Factory.widgets[widgetId])
throw new LibJs.Exception(new Error(), 'L.003', null, [widgetId]);
return LibJs.Factory.widgets[widgetId];
}
$S = function(component, name)  { return LibJs.Lang.getText(component, name); }
LibJs.Config = {lang: ['de','en'],defaultLang: 'en',rootId: 'XMbf2W',domainName: 'urulu.org',productive: true,modules: ['faq', 'gallery', 'garden', 'linklist', 'stat']}

LibJs.System = {
createClass: function() {
return function() {
this.initialize.apply(this, arguments);
}
},
extendObject: function(destination, source) {
for (property in source)
destination[property] = source[property];
return destination;
},
cloneObject: function(source) {
return this.extendObject({}, source);
},
bind: function(object, method) {
var args = this.toArray(arguments).slice(2);
return function() {
try {
return method.apply(object, args.concat(LibJs.System.toArray(arguments)));
} catch (error) {
(options.onError || function(error, source) { LibJs.XWin.openError(error, source); })(error, transport.responseText);
}
}
},
bindAsEventListener: function(object, method) {
var args = this.toArray(arguments).slice(2);
return function(event) {
try {
return method.apply(object, args.concat([event || window.event]));
} catch (error) {
(options.onError || function(error, source) { LibJs.XWin.openError(error, source); })(error, transport.responseText);
}
}
},
getElementStyle: function(element, style) {
if (!element.style)
return '';
var value = element.style[style];
if (!value) {
if (document.defaultView && document.defaultView.getComputedStyle) {
var css = document.defaultView.getComputedStyle(element, null);
value = css ? css.getPropertyValue(style) : null;
} else if (element.currentStyle) {
value = element.currentStyle[style];
}
}
return value;
},
toArray: function(obj) {
arr = [];
for (var i = 0; i < obj.length || 0; i++)
arr.push(obj[i]);
return arr;
},
withoutItem: function(array, item) {
result = [];
for (var i = 0; i < array.length; i++)
if (array[i] != item)
result.push(array[i]);
return result;
},
indexOfItem: function(array, item) {
for (var i = 0; i < array.length; i++)
if (array[i] == item)
return i;
return -1;
},
swapItems: function(array, first, second) {
var index = this.indexOfItem(array, second);
array[this.indexOfItem(array, first)] = second;
array[index] = first;
return array;
},
sendAjaxRequest: function(url, options) {
try {
transport = new XMLHttpRequest();
} catch (e) {
try {
transport = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
transport = new ActiveXObject('Microsoft.XMLHTTP');
}
}
options = this.extendObject({
method: 'post',
asynchronous: true,
parameters: '',
postBody: '',
url: url,
attempt: 0
}, options || {});
if (options.method == 'get' && options.parameters.length > 0)
url += (url.match(/\?/) ? '&' : '?') + options.parameters;
transport.open(options.method, url, options.asynchronous);
if (options.asynchronous)
transport.onreadystatechange = this.bind(this, this.__onAjaxStateChange, url, options, transport);
requestHeaders = [];
if (options.method == 'post') {
requestHeaders.push('Content-type', 'application/x-www-form-urlencoded');
if (transport.overrideMimeType)
requestHeaders.push('Connection', 'close');
}
if (options.requestHeaders)
requestHeaders.push.apply(requestHeaders, options.requestHeaders);
for (var i = 0; i < requestHeaders.length; i += 2)
transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
transport.send(options.method == 'post' ? options.postBody : null);
},
__onAjaxStateChange: function(url, options, transport) {
if (!LibJs.running)
return;
try {
if (transport.readyState == 4)
if (transport.responseText.length > 0) {
if (LibJs.Config.Debug.request)
document.getElementsByTagName('body')[0].appendChild($E('pre', { children: [$T(transport.responseText), $E('hr')]}));
var result = eval(transport.responseText);
if (result > 0) {
var transaction = LibJs.Server.start();
LibJs.Server.send({ type: 'fetchSerializedWidgets', index: result }, transaction);
LibJs.Server.commit(transaction, options.onComplete || function(){}, options.onError || function(){});
} else
(options.onComplete || (function(){}))();
transport.onreadystatechange = function(){};
} else if (options.attempt < 5) {
++options.attempt;
setTimeout(this.bind(this, this.sendAjaxRequest, options.url, options), 200);
} else if (LibJs.running)
throw new Error('No answer after 5 attemps to the request: \n\n' + options.postBody);
} catch (error) {
(options.onError || function(error, source) { LibJs.XWin.openError(error, source); })(error, transport.responseText);
}
}
}


LibJs.XWin = {
_handles: {},
_stack: 0,
_currWinZ: 0,
_show: function(nodeId) {
this._handles[nodeId] = true;
for (var i = 0; i < $D(nodeId).length; i++)
this.domRoot.appendChild($D(nodeId)[i]);
return nodeId;
},
getWinZ: function() {
return this._currWinZ;
},
getNextWinZ: function() {
return this._currWinZ += 50;
},
start: function(loader, element) {
this.domRoot = typeof element == 'undefined' ? document.getElementsByTagName('body')[0] : element;
this._handles[this._loading = $X('loading')] = true;
this.body = loader('body');
return this._show(this.body);
},
render: function(widgetId) {
$L(this.body).render(widgetId);
},
reload: function() {
this.render($L(this.body).active)
},
getActivePage: function() {
return $L(this.body).active;
},
openWindow: function(options) {
return this._show($X('window', options));
},
openTooltip: function(top, left, body) {
return this._show($X('tooltip', {labels: { body: body }, properties: { top: top, left: left }}));
},
openError: function(error, source) {
return this._show($X('error', {properties: {text: $S('error', 'error_occured'), error: error || {}, source: source}}));
},
openContextmenu: function(top, left, items) {
if ((items || []).length)
return this._show($X('contextmenu', {properties: { top: top, left: left, items: items}}));
},
openMessage: function(options) {
return this._show($X('message', options));
},
openConfirm: function(options) {
return this._show($X('confirm', options));
},
openLoading: function() {
if (this.body) {
$L(this._loading).setState('created');
return this._show(this._loading);
}
},
closeLoading: function () {
if (this.body)
$L(this._loading).setState('closed');
},
closeAll: function(exceptions) {
for (var index in this._handles)
if (this._handles[index] && typeof $L(index).closeComponent != 'undefined' && LibJs.System.indexOfItem(exceptions || [], index) == -1)
$L(index).closeComponent();
},
remove: function(nodeId) {
if (this._handles[nodeId] && delete this._handles[nodeId] == false)
throw new LibJs.Exception(new Error(), 'Could not delete handle', nodeId);
}
}


LibJs.Visitor = LibJs.System.createClass();
LibJs.System.extendObject(LibJs.Visitor, {
create: function(id, component) {
return new LibJs.Visitor(id, component);
}
});
LibJs.Visitor.prototype = {
initialize: function(id, component) {
this.id = id;
LibJs.System.extendObject(this, LibJs.Visitor[component.charAt(0).toUpperCase() + component.substr(1)] || {});
}
}


LibJs.Server = {
connectionId: null,
_transactions: {},
_tocId: null,
_queue: [],
start: function() {
do
var transaction = LibJs.createId();
while (this._transactions[transaction]);
this._transactions[transaction] = '';
return transaction;
},
send: function(action, transaction) {
this._transactions[transaction] += '<call type="' + action.type + '">';
for (var index in action)
if (index != 'type')
this._transactions[transaction] += '<argument name="' + index + '">' + action[index] + '</argument>';
this._transactions[transaction] += '</call>';
},
commit: function(transaction, onComplete, onError, serverUrl) {
if (!this.connectionId)
this.connectionId = 'c' + LibJs.createId();
if (this._transactions[transaction] == '')
(onComplete || (function(){}))();
else {
var postBody = 'request=<?xml version="1.0" encoding="utf-8"?>'
+ '<request transactionId="' + transaction + '" connectionId="' + this.connectionId + '" dbDebugger="' + (LibJs.Config.Debug.database ? 'yes' : 'no') + '">'
+ this._transactions[transaction] + '</request>';
if (LibJs.Config.Debug.request)
document.getElementsByTagName('body')[0].appendChild($E('pre', { children: [$T(postBody), $E('hr')]}));
LibJs.System.sendAjaxRequest(LibJs.Config.baseDir + (serverUrl || LibJs.Config.protocol + '/js') + '/request', {
requestHeaders: document.cookie ? ['Cookie', document.cookie] : [],
postBody: postBody,
method: 'post',
onComplete: onComplete || null,
onError: onError || null
});
}
delete this._transactions[transaction];
},
__onComplete: function(tocId) {
if (this._tocId && this._tocId != tocId) {
var transaction = this.start();
this.send({ type: 'sync', tocId: this._tocId }, transaction);
LibJs.Server.commit(transaction);
}
this._tocId = tocId;
}
}


LibJs.Notify = {
_widgetIds: {},
_queue: [],
_events: ['set', 'add', 'added', 'remove', 'removed', 'swap', 'swaped'],
_lock: false,
observeAll: function (observerId, widgetId, callback) {
for (var i = 0; i < this._events.length; i++)
this.observe(observerId, widgetId, callback, this._events[i]);
},
observe: function (observerId, widgetId, callback, event) {
if (!this._widgetIds[widgetId])
this._widgetIds[widgetId] = [];
this._widgetIds[widgetId].push({ event: event, id: observerId, callback: callback})
},
notifyAll: function(widgetId) {
for (var i = 0; i < this._events.length; i++)
this.notify(widgetId, this._events[i]);
},
notify: function (widgetId, event) {
for (var i = 0; i < this._queue.length; i++)
if (this._queue[i].widgetId == widgetId && this._queue[i].event == event)
return;
this._queue.push({widgetId: widgetId, event: event});
},
__execute: function () {
if (this._lock)
return;
this._lock = true;
for (var i = 0; i < this._queue.length; i++)
if (this._widgetIds[this._queue[i].widgetId]) {
var validNodes = [];
for (var j = 0; j < this._widgetIds[this._queue[i].widgetId].length; j++)
if (LibJs.is(this._widgetIds[this._queue[i].widgetId][j].id)) {
if (this._widgetIds[this._queue[i].widgetId][j].event == this._queue[i].event)
this._widgetIds[this._queue[i].widgetId][j].callback(this._queue[i].widgetId, this._queue[i].event);
validNodes.push(this._widgetIds[this._queue[i].widgetId][j]);
}
this._widgetIds[this._queue[i].widgetId] = validNodes;
}
this._queue = [];
this._lock = false;
}
}


LibJs.Lang = {
_data: {},
_missing: [],
code: null,
getText: function(component, name)  {
if (typeof name == 'undefined')
return this._data[component] || {};
if (!this._data[component])
this._data[component] = {};
if (typeof this._data[component][name] == 'undefined') {
if (!LibJs.Config.productive)
this._missing.push({type: 'addText', component: component, name: LibJs.Compiler.toAscii(name).replace(/</ig, '#lt;').replace(/>/ig, '#gt;')});
this._data[component][name] = {}
}
if (!this._data[component][name][LibJs.Lang.code])
this._data[component][name][LibJs.Lang.code] = LibJs.Compiler.toAscii(name);
return LibJs.Compiler.fromAscii(this._data[component][name][LibJs.Lang.code]);
},
setText: function(lang, component, name, value, transaction) {
if (!this._data[component])
this._data[component] = {};
if (typeof this._data[component][name] == 'undefined')
this._data[component][name] = {}
this._data[component][name][lang] = LibJs.Compiler.toAscii(value);
LibJs.Server.send({
type: 'setText', component: component, code: lang,
name: LibJs.Compiler.toAscii(name).replace(/</ig, '#lt;').replace(/>/ig, '#gt;'),
value: LibJs.Compiler.toAscii(value).replace(/</ig, '#lt;').replace(/>/ig, '#gt;')
}, transaction);
},
getComponents: function() {
var names = [];
for (var indes in this._data)
names.push(indes);
return names;
},
__sendMissing: function(transaction) {
var hasMissing = (this._missing.length > 0)
for (var i = 0; i < this._missing.length; i++)
LibJs.Server.send(this._missing[i], transaction);
this._missing = [];
return hasMissing;
},
__setText: function(component, data) {
if (!this._data[component])
this._data[component] = {};
LibJs.System.extendObject(this._data[component], data);
},
__setAllTexts: function(data) {
this._data = data;
}
}


LibJs.Factory = {
definitions: {},
roots: {},
widgets: {},
queries: {},
logs: {},
createWidget: function(type, parentId, transaction) {
var children = {};
for (var index in this.definitions[type].children)
children[index] = [];
var widget = new LibJs.Factory.Widget(LibJs.createId(), type, [], {r: 'y', w: 'y', g: 'n', a: 'y', m: 'n', k: 'n'}, [], children, LibJs.System.cloneObject(this.definitions[type].variables));
this.widgets[widget.id] = widget;
LibJs.Server.send({ type: 'create', parentId: parentId, widgetId: widget.id, widgetType: widget.type }, transaction);
widget.setVariable(widget.getTitle(), type, transaction);
$W(parentId).appendWidget(widget.id);
return widget.id;
},
deleteWidget: function(widgetId, transaction) {
for (var i = 0; i < this.widgets[widgetId].parents.length; i++)
for (var index in this.widgets[this.widgets[widgetId].parents[i]].children) {
this.widgets[this.widgets[widgetId].parents[i]].children[index] = LibJs.System.withoutItem(this.widgets[this.widgets[widgetId].parents[i]].children[index], widgetId);
LibJs.Notify.notify(this.widgets[widgetId].parents[i], 'remove')
}
var stack = [widgetId];
while (stack.length > 0) {
childId = stack.shift();
if (this.widgets[childId]) {
stack = stack.concat(this.widgets[childId].getAllChildren());
if (delete this.widgets[childId] == false)
throw new LibJs.Exception(new Error(), 'LibJs.Factory.001', childId, [childId]);
}
}
LibJs.Server.send({ type: 'delete', widgetId: widgetId }, transaction);
},
useWidget: function(widgetId, transaction) {
if (!this.widgets[widgetId])
LibJs.Server.send({ type: 'fetchWidget', widgetId: widgetId }, transaction);
},
useWidgetIfExists: function(widgetId, transaction) {
if (!this.widgets[widgetId])
LibJs.Server.send({ type: 'fetchWidgetIfExists', widgetId: widgetId }, transaction);
},
useWidgetChildren: function(widgetId, transaction) {
if (!this.widgets[widgetId])
return LibJs.Server.send({ type: 'fetchChildren', widgetId: widgetId }, transaction);
for (var i = 0; i < this.widgets[widgetId].getAllChildren().length; i++)
if (!this.widgets[this.widgets[widgetId].getAllChildren()[i]])
return LibJs.Server.send({ type: 'fetchChildren', widgetId: widgetId }, transaction);
},
useWidgetAncestors: function(widgetId, transaction) {
var stack = [widgetId];
while (stack.length > 0) {
if (!this.widgets[stack[0]])
return LibJs.Server.send({ type: 'fetchAncestors', widgetId: widgetId }, transaction);
stack = stack.concat($W(stack.shift()).parents);
}
},
useRoots: function(storeName, transaction) {
if (!this.roots[storeName])
return LibJs.Server.send({ type: 'fetchRoots', store: storeName }, transaction);
},
sendQuery: function(query, transaction) {
var queryId = LibJs.createId();
LibJs.Server.send({type: 'query', queryId: queryId, query: LibJs.Compiler.toAscii(query.replace(/[*]/ig, '%').replace(/\?/ig, '_'))}, transaction);
return queryId;
},
findUser: function(pattern, transaction) {
var queryId = LibJs.createId();
LibJs.Server.send({type: 'finduser', queryId: queryId, pattern: LibJs.Compiler.toAscii(pattern.replace(/[*]/ig, '%').replace(/\?/ig, '_'))}, transaction);
return queryId;
},
widgetsByAncestor: function(widgetid, transaction) {
var queryId = LibJs.createId();
LibJs.Server.send({type: 'fetchwidgetsbyancestor', queryId: queryId, widgetId: widgetid}, transaction);
return queryId;
},
__sync: function(changes) {
var transaction = LibJs.Server.start();
for (var i = 0; i < changes.length; i++)
if (this.widgets[changes[i]])
LibJs.Server.send({ type: 'fetchWidget', widgetId: changes[i] }, transaction);
LibJs.Server.commit(transaction, LibJs.System.bind(this, this.__notifySync, changes));
},
__notifySync: function(changes) {
for (var i = 0; i < changes.length; i++)
LibJs.Notify.notifyAll(changes[i]);
},
__atExit: function() {
for (var widgetId in this.widgets)
delete this.widgets[widgetId];
}
}


LibJs.Exception = LibJs.System.createClass();
LibJs.System.extendObject(LibJs.Exception, {
instances: []
});
LibJs.Exception.prototype = {
initialize: function(error, code, nodeId, parameters) {
LibJs.System.extendObject(this, { line: error.lineNumber, stack: error.stack, code: code || 0, nodeId: nodeId || null, parameters: parameters || [] });
LibJs.Exception.instances.push(error);
}
}


LibJs.Event = LibJs.System.createClass();
LibJs.System.extendObject(LibJs.Event, {
_instances: [],
register: function(event) {
this._instances.push(event);
},
__atExit: function() {
for (var i = 0; i < this._instances.length; i++)
delete this._instances[i];
}
});
LibJs.Event.prototype = {
initialize: function(nodeId, options) {
LibJs.Event.register(this);
LibJs.System.extendObject(this, { nodeId: nodeId, type: options.type, event: options.event || 'click', arguments: options.arguments || null, name: options.name, callback: options.callback });
switch (this.type) {
case 'ancestors':
this.observer = LibJs.System.bind($L(nodeId), $L(nodeId).callFromAncestors, this.name, this.arguments);
break;
case 'this':
this.observer = LibJs.System.bind($L(nodeId), $L(nodeId)[this.name], this.arguments);
break;
default:
this.observer = this.callback;
}
this.invokeByEvent = LibJs.System.bindAsEventListener(this,  function(event) {
try {
this.instance = event;
this.observer(this);
} catch (error) {
LibJs.XWin.openError(error, '');
}
});
},
element: function() {
return this.instance.target || this.instance.srcElement;
},
isLeftClick: function() {
return (((this.instance.which) && (this.instance.which == 1)) || ((this.instance.button) && (this.instance.button == 1)));
},
pointer: function() {
return [
this.instance.pageX || (this.instance.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)),
this.instance.pageY || (this.instance.clientY + (document.documentElement.scrollTop || document.body.scrollTop))
];
},
keyCode: function() {
if(this.instance.which)
return this.instance.which;
if(this.instance.keyCode)
return this.instance.keyCode;
return 0;
},
stop: function() {
if (this.instance.preventDefault) {
this.instance.preventDefault();
this.instance.stopPropagation();
} else {
this.instance.returnValue = false;
this.instance.cancelBubble = true;
}
},
invoke: function() {
return this.observer(this);
},
observe: function(element) {
if (element.addEventListener)
element.addEventListener(this.event, this.invokeByEvent, false);
else if (element.attachEvent)
element.attachEvent('on' + this.event, this.invokeByEvent);
return element;
},
observeSet: function(list) {
for (var i = 0; i < list.length; i++)
this.observe(list[i]);
return list;
},
stopObserving: function(element) {
if (element.removeEventListener)
element.removeEventListener(this.event, this.invokeByEvent, false);
else if (element.detachEvent)
element.detachEvent('on' + this.event, this.invokeByEvent);
}
}


LibJs.Daemon = {
_events: [],
currentlyExecuting: false,
start: function() {
this.handler = setInterval(LibJs.System.bind(this, this.onTimerEvent), 50);
},
addEvent: function(callback, frequency) {
this._events.push({callback: callback, frequency: frequency, time: Date.parse(new Date())})
},
onTimerEvent: function() {
if (!this.currentlyExecuting) {
this.currentlyExecuting = true;
for (var i = 0; i < this._events.length; i++)
if (this._events[i].time + this._events[i].frequency < Date.parse(new Date()))
try {
this._events[i].time = Date.parse(new Date());
this._events[i].callback();
} catch(e) {}
this.currentlyExecuting = false;
}
}
}



LibJs.System.extendObject(LibJs.Config, {
Debug: { database: false, collector: false, request: false, compiler: false, tree: false },
protocol: location.pathname.lastIndexOf('/dyn/') == -1 ? 'adm' : 'dyn',
baseDir: location.pathname.substring(0,Math.max(location.pathname.lastIndexOf('/dyn/'),location.pathname.lastIndexOf('/adm/'))) + '/'
});


LibJs.Component = LibJs.System.createClass();
LibJs.System.extendObject(LibJs.Component, {
loading: {},
create: function(name, options, base, fetchCommand) {
var component = new LibJs.Component(name, options);
if (typeof base[name.charAt(0).toUpperCase() + name.substr(1)] == 'object') {
if (navigator.appVersion.match(/Konqueror|Safari|KHTML/))
component.__load(base);
else
setTimeout(LibJs.System.bind(component, component.__load, base), 10);
} else {
if (!this.loading[name]) {
this.loading[name] = [];
LibJs.System.sendAjaxRequest(LibJs.Config.baseDir + 'shr/' + fetchCommand + '/' + name, {onComplete: LibJs.System.bind(this, this.__load, name, base)});
LibJs.XWin.openLoading();
}
this.loading[name].push(component.id);
}
return component.id;
},
__load: function(name, base) {
LibJs.XWin.closeLoading();
for (var i = 0; i < this.loading[name].length; i++)
$L(this.loading[name][i]).__load(base);
delete this.loading[name];
}
});
LibJs.Component.prototype = {
initialize: function(name, options) {
this.name = name;
this.id = LibJs.register(this);
this.exceptions = {};

this.parent = (options || []).parent || '';
this.events = [];
this.labels = {};
this.stateStack = [];
this.states = {};
this._set = [];
this._initialize(options);
},
_initialize: function(options) {
options = LibJs.System.extendObject({states: {}, events: [], children: [], labels: {}, properties: {}}, options || {});
this.widgetId = options.widgetId || this.widgetId;
this.visitor = options.visitor || this.visitor || {};
for (var i = 0; i < options.children.length; i++)
this.setLabel(options.children[i], options.children[i]);
for (var i in options.labels)
this.setLabel(i, options.labels[i]);
for (var i in options.states)
this.states[i] = options.states[i];
this.properties = LibJs.System.extendObject((this.properties || {}), options.properties);
for (var i = 0; i < options.events.length; i++)
this.events.push(new LibJs.Event(this.id, options.events[i]));
},
getOptions: function() {},
load: function() {},
loaded: function() {},
__load: function(base) {
LibJs.System.extendObject(this, base[this.name.charAt(0).toUpperCase() + this.name.substr(1)]);
this.visitor = LibJs.System.extendObject(LibJs.Visitor.create(this.id, this.name), this.visitor);
this._initialize(this.getOptions());
this.states['created'] = new LibJs.Event(this.id, {type: 'call', callback: LibJs.System.bind(this, this.onCreate)});
this.load();
this.setState('created');
this.loaded();
},
S: function() { return this.name; },
callFromAncestors: function(name, arguments) {
try {
if (typeof this[name] == 'function')
return this[name](arguments);
else if (this.parent)
return $L(this.parent).callFromAncestors(name, arguments);
} catch (error) {
LibJs.XWin.openError(error, '');
}
},
getDomSet: function(force) {
if (force || this._set.length == 0) {
if (this.stateStack.length)
this._set = this.states[this.stateStack[0]].invoke();
else
this._set = [$E('span')];
for (var i = 0; i < this.events.length; i++)
this.events[i].observeSet(this._set)
}
return this._set;
},
getLabelsDomSet: function(labels) {
for (var set = [], i = 0; i < labels.length; i++)
set = set.concat($D(this.labels[labels[i]]));
return set;
},
repaint: function() {
if (this._set.length > 0 && this._set[0].parentNode) {
var node = this._set[0];
var parentNode = node.parentNode;
for (var i = 1; i < this._set.length; i++)
this._set[i].parentNode.removeChild(this._set[i]);
this.getDomSet(true);
if (node.parentNode) {
for (var i = 0; i < this._set.length; i++)
node.parentNode.insertBefore(this._set[i], node);
node.parentNode.removeChild(node);
} else
for (var i = 0; i < this._set.length; i++)
parentNode.appendChild(this._set[i]);
} else if (this._set.length == 0 && this.parent && this.getDomSet(true).length > 0)
$L(this.parent).repaint();
else
this._set = [];
},
setLabel: function(label, newChild) {
if (this.labels[label])
LibJs.remove(this.labels[label]);
this.labels[label] = newChild;
$L(newChild).parent = this.id;
return newChild;
},
getChildren: function() {
children = [];
for (i in this.labels)
children.push(this.labels[i]);
return children;
},
setState: function(state) {
this.stateStack.unshift(state);
this.repaint();
},
setStateBefore: function(nr) {
if (this.stateStack.length)
this.stateStack = this.stateStack.slice(nr);
this.repaint();
},
getState: function() {
return this.stateStack.length ? this.stateStack[0] : '';
},
onCreate: function() {
return [$E('span')];
}
}


LibJs.Compiler = LibJs.System.createClass();
LibJs.System.extendObject(LibJs.Compiler, {
_instances: {},
_callbacks: [],
loaded: false,
load: function(callback) {
if (this.loaded)
return (callback || (function(){}))();
if (this._callbacks.length == 0) {
LibJs.XWin.openLoading();
LibJs.System.sendAjaxRequest(LibJs.Config.baseDir + 'shr/fetchCompiler', {onComplete: LibJs.System.bind(this, this.__load)});
}
this._callbacks.push(callback || (function(){}));
},
__load: function() {
this.loaded = true;
LibJs.XWin.closeLoading();
for (var i = 0; i < this._callbacks.length; i++)
this._callbacks[i]();
},
getInstance: function(sourceLang, targetLang) {
if (!this.loaded)
throw new LibJs.Exception(new Error(),'compiler is not loaded!');
if (!this._instances[sourceLang])
this._instances[sourceLang] = {};
if (!this._instances[sourceLang][targetLang])
this._instances[sourceLang][targetLang] = new LibJs.Compiler(
new LibJs.Compiler.Parser.Classes[sourceLang](),
new LibJs.Compiler.Serializer.Classes[targetLang]()
);
return this._instances[sourceLang][targetLang];
},
toAscii: function(input) {
var output = '';
for (var pos = 0; pos < (input || '').length; pos++)
if (input.charCodeAt(pos) < 128 && '&#\n\'%'.indexOf(input.charAt(pos)) == -1)
output += input.charAt(pos);
else
output += '#' + input.charCodeAt(pos) + ';';
return output;
},
fromAscii: function(input) {
var output = '';
for (var pos = 0; pos < (input || '').length; pos++)
if (input.length > pos + 1 && input.charAt(pos) == '#' && '1234567890'.indexOf(input.charAt(pos + 1)) > -1) {
var code = 0;
for (pos++; input.length > pos && '1234567890'.indexOf(input.charAt(pos)) > -1; pos++)
code = 10 * code + parseInt(input.charAt(pos));
output += String.fromCharCode(code);
} else
output += input.charAt(pos);
return output.replace(/#lt;/ig, '<').replace(/#gt;/ig, '>');
}
});
LibJs.Compiler.prototype = {
initialize: function(parser, serializer) {
this.parser = parser;
this.serializer = serializer;
},
compile: function(source) {
if (LibJs.Config.Debug.compiler) {
this.parser.parse(source || '').dump(this.serializer);
}
return this.serializer.serialize(this.parser.parse(source || ''));
}
}


LibJs.Admin = {
installedLangs: [],
backupedLangs: []
}


LibJs.Factory.Widget = LibJs.System.createClass();
LibJs.Factory.Widget.prototype = {
initialize: function(widgetId, type, access, permissions, parents, children, variables) {
LibJs.System.extendObject(this, { id: widgetId, type: type, access: access, permissions: permissions, parents: parents, children: children, _variables: variables, varTypes: {} });
LibJs.System.extendObject(this, LibJs.Factory.Widget[type.charAt(0).toUpperCase() + type.substr(1)]);
this.load();
LibJs.Factory.widgets[widgetId] = this;
},
load: function() {},
isAccess: function(mode) {
return (LibJs.user == 'webGod' || this.permissions[mode] == true);
},
setAccess: function(group, rule, access, transaction) {
this.access[group] = this.access[group] || {};
this.access[group][rule] = access;
LibJs.Server.send({ type: 'setAccess', group: group, widgetId: this.id, rule: rule, access: access }, transaction);
for (var i = 0, active = false; i < 6; i++)
active = active || (this.access[group][['r', 'w', 'g', 'a', 'm', 'k'][i]] != 'i');
if (!active)
delete this.access[group];
},
getVariable: function(name) {
return LibJs.Compiler.fromAscii(this._variables[name]);
},
setVariable: function(name, value, transaction) {
if (this._variables[name] != LibJs.Compiler.toAscii(value)) {
this._variables[name] = LibJs.Compiler.toAscii(value);
if (transaction)
LibJs.Server.send({ type: 'save', widgetId: this.id, name: name, value: LibJs.Compiler.toAscii(value) }, transaction);
LibJs.Notify.notify(this.id, 'set');
}
},
getSiblings: function(widgetId) {
var children = [];
for (var index in this.children)
if (LibJs.System.indexOfItem(this.children[index], widgetId) > -1)
return this.children[index];
return [];
},
getAllChildren: function() {
var children = [];
for (var index in this.children)
children = children.concat(this.children[index]);
return children;
},
appendWidget: function(widgetId, transaction) {
for (var index in LibJs.Factory.definitions[this.type].children)
for (var i = 0; i < LibJs.Factory.definitions[this.type].children[index].length; i++)
if (LibJs.Factory.definitions[this.type].children[index][i] == $W(widgetId).type)
var childType = index;
if (LibJs.System.indexOfItem(this.children[childType], widgetId) > -1)
return;
this.children[childType].push(widgetId);
$W(widgetId).parents.push(this.id);
$W(widgetId).permissions = {r: false, w: false, g: false, a: false, m: false, k: false};
for (var i = 0; i < $W(widgetId).parents.length; i++)
for (var j = 0, rules = ['r', 'w', 'g', 'a', 'm', 'k'];  j < rules.length; j++)
if (LibJs.Factory.widgets[$W(widgetId).parents[i]])
$W(widgetId).permissions[rules[j]] = $W(widgetId).permissions[rules[j]] || $W($W(widgetId).parents[i]).permissions[rules[j]];
if (transaction)
LibJs.Server.send({ type: 'connect', parentId: this.id, childId: widgetId }, transaction);
LibJs.Notify.notify(this.id, 'add');
LibJs.Notify.notify(widgetId, 'added');
},
remove: function(childId, transaction) {
$W(childId).parents = LibJs.System.withoutItem($W(childId).parents, this.id);
for (var index in this.children)
this.children[index] = LibJs.System.withoutItem(this.children[index], childId);
$W(childId).permissions = {r: false, w: false, g: false, a: false, m: false, k: false};
for (var i = 0; i < $W(childId).parents.length; i++)
for (var j = 0, rules = ['r', 'w', 'g', 'a', 'm', 'k']; j < rules.length; j++)
if (LibJs.Factory.widgets[$W(childId).parents[i]])
$W(childId).permissions[rules[j]] = $W(childId).permissions[rules[j]] || $W($W(childId).parents[i]).permissions[rules[j]];
if (transaction)
LibJs.Server.send({ type: 'disconnect', parentId: this.id, childId: childId }, transaction);
LibJs.Notify.notify(this.id, 'remove')
LibJs.Notify.notify(childId, 'removed')
},
swap: function(lowerId, upperId, transaction) {
for (var index in this.children)
if (LibJs.System.indexOfItem(this.children[index], lowerId) > -1)
this.children[index] = LibJs.System.swapItems(this.children[index], lowerId, upperId);
LibJs.Server.send({ type: 'swap', parentId: this.id, upperId: upperId, lowerId: lowerId }, transaction);
LibJs.Notify.notify(this.id, 'swap')
LibJs.Notify.notify(lowerId, 'swaped')
LibJs.Notify.notify(upperId, 'swaped')
},
getTitle: function() {
return 'title';
},
getTitleStr: function() {
return this.getVariable(this.getTitle());
}
}


LibJs.Factory.Component = {


}


LibJs.XWin.Component = {
__getOptions: function() {},
getOptions: function() {
options = this.__getOptions() || {};
if (window.innerHeight && window.innerWidth)
options.properties = LibJs.System.extendObject(
{innerWidth: innerWidth, innerHeight: innerHeight, scrollOffset: pageYOffset}, options.properties || {}
);
else if(document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth)
options.properties = LibJs.System.extendObject(
{innerWidth: document.documentElement.clientWidth, innerHeight: document.documentElement.clientHeight, scrollOffset: document.documentElement.scrollTop}, options.properties || {}
);
else
options.properties = LibJs.System.extendObject(
{innerWidth: document.body.offsetWidth, innerHeight: document.body.offsetHeight, scrollOffset: document.body.scrollTop}, options.properties || {}
);
options.states = LibJs.System.extendObject({closed: new LibJs.Event(this.id, { type: 'call', callback: LibJs.System.bind(this, this.onClose)})}, options.states || {});
options.events = (options.events || []).concat([new LibJs.Event(this.id, {type: 'call', callback: LibJs.System.bind(this, this.placeInFront)})]);
return options;
},
placeInFront: function(e) {
if (this.properties.zindex < LibJs.XWin.getWinZ()) {
this.properties.zindex = String(LibJs.XWin.getNextWinZ());
$D(this.id)[0].style.zIndex = this.properties.zindex;
}
},
startMove: function(e) {
this.properties.leftStartOffset = e.pointer()[0] - $D(this.id)[0].offsetLeft;
},
move: function(e) {
var layer = $D(this.id)[0];
this.properties.left = (e.pointer()[0] - this.properties.leftStartOffset);
this.properties.top = (e.pointer()[1] - 8);
layer.style.left = this.properties.left + 'px';
layer.style.top = this.properties.top + 'px';
return false;
},
resize: function(e) {
var layer = $D(this.id)[0];
this.properties.width = Math.max(0, e.pointer()[0] - layer.offsetLeft + 4);
this.properties.heigth = Math.max(0, e.pointer()[1] - layer.offsetTop + 4);
layer.style.width = this.properties.width + 'px';
layer.style.height = this.properties.heigth + 'px';
return false;
},
closeComponent: function() {
this.setState('closed');
LibJs.XWin.remove(this.id);
},
onClose: function() {
return [];
}
}


LibJs.Factory.Widget.Faqsection = {
varTypes: {},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++)
LibJs.Factory.Widget.Faqsection.varTypes['title' + (i + 1)] = { type: 'text' };


LibJs.Factory.Widget.Faqitem = {
varTypes: {},
getTitle: function() {
return 'question' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++) {
LibJs.Factory.Widget.Faqitem.varTypes['question' + (i + 1)] = { type: 'text' };
LibJs.Factory.Widget.Faqitem.varTypes['answer' + (i + 1)] = { type: 'wiki' };
}


LibJs.Factory.Widget.Faq = {
canSetAccess: true,
varTypes: {
title: { type: 'text'}
}
}


LibJs.Factory.Widget.Image = {
varTypes: {
title: { type: 'text'},
description: { type: 'longtext'},
keywords: { type: 'longtext'},
file: { type: 'image'}
},
getUri: function() {
return LibJs.Config.baseDir + 'shr/view/' + this.id + '.' + this.getVariable('ext');
},
getThumbUri: function() {
return LibJs.Config.baseDir + 'shr/view/' + this.id + '.thumb.' + this.getVariable('ext');
}
}


LibJs.Factory.Widget.Gallerywrapper = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Galleryview = {
canSetAccess: true,
varTypes: {
title: { type: 'text' },
columns: { type: 'text' },
gallery: { type: 'selector', store: '.gallery', selectableTypes: ['gallery'], displayTypes: ['gallery'] }
}
}


LibJs.Factory.Widget.Gallery = {
canSetAccess: true,
varTypes: {
title: { type: 'text'},
description: { type: 'longtext'},
keywords: { type: 'longtext'}
}
}


LibJs.Factory.Widget.Notice = {
varTypes: {
title: { type: 'text' },
source: { type: 'wiki' }
}
}


LibJs.Factory.Widget.Gardenwrapper = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Gardenview = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Folder = {
canSetAccess: true,
varTypes: {
title: { type: 'text'},
description: { type: 'longtext'},
keywords: { type: 'longtext'}
}
}


LibJs.Factory.Widget.File = {
varTypes: {
title: { type: 'text'},
description: { type: 'longtext'},
keywords: { type: 'longtext'},
file: { type: 'file'}
},
getUri: function() {
return LibJs.Config.baseDir + 'shr/download/' + this.id + '.' + this.getVariable('ext');
}
}


LibJs.Factory.Widget.Downloaditem = {
varTypes: {},
varTypes: {
filelink: { type: 'selector', store: '.garden', selectableTypes: ['file'], displayTypes: ['folder', 'file'] }
},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++) {
LibJs.Factory.Widget.Downloaditem.varTypes['title' + (i + 1)] = { type: 'text' };
LibJs.Factory.Widget.Downloaditem.varTypes['description' + (i + 1)] = { type: 'longtext' };
}


LibJs.Factory.Widget.Download = {
canSetAccess: true,
varTypes: {},
varTypes: {},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++)
LibJs.Factory.Widget.Downloaditem.varTypes['title' + (i + 1)] = { type: 'text' };


LibJs.Factory.Widget.Linklistitem = {
varTypes: {},
varTypes: {
target: { type: 'text' }
},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++) {
LibJs.Factory.Widget.Linklistitem.varTypes['title' + (i + 1)] = { type: 'text' };
LibJs.Factory.Widget.Linklistitem.varTypes['description' + (i + 1)] = { type: 'longtext' };
}


LibJs.Factory.Widget.Linklist = {
canSetAccess: true,
varTypes: {
title: { type: 'text'}
}
}


LibJs.Factory.Widget.Stat = {
canSetAccess: true,
varTypes: {
title: { type: 'text'}
}
}


LibJs.Factory.Widget.Wiki = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++)
LibJs.Factory.Widget.Wiki.varTypes['source' + (i + 1)] = { type: 'wiki' };


LibJs.Factory.Widget.User = {
varTypes: {
name: { type: 'text' },
email: { type: 'text' },
passwd: { type: 'password' }
},
getTitle: function() {
return 'name';
}
}


LibJs.Factory.Widget.Redirect = {
varTypes: {
location: { type: 'text'},
target: { type: 'text'}
},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++)
LibJs.Factory.Widget.Redirect.varTypes['title' + (i + 1)] = { type: 'text' };


LibJs.Factory.Widget.Pagewrapper = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Page = {
canSetAccess: true,
varTypes: {},
getTitle: function() {
return 'title' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1);
}
}
for (var i = 0; i < LibJs.Config.lang.length; i++)
LibJs.Factory.Widget.Page.varTypes['title' + (i + 1)] = { type: 'text' };


LibJs.Factory.Widget.Nav = {
canSetAccess: true,
varTypes: {
title: { type: 'text' },
startlevel: { type: 'text' },
endlevel: { type: 'text' }
}
}


LibJs.Factory.Widget.Langmanager = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Group = {
canSetAccess: true,
varTypes: {
name: { type: 'text' }
},
getTitle: function() {
return 'name';
}
}


LibJs.Factory.Widget.Frame = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}


LibJs.Factory.Widget.Col = {
canSetAccess: true,
varTypes: {
title: { type: 'text'},
width: { type: 'text'}
}
}


LibJs.Factory.Widget.Authwrapper = {
canSetAccess: true,
varTypes: {
title: { type: 'text' }
}
}
LibJs.Lang.__setText('system', {'Die gesuchte Seite existiert nicht.':{en:'The requested page does not exist.',de:'Die gesuchte Seite existiert nicht.'},'Zurueck':{en:'back',de:'Zur#252;ck'}});
LibJs.Lang.__setText('xwin', {});
LibJs.Lang.__setText('visitor', {});
LibJs.Lang.__setText('server', {});
LibJs.Lang.__setText('notify', {});
LibJs.Lang.__setText('lang', {});
LibJs.Lang.__setText('factory', {});
LibJs.Lang.__setText('exception', {});
LibJs.Lang.__setText('event', {});
LibJs.Lang.__setText('deamon', {});
LibJs.Lang.__setText('config', {});
LibJs.Lang.__setText('component', {'apply':{de:'#220;bernehmen',en:'apply'},'back':{de:'Zur#252;ck',en:'back'},'cancel':{de:'Abbrechen',en:'cancel'},'close':{de:'Schliessen',en:'close'},'loading':{de:'Laden',en:'loading'},'no':{de:'Nein',en:'no'},'save':{de:'Speichern',en:'save'},'yes':{de:'Ja',en:'yes'}});
LibJs.Lang.__setText('compiler', {});
LibJs.Lang.__setText('admin', {'admin_area':{de:'Administrationsoberfl#228;che',en:'admin area'},'export':{de:'Export',en:'export'},'export_data':{de:'Datenexport',en:'export data'},'export_languages':{de:'Sprachenexport',en:'export languages'},'general':{de:'Allgemein',en:'general'},'import':{de:'Import',en:'import'},'import_languages':{de:'Sprachenimport',en:'import languages'},'link_dyn':{de:'Dynamischer Client (dyn)',en:'dynamic client (dyn)'},'link_xsl':{de:'Statischer Client (xsl)',en:'static client (xsl)'},'manage_languages':{de:'Sprachenverwaltung',en:'manage languages'},'manage_stores':{de:'Storeverwaltung',en:'manage stores'},'prefix':{de:'Prefix',en:'prefix'}});
LibJs.Lang.__setText('widget', {});
LibJs.Lang.__setText('faqsection', {});
LibJs.Lang.__setText('faqitem', {});
LibJs.Lang.__setText('faq', {});
LibJs.Lang.__setText('image', {});
LibJs.Lang.__setText('gallerywrapper', {'upload_images':{},'dimensions':{de:'Dimensionen',en:'dimensions'},'edit':{de:'Bearbeite',en:'edit'},'k':{de:'kb',en:'kb'},'lastmodified':{de:'Zu letzt bearbeitet',en:'last modified'},'mime-type':{de:'Mime-Typ',en:'mime-type'},'size':{de:'Gr#246;sse',en:'size'},'view':{de:'Ansicht',en:'view'}});
LibJs.Lang.__setText('galleryview', {'go_last':{},'overview':{},'go_next':{}});
LibJs.Lang.__setText('gallery', {});
LibJs.Lang.__setText('notice', {});
LibJs.Lang.__setText('gardenwrapper', {'download':{de:'Download',en:'download'},'edit':{de:'Bearbeite',en:'edit'}});
LibJs.Lang.__setText('gardenview', {});
LibJs.Lang.__setText('folder', {});
LibJs.Lang.__setText('file', {});
LibJs.Lang.__setText('downloaditem', {});
LibJs.Lang.__setText('download', {});
LibJs.Lang.__setText('linklistitem', {});
LibJs.Lang.__setText('linklist', {});
LibJs.Lang.__setText('stat', {'activated':{de:'Aktiviert',en:'activated'},'browser':{de:'Browser',en:'browser'},'color':{de:'Farbe',en:'color'},'days_counted':{de:'Gez#228;hlte Tage',en:'counted days'},'deactivated':{de:'Deaktiviert',en:'deactiviert'},'friday':{de:'Freitag',en:'friday'},'general_stats':{de:'Allgemeine Statistik',en:'general statistic'},'guest':{de:'Gast',en:'guest'},'hits_per_day':{de:'Hits pro Tag',en:'hits per day'},'hits_today':{de:'Hits Heute',en:'hits today'},'hits_total':{de:'Hits Total',en:'hits total'},'hours':{de:'Stunden',en:'hours'},'java':{de:'Java',en:'java'},'javascript':{de:'JavaScript',en:'javascript'},'lastmonth':{de:'Letzter Monat',en:'lastmonth'},'monday':{de:'Montag',en:'monday'},'operating_system':{de:'Betriebssystem',en:'operating system'},'page':{de:'Seite',en:'page'},'saturday':{de:'Samstag',en:'saturday'},'screen_resolution':{de:'Bildschirmaufl#246;sung',en:'screen resolution'},'sunday':{de:'Sonntag',en:'sunday'},'thursday':{de:'Donnerstag',en:'thursday'},'tuesday':{de:'Dienstag',en:'tuesday'},'user':{de:'Benutzer',en:'user'},'wednesday':{de:'Mittwoch',en:'wednesday'},'weekdays':{de:'Wochentage',en:'weekdays'}});
LibJs.Lang.__setText('wiki', {});
LibJs.Lang.__setText('user', {});
LibJs.Lang.__setText('redirect', {});
LibJs.Lang.__setText('pagewrapper', {'edit':{de:'Bearbeite',en:'edit'},'view':{de:'Ansicht',en:'view'}});
LibJs.Lang.__setText('page', {});
LibJs.Lang.__setText('nav', {});
LibJs.Lang.__setText('langmanager', {'window Bearbeiten':{en:'',de:''},'editortree Bearbeiten':{en:'edit editortree',de:''},'loading Bearbeiten':{en:'',de:''},'login Bearbeiten':{en:'edit login',de:''},'bindchildren Bearbeiten':{en:'edit bindchildren',de:''},'accessmanager Bearbeiten':{en:'edit accessmanager',de:'Zugrifssverwaltung bearbeiten'},'editorwidget Bearbeiten':{en:'edit editorwiki',de:''},'tooltip Bearbeiten':{en:'edit tooltip',de:''},'manager Bearbeiten':{en:'edit manager',de:''},'profile Bearbeiten':{en:'',de:''},'register Bearbeiten':{en:'',de:''},'loginwin Bearbeiten':{en:'',de:''},'wrapper Bearbeiten':{en:'edit wrapper',de:''},'tabarea Bearbeiten':{en:'edit tabarea',de:''},'newpasswd Bearbeiten':{en:'edit newpasswd',de:''},'bindwiki Bearbeiten':{en:'edit bindwiki',de:''},'langmanager Bearbeiten':{en:'edit langmanager',de:''},'edit':{de:'',en:'edit'},'langmanager':{de:'',en:'langmanager'},'lang_de':{de:'',en:'lang_de'},'lang_en':{de:'',en:'lang_en'},'string':{de:'',en:'string'}});
LibJs.Lang.__setText('group', {});
LibJs.Lang.__setText('frame', {});
LibJs.Lang.__setText('col', {});
LibJs.Lang.__setText('authwrapper', {'permissions_set':{},'userlist':{},'name':{},'email':{}});



LibJs.Visitor.Body = {

getMenuNr: function() {
return 1;
},

getMenu: function() {
return [$C('menu', {widgetId: $L(this.id).active, properties: { type: 'list' }})];
},

getViewer: function() {
return $C('extend', {widgetId: $L(this.id).active, properties: { extend: LibJs.Component.Body.Viewer }});
},

getPageTitle: function() {
return $W($L(this.id).active).getVariable($W($L(this.id).active).getTitle());
},

onCreate: function() {
return [
$E('div', { children: [
$E('div', { className: 'uruluHeader', children: [
$E('img', { attributes: {src: LibJs.Config.baseDir + 'shr/img/design/urulu_logo.png'}})
]}),
$E('div', { className: 'uruluMenue', children: [
$E('div', { className: 'uruluMenueLeft', children: $D($L(this.id).labels.login)}),
$E('div', { className: 'uruluMenueRight', children: $D($L(this.id).labels.langSwitch).concat([
$E('img', { attributes: {src: LibJs.Config.baseDir + 'shr/img/design/spacer.gif'}})
])})
]}),
$E('div', {className: 'uruluBody', children: [
$E('table', {attributes: {width: '100%', cellSpacing: '0', cellPadding: '0'}, children: [
$E('tbody', {children: [
$E('tr', {children: [
$E('td', {className: 'uruluBodyMenue', attributes: {width: '180px', vAlign: 'top'}, children: $D($L(this.id).labels.menu0)}),
$E('td', {className: 'uruluBodyContent', attributes: {vAlign: 'top'}, children: $D($L(this.id).labels.body)})
]})
]})
]})
]}),
$E('div', {className: 'uruluFooter', children: [
$T('powered by '),
$E('a', { attributes: { href: 'http://www.urulu.org', target:'_blank' }, children: [
$T('urulu.org')
]})
]})
]})
];
}
}


LibJs.Component.Body = {
getOptions: function() {
var labels = { langSwitch: $C('element'), login: $C('element'), body: $C('element') };
for (var i = 0; i < this.visitor.getMenuNr(); ++i)
labels['menu' + i] = $C('element');
return {
labels: labels,
properties: { manageId: '' }
};
},
reload: function() {
this.render(this.active);
},
render: function(widgetId) {
LibJs.XWin.openLoading();
LibJs.XWin.closeAll([this.properties.manageId]);
this.active = widgetId;
var transaction = LibJs.Server.start();
LibJs.Factory.useWidget(widgetId, transaction);
LibJs.Factory.useWidgetChildren(widgetId, transaction);
LibJs.Server.commit(transaction, LibJs.System.bind(this, this.__render));
},
__render: function() {
LibJs.XWin.closeLoading();
document.title = this.visitor.getPageTitle();
this.setLabel('langSwitch', $C('langswitch'));
for (var i = 0, menus = this.visitor.getMenu(); i < menus.length; i++)
this.setLabel('menu' + i, menus[i]);
this.setLabel('login', $C('login', {widgetId: this.active }));
this.setLabel('body', this.visitor.getViewer());
this.repaint();
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'stat') > -1) {
var transaction = LibJs.Server.start();
LibJs.Server.send({
type: 'registerstat',
screenWidth: screen.width,
screenHeight: screen.height,
java: navigator.javaEnabled(),
color: (screen.colorDepth ? screen.colorDepth : screen.pixelDepth),
page: this.active
}, transaction);
LibJs.Server.commit(transaction, null, null, 'statprt/js');
}
},
openManager: function() {
var stores = [
{store: LibJs.Config.domainName, title: 'webpage', component: 'pagewrapper'},
{store: '.auth', title: 'users', component: 'authwrapper'}
];
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'gallery') > -1)
stores.push({store: '.gallery', title: 'images', component: 'gallerywrapper'});
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'garden') > -1)
stores.push({store: '.garden', title: 'files', component: 'gardenwrapper'});
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'events') > -1)
stores.push({store: '.events', title: 'events', component: 'eventwrapper'});
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'etat') > -1)
stores.push({store: '.etat', title: 'etat', component: 'etatwrapper'})
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'crm') > -1)
stores.push({store: '.crm', title: 'crm', component: 'crmwrapper'})
if (LibJs.System.indexOfItem(LibJs.Config.modules, 'ball') > -1)
stores.push({store: '.ball', title: 'ball', component: 'ballwrapper'})
this.properties.manageId = LibJs.XWin.openWindow({
labels: { body: $C('manager', { properties: { stores: stores }})},
properties: { title: $S(this.S(), 'manage_title') }
});
},
onCreate: function() {
return this.visitor.onCreate();
}
}

LibJs.Component.Body.Viewer = {
__getOptions: function() {
return { labels: { body: $C('viewer', {widgetId: this.widgetId })}};
},
onCreate: function() {
return [$E('div', { className: 'uruluBodyContent', children: $D(this.labels.body)})];
}
}
LibJs.Lang.__setText('body', {'manage_title':{de:'Verwaltung',en:'management'}});



LibJs.Component.Menu = {
getOptions: function() {
return {properties: { hasNotify: [] }};
},
loaded: function() {
var transaction = LibJs.Server.start();
LibJs.Factory.useWidgetAncestors(this.widgetId, transaction);
LibJs.Server.commit(transaction, LibJs.System.bind(this, this.render));
},
render: function() {
ancestors = [];
for (var parents = [this.widgetId]; parents.length > 0; parents = $W(parents[0]).parents)
if ($W(parents[0]).type == 'page' || $W(parents[0]).type == 'redirect')
ancestors.unshift(parents[0]);
this.properties.start = this.properties.start || 1;
this.properties.end = Math.min(this.properties.end || ancestors.length, ancestors.length);
var transaction = LibJs.Server.start();
if (this.properties.start - 1 < ancestors.length) {
this.properties.ancestors = ancestors.slice(this.properties.start - 1, this.properties.end);
for (var i = 0; i < this.properties.ancestors.length; i++)
LibJs.Factory.useWidgetChildren(this.properties.ancestors[i], transaction);
}
LibJs.Server.commit(transaction, LibJs.System.bind(this, this.__render));
},
__render: function() {
this.setState('created');
},
getItem: function(level) {
for (var i = 0 , items = [], children = $W(this.properties.ancestors[level]).children['pages']; i < children.length; i++) {
if ($W(children[i]).type == 'page')
items.push($E(this.properties.type == 'table' ? 'td' : 'li', { children: ([
$E('div', { className: 'LibJsComponentMenuBodyItem' + ( LibJs.XWin.getActivePage() == children[i] ? 'Selected' : '' ), children: [
$E('a', { children: [$T($W(children[i]).getTitleStr())], attributes: {href: '#' + children[i]}})
]})
]).concat(children[i] == this.properties.ancestors[level + 1] && level + 1 < this.properties.ancestors.length ? this.getItem(level + 1) : [])}));
else {
var attributes = { href: $W(children[i]).getVariable('location') };
if ($W(children[i]).getVariable('target'))
attributes.target = $W(children[i]).getVariable('target');
items.push($E(this.properties.type == 'table' ? 'td' : 'li', { children: ([
$E('div', { className: 'LibJsComponentMenuBodyItem', children: [
$E('a', { children: [ $T($W(children[i]).getTitleStr()) ], attributes: attributes})
]})
])}));
}
if (typeof this.properties.hasNotify[children[i]] == 'undefined') {
this.properties.hasNotify[children[i]] = true;
LibJs.Notify.observeAll(this.id, children[i], LibJs.System.bind(this, this.setState, 'created'));
}
}
if (this.properties.type == 'table')
return [$E('table', { attributes: {cellPadding: '0', cellSpacing: '0'}, className: 'LibJsComponentMenuHeader', children: [
$E('tbody', { children:[$E('tr', { className: 'LibJsComponentMenuBodyLayer' + (this.properties.start + level), children: items })]})
]})];
else
return [$E('ul', { className: 'LibJsComponentMenuBodyLayer' + (this.properties.start + level), children: items })];
},
onCreate: function() {
if (this.properties.ancestors) {
var dom = this.getItem(0);
if (typeof this.properties.hasNotify[this.properties.ancestors[0]] == 'undefined') {
this.properties.hasNotify[this.properties.ancestors[0]] = true;
LibJs.Notify.observeAll(this.id, this.properties.ancestors[0], LibJs.System.bind(this, this.setState, 'created'));
}
} else
var dom = [$E('div')];
return dom;
}
}
LibJs.Lang.__setText('menu', {});


LibJs.Component.Login = {
getOptions: function() {
if (LibJs.user == 'nobody')
LibJs.System.extendObject(this, LibJs.Component.Login.Login);
else
LibJs.System.extendObject(this, LibJs.Component.Login.Logout);
return this.__getOptions();
}
}

LibJs.Component.Login.Login = {
__getOptions: function() {
return { labels: {
login: $C('hyperlink', {properties: { type: 'link', title: $S(this.S(), 'login'), name: 'login'}}),
register: $C('hyperlink', {properties: { type: 'link', title: $S(this.S(), 'register'), name: 'register'}}),
newpasswd: $C('hyperlink', {properties: { type: 'link', title: $S(this.S(), 'lost_password'), name: 'newPasswd'}})
}};
},
loaded: function() {
if (/^#OL/i.exec(location.hash)) {
location.href = '#';
this.login();
}
},
login: function() {
LibJs.XWin.openWindow({
labels: { body: $C('loginwin')},
properties: { title: $S(this.S(), 'login') }
})
},
register: function() {
LibJs.XWin.openWindow({
labels: { body: $C('register')},
properties: { title: $S(this.S(), 'register') }
})
},
newPasswd: function() {
LibJs.XWin.openWindow({
labels: { body: $C('newpasswd')},
properties: { title: $S(this.S(), 'set_new_passwd') }
})
},
onCreate: function() {
return [$E('div', { className: 'LibJsComponentLoginLogin', children: [$E('div', { children: this.getLabelsDomSet(['login', 'register', 'newpasswd'])})]})];
}
}

LibJs.Component.Login.Logout = {
__getOptions: function() {
if (LibJs.user == 'webGod')
var admin = $C('element', {
properties: { name: 'a', attributes: { href: '../../adm/html/adm.html', target: '_blank' }},
children: [ $C('text', {properties: {value: $S(this.S(), 'admin_panel')}}) ]
});
else
var admin = $C('element');
return {
labels: {
logout: $C('hyperlink', {properties: { type: 'link', title: $W(LibJs.user).getTitleStr() + ' ' + $S(this.S(), 'logout'), name: 'logout'}}),
profile: $C('hyperlink', {properties: { type: 'link', title: $S(this.S(), 'profile'), name: 'profile'}}),
manage: $C('hyperlink', {properties: { type: 'link', title: $S(this.S(), 'manage_pages'), name: 'openManager'}}),
admin: admin
}
};
},
loaded: function() {
var transaction = LibJs.Server.start();
LibJs.Server.send({ type: 'noop' }, transaction);
LibJs.Server.commit(transaction, function(){}, function(){}, 'shr/aggregate/manage');
},
logout: function() {
LibJs.System.extendObject(LibJs.Factory, {roots: {}, widgets: {}, queries: {}, logs: {}});
var transaction = LibJs.Server.start();
LibJs.Server.send({ type: 'logout' }, transaction);
LibJs.Server.commit(transaction, LibJs.System.bind(LibJs.XWin, LibJs.XWin.reload));
},
profile: function() {
LibJs.XWin.openWindow({
labels: { body: $C('profile')},
properties: { title: $S(this.S(), 'profile') }
})
},
onCreate: function() {
return [$E('div', {className: 'LibJsComponentLoginLogout', children: this.getLabelsDomSet(['logout', 'profile', 'manage', 'admin'])})];
}
}
LibJs.Lang.__setText('login', {'Anmelden':{en:'login',de:'Anmelden'},'Registrieren':{en:'register',de:'Registrieren'},'Abmelden':{en:'logout',de:'Abmelden'},'Profil':{en:'profile',de:'Profil'},'Seite verwalten':{en:'admin',de:'Verwaltung'},'Verwaltung schliessen':{en:'close admin',de:'Verwaltung schliessen'},' Abmelden':{en:'logout',de:'Abmelden'},'Passwort vergessen':{en:'lost password',de:'Passwort vergessen'},'Neues Passwort Setzen':{en:'set new password',de:'Neues Passwort setzen'},'admin_panel':{de:'Administrationsoberfl#228;che',en:'admin panel'},'login':{de:'Anmelden',en:'login'},'logout':{de:'Abmelden',en:'logout'},'lost_password':{de:'Passwort vergessen?',en:'lost password?'},'manage_pages':{de:'Seitenverwaltung',en:'manage pages'},'profile':{de:'Profil',en:'profile'},'register':{de:'Registrierung',en:'register'},'set_new_passwd':{de:'Neues Passwort setzen',en:'set new password'}});



LibJs.Component.Langswitch = {
getOptions: function() {
var labels = {};
if (LibJs.Config.lang.length > 1)
for (var i = 0; i < LibJs.Config.lang.length; ++i)
labels[LibJs.Config.lang[i]] = $C('icon', {
properties: {src: 'buttons/' + LibJs.Config.lang[i] + '.gif'},
events: [new LibJs.Event(this.id, {type: 'call', callback: LibJs.System.bind(this, function(index){
LibJs.Lang.code = LibJs.Config.lang[index];
LibJs.XWin.reload();
}, i)})]
});
else
labels[LibJs.Config.defaultLang] = $C('element');
return { labels: labels };
},
onCreate: function() {
return [$E('div', { className: 'LibJsComponentLangswitch', children: this.getLabelsDomSet(LibJs.Config.lang)})];
}
}
LibJs.Lang.__setText('langswitch', {});



LibJs.Component.Extend = {
getOptions: function() {
LibJs.System.extendObject(this, this.properties.extend);
return this.__getOptions();
},
__getOptions: function() {},
S: function() {
return $L(this.parent).S();
}
}
LibJs.Lang.__setText('extend', {});



LibJs.Component.Viewer = {
getOptions: function() {
return { labels: { body: $F($W(this.widgetId).type, { widgetId: this.widgetId })}};
},
onCreate: function() {
return [$E(this.properties.name || 'div', { attributes: this.properties.attributes || {}, children: $D(this.labels.body)})];
}
}
LibJs.Lang.__setText('viewer', {});


LibJs.Visitor.Bindchildren = {

getCreator: function(widgetId) {
return $C($L(this.id).properties.creator, { widgetId: widgetId, properties: $L(this.id).properties.creatorProperties || {}});
}
}



LibJs.Component.Bindchildren = {
getOptions: function() {
return {
states: { rendered: new LibJs.Event(this.id, {type: 'call', callback: LibJs.System.bind(this, this.onRender)})},
properties: { name: this.properties.name || 'div' }
};
},
loaded: function() {
LibJs.Notify.observe(this.id, this.widgetId, LibJs.System.bind(this, this.render), 'add');
LibJs.Notify.observe(this.id, this.widgetId, LibJs.System.bind(this, this.render), 'remove');
LibJs.Notify.observe(this.id, this.widgetId, LibJs.System.bind(this, this.render), 'swap');
var transaction = LibJs.Server.start();
LibJs.Factory.useWidgetChildren(this.widgetId, transaction);
LibJs.Server.commit(transaction, LibJs.System.bind(this, this.render));
},
render: function() {
for (var i = 0, map = {}, children = this.getChildren(); i < children.length; i++) {
if (typeof map[$L(children[i]).widgetId] == 'undefined')
map[$L(children[i]).widgetId] = [];
map[$L(children[i]).widgetId].push(children[i]);
delete this.labels[children[i]];
}
for (var i = 0, children = $W(this.widgetId).getAllChildren(); i < children.length; i++)
if (!this.properties.types || LibJs.System.indexOfItem(this.properties.types, $W(children[i]).type) > -1) {
if (typeof map[children[i]] != 'undefined')
var nodeId = map[children[i]].shift();
else
var nodeId = this.visitor.getCreator(children[i]);
this.setLabel(nodeId, nodeId);
}
for (var index in map)
for (var i = 0; i < map[index].length; i++)
LibJs.remove(map[index][i]);
this.setState('rendered');
},
onCreate: function() {
return [$E('div', { children: [ $E('img', { attributes: { src: LibJs.Config.baseDir + 'shr/img/buttons/loading.gif' }}), $T(' ' + $S('component', 'loading'))]})];
},
onRender: function() {
return [$E(this.properties.name, { children: this.getLabelsDomSet(this.getChildren())})];
}
}
LibJs.Lang.__setText('bindchildren', {' Laden':{en:'Loading',de:'Laden'}});



LibJs.Component.Bindwiki = {
getOptions: function() {
if ($W(this.widgetId).isAccess('w'))
return {
events: [new LibJs.Event(this.id, {event: 'dblclick', type: 'call', callback: LibJs.System.bind(this, this.openEditor)})],
states: { editing: new LibJs.Event(this.id, {type: 'call', callback: LibJs.System.bind(this, this.onEdit)})}
};
},
loaded: function() {
LibJs.Notify.observe(this.id, this.widgetId, LibJs.System.bind(this, this.render), 'set');
this.render();
},
render: function() {
if (LibJs.Compiler.loaded)
this.__render(LibJs.Compiler.getInstance('xml', 'htmldom').compile($W(this.widgetId).getVariable(this.properties.variable)));
else {
var transaction = LibJs.Server.start();
LibJs.Server.send({ type: 'compiletohtml', stringCallback: '$L(\'' + this.id + '\').__render', widgetId: this.widgetId, variable: this.properties.variable}, transaction);
LibJs.Server.commit(transaction);
}
},
__render: function(domSet) {
this.properties.domSet = domSet;
this.setState('created');
},
openEditor: function() {
if (this.getState() != 'editing') {
this.setLabel('editor', $C('editorwiki', {
widgetId: this.widgetId,
visitor: { bindId: this.id, closeEditor: function () { $L(this.bindId).close() } },
properties: { variable: this.properties.variable, showButtons: true }
}));
this.setState('editing');
}
},
close: function() {
this.properties.domSet = LibJs.Compiler.getInstance('xml', 'htmldom').compile($W(this.widgetId).getVariable(this.properties.variable));
this.setState('created');
},
onEdit: function() {
return [$E('div', { children: $D(this.labels.editor)})];
},
onCreate: function() {
if (typeof this.properties.domSet != 'undefined' && this.properties.domSet.length == 0)
this.properties.domSet = [$E('div', {className: 'LibJsComponentBindwikiNotext', children: [$T($S(this.S(), 'no_text_available'))]})];
//this.properties.domSet = [$T($S(this.S(), 'no_text_available'))];
return [$E('div', { className: this.properties.className || '', children: this.properties.domSet || [$T($S('component', 'loading'))] })];
}
}
LibJs.Lang.__setText('bindwiki', {'Laden ...':{en:'Loading ...',de:'Laden ...'},'no_text_available':{}});



LibJs.Component.Element = {
onCreate: function() {
return [$E(this.properties.name || 'div', {
className: this.properties.className || '',
attributes: this.properties.attributes || {},
style: this.properties.style || {},
children: this.getLabelsDomSet(this.getChildren())})];
}
}
LibJs.Lang.__setText('element', {});


LibJs.Visitor.Hyperlink = {

getEvents: function() {
return [new LibJs.Event(this.id, {type: 'ancestors', name: $L(this.id).properties.name, arguments: $L(this.id).properties.arguments})];
}
}



LibJs.Component.Hyperlink = {
getOptions: function() {
return { events: this.visitor.getEvents() };
},
onCreate: function() {
if (this.properties.type == 'link')
return [$E('a', {
className: this.properties.className || 'LibJsComponentHyperlinkLink',
children: (this.properties.element ? $D(this.properties.element) : []).concat([
$T(this.properties.title)
])
})];
else
return [$E('input', {
className: this.properties.className || 'LibJsComponentHyperlinkButton',
attributes: { type: 'button', value: this.properties.title }
})];
}
};
LibJs.Lang.__setText('hyperlink', {});



LibJs.Component.Text = {
onCreate: function() {
if (this.properties.plain)
return $T(this.properties.value || '');
else
return [$E(this.properties.tag || 'span', {
className: this.properties.className || 'LibJsComponentText',
style: this.properties.style || {},
children: [$T(this.properties.value || '')]
})];
}
}
LibJs.Lang.__setText('text', {});


LibJs.Factory.Component.Page = {
getOptions: function() {
return { labels: { body: $C('bindchildren', { widgetId: this.widgetId, properties: {types: ['frame'], creator: 'viewer'}})}};
},
onCreate: function() {
return [$E('div', { className: 'LibJsComponentPage', children: $D(this.labels.body)})];
}
}
LibJs.Lang.__setText('page', {});


LibJs.Factory.Component.Frame = {
getOptions: function() {
return { labels: { body: $C('bindchildren', {
widgetId: this.widgetId,
visitor: { getCreator: function(widgetId) {
return $C($L(this.id).properties.creator, { widgetId: widgetId, properties: { name: 'td', attributes: { vAlign: 'top', width: $W(widgetId).getVariable('width') }}})
}},
properties: {name: 'tr', creator: 'viewer'}
})}};
},
onCreate: function() {
return [$E('table', { className: 'LibJsComponentFrame', children: [$E('tbody', { children: $D(this.labels.body)})]})];
}
}
LibJs.Lang.__setText('frame', {});


LibJs.Factory.Component.Col = {
getOptions: function() {
return { labels: { body: $C('bindchildren', { widgetId: this.widgetId, properties: {
type: 'children',
creator: 'viewer'
}})}};
},
onCreate: function() {
return [$E('div', { className: 'LibJsComponentCol', children: $D(this.labels.body)})];
}
}
LibJs.Lang.__setText('col', {});


LibJs.Factory.Component.Wiki = {
getOptions: function() {
return { labels: { body: $C('bindwiki', { widgetId: this.widgetId, properties: {
variable: 'source' + (LibJs.System.indexOfItem(LibJs.Config.lang, LibJs.Lang.code) + 1)
}})}};
},
onCreate: function() {
return [$E('div', { className: 'LibJsComponentWiki', children: $D(this.labels.body)})];
}
}
LibJs.Lang.__setText('wiki', {});



LibJs.XWin.Component.Loading = LibJs.System.extendObject(LibJs.System.cloneObject(LibJs.XWin.Component), {
__getOptions: function() {
return { properties: { zindex: String(LibJs.XWin.getNextWinZ()) }};
},
onCreate: function() {
return [$E('div', {
className: 'LibJsComponentLoading',
style: {
zIndex: this.properties.zindex,
top: (Math.round(this.properties.innerHeight / 2 - 50) + this.properties.scrollOffset) + 'px',
left: Math.round(this.properties.innerWidth / 2 - 100) + 'px'
},
children: [
$E('img', { attributes: { src: LibJs.Config.baseDir + 'shr/img/buttons/loading.gif' }}),
$E('div', { children: [$T(' ' + $S('component', 'loading'))]})
]
})];
}
});
LibJs.Lang.__setText('loading', {' Laden ...':{de:'Loading',en:' Laden ...'}});
0
