(I kept getting an error with an attachment, lets see if it goes through
without one since the error didn''t say what was wrong)
This page works fine in Firefox, but is broken in IE.
The delMan link works fine to delete all the records for that employee,
but the individual rows is broken.
On some rows, when you click the delRow button, that row will be
deleted, the row below''s description will move up, but its cells will
remain in their current position. Then everything after that will move
up as expected. This results in it looking like a row and a half were
deleted -
if row 3 is deleted, row 4''s descripion moves up, but its cells do not.
They are then covered by row 5 when it moves into its new position. So
you see
desc 1 cell 1
desc 2 cell 2
desc 4
desc 5 cell 5
I''ve narrowed it down to the following bit of CSS.
.timecard_row {
position:absolute;
left: 150px;
}
.OT { color:black; background-color:yellow;}
//.OT { color:black; }
As is, this will break, but if I remove the background-color from .OT,
or the position from .timecard_row, it will work fine - removing either
one fixes it.
I''ve attached a stripped down version of my code. Its mainly a copy
and
paste from a view-source so there is no ruby code in there. On my
machine if you clicked an A row first, you would see the misplaced rows,
the Bs behave. The controller was called task, though you could do a
find / replace to change it.
Any insight into how to fix this would be appreciated. I really need to
keep the position as absolute, and would like the descriptions to be
highlighted if possible.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Since the attachment is giving an application error, here is the code
for the files. Sorry bout this.
deleteRow.rjs
page.remove "row_" + @id.to_s
deleteAll.rjs
page.remove "emp_" + @id.to_s
tasks_controller.rb
class TasksController < ApplicationController
def index
end
def deleteAll
@id = params[:id]
end
def deleteRow
@id = params[:id]
end
end
Index.rhtml (sorry - it looks like crap)
<html>
<head>
<title>Demo Project</title>
<%= javascript_include_tag :defaults %>
<style>
.timecard_row {
position:absolute;
left: 150px;
}
.OT { color:black; background-color:yellow;}
//.OT { color:black; }
</style>
</head>
<body>
<div id="emp_2369">
<div id="2369" style="display:inline"><b>Dave
A</b></div>
<a href="#" onclick="new
Ajax.Request(''/tasks/deleteAll/2369'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delman"
border="0px" src="/images/delMan.gif" /></a>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1319">
<form action="" method="post" id="1319"
name="form1319">
<div style="display: inline;" class="Reg"
id="desc_1319">
<b>Row</b> - Type A
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1319">
<td><input class="Reg_c" id="2369_3_h1"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_3_h2"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_3_h3"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_3_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1319'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1319.action=''/tasks/newRow/1319'';document.form1319.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1320">
<form action="" method="post" id="1320"
name="form1320">
<div style="display: inline;" class="Reg"
id="desc_1320">
<b>Row</b> - Type B
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1320">
<td><input class="Reg_c" id="2369_4_h1"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_4_h2"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_4_h3"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_4_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1320'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1320.action=''/tasks/newRow/1320'';document.form1320.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1318">
<form action="" method="post" id="1318"
name="form1318">
<div style="display: inline;" class="OT"
id="desc_1318">
<b>Row</b> - Type A
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1318">
<td><input class="OT_c" id="2369_5_h1"
type="text" value=""></td>
<td><input class="OT_c" id="2369_5_h2"
type="text" value=""></td>
<td><input class="OT_c" id="2369_5_h3"
type="text" value=""></td>
<td><input class="OT_c" id="2369_5_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1318'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1318.action=''/tasks/newRow/1318'';document.form1318.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1316">
<form action="" method="post" id="1316"
name="form1316">
<div style="display: inline;" class="Reg"
id="desc_1316">
<b>Row</b> -Type A
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1316">
<td><input class="Reg_c" id="2369_6_h1"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_6_h2"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_6_h3"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_6_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1316'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1316.action=''/tasks/newRow/1316'';document.form1316.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1317">
<form action="" method="post" id="1317"
name="form1317">
<div style="display: inline;" class="OT"
id="desc_1317">
<b>Row</b> - Type B
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1317">
<td><input class="OT_c" id="2369_7_h1"
type="text" value=""></td>
<td><input class="OT_c" id="2369_7_h2"
type="text" value=""></td>
<td><input class="OT_c" id="2369_7_h3"
type="text" value=""></td>
<td><input class="OT_c" id="2369_7_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1317'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1317.action=''/tasks/newRow/1317'';document.form1317.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
<div class="entry" style="display: inline;
font-size:80%;"
id="row_1314">
<form action="" method="post" id="1314"
name="form1314">
<div style="display: inline;" class="Reg"
id="desc_1314">
<b>Row</b> -Type B
</div>
<div class="timecard_row" style="display: inline;"
id="cells_1314">
<td><input class="Reg_c" id="2369_8_h1"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_8_h2"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_8_h3"
type="text" value=""></td>
<td><input class="Reg_c" id="2369_8_h4"
type="text" value=""></td>
<td><a href="#" onclick="new
Ajax.Request(''/tasks/deleteRow/1314'',
{asynchronous:true, evalScripts:true}); return false;"><img
alt="Delrow"
border="0px" src="/images/delRow.gif"
/></a></td>
<td style="display:inline;">
<SELECT NAME="addPhase" WIDTH="57" STYLE="width:
57px"
onChange="document.form1314.action=''/tasks/newRow/1314'';document.form1314.submit()">
<OPTION VALUE="" selected>Copy
<OPTION VALUE="1" class="Reg">Reg
<OPTION VALUE="2" class="OT">OT
</SELECT>
</td>
</div>
</form>
</div>
</div>
</body>
</html>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---