this.list.addItem( cat, true, "list-item hidden" ); var div = this.list.getItem( cat.id ); div.parentNode.removeChild( div ); var parentItem = this.list.getItem( parent.id ); /* move it after the parent */ this.list.content.insertBefore( div, parentItem.nextSibling ); this.list.toggleCheckbox( div, true ); // added checked attribute again for IE DOM.removeClassName( div, "hidden" ); } else { catlist.push( cat ); /* update the cache */ app.catCache.setItem( "cat:" + cat.id, cat ); this.list.addItem( cat, true ); } /* recheck selection */ this.listItemsSelected( this.list ); }, listItemsSelected: function( list, ids ) { MT.App.selectedCategoryList = Array.fromPseudo( list.getSelectedIDs() ); app.catList.redraw(); if ( !this.opening && this.type == 'folder' ) this.close(); }, listItemsUnSelected: function( list, ids ) { if ( this.opening || this.type == "folder" ) return; MT.App.selectedCategoryList = Array.fromPseudo( list.getSelectedIDs() ); app.catList.redraw(); } } ); extend( MT.App.CodePress, { isSupported: function() { return ( navigator.userAgent.toLowerCase().match(/webkit/) ) ? false : true; }, languages: { csharp : 'C#', css : 'CSS', generic : 'Generic', html : 'HTML', javascript : 'JavaScript', java : 'Java', perl : 'Perl', ruby : 'Ruby', php : 'PHP', text : 'Text', sql : 'SQL', vbscript : 'VBScript', mt: 'Movable Type' } } ); } /* if window.App */ function showMsg(message, id, type, rebuild, blogID) { if (getByID(id)) { msg = getByID(id); msg.style.display = 'block'; } else { var msg = document.createElement("div"); msg.setAttribute("id", id); DOM.addClassName(msg, 'msg'); DOM.addClassName(msg, 'msg-'+type); } msg.innerHTML = "close"+message; if (rebuild == 'all') msg.innerHTML += ' ' + trans('[_1]Publish[_2] your site to see these changes take effect.', '', ''); if (rebuild == 'index') msg.innerHTML += ' ' + trans('[_1]Publish[_2] your site to see these changes take effect.', '', ''); getByID('msg-block').appendChild(msg); } function hideAllDropDown() { // hides SELECT lists under the nav on IE6 if((/MSIE/.test(navigator.userAgent)) && parseInt(navigator.appVersion)==4) { var dd = document.getElementsByTagName('select'); for (var i=0; i