fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dodanie formularza z panelem DublinCore.
[redakcja.git]
/
project
/
templates
/
explorer
/
panels
/
xmleditor.html
diff --git
a/project/templates/explorer/panels/xmleditor.html
b/project/templates/explorer/panels/xmleditor.html
index
f2a6d73
..
0c8724f
100644
(file)
--- a/
project/templates/explorer/panels/xmleditor.html
+++ b/
project/templates/explorer/panels/xmleditor.html
@@
-15,7
+15,10
@@
path: "/static/js/codemirror/",
stylesheet: "/static/css/xmlcolors.css",
parserConfig: {useHTMLKludges: false},
path: "/static/js/codemirror/",
stylesheet: "/static/css/xmlcolors.css",
parserConfig: {useHTMLKludges: false},
- initCallback: function() {
+ onChange: function() {
+ $(document).trigger('panel:contentChanged', panel);
+ },
+ initCallback: function(editor) {
// Toolbar
$('.toolbar-tabs li', panel).click(function() {
var id = $(this).attr('p:button-list');
// Toolbar
$('.toolbar-tabs li', panel).click(function() {
var id = $(this).attr('p:button-list');
@@
-32,12
+35,12
@@
var tag = $(this).attr('p:tag');
var handler = function() {
var text = editor.selection();
var tag = $(this).attr('p:tag');
var handler = function() {
var text = editor.selection();
- console.log(editor, editor.frame);
editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
if (text.length == 0) {
var pos = editor.cursorPosition();
editor.selectLines(pos.line, pos.character + tag.length + 2);
}
editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
if (text.length == 0) {
var pos = editor.cursorPosition();
editor.selectLines(pos.line, pos.character + tag.length + 2);
}
+ $(document).trigger('panel:contentChanged', panel);
}
if ($(this).attr('p:key')) {
keys[$(this).attr('p:key')] = handler;
}
if ($(this).attr('p:key')) {
keys[$(this).attr('p:key')] = handler;