fnpeditor.git
10 years agosmartxml: transaction wrapper
Aleksander Łukasz [Mon, 27 Jan 2014 10:51:39 +0000 (11:51 +0100)]
smartxml: transaction wrapper

10 years agosmartxml: additional test for Document.deleteText
Aleksander Łukasz [Mon, 27 Jan 2014 10:33:24 +0000 (11:33 +0100)]
smartxml: additional test for Document.deleteText

10 years agosmartxml: another fix for arbitrary text deletion
Aleksander Łukasz [Mon, 27 Jan 2014 10:33:00 +0000 (11:33 +0100)]
smartxml: another fix for arbitrary text deletion

10 years agosmartxml - fixes in deleting arbitrary text method
Aleksander Łukasz [Fri, 24 Jan 2014 15:44:13 +0000 (16:44 +0100)]
smartxml - fixes in deleting arbitrary text method

Handling case where start and end text node merged.

10 years agosmartxml: Fixing invalidated paths used to access transformation node arguments
Aleksander Łukasz [Fri, 24 Jan 2014 15:39:38 +0000 (16:39 +0100)]
smartxml: Fixing invalidated paths used to access transformation node arguments

This ensures that wrapper around node argument sent to the transformation
is using path only the first time it needs to, not every time
after first run of the transformation.

10 years agosmartxml: cleanup
Aleksander Łukasz [Fri, 24 Jan 2014 13:48:25 +0000 (14:48 +0100)]
smartxml: cleanup

10 years agosmartxml: refactor wrapping transformation arguments with path accessors
Aleksander Łukasz [Fri, 24 Jan 2014 13:42:02 +0000 (14:42 +0100)]
smartxml: refactor wrapping transformation arguments with path accessors

This will allow for improving accessors to be smarter about making
decision whether or not to return node via path. This is necessary
to fix a bug caused by invalidated paths.

10 years agosmartxml: transformations fix - wrapping nodes arguments with path accessor one level...
Aleksander Łukasz [Fri, 24 Jan 2014 13:09:54 +0000 (14:09 +0100)]
smartxml: transformations fix - wrapping nodes arguments with path accessor one level deeper

10 years agoeditor: Handle hitting backspace/delete on arbitrary selection
Aleksander Łukasz [Fri, 24 Jan 2014 09:35:02 +0000 (10:35 +0100)]
editor: Handle hitting backspace/delete on arbitrary selection

10 years agosmartxml: Deleting arbitrary text
Aleksander Łukasz [Fri, 24 Jan 2014 09:17:28 +0000 (10:17 +0100)]
smartxml: Deleting arbitrary text

10 years agoeditor: Handling backspace/delete on the text boundries
Aleksander Łukasz [Thu, 23 Jan 2014 14:19:40 +0000 (15:19 +0100)]
editor: Handling backspace/delete on the text boundries

10 years agosmartxml: append/prepend shortcuts for text nodes
Aleksander Łukasz [Thu, 23 Jan 2014 13:42:34 +0000 (14:42 +0100)]
smartxml: append/prepend shortcuts for text nodes

10 years agoeditor: canvas cursor fix - handle node with Zero Width Space only correctly
Aleksander Łukasz [Thu, 23 Jan 2014 12:32:17 +0000 (13:32 +0100)]
editor: canvas cursor fix - handle node with Zero Width Space only correctly

10 years agosmartxml: fix - removing source of the merged text if necessary
Aleksander Łukasz [Thu, 23 Jan 2014 11:59:15 +0000 (12:59 +0100)]
smartxml: fix - removing source of the merged text if necessary

If node of the merged-in text existed in a document before (it's not a
new node) it needs to be removed.

10 years agosmartxml: refactoring
Aleksander Łukasz [Thu, 23 Jan 2014 08:58:25 +0000 (09:58 +0100)]
smartxml: refactoring

Now that methods inserting nodes handle text merging by themselves,
we don't need to worry about that here.

10 years agosmartxml: fix ranges returned by unwrapContents
Aleksander Łukasz [Thu, 23 Jan 2014 08:52:10 +0000 (09:52 +0100)]
smartxml: fix ranges returned by unwrapContents

