word: change directory name of 3:2 thumbnails
[sheet.git] / word / edit.plp
index 5957b1a9b6a9541bb75b4a162d9190d3a5bf0c60..426fb5c281e577f9fbe9d0a458f345df9f341d7c 100644 (file)
@@ -90,7 +90,9 @@ my %wordcol = (
        prio    => [
                {-label => 'Level', -select => sub {
                        my ($row) = @_;
-                       my @enum = qw[ essential basic common distinctive optional invisible ];
+                       my @enum = qw[
+                               essential ubiquitous basic common distinctive specialised rare invisible
+                       ];
                        return {
                                ('' => 'parent') x (defined $row->{ref}),
                                map { $_ => $enum[$_] } 0 .. $#enum
@@ -107,7 +109,7 @@ my %wordcol = (
                return "data/word/org/$_[0]->{id}.jpg";
        }},
        convert => {-label => 'Convert options', -json => 'image', -multiple => 1, -src => sub {
-               return "data/word/en/$_[0]->{id}.jpg";
+               return "data/word/32/$_[0]->{id}.jpg";
        }},
        story   => {-label => 'Story', type => 'textarea', hidden => 'hidden'},
 );
@@ -216,7 +218,7 @@ elsif (defined $post{form}) {{
        $reimage++ if $fields{rethumb};  # force refresh
        if ($reimage) {
                eval {
-                       $image->convert($wordcol{convert}->{-src}->($row), $imagecol->{convert});
+                       $image->generate($wordcol{convert}->{-src}->($row), $imagecol->{convert});
                } or do {
                        my ($warn, @details) = ref $@ ? @{$@} : $@;
                        Alert([ "Thumbnail image not generated", $warn ], @details);
@@ -226,7 +228,7 @@ elsif (defined $post{form}) {{
 else {
        $row->{lang} //= $user->{editlang}->[0] unless exists $row->{lang};
        $row->{$_} = $get{$_} for keys %get;
-       $row->{prio} = defined $row->{ref} ? undef : 1 unless exists $row->{prio};
+       $row->{prio} = defined $row->{ref} ? undef : 4 unless exists $row->{prio};
 }
 
 eval {