fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1bd184
)
editor: ui for createing enumerated lists
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 1 Apr 2014 20:23:39 +0000
(22:23 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 1 Apr 2014 20:23:39 +0000
(22:23 +0200)
src/editor/modules/documentCanvas/canvas/wlxmlManagers.js
patch
|
blob
|
history
src/editor/modules/documentCanvas/commands.js
patch
|
blob
|
history
src/editor/modules/documentCanvas/nodes.less
patch
|
blob
|
history
src/editor/modules/documentToolbar/template.html
patch
|
blob
|
history
diff --git
a/src/editor/modules/documentCanvas/canvas/wlxmlManagers.js
b/src/editor/modules/documentCanvas/canvas/wlxmlManagers.js
index
9f7ecfa
..
6b8b5ff
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/wlxmlManagers.js
+++ b/
src/editor/modules/documentCanvas/canvas/wlxmlManagers.js
@@
-135,7
+135,6
@@
var ListItemManager = function(wlxmlElement) {
$.extend(ListItemManager.prototype, {
setup: function() {
this.el.clearWidgets();
$.extend(ListItemManager.prototype, {
setup: function() {
this.el.clearWidgets();
- this.el.documentElement._container().css({display: 'list-item'});
},
toggleBullet: function(toggle) {
this.el.documentElement._container().css({display : toggle ? 'list-item' : 'block'});
},
toggleBullet: function(toggle) {
this.el.documentElement._container().css({display : toggle ? 'list-item' : 'block'});
diff --git
a/src/editor/modules/documentCanvas/commands.js
b/src/editor/modules/documentCanvas/commands.js
index
a165132
..
8a26ecc
100644
(file)
--- a/
src/editor/modules/documentCanvas/commands.js
+++ b/
src/editor/modules/documentCanvas/commands.js
@@
-95,7
+95,7
@@
commands.register('list', function(canvas, params) {
doc = node1.document;
doc.transaction(function() {
doc = node1.document;
doc.transaction(function() {
- doc.createList({node1: node1, node2: node2});
+ doc.createList({node1: node1, node2: node2
, klass: params.meta === 'num' ? 'list.enum' : 'list'
});
}, {
success: function() {
canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset});
}, {
success: function() {
canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset});
diff --git
a/src/editor/modules/documentCanvas/nodes.less
b/src/editor/modules/documentCanvas/nodes.less
index
78792cc
..
9ce08d1
100644
(file)
--- a/
src/editor/modules/documentCanvas/nodes.less
+++ b/
src/editor/modules/documentCanvas/nodes.less
@@
-77,12
+77,18
@@
display:none;
}
display:none;
}
-[wlxml-class
|
="list"] {
+[wlxml-class="list"] {
- [wlxml-class|="item"] {
- display: list-item;
+
+ > * > [wlxml-class="item"] {
margin-left: 10px;
padding-left: 5px;
margin-left: 10px;
padding-left: 5px;
+
+ &:before {
+ content: '\2022';
+ margin-right:10px;
+ padding-right:10px;
+ }
}
}
}
}
@@
-97,7
+103,7
@@
counter-reset: myitem;
counter-reset: myitem;
- > [wlxml-class="item"] {
+ >
* >
[wlxml-class="item"] {
counter-increment: myitem;
margin-left: 10px;
padding-left: 5px;
counter-increment: myitem;
margin-left: 10px;
padding-left: 5px;
diff --git
a/src/editor/modules/documentToolbar/template.html
b/src/editor/modules/documentToolbar/template.html
index
b57193a
..
2e14a89
100644
(file)
--- a/
src/editor/modules/documentToolbar/template.html
+++ b/
src/editor/modules/documentToolbar/template.html
@@
-6,7
+6,8
@@
<div class="rng-module-documentToolbar-toolbarGroup">
<button data-name="new-node" data-meta="header/" data-btn-type="cmd" class="btn btn-mini">nagłówek</button>
<div class="rng-module-documentToolbar-toolbarGroup">
<button data-name="new-node" data-meta="header/" data-btn-type="cmd" class="btn btn-mini">nagłówek</button>
- <button data-name="list" data-btn-type="cmd" data-meta="bullets" class="btn btn-mini">lista</button>
+ <button data-name="list" data-btn-type="cmd" data-meta="bullets" class="btn btn-mini">lista pkt</button>
+ <button data-name="list" data-btn-type="cmd" data-meta="num" class="btn btn-mini">lista num</button>
</div>
<div class="rng-module-documentToolbar-toolbarGroup">
</div>
<div class="rng-module-documentToolbar-toolbarGroup">