10 years agosmartxml: implementing merging of inserted text nodes if necessary
Aleksander Łukasz [Thu, 23 Jan 2014 08:37:47 +0000 (09:37 +0100)]
smartxml: implementing merging of inserted text nodes if necessary

This ensures that document stays in a normalized state, i.e.
without adjacent text nodes. Up until now it was the client
code responsibility not to denormalize the document.

10 years agoeditor: fixing FF behavior in metadata editor
Aleksander Łukasz [Wed, 22 Jan 2014 10:58:10 +0000 (11:58 +0100)]
editor: fixing FF behavior in metadata editor

In Chrome contenteditable=true seems to imply word-wrap: break-word
and forcing element to fill its parent vertically. In FF we need
to enforce this explicitly.

This change fixes:
- metadata editor layout for long metadata,
- not being able to start editing a blank field.

10 years agoeditor: allow for adding new node via toolbar after the current one
Aleksander Łukasz [Tue, 21 Jan 2014 11:59:04 +0000 (12:59 +0100)]
editor: allow for adding new node via toolbar after the current one

Changed behavior: wrapping current node happened upon clicking toolbar
icon while cursor exists but is not selecting. Now, for that to happen,
also ctrl key must be pressed. The former behavior now adds new node
after the current one.

10 years agowlxml: metadata - ignore setting the same value as the old one
Aleksander Łukasz [Tue, 21 Jan 2014 11:13:58 +0000 (12:13 +0100)]
wlxml: metadata - ignore setting the same value as the old one

10 years agosmartxml: push transformation onto the undo stack only if it actually changed the...
Aleksander Łukasz [Tue, 21 Jan 2014 11:13:25 +0000 (12:13 +0100)]
smartxml: push transformation onto the undo stack only if it actually changed the document

At least one change event must be emmited during transformation for
a document to be considered changed.

10 years agoeditor: metadata editor - handle node removal
Aleksander Łukasz [Tue, 21 Jan 2014 10:34:03 +0000 (11:34 +0100)]
editor: metadata editor - handle node removal

10 years agowlxml: metadata fix - missing event
Aleksander Łukasz [Tue, 21 Jan 2014 10:31:46 +0000 (11:31 +0100)]
wlxml: metadata fix - missing event

10 years agoeditor: metadata editor - fixing table layout
Aleksander Łukasz [Tue, 21 Jan 2014 10:04:54 +0000 (11:04 +0100)]
editor: metadata editor - fixing table layout

10 years agoeditor: first approach to supplementing comments with user and date metadata
Aleksander Łukasz [Tue, 21 Jan 2014 10:03:28 +0000 (11:03 +0100)]
editor: first approach to supplementing comments with user and date metadata

10 years agowlxml: metadata - additional iterator, filtering
Aleksander Łukasz [Tue, 21 Jan 2014 10:04:31 +0000 (11:04 +0100)]
wlxml: metadata - additional iterator, filtering

10 years agoeditor: cleanup
Aleksander Łukasz [Fri, 17 Jan 2014 15:36:33 +0000 (16:36 +0100)]
editor: cleanup

10 years agoeditor: fix minor bug
Aleksander Łukasz [Fri, 17 Jan 2014 15:17:56 +0000 (16:17 +0100)]
editor: fix minor bug

10 years agolinting
Aleksander Łukasz [Fri, 17 Jan 2014 15:08:18 +0000 (16:08 +0100)]
linting

10 years agoMerge in metadata support into master
Aleksander Łukasz [Fri, 17 Jan 2014 14:29:59 +0000 (15:29 +0100)]
Merge in metadata support into master

Creating/editing/deleting metadata on arbitrary nodes

10 years agowlxml: metdata wip - empty key/value is represented as an empty string
Aleksander Łukasz [Fri, 17 Jan 2014 09:37:36 +0000 (10:37 +0100)]
wlxml: metdata wip - empty key/value is represented as an empty string

10 years agoeditor: metadata wip fix
Aleksander Łukasz [Fri, 17 Jan 2014 08:48:41 +0000 (09:48 +0100)]
editor: metadata wip fix

10 years agoeditor: metadata wip - refactoring, removing unused code
Aleksander Łukasz [Thu, 16 Jan 2014 16:19:07 +0000 (17:19 +0100)]
editor: metadata wip - refactoring, removing unused code

