Commit Graph

277 Commits

Author SHA1 Message Date
Fabien Meghazi 8c25a35cc6 [FIX] Save translations and t-fields
bzr revid: fme@openerp.com-20130926131708-16xmpbrx0vxlgbtw
2013-09-26 15:17:08 +02:00
Xavier Morel 2c4560aca6 [ADD] edition of link labels via dialog
bzr revid: xmo@openerp.com-20130924135120-epq1w7wb1a6jfxqn
2013-09-24 15:51:20 +02:00
Xavier Morel 7533fe77b4 [FIX] paste in webkit-ish browsers
clipboard plugin was getting lost due to method used to get a readonly
toplevel editor with editable sub-sections in it.

The clipboard plugin creates a hidden pasteboard element to safely get
a the clipboard data before inserting it at paste point, this
clipboard may have to be made @contenteditable if it's created in a
readonly area. Which was the case here: the pasteboard was inserted at
the root of the editor, which is not editable.

But because of @data-cke-editable being explicitly set, ckeditor would
believe it had inserted the pasteboard in an editable section and thus
would *not* set its @contenteditable leading to a useless readonly
pasteboard.

The purpose of @data-cke-editable was to make the editor itself
"editable" for cke (in order for the toolbar to not be disabled) while
it would not actually be editable (@contenteditable) for users.

This is better reimplemented by calling API methods to make the editor
editable but its root element not editable, one of the improvements
being that commands (and thus toolbar buttons) now switch state
correctly based on context.

bzr revid: xmo@openerp.com-20130924110601-gfvc395rsedpnoh3
2013-09-24 13:06:01 +02:00
Thibault Delavallée f420f98492 [FIX] turns out a new mandatory positional argument blows things up a bit
bzr revid: tde@openerp.com-20130923143534-qnab6bv6upw1vt70
2013-09-23 16:35:34 +02:00
Xavier Morel f040cfc7b1 [FIX] placeholder image when edition starts
it's apparently better when it's completely broken and can't be edited. YMMV

bzr revid: xmo@openerp.com-20130923134914-1si4fz8fg72iktvw
2013-09-23 15:49:14 +02:00
Xavier Morel 59b46346b1 [FIX] crappy snippets initialization signal
bzr revid: xmo@openerp.com-20130923130321-lpbxy7qckcu0svrp
2013-09-23 15:03:21 +02:00
Xavier Morel 89fc31a633 [MERGE] from trunk
bzr revid: xmo@openerp.com-20130923120328-0wgd7wxhl1y5qyhr
2013-09-23 14:03:28 +02:00
Xavier Morel be4b1b9b59 [FIX] matching of site page URLs
With page urls not necessarily being full xmlids, match to result of
list_pages needs to take that in account to correctly infer a url is a
site page's.

bzr revid: xmo@openerp.com-20130923110618-ckicw4a5bpvatzie
2013-09-23 13:06:18 +02:00
Xavier Morel 3e336cda54 [FIX] selection of default section on opening link dialog
bzr revid: xmo@openerp.com-20130923100241-n42lczqdpupfiae4
2013-09-23 12:02:41 +02:00
Xavier Morel 4b481b3509 [IMP] page name validation on new page creation
bzr revid: xmo@openerp.com-20130923094926-q2as7cn6etpp36la
2013-09-23 11:49:26 +02:00
Xavier Morel 999b1c6e4c [FIX] prevent dragging of images during edition
bzr revid: xmo@openerp.com-20130920103622-h091gbp78fic85w0
2013-09-20 12:36:22 +02:00
Xavier Morel 2e4a052ac1 [FIX] link dialog popping up when double-clicking on field links not inside views
bzr revid: xmo@openerp.com-20130920094207-rpt77gi0vypij1bx
2013-09-20 11:42:07 +02:00
Fabien Pinckaers a71804b74d [IMP] Attachments with default images
bzr revid: fp@openerp.com-20130920051029-0t61gy4zz68dfckl
2013-09-20 07:10:29 +02:00
Fabien Pinckaers 21b7b689c8 [IMP] more images on selector
bzr revid: fp@tinyerp.com-20130919165525-3gaeb5s3iczfsvg6
2013-09-19 18:55:25 +02:00
Fabien Pinckaers 6b7e32155d [IMP] Image selector
bzr revid: fp@tinyerp.com-20130919164855-0xmiofe2a2mkqmq2
2013-09-19 18:48:55 +02:00
Xavier Morel 744c0de0c7 [IMP] just in case, forbid the edition of images as root of view sections
bzr revid: xmo@openerp.com-20130919152318-jq6ef1jhfs05b0ys
2013-09-19 17:23:18 +02:00
Xavier Morel fbc2f1a323 [IMP] don't edit links in a non-editable section of the page
if a link is outside a view section or is the root of the view
section, its href can not be edited (either because it's completely
non-editable or because it probably had a dynamically generated href
via t-att*)

