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
6bfd3d80
Commit
6bfd3d80
authored
Sep 05, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Absolute urls in plugins.
parent
f821bd04
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
8 deletions
+15
-8
apps/common/main/lib/controller/Plugins.js
apps/common/main/lib/controller/Plugins.js
+6
-3
apps/common/main/lib/model/Plugin.js
apps/common/main/lib/model/Plugin.js
+2
-1
apps/common/main/lib/view/Plugins.js
apps/common/main/lib/view/Plugins.js
+1
-1
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+2
-1
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+2
-1
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+2
-1
No files found.
apps/common/main/lib/controller/Plugins.js
View file @
6bfd3d80
...
...
@@ -219,8 +219,12 @@ define([
onPluginShow
:
function
(
plugin
,
variationIndex
)
{
var
variation
=
plugin
.
get_Variations
()[
variationIndex
];
if
(
variation
.
get_Visual
())
{
var
url
=
variation
.
get_Url
();
if
(
!
/
(
^https
?
:
\/\/)
/i
.
test
(
url
)
&&
!
/
(
^www.
)
/i
.
test
(
url
))
url
=
((
plugin
.
get_BaseUrl
().
length
==
0
)
?
this
.
panelPlugins
.
pluginsPath
:
plugin
.
get_BaseUrl
())
+
url
;
if
(
variation
.
get_InsideMode
())
{
this
.
panelPlugins
.
openInsideMode
(
plugin
.
get_Name
(),
((
plugin
.
get_BaseUrl
().
length
==
0
)
?
this
.
panelPlugins
.
pluginsPath
:
plugin
.
get_BaseUrl
())
+
variation
.
get_Url
()
);
this
.
panelPlugins
.
openInsideMode
(
plugin
.
get_Name
(),
url
);
}
else
{
var
me
=
this
,
arrBtns
=
variation
.
get_Buttons
(),
...
...
@@ -234,12 +238,11 @@ define([
});
}
var
_baseUrl
=
(
plugin
.
get_BaseUrl
().
length
==
0
)
?
me
.
panelPlugins
.
pluginsPath
:
plugin
.
get_BaseUrl
();
me
.
pluginDlg
=
new
Common
.
Views
.
PluginDlg
({
title
:
plugin
.
get_Name
(),
width
:
size
[
0
],
// inner width
height
:
size
[
1
],
// inner height
url
:
_baseUrl
+
variation
.
get_Url
()
,
url
:
url
,
buttons
:
newBtns
,
toolcallback
:
_
.
bind
(
this
.
onToolClose
,
this
)
});
...
...
apps/common/main/lib/model/Plugin.js
View file @
6bfd3d80
...
...
@@ -65,7 +65,8 @@ define([
isUpdateOleOnResize
:
false
,
buttons
:
[],
size
:
[
800
,
600
],
initOnSelectionChanged
:
false
initOnSelectionChanged
:
false
,
isRelativeUrl
:
true
}
}
});
...
...
apps/common/main/lib/view/Plugins.js
View file @
6bfd3d80
...
...
@@ -92,7 +92,7 @@ define([
enableKeyEvents
:
false
,
itemTemplate
:
_
.
template
([
'
<div id="<%= id %>" class="item-plugins" style="display: block;">
'
,
'
<div class="plugin-icon" style="background-image: url(
'
+
'
<% if (
baseUrl !=="") { %>
'
+
'
<%= baseUrl %>
'
+
'
<% } else { %>
'
+
this
.
pluginsPath
+
'
<%
} %>
'
+
'
<%= variations[currentVariation].get("icons")[(window.devicePixelRatio > 1) ? 1 : 0] %>);"></div>
'
,
'
<div class="plugin-icon" style="background-image: url(
'
+
'
<% if (
variations[currentVariation].get("isRelativeUrl")) { if (baseUrl !=="") { %>
'
+
'
<%= baseUrl %>
'
+
'
<% } else { %>
'
+
this
.
pluginsPath
+
'
<% }
} %>
'
+
'
<%= variations[currentVariation].get("icons")[(window.devicePixelRatio > 1) ? 1 : 0] %>);"></div>
'
,
'
<% if (variations.length>1) { %>
'
,
'
<div class="plugin-caret img-commonctrl"></div>
'
,
'
<% } %>
'
,
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
6bfd3d80
...
...
@@ -1806,7 +1806,8 @@ define([
isUpdateOleOnResize
:
itemVar
.
isUpdateOleOnResize
,
buttons
:
itemVar
.
buttons
,
size
:
itemVar
.
size
,
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
,
isRelativeUrl
:
!
(
/
(
^https
?
:
\/\/)
/i
.
test
(
itemVar
.
url
)
||
/
(
^www.
)
/i
.
test
(
itemVar
.
url
))
}));
});
if
(
variationsArr
.
length
>
0
)
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
6bfd3d80
...
...
@@ -1580,7 +1580,8 @@ define([
isUpdateOleOnResize
:
itemVar
.
isUpdateOleOnResize
,
buttons
:
itemVar
.
buttons
,
size
:
itemVar
.
size
,
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
,
isRelativeUrl
:
!
(
/
(
^https
?
:
\/\/)
/i
.
test
(
itemVar
.
url
)
||
/
(
^www.
)
/i
.
test
(
itemVar
.
url
))
}));
});
if
(
variationsArr
.
length
>
0
)
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
6bfd3d80
...
...
@@ -1809,7 +1809,8 @@ define([
isUpdateOleOnResize
:
itemVar
.
isUpdateOleOnResize
,
buttons
:
itemVar
.
buttons
,
size
:
itemVar
.
size
,
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
initOnSelectionChanged
:
itemVar
.
initOnSelectionChanged
,
isRelativeUrl
:
!
(
/
(
^https
?
:
\/\/)
/i
.
test
(
itemVar
.
url
)
||
/
(
^www.
)
/i
.
test
(
itemVar
.
url
))
}));
});
if
(
variationsArr
.
length
>
0
)
...
...
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