similar to: RJS Templates with dynamic id names

Displaying 20 results from an estimated 9000 matches similar to: "RJS Templates with dynamic id names"

2006 Feb 08
3
Using shared RJS templates
I''ve got an action in my application controller that needs to call a shared RJS template. Typically it''s actually being called by subclasses of the application controller. I''ve tried this.. def action ...code.. render :partial => "shared/template" end with ''_template.rjs'' existing in the shared folder. The problem that crops
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates. Rails doesn''t seem to find them. I did issue the rake comment update_javascripts and that did not correct the problem. RJS is part of 1.1 right? Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 17
2
Building Dynamic DOM Element IDs for RJS Templates
My element IDs are constructed using the object id. So . . . <div id="foo<%= foo.id %>" > <p><%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %> </div> How do, and can I, build that id in the RJS template? Also, can anyone recommend a good Ruby syntax book that would help me out with Rails? I know
2006 May 04
1
Instance or local vars for field helpers in partial template
I''m getting confused. If I have a view (.rhtml), I can use a field helper like: <%= text_field :mymodel, :attribute %> This uses the value from @mymodel.attribute Now, if I am rendering a template normally (i.e. not partial), I would expect @mymodel to be a model object defined as an instance variable in the controller. However, if I am rendering a partial template, I
2006 Apr 28
10
Sharing RJS Templates
Hello All, I''m enjoying the simplicity and power of RJS templates in Rails 1.1, but am perplexed about sharing them. I have several templates that I would like to access in various controllers, but if I moved them to views/shared/whatever.rjs, my app can''t seem to find them. I changed the name to _whatever.rjs and referenced them as "shared/whatever", but no luck.
2006 Jul 03
2
rjs renders string or partial but not template or action
Hi, I have an rjs file. I only have one controller called called front. I have views called "new_title.rhtml" and "_new_title.rhtml" These work page.replace_html ''title'', ''new title'' page.replace_html ''title'', :partial => ''new_title'' page.replace_html ''title'',
2006 Feb 06
6
.rjs template doesn''t load?
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060206/cf123b71/PGP.bin
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and then used wget to look at the output the RJS template generates. This is what I got: try { new Insertion.Bottom("list", "<li>Fox</li>"); new Effect.Highlight("list",{duration:1}); Element.update("header", "RJS
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ? -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2006 May 04
1
Ajas Scaffolding and RJS Templates the same thing?
Hey all, I''m just starting in rails and am working on my first app. I need to do inline editing for 2-15 rows of data on a page. I found Ajax Scaffolding here: http://www.ajaxscaffold.com/ And it is EXACTLY what I want in my app. But I''ve also been trying to read a bit up on RJS Templates. Are they basically the same things except RJS is built into rails or is the
2006 Feb 18
2
Effect queues with RJS templates and scriptaculous
Hi. I was wondering if it''s possible to combine effects for individual elements with RJS templates. I notice that scriptaculous has support for a concept called effect queues (http://www.railsdevelopment.com/2006/01/15/effectqueue/). Is there anyway to use these queues from rjs?
2006 Mar 29
2
vim syntax highlighting of rjs templates
Are there config files for vim that offer syntax highlighting of rjs templates? Charlie Bowman http://www.recentrambles.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060329/486c9d84/attachment.html
2005 Dec 19
1
Question about rjs templates
Hi everyone I read some support about rjs templates at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates but when i download the rails1.0, i could not find the code in http://dev.rubyonrails.org/changeset/3078 ,and i also could not find the file actionpack/test/fixtures/test/delete_with_js.rjs is something wrong with me.thanks for your answers. -- Posted via
2006 Jan 29
2
GetText and rjs templates?
hi, is it possible that gettext don''t work with rjs templates? i''ve just tried this simple example blog_controller.rb : class BlogController < ApplicationController def index end def dosomething end end index.rhtml : <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <div id="test">Some text to change
2006 Aug 01
6
Getting Started on RJS Templates
I definitely need to use RJS templates for my current application. I''ve used Google for the past twenty minutes or so, yet I can''t find a good resource that will get me started and show me what the page object can do. Any links? When an Ajax link is clicked, I''m trying to change the background of a "primary" list item, as well as the background and text of
2006 Feb 08
3
RJS templates before, during and after
RJS templates are nifty. They let you put all sorts of fun effects all over your bland html pages without too much work. The link_to_remote function also lets you run scripts before, during, and after an AJAX call is run by using callbacks. There does not seem to be an equivalent method for running an RJS template before or during an action. Rendering it at the end is no problem. One
2005 Dec 15
2
Rails 1.0 & RJS Templates
Hello all, I just successfully updated my dev env to Rails 1.0. I then wanted to get .rjs templates working and followed Cody''s instructions at http://www.codyfauser.com/articles/2005/12/02/rails-rjs-templates-plugin . However, when I try to run ''rake test'' I get the following error: (in
2006 Jun 19
1
RJS Templates
I have a page that when a form gets submitted, I use page.insert_html to stick a div in another div. The problem is, when I want to refernce it later on, the IDs are not unique. So to get around this, I concatenated the id of the item to the end of the div name. Which is fine. I did the same in the RJS template as well, but it''s not finding that div. I tried it with string
2006 Jan 09
2
Using RJS templates with observe_form
Hi there, I''ve been checking out RJS templates, and have been trying to use them with the observe_form helper. However, the form values are no longer being passed in the params (as soon as I point the action to the non-rjs and add the ''update'' clause everything is working again). Is this expected? Cheers, Dave -------------- next part -------------- An
2006 Aug 18
3
RJS templates for DOM manipulation
I want to do some DOM manipulation with JavaScript. Specifically I want to implement zoom in/out in a picture by changing it''s width/height attributes. Is it possible to do this using RJS or should I write javascript by hand? All the examples of RJS I''ve seen write the javascript in the result of an AJAX remote call. Where are the docs for RJS? All I''ve seen are blog