Skip to content

Commit

Permalink
Fixed issue #8370: CPDB attribute editing is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 21, 2013
1 parent c2e0fe4 commit 153f602
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -383,7 +383,7 @@ function getAttributeInfo_json()
$limit = Yii::app()->request->getPost('rows');
$limit = isset($limit) ? $limit : 50; //Stop division by zero errors

$records = ParticipantAttributeName::model()->with('participant_attribute_names_lang')->findAll();
$records = ParticipantAttributeName::model()->with('participant_attribute_names_lang')->findAll(array('order'=>'attribute_name'));

$attribute_types = array(
'DD' => $clang->gT("Drop-down list"),
Expand Down
12 changes: 7 additions & 5 deletions scripts/admin/attributeControl.js
Expand Up @@ -11,7 +11,7 @@ $(document).ready(function() {
// Set some custom messages
$.jgrid.edit.msg.required = sRequired;

jQuery("#attributeControl").jqGrid({
$("#attributeControl").jqGrid({
loadtext : sLoadText,
align:"center",
url: attributeInfoUrl,
Expand All @@ -36,8 +36,7 @@ $(document).ready(function() {
recordtext: viewRecordTxt
});

jQuery.extend($.fn.fmatter , {
rowactions : function(rid,gid,act, pos) {
$.extend($.fn.fmatter.rowactions = function(act) {
var delOptions = {
bCancel: sCancel,
bSubmit: sDeleteButtonCaption,
Expand All @@ -46,6 +45,9 @@ $(document).ready(function() {
reloadAfterSubmit: true,
width: 400
};
var $tr = $(this).closest("tr.jqgrow");
rid = $tr.attr("id");
gid = $(this).closest("table.ui-jqgrid-btable").attr('id').replace(/_frozen([^_]*)$/,'$1');
switch(act)
{
case 'edit' :
Expand All @@ -56,9 +58,9 @@ $(document).ready(function() {
break;
}
}
});
);

jQuery('#attributeControl').jqGrid('navGrid', '#pager',
$('#attributeControl').jqGrid('navGrid', '#pager',
{ add:true,
edit:false,
del:true,
Expand Down

0 comments on commit 153f602

Please sign in to comment.