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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
d2e45d03
Commit
d2e45d03
authored
Nov 17, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_run_my_doc: allow to delete a slide directly from the list
parent
a50aa1c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
20 deletions
+56
-20
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.css.css
...m/portal_skins/erp5_run_my_doc/slideeditor.gadget.css.css
+10
-7
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
...tem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
+36
-7
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.less.txt
.../portal_skins/erp5_run_my_doc/slideeditor.gadget.less.txt
+10
-6
No files found.
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.css.css
View file @
d2e45d03
...
@@ -13,12 +13,8 @@ div[data-gadget-url$="slideeditor.gadget.html"] > .slide_list > section {
...
@@ -13,12 +13,8 @@ div[data-gadget-url$="slideeditor.gadget.html"] > .slide_list > section {
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
border
:
1px
solid
#000000
;
border
:
1px
solid
#000000
;
padding
:
0.5em
;
padding
:
0.5em
;
vertical-align
:
middle
;
text-align
:
center
;
margin-right
:
2em
;
margin-right
:
2em
;
margin-bottom
:
2em
;
margin-bottom
:
2em
;
display
:
flex
;
flex-direction
:
column
;
}
}
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
[
data-slide-index
]
{
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
[
data-slide-index
]
{
cursor
:
move
;
cursor
:
move
;
...
@@ -38,20 +34,27 @@ div[data-gadget-url$="slideeditor.gadget.html"] > .slide_list > section > img {
...
@@ -38,20 +34,27 @@ div[data-gadget-url$="slideeditor.gadget.html"] > .slide_list > section > img {
z-index
:
1
;
z-index
:
1
;
border-radius
:
0.325em
;
border-radius
:
0.325em
;
}
}
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
>
h1
{
text-align
:
center
;
padding-top
:
2.5em
;
}
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
button
{
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
button
{
padding
:
3pt
;
padding
:
3pt
;
float
:
right
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.14
);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.14
);
border-radius
:
0.325em
;
border-radius
:
0.325em
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
2em
;
width
:
2em
;
heigth
:
2em
;
height
:
2em
;
min-height
:
2em
;
overflow
:
hidden
;
overflow
:
hidden
;
text-indent
:
-9999px
;
text-indent
:
-9999px
;
white-space
:
nowrap
;
white-space
:
nowrap
;
position
:
relative
;
position
:
relative
;
z-index
:
2
;
z-index
:
2
;
}
}
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
button
:first-of-type
{
float
:
left
;
}
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
button
::before
{
div
[
data-gadget-url
$
=
"slideeditor.gadget.html"
]
>
.slide_list
>
section
button
::before
{
float
:
left
;
float
:
left
;
text-indent
:
0
;
text-indent
:
0
;
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.js.js
View file @
d2e45d03
...
@@ -439,7 +439,9 @@
...
@@ -439,7 +439,9 @@
section_list
=
getSlideElementList
(
gadget
.
state
.
value
),
section_list
=
getSlideElementList
(
gadget
.
state
.
value
),
draggable_element_list
=
[],
draggable_element_list
=
[],
i
,
i
,
content
;
content
,
edit_element
,
delete_element
;
// Clone listbox header structure to reuse the css
// Clone listbox header structure to reuse the css
header_element
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
document_table
'
},
[
header_element
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
document_table
'
},
[
...
@@ -450,12 +452,23 @@
...
@@ -450,12 +452,23 @@
]);
]);
for
(
i
=
0
;
i
<
section_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
section_list
.
length
;
i
+=
1
)
{
edit_element
=
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
text
:
translation_dict
.
Edit
,
'
class
'
:
'
display-slide ui-icon-pencil ui-btn-icon-left
'
,
'
data-slide-index
'
:
i
});
delete_element
=
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
text
:
translation_dict
.
Delete
,
'
class
'
:
'
delete-slide ui-icon-trash-o ui-btn-icon-left
'
,
'
data-slide-index
'
:
i
});
// If slide type is sreenshot/illustration, show image instead of title
// If slide type is sreenshot/illustration, show image instead of title
if
(
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
)
{
if
(
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
)
{
content
=
[
content
=
[
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
text
:
translation_dict
.
Edit
,
edit_element
,
'
class
'
:
'
display-slide ui-icon-pencil ui-btn-icon-left
'
,
delete_element
,
'
data-slide-index
'
:
i
}),
domsugar
(
'
img
'
,
{
domsugar
(
'
img
'
,
{
src
:
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
,
src
:
getSlideDictFromSlideElement
(
section_list
[
i
]).
image_url
,
draggable
:
false
draggable
:
false
...
@@ -463,9 +476,8 @@
...
@@ -463,9 +476,8 @@
];
];
}
else
{
}
else
{
content
=
[
content
=
[
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
text
:
translation_dict
.
Edit
,
edit_element
,
'
class
'
:
'
display-slide ui-icon-pencil ui-btn-icon-left
'
,
delete_element
,
'
data-slide-index
'
:
i
}),
domsugar
(
'
h1
'
,
{
domsugar
(
'
h1
'
,
{
html
:
getSlideDictFromSlideElement
(
section_list
[
i
]).
title_html
html
:
getSlideDictFromSlideElement
(
section_list
[
i
]).
title_html
})
})
...
@@ -745,6 +757,23 @@
...
@@ -745,6 +757,23 @@
});
});
}
}
if
(
evt
.
target
.
className
.
indexOf
(
"
delete-slide
"
)
!==
-
1
)
{
return
queue
.
push
(
function
()
{
var
slide_list
=
getSlideElementList
(
gadget
.
state
.
value
);
slide_list
.
splice
(
parseInt
(
evt
.
target
.
getAttribute
(
'
data-slide-index
'
),
10
),
1
);
return
RSVP
.
all
([
gadget
.
changeState
({
value
:
slideListAsHTML
(
slide_list
)
}),
gadget
.
notifyChange
()
]);
});
}
if
(
evt
.
target
.
className
.
indexOf
(
"
dialog-comment
"
)
!==
-
1
)
{
if
(
evt
.
target
.
className
.
indexOf
(
"
dialog-comment
"
)
!==
-
1
)
{
return
queue
return
queue
.
push
(
function
()
{
.
push
(
function
()
{
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/slideeditor.gadget.less.txt
View file @
d2e45d03
...
@@ -23,8 +23,6 @@ div[data-gadget-url$="slideeditor.gadget.html"] {
...
@@ -23,8 +23,6 @@ div[data-gadget-url$="slideeditor.gadget.html"] {
background-color:#FFFFFF;
background-color:#FFFFFF;
border: 1px solid #000000;
border: 1px solid #000000;
padding: 0.5em;
padding: 0.5em;
vertical-align: middle;
text-align: center;
// color:#000000;
// color:#000000;
&.drag {
&.drag {
...
@@ -43,22 +41,28 @@ div[data-gadget-url$="slideeditor.gadget.html"] {
...
@@ -43,22 +41,28 @@ div[data-gadget-url$="slideeditor.gadget.html"] {
z-index: 1;
z-index: 1;
border-radius: 0.325em;
border-radius: 0.325em;
}
}
& > h1 {
text-align: center;
padding-top: 2.5em;
}
// Spacing between every section
// Spacing between every section
margin-right: 2em;
margin-right: 2em;
margin-bottom: 2em;
margin-bottom: 2em;
display: flex;
flex-direction: column;
button {
button {
padding: 3pt;
padding: 3pt;
float: right;
&:first-of-type {
float: left;
}
border: 1px solid rgba(0, 0, 0, 0.14);
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
border-radius: 0.325em;
background-color: #FFFFFF;
background-color: #FFFFFF;
width: 2em;
width: 2em;
heigth: 2em;
height: 2em;
min-height: 2em;
overflow: hidden;
overflow: hidden;
text-indent: -9999px;
text-indent: -9999px;
white-space: nowrap;
white-space: nowrap;
...
...
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