10 years agoeditor: metadata wip - refactoring
Aleksander Łukasz [Thu, 16 Jan 2014 16:14:23 +0000 (17:14 +0100)]
editor: metadata wip - refactoring

10 years agoeditor: meta wip - first working version
Aleksander Łukasz [Fri, 17 Jan 2014 10:01:06 +0000 (11:01 +0100)]
editor: meta wip - first working version

10 years agoeditor: removing old unused code
Aleksander Łukasz [Thu, 16 Jan 2014 15:05:06 +0000 (16:05 +0100)]
editor: removing old unused code

10 years agowlxml: metadata wip - adding/removing/editing, undo, cloning support
Aleksander Łukasz [Fri, 17 Jan 2014 10:02:20 +0000 (11:02 +0100)]
wlxml: metadata wip - adding/removing/editing, undo, cloning support

10 years agosmartxml: data cloning handler gets reference to the cloned node
Aleksander Łukasz [Thu, 16 Jan 2014 14:37:43 +0000 (15:37 +0100)]
smartxml: data cloning handler gets reference to the cloned node

10 years agowlxml: metadata wip - part of a new api approach
Aleksander Łukasz [Thu, 16 Jan 2014 08:44:43 +0000 (09:44 +0100)]
wlxml: metadata wip - part of a new api approach

10 years agowlxml: metadata wip - as extension
Aleksander Łukasz [Wed, 15 Jan 2014 15:04:14 +0000 (16:04 +0100)]
wlxml: metadata wip - as extension

10 years agosmartxml: allow for registering extensions before initial xml processing
Aleksander Łukasz [Wed, 15 Jan 2014 14:58:19 +0000 (15:58 +0100)]
smartxml: allow for registering extensions before initial xml processing

10 years agoeditor: metadata wip - first approach
Aleksander Łukasz [Fri, 17 Jan 2014 14:09:48 +0000 (15:09 +0100)]
editor: metadata wip - first approach

10 years agowlxml: metadata wip - first approach
Aleksander Łukasz [Fri, 17 Jan 2014 14:09:37 +0000 (15:09 +0100)]
wlxml: metadata wip - first approach

10 years agosmartxml: allow objects set with setData to clone themselves on node cloning
Aleksander Łukasz [Thu, 16 Jan 2014 09:34:31 +0000 (10:34 +0100)]
smartxml: allow objects set with setData to clone themselves on node cloning

10 years agologging: change default formatter to noop, fixes tests
Aleksander Łukasz [Tue, 31 Dec 2013 13:25:56 +0000 (14:25 +0100)]
logging: change default formatter to noop, fixes tests

10 years agoeditor: warn user before exit
Aleksander Łukasz [Tue, 31 Dec 2013 11:48:37 +0000 (12:48 +0100)]
editor: warn user before exit

10 years agologging: basic formatters support
Aleksander Łukasz [Tue, 31 Dec 2013 11:31:49 +0000 (12:31 +0100)]
logging: basic formatters support

10 years agologging: console handler
Aleksander Łukasz [Tue, 31 Dec 2013 11:25:33 +0000 (12:25 +0100)]
logging: console handler

10 years agologging: fix in ravenjs handler
Aleksander Łukasz [Tue, 31 Dec 2013 10:36:13 +0000 (11:36 +0100)]
logging: fix in ravenjs handler

10 years agobuild: generate js source map
Aleksander Łukasz [Mon, 30 Dec 2013 14:22:34 +0000 (15:22 +0100)]
build: generate js source map

10 years agoeditor: handle invalid xml sent as a wlxml document
Aleksander Łukasz [Mon, 30 Dec 2013 13:11:12 +0000 (14:11 +0100)]
editor: handle invalid xml sent as a wlxml document

10 years agosmartxml: raise an Error on invalid XML
Aleksander Łukasz [Mon, 30 Dec 2013 13:00:00 +0000 (14:00 +0100)]
smartxml: raise an Error on invalid XML

10 years agologging: Raven handler fixes
Aleksander Łukasz [Mon, 30 Dec 2013 12:57:56 +0000 (13:57 +0100)]
logging: Raven handler fixes

