tincr / editorpanel.html

	<link rel="stylesheet" type="text/css" href="editorpanel.css" />

	<script src="zepto1.0rc1.js"></script>
	<script src="BackgroundMsgSupport.js"></script>
	<script src="Logger.js"></script>
		var projectTypes;
		var checkProjectState = function(){
			var projectState = window.devtoolsWindow.projectState;
			if (projectState.type == 'fileUrl'){
				$('#project-type').attr('disabled', 'true');
				$('#native-browse').attr('disabled', 'true');
			else if (projectState.type){
				var typeSelect = document.getElementById('project-type');
				for (var i = 0; i < projectTypes.length; i++){
					if (projectTypes[i].key === projectState.type){
						typeSelect.selectedIndex = i;
		var initUI = function(){
			var typeSelect = document.getElementById('project-type');
				projectTypes = types;
				for (var i = 0; i < projectTypes.length; ++i) {
					var projectType = projectTypes[i];
					typeSelect.add(new Option(, i));
			$(typeSelect).on('change', function(e){
				var index = typeSelect.selectedIndex;
				var projectType = projectTypes[index];
				if (projectType.locationType = 'local'){
					var fileSelect = document.getElementById('file-select'); = '';
			$('#native-browse').on('click', function(e){
				var index = typeSelect.selectedIndex;
				backgroundMsgSupport.launchFileSelect(index, window.devtoolsWindow.inspectedLocation.href, function(result){
					if (result.path && result.path.length){
						if (result.error){
							var projectType = projectTypes[index];
							window.devtoolsWindow.loadProject(projectType.key, result.path);
	<div id="project-select-form">
				<label>Project Type:</label>
				<select id="project-type"></select>
		<p id="file-select" style="display:none">
				<label>Root Directory</label><label id="local-file-path"></label>
				<button id="native-browse">Browse</button>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.