Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: Source/devtools/front_end/SettingsScreen.js

Issue 14862010: DevTools: minor UI tweaks in the settings UI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/front_end/helpScreen.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 { 707 {
708 WebInspector.SettingsTab.call(this, WebInspector.UIString("Port Forwarding") , "workspace-tab-content"); 708 WebInspector.SettingsTab.call(this, WebInspector.UIString("Port Forwarding") , "workspace-tab-content");
709 } 709 }
710 710
711 WebInspector.TetheringSettingsTab.prototype = { 711 WebInspector.TetheringSettingsTab.prototype = {
712 wasShown: function() 712 wasShown: function()
713 { 713 {
714 if (this._paragraphElement) 714 if (this._paragraphElement)
715 return; 715 return;
716 716
717 this._paragraphElement = this._appendSection(WebInspector.UIString("Mapp ings"));
718 WebInspector.SettingsTab.prototype.wasShown.call(this); 717 WebInspector.SettingsTab.prototype.wasShown.call(this);
718
719 var labelElement = this._appendSection();
720 labelElement.addStyleClass("tethering-help-info");
721 labelElement.textContent =
722 WebInspector.UIString("Creates a listen TCP port on your device that maps to a particular TCP port accessible from the host machine.");
723 labelElement.createChild("br");
724 labelElement.createChild("div", "tethering-help-title-left").textContent = WebInspector.UIString("Device port");
725 labelElement.createChild("div", "tethering-help-title-right").textConten t = WebInspector.UIString("Target");
726
727 this._paragraphElement = this._appendSection();
719 var mappingEntries = WebInspector.settings.portForwardings.get(); 728 var mappingEntries = WebInspector.settings.portForwardings.get();
720 for (var i = 0; i < mappingEntries.length; ++i) 729 for (var i = 0; i < mappingEntries.length; ++i)
721 this._addMappingRow(mappingEntries[i].port, mappingEntries[i].locati on, false); 730 this._addMappingRow(mappingEntries[i].port, mappingEntries[i].locati on, false);
722 if (!mappingEntries.length) 731 if (!mappingEntries.length)
723 this._addMappingRow("", "", true); 732 this._addMappingRow("", "", true);
724 this._save(); 733 this._save();
725 }, 734 },
726 735
727 /** 736 /**
728 * @param {string} port 737 * @param {string} port
729 * @param {string} location 738 * @param {string} location
730 * @param {boolean} focus 739 * @param {boolean} focus
731 * @return {Element} 740 * @return {Element}
732 */ 741 */
733 _addMappingRow: function(port, location, focus) 742 _addMappingRow: function(port, location, focus)
734 { 743 {
735 var mappingRow = this._paragraphElement.createChild("div", "workspace-se ttings-row"); 744 var mappingRow = this._paragraphElement.createChild("div", "workspace-se ttings-row");
736 var portElement = mappingRow.createChild("input"); 745 var portElement = mappingRow.createChild("input", "tethering-port-input" );
737 portElement.type = "text"; 746 portElement.type = "text";
738 portElement.value = port || ""; 747 portElement.value = port || "";
739 if (!port) 748 if (!port)
740 portElement.placeholder = "8080"; 749 portElement.placeholder = "8080";
741 portElement.addEventListener("keydown", this._editTextInputKey.bind(this , true), true); 750 portElement.addEventListener("keydown", this._editTextInputKey.bind(this , true), true);
742 portElement.addEventListener("blur", this._save.bind(this), true); 751 portElement.addEventListener("blur", this._save.bind(this), true);
743 portElement.addEventListener("input", this._validatePort.bind(this, port Element), true); 752 portElement.addEventListener("input", this._validatePort.bind(this, port Element), true);
744 753
745 var locationElement = mappingRow.createChild("input"); 754 var locationElement = mappingRow.createChild("input");
746 locationElement.type = "text"; 755 locationElement.type = "text";
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 if (this._settingsScreen) 983 if (this._settingsScreen)
975 this._settingsScreen.hide(); 984 this._settingsScreen.hide();
976 }, 985 },
977 986
978 resize: function() 987 resize: function()
979 { 988 {
980 if (this._settingsScreen && this._settingsScreen.isShowing()) 989 if (this._settingsScreen && this._settingsScreen.isShowing())
981 this._settingsScreen.doResize(); 990 this._settingsScreen.doResize();
982 } 991 }
983 } 992 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/front_end/helpScreen.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698