- pass logger name
- pass level not as a tag (this overwrites default "level" tag value in
Sentry UI instead of setting its second value)
- allow for passing additional data when logging exception

10 years agologging: pass logger name to the handler
Aleksander Łukasz [Mon, 30 Dec 2013 12:29:07 +0000 (13:29 +0100)]
logging: pass logger name to the handler

10 years agoeditor: pass through logging configuration to the logger module
Aleksander Łukasz [Mon, 30 Dec 2013 12:17:49 +0000 (13:17 +0100)]
editor: pass through logging configuration to the logger module

10 years agologging: Raven handler
Aleksander Łukasz [Mon, 30 Dec 2013 12:16:05 +0000 (13:16 +0100)]
logging: Raven handler

This handler assumes that ravenjs is already installed in a global
scope.

10 years agoSimple logging api inspired by Python logging module
Aleksander Łukasz [Mon, 30 Dec 2013 12:09:55 +0000 (13:09 +0100)]
Simple logging api inspired by Python logging module

10 years agobuild: don't strip 'use strict'
Aleksander Łukasz [Fri, 20 Dec 2013 12:46:26 +0000 (13:46 +0100)]
build: don't strip 'use strict'

10 years agogitignore update: node_modules/
Aleksander Łukasz [Fri, 20 Dec 2013 12:45:15 +0000 (13:45 +0100)]
gitignore update: node_modules/

10 years agoeditor: fix styling of the emp wlxml class
Aleksander Łukasz [Thu, 19 Dec 2013 14:41:19 +0000 (15:41 +0100)]
editor: fix styling of the emp wlxml class

10 years agowlxml/editor: rename class uri to link
Aleksander Łukasz [Thu, 19 Dec 2013 11:49:26 +0000 (12:49 +0100)]
wlxml/editor: rename class uri to link

10 years agosmartxml: throw exception on missing tagName property sent to createDocumentNode
Aleksander Łukasz [Wed, 18 Dec 2013 11:37:51 +0000 (12:37 +0100)]
smartxml: throw exception on missing tagName property sent to createDocumentNode

10 years agoeditor: fixing invalid new node construction in ctrl+enter handler
Aleksander Łukasz [Wed, 18 Dec 2013 11:35:18 +0000 (12:35 +0100)]
editor: fixing invalid new node construction in ctrl+enter handler

10 years agowlxml: lists fix
Aleksander Łukasz [Wed, 18 Dec 2013 11:22:45 +0000 (12:22 +0100)]
wlxml: lists fix

The default sort order used by Array.prototype.sort is lexicographic.
This broke node selection for include/exclude for/from a list.

10 years agoeditor: remove new line characters from pasted text
Aleksander Łukasz [Wed, 18 Dec 2013 10:40:24 +0000 (11:40 +0100)]
editor: remove new line characters from pasted text

10 years agoeditor: Mark some texts for translation
Aleksander Łukasz [Wed, 18 Dec 2013 09:08:21 +0000 (10:08 +0100)]
editor: Mark some texts for translation

10 years agoeditor: minor refactoring
Aleksander Łukasz [Wed, 18 Dec 2013 08:43:04 +0000 (09:43 +0100)]
editor: minor refactoring

10 years agoeditor fix: source editor should also react to contentSet event
Aleksander Łukasz [Tue, 17 Dec 2013 16:38:38 +0000 (17:38 +0100)]
editor fix: source editor should also react to contentSet event

This fixes source editor not reloading its content after revert.

10 years agoeditor: bring back restore dialog after integration
Aleksander Łukasz [Tue, 17 Dec 2013 16:09:51 +0000 (17:09 +0100)]
editor: bring back restore dialog after integration

Both save and restore dialog are now handled by more generalized
dialog object, based on previous dialog object implementation.

10 years agoeditor: configurable document diff and revert urls
Aleksander Łukasz [Tue, 17 Dec 2013 15:38:03 +0000 (16:38 +0100)]
editor: configurable document diff and revert urls

10 years agoeditor: nodePane handles meta/unregistered node attributes
Aleksander Łukasz [Tue, 17 Dec 2013 13:53:02 +0000 (14:53 +0100)]
editor: nodePane handles meta/unregistered node attributes

