Use screen methods to activate or not the next/previous buttons of attachment preview
Closes #12756 (grafted from cf043bb57421ab47f68cf8cc41745489cf0187d4) --HG-- branch : 7.0
This commit is contained in:
1 parent
f12fca4187
commit
20fa476c9c
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -1283,8 +1283,8 @@
|
||||
preview.record_message = function(position, length) {
|
||||
var text = (position || '_') + '/' + length;
|
||||
label.text(text).attr('title', text);
|
||||
but_prev.prop('disabled', !position || position <= 1);
|
||||
but_next.prop('disabled', !position || position >= length);
|
||||
but_prev.prop('disabled', !screen.has_previous());
|
||||
but_next.prop('disabled', !screen.has_next());
|
||||
};
|
||||
screen.windows.push(preview);
|
||||
|
||||
|
||||
@@ -219,8 +219,8 @@ class Form(TabContent):
|
||||
class Preview():
|
||||
def record_message(self, position, length, *args):
|
||||
label.set_text('(%s/%s)' % (position or '_', length))
|
||||
but_prev.set_sensitive(position and position > 1)
|
||||
but_next.set_sensitive(position and position < length)
|
||||
but_prev.set_sensitive(screen.has_prev())
|
||||
but_next.set_sensitive(screen.has_next())
|
||||
screen.windows.append(Preview())
|
||||
|
||||
vbox.pack_start(screen.widget, expand=True, fill=True, padding=0)
|
||||
|
||||
Reference in new issue
Block a user