| 182 | |
| 183 | //cache tabs to remove read from config |
| 184 | if( editor._.removeDialogContents === undefined ) |
| 185 | { |
| 186 | if( editor.config.removeDialogContents ) |
| 187 | { |
| 188 | editor._.removeDialogContents = editor.config.removeDialogContents.split( ";" ); |
| 189 | |
| 190 | var tabsToRemove = new Array(); |
| 191 | |
| 192 | for ( var i = 0, len = editor._.removeDialogContents.length ; i < len ; i++ ) |
| 193 | { |
| 194 | if ( editor._.removeDialogContents[ i ].indexOf( ":" ) != -1 ) |
| 195 | { |
| 196 | var dialogContent = editor._.removeDialogContents[i].split( ":" ); |
| 197 | |
| 198 | tabsToRemove.push( { dialogName: dialogContent[ 0 ], tabName: dialogContent[ 1 ] }); |
| 199 | } |
| 200 | } |
| 201 | editor._.removeDialogContents = tabsToRemove; |
| 202 | } |
| 203 | else |
| 204 | { |
| 205 | editor._.removeDialogContents = null; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | // check if there is any tabs to remove |
| 210 | if ( editor._.removeDialogContents ) |
| 211 | { |
| 212 | for ( var i = 0, len = editor._.removeDialogContents.length ; i < len ; i++ ) |
| 213 | { |
| 214 | if ( dialogName == editor._.removeDialogContents[ i ].dialogName ) |
| 215 | definition.removeContents( editor._.removeDialogContents[ i ].tabName ); |
| 216 | } |
| 217 | } |
| 218 | |