good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
0e2f6691
Commit
0e2f6691
authored
Feb 17, 2015
by
Alexandre Van de Sande
Browse files
Options
Downloads
Patches
Plain Diff
Cut, Copy, Undo and Redo working in webview
parent
abb9b7f4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/mist/assets/ext/mist.js
+7
-2
7 additions, 2 deletions
cmd/mist/assets/ext/mist.js
cmd/mist/assets/qml/views/browser.qml
+6
-4
6 additions, 4 deletions
cmd/mist/assets/qml/views/browser.qml
cmd/mist/assets/qml/views/catalog.qml
+7
-12
7 additions, 12 deletions
cmd/mist/assets/qml/views/catalog.qml
with
20 additions
and
18 deletions
cmd/mist/assets/ext/mist.js
+
7
−
2
View file @
0e2f6691
...
@@ -27,9 +27,14 @@ document.onkeydown = function(evt) {
...
@@ -27,9 +27,14 @@ document.onkeydown = function(evt) {
}
else
if
(
evt
.
ctrlKey
&&
evt
.
keyCode
==
88
)
{
}
else
if
(
evt
.
ctrlKey
&&
evt
.
keyCode
==
88
)
{
window
.
document
.
execCommand
(
"
cut
"
);
window
.
document
.
execCommand
(
"
cut
"
);
console
.
log
(
"
Ctrl-X
"
);
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
"
);
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
"
);
console
.
log
(
"
Ctrl-Z
"
);
}
}
};
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmd/mist/assets/qml/views/browser.qml
+
6
−
4
View file @
0e2f6691
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import
QtQuick
.
Controls
.
Styles
1.0
import
QtQuick
.
Controls
.
Styles
1.0
import
QtQuick
.
Layouts
1.0
;
import
QtQuick
.
Layouts
1.0
;
import
QtWebEngine
1.0
import
QtWebEngine
1.0
//
import QtWebEngine.experimental 1.0
import
QtWebEngine
.
experimental
1.0
import
QtQuick
.
Window
2.0
;
import
QtQuick
.
Window
2.0
;
Rectangle
{
Rectangle
{
...
@@ -340,7 +340,7 @@ Rectangle {
...
@@ -340,7 +340,7 @@ Rectangle {
WebEngineView
{
WebEngineView
{
objectName
:
"
webView
"
objectName
:
"
webView
"
id
:
webview
id
:
webview
//
experimental.settings.javascriptCanAccessClipboard: true
experimental.settings.javascriptCanAccessClipboard
:
true
//experimental.settings.localContentCanAccessRemoteUrls: true
//experimental.settings.localContentCanAccessRemoteUrls: true
anchors
{
anchors
{
left
:
parent
.
left
left
:
parent
.
left
...
@@ -399,6 +399,7 @@ Rectangle {
...
@@ -399,6 +399,7 @@ Rectangle {
onLoadingChanged
:
{
onLoadingChanged
:
{
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
webview
.
runJavaScript
(
"
document.title
"
,
function
(
pageTitle
)
{
webview
.
runJavaScript
(
"
document.title
"
,
function
(
pageTitle
)
{
menuItem
.
title
=
pageTitle
;
menuItem
.
title
=
pageTitle
;
});
});
...
@@ -441,6 +442,7 @@ Rectangle {
...
@@ -441,6 +442,7 @@ Rectangle {
webview
.
runJavaScript
(
eth
.
readFile
(
"
bignumber.min.js
"
));
webview
.
runJavaScript
(
eth
.
readFile
(
"
bignumber.min.js
"
));
webview
.
runJavaScript
(
eth
.
readFile
(
"
ethereum.js/dist/ethereum.js
"
));
webview
.
runJavaScript
(
eth
.
readFile
(
"
ethereum.js/dist/ethereum.js
"
));
webview
.
runJavaScript
(
eth
.
readFile
(
"
mist.js
"
));
var
cleanTitle
=
webview
.
url
.
toString
()
var
cleanTitle
=
webview
.
url
.
toString
()
var
matches
=
cleanTitle
.
match
(
/^
[
a-z
]
*
\:\/\/([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
var
matches
=
cleanTitle
.
match
(
/^
[
a-z
]
*
\:\/\/([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
...
...
This diff is collapsed.
Click to expand it.
cmd/mist/assets/qml/views/catalog.qml
+
7
−
12
View file @
0e2f6691
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import
QtQuick
.
Controls
.
Styles
1.0
import
QtQuick
.
Controls
.
Styles
1.0
import
QtQuick
.
Layouts
1.0
;
import
QtQuick
.
Layouts
1.0
;
import
QtWebEngine
1.0
import
QtWebEngine
1.0
//
import QtWebEngine.experimental 1.0
import
QtWebEngine
.
experimental
1.0
import
QtQuick
.
Window
2.0
;
import
QtQuick
.
Window
2.0
;
...
@@ -21,8 +21,6 @@ Rectangle {
...
@@ -21,8 +21,6 @@ Rectangle {
property
alias
windowTitle
:
webview
.
title
property
alias
windowTitle
:
webview
.
title
property
alias
webView
:
webview
property
alias
webView
:
webview
property
var
cleanPath
:
false
property
var
cleanPath
:
false
property
var
open
:
function
(
url
)
{
property
var
open
:
function
(
url
)
{
if
(
!
window
.
cleanPath
)
{
if
(
!
window
.
cleanPath
)
{
...
@@ -66,9 +64,6 @@ Rectangle {
...
@@ -66,9 +64,6 @@ Rectangle {
}
}
}
}
Component.onCompleted
:
{
}
Item
{
Item
{
objectName
:
"
root
"
objectName
:
"
root
"
id
:
root
id
:
root
...
@@ -85,7 +80,7 @@ Rectangle {
...
@@ -85,7 +80,7 @@ Rectangle {
property
var
domain
:
"
ethereum-dapp-catalog.meteor.com
"
property
var
domain
:
"
ethereum-dapp-catalog.meteor.com
"
url
:
protocol
+
domain
url
:
protocol
+
domain
//
experimental.settings.javascriptCanAccessClipboard: true
experimental.settings.javascriptCanAccessClipboard
:
true
onJavaScriptConsoleMessage
:
{
onJavaScriptConsoleMessage
:
{
...
@@ -112,11 +107,11 @@ Rectangle {
...
@@ -112,11 +107,11 @@ Rectangle {
}
}
}
}
//
onLoadingChanged: {
onLoadingChanged
:
{
//
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
//
webview.runJavaScript(eth.readFile("mist.js"));
webview
.
runJavaScript
(
eth
.
readFile
(
"
mist.js
"
));
//
}
}
//
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment