docs: function() {
  				fm.lazy(function() {
  					var phash, emptyMethod, thtr;
  
  					wz.append(selectAllCheckbox).removeClass('elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result');
  					if (fm.searchStatus.state > 1 || fm.searchStatus.ininc) {
  						wz.addClass('elfinder-search-result' + (fm.searchStatus.ininc? ' elfinder-'+(query.substr(0,1) === '/' ? 'let':'inc')+'search-result' : ''));
  					}
  					
  					// abort attachThumbJob
  					bufferExt.attachThumbJob && bufferExt.attachThumbJob._abort();
  					
  					// destroy selectable for GC
  					cwd.data('selectable') && cwd.selectable('disable').selectable('destroy').removeData('selectable');
  					
  					// notify cwd init
  					fm.trigger('cwdinit');
  					
  					selectedNext = $();
  					try {
  						// to avoid problem with draggable
  						cwd.empty();
  					} catch (e) {
  						cwd.html('');
  					}
  					
  					if (tableHeader) {
  						wrapper.off('scroll.fixheader resize.fixheader');
  						tableHeader.remove();
  						tableHeader = null;
  					}
  
  					cwd.removeClass('elfinder-cwd-view-icons elfinder-cwd-view-list')
  						.addClass('elfinder-cwd-view-'+(list ? 'list' :'icons'))
  						.attr('style', '')
  						.css('height', 'auto');
  					bottomMarker.hide();
  
  					wrapper[list ? 'addClass' : 'removeClass']('elfinder-cwd-wrapper-list')
  						._padding = parseInt(wrapper.css('padding-top')) + parseInt(wrapper.css('padding-bottom'));
  					if (fm.UA.iOS) {
  						wrapper.removeClass('overflow-scrolling-touch').addClass('overflow-scrolling-touch');
  					}
  
  					if (list) {
  						cwd.html('<table><thead/><tbody/></table>');
  						thtr = $('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+fm.getColumnName('name')+'</td>'+customColsNameBuild()+'</tr>');
  						cwd.find('thead').hide().append(
  							thtr
  							.on('contextmenu.'+fm.namespace, wrapperContextMenu.contextmenu)
  							.on('touchstart.'+fm.namespace, 'td', wrapperContextMenu.touchstart)
  							.on('touchmove.'+fm.namespace+' touchend.'+fm.namespace+' mouseup.'+fm.namespace, 'td', wrapperContextMenu.touchend)
  							.on('click.'+fm.namespace,'td', wrapperContextMenu.click)
  						).find('td:first').append(selectAllCheckbox);
  
  						if ($.fn.sortable) {
  							thtr.addClass('touch-punch touch-punch-keep-default')
  								.sortable({
  								axis: 'x',
  								distance: 8,
  								items: '> .sortable-item',
  								start: function(e, ui) {
  									$(ui.item[0]).data('dragging', true);
  									ui.placeholder
  										.width(ui.helper.removeClass('ui-state-hover').width())
  										.removeClass('ui-state-active')
  										.addClass('ui-state-hover')
  										.css('visibility', 'visible');
  								},
  								update: function(e, ui){
  									var target = $(ui.item[0]).attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', ''),
  										prev, done;
  									customCols = $.map($(this).children(), function(n) {
  										var name = $(n).attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', '');
  										if (! done) {
  											if (target === name) {
  												done = true;
  											} else {
  												prev = name;
  											}
  										}
  										return (name === 'name')? null : name;
  									});
  									templates.row = makeTemplateRow();
  									fm.storage('cwdCols', customCols);
  									prev = '.elfinder-col-'+prev+':first';
  									target = '.elfinder-col-'+target+':first';
  									fm.lazy(function() {
  										cwd.find('tbody tr').each(function() {
  											var $this = $(this);
  											$this.children(prev).after($this.children(target));
  										});
  									});
  								},
  								stop: function(e, ui) {
  									setTimeout(function() {
  										$(ui.item[0]).removeData('dragging');
  									}, 100);
  								}
  							});
  						}
  
  						thtr.find('td').addClass('touch-punch').resizable({
  							handles: fm.direction === 'ltr'? 'e' : 'w',
  							start: function(e, ui) {
  								var target = cwd.find('td.elfinder-col-'
  									+ ui.element.attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', '')
  									+ ':first');
  								
  								ui.element
  									.data('dragging', true)
  									.data('resizeTarget', target)
  									.data('targetWidth', target.width());
  								colResizing = true;
  								if (cwd.find('table').css('table-layout') !== 'fixed') {
  									cwd.find('tbody tr:first td').each(function() {
  										$(this).width($(this).width());
  									});
  									cwd.find('table').css('table-layout', 'fixed');
  								}
  							},
  							resize: function(e, ui) {
  								ui.element.data('resizeTarget').width(ui.element.data('targetWidth') - (ui.originalSize.width - ui.size.width));
  							},
  							stop : function(e, ui) {
  								colResizing = false;
  								fixTableHeader({fitWidth: true});
  								colWidth = {};
  								cwd.find('tbody tr:first td').each(function() {
  									var name = $(this).attr('class').split(' ')[0].replace('elfinder-col-', '');
  									colWidth[name] = $(this).width();
  								});
  								fm.storage('cwdColWidth', colWidth);
  								setTimeout(function() {
  									ui.element.removeData('dragging');
  								}, 100);
  							}
  						})
  						.find('.ui-resizable-handle').addClass('ui-icon ui-icon-grip-dotted-vertical');
  					}
  
  					buffer = $.map(incHashes || cwdHashes, function(hash) { return fm.file(hash) || null; });
  					
  					buffer = fm.sortFiles(buffer);
  					
  					if (incHashes) {
  						incHashes = $.map(buffer, function(f) { return f.hash; });
  					} else {
  						cwdHashes = $.map(buffer, function(f) { return f.hash; });
  					}
  					
  					bufferExt = {
  						renderd: 0,
  						attachTmbs: {},
  						getTmbs: [],
  						tmbLoading: {},
  						lazyOpts: { tm : 0 }
  					};
  					
  					wz[(buffer.length < 1) ? 'addClass' : 'removeClass']('elfinder-cwd-wrapper-empty');
  					wrapper.off(scrollEvent, render).on(scrollEvent, render).trigger(scrollEvent);
  					
  					// set droppable
  					if (!fm.cwd().write) {
  						wrapper.removeClass('native-droppable')
  						       .droppable('disable')
  						       .removeClass('ui-state-disabled'); // for old jQueryUI see https://bugs.jqueryui.com/ticket/5974
  					} else {
  						wrapper[fm.isCommandEnabled('upload')? 'addClass' : 'removeClass']('native-droppable');
  						wrapper.droppable(fm.isCommandEnabled('paste')? 'enable' : 'disable');
  					}
  				});
  			}