10 years agowlxml: Remove "meta-" prefix for defined (aka "meta") attributes
Aleksander Łukasz [Tue, 17 Dec 2013 13:52:24 +0000 (14:52 +0100)]
wlxml: Remove "meta-" prefix for defined (aka "meta") attributes

This change unifies structure type returned by getOtherAttributes
with the one returned by getMetaAttributes so that these two can
be easily merged if necessary.

10 years agosmartxml: transactions fix - ignore empty transactions
Aleksander Łukasz [Tue, 17 Dec 2013 11:52:33 +0000 (12:52 +0100)]
smartxml: transactions fix - ignore empty transactions

Handle doc.transactionStart(); doc.transactionEnd() without actual
transformations performed in between.

10 years agoeditor: first take on text paste handling
Aleksander Łukasz [Tue, 17 Dec 2013 11:28:03 +0000 (12:28 +0100)]
editor: first take on text paste handling

10 years agoeditor: fixing canvas.cursor getSelectionStart/getSelectionEnd
Aleksander Łukasz [Tue, 17 Dec 2013 10:51:29 +0000 (11:51 +0100)]
editor: fixing canvas.cursor getSelectionStart/getSelectionEnd

Cursor now correctly recognizes when:

- selection is contained within same text node (fix)
- selection spans text elements with different parents (adding
missing implementation)

10 years agosmartxml: optimize undo for setText transformation
Aleksander Łukasz [Tue, 17 Dec 2013 10:51:08 +0000 (11:51 +0100)]
smartxml: optimize undo for setText transformation

10 years agoeditor: fix - removing redundant event handlers
Aleksander Łukasz [Tue, 17 Dec 2013 10:50:48 +0000 (11:50 +0100)]
editor: fix - removing redundant event handlers

Handlers on canvas wrapper should be set only once, not with
every document load.

10 years agoeditor: fix - removing unnecessary event handler in sourceEditor module
Aleksander Łukasz [Tue, 17 Dec 2013 10:50:17 +0000 (11:50 +0100)]
editor: fix - removing unnecessary event handler in sourceEditor module

This was causing setting documentEditedHere on actions other than
document edit, like navigating with arrow keys or invoking acejs search
functionality.

10 years agoeditor: canvas - consider list subclasses when styling lists
Aleksander Łukasz [Sat, 14 Dec 2013 17:34:59 +0000 (18:34 +0100)]
editor: canvas - consider list subclasses when styling lists

10 years agoeditor: fix canvas wrap node command
Aleksander Łukasz [Sat, 14 Dec 2013 15:37:33 +0000 (16:37 +0100)]
editor: fix canvas wrap node command

10 years agowlxml: fix list extension's document methods definition
Aleksander Łukasz [Sat, 14 Dec 2013 15:36:25 +0000 (16:36 +0100)]
wlxml: fix list extension's document methods definition

This now defines areItemsOfSameList method correctly

10 years agoeditor: canvas - fix problem with detaching empty text nodes
Aleksander Łukasz [Fri, 13 Dec 2013 19:49:02 +0000 (20:49 +0100)]
editor: canvas - fix problem with detaching empty text nodes

This code is a remnant of the old canvas implementation that
should be removed long time ago after switching to event based
documents. And it just happens that it broke handling of
nodeDetach event for of empty text nodes.

10 years agoeditor - fix missing canvas references
Aleksander Łukasz [Fri, 13 Dec 2013 19:37:12 +0000 (20:37 +0100)]
editor - fix missing canvas references

10 years agoeditor - group node removing actions on a toolbar together
Aleksander Łukasz [Fri, 13 Dec 2013 15:35:39 +0000 (16:35 +0100)]
editor - group node removing actions on a toolbar together

10 years agoeditor: some basic aside.comment support
Aleksander Łukasz [Fri, 13 Dec 2013 15:33:57 +0000 (16:33 +0100)]
editor: some basic aside.comment support

- create aside.comment element via toolbar icon
- allow for assigning comment class in node pane

10 years agoeditor: nicer icon for undo toolbar icon
Aleksander Łukasz [Fri, 13 Dec 2013 15:32:00 +0000 (16:32 +0100)]
editor: nicer icon for undo toolbar icon

