fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1133074
)
Image editor fix: bring back horizontal scrollbar in motifs and objects perspective
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 10 Jul 2014 07:17:31 +0000
(09:17 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 10 Jul 2014 07:17:31 +0000
(09:17 +0200)
apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
patch
|
blob
|
history
redakcja/static/js/wiki_img/view_editor_motifs.js
patch
|
blob
|
history
redakcja/static/js/wiki_img/view_editor_objects.js
patch
|
blob
|
history
diff --git
a/apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
b/apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
index
7258888
..
c064505
100644
(file)
--- a/
apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
+++ b/
apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
@@
-11,9
+11,7
@@
</div>
</div>
</div>
</div>
- <div style="position:relative; height: 100%;">
- <div class='scrolled'>
- <img src="{{ document.image.url }}" class='area-selectable' alt="Tagged image" />
- </div>
+ <div class='scrolled'>
+ <img src="{{ document.image.url }}" class='area-selectable' alt="Tagged image" />
</div>
</div>
</div>
</div>
diff --git
a/redakcja/static/js/wiki_img/view_editor_motifs.js
b/redakcja/static/js/wiki_img/view_editor_motifs.js
index
22331c5
..
ad60c22
100644
(file)
--- a/
redakcja/static/js/wiki_img/view_editor_motifs.js
+++ b/
redakcja/static/js/wiki_img/view_editor_motifs.js
@@
-8,6
+8,8
@@
var self = this;
self.$tag_name = $('#motifs-editor .tag-name');
var self = this;
self.$tag_name = $('#motifs-editor .tag-name');
+ self.$toolbar = $('#motifs-editor .toolbar');
+ self.$scrolled = $('#motifs-editor .scrolled');
withThemes(function(canonThemes){
self.$tag_name.autocomplete(canonThemes, {
autoFill: true,
withThemes(function(canonThemes){
self.$tag_name.autocomplete(canonThemes, {
autoFill: true,
@@
-33,6
+35,7
@@
if (window.confirm("Czy na pewno chcesz usunąć ten motyw?")) {
$(this).prev().remove();
$(this).remove();
if (window.confirm("Czy na pewno chcesz usunąć ten motyw?")) {
$(this).prev().remove();
$(this).remove();
+ self._refreshLayout();
}
self._resetSelection();
return false;
}
self._resetSelection();
return false;
@@
-70,6
+73,9
@@
self.ias.setOptions({ hide: true });
}
self.ias.setOptions({ hide: true });
}
+ MotifsPerspective.prototype._refreshLayout = function() {
+ this.$scrolled.css({top: this.$toolbar.height()});
+ };
MotifsPerspective.prototype._push = function(name, x1, y1, x2, y2) {
var $e = $('<span class="image-object"></span>')
MotifsPerspective.prototype._push = function(name, x1, y1, x2, y2) {
var $e = $('<span class="image-object"></span>')
@@
-78,6
+84,7
@@
$e.data('coords', [x1, y1, x2, y2]);
this.$objects_list.append($e);
this.$objects_list.append('<span class="delete">(x) </span>');
$e.data('coords', [x1, y1, x2, y2]);
this.$objects_list.append($e);
this.$objects_list.append('<span class="delete">(x) </span>');
+ this._refreshLayout();
}
}
diff --git
a/redakcja/static/js/wiki_img/view_editor_objects.js
b/redakcja/static/js/wiki_img/view_editor_objects.js
index
bd0af09
..
b0cf2a9
100644
(file)
--- a/
redakcja/static/js/wiki_img/view_editor_objects.js
+++ b/
redakcja/static/js/wiki_img/view_editor_objects.js
@@
-8,6
+8,8
@@
var self = this;
self.$tag_name = $('#objects-editor .tag-name');
var self = this;
self.$tag_name = $('#objects-editor .tag-name');
+ self.$toolbar = $('#objects-editor .toolbar');
+ self.$scrolled = $('#objects-editor .scrolled');
self.$objects_list = $('#objects-editor .objects-list');
self.x1 = null;
self.$objects_list = $('#objects-editor .objects-list');
self.x1 = null;
@@
-24,6
+26,7
@@
if (window.confirm("Czy na pewno chcesz usunąć ten obiekt?")) {
$(this).prev().remove();
$(this).remove();
if (window.confirm("Czy na pewno chcesz usunąć ten obiekt?")) {
$(this).prev().remove();
$(this).remove();
+ self._refreshLayout();
}
self._resetSelection();
return false;
}
self._resetSelection();
return false;
@@
-61,6
+64,9
@@
self.ias.setOptions({ hide: true });
}
self.ias.setOptions({ hide: true });
}
+ ObjectsPerspective.prototype._refreshLayout = function() {
+ this.$scrolled.css({top: this.$toolbar.height()});
+ };
ObjectsPerspective.prototype._push = function(name, x1, y1, x2, y2) {
var $e = $('<span class="image-object"></span>')
ObjectsPerspective.prototype._push = function(name, x1, y1, x2, y2) {
var $e = $('<span class="image-object"></span>')
@@
-69,6
+75,7
@@
$e.data('coords', [x1, y1, x2, y2]);
this.$objects_list.append($e);
this.$objects_list.append('<span class="delete">(x) </span>');
$e.data('coords', [x1, y1, x2, y2]);
this.$objects_list.append($e);
this.$objects_list.append('<span class="delete">(x) </span>');
+ this._refreshLayout();
}
}