I have a div called #output, styled with overflow: scroll;. Using jQuery.ajax, it's being updated every x second. I'd like to have it so that when the scrollbar appears (after the divs filled up), it should continously stay at the bottom of the div instead of the top, like most chat clients do.
I'm sure there's a way to do this, I just ...
I have been trying, quite unsuccessfully, to run henrik's fork of the jekyll static blog generator on ubuntu 64 bit. I just can't seem to figure this out and I've tried a bunch of different things. Thanks!!
The base stats of my machine: Ubuntu 9.04, 64 bit, ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux], rubygems 1.3.1.
When I ...
I am new to haml and want to do some inheritance, but I don't know whether it is possible with haml or not.
I have 2 separate haml files as below
=== file1.haml
%p
This is haml1
=== file2.haml
%h1
This is haml2
*** I want to have a file.haml which inherit from file1.haml and file2.haml.
Is it possible to do it with haml?
...
I'm getting Ruby on Rails set up on a fresh installation of Snow Leopard. After battling (and beating) MySQL and Sphinx problems, I'm stuck on a stupid error related to HAML.
Essentially I'm getting a missing template error for every view that uses HAML. I can add a blank xxx.html.erb file and and a (blank) page loads fine. But xxx.html...
Using the same form partial in both create and edit in my case new and preview.
partial looks somewhat like this (I use HAML)
=form_tag ({:action => params[:action]}, :multipart => true)
=text_field :newsletter, :title
=text_area :newsletter, :body
=file_field :newsletter,:attachment
-if params[:action] == "preview"
=butto...
This is my code. I have a problem with spaces. I can not get the proper generation
- if @lastday.nil? && @lastday != item.created_at.strftime("%d %b %Y")
.daily-entry
%h1.date
=h item.created_at.strftime("%d")
%span
=h item.created_at.strftime("%b, %Y")
-else
.entry
%h1
= link_to item.title, "/i...
This plugin is pretty good, definitely better than plain-text.. but I'm longing for a little more. Code completion, the Netbeans code generator shortcuts, 'ri' integration for looking up documentation like the .erb files have..
Does anyone have some tricks, is there a different plugin for this type of functionality in Netbeans?
Definit...
Are there any plugins for eclipse that add syntax highlighting and other niceties for editing Haml and Sass? Google searches only seem to point to a dead project on lucky-dip.net.
Note: it's Sass I'm most interested in. A solution for using just Sass (or something similar to it like less) in Eclipse would suit my needs.
Also, I'm devel...
Using the (intentionally) strange multi-line format for HAML, I'd like to have the following lines in my template:
= call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', |
:foo4 => 'bar4', :foo5 => 'bar5' |
-# and
= call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', |
:foo4 => 'bar4', :foo5 => 'bar5' |
...
I've written this HAML:
%script{:src => "http://www.google.com/jsapi?key=mykey" :type => "text/javascript"}
Note the missing comma between :src and :type.
On my Production server (Dreamhost/Linux), I get the following logged exception when I try to view the page:
ActionView::TemplateError (compile error
/home/.kuce/sugarthrill_stage...
Say I have a things resource with a view helper method such as:
module ThingsHelper
def foo
ret = ""
3.times { ret += content_tag(:li, "foo") }
content_tag(:ul, ret)
end
end
This, then, is used in a template:
%p
= foo
The HTML source that's generated looks like this:
<!DOCTYPE html>
<html>
<head>
<tit...
I'm using the following webrat matcher:
response.should contain(text)
With the following haml:
%p
You have
= current_user.credits
credits
I've written the cucumber step 'Then I should see "You have 10 credits"', which uses the webrat matcher above. The step fails, webrat does not find the text in the response because the ham...
This feels like it should be pretty simple, but not much seems to be loading.
I have this in my app/views/layouts/application.html.haml:
= javascript_include_tag 'http://www.google.com/jsapi'
%script{ :type => "text/javascript", :charset => "utf-8" }
//<![CDATA[
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.2");
...
Is there anyway to have HAML automatically convert all my apostrophe's ' to the HTML character entity equivalents (’)?
Ditto with all the other characters that one would want to convert (dashes, double-quotes, etc.) for better online readability.
?
...
I have a problem in trying to link a stand with two checkboxes which are resident & communication, and they seem to be stored separately if more than one stand is choosen.
If I have one stand the parameters seem to be stored in the correct manner inside a hash of an array, but once I add another stand to that same array it seems to swap...
I'm trying to hook up a blog with some xml namespaces and xml stylesheets.
The ugly way that I'm doing this currently looks like so:
!!! XML
= partial('xmlstyle')
%channel
......blah.....
= partial('xmlend')
where
_xmlstyle.xml.erb looks like:
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>
<?xml-st...
Hi guys, I have the following mixin in a sass partial:
=card-list
width: 180px
min-height: 150px
display: -moz-inline-stack
display: inline-block
vertical-align: top
margin: 5px
zoom: 1
*display: inline
_height: 250px
-moz-border-radius: 10px
-webkit-border-radius: 10px
Now, when I tried to make it parameterized ...
I have a rails create action which send back some jquery in a file:
create.js.erb
var appearance = $("<%= escape_javascript(render(:partial => @appearance)) %>").effect("highlight", {color: '#E6ff00'}, 2000);
$("#sortable").append(appearance);
$("#new_appearance")[0].reset();
I have started using HAML and want to know how I should be...
I've encountered this issue on two different machines and can't figure out what the cause is.
SASS syntax highlighting works fine in TextMate when I install a SASS bundle like this. However, when I also install a HAML bundle, like this one, SASS code reverts to plain text color.
I've tried a bunch of different combinations of bundles o...
I'm using gEdit to edit haml files and the auto indenting feature seems to work when i'm writing one line after another, but when I go and clear out a exisiting element (a div or a class) the rest of the code below doesn't adjust itself. Suppose this is my code
.rightside
.container
%ul
%li hello
%li world
Now is the...