≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1288

Bug #1288: AJAX product pop-up always set to "no product" (blank) in issues#show

Kind bug
Product wincent.dev
When 2009-04-27T05:07:42Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

none

Comments

  1. Greg Hurrell 2009-04-27T05:07:47Z

    Status changed:

    • From: New
    • To: Open
  2. Greg Hurrell 2009-04-27T05:11:52Z

    The pop-up is not broken for all products. Some examples:

    • wincent.dev: this ticket, ticket #1288, works
    • Synergy: eg. ticket #59, broken
    • Synergy Advance: eg. ticket #61, broken
    • WinSwitch: eg. ticket #85, broken
    • WOCommon: eg. ticket #494, broken
    • Wincent Strings Utility: eg. ticket #1104, broken

    Basically looks like all are broken except for the wincent.dev tickets.

  3. Greg Hurrell 2009-04-27T05:17:03Z

    Broken

    • Hextrapolate: eg. ticket #1275, broken
    • Install: eg. ticket #235, broken
    • WODebug: eg. ticket #448, broken
    • REnamer: eg. ticket #1126, broken

    Working

    • atosym: eg. ticket #1273, works
    • buildtools: (no example available), appears to work
    • wikitext: eg. ticket #1251, works

    Unknown

    There are a few products for which there aren't any tickets, so I don't know if they work:

    • WOHotKey
    • Walrus
    • etc...
  4. Greg Hurrell 2009-04-27T05:19:19Z

    As a first guess I'd say we have a case-sensitivity issue here.

  5. Greg Hurrell 2009-04-27T05:44:21Z

    Ok, as the fix was pretty minor (see below), I've just uploaded a new ajax.js file rather than doing a full deployment:

    diff --git a/public/javascripts/ajax.js b/public/javascripts/ajax.js
    index e1dee88..3c98f23 100644
    --- a/public/javascripts/ajax.js
    +++ b/public/javascripts/ajax.js
    @@ -133,14 +133,14 @@ function ajax_select(selector, class_name, attribute_name, options, include_blan
       var model_id = $(selector).attr('id'); // issue_22
       var record_id = model_id.match(/_(\d+)$/)[1]; // 22
       var field_id = $('#' + model_id + '_' + attribute_name); // issue_22_status
    -  var field_text = field_id.text(); // eg. New, Open, Closed (first letter capitalized by humanize method)
    +  var field_text = field_id.text(); // eg. New, Open, Closed
       var new_contents = '<select id="' + class_name + '_' + attribute_name + '" name="' + class_name + '[' + attribute_name + ']">';
       if (include_blank) {
         new_contents = new_contents + '<option value=""></option>';
       }
       var selection_found = false;
       for (var i = 0; i < options.length; i++) {
    -    if (field_text.toLowerCase() == options[i][0]) {
    +    if (field_text.toLowerCase() == options[i][0].toLowerCase()) {
           new_contents = new_contents + '<option value="' + options[i][1] + '" selected="selected">' + options[i][0] + '</option>';
           selection_found = true;
         } else {
  6. Greg Hurrell 2009-04-27T05:44:35Z

    Status changed:

    • From: Open
    • To: Closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets