Displaying 4 results from an estimated 4 matches for "selectnodecontents".
2005 Dec 15
0
RJS Templates and the Replace semantics
...the object for our RJS extension to work
Object.extend(Element, {
replace: function(element, html) {
var el = $(element);
if (el.outerHTML) { // IE
el.outerHTML = html.stripScripts();
} else { // Mozilla
var range = el.ownerDocument.createRange();
range.selectNodeContents(el);
el.parentNode.replaceChild(range.createContextualFragment(html.stripScri
pts()), el);
}
setTimeout(function() {html.evalScripts()}, 10);
}
}
);
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://l...
2006 Jan 20
1
Update HTML Element with Ajax
I have following files.
list.rhtml
-----------------------
<ul id="items">
<%= render(:partial => ''item'', :collection => @items) %>
</ul>
_item.rhtml
------------------------
<li id="<%= item.id %>" >
<%= item.name %>
<%= item.body %>
</li>
edit.rjs
------------------------
page.replace_html
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...e: function(element, node) {
+ element.parentNode.insertBefore(node, element);
},
- top: {
- adjacency: 'afterBegin',
- insert: function(element, node) {
- element.insertBefore(node, element.firstChild);
- },
- initializeRange: function(element, range) {
- range.selectNodeContents(element);
- range.collapse(true);
- }
+ top: function(element, node) {
+ element.insertBefore(node, element.firstChild);
},
- bottom: {
- adjacency: 'beforeEnd',
- insert: function(element, node) {
- element.appendChild(node);
- }
+ bottom: function(element, n...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply
to this email, as some of the replaced lines are too long, so git
won't let me send the email. However, there is nothing wrong with
that patch, and it should be applied in the sequence listed below.
Note also that I assume this will be tested on a clean f11 install, rather
than an upgrade of an existing ovirt server