Skip to content

Commit

Permalink
Should fix #551
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Smith committed Mar 31, 2009
1 parent 9dc79ac commit e1dde1d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
16 changes: 7 additions & 9 deletions addons/ajax/gtdajax.js
Expand Up @@ -348,7 +348,7 @@ function doAJAXupdate(thisnode,overlay) {
* overlay: an object containing key:value pairs to be sent to the server as data
*/
var node,data,row;
row=$(thisnode).parents('tr').get(0);
row=$(thisnode).parents('tr:first');
if ($(row).hasClass('inajax')) {return false;}
$(row).addClass('inajax onajaxcall').animate({opacity:0.1},100);
node=thisnode;
Expand Down Expand Up @@ -867,11 +867,10 @@ function completeFromReport(event) {
success:function (xmldata, textStatus) {
var dateCompleted=$('gtdphp values dateCompleted',xmldata).text(),
rowpos=that.position();
that.parents('td').
eq(0).
that.parents('td:first').
empty().
text(dateCompleted).
parents('tr').
parents('tr:first').
children('th').
text('Completed on:');
$('#debuglog').
Expand Down Expand Up @@ -930,7 +929,7 @@ function checkboxclicked(e) {
tgt = e.target;
// first see if we've got a drop-down box attached to the table, where the user can change the action
cbox=$(tgt).
parents('table').
parents('table:first').
find('th.col-checkbox select');
if (cbox.length) {
ajaxdata.action=cbox.val();
Expand Down Expand Up @@ -964,7 +963,7 @@ function createFormForNewItem(evt) {
* create a table row within which the user can create a new item of a specific type
*/
var tgt = evt.target,
row = $(tgt).parents("form").find("tr.creatortemplate:first"),
row = $(tgt).parents("form:first").find("tr.creatortemplate:first"),
newrow = row.clone().
insertBefore(row).
removeClass("sortbottom hidden creatortemplate").
Expand Down Expand Up @@ -1298,7 +1297,7 @@ function showcolumnselector(e) {
collist=$(document.createElement('ul')). // insert a UL into the popup DIV
appendTo(coldiv).
attr('id','collist').
data('linkedtable',$(e.target).parents('table').eq(0)). // record which TABLE we are tweaking
data('linkedtable',$(e.target).parents("table:first")). // record which TABLE we are tweaking
sortable({update:movecolumn,distance:5}); // use the jQuery UI drag-and-drop sorter

$(e.target).
Expand Down Expand Up @@ -1479,8 +1478,7 @@ GTD.ajax.setNoChildren=function(tables) {
nochild=$(tables[tableid]);

$('#'+tableid).
parents('div').
eq(0).
parents('div:first').
addClass('hidden'). // hide the corresponding table
after(nochild); // restore the text reporting that there are no children of this type

Expand Down
2 changes: 1 addition & 1 deletion addons/ajax/ubiquity.inc.php
Expand Up @@ -232,7 +232,7 @@ function gtd_itemCompleted(xml, status) {
// back from AJAX call

var row = jQuery(aEvent.target).parents("tr"), // this is the row we are dealing with:
thisTab = row.parents("table").eq(0); // table to which the row belongs
thisTab = row.parents("table:first"); // table to which the row belongs

// report the successful completion to the user
thisTab.parent().
Expand Down
2 changes: 1 addition & 1 deletion gtd_constants.inc.php
@@ -1,5 +1,5 @@
<?php
define('_GTD_REVISION',594);
define('_GTD_REVISION',595);
define('_GTD_VERSION','0.8z.08'); // DATABASE version
define('_GTDPHP_VERSION','0.9beta'); // gtd-php version, as per the TRAC system

Expand Down
7 changes: 3 additions & 4 deletions gtdfuncs.js
Expand Up @@ -76,8 +76,8 @@ function manualcellindex(cell) {
find('th,td').
each(function mci_each(id){
if (this===cell) {
index=id;
return false;
index=id; // found the cell we were looking for, so record its index
return false; // and quit the mci_each loop
}
});
return index;
Expand Down Expand Up @@ -542,8 +542,7 @@ GTD.checkRecurrence = function checkRecurrence(aEvent) {
return true;
}
GTD.showrecurbox();
recurField.parents("p,div").eq(0).animateShow();

recurField.parents("tr,div").filter(":last").animateShow();
return true;
};
// ======================================================================================
Expand Down
3 changes: 2 additions & 1 deletion preferences.php
Expand Up @@ -124,7 +124,8 @@ function makeOptionsTab($array,$values,$tabname,$varprefix='',$textsize=10) {
$array[]=array($addon,'checkbox',"<b>$addon</b> $desc");
}
$live=array();
if ($_SESSION['addons']) foreach ($_SESSION['addons'] as $where)
if (array_key_exists('addons',$_SESSION) && is_array($_SESSION['addons']))
foreach ($_SESSION['addons'] as $where)
if (is_array($where)) foreach ($where as $page)
if ($page) foreach ($page as $addonname=>$how)
$live[$addonname]=true;
Expand Down

0 comments on commit e1dde1d

Please sign in to comment.