• Resolved sugandh21

    (@sugandh21)


    So the editable columns doesn’t seem to be working as expected. It does hide the save button but double clicking on the fields still enables the input text field and the delete column is still visible?? My code:

    add_db_table_editor(array(
    ‘title’=>’CSE’,
    ‘table’=>’old_cse’,
    ‘id’=>’old_course_enrollments’,
    ‘id_column’=>’E_ID’,
    ‘sql’ => ‘SIMPLE SELECT QUERY’,
    ‘noedit_columns’=>’E_ID’,
    ‘columnNameMap’=>Array(‘E_ID’=>’ID’),
    ‘auto_height’=>true,
    ‘editcap’=>’edit_others_posts’,

    ));

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bobbysmith007

    (@bobbysmith007)

    What are you expecting from what part of that config. The only column marked as not editable is “E_ID”? Is that inappropriately editable?

    Is it that users without edit_others_posts are able to edit?

    Thread Starter sugandh21

    (@sugandh21)

    its for the users without the edit_other_posts privileges. When they don’t have the permission I would expect the double click on all the columns not resulting in an input field activated and the delete buttons column to be hidden. (like making editable false in the slick grid? )

    Plugin Author bobbysmith007

    (@bobbysmith007)

    I am looking into this, but am actually running into the opposite problem right now. The read capability which *used* to be used to see if a user can access the user_profile page is now not seeming to work. So its possible that an update needs to be made.

    I havnt used this plugin extensively in read only mode, so its possible mistakes were made.

    Thread Starter sugandh21

    (@sugandh21)

    So I found the issue
    in the db-table-editor.js the noedit variable is null which was returning false(obviously) and hence when you check for !DBTableEditor.noedit it was returning true.
    initialized noedit with false in the class constructor and in the db-table-editor.js just add $curr->noedit=true where you are making $noedit=true
    ideally we should have one variable and not 2 but I dunno where else local variable $noedit is being used so I’m gonna leave it there!

    Plugin Author bobbysmith007

    (@bobbysmith007)

    I applied a patch which sets noedit to true on the client if it fails the editcap check on the server. That should hopefully take care of it.

    Plugin Author bobbysmith007

    (@bobbysmith007)

    1.6.4 should be the version number with this fixed up

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Editable Coloumns’ is closed to new replies.