To participate you must create an account on apostrophenow.com. If you have already done so, click Login.

Changeset 1821

Show
Ignore:
Timestamp:
07/22/2010 03:13:31 PM (7 weeks ago)
Author:
johnnyoffline
Message:

fixed a bug with aMultipleSelect, the javascript was using method that is not available in all browsers. I found a snipet from Mozilla to recreate this functionality for those browsers. It is in aControls.js with a comment and URL to the source - 1.4 and trunk

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.4/web/js/aControls.js

    r1742 r1821  
     1// This adds support for indexOF to browsers that are missing this functionality (IE) 
     2// https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Objects:Array:indexOf#Compatibility 
     3if (!Array.prototype.indexOf) 
     4{ 
     5  Array.prototype.indexOf = function(elt /*, from*/) 
     6  { 
     7    var len = this.length >>> 0; 
     8 
     9    var from = Number(arguments[1]) || 0; 
     10    from = (from < 0) 
     11         ? Math.ceil(from) 
     12         : Math.floor(from); 
     13    if (from < 0) 
     14      from += len; 
     15 
     16    for (; from < len; from++) 
     17    { 
     18      if (from in this && 
     19          this[from] === elt) 
     20        return from; 
     21    } 
     22    return -1; 
     23  }; 
     24} 
     25 
    126// Copyright 2009 P'unk Avenue LLC. Released under the MIT license. 
    227// See http://www.symfony-project.org/plugins/apostrophePlugin and