Fix subject column after re-arranging cols
| | |
| | | if ((found = $.inArray('flag', this.env.coltypes)) >= 0) |
| | | this.set_env('flagged_col', found); |
| | | |
| | | if ((found = $.inArray('subject', this.env.coltypes)) >= 0) |
| | | this.set_env('subject_col', found); |
| | | |
| | | this.http_post('save-pref', { '_name':'list_cols', '_value':this.env.coltypes }); |
| | | }; |
| | | |
| | |
| | | // update subject column position |
| | | if (this.subject_col == from) |
| | | this.subject_col = to > from ? to - 1 : to; |
| | | else if (this.subject_col < from && to <= this.subject_col) |
| | | this.subject_col++; |
| | | else if (this.subject_col > from && to >= this.subject_col) |
| | | this.subject_col--; |
| | | |
| | | this.triggerEvent('column_replace'); |
| | | } |