Ticket #125 (reopened enhancement)

Opened 5 years ago

Last modified 6 months ago

Search & Replace Handler

Reported by: ChrisH Owned by: DotMG
Priority: normal Milestone: 1.4
Component: handlers Version: 1.1.6.2
Severity: normal Keywords: find replace search
Cc:

Description

I'd like see a handler for find/search and replace functions.

This could allow rapid formatting of text with large number of the same word. For example, if I have a page that I would like to go through and italicize all instances of a name, I have to open it in editing mode, then manually change all occurrences. The same would apply if I wanted to link a word that was previously not wikified to a new page I created.

Change History

Changed 4 years ago by DotMG

  • owner changed from unassigned to DotMG
  • version set to 1.1.6.1
  • milestone set to 1.1.7

I'll add this functionnality into WikiEdit.

Changed 4 years ago by DotMG

  • status changed from new to closed
  • resolution set to fixed

Partially Fixed at [63]. To be continued...

Changed 4 years ago by DarTar

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from 1.1.7 to 1.1.6.2

Hi Mahefa,

I hadn't tested this, nice hack!

I've made a couple of changes to this handler in trunk - [105] / [106]:

  • moved the file to the wikiedit top level (why keep it in the images folder?)
  • added phpdoc header
  • slightly changed layout
  • slightly improved i18n strings
  • uploaded new button image (find.gif) for search and replace handler.

Todo: could you please add to wikiedit2.js the code to create a button for the SR handler using this new image? I'm not sure how to do this.

I suggest we keep the development of this feature (as well as any other correction to 1.1.6.2-alpha) in trunk so we can copy later some or all of them to the 1.1.6.2 branch before releasing it.

Changed 4 years ago by DotMG

I kept the file in the images folder because RomanIvanov did like that for the file sel.htc in WikiEdit3. I didn't (and don't) really bother where to put it, because it will be anyway integrated into wikiedit2.js in the future. I'll do the todo. Thanks for the image.

Changed 4 years ago by DarTar

You are welcome. I see in the available files in the image folder that we have also something for colored text. It would be nice to have a button for the new color action in the future. Ah - take also a look at the new version of FormattingRules, I've added examples of how to use fg and bg

Changed 4 years ago by DarTar

Actually since I moved the file up one level in the directory the ctrl+shift+f combination doesn't work any more :-( Maybe I've broken something in the code?

Changed 4 years ago by DarTar

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in [117]

Changed 4 years ago by DarTar

  • status changed from closed to reopened
  • type changed from enhancement to defect
  • version changed from 1.1.6.1 to 1.1.6.2
  • resolution fixed deleted
  • milestone changed from 1.1.6.2 to 1.1.6.3

The S&R handler doesn't work in Safari 2.0.4.

First click: nothing happens Second click: TypeError: undefined value

Changed 4 years ago by DotMG

DarTar, please check r244 and close this ticket if OK!

Changed 4 years ago by DotMG (not logged in)

Search & replace handler now works also on Opera 8+. Changeset [255].

Changed 4 years ago by DarTar

Mahefa,

I've tested the new version under Safari, the basic functionality is there but IMO it's not (yet) very usable.

  • The handlers appears at the bottom of the page and not in an overlay window, is this how it is expected to work?
  • Once a search is triggered, there is no way to stop it: clicking on Cancel just moves the selection to the next occurence, which is quite annoying if your search item occurs several times and you just want to stop the search. Search and replace scripts in general have distinct buttons for Cancel, Find next, Replace and find next, Replace all
  • Once a search is triggered, the search form disappears, and there's no way of modifying the search string after a match. So if I only want to modify a single occurrence of string a and then move on to string b I first have to go through all the other occurrences of string a and reopen the S&R handler.

Changed 4 years ago by DotMG

  • milestone changed from 1.1.7 to 1.1.7.1

.... We will look at it in 2007.

Changed 12 months ago by BrianKoontz

  • milestone changed from 1.2.1 to 1.3

Changed 6 months ago by BrianKoontz

  • type changed from defect to enhancement

Changed 6 months ago by BrianKoontz

  • milestone changed from 1.3 to 1.4
Note: See TracTickets for help on using tickets.