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
7749b955
Commit
7749b955
authored
Sep 19, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added developer mode.
parent
bf566734
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
15 deletions
+52
-15
apps/common/main/lib/template/Header.template
apps/common/main/lib/template/Header.template
+1
-0
apps/common/main/lib/view/Header.js
apps/common/main/lib/view/Header.js
+9
-1
apps/common/main/resources/less/header.less
apps/common/main/resources/less/header.less
+28
-0
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+4
-6
apps/documenteditor/main/locale/en.json
apps/documenteditor/main/locale/en.json
+1
-0
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+4
-6
apps/presentationeditor/main/locale/en.json
apps/presentationeditor/main/locale/en.json
+1
-0
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+3
-2
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+1
-0
No files found.
apps/common/main/lib/template/Header.template
View file @
7749b955
<div id="header-container">
<div id="header-logo"></div>
<div id="header-caption"><div><%= headerCaption %></div></div>
<div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div>
<div id="header-documentcaption"><%= documentCaption %></div>
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
</div>
\ No newline at end of file
apps/common/main/lib/view/Header.js
View file @
7749b955
...
...
@@ -53,6 +53,7 @@ define([
options
:
{
branding
:
{},
headerCaption
:
'
Default Caption
'
,
headerDeveloper
:
'
DEVELOPER MODE
'
,
documentCaption
:
''
,
canBack
:
false
},
...
...
@@ -77,6 +78,7 @@ define([
this
.
options
=
this
.
options
?
_
({}).
extend
(
this
.
options
,
options
)
:
options
;
this
.
headerCaption
=
this
.
options
.
headerCaption
;
this
.
headerDeveloper
=
this
.
txtHeaderDeveloper
;
this
.
documentCaption
=
this
.
options
.
documentCaption
;
this
.
canBack
=
this
.
options
.
canBack
;
this
.
branding
=
this
.
options
.
customization
;
...
...
@@ -85,6 +87,7 @@ define([
render
:
function
()
{
$
(
this
.
el
).
html
(
this
.
template
({
headerCaption
:
this
.
headerCaption
,
headerDeveloper
:
this
.
headerDeveloper
,
documentCaption
:
Common
.
Utils
.
String
.
htmlEncode
(
this
.
documentCaption
),
canBack
:
this
.
canBack
,
textBack
:
this
.
textBack
...
...
@@ -219,7 +222,12 @@ define([
}
},
setDeveloperMode
:
function
(
mode
)
{
$
(
'
#header-developer
'
).
toggleClass
(
'
hidden
'
,
!
mode
);
},
textBack
:
'
Go to Documents
'
,
openNewTabText
:
'
Open in New Tab
'
openNewTabText
:
'
Open in New Tab
'
,
txtHeaderDeveloper
:
'
DEVELOPER MODE
'
},
Common
.
Views
.
Header
||
{}))
});
apps/common/main/resources/less/header.less
View file @
7749b955
...
...
@@ -46,6 +46,34 @@
}
}
#header-developer {
background-color: #ffb400;
padding-left: 15px + @app-header-height / 3;
& > div {
position: relative;
background-color: #ffb400;
color: #6e4e00 !important;
padding-right: 15px;
cursor: default;
z-index: 1;
white-space: nowrap;
height: @app-header-height;
line-height: @app-header-height;
&:after {
content: '';
position: absolute;
top: 0;
right: -@app-header-height / 2;
width: @app-header-height / 2;
height: @app-header-height;
border-top: @app-header-height / 2 solid transparent;
border-left: @app-header-height / 3 solid #ffb400;
border-bottom: @app-header-height / 2 solid transparent;
}
}
}
#header-documentcaption {
width: 100%;
max-width: 100px;
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
7749b955
...
...
@@ -963,12 +963,10 @@ define([
this
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
appOptions
.
canBranding
=
params
.
asc_getCanBranding
()
&&
(
typeof
this
.
editorConfig
.
customization
==
'
object
'
);
if
(
this
.
appOptions
.
canBranding
)
{
this
.
getApplication
()
.
getController
(
'
Viewport
'
)
.
getView
(
'
Common.Views.Header
'
)
.
setBranding
(
this
.
editorConfig
.
customization
);
}
if
(
this
.
appOptions
.
canBranding
)
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setBranding
(
this
.
editorConfig
.
customization
);
params
.
asc_getTrial
()
&&
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setDeveloperMode
(
true
);
this
.
applyModeCommonElements
();
this
.
applyModeEditorElements
();
...
...
apps/documenteditor/main/locale/en.json
View file @
7749b955
...
...
@@ -141,6 +141,7 @@
"Common.Views.ExternalMergeEditor.textTitle"
:
"Mail Merge Recipients"
,
"Common.Views.Header.openNewTabText"
:
"Open in New Tab"
,
"Common.Views.Header.textBack"
:
"Go to Documents"
,
"Common.Views.Header.txtHeaderDeveloper"
:
"DEVELOPER MODE"
,
"Common.Views.History.textHistoryHeader"
:
"Back to Document"
,
"Common.Views.ImageFromUrlDialog.cancelButtonText"
:
"Cancel"
,
"Common.Views.ImageFromUrlDialog.okButtonText"
:
"OK"
,
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
7749b955
...
...
@@ -742,12 +742,10 @@ define([
this
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
appOptions
.
canBranding
=
params
.
asc_getCanBranding
()
&&
(
typeof
this
.
editorConfig
.
customization
==
'
object
'
);
if
(
this
.
appOptions
.
canBranding
)
{
this
.
getApplication
()
.
getController
(
'
Viewport
'
)
.
getView
(
'
Common.Views.Header
'
)
.
setBranding
(
this
.
editorConfig
.
customization
);
}
if
(
this
.
appOptions
.
canBranding
)
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setBranding
(
this
.
editorConfig
.
customization
);
params
.
asc_getTrial
()
&&
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setDeveloperMode
(
true
);
this
.
applyModeCommonElements
();
this
.
applyModeEditorElements
();
...
...
apps/presentationeditor/main/locale/en.json
View file @
7749b955
...
...
@@ -80,6 +80,7 @@
"Common.Views.ExternalDiagramEditor.textTitle"
:
"Chart Editor"
,
"Common.Views.Header.openNewTabText"
:
"Open in New Tab"
,
"Common.Views.Header.textBack"
:
"Go to Documents"
,
"Common.Views.Header.txtHeaderDeveloper"
:
"DEVELOPER MODE"
,
"Common.Views.ImageFromUrlDialog.cancelButtonText"
:
"Cancel"
,
"Common.Views.ImageFromUrlDialog.okButtonText"
:
"OK"
,
"Common.Views.ImageFromUrlDialog.textUrl"
:
"Paste an image URL:"
,
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
7749b955
...
...
@@ -759,9 +759,10 @@ define([
this
.
appOptions
.
canChat
=
this
.
appOptions
.
canLicense
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
false
);
this
.
appOptions
.
canBranding
=
params
.
asc_getCanBranding
()
&&
(
typeof
this
.
editorConfig
.
customization
==
'
object
'
);
if
(
this
.
appOptions
.
canBranding
)
{
if
(
this
.
appOptions
.
canBranding
)
this
.
headerView
.
setBranding
(
this
.
editorConfig
.
customization
);
}
params
.
asc_getTrial
()
&&
this
.
headerView
.
setDeveloperMode
(
true
);
}
this
.
appOptions
.
canRequestEditRights
=
this
.
editorConfig
.
canRequestEditRights
;
...
...
apps/spreadsheeteditor/main/locale/en.json
View file @
7749b955
...
...
@@ -74,6 +74,7 @@
"Common.Views.DocumentAccessDialog.textTitle"
:
"Sharing Settings"
,
"Common.Views.Header.openNewTabText"
:
"Open in New Tab"
,
"Common.Views.Header.textBack"
:
"Go to Documents"
,
"Common.Views.Header.txtHeaderDeveloper"
:
"DEVELOPER MODE"
,
"Common.Views.ImageFromUrlDialog.cancelButtonText"
:
"Cancel"
,
"Common.Views.ImageFromUrlDialog.okButtonText"
:
"OK"
,
"Common.Views.ImageFromUrlDialog.textUrl"
:
"Paste an image URL:"
,
...
...
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