bzr revid: xmo@openerp.com-20130919152039-5hpe8qdrvhhen5aw
2013-09-19 17:20:39 +02:00
Christophe Matthieu 823cc5549d [IMP] website snippets: horizontal scolling
bzr revid: chm@openerp.com-20130918154831-qiyin8xx07x20qj2
2013-09-18 17:48:31 +02:00
Xavier Morel e0662b11d0 [FIX] wrap the wrapper in order to allow RTE on all of the page (except the toolbar)
CKEditor does not work directly on body, and it's a bad idea anyway
(editing the edition toolbar won't end well). 

A big wrapper around all of the page's content can be used as RTE hook
to give access to the body as well as the header and footers.

bzr revid: xmo@openerp.com-20130918145028-6ppi9sro2un0quh5
2013-09-18 16:50:28 +02:00
Xavier Morel e5c11a3aaa [FIX] forgot a console call
bzr revid: xmo@openerp.com-20130917085923-0gsp3dfsqmocgimg
2013-09-17 10:59:23 +02:00
Xavier Morel 757a2dbc4e [IMP] single whole-page editor, reinstate ability to save only an embedded field (not part of a view)
bzr revid: xmo@openerp.com-20130917085753-aa32xxezhtrfaffj
2013-09-17 10:57:53 +02:00
Christophe Matthieu 24a63ccea7 [IMP] website snippet: add button 'insert block' on top bar
bzr revid: chm@openerp.com-20130916144235-mxm63fikqlf0jv8s
2013-09-16 16:42:35 +02:00
Xavier Morel f3eec24a6f [ADD] link keyboard shortcut
bzr revid: xmo@openerp.com-20130916090750-xs8dcrm3cp91fo8r
2013-09-16 11:07:50 +02:00
Xavier Morel 0c145b7577 [FIX] completely remove usages of link and image plugin and import missing pieces
CKEDITOR plugins are not loaded in dependency order (see previous
commits), and in the end the vast majority of the (used subpart of)
link and image plugins were reimplemented to handle new dialogs.

Bite the bullet, disable link and image and implement/import missing
parts (link removal, doubleclick hooks & toolbar button definition).

bzr revid: xmo@openerp.com-20130916090353-933av2nsrygxz64y
2013-09-16 11:03:53 +02:00
Xavier Morel 972f502942 [ADD] reintroduce image style selector
bzr revid: xmo@openerp.com-20130913152308-j250t5ns7iaz6w2n
2013-09-13 17:23:08 +02:00
Xavier Morel 243a9c559b [ADD] paginated images
bzr revid: xmo@openerp.com-20130913151316-rzr3rcg1w7h3gw10
2013-09-13 17:13:16 +02:00
Xavier Morel 1adb76aad0 [MERGE] from parent branch
bzr revid: xmo@openerp.com-20130913145530-p1gm7k7ie5t3powp
2013-09-13 16:55:30 +02:00
Xavier Morel ba99ab56c8 [FIX] force ckeditor lang to en and replace en-gb localization file with en
avoids automatic locale picking selecting something different than the
one locale file currently provided and blowing up, preventing edition
from working

bzr revid: xmo@openerp.com-20130913135532-szra08zdge1ktmc7
2013-09-13 15:55:32 +02:00
Xavier Morel 16492e4ca7 [MERGE] from trunk
bzr revid: xmo@openerp.com-20130913125230-38lb4jv8ypt6y9dh
2013-09-13 14:52:30 +02:00
Xavier Morel f16b61cbe6 [ADD] separate attachment dialog selector
bzr revid: xmo@openerp.com-20130913114143-v799fvf08rpiox3r
2013-09-13 13:41:43 +02:00
Xavier Morel aaa0f7eaca [ADD] 'remove link' feature to link dialog, remove icon from sidebar
bzr revid: xmo@openerp.com-20130913095532-s6ex6kcqzqzlm8tc
2013-09-13 11:55:32 +02:00
Xavier Morel c52335de5a [IMP] split new page and existing page sections in link dialog + look fixes
* select sections on click within section
* validation in case no value provided for selected section on save

bzr revid: xmo@openerp.com-20130913091532-i037z59odb4j52b7
2013-09-13 11:15:32 +02:00
Xavier Morel a793a8ff16 [REV] tabification of link and image dialogs
bzr revid: xmo@openerp.com-20130913084013-19zu9k9voxplwwhp
2013-09-13 10:40:13 +02:00
Xavier Morel 4513603573 [FIX] force ckeditor lang to en and replace en-gb localization file with en
avoids automatic locale picking selecting something different than the one locale file currently provided and blowing up, preventing edition from working

bzr revid: xmo@openerp.com-20130912154957-yod17u9xvw3r966i
2013-09-12 17:49:57 +02:00
Xavier Morel 922053531e [MERGE] from parent
bzr revid: xmo@openerp.com-20130912141026-mmmyg91nwlzccr0g
2013-09-12 16:10:26 +02:00
Christophe Matthieu 9b6760d1f6 [IMP] snippet colmd: resizing and add col inside a row
bzr revid: chm@openerp.com-20130912115130-zvqo8nez77919eno
2013-09-12 13:51:30 +02:00
Xavier Morel 75977b4e43 [ADD] selection of image style in dialog
bzr revid: xmo@openerp.com-20130912112905-6skmq1umsyzcvthz
2013-09-12 13:29:05 +02:00
Xavier Morel d124389fa3 [IMP] tabified image picker dialog
bzr revid: xmo@openerp.com-20130912103752-sg9jmba0b061f7x9
2013-09-12 12:37:52 +02:00
Xavier Morel 62fff458c5 [IMP] tabify link dialog for simpler layout
bzr revid: xmo@openerp.com-20130912091536-mx8dre2qyiz00h36
2013-09-12 11:15:36 +02:00
Fabien Meghazi 3f4d64b1f0 [IMP] Use context in website's js rpc calls
bzr revid: fme@openerp.com-20130911161854-zhm53dugiisychfb
2013-09-11 18:18:54 +02:00
Xavier Morel 3838741070 [ADD] undo button to RTE toolbar
bzr revid: xmo@openerp.com-20130911115937-ifl5bg2n1rmr7i1n
2013-09-11 13:59:37 +02:00
ddm 54b461b4a3 Merged trunk-website-ace-ddm
bzr revid: ddm@openerp.com-20130910135801-wlp5u4zvna2q5228
2013-09-10 15:58:01 +02:00
Christophe Matthieu f61e65539e [IMP] website: auto open editor when create new product (use ?unable_editor in url)
bzr revid: chm@openerp.com-20130910122646-ug8dn61rqgbm3eq3
2013-09-10 14:26:46 +02:00
ddm a5e1ed7800 Merged trunk-website-al
bzr revid: ddm@openerp.com-20130910103353-j5sbly1v6m93qiel
2013-09-10 12:33:53 +02:00
Christophe Matthieu 5a16088b0b [MERGE] from website-al
bzr revid: chm@openerp.com-20130910100159-xs0d8zngz4ybl0y9
2013-09-10 12:01:59 +02:00
ddm a109098cb7 [FIX] Proper editor sizing
bzr revid: ddm@openerp.com-20130910100127-98zjbitry2xhqld2
2013-09-10 12:01:27 +02:00
Xavier Morel 688cd146ef [FIX] disable removal of empty elements in ckeditor
we use empty elements for fontawesome icons, ckeditor removing them is
unexpected and bad nogood.

bzr revid: xmo@openerp.com-20130910090232-p6t5qaveo2q2nyth
2013-09-10 11:02:32 +02:00
Xavier Morel 8356560144 [IMP] move global CKEDITOR configuration to JS code
bzr revid: xmo@openerp.com-20130910085604-pye2vm3wo8qev11d
2013-09-10 10:56:04 +02:00
Xavier Morel 44e75d37b1 [FIX] markup cleanup: don't forget to remove oe_dirty flag class
bzr revid: xmo@openerp.com-20130910073112-nibl2n2qo3adkppe
2013-09-10 09:31:12 +02:00
Xavier Morel 35a0a0b5ea [FIX] default plugins changes? Explicitly configure CKEDITOR plugins from now on
bzr revid: xmo@openerp.com-20130910065756-99kz2z4kddt4f7bo
2013-09-10 08:57:56 +02:00
ddm 7c45e5976e CMS basic view editing
bzr revid: ddm@openerp.com-20130909214626-51zfydwbw624heqz
2013-09-09 23:46:26 +02:00
Xavier Morel ca40afd144 [FIX] necessary widget implementation
``inline`` is now automatically inferred on a per-widget basis if not
specified.

``inline`` true|false tells the widget whether it should work on
inlines (e.g. span) or blocks (e.g. p). Specifying the wrong one blows
up because the wrapper is incorrect (inline==false on an inline
element will wrap it in a div and add linefeeds, inline==true on a
block element will wrap it in a span which will automatically split up
in multiple elements leading to downcast blowing up because the wrong
wrapper will be selected).

Since last time, inline inference was added: if *unspecified* widget
will check what type of object it's called on (using
``CKEDITOR.dtd.$inline``) and generate the correct wrapper for that
type.

