From c5fa23bffa8ccbc3db6a88be822c4f9209701ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 2 Sep 2013 11:10:05 +0200 Subject: [IMP] website editor: allow click trough on snippet manipulators bzr revid: fva@openerp.com-20130902091005-pnhb05fxk29z5q0r --- addons/website/static/src/css/editor.css | 38 ++++++++++++++++++++++++++----- addons/website/static/src/css/editor.sass | 32 ++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 11 deletions(-) (limited to 'addons/website/static/src/css') diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 8a20e94bec0..3e678efe612 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -96,6 +96,7 @@ 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; @@ -161,31 +162,56 @@ .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; } .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:hover > .oe_handle, .oe_snippet_manipulator.oe_hover > .oe_handle { +.oe_snippet_manipulator.oe_selected { + opacity: 1; + pointer-events: none; + background: transparent; + border: solid 1px rgba(153, 0, 255, 0.5); +} +.oe_snippet_manipulator.oe_selected > * { + pointer-events: auto; +} +.oe_snippet_manipulator.oe_selected > .oe_handle { display: block; } +.oe_snippet_manipulator .oe_buttons { + position: absolute; + right: 16px; + top: 16px; + background: #ad00ff; + color: white; + padding: 0px 2px; + border-radius: 3px; +} +.oe_snippet_manipulator .oe_buttons .oe_icon { + display: inline-block; + padding: 8px; + cursor: pointer; +} .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; diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index 29621f95e4b..feb7432821c 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -89,6 +89,7 @@ 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 @@ -146,27 +147,48 @@ .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 + box-sizing: border-box & > .oe_handle display: none - &:hover,&.oe_hover + &.oe_hover + opacity: 1 + cursor: pointer + &.oe_selected opacity: 1 + pointer-events: none + background: transparent + border: solid 1px rgba(153, 0, 255, 0.5) + & > * + pointer-events: auto & > .oe_handle display: block + .oe_buttons + 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_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 -- cgit v1.2.3 From 6f6c59ec1de1881a70e4bf728ea5d8b56bd609f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 2 Sep 2013 11:20:38 +0200 Subject: [IMP] website: made widget manipulator visible on dark areas bzr revid: fva@openerp.com-20130902092038-2dpxy9fidznaeclz --- addons/website/static/src/css/editor.css | 3 ++- addons/website/static/src/css/editor.sass | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'addons/website/static/src/css') diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 3e678efe612..987b229d91a 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -179,7 +179,8 @@ opacity: 1; pointer-events: none; background: transparent; - border: solid 1px rgba(153, 0, 255, 0.5); + 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 > * { pointer-events: auto; diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index feb7432821c..2f236c38aab 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -161,7 +161,8 @@ opacity: 1 pointer-events: none background: transparent - border: solid 1px rgba(153, 0, 255, 0.5) + 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 & > * pointer-events: auto & > .oe_handle -- cgit v1.2.3 From 4d1cc6a4ed499ddd8541fb37810a6728da66f9d1 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 6 Sep 2013 17:04:08 +0200 Subject: [WIP] website: snippets bzr revid: chm@openerp.com-20130906150408-81qzb2492lwqf7lb --- addons/website/static/src/css/snippets.css | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'addons/website/static/src/css') diff --git a/addons/website/static/src/css/snippets.css b/addons/website/static/src/css/snippets.css index c9b726affde..1d99722e48b 100644 --- a/addons/website/static/src/css/snippets.css +++ b/addons/website/static/src/css/snippets.css @@ -176,3 +176,29 @@ margin-left: 0px !important; } */ + +#website-top-edit-snippet-option { + 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-snippet-option > * { + display: inline-block; + height: 22px; + padding: 4px 6px; + outline: 0; + border: 0; +} +#website-top-edit-snippet-option 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 -- cgit v1.2.3 From 0b199c50e5ee2a85a4a4826b033fecc013bb0e70 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 9 Sep 2013 15:28:00 +0200 Subject: [WIP] website: snippets: box snippet widget with resize options on click bzr revid: chm@openerp.com-20130909132800-au0lgkf8thirsv8r --- addons/website/static/src/css/editor.css | 54 +++++++++++++++++++++++++----- addons/website/static/src/css/editor.sass | 33 ++++++++++++++---- addons/website/static/src/css/snippets.css | 10 +++--- 3 files changed, 78 insertions(+), 19 deletions(-) (limited to 'addons/website/static/src/css') diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index e0c8dadd8e2..451f0140978 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -129,6 +129,9 @@ .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; @@ -192,28 +195,26 @@ opacity: 0; transition: opacity 100ms linear; box-sizing: border-box; + pointer-events: none; } -.oe_snippet_manipulator > .oe_handle { +.oe_snippet_manipulator .oe_handle { display: none; } .oe_snippet_manipulator.oe_hover { opacity: 1; cursor: pointer; } -.oe_snippet_manipulator.oe_selected { +.oe_snippet_manipulator.oe_selected, .oe_snippet_manipulator.oe_active { opacity: 1; - pointer-events: none; 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_snippet_manipulator.oe_selected > *, .oe_snippet_manipulator.oe_active > * { pointer-events: auto; } -.oe_snippet_manipulator.oe_selected > .oe_handle { - display: block; -} .oe_snippet_manipulator .oe_buttons { + display: none; position: absolute; right: 16px; top: 16px; @@ -227,6 +228,12 @@ 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; @@ -241,7 +248,6 @@ width: 16px; height: 16px; margin: -8px; - cursor: move; -webkit-transition: background 100ms linear; } .oe_handle:hover { @@ -266,6 +272,38 @@ 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 09d3ef51dee..e982fcc5ac0 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -117,6 +117,8 @@ display: none & > * pointer-events: none + & > :not(.oe_snippet_body):not(.oe_snippet_thumbnail) + display: none !important & > *:first-child:not(.oe_snippet_thumbnail) display: block @@ -174,22 +176,21 @@ opacity: 0 transition: opacity 100ms linear box-sizing: border-box - & > .oe_handle + pointer-events: none + .oe_handle display: none &.oe_hover opacity: 1 cursor: pointer - &.oe_selected + &.oe_selected, &.oe_active opacity: 1 - pointer-events: none 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 & > * pointer-events: auto - & > .oe_handle - display: block .oe_buttons + display: none position: absolute right: 16px top: 16px @@ -201,6 +202,10 @@ display: inline-block padding: 8px cursor: pointer + &.oe_active + z-index: 100000 + .oe_handle, .oe_buttons + display: block .oe_handle pointer-events: auto @@ -215,7 +220,6 @@ width: 16px height: 16px margin: -8px - cursor: move -webkit-transition: background 100ms linear &:hover background: rgb(153, 0, 255) @@ -230,6 +234,23 @@ 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 1d99722e48b..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 > *{ @@ -177,7 +177,7 @@ } */ -#website-top-edit-snippet-option { +#website-top-edit li.oe_snippet_editorbar { padding: 1px 8px 2px; font: normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif; float: left; @@ -187,14 +187,14 @@ background: #eeeeee; border-radius: 3px; } -#website-top-edit-snippet-option > * { +#website-top-edit li.oe_snippet_editorbar > * { display: inline-block; height: 22px; padding: 4px 6px; outline: 0; border: 0; } -#website-top-edit-snippet-option a.button .icon { +#website-top-edit li.oe_snippet_editorbar a.button .icon { cursor: inherit; background-repeat: no-repeat; margin-top: 1px; -- cgit v1.2.3 From 7bcc4f4d1dcaa245ff23cefb9a3e4acbeadfd72a Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 9 Sep 2013 16:49:40 +0200 Subject: [WIP] website: snippets: work bzr revid: chm@openerp.com-20130909144940-f08v6egk5pijz29b --- addons/website/static/src/css/editor.css | 8 ++++++-- addons/website/static/src/css/editor.sass | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'addons/website/static/src/css') diff --git a/addons/website/static/src/css/editor.css b/addons/website/static/src/css/editor.css index 451f0140978..7a3dc36b0cb 100644 --- a/addons/website/static/src/css/editor.css +++ b/addons/website/static/src/css/editor.css @@ -197,6 +197,10 @@ 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 { display: none; } @@ -204,13 +208,13 @@ opacity: 1; cursor: pointer; } -.oe_snippet_manipulator.oe_selected, .oe_snippet_manipulator.oe_active { +.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_snippet_manipulator.oe_active > * { +.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 { diff --git a/addons/website/static/src/css/editor.sass b/addons/website/static/src/css/editor.sass index e982fcc5ac0..ea6bfeeab34 100644 --- a/addons/website/static/src/css/editor.sass +++ b/addons/website/static/src/css/editor.sass @@ -177,17 +177,20 @@ transition: opacity 100ms linear box-sizing: border-box pointer-events: none + .oe_boxsize, .oe_margin + position: absolute + pointer-events: none .oe_handle display: none &.oe_hover opacity: 1 cursor: pointer - &.oe_selected, &.oe_active + &.oe_selected, &.oe_active, .oe_boxsize, .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_handle pointer-events: auto .oe_buttons display: none -- cgit v1.2.3