This topic is locked

Inline Edit - Custom View

3/21/2012 2:20:40 PM
PHPRunner General questions
S
stiven author

Hello everyone,
I hope this is possible, can I call the Inline Edit function on a link? for example. on the list page I have a custom view with the code below, but this doesn't work I don't know the syntax or if this is even possible I would like that when the user clicks the link Inline Edit opens. Hope this makes sense..



if($value == "check"){

$fvalue = '<a id="iEditLink4" name="iEditLink4" href="pendings_edit.php?editid1='.$data['case_no'].'"><font color="#B80000">CHECK</font></a>';

}

else if($value == "no"){

$fvalue = '<font color="#888888">Not Necessary</font>';

}

else if($value == "done"){

$fvalue = '<font color="#888888">DONE!</font>';

}
$value = $fvalue;


Thanks for your help

S
stiven author 3/21/2012

Thanks Cristian,
I don't understand much :/ so i add this code to Javascript onLoad and then what?



// define table name of current list page:

var tableName = 'TableName';

var pageObj = Runner.pages.PageManager.getAt(tableName, pageid);



// get list of record IDs

var recsId = pageObj.inlineEdit.getRecsId();



// click inline edit link

pageObj.inlineEdit.editRecByInd(recsId[X]);


this will open inline edit on page load.. i need to open it when the user clicks the a link on one of the fields in the list page.. and how can i get the 'recsId[X]' dynamically?
Thanks very much

C
cgphp 3/21/2012

You can load the inline popup of a record of the table page where you are at that moment. For example, if you are on the pendings list page you can load the popup of a pendings record not the popup of a record of another table. Hope to be clear.

S
stiven author 3/21/2012

I change this a little bit i need to open the edit pop up on the view page in custom view. I understand what you said I im trying to actually load the edit pop up of the pendings table not another table from the link you sent me, it seems it only works on the list pages, but i have this on the view page.


if($value == "check"){

$fvalue = '<a href="#" onClick="window.open(\'pendings_edit.php?editid1='.$data['case_no'].'\',\'\',\'width=600,height=300\');"><font color="#B80000">CHECK</font></a>

';//this one works but it opens the whole page and i would like to get the pop up window that comes up on a <div> tag on the list page is this possible?

}

else if($value == "no"){

$fvalue = '<font color="#888888">Not Necessary</font>';

}

else if($value == "done"){

$fvalue = '<font color="#888888">DONE!</font>';

}
$value = $fvalue;
//i tried this <a class="runner-button-img" id="editLink4" name="editLink4" href=\'pendings_edit.php?editid1='.$data['case_no'].'\' title="Edit"><img class="runner-cicon" src="images/icon_edit_new.gif" alt="Edit"></a> but no success