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
f5fb3f94
Commit
f5fb3f94
authored
Oct 20, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/refactor
parents
3eecfa1e
1bcc69da
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
80 additions
and
52 deletions
+80
-52
apps/common/main/lib/extend/Bootstrap.js
apps/common/main/lib/extend/Bootstrap.js
+12
-3
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+38
-31
apps/documenteditor/main/app/controller/RightMenu.js
apps/documenteditor/main/app/controller/RightMenu.js
+4
-3
apps/documenteditor/main/app/template/StatusBar.template
apps/documenteditor/main/app/template/StatusBar.template
+1
-1
apps/documenteditor/main/app/view/RightMenu.js
apps/documenteditor/main/app/view/RightMenu.js
+2
-2
apps/documenteditor/main/app/view/Statusbar.js
apps/documenteditor/main/app/view/Statusbar.js
+1
-0
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+3
-0
apps/presentationeditor/main/app/controller/RightMenu.js
apps/presentationeditor/main/app/controller/RightMenu.js
+4
-3
apps/presentationeditor/main/app/template/StatusBar.template
apps/presentationeditor/main/app/template/StatusBar.template
+1
-1
apps/presentationeditor/main/app/view/DocumentPreview.js
apps/presentationeditor/main/app/view/DocumentPreview.js
+1
-1
apps/presentationeditor/main/app/view/RightMenu.js
apps/presentationeditor/main/app/view/RightMenu.js
+1
-1
apps/presentationeditor/main/app/view/Statusbar.js
apps/presentationeditor/main/app/view/Statusbar.js
+1
-0
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+3
-0
apps/spreadsheeteditor/main/app/controller/RightMenu.js
apps/spreadsheeteditor/main/app/controller/RightMenu.js
+4
-3
apps/spreadsheeteditor/main/app/view/RightMenu.js
apps/spreadsheeteditor/main/app/view/RightMenu.js
+1
-1
apps/spreadsheeteditor/main/app/view/Statusbar.js
apps/spreadsheeteditor/main/app/view/Statusbar.js
+2
-1
apps/spreadsheeteditor/main/app/view/Toolbar.js
apps/spreadsheeteditor/main/app/view/Toolbar.js
+1
-1
No files found.
apps/common/main/lib/extend/Bootstrap.js
View file @
f5fb3f94
...
...
@@ -186,6 +186,16 @@ function getParent($this) {
return
$parent
&&
$parent
.
length
?
$parent
:
$this
.
parent
();
}
function
clearMenus
()
{
$
(
'
.dropdown-toggle
'
).
each
(
function
(
e
)
{
var
$parent
=
(
$
(
this
)).
parent
();
if
(
!
$parent
.
hasClass
(
'
open
'
))
return
;
$parent
.
trigger
(
e
=
$
.
Event
(
'
hide.bs.dropdown
'
));
if
(
e
.
isDefaultPrevented
())
return
;
$parent
.
removeClass
(
'
open
'
).
trigger
(
'
hidden.bs.dropdown
'
);
})
}
$
(
document
)
.
off
(
'
keydown.bs.dropdown.data-api
'
)
.
on
(
'
keydown.bs.dropdown.data-api
'
,
'
[data-toggle=dropdown], [role=menu]
'
,
onDropDownKeyDown
);
...
...
@@ -206,9 +216,8 @@ $(document)
}
function
onDropDownClick
(
e
)
{
if
((
e
.
which
==
1
||
e
.
which
==
undefined
)
&&
!!
clickDefHandler
)
{
clickDefHandler
(
e
);
}
if
(
e
.
which
==
1
||
e
.
which
==
undefined
)
clearMenus
();
}
if
(
!!
clickDefHandler
)
{
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
f5fb3f94
...
...
@@ -423,39 +423,41 @@ define([
var
changes
=
version
.
changes
,
change
,
i
;
if
(
changes
&&
changes
.
length
>
0
)
{
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
changeid
'
,
changes
.
length
-
1
);
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
docIdPrev
'
,
docIdPrev
);
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
hasChanges
'
,
changes
.
length
>
1
);
for
(
i
=
changes
.
length
-
2
;
i
>=
0
;
i
--
)
{
change
=
changes
[
i
];
user
=
usersStore
.
findUser
(
change
.
user
.
id
);
if
(
!
user
)
{
user
=
new
Common
.
Models
.
User
({
id
:
change
.
user
.
id
,
username
:
change
.
user
.
name
,
colorval
:
Asc
.
c_oAscArrUserColors
[
usersCnt
],
color
:
this
.
generateUserColor
(
Asc
.
c_oAscArrUserColors
[
usersCnt
++
])
});
usersStore
.
add
(
user
);
if
(
!
_
.
isEmpty
(
version
.
serverVersion
)
&&
version
.
serverVersion
==
this
.
appOptions
.
buildVersion
)
{
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
changeid
'
,
changes
.
length
-
1
);
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
hasChanges
'
,
changes
.
length
>
1
);
for
(
i
=
changes
.
length
-
2
;
i
>=
0
;
i
--
)
{
change
=
changes
[
i
];
user
=
usersStore
.
findUser
(
change
.
user
.
id
);
if
(
!
user
)
{
user
=
new
Common
.
Models
.
User
({
id
:
change
.
user
.
id
,
username
:
change
.
user
.
name
,
colorval
:
Asc
.
c_oAscArrUserColors
[
usersCnt
],
color
:
this
.
generateUserColor
(
Asc
.
c_oAscArrUserColors
[
usersCnt
++
])
});
usersStore
.
add
(
user
);
}
arrVersions
.
push
(
new
Common
.
Models
.
HistoryVersion
({
version
:
version
.
versionGroup
,
revision
:
version
.
version
,
changeid
:
i
,
userid
:
change
.
user
.
id
,
username
:
change
.
user
.
name
,
usercolor
:
user
.
get
(
'
color
'
),
created
:
change
.
created
,
docId
:
version
.
key
,
docIdPrev
:
docIdPrev
,
selected
:
false
,
canRestore
:
this
.
appOptions
.
canHistoryRestore
,
isRevision
:
false
,
isVisible
:
true
}));
arrColors
.
push
(
user
.
get
(
'
colorval
'
));
}
arrVersions
.
push
(
new
Common
.
Models
.
HistoryVersion
({
version
:
version
.
versionGroup
,
revision
:
version
.
version
,
changeid
:
i
,
userid
:
change
.
user
.
id
,
username
:
change
.
user
.
name
,
usercolor
:
user
.
get
(
'
color
'
),
created
:
change
.
created
,
docId
:
version
.
key
,
docIdPrev
:
docIdPrev
,
selected
:
false
,
canRestore
:
this
.
appOptions
.
canHistoryRestore
,
isRevision
:
false
,
isVisible
:
true
}));
arrColors
.
push
(
user
.
get
(
'
colorval
'
));
}
}
else
if
(
ver
==
0
&&
versions
.
length
==
1
)
{
arrVersions
[
arrVersions
.
length
-
1
].
set
(
'
docId
'
,
version
.
key
+
'
1
'
);
...
...
@@ -954,6 +956,10 @@ define([
}
this
.
permissions
.
review
=
(
this
.
permissions
.
review
===
undefined
)
?
(
this
.
permissions
.
edit
!==
false
)
:
this
.
permissions
.
review
;
if
(
params
.
asc_getRights
()
!==
Asc
.
c_oRights
.
Edit
)
this
.
permissions
.
edit
=
this
.
permissions
.
review
=
false
;
this
.
appOptions
.
canAnalytics
=
params
.
asc_getIsAnalyticsEnable
();
this
.
appOptions
.
canLicense
=
(
licType
===
Asc
.
c_oLicenseResult
.
Success
);
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
...
...
@@ -978,6 +984,7 @@ define([
this
.
appOptions
.
canEditStyles
=
this
.
appOptions
.
canLicense
&&
this
.
appOptions
.
canEdit
;
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
buildVersion
=
params
.
asc_getBuildVersion
();
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
this
.
document
.
fileType
);
this
.
appOptions
.
canDownloadOrigin
=
!
this
.
appOptions
.
nativeApp
&&
this
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
...
...
apps/documenteditor/main/app/controller/RightMenu.js
View file @
f5fb3f94
...
...
@@ -167,14 +167,15 @@ define([
this
.
_settings
[
Common
.
Utils
.
documentSettingsType
.
MailMerge
].
locked
=
!
can_add_table
||
in_equation
;
}
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
;
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
,
activePane
=
this
.
rightmenu
.
GetActivePane
();
for
(
i
=
0
;
i
<
this
.
_settings
.
length
;
i
++
)
{
var
pnl
=
this
.
_settings
[
i
];
if
(
pnl
===
undefined
||
pnl
.
btn
===
undefined
||
pnl
.
panel
===
undefined
)
continue
;
if
(
pnl
.
hidden
)
{
if
(
!
pnl
.
btn
.
isDisabled
())
pnl
.
btn
.
setDisabled
(
true
);
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
-
1
;
}
else
{
if
(
pnl
.
btn
.
isDisabled
())
pnl
.
btn
.
setDisabled
(
false
);
...
...
@@ -182,7 +183,7 @@ define([
if
(
pnl
.
needShow
)
{
pnl
.
needShow
=
false
;
priorityactive
=
i
;
}
else
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
}
else
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
i
;
pnl
.
panel
.
setLocked
(
pnl
.
locked
);
}
...
...
apps/documenteditor/main/app/template/StatusBar.template
View file @
f5fb3f94
<div class="statusbar" style="display:table;">
<div class="status-group dropup">
<label id="label-pages" class="status-label" style="margin-left: 40px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
<label id="label-pages" class="status-label
dropdown-toggle
" style="margin-left: 40px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
<div id="status-goto-box" class="dropdown-menu">
<label style="float:left;line-height:22px;"><%= scope.goToPageText %></label>
<div id="status-goto-page" style="display:inline-block;"></div>
...
...
apps/documenteditor/main/app/view/RightMenu.js
View file @
f5fb3f94
...
...
@@ -258,7 +258,7 @@ define([
this
.
_settings
[
type
].
btn
.
toggle
(
true
,
false
);
this
.
_settings
[
type
].
btn
.
trigger
(
'
click
'
,
this
.
_settings
[
type
].
btn
);
}
else
{
var
target_pane
=
$
(
"
#
"
+
this
.
_settings
[
type
].
panel
);
var
target_pane
=
this
.
$el
.
find
(
"
#
"
+
this
.
_settings
[
type
].
panel
);
if
(
!
target_pane
.
hasClass
(
'
active
'
)
)
{
target_pane
.
parent
().
find
(
'
> .active
'
).
removeClass
(
'
active
'
);
target_pane
.
addClass
(
"
active
"
);
...
...
@@ -271,7 +271,7 @@ define([
},
GetActivePane
:
function
()
{
return
(
this
.
minimizedMode
)
?
null
:
$
(
"
.settings-panel.active
"
)[
0
].
id
;
return
(
this
.
minimizedMode
)
?
null
:
this
.
$el
.
find
(
"
.settings-panel.active
"
)[
0
].
id
;
},
clearSelection
:
function
()
{
...
...
apps/documenteditor/main/app/view/Statusbar.js
View file @
f5fb3f94
...
...
@@ -417,6 +417,7 @@ define([
usertip
.
setContent
();
}
(
length
>
1
)
?
this
.
panelUsersBlock
.
attr
(
'
data-toggle
'
,
'
dropdown
'
)
:
this
.
panelUsersBlock
.
removeAttr
(
'
data-toggle
'
);
this
.
panelUsersBlock
.
toggleClass
(
'
dropdown-toggle
'
,
length
>
1
);
(
length
>
1
)
?
this
.
panelUsersBlock
.
off
(
'
click
'
)
:
this
.
panelUsersBlock
.
on
(
'
click
'
,
_
.
bind
(
this
.
onUsersClick
,
this
));
},
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
f5fb3f94
...
...
@@ -733,6 +733,9 @@ define([
return
;
}
if
(
params
.
asc_getRights
()
!==
Asc
.
c_oRights
.
Edit
)
this
.
permissions
.
edit
=
false
;
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
canLicense
=
(
licType
===
Asc
.
c_oLicenseResult
.
Success
);
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
...
...
apps/presentationeditor/main/app/controller/RightMenu.js
View file @
f5fb3f94
...
...
@@ -148,14 +148,15 @@ define([
}
}
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
;
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
,
activePane
=
this
.
rightmenu
.
GetActivePane
();
for
(
i
=
0
;
i
<
this
.
_settings
.
length
;
i
++
)
{
var
pnl
=
this
.
_settings
[
i
];
if
(
pnl
===
undefined
)
continue
;
if
(
pnl
.
hidden
)
{
if
(
!
pnl
.
btn
.
isDisabled
())
pnl
.
btn
.
setDisabled
(
true
);
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
-
1
;
}
else
{
if
(
pnl
.
btn
.
isDisabled
())
pnl
.
btn
.
setDisabled
(
false
);
...
...
@@ -165,7 +166,7 @@ define([
pnl
.
needShow
=
false
;
priorityactive
=
i
;
}
else
if
(
i
!=
Common
.
Utils
.
documentSettingsType
.
Slide
||
this
.
rightmenu
.
_settings
[
i
].
isCurrent
)
{
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
i
;
}
...
...
apps/presentationeditor/main/app/template/StatusBar.template
View file @
f5fb3f94
...
...
@@ -2,7 +2,7 @@
<div class="statusbar" style="display:table;">
<div class="status-group dropup">
<button id="status-btn-preview" type="button" class="btn small btn-toolbar" style="margin-left: 9px;"><span class="btn-icon"> </span></button>
<label id="status-label-pages" class="status-label" style="margin-left: 7px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
<label id="status-label-pages" class="status-label
dropdown-toggle
" style="margin-left: 7px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
<div id="status-goto-box" class="dropdown-menu">
<label style="float:left;line-height:22px;"><%= scope.goToPageText %></label>
<div id="status-goto-page" style="display:inline-block;"></div>
...
...
apps/presentationeditor/main/app/view/DocumentPreview.js
View file @
f5fb3f94
...
...
@@ -78,7 +78,7 @@ define([
'
<div class="separator"/>
'
,
'
</div>
'
,
'
<div class="preview-group dropup">
'
,
'
<label id="preview-label-slides" class="status-label" data-toggle="dropdown">Slide 1 of 1</label>
'
,
'
<label id="preview-label-slides" class="status-label
dropdown-toggle
" data-toggle="dropdown">Slide 1 of 1</label>
'
,
'
<div id="preview-goto-box" class="dropdown-menu">
'
,
'
<label style="float:left;line-height:22px;">
'
+
this
.
goToSlideText
+
'
</label>
'
,
'
<div id="preview-goto-page" style="display:inline-block;"></div>
'
,
...
...
apps/presentationeditor/main/app/view/RightMenu.js
View file @
f5fb3f94
...
...
@@ -254,7 +254,7 @@ define([
},
GetActivePane
:
function
()
{
return
(
this
.
minimizedMode
)
?
null
:
$
(
"
.settings-panel.active
"
)[
0
].
id
;
return
(
this
.
minimizedMode
)
?
null
:
this
.
$el
.
find
(
"
.settings-panel.active
"
)[
0
].
id
;
},
SetDisabled
:
function
(
id
,
disabled
,
all
)
{
...
...
apps/presentationeditor/main/app/view/Statusbar.js
View file @
f5fb3f94
...
...
@@ -321,6 +321,7 @@ define([
usertip
.
setContent
();
}
(
length
>
1
)
?
this
.
panelUsersBlock
.
attr
(
'
data-toggle
'
,
'
dropdown
'
)
:
this
.
panelUsersBlock
.
removeAttr
(
'
data-toggle
'
);
this
.
panelUsersBlock
.
toggleClass
(
'
dropdown-toggle
'
,
length
>
1
);
(
length
>
1
)
?
this
.
panelUsersBlock
.
off
(
'
click
'
)
:
this
.
panelUsersBlock
.
on
(
'
click
'
,
_
.
bind
(
this
.
onUsersClick
,
this
));
},
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
f5fb3f94
...
...
@@ -752,6 +752,9 @@ define([
return
;
}
if
(
params
.
asc_getRights
()
!==
Asc
.
c_oRights
.
Edit
)
this
.
permissions
.
edit
=
false
;
this
.
appOptions
.
canAutosave
=
true
;
this
.
appOptions
.
canAnalytics
=
params
.
asc_getIsAnalyticsEnable
();
...
...
apps/spreadsheeteditor/main/app/controller/RightMenu.js
View file @
f5fb3f94
...
...
@@ -177,7 +177,8 @@ define([
this
.
_settings
[
settingsType
].
hidden
=
0
;
}
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
;
var
lastactive
=
-
1
,
currentactive
,
priorityactive
=
-
1
,
activePane
=
this
.
rightmenu
.
GetActivePane
();
for
(
i
=
0
;
i
<
this
.
_settings
.
length
;
++
i
)
{
var
pnl
=
this
.
_settings
[
i
];
if
(
pnl
===
undefined
)
continue
;
...
...
@@ -185,7 +186,7 @@ define([
if
(
pnl
.
hidden
)
{
if
(
!
pnl
.
btn
.
isDisabled
()
)
pnl
.
btn
.
setDisabled
(
true
);
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
-
1
;
}
else
{
if
(
pnl
.
btn
.
isDisabled
()
)
...
...
@@ -194,7 +195,7 @@ define([
if
(
pnl
.
needShow
)
{
pnl
.
needShow
=
false
;
priorityactive
=
i
;
}
else
if
(
this
.
rightmenu
.
GetActivePane
()
==
pnl
.
panelId
)
}
else
if
(
activePane
==
pnl
.
panelId
)
currentactive
=
i
;
pnl
.
panel
.
setLocked
(
pnl
.
locked
);
}
...
...
apps/spreadsheeteditor/main/app/view/RightMenu.js
View file @
f5fb3f94
...
...
@@ -234,7 +234,7 @@ define([
},
GetActivePane
:
function
()
{
return
(
this
.
minimizedMode
)
?
null
:
$
(
"
.settings-panel.active
"
)[
0
].
id
;
return
(
this
.
minimizedMode
)
?
null
:
this
.
$el
.
find
(
"
.settings-panel.active
"
)[
0
].
id
;
},
clearSelection
:
function
()
{
...
...
apps/spreadsheeteditor/main/app/view/Statusbar.js
View file @
f5fb3f94
...
...
@@ -300,7 +300,7 @@ define([
});
});
this
.
tabbar
.
$el
.
append
(
'
<div class="menu-backdrop" data-toggle="dropdown" style="width:0; height:0;"/>
'
);
this
.
tabbar
.
$el
.
append
(
'
<div class="menu-backdrop
dropdown-toggle
" data-toggle="dropdown" style="width:0; height:0;"/>
'
);
this
.
tabMenu
.
render
(
this
.
tabbar
.
$el
);
this
.
tabMenu
.
on
(
'
show:after
'
,
_
.
bind
(
this
.
onTabMenuAfterShow
,
this
));
this
.
tabMenu
.
on
(
'
hide:after
'
,
_
.
bind
(
this
.
onTabMenuAfterHide
,
this
));
...
...
@@ -445,6 +445,7 @@ define([
usertip
.
setContent
();
}
(
length
>
1
)
?
this
.
panelUsersBlock
.
attr
(
'
data-toggle
'
,
'
dropdown
'
)
:
this
.
panelUsersBlock
.
removeAttr
(
'
data-toggle
'
);
this
.
panelUsersBlock
.
toggleClass
(
'
dropdown-toggle
'
,
length
>
1
);
(
length
>
1
)
?
this
.
panelUsersBlock
.
off
(
'
click
'
)
:
this
.
panelUsersBlock
.
on
(
'
click
'
,
_
.
bind
(
this
.
onUsersClick
,
this
));
},
...
...
apps/spreadsheeteditor/main/app/view/Toolbar.js
View file @
f5fb3f94
...
...
@@ -598,7 +598,7 @@ define([
me
.
listStyles
=
new
Common
.
UI
.
ComboDataView
({
cls
:
'
combo-styles
'
,
enableKeyEvents
:
true
,
itemWidth
:
1
04
,
itemWidth
:
1
12
,
itemHeight
:
38
,
hint
:
this
.
tipCellStyle
,
menuMaxHeight
:
226
,
...
...
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