Commit 8bad2cc0 authored by dvh@chromium.org's avatar dvh@chromium.org

Implemented separate tabs for unpacked apps and extensions in App Developer Tools.

BUG=237277

Review URL: https://chromiumcodereview.appspot.com/15810003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202840 0039d316-1c4b-4281-b951-d872f2087c98
parent 758d8ebf
...@@ -5432,6 +5432,12 @@ Make sure you do not expose any sensitive information. ...@@ -5432,6 +5432,12 @@ Make sure you do not expose any sensitive information.
<message name="IDS_APPS_DEVTOOL_EXTENSIONS_INSTALLED" desc="Text for the word 'Extensions'."> <message name="IDS_APPS_DEVTOOL_EXTENSIONS_INSTALLED" desc="Text for the word 'Extensions'.">
Extensions Extensions
</message> </message>
<message name="IDS_APPS_DEVTOOL_NO_UNPACKED_INSTALLED" desc="Text that lets the user know that no unpacked apps or extensions are installed.">
No unpacked applications or extensions.
</message>
<message name="IDS_APPS_DEVTOOL_UNPACKED_INSTALLED" desc="Text for the word 'Unpacked' (unpacked app or extension).">
Unpacked
</message>
<message name="IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY" desc="Text on next line after IDS_EXTENSIONS_NONE_INSTALLED that suggests the user look in the gallery for extensions to install."> <message name="IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY" desc="Text on next line after IDS_EXTENSIONS_NONE_INSTALLED that suggests the user look in the gallery for extensions to install.">
Want to <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>browse the gallery<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph> instead? Want to <ph name="BEGIN_LINK">&lt;a target="_blank" href="$1"&gt;</ph>browse the gallery<ph name="END_LINK">&lt;/a&gt;<ex>&lt;/a&gt;</ex></ph> instead?
</message> </message>
......
...@@ -1109,8 +1109,9 @@ bool DeveloperPrivateGetStringsFunction::RunImpl() { ...@@ -1109,8 +1109,9 @@ bool DeveloperPrivateGetStringsFunction::RunImpl() {
SET_STRING("appsDevtoolNoApps", IDS_APPS_DEVTOOL_NO_APPS_INSTALLED); SET_STRING("appsDevtoolNoApps", IDS_APPS_DEVTOOL_NO_APPS_INSTALLED);
SET_STRING("appsDevtoolApps", IDS_APPS_DEVTOOL_APPS_INSTALLED); SET_STRING("appsDevtoolApps", IDS_APPS_DEVTOOL_APPS_INSTALLED);
SET_STRING("appsDevtoolExtensions", IDS_APPS_DEVTOOL_EXTENSIONS_INSTALLED); SET_STRING("appsDevtoolExtensions", IDS_APPS_DEVTOOL_EXTENSIONS_INSTALLED);
SET_STRING("appsDevtoolNoExtensions", SET_STRING("appsDevtoolNoExtensions", IDS_EXTENSIONS_NONE_INSTALLED);
IDS_EXTENSIONS_NONE_INSTALLED); SET_STRING("appsDevtoolUnpacked", IDS_APPS_DEVTOOL_UNPACKED_INSTALLED);
SET_STRING("appsDevtoolNoUnpacked", IDS_APPS_DEVTOOL_NO_UNPACKED_INSTALLED);
SET_STRING("appsDevtoolTitle", IDS_APPS_DEVTOOL_TITLE); SET_STRING("appsDevtoolTitle", IDS_APPS_DEVTOOL_TITLE);
SET_STRING("extensionSettingsGetMoreExtensions", IDS_GET_MORE_EXTENSIONS); SET_STRING("extensionSettingsGetMoreExtensions", IDS_GET_MORE_EXTENSIONS);
SET_STRING("extensionSettingsExtensionId", IDS_EXTENSIONS_ID); SET_STRING("extensionSettingsExtensionId", IDS_EXTENSIONS_ID);
......
...@@ -120,7 +120,8 @@ html[dir='rtl'] #search { ...@@ -120,7 +120,8 @@ html[dir='rtl'] #search {
} }
#no-extensions-message, #no-extensions-message,
#no-apps-message { #no-apps-message,
#no-unpacked-message {
font-weight: bold; font-weight: bold;
} }
...@@ -129,14 +130,17 @@ html[dir='rtl'] #search { ...@@ -129,14 +130,17 @@ html[dir='rtl'] #search {
} }
#no-extensions, #no-extensions,
#no-apps { #no-apps,
margin: 10px 10px; #no-unpacked {
margin: 10px;
} }
.loading #no-extensions, .loading #no-extensions,
.loading #no-apps, .loading #no-apps,
#extension-settings-list:not(.empty-item-list) ~ #no-extensions, .loading #no-unpacked,
#app-settings-list:not(.empty-item-list) ~ #no-apps, #packed-extension-list:not(.empty-item-list) ~ #no-extensions,
#packed-app-list:not(.empty-item-list) ~ #no-apps,
#unpacked-list:not(.empty-item-list) ~ #no-unpacked,
.empty-item-list { .empty-item-list {
display: none; display: none;
} }
......
...@@ -5,14 +5,17 @@ ...@@ -5,14 +5,17 @@
cr.define('apps_dev_tool', function() { cr.define('apps_dev_tool', function() {
'use strict'; 'use strict';
// The list of all apps & extensions. // The list of all packed/unpacked apps and extensions.
var completeList = []; var completeList = [];
// The list of all apps. // The list of all packed apps.
var appList = []; var packedAppList = [];
// The list of all extensions. // The list of all packed extensions.
var extensionList = []; var packedExtensionList = [];
// The list of all unpacked apps or extensions.
var unpackedList = [];
/** const*/ var AppsDevTool = apps_dev_tool.AppsDevTool; /** const*/ var AppsDevTool = apps_dev_tool.AppsDevTool;
...@@ -52,10 +55,13 @@ cr.define('apps_dev_tool', function() { ...@@ -52,10 +55,13 @@ cr.define('apps_dev_tool', function() {
* Refreshes the app. * Refreshes the app.
*/ */
function reloadAppDisplay() { function reloadAppDisplay() {
var extensions = new ItemsList($('extension-settings-list'), extensionList); var extensions = new ItemsList($('packed-extension-list'),
var apps = new ItemsList($('app-settings-list'), appList); packedExtensionList);
var apps = new ItemsList($('packed-app-list'), packedAppList);
var unpacked = new ItemsList($('unpacked-list'), unpackedList);
extensions.showItemNodes(); extensions.showItemNodes();
apps.showItemNodes(); apps.showItemNodes();
unpacked.showItemNodes();
} }
/** /**
...@@ -63,17 +69,20 @@ cr.define('apps_dev_tool', function() { ...@@ -63,17 +69,20 @@ cr.define('apps_dev_tool', function() {
* @param {string} filter Curent string in the search box. * @param {string} filter Curent string in the search box.
*/ */
function rebuildAppList(filter) { function rebuildAppList(filter) {
appList = []; packedAppList = [];
extensionList = []; packedExtensionList = [];
unpackedList = [];
for (var i = 0; i < completeList.length; i++) { for (var i = 0; i < completeList.length; i++) {
var item = completeList[i]; var item = completeList[i];
if (filter && item.name.toLowerCase().search(filter.toLowerCase()) < 0) if (filter && item.name.toLowerCase().search(filter.toLowerCase()) < 0)
continue; continue;
if (item.isApp) if (item.is_unpacked)
appList.push(item); unpackedList.push(item);
else if (item.isApp)
packedAppList.push(item);
else else
extensionList.push(item); packedExtensionList.push(item);
} }
} }
......
...@@ -41,6 +41,7 @@ found in the LICENSE file. ...@@ -41,6 +41,7 @@ found in the LICENSE file.
</div> </div>
<div id="tabs-header-container"> <div id="tabs-header-container">
<tabs id="tabs" tabindex="0"> <tabs id="tabs" tabindex="0">
<tab i18n-content="appsDevtoolUnpacked"></tab>
<tab i18n-content="appsDevtoolApps"></tab> <tab i18n-content="appsDevtoolApps"></tab>
<tab i18n-content="appsDevtoolExtensions"></tab> <tab i18n-content="appsDevtoolExtensions"></tab>
</tabs> </tabs>
...@@ -48,19 +49,25 @@ found in the LICENSE file. ...@@ -48,19 +49,25 @@ found in the LICENSE file.
<div id="header-bottom-gradient"></div> <div id="header-bottom-gradient"></div>
</div> </div>
<tabpanels id="tab-panels"> <tabpanels id="tab-panels">
<!-- Apps Tab --> <!-- Unpacked -->
<tabpanel id="apps-tab"> <tabpanel id="unpacked-tab">
<div id="app-settings-list" class="empty-extension-list"> <div id="unpacked-list" class="empty-extension-list"></div>
<div id="no-unpacked">
<span id="no-unpacked-message"
i18n-content="appsDevtoolNoUnpacked"></span>
</div> </div>
</tabpanel>
<!-- Apps Tab -->
<tabpanel id="packed-apps-tab">
<div id="packed-app-list" class="empty-extension-list"></div>
<div id="no-apps"> <div id="no-apps">
<span id="no-apps-message" <span id="no-apps-message"
i18n-content="appsDevtoolNoApps"></span> i18n-content="appsDevtoolNoApps"></span>
</div> </div>
</tabpanel> </tabpanel>
<!-- Extensions Tab --> <!-- Extensions Tab -->
<tabpanel id="extensions-tab"> <tabpanel id="packed-extensions-tab">
<div id="extension-settings-list" class="empty-extension-list"> <div id="packed-extension-list" class="empty-extension-list"></div>
</div>
<div id="no-extensions"> <div id="no-extensions">
<span id="no-extensions-message" <span id="no-extensions-message"
i18n-content="appsDevtoolNoExtensions"></span> i18n-content="appsDevtoolNoExtensions"></span>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment