ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] ignite git commit: IGNITE-843 Show message on copy to clipboard.
Date Wed, 23 Sep 2015 03:54:52 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 e18269083 -> c9913dd8d


IGNITE-843 Show message on copy to clipboard.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4090f772
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4090f772
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4090f772

Branch: refs/heads/ignite-843
Commit: 4090f772550fd22fdcc4af3544446dce99f6ec54
Parents: 7ab85d5
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Sep 23 10:54:34 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 23 10:54:34 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js                   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4090f772/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 709488b..2a6ad89 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -1459,7 +1459,7 @@ controlCenterModule.service('$preview', ['$timeout', '$interval', function
($tim
     }
 }]);
 
-controlCenterModule.service('ngCopy', ['$window', function ($window) {
+controlCenterModule.service('ngCopy', ['$window', '$common', function ($window, $common)
{
     var body = angular.element($window.document.body);
 
     var textArea = angular.element('<textarea/>');
@@ -1477,7 +1477,9 @@ controlCenterModule.service('ngCopy', ['$window', function ($window)
{
         textArea[0].select();
 
         try {
-            if (!document.execCommand('copy'))
+            if (document.execCommand('copy'))
+                $common.showInfo('Value copied to clipboard');
+            else
                 window.prompt("Copy to clipboard: Ctrl+C, Enter", toCopy);
         } catch (err) {
             window.prompt("Copy to clipboard: Ctrl+C, Enter", toCopy);


Mime
View raw message