=> fix misbehavior by removing explicit inline spec.

Also remove unused init and data methods.

bzr revid: xmo@openerp.com-20130909152312-1m5kwvgw04gcrfkv
2013-09-09 17:23:12 +02:00
Christophe Matthieu 0b199c50e5 [WIP] website: snippets: box snippet widget with resize options on click
bzr revid: chm@openerp.com-20130909132800-au0lgkf8thirsv8r
2013-09-09 15:28:00 +02:00
Xavier Morel 2cbfb88437 [FIX] order parameter in view.save call
bzr revid: xmo@openerp.com-20130909111040-ijffmxt8i81h5ynq
2013-09-09 13:10:40 +02:00
Xavier Morel 55a84256a3 [FIX] make RTE activate again
bzr revid: xmo@openerp.com-20130909104238-6deglc3axbu8zsez
2013-09-09 12:42:38 +02:00
Xavier Morel 19c8912cb3 [FIX] updated save, save RPC call
bzr revid: xmo@openerp.com-20130909095112-yihzl1oyop9641uj
2013-09-09 11:51:12 +02:00
Xavier Morel f6762f79e6 [MERGE] from trunk likely completely broken
bzr revid: xmo@openerp.com-20130909094437-kyxvgoz7zxt3fes0
2013-09-09 11:44:37 +02:00
Christophe Matthieu 4d1cc6a4ed [WIP] website: snippets
bzr revid: chm@openerp.com-20130906150408-81qzb2492lwqf7lb
2013-09-06 17:04:08 +02:00
Xavier Morel 81118812a8 [ADD] moved view.save method from server
bzr revid: xmo@openerp.com-20130906130916-txj4mwhulb89kpov
2013-09-06 15:09:16 +02:00
Xavier Morel e56953d94e [ADD] new table-creation button
bzr revid: xmo@openerp.com-20130906085045-zpemzy2akh3bz7q3
2013-09-06 10:50:45 +02:00
Xavier Morel 43ca2585c5 [FIX] don't try to be brokenly clever about preventing click on links during edition
bzr revid: xmo@openerp.com-20130904151021-otzw635in9lhh1e1
2013-09-04 17:10:21 +02:00
Xavier Morel 35fb66e8cf [IMP] use mutation observers on non-RTE editions
bzr revid: xmo@openerp.com-20130904141247-0bjm69ooy310egoj
2013-09-04 16:12:47 +02:00
Xavier Morel cdffb9943f [IMP] mutations filtering, only ignore cke_focus being removed, not all editor root changes
bzr revid: xmo@openerp.com-20130904140744-5ytn6bwfxrv52g9f
2013-09-04 16:07:44 +02:00
Xavier Morel b56cd5e2be [IMP] merge Format and Styles dropdowns
bzr revid: xmo@openerp.com-20130904131745-ro5c0c7myvyv98xw
2013-09-04 15:17:45 +02:00
Xavier Morel 4932521377 [ADD] selection of existing image in image dialog
bzr revid: xmo@openerp.com-20130904113222-xync5o48nwngvtj4
2013-09-04 13:32:22 +02:00
Christophe Matthieu 7704ce7e03 [IMP] website_sale: add product in website
bzr revid: chm@openerp.com-20130904084958-6rq5xu0xjwzcv399
2013-09-04 10:49:58 +02:00
Xavier Morel c89d31ca95 [ADD] creation of new page from link dialog
* Replace select by input with dropdown

