diff --git a/app/manifest.json b/app/manifest.json index e6f7e78..ab7ef5e 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -3,7 +3,7 @@ "name": "ChromeMyAdmin", "short_name": "MyAdmin", "description": "This application provides you 'MySQL GUI Admin console' windows.", - "version": "2.1.0", + "version": "2.2.0", "author": "Yoichiro Tanaka", "app": { "background": { @@ -13,7 +13,8 @@ } }, "permissions": [ - "storage" + "storage", + "alwaysOnTopWindows" ], "offline_enabled": true, "icons": { diff --git a/app/scripts/window/controllers/window_title_panel_controller.js b/app/scripts/window/controllers/window_title_panel_controller.js index efdeaf4..6639f3b 100644 --- a/app/scripts/window/controllers/window_title_panel_controller.js +++ b/app/scripts/window/controllers/window_title_panel_controller.js @@ -96,6 +96,7 @@ chromeMyAdmin.controller("windowTitlePanelController", ["$scope", "mySQLClientSe $scope.initialize = function() { assignEventHandlers(); resetTitleText(); + $scope.alwaysOnTop = false; }; $scope.openNewWindow = function() { @@ -104,4 +105,14 @@ chromeMyAdmin.controller("windowTitlePanelController", ["$scope", "mySQLClientSe }); }; + $scope.getAlwaysOnTopClass = function() { + return $scope.alwaysOnTop ? "fa-circle" : "fa-circle-o"; + }; + + $scope.changeAlwaysOnTop = function() { + $scope.alwaysOnTop = !$scope.alwaysOnTop; + var appWindow = chrome.app.window.current(); + appWindow.setAlwaysOnTop($scope.alwaysOnTop); + }; + }]); diff --git a/app/styles/window.css b/app/styles/window.css index 2e598bf..58baecb 100644 --- a/app/styles/window.css +++ b/app/styles/window.css @@ -1,5 +1,5 @@ html, body { - mergin: 0; + margin: 0; padding: 0; } @@ -11,6 +11,9 @@ body { width: 100%; height: 20px; -webkit-app-region: drag; + border-top: 1px solid #eee; + border-left: 1px solid #eee; + border-right: 1px solid #eee; } .windowTitlePanel div { @@ -57,6 +60,8 @@ body { height: 25px; background-color: white; border-top: 1px solid #eee; + border-left: 1px solid #eee; + border-bottom: 1px solid #eee; } .footerButtonLeft { @@ -150,6 +155,7 @@ body { height: 25px; background-color: white; border-top: 1px solid #eee; + border-bottom: 1px solid #eee; padding-left: 5px; } diff --git a/app/templates/window_title_panel.html b/app/templates/window_title_panel.html index 20b1f96..46522c1 100644 --- a/app/templates/window_title_panel.html +++ b/app/templates/window_title_panel.html @@ -5,4 +5,5 @@
{{titleText}}
+