line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Kwiki::DoubleClickToEdit; |
2
|
1
|
|
|
1
|
|
36340
|
use Kwiki::Plugin -Base; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use mixin 'Kwiki::Installer'; |
4
|
|
|
|
|
|
|
use 5.006001; |
5
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
const class_id => 'double_click_to_edit'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub javascript_file { |
10
|
|
|
|
|
|
|
return $self->preferences->double_click_to_edit->value |
11
|
|
|
|
|
|
|
? 'double_click_to_edit.js' |
12
|
|
|
|
|
|
|
: '' |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub register { |
16
|
|
|
|
|
|
|
my $registry = shift; |
17
|
|
|
|
|
|
|
$registry->add(preload => 'double_click_to_edit'); |
18
|
|
|
|
|
|
|
$registry->add(preference => $self->double_click); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub double_click { |
22
|
|
|
|
|
|
|
my $p = $self->new_preference('double_click_to_edit'); |
23
|
|
|
|
|
|
|
$p->query('Kwiki Double Click To Edit?'); |
24
|
|
|
|
|
|
|
$p->type('boolean'); |
25
|
|
|
|
|
|
|
$p->default('1'); |
26
|
|
|
|
|
|
|
return $p; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__DATA__ |