10 years agoeditor: fix - send correct class parameter when wrapping current node
Aleksander Łukasz [Fri, 13 Dec 2013 15:31:14 +0000 (16:31 +0100)]
editor: fix - send correct class parameter when wrapping current node

10 years agoeditor: fallback to original tag/class name in case of lack of defined human friendly...
Aleksander Łukasz [Fri, 13 Dec 2013 15:02:26 +0000 (16:02 +0100)]
editor: fallback to original tag/class name in case of lack of defined human friendly label

10 years agoeditor: canvas - styling for aside.comment nodes
Aleksander Łukasz [Fri, 13 Dec 2013 14:37:34 +0000 (15:37 +0100)]
editor: canvas - styling for aside.comment nodes

10 years agoeditor: styling - make border of canvas elements transparent to respect parents backg...
Aleksander Łukasz [Fri, 13 Dec 2013 14:36:59 +0000 (15:36 +0100)]
editor: styling - make border of canvas elements transparent to respect parents background color

10 years agoeditor: fix cursor out of text node handling Chrome hack
Aleksander Łukasz [Sat, 14 Dec 2013 14:47:58 +0000 (15:47 +0100)]
editor: fix cursor out of text node handling Chrome hack

The case where there were no more text nodes above/below was
not handled correctly. Now, if that happens, we revert in the
opposite direction, ideally to place where we started.

This might be better handled at the keydown phase.

10 years agoeditor: fix resolving cursor destination after breaking content at the edge of text...
Aleksander Łukasz [Fri, 13 Dec 2013 13:02:55 +0000 (14:02 +0100)]
editor: fix resolving cursor destination after breaking content at the edge of text node

10 years agofix relative paths bug for build 2
Aleksander Łukasz [Thu, 12 Dec 2013 21:22:26 +0000 (22:22 +0100)]
fix relative paths bug for build 2

10 years agoCompile Bootstrap CSS on our own, include it into build CSS file.
Aleksander Łukasz [Thu, 12 Dec 2013 17:56:04 +0000 (18:56 +0100)]
Compile Bootstrap CSS on our own, include it into build CSS file.

- adding Bootstrap v2.3.1 less files
- package.json: upgrade grunt-contrib-less to get relative urls support
- Gruntfile:
 - turn on relativeUrls so that urls to glyphicons get rewritten on build
 - as of v0.8.0 grunt-contrib-less doesn't support yuicompress option

10 years agointegration wip: copy Bootstrap to build directory on build
Aleksander Łukasz [Thu, 12 Dec 2013 14:21:08 +0000 (15:21 +0100)]
integration wip: copy Bootstrap to build directory on build

10 years agointegration wip: install local copy of grunt-cli
Aleksander Łukasz [Wed, 11 Dec 2013 16:30:35 +0000 (17:30 +0100)]
integration wip: install local copy of grunt-cli

grunt-cli is a runner that runs the most local copy of grunt itself.

With this change we don't care if it's available globally.

10 years agointegration wip: configurable output dir path for grunt build task
Aleksander Łukasz [Wed, 11 Dec 2013 16:23:32 +0000 (17:23 +0100)]
integration wip: configurable output dir path for grunt build task

10 years agointegration wip: use default value for baseUrl
Aleksander Łukasz [Wed, 11 Dec 2013 16:21:13 +0000 (17:21 +0100)]
integration wip: use default value for baseUrl

baseUrl defaults to entrypoint.js url so no need to set it explicitly.

On top of that, setting it here would require hosting page to define
global variable accessible from entrypoint.js to configure baseUrl value
for a given environment which:
- adds additional configuration step for hosting page,
- breaks r.js optimizer as it requires call to requirejs.config
to be parsable as JSON.

10 years agoeditor: Inserting document templates support
Aleksander Łukasz [Wed, 11 Dec 2013 12:18:41 +0000 (13:18 +0100)]
editor: Inserting document templates support

TODO: Refactor it out of documentToolbar module, use some kind of
more generalized mechanism.

10 years agowlxml: Use smartxml hook for XML normalization
Aleksander Łukasz [Wed, 11 Dec 2013 12:15:44 +0000 (13:15 +0100)]
wlxml: Use smartxml hook for XML normalization