[pLog-svn] r5227 - plog/branches/lifetype-1.2/js/ui
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri Mar 30 06:32:28 EDT 2007
Author: mark
Date: 2007-03-30 06:32:27 -0400 (Fri, 30 Mar 2007)
New Revision: 5227
Modified:
plog/branches/lifetype-1.2/js/ui/default.js
Log:
Remove the inArray method from javascript object. It will break our LifeType editor. So, I change the inArray to a function only.
Modified: plog/branches/lifetype-1.2/js/ui/default.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/default.js 2007-03-30 05:44:07 UTC (rev 5226)
+++ plog/branches/lifetype-1.2/js/ui/default.js 2007-03-30 10:32:27 UTC (rev 5227)
@@ -114,7 +114,7 @@
{
if (e.type == "checkbox")
{
- if( permissionSets[permissionSet].inArray(e.value) )
+ if( inArray(permissionSets[permissionSet], e.value) )
e.checked = 1;
else
e.checked = 0;
@@ -125,17 +125,17 @@
// Returns true if the passed value is found in the
// array. Returns false if it is not.
-Array.prototype.inArray = function (value, caseSensitive)
+function inArray(a, v, c)
{
var i;
- for (i=0; i < this.length; i++) {
+ for (i=0; i < a.length; i++) {
// use === to check for Matches. ie., identical (===),
- if(caseSensitive){ //performs match even the string is case sensitive
- if (this[i].toLowerCase() == value.toLowerCase()) {
+ if(c){ //performs match even the string is case sensitive
+ if (a[i].toLowerCase() == v.toLowerCase()) {
return true;
}
}else{
- if (this[i] == value) {
+ if (a[i] == v) {
return true;
}
}
More information about the pLog-svn
mailing list