public/iui/iui.js
File iui.js
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
copyright:
Copyright (c) 2007-12, iUI Project Members.
See LICENSE.txt for licensing terms.
Version 0.4-beta3
Function encodeForm
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function encodeForm(form)
{
function encode(inputs)
{
for (var i = 0; i < inputs.length; ++i)
Function encode
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function encode(inputs)
{
for (var i = 0; i < inputs.length; ++i)
{
log("input[" + i + "]: " + inputs[i].name + " = " + inputs[i].value);
Function showPage
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showPage: function(page, backwards)
{
if (page)
{
// if (window.iui_ext) window.iui_ext.injectEventMethods(page); // TG -- why was this comment left here??
Function showPageByHref
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showPageByHref: function(href, args, method, replace, cb)
{
// I don't think we need onerror, because readstate will still go to 4 in that case
function spbhCB(xhr)
{
Function updatePage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updatePage(page, fromPage)
{
if (!page.id)
page.id = "__" + (++newPageCount) + "__";
Function ajax
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function(url, args, method, cb)
{
var xhr = new XMLHttpRequest();
method = method ? method.toUpperCase() : "GET";
if (args && method == "GET")
Function spbhCB
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function spbhCB(xhr)
{
log("xhr.readyState = " + xhr.readyState);
if (xhr.readyState == 4)
{
Function slide1
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function slide1(fromPage, toPage, backwards, axis, cb)
{
if (axis == "y")
(backwards ? fromPage : toPage).style.top = "100%";
else
Function insertPages
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
insertPages: function(frag)
{
var nodes = frag.childNodes;
var targetPage;
for (var i = 0; i < nodes.length; ++i)
Avoid deeply nested control flow statements. Open
Open
if (form.onsubmit() == true)
{
form.submit();
}
Function showPageByHref
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
showPageByHref: function(href, args, method, replace, cb)
Function showPageByHrefExt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
showPageByHrefExt: function(href, args, method, replace, cb)
Function slide1
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function slide1(fromPage, toPage, backwards, axis, cb)