Hi

When I use the translate command, if I type "translate test to french"
it understands that "to" relates to the modifier and that "french" is
my language. I have created a small search command that search in an
contact list by name and firstname. When I type "search MyName
firstname MyFirstName", ubiquity offers me two possibilities one with
"MyName firstname MyFirstName" as the name to search and the second
one with "MyName" as the name and "MyFirstName" as the firstname. I
would like to have the second one to be proposed by default but I
don't know how to do that

Here is my command

CmdUtils.CreateCommand({
  name: "tstsearch",
  takes: {"name": noun_arb_text},
  modifiers: {"firstname": noun_arb_text},
  preview: function( pblock, name, mods) {
    var firstname= "";
    if (mods["firstname"].text != null && mods
["firstname"].text.length > 0) {
      firstname= " " + mods["firstname"].text;
    }
    var msg = 'Search for ${nameText}${firstNameText}';
    var subs = {nameText: name.text, firstNameText: firstname};
    pblock.innerHTML = CmdUtils.renderTemplate( msg, subs );
  },
  execute: function( name, mods ) {
    var url = "http://search?name="; + name.text;
    if (mods["firstname"].text != null && mods
["firstname"].text.length > 0) {
      url = url + "&firstname=" + mods["firstname"].text
    }
    Utils.openUrlInBrowser(url);
  }
})

Any idea ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to