--- trunk/web/iwf/iwfcore.js 2005/11/14 16:16:57 54 +++ trunk/web/iwf/iwfcore.js 2005/11/15 14:29:45 55 @@ -1,48 +1,64 @@ -// ----------------------------------------------------------------------------- -// IWF - Interactive Website Framework. Javascript library for creating -// responsive thin client interfaces. +// ========================================================================= +/// IWF - Interactive Website Framework. Javascript library for creating +/// responsive thin client interfaces. +/// +/// Copyright (C) 2005 Brock Weaver brockweaver@users.sourceforge.net +/// +/// This library is free software; you can redistribute it and/or modify +/// it under the terms of the GNU Lesser General Public License as published +/// by the Free Software Foundation; either version 2.1 of the License, or +/// (at your option) any later version. +/// +/// This library is distributed in the hope that it will be useful, but +/// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +/// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +/// License for more details. +/// +/// You should have received a copy of the GNU Lesser General Public License +/// along with this library; if not, write to the Free Software Foundation, +/// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/// +/// Brock Weaver +/// brockweaver@users.sourceforge.net +/// 1605 NW Maple Pl +/// Ankeny, IA 50021 +/// +//! http://iwf.sourceforge.net/ +// ========================================================================= +//! NOTE: To minimize file size, strip all fluffy comments (except the LGPL, of course!) +//! using the following regex (global flag and multiline on): +//! ^\t*//([^/!].*|$) // -// Copyright (C) 2005 Brock Weaver brockweaver@gmail.com +// This reduces file size by about 30%, give or take. // -// This library is free software; you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published -// by the Free Software Foundation; either version 2.1 of the License, or -// (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -// License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, -// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Brock Weaver -// brockweaver@gmail.com -// 1605 NW Maple Pl -// Ankeny, IA 50021 -// ----------------------------------------------------------------------------- +//! To rip out only logging statements (commented or uncommented): +//! ^/{0,2}iwfLog.* +// ========================================================================= // -------------------------------------------------------------------------- -// iwfcore.js +//! iwfcore.js // // Core functions // -// Dependencies: -// (none) +//! Dependencies: +//! (none) // -// Brock Weaver - brockweaver@sourceforge.net - iwf.sourceforge.net -// v 0.1 - 2005-06-05 -// Initial release. -// -------------------------------------------------------------------------- +//! Brock Weaver - brockweaver@users.sourceforge.net +//! v 0.2 - 2005-11-14 +//! iwfcore bug patch +//! -------------------------------------------------------------------------- +//! - fixed iwfAttribute to return most current value instead of initial value +//! +//! v 0.1 - 2005-06-05 +//! Initial release. +//! -------------------------------------------------------------------------- // ----------------------------------- // Begin: Configurable variables // ----------------------------------- // set to true to enable logging. Logging simply means certain values are appended to a string. nothing is written out or communicated over the wire anywhere. -var iwfLoggingEnabled = true; +var _iwfLoggingEnabled = true; // ----------------------------------- @@ -80,7 +96,7 @@ return frm; } -function iwfGetByIdWithinForm(form, id){ +function iwfGetByNameWithinForm(form, nm){ var frm = iwfGetForm(form); if (!frm){ iwfLog("IWF Core Error: Could not locate form by id, document.forms, or document[] named '" + form + "'", true); @@ -88,9 +104,9 @@ } else { // find element within this form with given id. var el = null; - if (iwfIsString(id) || iwfIsNumber(id)) { + if (iwfIsString(nm) || iwfIsNumber(nm)) { for(var i=0;i