diff --git a/gadjo/static/css/_wcs.scss b/gadjo/static/css/_wcs.scss
index c328ca3..13ed170 100644
--- a/gadjo/static/css/_wcs.scss
+++ b/gadjo/static/css/_wcs.scss
@@ -1,3 +1,5 @@
+$actions: add, duplicate, edit, remove;
+
div#side { // w.c.s. steps in backoffice submission
background: white;
padding: 0.5rem;
@@ -15,3 +17,31 @@ div#side { // w.c.s. steps in backoffice submission
}
}
}
+
+#main ul#fields-list li {
+ padding-top: 6px;
+}
+
+#main ul.biglist li p.commands span {
+ &.remove, &.add, &.edit, &.duplicate {
+ padding: 0;
+ border: 0;
+ background: transparent;
+ box-shadow: none;
+ a {
+ padding: 6px;
+ display: inline-block;
+ text-indent: -10000px;
+ overflow: hidden;
+ width: 30px;
+ }
+ }
+ @each $action in $actions {
+ &.#{$action} a {
+ background: url(icons/action-#{$action}.small.#{$string-color}.png) center center no-repeat;
+ &:hover {
+ background-image: url(icons/action-#{$action}.hover.png);
+ }
+ }
+ }
+}
diff --git a/icons/action-add.svg b/icons/action-add.svg
new file mode 100644
index 0000000..bc45172
--- /dev/null
+++ b/icons/action-add.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/action-duplicate.svg b/icons/action-duplicate.svg
new file mode 100644
index 0000000..7142edf
--- /dev/null
+++ b/icons/action-duplicate.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/action-edit.svg b/icons/action-edit.svg
new file mode 100644
index 0000000..efd6f33
--- /dev/null
+++ b/icons/action-edit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/action-remove.svg b/icons/action-remove.svg
new file mode 100644
index 0000000..e6620fe
--- /dev/null
+++ b/icons/action-remove.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 3bc45af..14b62f9 100644
--- a/setup.py
+++ b/setup.py
@@ -131,7 +131,7 @@ class build_icons(Command):
destpath = 'gadjo/static/css/icons/'
if not os.path.exists(destpath):
os.mkdir(destpath)
- variants = {
+ variants_applications = {
'small': {'colour': 'e7e7e7', 'width': '20'},
'small.white': {'colour': 'ffffff', 'width': '20'},
'small.4e7ee2': {'colour': '4e7ee2', 'width': '20'},
@@ -140,9 +140,18 @@ class build_icons(Command):
'large': {'colour': 'e7e7e7', 'width': '80'},
'large-hover': {'colour': 'bebebe', 'width': '80'},
}
+ variants_actions = {
+ 'small.4e7ee2': {'colour': '4e7ee2', 'width': '20'},
+ 'small.ff375e': {'colour': 'ff375e', 'width': '20'},
+ 'small.6f2b92': {'colour': '6f2b92', 'width': '20'},
+ 'hover': {'colour': '2b2b2b', 'width': '20'},
+ }
for basepath, dirnames, filenames in os.walk('icons'):
for filename in filenames:
basename = os.path.splitext(filename)[0]
+ variants = variants_applications
+ if filename.startswith('action-'):
+ variants = variants_actions
for variant in variants:
dest_filename = '%s.%s.png' % (basename, variant)
destname = os.path.join(destpath, dest_filename)
@@ -150,7 +159,7 @@ class build_icons(Command):
**variants.get(variant))
def generate(self, src, dest, colour, width, **kwargs):
- if False and os.path.exists(dest) and os.stat(dest).st_mtime >= os.stat(src).st_mtime:
+ if os.path.exists(dest) and os.stat(dest).st_mtime >= os.stat(src).st_mtime:
return
# default values
from PIL import Image