* Add random crap to /pagenew so it does not blow up when a butterfly
  flaps its wings, also so it's possible to call it through xhr and
  get something out of it

* Fix duplicated save() call in link dialog widget thing

bzr revid: xmo@openerp.com-20130903143237-6pwsbqzc02bv3mri
2013-09-03 16:32:37 +02:00
Xavier Morel cf9ab25816 [ADD] image preview to dialog
bzr revid: xmo@openerp.com-20130902134920-um72bldsv19mf5ij
2013-09-02 15:49:20 +02:00
Christophe Matthieu 00c898378b [FIX] website.editor.js: customize click event
bzr revid: chm@openerp.com-20130902151140-jmhcyuuzoxbhlilo
2013-09-02 17:11:40 +02:00
Xavier Morel 9733c396fe [FIX] correctly select range after inserting a link in the document
Apparently same issue as noted in
xmo@openerp.com-20130902105411-ni3klun0k8v1tmjg, RTE and bootstrap
modal fight for focus (oddly not in Firefox), leading to the callstack
blowing up (after a fraction of a second of browser freezing).

Use same remedy, defer focus-manipulating operation to after the
dialog has been removed and destroyed in order to avoid focus fight.

bzr revid: xmo@openerp.com-20130902105637-1y9aogm1yx9z81jt
2013-09-02 12:56:37 +02:00
Xavier Morel 2f97feb322 [ADD] interaction between RTE and bootstrap image modal
bzr revid: xmo@openerp.com-20130902105411-ni3klun0k8v1tmjg
2013-09-02 12:54:11 +02:00
Xavier Morel 1916b769ac [ADD] bootstrap image dialog, behavior missing
bzr revid: xmo@openerp.com-20130902075216-4y83ed2r19z2fgha
2013-09-02 09:52:16 +02:00
Xavier Morel b49504a794 [FIX] bootstrap 3 events
bzr revid: xmo@openerp.com-20130830093211-s7bt1bawl1eftti5
2013-08-30 11:32:11 +02:00
Fabien Pinckaers 7768e28a7b [IMP] Bootstrap 3
bzr revid: fp@tinyerp.com-20130829175831-9f3sh4631m0jmq88
2013-08-29 19:58:31 +02:00
Xavier Morel 0d64c9037d [IMP] Implement custom bootstrap dialog for links.
Dialog doesn't work right as it's a bootstrap 3-ish dialog, not 2, so
none of the classes works correctly.

Also moved editor templates outside of main website template file.

bzr revid: xmo@openerp.com-20130829153441-w51n3hxxikyti0xj
2013-08-29 17:34:41 +02:00
bth-openerp 91d771f7dc [MERGE]Merge lp:~openerp-dev/openobject-addons/trunk-website-al.
bzr revid: bth@tinyerp.com-20130829132442-2td1iateub2j2eug
2013-08-29 18:54:42 +05:30
Xavier Morel 796dcee2c3 [IMP] split out website.js
bzr revid: xmo@openerp.com-20130829102956-prfe9t5308m6y0vn
2013-08-29 12:29:56 +02:00