diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-09-09 15:28:00 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-09-09 15:28:00 +0200 |
| commit | 0b199c50e5ee2a85a4a4826b033fecc013bb0e70 (patch) | |
| tree | f13aa46d1267c6d9b95978f55f803f68915c1b56 /addons/website/static/src/css | |
| parent | 62aafc07b1b7cfd83108bd854ea87997bbad1876 (diff) | |
[WIP] website: snippets: box snippet widget with resize options on click
bzr revid: chm@openerp.com-20130909132800-au0lgkf8thirsv8r
Diffstat (limited to 'addons/website/static/src/css')
| -rw-r--r-- | addons/website/static/src/css/editor.css | 54 | ||||
| -rw-r--r-- | addons/website/static/src/css/editor.sass | 33 | ||||
| -rw-r--r-- | addons/website/static/src/css/snippets.css | 10 |
3 files changed, 78 insertions, 19 deletions
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; |
