Skip to content

Instantly share code, notes, and snippets.

@cgardner
Created April 15, 2009 16:19
Show Gist options
  • Select an option

  • Save cgardner/95883 to your computer and use it in GitHub Desktop.

Select an option

Save cgardner/95883 to your computer and use it in GitHub Desktop.

Revisions

  1. cgardner revised this gist Apr 15, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion x
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ CmdUtils.CreateCommand(
    takes: {"function": noun_arb_text},
    icon: "http://drupal.org/misc/favicon.ico",
    homepage: "http://craig-gardner.com",
    author: {name: "Craig Gardner", email: "cgardner@goodpacket"},
    author: {name: "Craig Gardner", email: "craig.s.gardner@gmail.com"},
    license: "MPL,GPL",
    description: "Quickly access Drpual modules",
    help: "Enter the name of a Drupal module",
  2. cgardner revised this gist Apr 15, 2009. 1 changed file with 28 additions and 28 deletions.
    56 changes: 28 additions & 28 deletions x
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,29 @@
    CmdUtils.CreateCommand(
    {
    name: "drupal-module",
    takes: {"function": noun_arb_text},
    icon: "http://drupal.org/misc/favicon.ico",
    homepage: "http://craig-gardner.com",
    author: {name: "Craig Gardner", email: "cgardner@goodpacket"},
    license: "MPL,GPL",
    description: "Quickly access Drpual modules",
    help: "Enter the name of a Drupal module",
    execute: function(directObject)
    {
    var url = "http://drupal.org/project/{QUERY}"
    var urlString = url.replace("{QUERY}", directObject.text);
    Utils.openUrlInBrowser(urlString);
    },
    preview: function(pblock, directObject)
    {
    searchText = jQuery.trim(directObject.text);
    if(searchText.length <= 0)
    {
    pblock.innerHTML = "Find a Drupal Project";
    return;
    }
    var previewTemplate = "Load the ${query} Drupal module";
    var previewData = {query: searchText};
    pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
    }
    });
    {
    name: "drupal-module",
    takes: {"function": noun_arb_text},
    icon: "http://drupal.org/misc/favicon.ico",
    homepage: "http://craig-gardner.com",
    author: {name: "Craig Gardner", email: "cgardner@goodpacket"},
    license: "MPL,GPL",
    description: "Quickly access Drpual modules",
    help: "Enter the name of a Drupal module",
    execute: function(directObject)
    {
    var url = "http://drupal.org/project/{QUERY}"
    var urlString = url.replace("{QUERY}", directObject.text);
    Utils.openUrlInBrowser(urlString);
    },
    preview: function(pblock, directObject)
    {
    searchText = jQuery.trim(directObject.text);
    if(searchText.length <= 0)
    {
    pblock.innerHTML = "Find a Drupal Project";
    return;
    }
    var previewTemplate = "Load the ${query} Drupal module";
    var previewData = {query: searchText};
    pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
    }
    });
  3. @invalid-email-address Anonymous created this gist Apr 15, 2009.
    29 changes: 29 additions & 0 deletions x
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    CmdUtils.CreateCommand(
    {
    name: "drupal-module",
    takes: {"function": noun_arb_text},
    icon: "http://drupal.org/misc/favicon.ico",
    homepage: "http://craig-gardner.com",
    author: {name: "Craig Gardner", email: "cgardner@goodpacket"},
    license: "MPL,GPL",
    description: "Quickly access Drpual modules",
    help: "Enter the name of a Drupal module",
    execute: function(directObject)
    {
    var url = "http://drupal.org/project/{QUERY}"
    var urlString = url.replace("{QUERY}", directObject.text);
    Utils.openUrlInBrowser(urlString);
    },
    preview: function(pblock, directObject)
    {
    searchText = jQuery.trim(directObject.text);
    if(searchText.length <= 0)
    {
    pblock.innerHTML = "Find a Drupal Project";
    return;
    }
    var previewTemplate = "Load the ${query} Drupal module";
    var previewData = {query: searchText};
    pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
    }
    });