App-Alice
view release on metacpan or search on metacpan
share/static/alice.js view on Meta::CPAN
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.6.1',
share/static/alice.js view on Meta::CPAN
style: function(element, value) {
element.style.cssText = value ? value : '';
}
}
};
Element._attributeTranslations.has = {};
$w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
Element._attributeTranslations.has[attr.toLowerCase()] = attr;
});
(function(v) {
Object.extend(v, {
href: v._getAttr2,
src: v._getAttr2,
type: v._getAttr,
action: v._getAttrNode,
share/static/alice.js view on Meta::CPAN
if (timePos >= this.startOn) {
if (timePos >= this.finishOn) {
this.render(1.0);
this.cancel();
this.event('beforeFinish');
if (this.finish) this.finish();
this.event('afterFinish');
return;
}
var pos = (timePos - this.startOn) / this.totalTime,
frame = (pos * this.totalFrames).round();
if (frame > this.currentFrame) {
this.render(pos);
this.currentFrame = frame;
}
}
},
cancel: function() {
if (!this.options.sync)
Effect.Queues.get(Object.isString(this.options.queue) ?
'global' : this.options.queue.scope).remove(this);
this.state = 'finished';
},
event: function(eventName) {
share/static/alice.js view on Meta::CPAN
p = m[5] ? str_repeat(c, x) : '';
o.push(s + (m[4] ? a + p : p + a));
}
else {
throw('Huh ?!');
}
f = f.substring(m[0].length);
}
return o.join('');
}
/* WysiHat - WYSIWYG JavaScript framework, version 0.2.1
* (c) 2008-2010 Joshua Peek
*
* WysiHat is freely distributable under the terms of an MIT-style license.
*--------------------------------------------------------------------------*/
var WysiHat = {};
WysiHat.Editor = {
attach: function(textarea) {
share/static/alice.js view on Meta::CPAN
Object.extend(editArea, WysiHat.Commands);
textarea.insert({before: editArea});
textarea.hide();
return editArea;
}
};
WysiHat.BrowserFeatures = (function() {
function createTmpIframe(callback) {
var frame, frameDocument;
frame = new Element('iframe');
frame.setStyle({
position: 'absolute',
left: '-1000px'
});
frame.onFrameLoaded(function() {
if (typeof frame.contentDocument !== 'undefined') {
frameDocument = frame.contentDocument;
} else if (typeof frame.contentWindow !== 'undefined' && typeof frame.contentWindow.document !== 'undefined') {
frameDocument = frame.contentWindow.document;
}
frameDocument.designMode = 'on';
callback(frameDocument);
frame.remove();
});
$(document.body).insert(frame);
}
var features = {};
function detectParagraphType(document) {
document.body.innerHTML = '';
document.execCommand('insertparagraph', false, null);
var tagName;
element = document.body.childNodes[0];
share/static/alice.js view on Meta::CPAN
var tagName;
element = document.body.childNodes[0];
if (element && element.tagName)
tagName = element.tagName.toLowerCase();
features.indentInsertsBlockquote = (tagName == 'blockquote');
}
features.run = function run() {
if (features.finished) return;
createTmpIframe(function(document) {
detectParagraphType(document);
detectIndentType(document);
features.finished = true;
});
}
return features;
})();
/* IE Selection and Range classes
share/static/alice.js view on Meta::CPAN
element = $(element);
var loaded, contentLoadedHandler;
loaded = false;
function fireFrameLoaded() {
if (loaded) return;
loaded = true;
if (contentLoadedHandler) contentLoadedHandler.stop();
element.fire('frame:loaded');
}
if (window.addEventListener) {
contentLoadedHandler = document.on("DOMFrameContentLoaded", function(event) {
if (element == event.element())
fireFrameLoaded();
});
}
element.on('load', function() {
var frameDocument;
if (typeof element.contentDocument !== 'undefined') {
frameDocument = element.contentDocument;
} else if (typeof element.contentWindow !== 'undefined' && typeof element.contentWindow.document !== 'undefined') {
frameDocument = element.contentWindow.document;
}
onReadyStateComplete(frameDocument, fireFrameLoaded);
});
return element;
}
function onFrameLoaded(element, callback) {
element.on('frame:loaded', callback);
element.observeFrameContentLoaded();
}
Element.addMethods({
observeFrameContentLoaded: observeFrameContentLoaded,
onFrameLoaded: onFrameLoaded
});
})();
document.on("dom:loaded", function() {
if ('onselectionchange' in document) {
( run in 0.537 second using v1.01-cache-2.11-cpan-e1769b4cff6 )