(column)
| 82 | |
| 83 | |
| 84 | deleteColumn(column){ |
| 85 | if(Object.prototype.toString.call(column) === '[object String]') { |
| 86 | var obj = new CB.Column(column); |
| 87 | column = obj; |
| 88 | } |
| 89 | if (Object.prototype.toString.call(column) === '[object Object]') { |
| 90 | if(CB._columnValidation(column, this)){ |
| 91 | var arr = []; |
| 92 | for(var i=0;i<this.columns.length;i++){ |
| 93 | if(this.columns[i].name !== column.name) |
| 94 | arr.push(this.columns[i]); |
| 95 | } |
| 96 | this.document.columns = arr; |
| 97 | } |
| 98 | |
| 99 | } else if (Object.prototype.toString.call(column) === '[object Array]') { |
| 100 | var arr = []; |
| 101 | for(var i=0; i<column.length; i++){ |
| 102 | if(CB._columnValidation(column[i], this)){ |
| 103 | for(var i=0;i<this.columns.length;i++){ |
| 104 | if(this.columns[i].name !== column[i].name) |
| 105 | arr.push(this.columns[i]); |
| 106 | } |
| 107 | this.document.columns = arr; |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | }; |
| 112 | /** |
| 113 | * Deletes a table from database. |
| 114 | * |
no outgoing calls
no test coverage detected