summaryrefslogtreecommitdiff
path: root/addons/website/static/src/css
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-09-10 12:03:48 +0200
committerChristophe Matthieu <chm@openerp.com>2013-09-10 12:03:48 +0200
commit4bed245c082129f2086f4544e18a7fc4e33c9d45 (patch)
treeec7901da28006d85b292bb13a108770138e24a23 /addons/website/static/src/css
parentbf09524def70b72059d5b7bfc1247a52a70ca9e1 (diff)
parent5a16088b0b0477e619b97f203f7af4ec21543418 (diff)
[MERGE] from website-fva: snippets editor and building block
bzr revid: chm@openerp.com-20130910100348-w9kxnxc9tavyanqt
Diffstat (limited to 'addons/website/static/src/css')
-rw-r--r--addons/website/static/src/css/editor.css85
-rw-r--r--addons/website/static/src/css/editor.sass63
-rw-r--r--addons/website/static/src/css/snippets.css30
3 files changed, 160 insertions, 18 deletions
diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css
index df098f28353..d52729756a7 100644
--- a/addons/website/static/src/css/editor.css
+++ b/addons/website/static/src/css/editor.css
@@ -137,6 +137,7 @@ table.editorbar-panel td.selected {
line-height: 120px;
color: white;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.95);
+ box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.07) inset;
}
.oe_snippet .oe_snippet_body {
display: none;
@@ -144,6 +145,9 @@ table.editorbar-panel td.selected {
.oe_snippet > * {
pointer-events: none;
}
+.oe_snippet > :not(.oe_snippet_body):not(.oe_snippet_thumbnail) {
+ display: none !important;
+}
.oe_snippet > *:first-child:not(.oe_snippet_thumbnail) {
display: block;
-webkit-transform-origin-x: 5px;
@@ -202,35 +206,68 @@ table.editorbar-panel td.selected {
.oe_snippet_manipulator {
display: block;
position: absolute;
- background: rgba(153, 0, 255, 0.1);
+ background: transparent;
border-radius: 3px;
- border: solid 1px rgba(153, 0, 255, 0.5);
opacity: 0;
transition: opacity 100ms linear;
+ box-sizing: border-box;
+ pointer-events: none;
+}
+.oe_snippet_manipulator .oe_boxsize, .oe_snippet_manipulator .oe_margin {
+ position: absolute;
+ pointer-events: none;
}
-.oe_snippet_manipulator > .oe_handle {
+.oe_snippet_manipulator .oe_handle {
display: none;
}
-.oe_snippet_manipulator:hover, .oe_snippet_manipulator.oe_hover {
+.oe_snippet_manipulator.oe_hover {
+ opacity: 1;
+ cursor: pointer;
+}
+.oe_snippet_manipulator.oe_selected, .oe_snippet_manipulator.oe_active, .oe_snippet_manipulator .oe_boxsize, .oe_snippet_manipulator .oe_margin {
opacity: 1;
+ background: transparent;
+ border: dashed 1px rgba(153, 0, 255, 0.5);
+ box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.3), 0px 0px 0px 1px rgba(255, 255, 255, 0.3) inset;
+}
+.oe_snippet_manipulator.oe_selected .oe_handle, .oe_snippet_manipulator.oe_active .oe_handle, .oe_snippet_manipulator .oe_boxsize .oe_handle, .oe_snippet_manipulator .oe_margin .oe_handle {
+ pointer-events: auto;
+}
+.oe_snippet_manipulator .oe_buttons {
+ display: none;
+ position: absolute;
+ right: 16px;
+ top: 16px;
+ background: #ad00ff;
+ color: white;
+ padding: 0px 2px;
+ border-radius: 3px;
}
-.oe_snippet_manipulator:hover > .oe_handle, .oe_snippet_manipulator.oe_hover > .oe_handle {
+.oe_snippet_manipulator .oe_buttons .oe_icon {
+ display: inline-block;
+ padding: 8px;
+ cursor: pointer;
+}
+.oe_snippet_manipulator.oe_active {
+ z-index: 100000;
+}
+.oe_snippet_manipulator.oe_active .oe_handle, .oe_snippet_manipulator.oe_active .oe_buttons {
display: block;
}
.oe_handle {
+ pointer-events: auto;
position: absolute;
top: 50%;
left: 50%;
display: block;
background: white;
- border: solid 1px rgba(153, 0, 255, 0.5);
+ border: solid 1px #9900ff;
box-sizing: border-box;
- border-radius: 2px;
+ border-radius: 8px;
width: 16px;
height: 16px;
margin: -8px;
- cursor: move;
-webkit-transition: background 100ms linear;
}
.oe_handle:hover {
@@ -255,6 +292,38 @@ table.editorbar-panel td.selected {
left: 0px;
}
+.oe_handle.n {
+ cursor: n-resize;
+}
+
+.oe_handle.ne {
+ cursor: ne-resize;
+}
+
+.oe_handle.nw {
+ cursor: nw-resize;
+}
+
+.oe_handle.s {
+ cursor: s-resize;
+}
+
+.oe_handle.se {
+ cursor: se-resize;
+}
+
+.oe_handle.sw {
+ cursor: sw-resize;
+}
+
+.oe_handle.e {
+ cursor: e-resize;
+}
+
+.oe_handle.w {
+ cursor: w-resize;
+}
+
/* ---- MOBILE PREVIEW ---- */
.oe_mobile_preview.modal .modal-content {
height: 660px;
diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass
index 2da2b4bbeeb..289ab1e6e54 100644
--- a/addons/website/static/src/css/editor.sass
+++ b/addons/website/static/src/css/editor.sass
@@ -129,11 +129,14 @@ table.editorbar-panel
line-height: 120px
color: white
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.95)
+ box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.07) inset
.oe_snippet_body
display: none
& > *
pointer-events: none
+ & > :not(.oe_snippet_body):not(.oe_snippet_thumbnail)
+ display: none !important
& > *:first-child:not(.oe_snippet_thumbnail)
display: block
@@ -186,31 +189,58 @@ table.editorbar-panel
.oe_snippet_manipulator
display: block
position: absolute
- background: rgba(153, 0, 255, 0.1)
+ background: transparent //rgba(153, 0, 255, 0.05)
border-radius: 3px
- border: solid 1px rgba(153, 0, 255, 0.5)
opacity: 0
transition: opacity 100ms linear
- & > .oe_handle
+ box-sizing: border-box
+ pointer-events: none
+ .oe_boxsize, .oe_margin
+ position: absolute
+ pointer-events: none
+ .oe_handle
display: none
- &:hover,&.oe_hover
+ &.oe_hover
+ opacity: 1
+ cursor: pointer
+ &.oe_selected, &.oe_active, .oe_boxsize, .oe_margin
opacity: 1
- & > .oe_handle
+ background: transparent
+ border: dashed 1px rgba(153, 0, 255, 0.5)
+ box-shadow: 0px 0px 0px 1px rgba(255,255,255,0.3), 0px 0px 0px 1px rgba(255,255,255,0.3) inset
+ .oe_handle
+ pointer-events: auto
+ .oe_buttons
+ display: none
+ position: absolute
+ right: 16px
+ top: 16px
+ background: rgb(173, 0, 255)
+ color: white
+ padding: 0px 2px
+ border-radius: 3px
+ .oe_icon
+ display: inline-block
+ padding: 8px
+ cursor: pointer
+ &.oe_active
+ z-index: 100000
+ .oe_handle, .oe_buttons
display: block
.oe_handle
+ pointer-events: auto
position: absolute
top: 50%
left: 50%
display: block
background: rgba(255, 255, 255, 1)
- border: solid 1px rgba(153, 0, 255, 0.5)
+ border: solid 1px rgba(153, 0, 255, 1)
box-sizing: border-box
- border-radius: 2px
+ border-radius: 8px
width: 16px
height: 16px
margin: -8px
- cursor: move
-webkit-transition: background 100ms linear
&:hover
background: rgb(153, 0, 255)
@@ -225,6 +255,23 @@ table.editorbar-panel
bottom: 0px
.oe_handle.nw,.oe_handle.w,.oe_handle.sw
left: 0px
+.oe_handle.n
+ cursor: n-resize
+.oe_handle.ne
+ cursor: ne-resize
+.oe_handle.nw
+ cursor: nw-resize
+.oe_handle.s
+ cursor: s-resize
+.oe_handle.se
+ cursor: se-resize
+.oe_handle.sw
+ cursor: sw-resize
+.oe_handle.e
+ cursor: e-resize
+.oe_handle.w
+ cursor: w-resize
+
/* ---- MOBILE PREVIEW ---- */
diff --git a/addons/website/static/src/css/snippets.css b/addons/website/static/src/css/snippets.css
index c9b726affde..0eeab9aee99 100644
--- a/addons/website/static/src/css/snippets.css
+++ b/addons/website/static/src/css/snippets.css
@@ -88,7 +88,7 @@
padding: 8px;
}
-.oe_snippet_editor .oe_snippet.oe_selected{
+.oe_snippet_editor .oe_snippet.oe_selected, .oe_snippet_editor .oe_snippet.oe_active{
border: 2px solid rgb(151, 137, 255);
box-shadow: 0px 3px 17px rgba(99, 53, 150, 0.59);
@@ -134,7 +134,7 @@
box-shadow: 0px 1px 3px rgb(90,90,90) inset;
border: 0px;
}
-.oe_snippet_editor .oe_snippet.oe_new.oe_selected{
+.oe_snippet_editor .oe_snippet.oe_new.oe_selected, .oe_snippet_editor .oe_snippet.oe_new.oe_active{
box-shadow: 0px 2px 0px 0px rgb(151,137,255) inset, 0px 3px 17px rgba(99, 53, 150, 0.59) inset;
}
.oe_snippet_editor .oe_snippet.oe_new > *{
@@ -176,3 +176,29 @@
margin-left: 0px !important;
}
*/
+
+#website-top-edit li.oe_snippet_editorbar {
+ padding: 1px 8px 2px;
+ font: normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;
+ float: left;
+ margin-top: 6px;
+ border: 1px solid #a6a6a6;
+ border-bottom-color: #979797;
+ background: #eeeeee;
+ border-radius: 3px;
+}
+#website-top-edit li.oe_snippet_editorbar > * {
+ display: inline-block;
+ height: 22px;
+ padding: 4px 6px;
+ outline: 0;
+ border: 0;
+}
+#website-top-edit li.oe_snippet_editorbar a.button .icon {
+ cursor: inherit;
+ background-repeat: no-repeat;
+ margin-top: 1px;
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+} \ No newline at end of file