view release on metacpan or search on metacpan
lib/Apache/SdnFw/js/effects.js view on Meta::CPAN
(effect.dims[0] - effect.element.clientHeight) + 'px' });
},
afterFinishInternal: function(effect) {
effect.element.hide().undoClipping().undoPositioned();
effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
}
}, arguments[1] || { })
);
};
// Bug in opera makes the TD containing this element expand for a instance after finish
Effect.Squish = function(element) {
return new Effect.Scale(element, window.opera ? 1 : 0, {
restoreAfterFinish: true,
beforeSetup: function(effect) {
effect.element.makeClipping();
},
afterFinishInternal: function(effect) {
effect.element.hide().undoClipping();
}
});
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js view on Meta::CPAN
cell = grid[posY][x].elm;
if (cell != lastCell) {
if (!before) {
rowSpan = getSpanVal(cell, 'rowspan');
if (rowSpan > 1) {
cell.rowSpan = rowSpan + 1;
continue;
}
} else {
// Check if cell above can be expanded
if (posY > 0 && grid[posY - 1][x]) {
otherCell = grid[posY - 1][x].elm;
rowSpan = getSpanVal(otherCell, 'rowspan');
if (rowSpan > 1) {
otherCell.rowSpan = rowSpan + 1;
continue;
}
}
}
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js view on Meta::CPAN
if (start)
rng.setStartBefore(node);
else
rng.setEndBefore(node);
return;
}
} while (node = (start ? walker.next() : walker.prev()));
};
// Try to expand text selection as much as we can only Gecko supports cell selection
selectedCells = dom.select('td.mceSelected,th.mceSelected');
if (selectedCells.length > 0) {
rng = dom.createRng();
node = selectedCells[0];
endNode = selectedCells[selectedCells.length - 1];
setPoint(node, 1);
walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
do {
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce.js view on Meta::CPAN
(function(c){var a=/^\s*|\s*$/g,d;var b={majorVersion:"3",minorVersion:"3.8",releaseDate:"2010-06-30",_init:function(){var r=this,o=document,m=navigator,f=m.userAgent,l,e,k,j,h,q;r.isOpera=c.opera&&opera.buildNumber;r.isWebKit=/WebKit/.test(f);r.isIE...
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
Menu : function(id, s) {
var t = this;
t.parent(id, s);
t.items = {};
t.collapsed = false;
t.menuCount = 0;
t.onAddItem = new tinymce.util.Dispatcher(this);
},
expand : function(d) {
var t = this;
if (d) {
walk(t, function(o) {
if (o.expand)
o.expand();
}, 'items', t);
}
t.collapsed = false;
},
collapse : function(d) {
var t = this;
if (d) {
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
],
forecolor : {inline : 'span', styles : {color : '%value'}},
hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}},
fontname : {inline : 'span', styles : {fontFamily : '%value'}},
fontsize : {inline : 'span', styles : {fontSize : '%value'}},
fontsize_class : {inline : 'span', attributes : {'class' : '%value'}},
blockquote : {block : 'blockquote', wrapper : 1, remove : 'all'},
removeformat : [
{selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true},
{selector : 'span', attributes : ['style', 'class'], remove : 'empty', split : true, expand : false, deep : true},
{selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true}
]
});
// Register default block formats
each('p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp'.split(/\s/), function(name) {
t.formatter.register(name, {block : name, remove : 'all'});
});
// Register user defined formats
t.formatter.register(t.settings.formats);
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
if (format.split === undefined)
format.split = !format.selector || format.inline;
// Default to true
if (format.remove === undefined && format.selector && !format.inline)
format.remove = 'none';
// Mark format as a mixed format inline + block level
if (format.selector && format.inline) {
format.mixed = true;
format.block_expand = true;
}
// Split classes if needed
if (typeof(format.classes) === 'string')
format.classes = format.classes.split(/\s+/);
});
formats[name] = format;
}
}
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
});
};
if (format) {
if (node) {
rng = dom.createRng();
rng.setStartBefore(node);
rng.setEndAfter(node);
applyRngStyle(expandRng(rng, formatList));
} else {
if (!selection.isCollapsed() || !format.inline) {
// Apply formatting to selection
bookmark = selection.getBookmark();
applyRngStyle(expandRng(selection.getRng(TRUE), formatList));
selection.moveToBookmark(bookmark);
selection.setRng(moveStart(selection.getRng(TRUE)));
ed.nodeChanged();
} else
performCaretAction('apply', name, vars);
}
}
};
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
out = out[start ? 'firstChild' : 'lastChild'];
dom.remove(node, true);
return out;
};
function removeRngStyle(rng) {
var startContainer, endContainer;
rng = expandRng(rng, formatList, TRUE);
if (format.split) {
startContainer = getContainer(rng, TRUE);
endContainer = getContainer(rng);
if (startContainer != endContainer) {
// Wrap start/end nodes in span element since these might be cloned/moved
startContainer = wrap(startContainer, 'span', {id : '_start', _mce_type : 'bookmark'});
endContainer = wrap(endContainer, 'span', {id : '_end', _mce_type : 'bookmark'});
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
function wrap(node, name, attrs) {
var wrapper = dom.create(name, attrs);
node.parentNode.insertBefore(wrapper, node);
wrapper.appendChild(node);
return wrapper;
};
function expandRng(rng, format, remove) {
var startContainer = rng.startContainer,
startOffset = rng.startOffset,
endContainer = rng.endContainer,
endOffset = rng.endOffset, sibling, lastIdx;
// This function walks up the tree if there is no siblings before/after the node
function findParentContainer(container, child_name, sibling_name, root) {
var parent, child;
root = root || dom.getRoot();
for (;;) {
// Check if we can move up are we at root level or body level
parent = container.parentNode;
// Stop expanding on block elements or root depending on format
if (parent == root || (!format[0].block_expand && isBlock(parent)))
return container;
for (sibling = parent[child_name]; sibling && sibling != container; sibling = sibling[sibling_name]) {
if (sibling.nodeType == 1 && !isBookmarkNode(sibling))
return container;
if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling))
return container;
}
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
if (isBookmarkNode(endContainer.parentNode))
endContainer = endContainer.parentNode;
if (isBookmarkNode(endContainer))
endContainer = endContainer.previousSibling || endContainer;
// Move start/end point up the tree if the leaves are sharp and if we are in different containers
// Example * becomes !: !<p><b><i>*text</i><i>text*</i></b></p>!
// This will reduce the number of wrapper elements that needs to be created
// Move start point up the tree
if (format[0].inline || format[0].block_expand) {
startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling');
endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling');
}
// Expand start/end container to matching selector
if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) {
function findSelectorEndPoint(container, sibling_name) {
var parents, i, y;
if (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name])
container = container[sibling_name];
parents = getParents(container);
for (i = 0; i < parents.length; i++) {
for (y = 0; y < format.length; y++) {
if (dom.is(parents[i], format[y].selector))
lib/Apache/SdnFw/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js view on Meta::CPAN
}
}
return node || container;
};
// Find new startContainer/endContainer if there is better one
startContainer = findBlockEndPoint(startContainer, 'previousSibling');
endContainer = findBlockEndPoint(endContainer, 'nextSibling');
// Non block element then try to expand up the leaf
if (format[0].block) {
if (!isBlock(startContainer))
startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling');
if (!isBlock(endContainer))
endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling');
}
}
// Setup index for startContainer