rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this, arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
|
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,f=this.headers.index(a.target),g=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:g=this.headers[(f+1)%d];break;case b.LEFT:case b.UP:g=this.headers[(f-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
|
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
|
ORBEON.util.Dom.addClass(parentSpan, "xforms-selected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-deselected");
|
YAHOO.util.Dom.addClass(parentSpan, "xforms-selected"); YAHOO.util.Dom.removeClass(parentSpan, "xforms-deselected");
|
_setRadioCheckboxClasses: function(target) { // Update xforms-selected/xforms-deselected classes on the parent <span> element var checkboxInputs = target.getElementsByTagName("input"); for (var checkboxInputIndex = 0; checkboxInputIndex < checkboxInputs.length; checkboxInputIndex++) { var checkboxInput = checkboxInputs[checkboxInputIndex]; var parentSpan = checkboxInput.parentNode.parentNode; if (checkboxInput.checked) { ORBEON.util.Dom.addClass(parentSpan, "xforms-selected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-deselected"); } else { ORBEON.util.Dom.addClass(parentSpan, "xforms-deselected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-selected"); } } },
|
ORBEON.util.Dom.addClass(parentSpan, "xforms-deselected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-selected");
|
YAHOO.util.Dom.addClass(parentSpan, "xforms-deselected"); YAHOO.util.Dom.removeClass(parentSpan, "xforms-selected");
|
_setRadioCheckboxClasses: function(target) { // Update xforms-selected/xforms-deselected classes on the parent <span> element var checkboxInputs = target.getElementsByTagName("input"); for (var checkboxInputIndex = 0; checkboxInputIndex < checkboxInputs.length; checkboxInputIndex++) { var checkboxInput = checkboxInputs[checkboxInputIndex]; var parentSpan = checkboxInput.parentNode.parentNode; if (checkboxInput.checked) { ORBEON.util.Dom.addClass(parentSpan, "xforms-selected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-deselected"); } else { ORBEON.util.Dom.addClass(parentSpan, "xforms-deselected"); ORBEON.util.Dom.removeClass(parentSpan, "xforms-selected"); } } },
|
currentTooltip.destroy(); tooltipForControl[control.id] = true;
|
currentTooltip.cfg.setProperty("disabled", true);
|
_setTooltipMessage: function(control, message, tooltipForControl) { // If we have a YUI tooltip for this control, update the tooltip var currentTooltip = tooltipForControl[control.id]; if (currentTooltip) { if (currentTooltip == true) { // Message used to be empty: we didn't create a YUI tooltip if (message != "") { // Now there is a message: set to null so we'll create the YUI tooltip on mouseover tooltipForControl[control.id] = null; } } else { // Message used not to be empty: we had a YUI tooltip if (message == "") { // We don't the tooltip anymore currentTooltip.destroy(); tooltipForControl[control.id] = true; } else { // Update the tooltip message currentTooltip.cfg.setProperty("text", message); } } } },
|
currentTooltip.cfg.setProperty("disabled", false);
|
_setTooltipMessage: function(control, message, tooltipForControl) { // If we have a YUI tooltip for this control, update the tooltip var currentTooltip = tooltipForControl[control.id]; if (currentTooltip) { if (currentTooltip == true) { // Message used to be empty: we didn't create a YUI tooltip if (message != "") { // Now there is a message: set to null so we'll create the YUI tooltip on mouseover tooltipForControl[control.id] = null; } } else { // Message used not to be empty: we had a YUI tooltip if (message == "") { // We don't the tooltip anymore currentTooltip.destroy(); tooltipForControl[control.id] = true; } else { // Update the tooltip message currentTooltip.cfg.setProperty("text", message); } } } },
|
|
this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) {
|
this._itemChannelHandler = bind(this, function(key, mutationBytes) {
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json)
|
this.sendFrame('FIN_EVENT_MUTATION', mutationInfo.json)
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName)
|
var type = args.type, key = args.key
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler)
|
logger.log("Subscribe redis channel:", key) this._redisClient.subscribeTo(key, this._itemChannelHandler)
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
if (args.snapshot === false) { return } this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) }))
|
if (args.snapshot != false) { this.server.retrieveStateMutation(key, type, bind(this, function(mutation) { this.sendFrame('FIN_EVENT_MUTATION', JSON.stringify(mutation)) })) }
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel)
|
this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(key) { this._redisClient.unsubscribeFrom(key)
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) }))
|
this.handleRequest('FIN_REQUEST_MONITOR_QUERY', bind(this, function(queryJSON) { this.server.monitorQuery(queryJSON)
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){
|
this.handleRequest('FIN_REQUEST_MUTATE', bind(this, function(mutation){
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName) logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.snapshot === false) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
channel = shared.keys.getItemPropertyChannel(itemId, propName),
|
channel = shared.keys.getItemPropertyChannel(itemId, propName)
|
this._setupHandlers = function() { this._queryChannelHandler = bind(this, function(channelBytes, messageBytes) { var message = messageBytes.toString() if (!this._clientConnected) { logger.warn("Received query mutation event even though redis client is closed", message) return; } this.sendFrame('FIN_EVENT_QUERY_MUTATED', message) }) this._itemChannelHandler = bind(this, function(channel, mutationBytes) { var mutationInfo = shared.mutations.parseMutationBytes(mutationBytes) if (mutationInfo.originId == this._id) { return } if (!this._clientConnected) { logger.warn("Received item mutation event even though redis client is closed", mutationInfo.json) return } this.sendFrame('FIN_EVENT_ITEM_MUTATED', mutationInfo.json) }) this.handleRequest('FIN_REQUEST_OBSERVE', bind(this, function(args) { var itemId = args.id, propName = args.prop, channel = shared.keys.getItemPropertyChannel(itemId, propName), logger.log("Subcribe to item channel", channel) this._redisClient.subscribeTo(channel, this._itemChannelHandler) if (args.mute) { return } // fake an item mutation event this.server.getItemProperty(itemId, propName, bind(this, function(value, key) { var mutation = { op: 'set', id: itemId, prop: propName, args: [value] } this.sendFrame('FIN_EVENT_ITEM_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_UNSUBSCRIBE', bind(this, function(channel) { this._redisClient.unsubscribeFrom(channel) })) this.handleRequest('FIN_REQUEST_QUERY', bind(this, function(queryJSON) { var channel = shared.keys.getQueryChannel(queryJSON) this._redisClient.subscribeTo(channel, this._queryChannelHandler) this.server.getQuerySet(queryJSON, bind(this, function(membersBytes) { var members = [] for (var i=0, memberBytes; memberBytes = membersBytes[i]; i++) { members.push(memberBytes.toString()) } var mutation = { op: 'sadd', args: members, id: shared.keys.getQueryChannel(queryJSON) } this.sendFrame('FIN_EVENT_QUERY_MUTATED', JSON.stringify(mutation)) })) })) this.handleRequest('FIN_REQUEST_CREATE_ITEM', bind(this, function(request) { this.server.createItem(request.data, this, bind(this, function(itemData) { var response = { _requestId: request._requestId, data: itemData } this.sendFrame('FIN_RESPONSE', response) })) })) this.handleRequest('FIN_REQUEST_MUTATE_ITEM', bind(this, function(mutation){ this.server.mutateItem(mutation, this) })) this.handleRequest('FIN_REQUEST_EXTEND_LIST', bind(this, function(request) { var key = request.key, from = request.from, to = request.to this.server.getListItems(key, from, to, bind(this, function(items) { var response = { _requestId: request._requestId, data: items } this.sendFrame('FIN_RESPONSE', response) })) })) // TODO: get Reduction handler to work this.handleRequest('FIN_REQUEST_ADD_REDUCTION', bind(this, function(args) { var itemSetId = args.id, reductionId = args.reductionId this.server.addItemSetReduction(itemSetId, reductionId, this._itemSetSubs[itemSetId]) })) }
|
this._messageDialog.setBody(this._messageQueue[0]);
|
var span = document.createElement("span"); OD.setStringValue(span, this._messageQueue[0]); this._messageDialog.setBody(span);
|
_showMessage: function() { this._messageDialog.setBody(this._messageQueue[0]); this._messageDialog.show(); },
|
d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break;case "width":e=true;break}c.Widget.prototype._setOption.apply(d,arguments);e&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height- b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
|
g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d;this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d, height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.6",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});
|
d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break;case "width":e=true;break}c.Widget.prototype._setOption.apply(d,arguments);e&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.4",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
|
close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",a);this.menu.element.hide();this.menu.deactivate()}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return e.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return e.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){var b= this.menu.element.empty().zIndex(this.element.zIndex()+1),c;this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(e.extend({of:this.element},this.options.position));a=b.width("").outerWidth();c=this.element.outerWidth();b.outerWidth(Math.max(a,c))},_renderMenu:function(a,b){var c=this;e.each(b,function(d,f){c._renderItem(a,f)})},_renderItem:function(a,b){return e("<li></li>").data("item.autocomplete",b).append(e("<a></a>").text(b.label)).appendTo(a)},_move:function(a,
|
"string")return{label:b,value:b};return e.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){this._renderMenu(this.menu.element.empty().zIndex(this.element.zIndex()+1),a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(e.extend({of:this.element},this.options.position));this._resizeMenu()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var f=
|
close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",a);this.menu.element.hide();this.menu.deactivate()}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return e.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return e.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1),c;this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position(e.extend({of:this.element},this.options.position));a=b.width("").outerWidth();c=this.element.outerWidth();b.outerWidth(Math.max(a,c))},_renderMenu:function(a,b){var c=this;e.each(b,function(d,f){c._renderItem(a,f)})},_renderItem:function(a,b){return e("<li></li>").data("item.autocomplete",b).append(e("<a></a>").text(b.label)).appendTo(a)},_move:function(a,
|
d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(a){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var b=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| (q=d("base")[0])&&l===q.href)){j=f.hash;f.href=j}if(h.test(j))b.panels=b.panels.add(b._sanitizeSelector(j));else if(j!=="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=b._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(c.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(b.panels[g-1]||b.list);f.data("destroy.tabs",true)}b.panels=b.panels.add(f)}else c.disabled.push(g)});if(a){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(b._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return b.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); if(c.selected>=0&&this.anchors.length){this.panels.eq(c.selected).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");b.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[c.selected],b.panels[c.selected]))});this.load(c.selected)}d(window).bind("unload",function(){b.lis.add(b.anchors).unbind(".tabs");b.lis=b.anchors=b.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[c.collapsible?"addClass": "removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);a=0;for(var i;i=this.lis[a];a++)d(i)[d.inArray(a,c.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs", function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);b._trigger("show", null,b._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");b._trigger("show",null,b._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);b.element.dequeue("tabs")})}:function(g,f){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");b.element.dequeue("tabs")};this.anchors.bind(c.event+".tabs", function(){var g=this,f=d(g).closest("li"),j=b.panels.filter(":not(.ui-tabs-hide)"),l=d(b._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||b._trigger("select",null,b._ui(this,l[0]))===false){this.blur();return false}c.selected=b.anchors.index(this);b.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){s(g, j)}).dequeue("tabs");this.blur();return false}else if(!j.length){c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this));this.blur();return false}c.cookie&&b._cookie(c.selected,c.cookie);if(l.length){j.length&&b.element.queue("tabs",function(){s(g,j)});b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs", function(){return false})},_getIndex:function(a){if(typeof a=="string")a=this.anchors.index(this.anchors.filter("[href$="+a+"]"));return a},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=
|
d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| (q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a._sanitizeSelector(i));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=d("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); if(c.selected>=0&&this.anchors.length){d(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],d(a._sanitizeSelector(a.anchors[c.selected].hash))))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&& a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
|
d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(a){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var b=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||(q=d("base")[0])&&l===q.href)){j=f.hash;f.href=j}if(h.test(j))b.panels=b.panels.add(b._sanitizeSelector(j));else if(j!=="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=b._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(c.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(b.panels[g-1]||b.list);f.data("destroy.tabs",true)}b.panels=b.panels.add(f)}else c.disabled.push(g)});if(a){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(b._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return b.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(c.selected>=0&&this.anchors.length){this.panels.eq(c.selected).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");b.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[c.selected],b.panels[c.selected]))});this.load(c.selected)}d(window).bind("unload",function(){b.lis.add(b.anchors).unbind(".tabs");b.lis=b.anchors=b.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);a=0;for(var i;i=this.lis[a];a++)d(i)[d.inArray(a,c.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);b._trigger("show",null,b._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");b._trigger("show",null,b._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);b.element.dequeue("tabs")})}:function(g,f){b.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");b.element.dequeue("tabs")};this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),j=b.panels.filter(":not(.ui-tabs-hide)"),l=d(b._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||b._trigger("select",null,b._ui(this,l[0]))===false){this.blur();return false}c.selected=b.anchors.index(this);b.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){s(g,j)}).dequeue("tabs");this.blur();return false}else if(!j.length){c.cookie&&b._cookie(c.selected,c.cookie);b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this));this.blur();return false}c.cookie&&b._cookie(c.selected,c.cookie);if(l.length){j.length&&b.element.queue("tabs",function(){s(g,j)});b.element.queue("tabs",function(){r(g,l)});b.load(b.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(a){if(typeof a=="string")a=this.anchors.index(this.anchors.filter("[href$="+a+"]"));return a},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=
|
f[k](d)}else{if(e.collapsible&&f)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.4",animations:{slide:function(a,
|
f[k](d)}else{if(e.collapsible&&f)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.6",animations:{slide:function(a,
|
this.active.next().addClass("ui-accordion-content-active");var f=this.active.next(),g={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:f},h=this.active=c([]);this._toggle(h,f,g)}},_toggle:function(a,b,d,f,g){var h=this,e=h.options;h.toShow=a;h.toHide=b;h.data=d;var j=function(){if(h)return h._completed.apply(h,arguments)};h._trigger("changestart",null,h.data);h.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&f?{toShow:c([]),toHide:b,complete:j,down:g,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:g,autoHeight:e.autoHeight||e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;f=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!f[k]&&!c.easing[k])k="slide";f[k]||(f[k]=function(l){this.slide(l,{easing:k,duration:i||700})});f[k](d)}else{if(e.collapsible&&f)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.4",animations:{slide:function(a,
|
var allowMultipleSelection = ORBEON.util.Dom.hasClass(treeDiv, "xforms-select"); var showToolTip = ORBEON.util.Dom.hasClass(treeDiv, "xforms-show-tooltip");
|
var allowMultipleSelection = YAHOO.util.Dom.hasClass(treeDiv, "xforms-select"); var showToolTip = YAHOO.util.Dom.hasClass(treeDiv, "xforms-show-tooltip");
|
_tree: function(treeDiv) { var controlId = treeDiv.id; var allowMultipleSelection = ORBEON.util.Dom.hasClass(treeDiv, "xforms-select"); var showToolTip = ORBEON.util.Dom.hasClass(treeDiv, "xforms-show-tooltip"); if (ORBEON.util.Utils.isNewXHTMLLayout()) treeDiv = treeDiv.getElementsByTagName("div")[0]; // Save in the control if it allows multiple selection treeDiv.xformsAllowMultipleSelection = allowMultipleSelection; // Parse data put by the server in the div var treeString = ORBEON.util.Dom.getStringValue(treeDiv); var treeArray = ORBEON.util.String.eval(treeString); ORBEON.util.Dom.setStringValue(treeDiv, ""); treeDiv.value = ""; // Create YUI tree and save a copy var yuiTree = new YAHOO.widget.TreeView(treeDiv.id); ORBEON.xforms.Globals.treeYui[controlId] = yuiTree; // Build the tree if there is something to build (JSON is not an empty string) if (! YAHOO.lang.isUndefined(treeArray)) ORBEON.xforms.Init._initTreeDivFromArray(treeDiv, yuiTree, treeArray); // Save value in tree ORBEON.xforms.Globals.serverValue[controlId] = treeDiv.value // Register event handler for click on label yuiTree.subscribe("labelClick", ORBEON.xforms.Events.treeLabelClick); yuiTree.subscribe("enterKeyPressed", ORBEON.xforms.Events.treeLabelClick); // Click on a label selects the node and expands the subtree (but doesn't collapse) yuiTree.subscribe("clickEvent", function(object) { // Return false if already expanded, which cancels the default action which is to expand if collapsed // or collapse if expanded if (object.node.expanded) return false; }); if (showToolTip) { function addTreeToolTip() { var nodes = yuiTree.getNodesByProperty(); // Nodes can be null when the tree is empty if (nodes != null) { for (var nodeIndex = 0; nodeIndex < nodes.length; nodeIndex++) { var node = nodes[nodeIndex]; if (node.children.length == 0) continue; var contentEl = YAHOO.util.Dom.get(node.contentElId); if (contentEl == null) continue; // This node isn't visible on page yet var iconEl = contentEl.previousSibling; var orbeonToolTip = new YAHOO.widget.Tooltip(contentEl.id + "-orbeon-tree-tooltip", { context: iconEl.id, text: (node.expanded? "Collapse " : "Expand ") + node.label, showDelay: 100 }); } } } // Add initial tooltips addTreeToolTip(); // When nodes are expanded or collapse, reset tooltips as they might have changed (new nodes, expand switched with collapse) yuiTree.subscribe("expandComplete", function() { addTreeToolTip(); }); yuiTree.subscribe("collapseComplete", function() { addTreeToolTip(); }); } // Show the tree now that it has been built ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden"); },
|
ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden");
|
YAHOO.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden");
|
_tree: function(treeDiv) { var controlId = treeDiv.id; var allowMultipleSelection = ORBEON.util.Dom.hasClass(treeDiv, "xforms-select"); var showToolTip = ORBEON.util.Dom.hasClass(treeDiv, "xforms-show-tooltip"); if (ORBEON.util.Utils.isNewXHTMLLayout()) treeDiv = treeDiv.getElementsByTagName("div")[0]; // Save in the control if it allows multiple selection treeDiv.xformsAllowMultipleSelection = allowMultipleSelection; // Parse data put by the server in the div var treeString = ORBEON.util.Dom.getStringValue(treeDiv); var treeArray = ORBEON.util.String.eval(treeString); ORBEON.util.Dom.setStringValue(treeDiv, ""); treeDiv.value = ""; // Create YUI tree and save a copy var yuiTree = new YAHOO.widget.TreeView(treeDiv.id); ORBEON.xforms.Globals.treeYui[controlId] = yuiTree; // Build the tree if there is something to build (JSON is not an empty string) if (! YAHOO.lang.isUndefined(treeArray)) ORBEON.xforms.Init._initTreeDivFromArray(treeDiv, yuiTree, treeArray); // Save value in tree ORBEON.xforms.Globals.serverValue[controlId] = treeDiv.value // Register event handler for click on label yuiTree.subscribe("labelClick", ORBEON.xforms.Events.treeLabelClick); yuiTree.subscribe("enterKeyPressed", ORBEON.xforms.Events.treeLabelClick); // Click on a label selects the node and expands the subtree (but doesn't collapse) yuiTree.subscribe("clickEvent", function(object) { // Return false if already expanded, which cancels the default action which is to expand if collapsed // or collapse if expanded if (object.node.expanded) return false; }); if (showToolTip) { function addTreeToolTip() { var nodes = yuiTree.getNodesByProperty(); // Nodes can be null when the tree is empty if (nodes != null) { for (var nodeIndex = 0; nodeIndex < nodes.length; nodeIndex++) { var node = nodes[nodeIndex]; if (node.children.length == 0) continue; var contentEl = YAHOO.util.Dom.get(node.contentElId); if (contentEl == null) continue; // This node isn't visible on page yet var iconEl = contentEl.previousSibling; var orbeonToolTip = new YAHOO.widget.Tooltip(contentEl.id + "-orbeon-tree-tooltip", { context: iconEl.id, text: (node.expanded? "Collapse " : "Expand ") + node.label, showDelay: 100 }); } } } // Add initial tooltips addTreeToolTip(); // When nodes are expanded or collapse, reset tooltips as they might have changed (new nodes, expand switched with collapse) yuiTree.subscribe("expandComplete", function() { addTreeToolTip(); }); yuiTree.subscribe("collapseComplete", function() { addTreeToolTip(); }); } // Show the tree now that it has been built ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden"); },
|
treeDiv.xformsAllowMultipleSelection = ORBEON.util.Dom.hasClass(treeDiv, "xforms-select");
|
treeDiv.xformsAllowMultipleSelection = allowMultipleSelection;
|
_tree: function(treeDiv) { var controlId = treeDiv.id; if (ORBEON.util.Utils.isNewXHTMLLayout()) treeDiv = treeDiv.getElementsByTagName("div")[0]; // Save in the control if it allows multiple selection treeDiv.xformsAllowMultipleSelection = ORBEON.util.Dom.hasClass(treeDiv, "xforms-select"); // Parse data put by the server in the div var treeString = ORBEON.util.Dom.getStringValue(treeDiv); var treeArray = ORBEON.util.String.eval(treeString); ORBEON.util.Dom.setStringValue(treeDiv, ""); treeDiv.value = ""; // Create YUI tree and save a copy var yuiTree = new YAHOO.widget.TreeView(treeDiv.id); ORBEON.xforms.Globals.treeYui[controlId] = yuiTree; // Build the tree if there is something to build (JSON is not an empty string) if (! YAHOO.lang.isUndefined(treeArray)) ORBEON.xforms.Init._initTreeDivFromArray(treeDiv, yuiTree, treeArray); // Save value in tree ORBEON.xforms.Globals.serverValue[controlId] = treeDiv.value // Register event handler for click on label yuiTree.subscribe("labelClick", ORBEON.xforms.Events.treeLabelClick); yuiTree.subscribe("enterKeyPressed", ORBEON.xforms.Events.treeLabelClick); ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden"); },
|
ORBEON.xforms.Globals.serverValue[controlId] = treeDiv.value
|
ORBEON.xforms.ServerValueStore.set(controlId, treeDiv.value);
|
_tree: function(treeDiv) { var controlId = treeDiv.id; var allowMultipleSelection = YAHOO.util.Dom.hasClass(treeDiv, "xforms-select"); var showToolTip = YAHOO.util.Dom.hasClass(treeDiv, "xforms-show-tooltip"); if (ORBEON.util.Utils.isNewXHTMLLayout()) treeDiv = treeDiv.getElementsByTagName("div")[0]; // Save in the control if it allows multiple selection treeDiv.xformsAllowMultipleSelection = allowMultipleSelection; // Parse data put by the server in the div var treeString = ORBEON.util.Dom.getStringValue(treeDiv); var treeArray = ORBEON.util.String.eval(treeString); ORBEON.util.Dom.setStringValue(treeDiv, ""); treeDiv.value = ""; // Create YUI tree and save a copy var yuiTree = new YAHOO.widget.TreeView(treeDiv.id); ORBEON.xforms.Globals.treeYui[controlId] = yuiTree; // Build the tree if there is something to build (JSON is not an empty string) if (! YAHOO.lang.isUndefined(treeArray)) ORBEON.xforms.Init._initTreeDivFromArray(treeDiv, yuiTree, treeArray); // Save value in tree ORBEON.xforms.Globals.serverValue[controlId] = treeDiv.value // Register event handler for click on label yuiTree.subscribe("labelClick", ORBEON.xforms.Events.treeLabelClick); yuiTree.subscribe("enterKeyPressed", ORBEON.xforms.Events.treeLabelClick); // Click on a label selects the node and expands the subtree (but doesn't collapse) yuiTree.subscribe("clickEvent", function(object) { // Return false if already expanded, which cancels the default action which is to expand if collapsed // or collapse if expanded if (object.node.expanded) return false; }); if (showToolTip) { function addTreeToolTip() { var nodes = yuiTree.getNodesByProperty(); // Nodes can be null when the tree is empty if (nodes != null) { for (var nodeIndex = 0; nodeIndex < nodes.length; nodeIndex++) { var node = nodes[nodeIndex]; if (node.children.length == 0) continue; var contentEl = ORBEON.util.Dom.get(node.contentElId); if (contentEl == null) continue; // This node isn't visible on page yet var iconEl = contentEl.previousSibling; var orbeonToolTip = new YAHOO.widget.Tooltip(contentEl.id + "-orbeon-tree-tooltip", { context: iconEl.id, text: (node.expanded? "Collapse " : "Expand ") + node.label, showDelay: 100 }); } } } // Add initial tooltips addTreeToolTip(); // When nodes are expanded or collapse, reset tooltips as they might have changed (new nodes, expand switched with collapse) yuiTree.subscribe("expandComplete", function() { addTreeToolTip(); }); yuiTree.subscribe("collapseComplete", function() { addTreeToolTip(); }); } // Show the tree now that it has been built YAHOO.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout() ? treeDiv.parentNode : treeDiv, "xforms-initially-hidden"); },
|
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
|
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change");this._value()===this.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=
|
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
|
b);for(var c in b)if(b[c]==null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=
|
b);for(var c in b)if(b[c]==null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.6"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=
|
b);for(var c in b)if(b[c]==null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.4"}});var y=(new Date).getTime();d.extend(L.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=
|
{version:"1.8.4"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
|
{version:"1.8.6"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
|
{version:"1.8.4"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
|
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
|
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
|
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
|
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.attr("scrollTop"),f=this.element.height();if(c<0)this.element.attr("scrollTop",d+c);else c>f&&this.element.attr("scrollTop",d+c-f+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
|
c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
|
e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.attr("scrollTop"),f=this.element.height();if(c<0)this.element.attr("scrollTop",d+c);else c>f&&this.element.attr("scrollTop",d+c-f+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
|
var trigger = YAHOO.util.Dom.getElementsByClassName ("fr-tabview-" + selectDeselect + "-" + (index + 1), null, this.container)[0];
|
var trigger = ORBEON.util.Dom.get(this.container.id + "$" + "fr-tabview-" + selectDeselect + "-" + (index + 1));
|
activeTabChange: function(event) { function getTrigger(selectDeselect, index) { var trigger = YAHOO.util.Dom.getElementsByClassName ("fr-tabview-" + selectDeselect + "-" + (index + 1), null, this.container)[0]; return ORBEON.util.Dom.getElementByTagName(trigger, "button"); } // Deselect other tabs getTrigger("deselect", this.yuiTabView.getTabIndex(event.prevValue)).click(); // Select new tab getTrigger("select", this.yuiTabView.getTabIndex(event.newValue)).click(); },
|
getTrigger("deselect", this.yuiTabView.getTabIndex(event.prevValue)).click();
|
getTrigger.call(this, "deselect", this.yuiTabView.getTabIndex(event.prevValue)).click();
|
activeTabChange: function(event) { function getTrigger(selectDeselect, index) { var trigger = YAHOO.util.Dom.getElementsByClassName ("fr-tabview-" + selectDeselect + "-" + (index + 1), null, this.container)[0]; return ORBEON.util.Dom.getElementByTagName(trigger, "button"); } // Deselect other tabs getTrigger("deselect", this.yuiTabView.getTabIndex(event.prevValue)).click(); // Select new tab getTrigger("select", this.yuiTabView.getTabIndex(event.newValue)).click(); },
|
getTrigger("select", this.yuiTabView.getTabIndex(event.newValue)).click();
|
getTrigger.call(this, "select", this.yuiTabView.getTabIndex(event.newValue)).click();
|
activeTabChange: function(event) { function getTrigger(selectDeselect, index) { var trigger = YAHOO.util.Dom.getElementsByClassName ("fr-tabview-" + selectDeselect + "-" + (index + 1), null, this.container)[0]; return ORBEON.util.Dom.getElementByTagName(trigger, "button"); } // Deselect other tabs getTrigger("deselect", this.yuiTabView.getTabIndex(event.prevValue)).click(); // Select new tab getTrigger("select", this.yuiTabView.getTabIndex(event.newValue)).click(); },
|
e;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){b.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(a,e,b){if(b===p)b=this.anchors.length; var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,a).replace(/#\{label\}/g,e));a=!a.indexOf("#")?a.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var i=d("#"+a);i.length||(i=d(h.panelTemplate).attr("id",a).data("destroy.tabs",true));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(b>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[b]); i.insertBefore(this.panels[b])}h.disabled=d.map(h.disabled,function(k){return k>=b?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]));return this},remove:function(a){a=this._getIndex(a);var e=this.options,b=this.lis.eq(a).remove(),c=this.panels.eq(a).remove();
|
(function(c){c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.2",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==
|
e;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){b.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(a,e,b){if(b===p)b=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,a).replace(/#\{label\}/g,e));a=!a.indexOf("#")?a.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var i=d("#"+a);i.length||(i=d(h.panelTemplate).attr("id",a).data("destroy.tabs",true));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(b>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[b]);i.insertBefore(this.panels[b])}h.disabled=d.map(h.disabled,function(k){return k>=b?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]));return this},remove:function(a){a=this._getIndex(a);var e=this.options,b=this.lis.eq(a).remove(),c=this.panels.eq(a).remove();
|
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
|
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
|
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
|
charCode: e.charCode,
|
events.add = function(element, eventName, handler, dontIncludeEvent) { // Is removeEvent going to work properly when we wrap the handler in another function? function normalizeEvent(e) { e = e || event if (!e.target) { e.target = e.srcElement } var eventObj = { charCode: e.charCode, keyCode: e.keyCode, metaKey: e.metaKey, __realEventObject: e } if (eventObj.charCode == 13 && eventObj.keyCode == 13) { eventObj.charCode = 0 // in Webkit, return gives a charCode as well as a keyCode. Should only be a keyCode } handler(dontIncludeEvent ? null : eventObj) } if (element.addEventListener) { element.addEventListener(eventName, normalizeEvent, false) } else if (element.attachEvent){ element.attachEvent("on"+eventName, normalizeEvent) } return handler }
|
|
if (eventObj.charCode == 13 && eventObj.keyCode == 13) { eventObj.charCode = 0
|
if (e.type == 'keypress') { eventObj.charCode = (eventObj.charCode == 13 && eventObj.keyCode == 13) ? 0 : e.charCode
|
events.add = function(element, eventName, handler, dontIncludeEvent) { // Is removeEvent going to work properly when we wrap the handler in another function? function normalizeEvent(e) { e = e || event if (!e.target) { e.target = e.srcElement } var eventObj = { charCode: e.charCode, keyCode: e.keyCode, metaKey: e.metaKey, __realEventObject: e } if (eventObj.charCode == 13 && eventObj.keyCode == 13) { eventObj.charCode = 0 // in Webkit, return gives a charCode as well as a keyCode. Should only be a keyCode } handler(dontIncludeEvent ? null : eventObj) } if (element.addEventListener) { element.addEventListener(eventName, normalizeEvent, false) } else if (element.attachEvent){ element.attachEvent("on"+eventName, normalizeEvent) } return handler }
|
this.add = function(signal, callback) { if (!this._pool[signal]) { this._pool[signal] = {} }
|
this.add = function(name, callback) { if (!this._pool[name]) { this._pool[name] = {} this._counts[name] = 0 } this._counts[name]++
|
this.add = function(signal, callback) { if (!this._pool[signal]) { this._pool[signal] = {} } var id = 'p' + this._uniqueId++ this._pool[signal][id] = callback return id }
|
this._pool[signal][id] = callback
|
this._pool[name][id] = callback
|
this.add = function(signal, callback) { if (!this._pool[signal]) { this._pool[signal] = {} } var id = 'p' + this._uniqueId++ this._pool[signal][id] = callback return id }
|
},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(G){for(var F in G){if(D.hasOwnProperty(G,F)){if(G[F].type=="separator"){this.addSeparator();}else{if(G[F].group!==undefined){this.addButtonGroup(G[F]);}else{this.addButton(G[F]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((E.grouplabels===false)?false:true),method:function(F){if(F){C.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{C.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(G){if(G){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";A.on(this._titlebar,"focus",function(){this._handleFocus();},this,true);C.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML='<a href="#" tabIndex="0">'+G+"</a>";this._titlebar.appendChild(F);A.on(F.firstChild,"click",function(H){A.stopEvent(H);});A.on([F,F.firstChild],"focus",function(){this._handleFocus();},this,true);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collapse",true);}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(H){if(this._titlebar){var G=null;var F=C.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;C.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=C.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";C.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(F){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);C.addClass(this._titlebar,"draggable");}else{C.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped");}var J=document.createElement("DIV");C.addClass(J,this.CLASS_PREFIX+"-group");C.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!==undefined)&&I.buttons[G].type=="separator"){this.addSeparator(E);}else{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push"; }if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);T.get("element").tabIndex="-1";T.get("element").setAttribute("role","button");T._selected=true;if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";U.tabIndex="-1";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button;var R=T.get("element");R.parentNode.replaceChild(G,R);}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){if(this._colorPicker){this._colorPicker._button=J.value;}var X=T.getMenu().element;if(C.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._buttonClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});T.on("change",function(W){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);},this,true);var K=this;T.on("appendTo",function(){var W=this;if(W.getMenu()&&W.getMenu().mouseDownEvent){W.getMenu().mouseDownEvent.subscribe(function(Z,Y){var X=Y[1];YAHOO.util.Event.stopEvent(Y[0]);W._onMenuClick(Y[0],W);if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);K._buttonClick.call(K,Y[1],J);W._hideMenu();return false;});W.getMenu().clickEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});W.getMenu().mouseUpEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});}});}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E&&E.renderEvent){E.renderEvent.subscribe(this._addMenuClasses,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");C.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(true);this._sepCount++;C.addClass(G,this.CLASS_SEPARATOR+"-"+this._sepCount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(H){if(C.get(H+"_colors")){C.get(H+"_colors").parentNode.removeChild(C.get(H+"_colors"));}var E=document.createElement("div");E.className="yui-toolbar-colors";E.id=H+"_colors";E.style.display="none";A.on(window,"load",function(){document.body.appendChild(E);},this,true);this._colorPicker=E;var G="";for(var F in this._colorData){if(D.hasOwnProperty(this._colorData,F)){G+='<a style="background-color: '+F+'" href="#">'+F.replace("#","")+"</a>";}}G+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){E.innerHTML=G;},0);A.on(E,"mouseover",function(M){var K=this._colorPicker;var L=K.getElementsByTagName("em")[0];var J=K.getElementsByTagName("strong")[0];var I=A.getTarget(M);if(I.tagName.toLowerCase()=="a"){L.style.backgroundColor=I.style.backgroundColor;J.innerHTML=this._colorData["#"+I.innerHTML]+"<br>"+I.innerHTML;}},this,true);A.on(E,"focus",function(I){A.stopEvent(I);});A.on(E,"click",function(I){A.stopEvent(I);});A.on(E,"mousedown",function(J){A.stopEvent(J);var I=A.getTarget(J);if(I.tagName.toLowerCase()=="a"){var L=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML]});if(L!==false){var K={color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:K});}this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(G){for(var F in G){if(D.hasOwnProperty(G,F)){if(G[F].type=="separator"){this.addSeparator();}else{if(G[F].group!==undefined){this.addButtonGroup(G[F]);}else{this.addButton(G[F]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((E.grouplabels===false)?false:true),method:function(F){if(F){C.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{C.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(G){if(G){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";A.on(this._titlebar,"focus",function(){this._handleFocus();},this,true);C.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML='<a href="#" tabIndex="0">'+G+"</a>";this._titlebar.appendChild(F);A.on(F.firstChild,"click",function(H){A.stopEvent(H);});A.on([F,F.firstChild],"focus",function(){this._handleFocus();},this,true);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collapse",true);}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(H){if(this._titlebar){var G=null;var F=C.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;C.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=C.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";C.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(F){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);C.addClass(this._titlebar,"draggable");}else{C.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped");}var J=document.createElement("DIV");C.addClass(J,this.CLASS_PREFIX+"-group");C.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!==undefined)&&I.buttons[G].type=="separator"){this.addSeparator(E);}else{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push";}if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);T.get("element").tabIndex="-1";T.get("element").setAttribute("role","button");T._selected=true;if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";U.tabIndex="-1";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button;var R=T.get("element");R.parentNode.replaceChild(G,R);}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){if(this._colorPicker){this._colorPicker._button=J.value;}var X=T.getMenu().element;if(C.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._buttonClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});T.on("change",function(W){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);},this,true);var K=this;T.on("appendTo",function(){var W=this;if(W.getMenu()&&W.getMenu().mouseDownEvent){W.getMenu().mouseDownEvent.subscribe(function(Z,Y){var X=Y[1];YAHOO.util.Event.stopEvent(Y[0]);W._onMenuClick(Y[0],W);if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);K._buttonClick.call(K,Y[1],J);W._hideMenu();return false;});W.getMenu().clickEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});W.getMenu().mouseUpEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});}});}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E&&E.renderEvent){E.renderEvent.subscribe(this._addMenuClasses,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");C.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(true);this._sepCount++;C.addClass(G,this.CLASS_SEPARATOR+"-"+this._sepCount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(H){if(C.get(H+"_colors")){C.get(H+"_colors").parentNode.removeChild(C.get(H+"_colors"));}var E=document.createElement("div");E.className="yui-toolbar-colors";E.id=H+"_colors";E.style.display="none";A.on(window,"load",function(){document.body.appendChild(E);},this,true);this._colorPicker=E;var G="";for(var F in this._colorData){if(D.hasOwnProperty(this._colorData,F)){G+='<a style="background-color: '+F+'" href="#">'+F.replace("#","")+"</a>";}}G+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){E.innerHTML=G;},0);A.on(E,"mouseover",function(M){var K=this._colorPicker;var L=K.getElementsByTagName("em")[0];var J=K.getElementsByTagName("strong")[0];var I=A.getTarget(M);if(I.tagName.toLowerCase()=="a"){L.style.backgroundColor=I.style.backgroundColor;J.innerHTML=this._colorData["#"+I.innerHTML]+"<br>"+I.innerHTML;}},this,true);A.on(E,"focus",function(I){A.stopEvent(I);});A.on(E,"click",function(I){A.stopEvent(I);});A.on(E,"mousedown",function(J){A.stopEvent(J);var I=A.getTarget(J);if(I.tagName.toLowerCase()=="a"){var L=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML]});if(L!==false){var K={color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:K});}this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";
|
i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
|
b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("className");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("className",v);e.animate(u(h,r),a,b,function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a? f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,
|
i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
|
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
|
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType=== 1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
|
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
|
addslashes: function (value, arg) { return utils.string.add_slashes("" + value); },
|
addslashes: function (value, arg) { return string_utils.add_slashes("" + value); },
|
addslashes: function (value, arg) { return utils.string.add_slashes("" + value); },
|
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
if (count<0 || count > this.length) return "";
|
String.prototype.after=function(count){ return this.slice(count); };
|
|
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| !T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
|
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
var processURI="./xmlhttprequest.php";var liveReq=false;if(window.XMLHttpRequest){liveReq=new XMLHttpRequest()}function AjaxLoad(a,c,b){if(liveReq&&liveReq.readyState<4){liveReq.abort()}if(window.XMLHttpRequest){}else{if(window.ActiveXObject){liveReq=new ActiveXObject("Microsoft.XMLHTTP")}}name=this.id;liveReq.onreadystatechange=function(){liveReqProcessReqChange(a,b)};liveReq.open("GET",processURI+"?"+c);document.getElementById(a).innerHTML="Loading...";liveReq.send(null);return false}function liveReqProcessReqChange(a,b){if(liveReq.readyState==4){document.getElementById(a).innerHTML=liveReq.responseText;document.getElementById(b).innerHTML=""}};
|
var processURI="./xmlhttprequest.php";var liveReq=false;if(window.XMLHttpRequest){liveReq=new XMLHttpRequest()}function AjaxLoad(a,c,b){if(liveReq&&liveReq.readyState<4){liveReq.abort()}if(window.XMLHttpRequest){}else{if(window.ActiveXObject){liveReq=new ActiveXObject("Microsoft.XMLHTTP")}}name=this.id;liveReq.onreadystatechange=function(){liveReqProcessReqChange(a,b)};liveReq.open("GET",processURI+"?"+c);document.getElementById(a).innerHTML=loading_lang;liveReq.send(null);return false}function liveReqProcessReqChange(a,b){if(liveReq.readyState==4){document.getElementById(a).innerHTML=liveReq.responseText;document.getElementById(b).innerHTML=""}};
|
var processURI="./xmlhttprequest.php";var liveReq=false;if(window.XMLHttpRequest){liveReq=new XMLHttpRequest()}function AjaxLoad(a,c,b){if(liveReq&&liveReq.readyState<4){liveReq.abort()}if(window.XMLHttpRequest){}else{if(window.ActiveXObject){liveReq=new ActiveXObject("Microsoft.XMLHTTP")}}name=this.id;liveReq.onreadystatechange=function(){liveReqProcessReqChange(a,b)};liveReq.open("GET",processURI+"?"+c);document.getElementById(a).innerHTML="Loading...";liveReq.send(null);return false}function liveReqProcessReqChange(a,b){if(liveReq.readyState==4){document.getElementById(a).innerHTML=liveReq.responseText;document.getElementById(b).innerHTML=""}};
|
document.getElementById( targetElementId ).innerHTML = "Loading...";
|
document.getElementById( targetElementId ).innerHTML = loading_lang;
|
function AjaxLoad( targetElementId, queryString, elementIdToHide ) { if (liveReq && liveReq.readyState < 4) { liveReq.abort(); } if (window.XMLHttpRequest) { // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { liveReq = new ActiveXObject("Microsoft.XMLHTTP"); } name = this.id; liveReq.onreadystatechange = function() { liveReqProcessReqChange( targetElementId, elementIdToHide ); }; liveReq.open("GET", processURI + "?" + queryString); // show "Loading..." while waiting document.getElementById( targetElementId ).innerHTML = "Loading..."; liveReq.send(null); return false;}
|
var doUdateSuggestionList = ! this.justMadeSelection && this.yuiAutoComplete.isFocused(); if (doUdateSuggestionList)
|
var doUpdateSuggestionList = ! this.justMadeSelection && ORBEON.xforms.Globals.currentFocusControlId == this.searchControl.id; if (doUpdateSuggestionList)
|
ajaxResponseProcessed: function() { // Get new list of values var query = this.searchField.value; var oldList = this.lastSuggestionList; var newList = this.getCurrentValues(query); var doUdateSuggestionList = // If the user just selected something before which triggered an Ajax query, // don't show the suggestion list ! this.justMadeSelection // Update the list only of the control has the focus, as updating the list will show the suggestion list // and we only want to show the suggestion list if the user happens to be in that field && this.yuiAutoComplete.isFocused(); if (doUdateSuggestionList) this.yuiAutoComplete._populateList(query, { results: newList }, { query: query }); this.justMadeSelection = false; },
|
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
|
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
|
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
|
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
|
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b, d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)=== "inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L|| 1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
|
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
|
165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v, i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
|
lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d= b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("className");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("className",v);e.animate(u(h,r),a,b,function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?
|
165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
|
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
|
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a=== b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
|
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
|
try { view.apply(null, args); } catch (e) { debuginfo.last_e = e; show_500(req, res, e); }
|
read_arguments(req, function (error) { if (error) { return show_500(req, res, error); } try { view.apply(null, args); } catch (e) { debuginfo.last_e = e; show_500(req, res, e); } });
|
var app = function(req, res) { debuginfo.last_request = req; debuginfo.last_response = res; var path = url.parse(req.url)["pathname"]; var view = show_404; var args = [req, res]; for (var pair, i = 0; pair = compiled[i]; i++) { //sys.puts("Matching " + pair[0] + " against path " + path); var match = pair[0](path); if (match) { //sys.puts(" matched! " + match); // Add matched bits to args match.slice(1).forEach(function(arg) { args.push(arg); }); view = pair[1]; break; } } try { view.apply(null, args); } catch (e) { debuginfo.last_e = e; show_500(req, res, e); } }
|
return (ORBEON.util.Dom.hasClass(control, "xforms-type-date") || ORBEON.util.Dom.hasClass(control, "xforms-type-dateTime"))
|
return (YAHOO.util.Dom.hasClass(control, "xforms-type-date") || YAHOO.util.Dom.hasClass(control, "xforms-type-dateTime"))
|
appliesToControl: function(control) { return (ORBEON.util.Dom.hasClass(control, "xforms-type-date") || ORBEON.util.Dom.hasClass(control, "xforms-type-dateTime")) && ORBEON.util.Properties.datePicker.get() == "yui"; },
|
applyState: function(state) {this.collapsed = state.collapsed;},
|
applyState: function (state) { var config = this.colModel.config; if (state.group) { var groupColAvailable = false; for (var i=0; i < config.length; i++) { if (config[i].dataIndex === state.group) { groupColAvailable = true; } } if (!groupColAvailable) { delete state.group; } } if (state.sort) { var sortColAvailable = false; for (var i=0; i < config.length; i++) { if (config[i].dataIndex === state.sort.field) { sortColAvailable = true; } } if (!sortColAvailable) { delete state.sort; } } Ext.ux.SlimGridPanel.superclass.applyState.call(this, state); },
|
applyState: function(state) {this.collapsed = state.collapsed;},
|
assertEquals: function (actual, expected) {
|
assertEquals: function (actual, expected, callback) {
|
assertEquals: function (actual, expected) { if (!isEqual(actual, expected)) { throw new AssertFailedException( '\nExpected: ' + sys.inspect(actual) + '\nActual: ' + sys.inspect(expected) + '\n' ); } },
|
throw new AssertFailedException(
|
var exception = new AssertFailedException(
|
assertEquals: function (actual, expected) { if (!isEqual(actual, expected)) { throw new AssertFailedException( '\nExpected: ' + sys.inspect(actual) + '\nActual: ' + sys.inspect(expected) + '\n' ); } },
|
}
|
if (callback) { callback(exception); } else { throw exception; } };
|
assertEquals: function (actual, expected) { if (!isEqual(actual, expected)) { throw new AssertFailedException( '\nExpected: ' + sys.inspect(actual) + '\nActual: ' + sys.inspect(expected) + '\n' ); } },
|
var formID = ORBEON.xforms.Globals.requestForm.id;
|
asyncRequest: function() { try { ORBEON.xforms.Globals.requestTryCount++; YAHOO.util.Connect.setDefaultPostHeader(false); YAHOO.util.Connect.initHeader("Content-Type", "application/xml"); var callback = { success: ORBEON.xforms.Server.handleResponseAjax, failure: ORBEON.xforms.Server.handleFailure }; var ajaxTimeout = ORBEON.util.Properties.delayBeforeAjaxTimeout.get(); if (ajaxTimeout != -1) callback.timeout = ajaxTimeout; YAHOO.util.Connect.asyncRequest("POST", ORBEON.xforms.Globals.xformsServerURL, callback, ORBEON.xforms.Globals.requestDocument); } catch (e) { ORBEON.xforms.Globals.requestInProgress = false; ORBEON.xforms.Server.exceptionWhenTalkingToServer(e, formID); } },
|
|
YAHOO.util.Connect.asyncRequest("POST", ORBEON.xforms.Globals.xformsServerURL, callback, ORBEON.xforms.Globals.requestDocument);
|
var formID = ORBEON.xforms.Globals.requestForm.id; YAHOO.util.Connect.asyncRequest("POST", ORBEON.xforms.Globals.xformsServerURL[formID], callback, ORBEON.xforms.Globals.requestDocument);
|
asyncRequest: function() { try { ORBEON.xforms.Globals.requestTryCount++; YAHOO.util.Connect.setDefaultPostHeader(false); YAHOO.util.Connect.initHeader("Content-Type", "application/xml"); var callback = { success: ORBEON.xforms.Server.handleResponseAjax, failure: ORBEON.xforms.Server.handleFailure }; var ajaxTimeout = ORBEON.util.Properties.delayBeforeAjaxTimeout.get(); if (ajaxTimeout != -1) callback.timeout = ajaxTimeout; YAHOO.util.Connect.asyncRequest("POST", ORBEON.xforms.Globals.xformsServerURL, callback, ORBEON.xforms.Globals.requestDocument); } catch (e) { ORBEON.xforms.Globals.requestInProgress = false; //XXX var formID = ORBEON.xforms.Globals.requestForm.id; ORBEON.xforms.Server.exceptionWhenTalkingToServer(e, formID); } },
|
if ($('#override-title-checkbox', context).size()) {
|
if ($('.menu-block-menu-tree-configure-form', context).size()) {
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast');
|
$('.menu-block-override-title', context).change( function() { if ($('.menu-block-override-title:checked').length) { $('.menu-block-title-link').slideUp('fast');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-title-link-wrapper').slideDown('fast');
|
$('.menu-block-title-link').slideDown('fast');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none');
|
if ($('.menu-block-override-title:checked').length) { $('.menu-block-title-link').css('display', 'none');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
else {
|
else if ($('.menu-block-configure-form', context).size()) {
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast');
|
$('input[name="title"]', context).change( function() { if ($('input[name="title"]').val()) { $('.menu-block-title-link').slideUp('fast');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none');
|
if ($('input[name="title"]', context).val()) { $('.menu-block-title-link').css('display', 'none');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-parent', context)
|
$('.menu-block-parent', context)
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()])
|
$('.menu-block-parent-menu', context).change( function() { $('.menu-block-parent') .html(Drupal.settings.menu_block.parent_options[$('.menu-block-parent-menu').val()])
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast');
|
$('.menu-block-follow', context).change( function() { if ($('.menu-block-follow:checked').length) { $('.menu-block-follow-parent').slideDown('fast');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
$('#edit-follow-parent-wrapper').slideUp('fast');
|
$('.menu-block-follow-parent').slideUp('fast');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none');
|
if (!$('.menu-block-follow:checked', context).length) { $('.menu-block-follow-parent', context).css('display', 'none');
|
attach: function (context, settings) { // This behavior attaches by ID, so is only valid once on a page. if ($('#menu-block-settings.menu-block-processed').size()) { return; } $('#menu-block-settings', context).addClass('menu-block-processed'); // Process the form if its in a Panel overlay. if ($('#override-title-checkbox', context).size()) { // Toggle display of "title link" if "override title" is checked. $('#override-title-checkbox', context).change( function() { if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#override-title-checkbox:checked').length) { $('#edit-title-link-wrapper').css('display', 'none'); } } // Process the form if its on a block config page. else { // Toggle display of "title link" if "block title" has a value. $('#edit-title', context).change( function() { if ($('#edit-title').val()) { $('#edit-title-link-wrapper').slideUp('fast'); } else { $('#edit-title-link-wrapper').slideDown('fast'); } } ); if ($('#edit-title', context).val()) { $('#edit-title-link-wrapper').css('display', 'none'); } // Split the un-wieldly "parent item" pull-down into two hierarchal pull-downs. $('#edit-parent', context) .html(Drupal.settings.menu_block.parent_options[Drupal.settings.menu_block.menus_default]) .val(Drupal.settings.menu_block.parent_default) .before(Drupal.settings.menu_block.menus); $('#edit-parent-menu', context).change( function() { $('#edit-parent') .html(Drupal.settings.menu_block.parent_options[$('#edit-parent-menu').val()]) .val(Drupal.settings.menu_block.parent_default); } ); } // Toggle display of "follow parent" if "follow" has been checked. $('#edit-follow', context).change( function() { if ($('#edit-follow:checked').length) { $('#edit-follow-parent-wrapper').slideDown('fast'); } else { $('#edit-follow-parent-wrapper').slideUp('fast'); } } ); if (!$('#edit-follow:checked', context).length) { $('#edit-follow-parent-wrapper', context).css('display', 'none'); } }
|
for (var i = this.joints.length - 1; i >= 0; --i){ var engine = this.joints[i].engine;
|
for (var i = this.joints().length - 1; i >= 0; --i){ var engine = this.joints()[i].engine;
|
Raphael.el.attr = function(){ // is it a getter or el is not a joint object? if ((arguments.length == 1 && (typeof arguments[0] === "string" || typeof arguments[0] === "array")) || (typeof this.joints === "undefined")){ return _attr.apply(this, arguments); // yes } // old attributes var o = {}; for (var key in this.attrs){ o[key] = this.attrs[key]; } _attr.apply(this, arguments); var n = this.attrs, // new attributes positionChanged = false, strokeChanged = false; if (o.x != n.x || o.y != n.y || // rect/image/text o.cx != n.cx || o.cy != n.cy || // circle/ellipse o.path != n.path || // path o.r != n.r){ // radius positionChanged = true; } if (o.stroke != n.stroke){ strokeChanged = true; } for (var i = this.joints.length - 1; i >= 0; --i){ var engine = this.joints[i].engine; if (positionChanged){ if (this === engine.startObject().shape){ engine.dispatch(qevt("startPositionChanged")); } else { engine.dispatch(qevt("endPositionChanged")); } engine.dispatch(qevt("done")); } if (strokeChanged){ engine.dispatch(qevt("strokeChanged")); } } return this;};
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
|
"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
var n = this.attrs;
|
var n = this.attrs, positionChanged = false, strokeChanged = false; if (o.x != n.x || o.y != n.y || o.cx != n.cx || o.cy != n.cy || o.path != n.path || o.r != n.r){ positionChanged = true; } if (o.stroke != n.stroke){ strokeChanged = true; }
|
Raphael.el.attr = function(){ // is it a getter or el is not a joint object? if ((arguments.length == 1 && (typeof arguments[0] === "string" || typeof arguments[0] === "array")) || (typeof this.joints === "undefined")){ return _attr.apply(this, arguments); // yes } // old attributes var o = {}; for (var key in this.attrs){ o[key] = this.attrs[key]; } _attr.apply(this, arguments); var n = this.attrs; // new attributes for (var i = this.joints.length - 1; i >= 0; --i){ var engine = this.joints[i].engine; if (o.x != n.x || o.y != n.y || // rect/image/text o.cx != n.cx || o.cy != n.cy || // circle/ellipse o.path != n.path || // path o.r != n.r){ // radius if (this === engine.startObject().shape){ engine.dispatch(qevt("startPositionChanged")); } else { engine.dispatch(qevt("endPositionChanged")); } engine.dispatch(qevt("done")); } if (o.stroke != n.stroke){ engine.dispatch(qevt("strokeChanged")); } } return this;};
|
if (o.x != n.x || o.y != n.y || o.cx != n.cx || o.cy != n.cy || o.path != n.path || o.r != n.r){
|
if (positionChanged){
|
Raphael.el.attr = function(){ // is it a getter or el is not a joint object? if ((arguments.length == 1 && (typeof arguments[0] === "string" || typeof arguments[0] === "array")) || (typeof this.joints === "undefined")){ return _attr.apply(this, arguments); // yes } // old attributes var o = {}; for (var key in this.attrs){ o[key] = this.attrs[key]; } _attr.apply(this, arguments); var n = this.attrs; // new attributes for (var i = this.joints.length - 1; i >= 0; --i){ var engine = this.joints[i].engine; if (o.x != n.x || o.y != n.y || // rect/image/text o.cx != n.cx || o.cy != n.cy || // circle/ellipse o.path != n.path || // path o.r != n.r){ // radius if (this === engine.startObject().shape){ engine.dispatch(qevt("startPositionChanged")); } else { engine.dispatch(qevt("endPositionChanged")); } engine.dispatch(qevt("done")); } if (o.stroke != n.stroke){ engine.dispatch(qevt("strokeChanged")); } } return this;};
|
if (o.stroke != n.stroke){
|
if (strokeChanged){
|
Raphael.el.attr = function(){ // is it a getter or el is not a joint object? if ((arguments.length == 1 && (typeof arguments[0] === "string" || typeof arguments[0] === "array")) || (typeof this.joints === "undefined")){ return _attr.apply(this, arguments); // yes } // old attributes var o = {}; for (var key in this.attrs){ o[key] = this.attrs[key]; } _attr.apply(this, arguments); var n = this.attrs; // new attributes for (var i = this.joints.length - 1; i >= 0; --i){ var engine = this.joints[i].engine; if (o.x != n.x || o.y != n.y || // rect/image/text o.cx != n.cx || o.cy != n.cy || // circle/ellipse o.path != n.path || // path o.r != n.r){ // radius if (this === engine.startObject().shape){ engine.dispatch(qevt("startPositionChanged")); } else { engine.dispatch(qevt("endPositionChanged")); } engine.dispatch(qevt("done")); } if (o.stroke != n.stroke){ engine.dispatch(qevt("strokeChanged")); } } return this;};
|
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
|
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
|
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
|
AutoescapeNode: function (enable, node_list) {
|
AutoescapeNode: function (node_list, enable) { if (enable.toLowerCase() === 'on') { enable = true; } else { enable = false; }
|
AutoescapeNode: function (enable, node_list) { return function (context) { var before = context.autoescaping; context.autoescaping = enable; out = node_list.evaluate( context ); context.autoescaping = before; return out; } },
|
if (pos[key]) {
|
if (pos[key] != null) {
|
function axisToCanvasCoords(pos) { // get canvas coords from the first pair of x/y found in pos var res = {}, i, axis, key; for (i = 0; i < xaxes.length; ++i) { axis = xaxes[i]; if (axis && axis.used) { key = "x" + axis.n; if (pos[key] == null && axis.n == 1) key = "x"; if (pos[key]) { res.left = axis.p2c(pos[key]); break; } } } for (i = 0; i < yaxes.length; ++i) { axis = yaxes[i]; if (axis && axis.used) { key = "y" + axis.n; if (pos[key] == null && axis.n == 1) key = "y"; if (pos[key]) { res.top = axis.p2c(pos[key]); break; } } } return res; }
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
if (count<0 || count > this.length) return "";
|
String.prototype.before=function(count){ return this.substr(0,this.length-count); };
|
|
if (__DEV__) { if (name in behaviors) { throw new Error( 'JX.behavior("'+name+'", ...): '+ 'behavior is already registered.'); } if (!control_function) { throw new Error( 'JX.behavior("'+name+'", <nothing>): '+ 'initialization function is required.'); } if (typeof control_function != 'function') { throw new Error( 'JX.behavior("'+name+'", <garbage>): '+ 'initialization function is not a function.'); }
|
if (__DEV__) { if (name in JX.behavior._behaviors) { throw new Error( 'JX.behavior("'+name+'", ...): '+ 'behavior is already registered.');
|
JX.behavior = function(name, control_function) { if (__DEV__) { if (name in behaviors) { throw new Error( 'JX.behavior("'+name+'", ...): '+ 'behavior is already registered.'); } if (!control_function) { throw new Error( 'JX.behavior("'+name+'", <nothing>): '+ 'initialization function is required.'); } if (typeof control_function != 'function') { throw new Error( 'JX.behavior("'+name+'", <garbage>): '+ 'initialization function is not a function.'); } } behaviors[name] = control_function; };
|
behaviors[name] = control_function; };
|
if (!control_function) { throw new Error( 'JX.behavior("'+name+'", <nothing>): '+ 'initialization function is required.'); } if (typeof control_function != 'function') { throw new Error( 'JX.behavior("'+name+'", <garbage>): '+ 'initialization function is not a function.'); } } JX.behavior._behaviors[name] = control_function; };
|
JX.behavior = function(name, control_function) { if (__DEV__) { if (name in behaviors) { throw new Error( 'JX.behavior("'+name+'", ...): '+ 'behavior is already registered.'); } if (!control_function) { throw new Error( 'JX.behavior("'+name+'", <nothing>): '+ 'initialization function is required.'); } if (typeof control_function != 'function') { throw new Error( 'JX.behavior("'+name+'", <garbage>): '+ 'initialization function is not a function.'); } } behaviors[name] = control_function; };
|
JX.bind = function(context, func) {
|
JX.bind = function(context, func, more) {
|
JX.bind = function(context, func/*, arg, arg, ...*/) { if (__DEV__) { if (typeof func != 'function') { throw new Error('Attempting to bind something that is not a function.'); } } var bound = JX.$A(arguments).slice(2); return function() { return func.apply(context || window, bound.concat(JX.$A(arguments))); }};
|
throw new Error('Attempting to bind something that is not a function.');
|
throw new Error( 'JX.bind(context, <yuck>, ...): '+ 'Attempting to bind something that is not a function.');
|
JX.bind = function(context, func/*, arg, arg, ...*/) { if (__DEV__) { if (typeof func != 'function') { throw new Error('Attempting to bind something that is not a function.'); } } var bound = JX.$A(arguments).slice(2); return function() { return func.apply(context || window, bound.concat(JX.$A(arguments))); }};
|
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
|
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
|
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
|
BlockNode: function (name, node_list) {
|
BlockNode: function (node_list, name) {
|
BlockNode: function (name, node_list) { return function (context) { var out = ''; // init block list if it isn't already if (!context.blocks[name]) { context.blocks[name] = []; } // put this block in front of list context.blocks[name].unshift( node_list ); // if this is a root template descend through templates and evaluate blocks for overrides if (!context.extends) { context.push(); context.blocks[name].forEach( function (list) { out = list.evaluate( context ); context.set('block', { super: out }); }); context.pop(); } return out; }; },
|
utils.iter.reduce( context.blocks[name], inner, '', function (error, result) {
|
iter.reduce( context.blocks[name], inner, '', function (error, result) {
|
BlockNode: function (node_list, name) { /* upon execution each block stores it's nodelist in the context * indexed by the blocks name. As templates are executed from child to * parent, similar named blocks add their nodelist to an array of * nodelists (still indexed by the blocks name). When the root template * is reached, the blocks nodelists are executed one after each other * and the super variable is updated down through the hierachy. */ return function (context, callback) { // init block list if it isn't already if (!context.blocks[name]) { context.blocks[name] = []; } // put this block in front of list context.blocks[name].unshift( node_list ); // if this is a root template descend through templates and evaluate blocks for overrides if (!context.extends) { context.push(); function inner(p, c, idx, block_list, next) { c.evaluate( context, function (error, result) { context.set('block', { super: result }); next(error, result); }); } utils.iter.reduce( context.blocks[name], inner, '', function (error, result) { context.pop(); callback(error, result); }); } else { // else return empty string callback(false, ''); } }; },
|
if (! ORBEON.util.Dom.hasClass(this.groupElement, "xforms-visited"))
|
if (! YAHOO.util.Dom.hasClass(this.groupElement, "xforms-visited"))
|
blur: function() { this.hasFocus = false; var cleanString = this.visibleInputElement.value.replace(new RegExp("[\\s,]", "g"), ""); // Remove prefix if at the beginning of the string if (cleanString.indexOf(this.prefix) == 0) cleanString = cleanString.substring(this.prefix.length); var cleanNumber = new Number(cleanString).toString(); var newValue = this.visibleInputElement.value == "" || cleanNumber == "NaN" ? this.visibleInputElement.value : cleanNumber; ORBEON.xforms.Document.setValue(this.xformsInputElement.id, newValue); this.visibleInputElement.value = this.numberToCurrency(this.visibleInputElement.value); // Update xforms-required-empty/xforms-required-filled and xforms-visited ORBEON.xforms.Controls.updateRequiredEmpty(this.groupElement, newValue); if (! ORBEON.util.Dom.hasClass(this.groupElement, "xforms-visited")) ORBEON.xforms.Controls.updateInvalidVisitedOnNextAjaxResponse(this.groupElement); },
|
a.previous=f}false!==a._trigger("select",c,{item:d})&&a.element.val(d.value);a.close(c);a.selectedItem=d},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();
|
var g=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=g;setTimeout(function(){a.previous=g},1)}false!==a._trigger("select",c,{item:d})&&a.element.val(d.value);a.term=a.element.val();a.close(c);a.selectedItem=d},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
|
a.previous=f}false!==a._trigger("select",c,{item:d})&&a.element.val(d.value);a.close(c);a.selectedItem=d},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();
|
if (! ORBEON.util.Dom.hasClass(this.groupElement, "xforms-visited")) { ORBEON.xforms.Events.runOnNext(ORBEON.xforms.Events.ajaxResponseProcessedEvent, function() { ORBEON.xforms.Controls.updateInvalidVisited(this.groupElement); }, this, true); }
|
if (! ORBEON.util.Dom.hasClass(this.groupElement, "xforms-visited")) ORBEON.xforms.Controls.updateInvalidVisitedOnNextAjaxResponse(this.groupElement);
|
blur: function() { this.hasFocus = false; var cleanString = this.visibleInputElement.value.replace(new RegExp("[\\s,]", "g"), ""); // Remove prefix if at the beginning of the string if (cleanString.indexOf(this.prefix) == 0) cleanString = cleanString.substring(this.prefix.length); var cleanNumber = new Number(cleanString).toString(); var newValue = this.visibleInputElement.value == "" || cleanNumber == "NaN" ? this.visibleInputElement.value : cleanNumber; ORBEON.xforms.Document.setValue(this.xformsInputElement.id, newValue); this.visibleInputElement.value = this.numberToCurrency(this.visibleInputElement.value); // Update xforms-required-empty/xforms-required-filled and xforms-visited ORBEON.xforms.Controls.updateRequiredEmpty(this.groupElement, newValue); if (! ORBEON.util.Dom.hasClass(this.groupElement, "xforms-visited")) { ORBEON.xforms.Events.runOnNext(ORBEON.xforms.Events.ajaxResponseProcessedEvent, function() { ORBEON.xforms.Controls.updateInvalidVisited(this.groupElement); }, this, true); } },
|
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
|
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a, "marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
|
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
|
__.boundPoint = function(r, type, p){
|
boundPoint: function(r, type, p){
|
__.boundPoint = function(r, type, p){ var rCenter = r.center(); if (type === "circle" || type === "ellipse"){ return ellipse(rCenter.x, rCenter.y, r.width/2, r.height/2).intersectionWithLineFromCenterToPoint(p); } // BUG: in lines intersection, can be all null // it happens when point is located on the bb boundary return r.boundPoint(p) || rCenter; };
|
if (type === "circle" || type === "ellipse"){ return ellipse(rCenter.x, rCenter.y, r.width/2, r.height/2).intersectionWithLineFromCenterToPoint(p);
|
if (type === "circle" || type === "ellipse"){ return ellipse(rCenter, r.width/2, r.height/2).intersectionWithLineFromCenterToPoint(p);
|
__.boundPoint = function(r, type, p){ var rCenter = r.center(); if (type === "circle" || type === "ellipse"){ return ellipse(rCenter.x, rCenter.y, r.width/2, r.height/2).intersectionWithLineFromCenterToPoint(p); } // BUG: in lines intersection, can be all null // it happens when point is located on the bb boundary return r.boundPoint(p) || rCenter; };
|
};
|
},
|
__.boundPoint = function(r, type, p){ var rCenter = r.center(); if (type === "circle" || type === "ellipse"){ return ellipse(rCenter.x, rCenter.y, r.width/2, r.height/2).intersectionWithLineFromCenterToPoint(p); } // BUG: in lines intersection, can be all null // it happens when point is located on the bb boundary return r.boundPoint(p) || rCenter; };
|
var gl_Slide=new Class({options:{active:'',fx:{wait:false,duration:350},scrollFX:{wait:false,transition:Fx.Transitions.Sine.easeInOut},dimensions:{width:722,height:200}},initialize:function(contents,options){this.setOptions(options);this.content=$(contents);this.sections=this.content.getElements('.tab-pane');if(!this.sections.length)return;this.filmstrip=new Element('div',{id:'gl_slide_hr'}).injectAfter(this.content);this.buildToolbar();this.buildFrame();if(window.ie)this.fixIE();this.scroller=$('scroller');this.startposition=$(this.sections[0].id.replace('-tab','-pane')).getPosition().x;this.scroller.scrollFX=new Fx.Scroll(this.scroller,this.options.scrollFX);if(this.options.active)this.scrollSection(this.options.active.test(/-tab|-pane/)?this.options.active:this.options.active+'-tab');else this.scrollSection(this.sectionptr[0])},buildToolbar:function(){var lis=[];var that=this;this.sectionptr=[];var h1,title;this.sections.each(function(el){el.setStyles({width:this.options.dimensions.width-102,height:this.options.dimensions.height});this.sectionptr.push(el.id.replace('-pane','-tab'));h1=el.getElement('.tab-title');title=h1.innerHTML;h1.empty().remove();lis.push(new Element('li',{id:el.id.replace('-pane','-tab'),events:{'click':function(){this.addClass('active');that.scrollSection(this)},'mouseover':function(){this.addClass('hover');this.addClass('active')},'mouseout':function(){this.removeClass('hover');this.removeClass('active')}}}).setHTML(title))},this);this.filmstrip.adopt(new Element('ul',{id:'gl_slide-tabs',styles:{width:this.options.dimensions.width}}).adopt(lis),new Element('hr'))},buildFrame:function(){var that=this,events={'click':function(){that.scrollArrow(this)},'mouseover':function(){this.addClass('hover')},'mouseout':function(){this.removeClass('hover')}};this.filmstrip.adopt(new Element('div',{id:'frame',styles:this.options.dimensions}).adopt(new Element('div',{'class':'button','id':'left','events':events}),new Element('div',{id:'scroller',styles:{width:this.options.dimensions.width-102,height:this.options.dimensions.height}}).adopt(this.content.setStyle('width',this.sections.length*1600)),new Element('div',{'class':'button','id':'right','events':events})))},fixIE:function(){this.filmstrip.getElement('hr').setStyle('display','none')},scrollSection:function(element){element=$($(element||this.sections[0]).id.replace('-pane','-tab'));var oldactive=element.getParent().getElement('.current');if(oldactive)oldactive.removeClass('current');element.addClass('current');var offset=$(element.id.replace('-tab','-pane')).getPosition().x-this.startposition;this.scroller.scrollFX.scrollTo(offset,false)},scrollArrow:function(element){var direction=Math.pow(-1,['left','right'].indexOf(element.id)+1);var current=this.sectionptr.indexOf(this.filmstrip.getElement('.current').id);var to=current+direction;this.scrollSection(this.sectionptr[to<0?this.sectionptr.length-1:to%this.sectionptr.length])}});gl_Slide.implement(new Options);
|
buildFrame:function(){ var that=this, events={ 'click':function(){ that.scrollArrow(this); that.autoScrollStop();}, 'mouseover':function(){ this.addClass('hover'); that.autoScrollStop();}, 'mouseout':function(){ this.removeClass('hover'); that.autoScrollStart();} }; this.filmstrip.adopt(new Element('div',{ id:this.options.cssvars.customID+'frame', styles:this.options.dimensions }).adopt(new Element('div',{ 'class':'button', 'id':'left', 'events':events }), new Element('div',{ id:this.options.cssvars.customID+'scroller', styles:{ width:this.options.dimensions.width-102, height:this.options.dimensions.height } }).adopt(this.content.setStyle('width',this.sections.length*1600)), new Element('div',{ 'class':'button', 'id':'right', 'events':events })) ) },
|
var gl_Slide=new Class({options:{active:'',fx:{wait:false,duration:350},scrollFX:{wait:false,transition:Fx.Transitions.Sine.easeInOut},dimensions:{width:722,height:200}},initialize:function(contents,options){this.setOptions(options);this.content=$(contents);this.sections=this.content.getElements('.tab-pane');if(!this.sections.length)return;this.filmstrip=new Element('div',{id:'gl_slide_hr'}).injectAfter(this.content);this.buildToolbar();this.buildFrame();if(window.ie)this.fixIE();this.scroller=$('scroller');this.startposition=$(this.sections[0].id.replace('-tab','-pane')).getPosition().x;this.scroller.scrollFX=new Fx.Scroll(this.scroller,this.options.scrollFX);if(this.options.active)this.scrollSection(this.options.active.test(/-tab|-pane/)?this.options.active:this.options.active+'-tab');else this.scrollSection(this.sectionptr[0])},buildToolbar:function(){var lis=[];var that=this;this.sectionptr=[];var h1,title;this.sections.each(function(el){el.setStyles({width:this.options.dimensions.width-102,height:this.options.dimensions.height});this.sectionptr.push(el.id.replace('-pane','-tab'));h1=el.getElement('.tab-title');title=h1.innerHTML;h1.empty().remove();lis.push(new Element('li',{id:el.id.replace('-pane','-tab'),events:{'click':function(){this.addClass('active');that.scrollSection(this)},'mouseover':function(){this.addClass('hover');this.addClass('active')},'mouseout':function(){this.removeClass('hover');this.removeClass('active')}}}).setHTML(title))},this);this.filmstrip.adopt(new Element('ul',{id:'gl_slide-tabs',styles:{width:this.options.dimensions.width}}).adopt(lis),new Element('hr'))},buildFrame:function(){var that=this,events={'click':function(){that.scrollArrow(this)},'mouseover':function(){this.addClass('hover')},'mouseout':function(){this.removeClass('hover')}};this.filmstrip.adopt(new Element('div',{id:'frame',styles:this.options.dimensions}).adopt(new Element('div',{'class':'button','id':'left','events':events}),new Element('div',{id:'scroller',styles:{width:this.options.dimensions.width-102,height:this.options.dimensions.height}}).adopt(this.content.setStyle('width',this.sections.length*1600)),new Element('div',{'class':'button','id':'right','events':events})))},fixIE:function(){this.filmstrip.getElement('hr').setStyle('display','none')},scrollSection:function(element){element=$($(element||this.sections[0]).id.replace('-pane','-tab'));var oldactive=element.getParent().getElement('.current');if(oldactive)oldactive.removeClass('current');element.addClass('current');var offset=$(element.id.replace('-tab','-pane')).getPosition().x-this.startposition;this.scroller.scrollFX.scrollTo(offset,false)},scrollArrow:function(element){var direction=Math.pow(-1,['left','right'].indexOf(element.id)+1);var current=this.sectionptr.indexOf(this.filmstrip.getElement('.current').id);var to=current+direction;this.scrollSection(this.sectionptr[to<0?this.sectionptr.length-1:to%this.sectionptr.length])}});gl_Slide.implement(new Options);
|
return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); });
|
return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); }, {});
|
buildNullDataSource: function() { var autoComplete = this; var WaitAjaxResponseDataSource = function(oLiveData, oConfigs) { this.dataType = YAHOO.util.DataSourceBase.TYPE_JSFUNCTION; oLiveData = oLiveData || function() {}; this.constructor.superclass.constructor.call(this, oLiveData, oConfigs); }; YAHOO.lang.extend(WaitAjaxResponseDataSource, YAHOO.util.DataSourceBase, { makeConnection : function(oRequest, oCallback, oCaller) { var dataSource = this; var tId = YAHOO.util.DataSourceBase._nTransactionId++; dataSource.fireEvent("requestEvent", {tId:tId,request:oRequest,callback:oCallback,caller:oCaller}); dataSource.responseType = YAHOO.util.DataSourceBase.TYPE_JSARRAY; return tId; } }); return new WaitAjaxResponseDataSource(function(query) { return autoComplete.getCurrentValues(query); }); },
|
var gl_Slide=new Class({options:{active:'',fx:{wait:false,duration:350},scrollFX:{wait:false,transition:Fx.Transitions.Sine.easeInOut},dimensions:{width:722,height:200}},initialize:function(contents,options){this.setOptions(options);this.content=$(contents);this.sections=this.content.getElements('.tab-pane');if(!this.sections.length)return;this.filmstrip=new Element('div',{id:'gl_slide_hr'}).injectAfter(this.content);this.buildToolbar();this.buildFrame();if(window.ie)this.fixIE();this.scroller=$('scroller');this.startposition=$(this.sections[0].id.replace('-tab','-pane')).getPosition().x;this.scroller.scrollFX=new Fx.Scroll(this.scroller,this.options.scrollFX);if(this.options.active)this.scrollSection(this.options.active.test(/-tab|-pane/)?this.options.active:this.options.active+'-tab');else this.scrollSection(this.sectionptr[0])},buildToolbar:function(){var lis=[];var that=this;this.sectionptr=[];var h1,title;this.sections.each(function(el){el.setStyles({width:this.options.dimensions.width-102,height:this.options.dimensions.height});this.sectionptr.push(el.id.replace('-pane','-tab'));h1=el.getElement('.tab-title');title=h1.innerHTML;h1.empty().remove();lis.push(new Element('li',{id:el.id.replace('-pane','-tab'),events:{'click':function(){this.addClass('active');that.scrollSection(this)},'mouseover':function(){this.addClass('hover');this.addClass('active')},'mouseout':function(){this.removeClass('hover');this.removeClass('active')}}}).setHTML(title))},this);this.filmstrip.adopt(new Element('ul',{id:'gl_slide-tabs',styles:{width:this.options.dimensions.width}}).adopt(lis),new Element('hr'))},buildFrame:function(){var that=this,events={'click':function(){that.scrollArrow(this)},'mouseover':function(){this.addClass('hover')},'mouseout':function(){this.removeClass('hover')}};this.filmstrip.adopt(new Element('div',{id:'frame',styles:this.options.dimensions}).adopt(new Element('div',{'class':'button','id':'left','events':events}),new Element('div',{id:'scroller',styles:{width:this.options.dimensions.width-102,height:this.options.dimensions.height}}).adopt(this.content.setStyle('width',this.sections.length*1600)),new Element('div',{'class':'button','id':'right','events':events})))},fixIE:function(){this.filmstrip.getElement('hr').setStyle('display','none')},scrollSection:function(element){element=$($(element||this.sections[0]).id.replace('-pane','-tab'));var oldactive=element.getParent().getElement('.current');if(oldactive)oldactive.removeClass('current');element.addClass('current');var offset=$(element.id.replace('-tab','-pane')).getPosition().x-this.startposition;this.scroller.scrollFX.scrollTo(offset,false)},scrollArrow:function(element){var direction=Math.pow(-1,['left','right'].indexOf(element.id)+1);var current=this.sectionptr.indexOf(this.filmstrip.getElement('.current').id);var to=current+direction;this.scrollSection(this.sectionptr[to<0?this.sectionptr.length-1:to%this.sectionptr.length])}});gl_Slide.implement(new Options);
|
buildToolbar:function(){ var lis=[]; var that=this; this.sectionptr=[]; var h1,title; this.sections.each(function(el){ el.setStyles({width:this.options.dimensions.width-102,height:this.options.dimensions.height }); this.sectionptr.push(el.id.replace('-pane','-tab')); h1=el.getElement('.'+this.options.cssvars.customID+'tab-title'); title=h1.innerHTML; h1.empty().remove(); lis.push(new Element('li',{ id:el.id.replace('-pane','-tab'), events:{ 'click':function(){ this.addClass('active'); that.scrollSection(this); that.autoScrollStop(); }, 'mouseover':function(){ this.addClass('hover'); this.addClass('active'); that.autoScrollStop(); }, 'mouseout':function(){ this.removeClass('hover'); this.removeClass('active'); that.autoScrollStart(); } } }).setHTML(title))},this); this.filmstrip.adopt(new Element('ul',{ id:this.options.cssvars.customID+'slide-tabs',styles:{ width:this.options.dimensions.width } }).adopt(lis),new Element('hr') ) },
|
var gl_Slide=new Class({options:{active:'',fx:{wait:false,duration:350},scrollFX:{wait:false,transition:Fx.Transitions.Sine.easeInOut},dimensions:{width:722,height:200}},initialize:function(contents,options){this.setOptions(options);this.content=$(contents);this.sections=this.content.getElements('.tab-pane');if(!this.sections.length)return;this.filmstrip=new Element('div',{id:'gl_slide_hr'}).injectAfter(this.content);this.buildToolbar();this.buildFrame();if(window.ie)this.fixIE();this.scroller=$('scroller');this.startposition=$(this.sections[0].id.replace('-tab','-pane')).getPosition().x;this.scroller.scrollFX=new Fx.Scroll(this.scroller,this.options.scrollFX);if(this.options.active)this.scrollSection(this.options.active.test(/-tab|-pane/)?this.options.active:this.options.active+'-tab');else this.scrollSection(this.sectionptr[0])},buildToolbar:function(){var lis=[];var that=this;this.sectionptr=[];var h1,title;this.sections.each(function(el){el.setStyles({width:this.options.dimensions.width-102,height:this.options.dimensions.height});this.sectionptr.push(el.id.replace('-pane','-tab'));h1=el.getElement('.tab-title');title=h1.innerHTML;h1.empty().remove();lis.push(new Element('li',{id:el.id.replace('-pane','-tab'),events:{'click':function(){this.addClass('active');that.scrollSection(this)},'mouseover':function(){this.addClass('hover');this.addClass('active')},'mouseout':function(){this.removeClass('hover');this.removeClass('active')}}}).setHTML(title))},this);this.filmstrip.adopt(new Element('ul',{id:'gl_slide-tabs',styles:{width:this.options.dimensions.width}}).adopt(lis),new Element('hr'))},buildFrame:function(){var that=this,events={'click':function(){that.scrollArrow(this)},'mouseover':function(){this.addClass('hover')},'mouseout':function(){this.removeClass('hover')}};this.filmstrip.adopt(new Element('div',{id:'frame',styles:this.options.dimensions}).adopt(new Element('div',{'class':'button','id':'left','events':events}),new Element('div',{id:'scroller',styles:{width:this.options.dimensions.width-102,height:this.options.dimensions.height}}).adopt(this.content.setStyle('width',this.sections.length*1600)),new Element('div',{'class':'button','id':'right','events':events})))},fixIE:function(){this.filmstrip.getElement('hr').setStyle('display','none')},scrollSection:function(element){element=$($(element||this.sections[0]).id.replace('-pane','-tab'));var oldactive=element.getParent().getElement('.current');if(oldactive)oldactive.removeClass('current');element.addClass('current');var offset=$(element.id.replace('-tab','-pane')).getPosition().x-this.startposition;this.scroller.scrollFX.scrollTo(offset,false)},scrollArrow:function(element){var direction=Math.pow(-1,['left','right'].indexOf(element.id)+1);var current=this.sectionptr.indexOf(this.filmstrip.getElement('.current').id);var to=current+direction;this.scrollSection(this.sectionptr[to<0?this.sectionptr.length-1:to%this.sectionptr.length])}});gl_Slide.implement(new Options);
|
g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
|
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.