aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
authorAlexandre Van de Sande <alex.vandesande@ethdev.com>2015-02-18 00:37:26 +0800
committerAlexandre Van de Sande <alex.vandesande@ethdev.com>2015-02-18 00:37:26 +0800
commit0e2f6691bfbbcc666c409be6b8657bd6ca475ddd (patch)
tree548bc65610555fa06cfb4b23f6cf2b2d93088469 /cmd/mist
parentabb9b7f46ff3b2ef0bb4f2e95f029591688768c4 (diff)
downloadgo-tangerine-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.gz
go-tangerine-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.zst
go-tangerine-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.zip
Cut, Copy, Undo and Redo working in webview
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/assets/ext/mist.js9
-rw-r--r--cmd/mist/assets/qml/views/browser.qml10
-rw-r--r--cmd/mist/assets/qml/views/catalog.qml19
3 files changed, 20 insertions, 18 deletions
diff --git a/cmd/mist/assets/ext/mist.js b/cmd/mist/assets/ext/mist.js
index 8734f8dc7..8589c8fc5 100644
--- a/cmd/mist/assets/ext/mist.js
+++ b/cmd/mist/assets/ext/mist.js
@@ -27,9 +27,14 @@ document.onkeydown = function(evt) {
} else if (evt.ctrlKey && evt.keyCode == 88) {
window.document.execCommand("cut");
console.log("Ctrl-X");
- } if (evt.ctrlKey && evt.keyCode == 86) {
+ } else if (evt.ctrlKey && evt.keyCode == 86) {
+ window.document.execCommand("paste");
console.log("Ctrl-V");
- } if (evt.ctrlKey && evt.keyCode == 90) {
+ } else if (evt.ctrlKey && evt.keyCode == 90) {
+ window.document.execCommand("undo");
+ console.log("Ctrl-Z");
+ } else if (evt.ctrlKey && evt.shiftKey && evt.keyCode == 90) {
+ window.document.execCommand("redo");
console.log("Ctrl-Z");
}
}; \ No newline at end of file
diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml
index 54f5d755e..edecc8696 100644
--- a/cmd/mist/assets/qml/views/browser.qml
+++ b/cmd/mist/assets/qml/views/browser.qml
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import QtQuick.Controls.Styles 1.0
import QtQuick.Layouts 1.0;
import QtWebEngine 1.0
-//import QtWebEngine.experimental 1.0
+import QtWebEngine.experimental 1.0
import QtQuick.Window 2.0;
Rectangle {
@@ -340,7 +340,7 @@ Rectangle {
WebEngineView {
objectName: "webView"
id: webview
- //experimental.settings.javascriptCanAccessClipboard: true
+ experimental.settings.javascriptCanAccessClipboard: true
//experimental.settings.localContentCanAccessRemoteUrls: true
anchors {
left: parent.left
@@ -399,7 +399,8 @@ Rectangle {
onLoadingChanged: {
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
- webview.runJavaScript("document.title", function(pageTitle) {
+
+ webview.runJavaScript("document.title", function(pageTitle) {
menuItem.title = pageTitle;
});
@@ -441,7 +442,8 @@ Rectangle {
webview.runJavaScript(eth.readFile("bignumber.min.js"));
webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));
-
+ webview.runJavaScript(eth.readFile("mist.js"));
+
var cleanTitle = webview.url.toString()
var matches = cleanTitle.match(/^[a-z]*\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
var domain = matches && matches[1];
diff --git a/cmd/mist/assets/qml/views/catalog.qml b/cmd/mist/assets/qml/views/catalog.qml
index 497d69ed1..29e133074 100644
--- a/cmd/mist/assets/qml/views/catalog.qml
+++ b/cmd/mist/assets/qml/views/catalog.qml
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import QtQuick.Controls.Styles 1.0
import QtQuick.Layouts 1.0;
import QtWebEngine 1.0
-//import QtWebEngine.experimental 1.0
+import QtWebEngine.experimental 1.0
import QtQuick.Window 2.0;
@@ -21,8 +21,6 @@ Rectangle {
property alias windowTitle: webview.title
property alias webView: webview
-
-
property var cleanPath: false
property var open: function(url) {
if(!window.cleanPath) {
@@ -66,9 +64,6 @@ Rectangle {
}
}
- Component.onCompleted: {
- }
-
Item {
objectName: "root"
id: root
@@ -85,7 +80,7 @@ Rectangle {
property var domain: "ethereum-dapp-catalog.meteor.com"
url: protocol + domain
- //experimental.settings.javascriptCanAccessClipboard: true
+ experimental.settings.javascriptCanAccessClipboard: true
onJavaScriptConsoleMessage: {
@@ -112,11 +107,11 @@ Rectangle {
}
}
- // onLoadingChanged: {
- // if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
- // webview.runJavaScript(eth.readFile("mist.js"));
- // }
- // }
+ onLoadingChanged: {
+ if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
+ webview.runJavaScript(eth.readFile("mist.js"));
+ }
+ }
}
ions'>+7 * dittoJP Rosevear2004-10-1412-68/+50 * find source selector and option menu in libedataserveruiJP Rosevear2004-10-1410-9/+32 * pull in libedataserverui as appropriateJP Rosevear2004-10-142-7/+8 * Use "%s" as the formatter argument and msg->prompt as a printf-styleJeffrey Stedfast2004-10-142-1/+7 * Updated Persian translation.Meelad Zakaria2004-10-142-72/+84 * If main_canvas has focus, do not grub it. Emit the selected_time_changedLi Yuan2004-10-133-2/+11 * kill cast as lvalue warning.Not Zed2004-10-1315-58/+210 * Updated Malay translation.Hasbullah Bin Pit2004-10-132-134/+130 * Updated Persian translation by Meelad Zakaria <meelad@bamdad.org>.Roozbeh Pournader2004-10-122-49/+63 * Updated pt_BR translationRaphael Higino2004-10-122-93/+98 * Updated Norwegian Nynorsk translation.Åsmund Skjæveland2004-10-122-2833/+2400 * convert menu to epopup.Not Zed2004-10-123-23/+29 * removed. (e_calendar_table_show_popup_menu): convert to use e-popup forNot Zed2004-10-125-265/+225 * doc updates for new 'check' callback.Not Zed2004-10-122-0/+29 * (untested, it compiles!).Not Zed2004-10-123-0/+38 * When the start year and the end year are the same, the num should beLi Yuan2004-10-1214-26/+187 * use builtin handlers (and plugins) always overriding bonobo ones.Not Zed2004-10-122-11/+14 * convert to epopup. (add_popup_menu_item): removed, now redundant.Not Zed2004-10-122-45/+38 * new method to create a targetless popup menu.Not Zed2004-10-123-0/+26 * ** See bug #67408.Not Zed2004-10-122-3/+15 * dont try to deference NULL nickname or emailAddr on the cert.Not Zed2004-10-122-9/+17 * ** See bug #67211.Not Zed2004-10-122-1/+13 * Don't unref the view - removing it from the hash table will do this forHans Petter Jansson2004-10-122-3/+10 * Fixes #45951Rodrigo Moya2004-10-124-14/+18 * g_strdup() the gpg/smime keys into the recipients list or else we end upJeffrey Stedfast2004-10-122-2/+8 * Add new images to figures Update and add new imagesRodney Dawes2004-10-1111-0/+16 * register the formatter types before registering the formatter hook.Not Zed2004-10-112-1/+6 * fix for #62053Sivaiah Nallagatla2004-10-112-6/+86 * add the source uid to list of selected calendar and tasks so thatSivaiah Nallagatla2004-10-111-0/+8 * ** See bug #67170.Not Zed2004-10-112-3/+11 * Updated greek translationNikos Charonitakis2004-10-102-1898/+2021 * updatedJeffrey Stedfast2004-10-091-0/+2 * Updated Simplified Chinese translationFunda Wang2004-10-092-51/+60 * Updated Czech translation.Miloslav Trmac2004-10-092-27/+66 * Make entry a little more accurate.JP Rosevear2004-10-091-2/+1 * use "Select a file"JP Rosevear2004-10-082-1/+6 * implement popup_menu so that popup menu can be shown with Shift+F10 onHarry Lu2004-10-083-36/+79 * implement popup_menu so that popup menu can be shown with Shift+F10.Harry Lu2004-10-082-0/+24 * fix typoJP Rosevear2004-10-082-1/+5 * handle wrong root element properly. From David TrowbridgeNot Zed2004-10-082-2/+10 * remove useless includeJP Rosevear2004-10-083-2/+6 * guard config.hJP Rosevear2004-10-088-8/+24 * guard config.h include, kill warning and remove useless includeJP Rosevear2004-10-082-2/+9 * Fix the function pointer types!Not Zed2004-10-072-2/+4 * Fixes #65932Rodrigo Moya2004-10-073-17/+74 * Updating pt_BR translationRaphael Higino2004-10-072-35/+50 * some updates.Not Zed2004-10-072-57/+131 * noop if we're disabled, and do some lifecycle stuff now, callNot Zed2004-10-073-5/+39 * initialise plugin system. (main): add --disable-eplugin and --disable-monoNot Zed2004-10-072-0/+28 * dont init the base plugin system here anymore, only register the hookNot Zed2004-10-072-7/+5 * show the toplevel notebook if we had to create one, always.Not Zed2004-10-075-70/+234 * rename to view_popup_factory. Make it build an epopup item list directly.Not Zed2004-10-0715-294/+372 * fix for e-popup api changes. Moved all mask specifiers to visible ratherNot Zed2004-10-079-43/+112 * put back in the attachment attaching code. Doesn't work for s/mime andNot Zed2004-10-076-17/+35 * e-popup api changes.Not Zed2004-10-073-2/+7 * only take one mask parameter, and implement EPopupItem->enable to do whatNot Zed2004-10-073-21/+52 * Check msg->result for error and set an exception if appropriate.Jeffrey Stedfast2004-10-072-11/+37 * Revert fix for #60551Rodrigo Moya2004-10-072-9/+7 * Fixes #48116Iván Frade2004-10-072-11/+30 * Updated Catalan translation by Xavier Conde Rueda <xaviconde@eresmas.com>.Jordi Mallach2004-10-06