Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
1d1381cd
Commit
1d1381cd
authored
Mar 12, 2016
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style: triggerMaximize(), triggerSubmit(), setFillStyle() add to erp5_gadgetfield.js
parent
2467360b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
2 deletions
+70
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
...inTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
+8
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
...Item/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
+60
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
...tem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
+2
-2
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
View file @
1d1381cd
...
...
@@ -1196,6 +1196,14 @@ span.search button .image {\n
padding: 5px;\n
}\n
\n
/* Fullscreen content section */\n
.ui-content-fullscreen {\n
position: fixed;\n
top: 0; left: 0; right: 0; bottom: 0;\n
height: auto;\n
z-index: 2000;\n
}\n
\n
/* Search results list\n
------------------------------------------------*/\n
\n
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
View file @
1d1381cd
...
...
@@ -27,6 +27,19 @@
return
new
RSVP
.
Promise
(
resolver
,
canceller
);
}
function
getMaxHeight
(
wrap_obj
)
{
var
height
;
if
(
wrap_obj
)
{
height
=
window
.
innerHeight
-
wrap_obj
.
offsetTop
-
280
;
}
else
{
height
=
window
.
innerHeight
;
}
if
(
height
<
400
)
{
height
=
400
;
}
return
height
+
"
px
"
;
}
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// ready
...
...
@@ -46,6 +59,53 @@
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
setFillStyle
'
,
function
()
{
var
gadget
=
this
,
iframe
=
gadget
.
props
.
element
.
querySelector
(
'
iframe
'
),
height
=
getMaxHeight
(
iframe
),
width
=
"
100%
"
;
iframe
.
setAttribute
(
'
style
'
,
'
width:
'
+
width
+
'
; border: 0 none; height:
'
+
height
);
return
{
height
:
height
,
width
:
width
};
})
.
allowPublicAcquisition
(
'
triggerMaximize
'
,
function
()
{
var
gadget
=
this
,
fullscreen_classname
=
"
ui-content-fullscreen
"
,
info
,
wrap
=
gadget
.
props
.
element
.
querySelector
(
'
iframe
'
),
subiframe
=
wrap
.
contentDocument
.
querySelector
(
'
iframe
'
);
if
(
wrap
.
className
.
search
(
"
"
+
fullscreen_classname
)
===
-
1
)
{
gadget
.
props
.
fullScreenRestore
=
{
scrollTop
:
window
.
pageYOffset
,
scrollLeft
:
window
.
pageXOffset
,
width
:
wrap
.
width
,
height
:
wrap
.
height
};
wrap
.
style
.
width
=
"
100%
"
;
wrap
.
style
.
height
=
getMaxHeight
();
wrap
.
className
+=
"
"
+
fullscreen_classname
;
document
.
documentElement
.
style
.
overflow
=
"
hidden
"
;
}
else
{
wrap
.
className
=
wrap
.
className
.
replace
(
new
RegExp
(
"
\\
s*
"
+
fullscreen_classname
+
"
\\
b
"
),
""
);
document
.
documentElement
.
style
.
overflow
=
""
;
info
=
gadget
.
props
.
fullScreenRestore
;
// wrap.style.width = info.width;
wrap
.
style
.
width
=
"
100%
"
;
wrap
.
style
.
height
=
getMaxHeight
(
wrap
);
window
.
scrollTo
(
info
.
scrollLeft
,
info
.
scrollTop
);
}
if
(
subiframe
)
{
subiframe
.
style
.
height
=
wrap
.
style
.
height
;
}
})
.
allowPublicAcquisition
(
'
triggerSubmit
'
,
function
()
{
return
document
.
querySelector
(
"
button[name='Base_edit:method']
"
).
click
();
})
.
declareService
(
function
()
{
var
g
=
this
,
i
,
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.xml
View file @
1d1381cd
...
...
@@ -12,7 +12,7 @@
</item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts
20545059.65
</string>
</value>
<value>
<string>
ts
57741245.74
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
@@ -28,7 +28,7 @@
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
7063
</int>
</value>
<value>
<int>
9114
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
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