Merge pull request #66 from hideheader/save-me
Fix 'dirty' indicator on 'Code' boxes
This commit is contained in:
		
						commit
						28fcb94dfa
					
				|  | @ -67,6 +67,10 @@ | |||
| 			#sections > div:not(:first-child) { | ||||
| 				border-top: 2px solid black; | ||||
| 			} | ||||
| 			.dirty > label::before { | ||||
| 				content: "*"; | ||||
| 				font-weight: bold; | ||||
| 			} | ||||
| 			#basic-info label { | ||||
| 				display: inline-block; | ||||
| 				width: 10em; | ||||
|  |  | |||
							
								
								
									
										5
									
								
								edit.js
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								edit.js
									
									
									
									
									
								
							|  | @ -85,10 +85,7 @@ function indicateCodeChange(cm) { | |||
| 	var clean = cm.isClean(cm.lastChange); | ||||
| 	if (clean != cm.lastClean) { | ||||
| 		cm.lastClean = clean; | ||||
| 		var label = cm.getTextArea().previousElementSibling; | ||||
| 		if (label) { | ||||
| 			label.textContent = label.textContent.replace(/\*?$/, clean ? '' : '*'); | ||||
| 		} | ||||
| 		cm.getTextArea().parentNode.classList[clean ? "remove" : "add"]("dirty"); | ||||
| 	} | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user