Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
9297531d
Commit
9297531d
authored
Jul 26, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update copy/cut/paste from toolbar and context menu.
parent
c964e8a8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
66 deletions
+26
-66
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+5
-13
apps/documenteditor/main/app/view/DocumentHolder.js
apps/documenteditor/main/app/view/DocumentHolder.js
+4
-10
apps/presentationeditor/main/app/controller/Toolbar.js
apps/presentationeditor/main/app/controller/Toolbar.js
+5
-13
apps/presentationeditor/main/app/view/DocumentHolder.js
apps/presentationeditor/main/app/view/DocumentHolder.js
+3
-9
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+4
-8
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+5
-13
No files found.
apps/documenteditor/main/app/controller/Toolbar.js
View file @
9297531d
...
...
@@ -873,29 +873,21 @@ define([
onCopyPaste
:
function
(
copy
,
e
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
// AscDesktopEditor object may exists in desktop version
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
// window['AscDesktopEditor'][copy ? 'Copy' : 'Paste'](); // desktop editor's methods
}
else
{
var
res
=
(
copy
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
de-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
de-hide-copywarning
"
,
1
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
})).
show
();
}
else
{
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
}
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
else
{
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
else
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
onIncrease
:
function
(
e
)
{
...
...
apps/documenteditor/main/app/view/DocumentHolder.js
View file @
9297531d
...
...
@@ -1663,26 +1663,20 @@ define([
onCutCopyPaste
:
function
(
item
,
e
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
}
else
{
var
res
=
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
de-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
de-hide-copywarning
"
,
1
);
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
})).
show
();
}
else
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
}
}
else
{
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
}
me
.
fireEvent
(
'
editcomplete
'
,
me
);
},
createDelayedElements
:
function
()
{
...
...
apps/presentationeditor/main/app/controller/Toolbar.js
View file @
9297531d
...
...
@@ -879,29 +879,21 @@ define([
onCopyPaste
:
function
(
copy
,
e
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
else
{
var
res
=
(
copy
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
pe-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
pe-hide-copywarning
"
,
1
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
})).
show
();
}
else
{
copy
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
}
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
else
{
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
else
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
onBold
:
function
(
btn
,
e
)
{
...
...
apps/presentationeditor/main/app/view/DocumentHolder.js
View file @
9297531d
...
...
@@ -834,26 +834,20 @@ define([
onCutCopyPaste
:
function
(
item
,
e
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
}
else
{
var
res
=
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
pe-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
pe-hide-copywarning
"
,
1
);
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
})).
show
();
}
else
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
Copy
()
:
me
.
api
.
Paste
());
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
}
}
else
{
me
.
fireEvent
(
'
editcomplete
'
,
me
);
}
me
.
fireEvent
(
'
editcomplete
'
,
me
);
},
fullScreen
:
function
(
element
)
{
...
...
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
9297531d
...
...
@@ -265,25 +265,21 @@ define([
onCopyPaste
:
function
(
item
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
asc_Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
());
}
else
{
var
res
=
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
asc_Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
());
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
sse-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
asc_Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
());
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
sse-hide-copywarning
"
,
1
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
documentHolder
);
}
})).
show
();
}
else
{
(
item
.
value
==
'
cut
'
)
?
me
.
api
.
asc_Cut
()
:
((
item
.
value
==
'
copy
'
)
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
());
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
documentHolder
);
}
}
else
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
documentHolder
);
},
onInsertEntire
:
function
(
item
)
{
...
...
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
9297531d
...
...
@@ -327,29 +327,21 @@ define([
onCopyPaste
:
function
(
copy
,
e
)
{
var
me
=
this
;
if
(
me
.
api
)
{
if
(
typeof
window
[
'
AscDesktopEditor
'
]
===
'
object
'
)
{
copy
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
else
{
var
res
=
(
copy
)
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
();
if
(
!
res
)
{
var
value
=
Common
.
localStorage
.
getItem
(
"
sse-hide-copywarning
"
);
if
(
!
(
value
&&
parseInt
(
value
)
==
1
))
{
(
new
Common
.
Views
.
CopyWarningDialog
({
handler
:
function
(
dontshow
)
{
copy
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
();
if
(
dontshow
)
Common
.
localStorage
.
setItem
(
"
sse-hide-copywarning
"
,
1
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
})).
show
();
}
else
{
copy
?
me
.
api
.
asc_Copy
()
:
me
.
api
.
asc_Paste
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
}
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
else
{
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
}
else
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Copy Warning
'
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
},
onIncreaseFontSize
:
function
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment