• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4649: Update url is not correct with Explorer

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension ActionTrackerPlugin Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

-- TWiki:Main/JoaquinBuendia - 17 Sep 2007

With Firefox (and possibly with others) direct updates works very well (AJAX), but with Explorer the url is not constructed well, because explorer left empty the value option field (don't get value from option text like Firefox).

URL from Firefox:

/twiki/bin/rest/ActionTrackerPlugin/update?topic=Main.WebHome;uid=000014;field=state;value=closed

URL with Explorer:

/twiki/bin/rest/ActionTrackerPlugin/update?topic=Main.WebHome;uid=000014;field=state;value=

Because of this, updates don't working with Explorer.

Solution:

Add value to option in the select in twiki/lib/TWiki/Plugins/ActionTrackerPlugin/Action.pm:

         [...]
        $attrs{selected} = 'selected' if ($option eq $this->{state});
        $attrs{value} = $option;  # <---- ADD THIS
        $input .= CGI::option(\%attrs, $option);
         [...]

Action.pm:

sub _formatField_state {
    my ( $this, $args, $asHTML ) = @_;
    return $this->{state} unless $asHTML;
    return $this->{state} unless $this->{uid};
    # SMELL: assumes a prior call has loaded the options
    require TWiki::Plugins::ActionTrackerPlugin::Options;
    return $this->{state} unless
      $TWiki::Plugins::ActionTrackerPlugin::Options::options{ENABLESTATESHORTCUT};

    my $input = '';
    foreach my $option (@{$types{state}->{values}}) {
        my %attrs;
        $attrs{selected} = 'selected' if ($option eq $this->{state});
        $attrs{value} = $option;
        $input .= CGI::option(\%attrs, $option);
    }
    return CGI::Select(
        {
            onChange => 'atp_update(this, "%SCRIPTURLPATH{rest}%/ActionTrackerPlugin/update?topic='.
              $this->{web}.'.'.$this->{topic}.
                ';uid='.$this->{uid}.'", "state")',
            class => 'atpState'.$this->{state},
        },
        $input);
}

With this modification, the plugin works very well.

Regards.

Joaquin.


Many thanks, Joaquin, and sorry for taking so long to get to it. Fixed in the next release of the plugin.

-- CrawfordCurrie - 13 Apr 2008

ItemTemplate
Summary Update url is not correct with Explorer
ReportedBy TWiki:Main.JoaquinBuendia
Codebase 4.1.2
SVN Range TWiki-4.2.0, Sat, 15 Sep 2007, build 14883
AppliesTo Extension
Component ActionTrackerPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:16654
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-04-13 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback