fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[redakcja.git]
/
src
/
redakcja
/
static
/
js
/
wiki
/
view_properties.js
diff --git
a/src/redakcja/static/js/wiki/view_properties.js
b/src/redakcja/static/js/wiki/view_properties.js
index
5c4c0e8
..
9fa1c9d
100644
(file)
--- a/
src/redakcja/static/js/wiki/view_properties.js
+++ b/
src/redakcja/static/js/wiki/view_properties.js
@@
-40,6
+40,7
@@
class PropertiesPerspective extends $.wiki.SidebarPerspective {
vsplitbar = 'WŁAŚCIWOŚCI';
class PropertiesPerspective extends $.wiki.SidebarPerspective {
vsplitbar = 'WŁAŚCIWOŚCI';
+ $edited = null;
constructor(options) {
super(options);
constructor(options) {
super(options);
@@
-78,6
+79,7
@@
} else {
$input.data("edited").text(inputval);
}
} else {
$input.data("edited").text(inputval);
}
+ $.wiki.perspectives.VisualPerspective.flush();
return;
}
return;
}
@@
-99,6
+101,7
@@
let htmlElem = $(html);
self.$edited.replaceWith(htmlElem);
self.edit(htmlElem);
let htmlElem = $(html);
self.$edited.replaceWith(htmlElem);
self.edit(htmlElem);
+ $.wiki.activePerspective().flush();
}
});
},
}
});
},
@@
-146,8
+149,10
@@
self.$pane.on('click', '.meta-delete', function() {
let $fg = $(this).closest('.form-group');
self.$pane.on('click', '.meta-delete', function() {
let $fg = $(this).closest('.form-group');
- $('input', $fg).data('edited').remove();
+ let $ig = $(this).closest('.input-group');
+ $('input', $ig).data('edited').remove();
self.displayMetaProperty($fg);
self.displayMetaProperty($fg);
+ $.wiki.perspectives.VisualPerspective.flush();
return false;
});
return false;
});
@@
-192,6
+197,7
@@
if (element === null) {
self.$edited = null;
if (element === null) {
self.$edited = null;
+ $("h1", self.$pane).text('');
return;
}
return;
}
@@
-401,10
+407,17
@@
if ($.wiki.activePerspective() != 'VisualPerspective')
$.wiki.switchToTab('#VisualPerspective');
if ($.wiki.activePerspective() != 'VisualPerspective')
$.wiki.switchToTab('#VisualPerspective');
- if (self.$edited === null) {
- self.edit($('[x-node="utwor"]')[0]);
+ this.enable();
+ }
+
+ enable() {
+ if (this.$edited === null) {
+ this.edit($('[x-node="utwor"]')[0]);
}
}
}
}
+ disable() {
+ this.edit(null);
+ }
}
$.wiki.PropertiesPerspective = PropertiesPerspective;
}
$.wiki.PropertiesPerspective = PropertiesPerspective;