diff --git a/Dept_Perms_class.php b/Dept_Perms_class.php index 7400a4d4..c440931a 100644 --- a/Dept_Perms_class.php +++ b/Dept_Perms_class.php @@ -2,7 +2,7 @@ /* Dept_Perms_class.php - Dept_Perms is designed to handle permission settings of each department. Copyright (C) 2002-2004 Stephen Lawrence, Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 @@ -79,9 +79,18 @@ function loadData_UserPerm($right) { //$s1 = getmicrotime(); $fileid_array = array(); - $query = "SELECT {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS.fid FROM {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA, {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS - WHERE {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS.rights >= $right AND {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS.dept_id=$this->id - AND {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA.id={$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS.fid AND {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA.publishable=1"; + $query = "SELECT deptperms.fid + FROM + {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA as data, + {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DEPT_PERMS as deptperms + WHERE + deptperms.rights >= $right + AND + deptperms.dept_id=$this->id + AND + data.id=deptperms.fid + AND + data.publishable=1"; $result = mysql_query($query, $this->connection) or die("Error in querying: $query" .mysql_error()); //$fileid_array[$index][0] ==> fid //$fileid_array[$index][1] ==> owner diff --git a/FileData_class.php b/FileData_class.php index 2849429c..ab99ae50 100644 --- a/FileData_class.php +++ b/FileData_class.php @@ -55,7 +55,7 @@ class FileData extends databaseData var $write_users; var $admin_users; var $filesize; - var $isLocked; + var $isLocked; function FileData($id, $connection, $database) { diff --git a/FileTypes_class.php b/FileTypes_class.php new file mode 100644 index 00000000..529e2b55 --- /dev/null +++ b/FileTypes_class.php @@ -0,0 +1,129 @@ +$value) + { + //print_r($data['types']);exit; + $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}filetypes SET active='1' WHERE id='$value'"; + //echo $query;exit; + $result = mysql_query($query) or die ('Failed to save filetypes: ' . mysql_error()); + } + return TRUE; + } + + /* + * Load active file types to an array + * return array + */ + function load() + { + $GLOBALS['CONFIG']['allowedFileTypes'] = array(); + $sql = "SELECT type FROM {$GLOBALS['CONFIG']['db_prefix']}filetypes WHERE active='1'"; + $result = mysql_query($sql) or die ('Getting filetypes failed: ' . mysql_error()); + while(list($value) = mysql_fetch_row($result)) + { + array_push($GLOBALS['CONFIG']['allowedFileTypes'], $value); + } + + } + + /* + * Show the file types edit form + */ + function edit() + { + $filetypes_arr = array(); + $query = "SELECT * FROM {$GLOBALS['CONFIG']['db_prefix']}filetypes"; + $result = mysql_query($query) or die('Failed to edit filetypes: ' . mysql_error()); + while($row = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $filetypes_arr[] = $row; + } + + $GLOBALS['smarty']->assign('filetypes_array',$filetypes_arr); + display_smarty_template('filetypes.tpl'); + } + + /* + * Show the form in order to Delete a filetype + */ + function deleteSelect() + { + $filetypes_arr = array(); + $query = "SELECT * FROM {$GLOBALS['CONFIG']['db_prefix']}filetypes"; + $result = mysql_query($query) or die('Failed to select filetypes list: ' . mysql_error()); + while($row = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $filetypes_arr[] = $row; + } + + $GLOBALS['smarty']->assign('filetypes_array',$filetypes_arr); + display_smarty_template('filetypes_deleteshow.tpl'); + } + + function delete($data) + { + foreach($data['types'] as $id) + { + $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}filetypes WHERE id={$id}"; + $result = mysql_query($query) or die('Failed to delete filetype: ' . mysql_error()); + } + return TRUE; + } + } +} diff --git a/Settings_class.php b/Settings_class.php new file mode 100644 index 00000000..4d4b8f3d --- /dev/null +++ b/Settings_class.php @@ -0,0 +1,150 @@ +$value) + { + $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}settings SET value='$value' WHERE name='$key'"; + //echo $query . "
"; + $result = mysql_query($query) or die ('Failed to save settings: ' . mysql_error()); + } + return TRUE; + } + /* + * Load settings to an array + * return array + */ + function load() + { + $sql = "SELECT name,value FROM {$GLOBALS['CONFIG']['db_prefix']}settings"; + $result = mysql_query($sql) or die ('Getting settings failed: ' . mysql_error()); + while(list($key, $value) = mysql_fetch_row($result)) + { + $GLOBALS['CONFIG'][$key] = $value; + } + + } + + /* + * Show the settings edit form + */ + function edit() + { + $settings_arr = array(); + $query = "SELECT * FROM {$GLOBALS['CONFIG']['db_prefix']}settings"; + $result = mysql_query($query) or die('Failed to edit settings: ' . mysql_error()); + while($row = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $settings_arr[] = $row; + } + + $GLOBALS['smarty']->assign('themes', $this->getThemes()); + $GLOBALS['smarty']->assign('languages', $this->getLanguages()); + $GLOBALS['smarty']->assign('usernames', $this->getUserNames()); + $GLOBALS['smarty']->assign('settings_array',$settings_arr); + display_smarty_template('settings.tpl'); + } + /* + * Validate a specific setting based on its validation type + * @param string $key The name of the setting to be tested + * @param string $value The value of the setting to be tested + */ + function validate($data,$value) + { + // NOT IMPLEMENTED + } + /* + * This function will return an array of the possible theme names found in the /templates folder + * for use in the settings form + */ + function getThemes() + { + $themes = $this->getFolders( ABSPATH . 'templates'); + return $themes; + } + + function getLanguages() + { + $languages = $this->getFolders( ABSPATH . 'includes/language'); + return str_replace('.php','',$languages); + } + + function getFolders($path = '.') + { + $file_list=array(); + if ($handle = opendir($path)) + { + while (false !== ($file = readdir($handle))) + { + if ($file != "." && $file != ".." && $file != ".svn" && $file != 'README' && $file != 'sync.sh') + { + array_push($file_list, $file); + } + } + closedir($handle); + } + return $file_list; + } + + /* + * Return an array of user names + */ + function getUserNames() + { + $query = "SELECT username from {$GLOBALS['CONFIG']['db_prefix']}user"; + $result = mysql_query($query) or die('Failed to read user names for settings: ' . mysql_error()); + $usernames_arr = array(); + while($row = mysql_fetch_array($result)) + { + array_push($usernames_arr,$row); + } + return $usernames_arr; + } + + } +} diff --git a/UserPermission_class.php b/UserPermission_class.php index 85c8a835..7461e45b 100644 --- a/UserPermission_class.php +++ b/UserPermission_class.php @@ -2,7 +2,7 @@ /* UserPermission_class.php - relates users to files Copyright (C) 2002-2004 Stephen Lawrence Jr., Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 @@ -55,21 +55,11 @@ function UserPermission($uid, $connection, $database) // return an array of all the Allowed files ( right >= view_right) ID function getAllowedFileIds() { - $start_time = time(); $viewable_array = $this->getViewableFileIds(); - echo '
Load Viewable Time: ' . (time() - $start_time) . ' '; - $start_time = time(); $readable_array = $this->getReadableFileIds(); - echo '
Load Readable Time: ' . (time() - $start_time) . ' '; - $start_time = time(); $writeable_array = $this->getWriteableFileIds(); - echo '
Load Writable Time: ' . (time() - $start_time) . ' '; - $start_time = time(); $adminable_array = $this->getAdminableFileIds(); - echo '
Load Admin Time: ' . (time() - $start_time) . ' '; - $start_time = time(); $result_array = array_values( array_unique( array_merge($viewable_array, $readable_array, $writeable_array, $adminable_array) ) ); - echo '
3 combines Time: ' . (time() - $start_time) . '
'; return $result_array; } // return an array of all the Allowed files ( right >= view_right) object @@ -217,7 +207,7 @@ function combineArrays($high_priority_array, $low_priority_array) // by combining and prioritizing user and deparment right function getAuthority($data_id) { - $file_obj = new FileData($data_id, $GLOBALS['connection'], $GLOBALS['database']); + $file_obj = new FileData($data_id, $GLOBALS['connection'], DB_NAME); if($this->user_obj->isAdmin() || $this->user_obj->isReviewerForFile($this->field_id)) { return $this->ADMIN_RIGHT; diff --git a/User_Perms_class.php b/User_Perms_class.php index 98611451..447ba444 100644 --- a/User_Perms_class.php +++ b/User_Perms_class.php @@ -2,7 +2,7 @@ /* User_Perms_class.php - relates users to specific files Copyright (C) 2002-2004 Stephen Lawrence Jr., Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen J. Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -80,15 +80,18 @@ function getId() { return $this->id; } - // All of the function above provides an abstraction for loadData_UserPerm($right) - // If you user doesn't want to or doens't know the numeric value for permission, - // use the function above. LoadData_UserPerm($right) can be invoke directly. + + /* + * All of the functions above provide an abstraction for loadData_UserPerm($right). + * If your user doesn't want to or does not know the numeric value for permission, + * use the function above. LoadData_UserPerm($right) can be invoke directly. + * @param integer $right The "Right" that is bein checked. + */ function loadData_UserPerm($right) { if($this->user_obj->isAdmin()) { - $query = "SELECT - d.id + $query = "SELECT d.id FROM {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA as d WHERE @@ -108,22 +111,22 @@ function loadData_UserPerm($right) AND dr.user_id = $this->id"; } - else + else { - ////Select fid, owner_id, owner_name of the file that user-->$id has rights >= $right - $query = "SELECT userperms.fid + //Select fid, owner_id, owner_name of the file that user-->$id has rights >= $right + $query = "SELECT up.fid FROM - {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA as data, - {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_USER_PERMS as userperms + {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA as d, + {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_USER_PERMS as up WHERE ( - userperms.uid = $this->id - AND - data.id = userperms.fid - AND - userperms.rights>=$right - AND - data.publishable = 1 - )"; + up.uid = $this->id + AND + d.id = up.fid + AND + up.rights>=$right + AND + d.publishable = 1 + )"; } //$start = getmicrotime(); $result = mysql_query($query, $this->connection) or die("Error in querying: $query" .mysql_error()); @@ -223,11 +226,18 @@ function isForbidden($data_id) } } } - // this all the canRead, canView, ... function provide an abstraction for this fucntion. - // users may invoke this function if they are familiar of the numeric permision values + + /* + * This function is used by all the canRead, canView, etc... abstract functions. + * Users may invoke this function directly if they are familiar of the numeric permision values. + * If they are an "Admin" or "Reviewer" for this file return true right away + * @param integer $data_id The ID number of the file in question + * @param integer $right The number of the "right" ID that is being checked + * @return true They CAN perform the right + */ function canUser($data_id, $right) { - if($this->user_obj->isAdmin()) + if($this->user_obj->isAdmin() || $this->user_obj->isReviewerForFile($data_id)) { return true; } diff --git a/User_class.php b/User_class.php index fd03e56f..39783e3a 100644 --- a/User_class.php +++ b/User_class.php @@ -2,7 +2,7 @@ /* User_class.php - Container for user related info Copyright (C) 2002-2004 Stephen Lawrence Jr., Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -180,7 +180,12 @@ function changeName($new_name) $result = mysql_query($query, $this->connection) or die("Error in querying: $query" . mysql_error() ); return true; } - + + /* + * Determine if the current user is a reviewer or not + * @return boolean + * + */ function isReviewer() { $query = "SELECT * FROM {$GLOBALS['CONFIG']['db_prefix']}dept_reviewer where user_id = " . $this->id; @@ -232,6 +237,7 @@ function isReviewerForFile($file_id) return true; } } + function getAllRevieweeIds() // this functions assume that you are a root thus allowing you to by pass everything { @@ -269,6 +275,7 @@ function getRevieweeIds() } } $query = $query . " and {$GLOBALS['CONFIG']['db_prefix']}data.publishable = 0"; + mysql_free_result($result); $result = mysql_query($query, $this->connection) or die("Error in query: $query" . mysql_error()); $file_data = array(); @@ -281,6 +288,7 @@ function getRevieweeIds() return $file_data; } } + function getAllRejectedFileIds() { $query = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}$this->TABLE_DATA WHERE publishable = '-1'"; @@ -294,6 +302,7 @@ function getAllRejectedFileIds() } return $file_data; } + function getRejectedFileIds() { $query = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE publishable = '-1' and owner = ".$this->id; @@ -307,6 +316,7 @@ function getRejectedFileIds() } return $file_data; } + function getExpiredFileIds() { $lquery = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE status=-1 AND owner = '$this->id'"; @@ -320,12 +330,14 @@ function getExpiredFileIds() } return $file_data; } + function getNumExpiredFiles() { $lquery = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE status=-1 AND owner = '$this->id'"; $lresult = mysql_query($lquery) or die(mysql_error()); return mysql_num_rows($lresult); } + function getEmailAddress() { $query = "SELECT Email FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE id=".$this->id; @@ -368,5 +380,24 @@ function getFullName() mysql_free_result($result); return $full_name; } + + //Return list of checked out files to root + function getCheckedOutFiles() + { + if ($this->isRoot()) + { + $query = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE status>0"; + $result = mysql_query($query) or die("Error trying to create checked out files list: $lquery" . mysql_error()); + $llen = mysql_num_rows($result); + $file_data = array(); + for ($index = 0; $index < $llen; $index++) + { + list($fid) = mysql_fetch_row($result); + $file_data[$index] = $fid; + } + return $file_data; + } + } + } } \ No newline at end of file diff --git a/add.php b/add.php index 49599a05..d9f9a52c 100644 --- a/add.php +++ b/add.php @@ -2,7 +2,7 @@ /* add.php - adds files to the repository Copyright (C) 2007 Stephen Lawrence Jr., Jon Miner -Copyright (C) 2002-2010 Stephen Lawrence Jr. +Copyright (C) 2002-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -32,7 +32,7 @@ header('Location:index.php?redirection=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); exit; } -include('config.php'); +include('odm-load.php'); include('udf_functions.php'); //un_submitted form if(!isset($_POST['submit'])) @@ -369,7 +369,7 @@ function issetFlag() // change this to 100 if you want to add 100 of the same files automatically. For debuging purpose only for($khoa = 0; $khoa<1; $khoa++) { - if ($GLOBALS['CONFIG']['authorization'] == 'On') + if ($GLOBALS['CONFIG']['authorization'] == 'True') { $lpublishable = '0'; } @@ -388,6 +388,12 @@ function issetFlag() } list($current_user_dept) = mysql_fetch_row($result); + // File is bigger than what php.ini post/upload/memory limits allow. + if($_FILES['file'] ['error'] == '1') + { + header('Location:error.php?ec=26'); + exit; + } //can't upload empty file if ($_FILES['file']['size'] <= 0 ) { @@ -403,7 +409,7 @@ function issetFlag() } // check file type - foreach($GLOBALS['allowedFileTypes'] as $thistype) + foreach($GLOBALS['CONFIG']['allowedFileTypes'] as $thistype) { if ($_FILES['file']['type'] == $thistype) { @@ -476,7 +482,7 @@ function issetFlag() // Search for simular names in the two array (merge the array. repetitions are deleted) // In case of repetitions, higher priority ones stay. // Priority is in this order (admin, modify, read, view) - $filedata = new FileData($fileId, $GLOBALS['connection'], $GLOBALS['database']); + $filedata = new FileData($fileId, $GLOBALS['connection'], DB_NAME); if (isset ($_REQUEST['admin'])) { diff --git a/admin.php b/admin.php index 40c927ab..c22b2e8b 100644 --- a/admin.php +++ b/admin.php @@ -2,7 +2,7 @@ /* admin.php - provides admin interface Copyright (C) 2007 Stephen Lawrence Jr., Jon Miner -Copyright (C) 2002-2010 Stephen Lawrence Jr. +Copyright (C) 2002-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ // admin.php - administration functions for admin users // check for valid session // includes -include('config.php'); +include('odm-load.php'); include('udf_functions.php'); if (!isset($_SESSION['uid'])) { @@ -32,7 +32,7 @@ } // open a connection to the database -$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); +$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); $secureurl = new phpsecureurl; // Check to see if user is admin if(!$user_obj->isAdmin()) @@ -43,15 +43,18 @@ draw_header(msg('label_admin')); draw_menu($_SESSION['uid']); @draw_status_bar(msg('label_admin'),$_REQUEST['last_message']); +if(isset($_REQUEST['last_message'])) +{ + echo '

' . $_REQUEST['last_message']. '

'; +} ?>
- isRoot()) echo ''; ?> + isRoot()) echo ''; ?> isRoot()) + if($user_obj->isAdmin()) udf_admin_header(); ?> - +
' . msg('file') . '' . msg('file') . '
@@ -87,9 +90,8 @@
- - @@ -105,15 +107,11 @@ +
- - -isRoot() ) -{ - ?> +isRoot() ) { ?> - + @@ -132,13 +130,27 @@
- - + + + + + + + + + + + + + + + +
+ + + + getPluginsList())) diff --git a/category.php b/category.php index 7d18a252..0b379bf8 100644 --- a/category.php +++ b/category.php @@ -1,7 +1,7 @@ isAdmin()) { @@ -60,12 +60,16 @@ -
+
+ +
-
+
+ +
@@ -153,9 +157,10 @@ +
- - + +
diff --git a/check-in.php b/check-in.php index 0c5d0344..8ebc49a1 100644 --- a/check-in.php +++ b/check-in.php @@ -1,7 +1,7 @@ getError() == '' and $fileobj->getStatus() == $_SESSION['uid']) { //look to see how many revision are there @@ -239,7 +239,7 @@ function check(select, send_dept, send_all) //Send email $date = date('D F d Y'); $time = date('h:i A'); - $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); + $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); $get_full_name = $user_obj->getFullName(); $full_name = $get_full_name[0].' '.$get_full_name[1]; $mail_from= $full_name.' <'.$user_obj->getEmailAddress().'>'; diff --git a/check-out.php b/check-out.php index b691e059..7de8dfab 100644 --- a/check-out.php +++ b/check-out.php @@ -2,7 +2,7 @@ /* check-out.php - performs checkout and updates database Copyright (C) 2002-2004 Stephen Lawrence, Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence +Copyright (C) 2005-2011 Stephen Lawrence This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ header('Location:index.php?redirection=' . urlencode( $_SERVER['REQUEST_URI']) ); exit; } -include('config.php'); +include('odm-load.php'); if(strchr($_REQUEST['id'], '_') ) { header('Location:error.php?ec=20'); @@ -40,7 +40,7 @@ will be the same as the person with admin or modify right except that the DB will not have any recored of him checking out this file. Therefore, he will not be able to check-in the file on the server */ -$fileobj = new FileData($_GET['id'], $GLOBALS['connection'], $GLOBALS['database']); +$fileobj = new FileData($_GET['id'], $GLOBALS['connection'], DB_NAME); $fileobj->setId($_GET['id']); if ($fileobj->getError() != NULL || $fileobj->getStatus() > 0 || $fileobj->isArchived()) { diff --git a/check_exp.php b/check_exp.php index d871af62..6f0cb73b 100644 --- a/check_exp.php +++ b/check_exp.php @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -include('config.php'); +include('odm-load.php'); $start_time = time(); session_start(); @@ -89,7 +89,7 @@ //get root's id $lresult = mysql_query($lquery) or die('Error querying: ' . $lquery . mysql_error()); $reviewer_comments = 'To=' . msg('author') . ';Subject=' . msg('message_file_expired') . ';Comments=' . msg('email_file_was_rejected_because'). ' ' . $GLOBALS['CONFIG']['revision_expiration'] . ' ' .msg('days') . ';'; - $user_obj = new user($lroot_id, $GLOBALS['connection'], $GLOBALS['database']); + $user_obj = new user($lroot_id, $GLOBALS['connection'], DB_NAME); $date = date("D F d Y"); $time = date("h:i A"); $get_full_name = $user_obj->getFullName(); @@ -103,8 +103,8 @@ for($i = 0; $igetOwner(), $GLOBALS['connection'], $GLOBALS['database']); + $file_obj = new FileData($lid, $GLOBALS['connection'], DB_NAME); + $user_obj = new User($file_obj->getOwner(), $GLOBALS['connection'], DB_NAME); $mail_to = $user_obj->getEmailAddress(); mail($mail_to, $mail_subject. $file_obj->getName(), ($mail_greeting.$file_obj->getName().' '.$mail_body.$mail_salute), $mail_headers); } @@ -117,7 +117,7 @@ for($i = 0; $iPublishable(-1); $file_obj->setReviewerComments($reviewer_comments); } @@ -129,7 +129,7 @@ for($i = 0; $isetStatus(-1); } } diff --git a/commitchange.php b/commitchange.php index d52e0f07..fc046647 100644 --- a/commitchange.php +++ b/commitchange.php @@ -3,7 +3,7 @@ commitchange.php - provides database commits for various admin tasks Copyright (C) 2002-2006 Stephen Lawrence Copyright (C) 2007 Stephen Lawrence Jr., Jon Miner -Copyright (C) 2008-2010 Stephen Lawrence Jr. +Copyright (C) 2008-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -27,11 +27,11 @@ header('Location:index.php?redirection=' . urlencode( $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] ) ); exit; } -include('config.php'); +include('odm-load.php'); include('udf_functions.php'); $secureurl = new phpsecureurl; -$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); +$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); // Code added by Chad Blomquist // Check to make sure they should be here. @@ -93,8 +93,8 @@ } // mail user telling him/her that his/her account has been created. - $user_obj = new user($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); - $new_user_obj = new User($userid, $GLOBALS['connection'], $GLOBALS['database']); + $user_obj = new user($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); + $new_user_obj = new User($userid, $GLOBALS['connection'], DB_NAME); $date = date('D F d Y'); $time = date('h:i A'); $get_full_name = $user_obj->getFullName(); @@ -142,15 +142,16 @@ { $_POST['caller'] = 'admin.php'; } - if (!$user_obj->isAdmin()) + + // UPDATE admin info + if($user_obj->isAdmin()) { - // UPDATE admin info $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}admin set admin='". $_POST['admin'] . "' where id = '".$_POST['id']."'"; $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); - // UPDATE into user } - $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}user SET username='". addslashes($_POST['username']) ."',"; - + // UPDATE into user + $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}user SET username='". addslashes($_POST['username']) ."',"; + if (!empty($_POST['password'])) { $query .= "password = md5('". addslashes($_POST['password']) ."'), "; diff --git a/config-sample.php b/config-sample.php index f33b34d6..29f64b09 100644 --- a/config-sample.php +++ b/config-sample.php @@ -1,8 +1,7 @@ -// -// Encourage end-users to put local configuration in config_local.php, so -// we can overwrite (config.php) in the future -// without danger of overwriting site specific information. -if (is_file('config_local.php')) -{ - include('config_local.php'); -} -elseif (is_file('../config_local.php')) -{ - include('../config_local.php'); -} -elseif (is_file('../../config_local.php')) -{ - include('../../config_local.php'); +/** Absolute path to the OpenDocMan directory. */ +if ( !defined('ABSPATH') ) + define('ABSPATH', dirname(__FILE__) . '/'); } - - -// Set the revision directory. (relative to $dataDir) -$CONFIG['revisionDir'] = $GLOBALS['CONFIG']['dataDir'] . 'revisionDir/'; - -// Set the revision directory. (relative to $dataDir) -$CONFIG['archiveDir'] = $GLOBALS['CONFIG']['dataDir'] . 'archiveDir/'; - -$GLOBALS['connection'] = mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect: " . mysql_error()); -$db = mysql_select_db($GLOBALS['database'], $GLOBALS['connection']); - -// All functions and includes are in functions.php -include_once('functions.php'); - -$_GET = sanitizeme($_GET); -$_REQUEST = sanitizeme($_REQUEST); -$_POST = sanitizeme($_POST); -$_SERVER = sanitizeme($_SERVER); -} \ No newline at end of file diff --git a/config.php b/config.php deleted file mode 100644 index 52ea2df9..00000000 --- a/config.php +++ /dev/null @@ -1,184 +0,0 @@ - -// -// Encourage end-users to put local configuration in config_local.php, so -// we can overwrite (config.php) in the future -// without danger of overwriting site specific information. -if (is_file('config_local.php')) -{ - include('config_local.php'); -} -elseif (is_file('../config_local.php')) -{ - include('../config_local.php'); -} -elseif (is_file('../../config_local.php')) -{ - include('../../config_local.php'); -} - -// Set the revision directory. (relative to $dataDir) -$CONFIG['revisionDir'] = $GLOBALS['CONFIG']['dataDir'] . 'revisionDir/'; - -// Set the revision directory. (relative to $dataDir) -$CONFIG['archiveDir'] = $GLOBALS['CONFIG']['dataDir'] . 'archiveDir/'; - -$GLOBALS['connection'] = mysql_connect($GLOBALS['hostname'], $GLOBALS['user'], $GLOBALS['pass']) or die ("Unable to connect: " . mysql_error()); -$db = mysql_select_db($GLOBALS['database'], $GLOBALS['connection']); - -// All functions and includes are in functions.php -include_once('functions.php'); - -$_GET = sanitizeme($_GET); -$_REQUEST = sanitizeme($_REQUEST); -$_POST = sanitizeme($_POST); -$_SERVER = sanitizeme($_SERVER); -} \ No newline at end of file diff --git a/config_local.php.sample b/config_local.php.sample deleted file mode 100644 index 02a2e7ce..00000000 --- a/config_local.php.sample +++ /dev/null @@ -1,39 +0,0 @@ -canAdmin($id)) { - $file_obj = new FileData($id, $GLOBALS['connection'], $GLOBALS['database']); + $file_obj = new FileData($id, $GLOBALS['connection'], DB_NAME); $file_obj->temp_delete(); fmove($GLOBALS['CONFIG']['dataDir'] . $id . '.dat', $GLOBALS['CONFIG']['archiveDir'] . $id . '.dat'); } @@ -78,74 +81,10 @@ header('Location: out.php?last_message=' . $last_message); } -elseif( isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'pmntdel' ) -{ - if( !$userperm_obj->user_obj->isAdmin() ) - { - header('Location: error.php?ec=4'); - exit; - } - if(!@isset($_REQUEST['num_checkboxes'] )) - { - $_REQUEST['num_checkboxes'] =1; - } - // all ok, proceed! - //mysql_free_result($result); - for($i = 0; $i<$_REQUEST['num_checkboxes']; $i++) - { - if(@$_REQUEST['id' . $i]) - { - $id = $_REQUEST['id' . $i]; - if(strchr($id, '_') ) - { - header('Location:error.php?ec=20'); - } - if($userperm_obj->canAdmin($id)) - { - // delete from db - $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE id = '$id'"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); - - // delete from db - $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}dept_perms WHERE fid = '$id'"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); - - $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}user_perms WHERE fid = '$id'"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); - - $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}log WHERE id = '$id'"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); - $filename = $id . ".dat"; - unlink($GLOBALS['CONFIG']['archiveDir'] . $filename); - if( is_dir($GLOBALS['CONFIG']['revisionDir'] . $id . '/') ) - { - $dir = opendir($GLOBALS['CONFIG']['revisionDir'] . $id . '/'); - if( is_dir($GLOBALS['CONFIG']['revisionDir'] . $id . '/') ) - { - $dir = opendir($GLOBALS['CONFIG']['revisionDir'] . $id . '/'); - while($lreadfile = readdir($dir)) - { - if(is_file($GLOBALS['CONFIG']['revisionDir'] . "$id/$lreadfile")) - { - unlink($GLOBALS['CONFIG']['revisionDir'] . "$id/$lreadfile"); - } - } - rmdir($GLOBALS['CONFIG']['revisionDir'] . $id); - } - } - } - // Call the plugin API call for this section - callPluginMethod('onAfterDeleteFile'); - - } - } - // delete from directory - // clean up and back to main page - $last_message = urlencode(msg('message_document_successfully_deleted')); - header('Location: delete.php?mode=view_del_archive&last_message=' . $last_message); -} elseif( isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'view_del_archive' ) { + isset($_REQUEST['mode']) ? $_REQUEST['mode'] : ''; + //publishable=2 for archive deletion $lquery = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE publishable=2"; $lresult = mysql_query($lquery, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); @@ -154,81 +93,114 @@ { list($array_id[$i]) = mysql_fetch_row($lresult); } - $luserperm_obj = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); + $luserperm_obj = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); //$lfileobj_array = $luserperm_obj->convertToFileDataOBJ($array_id); - if(!isset($_REQUEST['starting_index'])) - { - $_REQUEST['starting_index'] = 0; - } - - if(!isset($_REQUEST['stoping_index'])) - { - $_REQUEST['stoping_index'] = $_REQUEST['starting_index']+$GLOBALS['CONFIG']['page_limit']-1; - } - - if(!isset($_REQUEST['sort_by'])) - { - $_REQUEST['sort_by'] = 'id'; - } - - if(!isset($_REQUEST['sort_order'])) - { - $_REQUEST['sort_order'] = 'asc'; - } - if(!isset($_REQUEST['page'])) + if(!isset($_REQUEST['last_message'])) { - $_REQUEST['page'] = 0; + $_REQUEST['last_message'] = ''; } + draw_menu($_SESSION['uid']); draw_header(msg('area_deleted_files')); - @draw_status_bar(msg('label_delete_undelete'), $_REQUEST['last_message']); + draw_status_bar(msg('label_delete_undelete'), $_REQUEST['last_message']); $page_url = $_SERVER['PHP_SELF'] . '?mode=' . $_REQUEST['mode']; - $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); - $userperms = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); - //$sorted_obj_array = obj_array_sort_interface($lfileobj_array, $_POST['sort_order'], $_POST['sort_by']); - $sorted_array_id = my_sort($array_id, $_REQUEST['sort_order'], $_REQUEST['sort_by']); - echo '
' . "\n"; + $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); + $userperms = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); - echo '
'; - $list_status = list_files($sorted_array_id, $userperms, $page_url, $GLOBALS['CONFIG']['archiveDir'], $_REQUEST['sort_order'], $_REQUEST['sort_by'], $_REQUEST['starting_index'], $_REQUEST['stoping_index'], true); - list_nav_generator(sizeof($sorted_array_id), $GLOBALS['CONFIG']['page_limit'], '',$page_url, $_REQUEST['page'], $_REQUEST['sort_by'], $_REQUEST['sort_order']); - if( isset($list_status) && $list_status != -1) + $list_status = list_files($array_id, $userperms, $GLOBALS['CONFIG']['archiveDir'], true); + + if( $list_status != -1 ) { - echo '
'; - echo '
'; - echo ''; + $GLOBALS['smarty']->assign('lmode', ''); + display_smarty_template('deleteview.tpl'); } - echo '
'; - draw_footer(); } -elseif(isset($_POST['mode']) && $_POST['mode']=='Delete file(s)') +elseif(isset($_POST['submit']) && $_POST['submit']=='Delete file(s)') { - $url = 'delete.php?mode=pmntdel&'; - $id = 0; - for($i = 0; $i<$_POST['num_checkboxes']; $i++) + isset($_REQUEST['checkbox']) ? $_REQUEST['checkbox'] : ''; + + foreach($_REQUEST['checkbox'] as $key=>$value) { - if(isset($_POST["checkbox$i"])) + if(!pmt_delete($value)) { - $fileid = $_POST["checkbox$i"]; - $url .= 'id'.$id.'='.$fileid.'&'; - $id ++; + header('Location: error.php'); + exit; } } - $url = substr($url, 0, strlen($url)-1); - header('Location:'.$url.'&num_checkboxes='.$_POST['num_checkboxes']); + header('Location:delete.php?mode=view_del_archive'); } -elseif(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'Undelete') +elseif(isset($_REQUEST['submit']) && $_REQUEST['submit'] == 'Undelete') { for($i= 0; $i<$_REQUEST['num_checkboxes']; $i++) { if(isset($_REQUEST["checkbox$i"])) { - $file_obj = new FileData($_REQUEST["checkbox$i"], $GLOBALS['connection'], $GLOBALS['database']); + $file_obj = new FileData($_REQUEST["checkbox$i"], $GLOBALS['connection'], DB_NAME); $file_obj->undelete(); fmove($GLOBALS['CONFIG']['archiveDir'] . $_REQUEST["checkbox$i"] . '.dat', $GLOBALS['CONFIG']['dataDir'] . $_REQUEST["checkbox$i"] . '.dat'); } } header('Location:' . $_REQUEST['caller'] . '&last_message=' . urlencode('message_document_has_been_archived')); +} + +draw_footer(); + +/* + * Permanently Delete A File + * @param integer $id The file ID to be deleted permanently + */ +function pmt_delete($id) +{ + $userperm_obj = new User_Perms($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); + + if( !$userperm_obj->user_obj->isRoot() ) + { + header('Location: error.php?ec=4'); + exit; + } + // all ok, proceed! + //mysql_free_result($result); + if(isset($id)) + { + if(strchr($id, '_') ) + { + header('Location:error.php?ec=20'); + } + if($userperm_obj->canAdmin($id)) + { + // delete from db + $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE id = '$id'"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); + + // delete from db + $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}dept_perms WHERE fid = '$id'"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); + + $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}user_perms WHERE fid = '$id'"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); + + $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}log WHERE id = '$id'"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); + $filename = $id . ".dat"; + unlink($GLOBALS['CONFIG']['archiveDir'] . $filename); + if( is_dir($GLOBALS['CONFIG']['revisionDir'] . $id . '/') ) + { + $dir = opendir($GLOBALS['CONFIG']['revisionDir'] . $id . '/'); + if( is_dir($GLOBALS['CONFIG']['revisionDir'] . $id . '/') ) + { + $dir = opendir($GLOBALS['CONFIG']['revisionDir'] . $id . '/'); + while($lreadfile = readdir($dir)) + { + if(is_file($GLOBALS['CONFIG']['revisionDir'] . "$id/$lreadfile")) + { + unlink($GLOBALS['CONFIG']['revisionDir'] . "$id/$lreadfile"); + } + } + rmdir($GLOBALS['CONFIG']['revisionDir'] . $id); + } + } + } + } } \ No newline at end of file diff --git a/department.php b/department.php index 389343b7..b317e91a 100644 --- a/department.php +++ b/department.php @@ -1,7 +1,7 @@ getName(),$_POST['last_message']); diff --git a/details.php b/details.php index 91c1a392..e3bd47ad 100644 --- a/details.php +++ b/details.php @@ -2,7 +2,7 @@ /* details.php - display file information check for session Copyright (C) 2002-2007 Stephen Lawrence Jr., Khoa Nguyen, Jon Miner -Copyright (C) 2008-2010 Stephen Lawrence Jr. +Copyright (C) 2008-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ header('Location:index.php?redirection=' . urlencode( $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']) ); exit; } -include('config.php'); +include('odm-load.php'); include('udf_functions.php'); // in case this file is accessed directly - check for $_REQUEST['id'] @@ -49,12 +49,12 @@ { @draw_status_bar(msg('area_file_details'),$_REQUEST['last_message']); } -$filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], $GLOBALS['database']); +$filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], DB_NAME); checkUserPermission($_REQUEST['id'], $filedata->VIEW_RIGHT); -$user = new User_Perms($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); +$user = new User_Perms($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); -$userPermObj = new UserPermission($_SESSION['uid'] , $GLOBALS['connection'], $GLOBALS['database']); -$user_obj = new user($filedata->getOwner(), $GLOBALS['connection'], $GLOBALS['database']); +$userPermObj = new UserPermission($_SESSION['uid'] , $GLOBALS['connection'], DB_NAME); +$user_obj = new user($filedata->getOwner(), $GLOBALS['connection'], DB_NAME); $secureurl = new phpsecureurl; ?> @@ -255,7 +255,7 @@ // check if user has modify rights $query2 = "SELECT status FROM {$GLOBALS['CONFIG']['db_prefix']}data, {$GLOBALS['CONFIG']['db_prefix']}user_perms WHERE {$GLOBALS['CONFIG']['db_prefix']}user_perms.fid = '$_REQUEST[id]' AND {$GLOBALS['CONFIG']['db_prefix']}user_perms.uid = '$_SESSION[uid]' AND {$GLOBALS['CONFIG']['db_prefix']}user_perms.rights = '2' AND {$GLOBALS['CONFIG']['db_prefix']}data.status = '0' AND {$GLOBALS['CONFIG']['db_prefix']}data.id = {$GLOBALS['CONFIG']['db_prefix']}user_perms.fid"; $result2 = mysql_query($query2, $GLOBALS['connection']) or die ("Error in query: $query2. " . mysql_error()); - $user_perms = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); + $user_perms = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); if($user_perms->getAuthority($_REQUEST['id'])>=$user_perms->WRITE_RIGHT && !isset($lrevision_id) && !$filedata->isArchived()) { // if so, display link for checkout diff --git a/docs/opendocman.txt b/docs/opendocman.txt index 71812852..1dbb4f66 100644 --- a/docs/opendocman.txt +++ b/docs/opendocman.txt @@ -1,16 +1,4 @@ -June 4, 2010 - -Abstract - -OpenDocMan is a full featured Web-based document management -system designed to conform to ISO 17025/IEC. It features -automatic installation, file expiration, multiple version -handling, file check-in/out, departmental access control, -file moderation, fine grained user access control, email -notificaiton and a great search function. Written in PHP, -and utilizing MySQL for the backend, this project is useful -for any company looking to keep their documentation in a -centralized repository. +January 12, 2011 Table of Contents @@ -81,8 +69,7 @@ centralized repository. a file 9. Admin and Root users - Each installation can have any number - of "admin" users, who can create users, - categories, etc.. One "root" + of "admin" users, who can create users, categories, etc.. One "root" user can do all. 10. Multiple Document Versions - Instead of overwriting a document @@ -106,13 +93,15 @@ centralized repository. in file list but non-checkoutable, Send email to reviewer only, or Do Nothing. +15. + 1.2 Requirements * Apache Webserver 2.x (or any other webserver, that supports PHP) (http://www.apache.org/) -* MySQL Server 4.0+ (http://www.mysql.com/) +* MySQL Server 5.0+ (http://www.mysql.com/) -* PHP 4+ compiled with MySQL-Support (http://www.php.net/) +* PHP 5+ compiled with MySQL-Support (http://www.php.net/) 1.2.1 Partially Tested @@ -130,36 +119,34 @@ To update your current version to the latest release: 2. Unarchive opendocman into a new folder -3. Copy the local_config.php.sample in your new folder (Look at your old - config.php file for some settings that can be transferred - over from the old config to the new). +3. -4. Load the installation page in your web browser at /install/ - ( ex. http://www.example.com/opendocman/install/ ) - and click on the appropriate upgrade link. Refer to your - old config.php to see what version you were using before. +4. Load the opendocman page in your web browser +( ex. http://www.example.com/opendocman/ ) + You should follow the prompts for installation. 2.2 New Installation 1. Untar/Unzip files into any dir in your webserver documents dir -2. Edit config.php +2. Create a MySQL database/username/password. + +3. Edit config.php (a) All parameters are commented and should be self explanatory. Change any that apply, especially the database parameters. -3. Make a directory for the files to be stored that is accessible +4. Make a directory for the files to be stored that is accessible to the web server but not available by browsing. Ensure the permissions are correct on this folder to allow for the web server to write to it ex. $>mkdir /usr/local/opendocman/data -4. Load the installation page in your web browser at /install/ - (ex. http://www.example.com/opendocman/install ) and click on the - new install link. +5. Load the opendocman page in your web browser +(ex. http://www.example.com/opendocman/ ) and follow the prompts. -5. Point your favorite webbrowser to the opendocman folder: +6. Point your favorite webbrowser to the opendocman folder: ex. "http://www.mydomain.com/opendocman" 7. Login as "admin" (without password). After that, go to @@ -171,20 +158,11 @@ To update your current version to the latest release: 3 Configuration -3.1 config.php - -Most of the configuration for OpenDocMan is controlled by -a file name config.php. Below are some of the configurable -options in that file: - -* $database - The name of the database used (ex. opendocman) - -* $user - The user that has update/insert/delete permissions - on above database +3.1 Configuration Settings -* $pass - Password for above user +Most of the configuration for OpenDocMan is controlled by the Admin->Edit Settings page. -* $hostname - The hostname:port of the database server (ex. db1.mydomain.com or db1.mydomain.com:8889) +Below are some of the configurable options: * dataDir - Location of file repository. This should ideally be outside the Web server root. Make sure the server has @@ -198,12 +176,6 @@ options in that file: methods. Currently only MySQL and web-based kerberos authentication is supported. -* page_limit - Set the number of files that show up on each - page - -* displayable_len - Set the maximum displayable length of - text field in file list - * base_url - Set this to the url of the site (no ending slash) * title - This is the browser window title and be anything @@ -232,19 +204,12 @@ options in that file: * secureurl [On,Off] - Hide the URL contents from prying -* treeview [On,Off] - Use treeview mode instead of file list mode - * theme [default="default"] - which theme to use? Smarty-based themes are located in templates/ folder. Look at default for example. To add a new one just create a new theme folder in templates/ - with the header.tpl and footer.tpl files. Global variables are + with header.tpl and footer.tpl files. Global variables are added to smarty as $g_VARIABLENAME. -* $allowedFileTypes - This is a list of file types that will - be allowed to be added to the repository. This may need - some tweeking depending on what types of files your users - have. - * allow_signup - This option determines whether or not to display the "Signup" link on the login page to allow users to self-register. @@ -314,9 +279,9 @@ use by the installation scrip. This is an automated web-based update/installation script. Here is how it works for users: -1. The user loads /install/index.php into their browser. They can either - select the new installation link, or one of the upgrade - links. +1. The user loads any page into their browser. The program will detect + if they have a config.php file or not. If they do not it will have them + create one. 2. For a new installation: @@ -365,9 +330,9 @@ new files need to be created and a current files modified. This can be a mysqldump straight from the latest database schema. -These files MUST be kept syncronized for each release! +These files MUST be kept in sync for each release! -7 Changes +7 Old Changes 7.1 1.2rc1 - July 9th, 2003 diff --git a/edit.php b/edit.php index 4108570c..b7f7ae16 100644 --- a/edit.php +++ b/edit.php @@ -2,7 +2,7 @@ /* edit.php - edit file properties Copyright (C) 2002-2007 Stephen Lawrence Jr., Khoa Nguyen, Jon Miner -Copyright (C) 2008-2010 Stephen Lawrence Jr. +Copyright (C) 2008-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ //$submit=true; session_start(); -include('config.php'); +include('odm-load.php'); include('udf_functions.php'); if(strchr($_REQUEST['id'], '_') ) { @@ -44,7 +44,7 @@ exit; } -$filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], $GLOBALS['database']); +$filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], DB_NAME); if( $filedata->isArchived() ) { @@ -62,12 +62,11 @@ draw_header(msg('area_update_file')); draw_menu($_SESSION['uid']); draw_status_bar(msg('area_update_file'), $_REQUEST['last_message']); - $user_perm_obj = new User_Perms($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); + $user_perm_obj = new User_Perms($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); checkUserPermission($_REQUEST['id'], $user_perm_obj->ADMIN_RIGHT); $data_id = $_REQUEST['id']; // includes $query ="SELECT department FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE id=$_SESSION[uid]"; - //echo($GLOBALS['database']); echo($query); echo($connection); $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error()); if(mysql_num_rows($result) != 1) { @@ -151,14 +150,7 @@ function issetFlag() ?> exists() ) { @@ -167,9 +159,6 @@ function issetFlag() } else { - // obtain data from resultset - //list($category, $realname, $description, $comment) = mysql_fetch_row($result); - //mysql_free_result($result); $category = $filedata->getCategory(); $realname = $filedata->getName(); $description = $filedata->getDescription(); @@ -305,7 +294,7 @@ function issetFlag() for($i = 0; $iFORBIDDEN_RIGHT; @@ -480,7 +469,7 @@ function issetFlag() else { // form submitted, process data - $filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], $GLOBALS['database']); + $filedata = new FileData($_REQUEST['id'], $GLOBALS['connection'], DB_NAME); $filedata->setId($_REQUEST['id']); // check submitted data // at least one user must have "view" and "modify" rights @@ -541,8 +530,8 @@ function issetFlag() while( list($dept_name, $id) = mysql_fetch_row($result) ) { $string=addslashes(space_to_underscore($dept_name)); - $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}dept_perms SET rights =\"".$_REQUEST[$string]."\" where fid=".$filedata->getId()." and {$GLOBALS['CONFIG']['db_prefix']}dept_perms.dept_id =$id"; - $result2 = mysql_query($query, $GLOBALS['connection']) or die("Error in query: $query. " . mysql_error() ); + $query = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}dept_perms SET rights ='{$_REQUEST[$string]}' where fid=".$filedata->getId()." and {$GLOBALS['CONFIG']['db_prefix']}dept_perms.dept_id =$id"; + $result2 = mysql_query($query, $GLOBALS['connection']) or die("Error in query: $query. " . mysql_error() ); } // clean up mysql_freeresult($result); diff --git a/error.php b/error.php index 4c59689a..9bb125ad 100644 --- a/error.php +++ b/error.php @@ -2,7 +2,7 @@ /* error.php - displays error messages based on error code $ec Copyright (C) 2002-2004 Stephen Lawrence, Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -20,130 +20,136 @@ */ // includes -include('config.php'); +include('odm-load.php'); session_start(); draw_header('Error'); if (!isset($_SESSION['uid'])) { - draw_menu(); + draw_menu(); } else { - draw_menu($_SESSION['uid']); + draw_menu($_SESSION['uid']); } @draw_status_bar('Error', $_REQUEST['last_message']); -switch ($_REQUEST['ec']) +if(isset($_REQUEST['ec'])) { - // login failure - case 0: - $message = msg('message_there_was_an_error_loggin_you_in') . ' ' .msg('login') . ''; - break; + switch ($_REQUEST['ec']) + { + // login failure + case 0: + $message = msg('message_there_was_an_error_loggin_you_in') . ' ' .msg('login') . ''; + break; - // session problem - case 1: - $message = msg('message_session_error') . '' . msg('login') . ''; - break; + // session problem + case 1: + $message = msg('message_session_error') . '' . msg('login') . ''; + break; - // malformed variable/failed query - case 2: - $message = msg('message_error_performing_action'); - break; + // malformed variable/failed query + case 2: + $message = msg('message_error_performing_action'); + break; - // User already exists - case 3: - $message = msg('message_record_exists'); - break; + // User already exists + case 3: + $message = msg('message_record_exists'); + break; - // User not admin - case 4: - $message = msg('message_you_are_not_administrator'); - break; + // User not admin + case 4: + $message = msg('message_you_are_not_administrator'); + break; - // Category exists - case 5: - $message = msg('message_record_exists').':'.$_REQUEST['category'].' Back'; - break; + // Category exists + case 5: + $message = msg('message_record_exists').':'.$_REQUEST['category'].' Back'; + break; - // Input Field Blank - case 6: - $message = msg('message_you_did_not_enter_value') .' Back'; - break; + // Input Field Blank + case 6: + $message = msg('message_you_did_not_enter_value') .' Back'; + break; - // file not uploaded - case 11: - $message = msg('message_please_upload_valid_doc'); - break; + // file not uploaded + case 11: + $message = msg('message_please_upload_valid_doc'); + break; - // rights not assigned - case 12: - $message = msg('message_you_must_assign_rights'); - break; + // rights not assigned + case 12: + $message = msg('message_you_must_assign_rights'); + break; - // illegal file type - case 13: - $message = msg('message_that_filetype_not_supported') . ' config.php->allowedFileTypes:
    '; - //echo "_File array is " . array_values($_FILES['file']); - foreach($GLOBALS['allowedFileTypes'] as $thistype) - { - $message .= '
  • '.$thistype; - } - $message .= '
'; - break; - //non-unique account - case 14: - $message = msg('message_non_unique_account'); - break; - //check-in wrong filename - case 15: - $message = msg('message_wrong_file_checkin'); - break; - //non unique id in filename - case 16: - $message = msg('message_non_unique_key'); - break; - // file cannot be checked-in - case 17: - $message = msg('message_this_file_cannot_be_checked_in'); - break; - //non-complete upload - case 18: - $message = msg('message_this_file_cannot_be_uploaded'); - break; - //no account in ODM - case 19: - $message = msg('message_you_do_not_have_an_account') . ' ' . $GLOBALS['CONFIG']['site_mail'] . ''; - break; - // cannot do this on revision - case 20: - $message = msg('message_this_operation_cannot_be_done_rev'); - break; - // operation cannot be done on file - case 21: - $message = msg('message_this_operation_cannot_be_done_file'); - break; - // bad root_username setting - case 22: - $message = msg('message_unable_to_determine_root'); - break; - // Folder not writable - case 23: - $message = msg('message_folder_error_check'); - break; - // Non root user trying to access root operations - case 24: - $message =msg('message_this_page_requires_root'); - break; - // File too big - case 25: - $message =msg('message_the_file_is_too_large') .' ' . $GLOBALS['CONFIG']['max_filesize']; - break; - //default - default: - $message = msg('message_there_was_an_error_performing_the_action') .' ' . msg('please') . ' ' . msg('login') . ''; - break; + // illegal file type + case 13: + $message = msg('message_that_filetype_not_supported') . ' Admin->Settings->allowedFileTypes:
    '; + //echo "_File array is " . array_values($_FILES['file']); + foreach($GLOBALS['CONFIG']['allowedFileTypes'] as $thistype) + { + $message .= '
  • '.$thistype; + } + $message .= '
'; + break; + //non-unique account + case 14: + $message = msg('message_non_unique_account'); + break; + //check-in wrong filename + case 15: + $message = msg('message_wrong_file_checkin'); + break; + //non unique id in filename + case 16: + $message = msg('message_non_unique_key'); + break; + // file cannot be checked-in + case 17: + $message = msg('message_this_file_cannot_be_checked_in'); + break; + //non-complete upload + case 18: + $message = msg('message_this_file_cannot_be_uploaded'); + break; + //no account in ODM + case 19: + $message = msg('message_you_do_not_have_an_account') . ' ' . $GLOBALS['CONFIG']['site_mail'] . ''; + break; + // cannot do this on revision + case 20: + $message = msg('message_this_operation_cannot_be_done_rev'); + break; + // operation cannot be done on file + case 21: + $message = msg('message_this_operation_cannot_be_done_file'); + break; + // bad root_username setting + case 22: + $message = msg('message_unable_to_determine_root'); + break; + // Folder not writable + case 23: + $message = msg('message_folder_error_check'); + break; + // Non root user trying to access root operations + case 24: + $message =msg('message_this_page_requires_root'); + break; + // File too big + case 25: + $message =msg('message_the_file_is_too_large') .' ' . $GLOBALS['CONFIG']['max_filesize']; + break; + case 26: + $message =msg('message_the_file_is_too_large_php_ini') .' ' . min(ini_get('post_max_size'), ini_get('upload_max_filesize')); + break; + //default + default: + $message = msg('message_there_was_an_error_performing_the_action') .' ' . msg('please') . ' ' . msg('login') . ''; + break; + } + echo(' ' . $message . ''); } -echo(' ' . $message . ''); draw_footer(); diff --git a/file_ops.php b/file_ops.php index c3357181..c998f240 100644 --- a/file_ops.php +++ b/file_ops.php @@ -2,7 +2,7 @@ /* file_ops.php - admin file operations Copyright (C) 2002-2004 Stephen Lawrence Jr, Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -include('config.php'); +include('odm-load.php'); session_start(); //$_SESSION['uid'] = 102; //$_GET['submit'] = 'view_checkedout'; @@ -32,35 +32,12 @@ // get a list of documents the user has "view" permission for // get current user's information-->department -$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); +$user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); if(!$user_obj->isRoot()) { header('Location:error.php?ec=24'); } $flag = 0; -if(!isset($_GET['starting_index'])) -{ - $_GET['starting_index'] = 0; -} - -if(!isset($_GET['stoping_index'])) -{ - $_GET['stoping_index'] = $_GET['starting_index']+$GLOBALS['CONFIG']['page_limit']; -} - -if(!isset($_GET['sort_by'])) -{ - $_GET['sort_by'] = 'id'; -} - -if(!isset($_GET['sort_order'])) -{ - $_GET['sort_order'] = 'asc'; -} -if(!isset($_GET['page'])) -{ - $_GET['page'] = 0; -} if(@$_GET['submit'] == 'view_checkedout') { echo "\n" . '
'; @@ -68,35 +45,33 @@ draw_header(msg('label_checked_out_files')); draw_menu($_SESSION['uid']); draw_status_bar(msg('label_checked_out_files'), @$_REQUEST['last_message']); - $lquery = "SELECT id FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE status>0"; - $lresult = mysql_query($lquery) or die("Error in querying: $lquery" . mysql_error()); - $llen = mysql_num_rows($lresult); - $array_id = array(); - for($i=0; $i<$llen; $i++) - { - list($array_id[$i]) = mysql_fetch_row($lresult); - } - $sorted_id_array = my_sort($array_id, $_GET['sort_order'], $_GET['sort_by']); + + $fileid_array = $user_obj->getCheckedOutFiles(); + $lpage_url = $_SERVER['PHP_SELF'] . '?'; - $userpermission = new UserPermission($_SESSION['uid'], $connection, $database); - $list_status = list_files($sorted_id_array, $userpermission, $lpage_url, $GLOBALS['CONFIG']['dataDir'], $_GET['sort_order'], $_GET['sort_by'], $_GET['starting_index'], $_GET['stoping_index'], true); + $userpermission = new UserPermission($_SESSION['uid'], $connection, DB_NAME); + $list_status = list_files($fileid_array, $userpermission, $GLOBALS['CONFIG']['dataDir'], true, true); if($list_status != -1 ) { echo "\n" . '

'; echo "\n" . '
'; } - list_nav_generator(sizeof($sorted_id_array), $GLOBALS['CONFIG']['page_limit'], $GLOBALS['CONFIG']['num_page_limit'], $lpage_url, $_GET['page'], $_GET['sort_by'], $_GET['sort_order']); draw_footer(); } -elseif (@$_POST['submit'] == 'Clear Status') +elseif (isset($_POST['submit']) && $_POST['submit'] == 'Clear Status') { - $lquery = "UPDATE {$GLOBALS['CONFIG']['db_prefix']}data set status=0 where id="; - for($i=0; $i<$_POST['num_checkboxes']; $i++) - { - if(@$_POST['checkbox'.$i]) - { - mysql_query($lquery . $_POST['checkbox'.$i]) or die('Error in querying' . mysql_error()); - } - } - header('Location:' . $_SERVER['PHP_SELF'] . '?state=2&submit=view_checkedout'); + if(isset($_POST["checkbox"])) + { + foreach($_POST['checkbox'] as $cbox) + { + $fileid = $cbox; + $file_obj = new FileData($fileid, $GLOBALS['connection'], DB_NAME); + //$user_obj = new User($file_obj->getOwner(), $connection, DB_NAME); + //$mail_to = $user_obj->getEmailAddress(); + //mail($mail_to, $mail_subject. $file_obj->getName(), ($mail_greeting.$file_obj->getName().' '.$mail_body.$mail_salute), $mail_headers); + $file_obj->setStatus(0); + } + + } + header('Location:' . $_SERVER['PHP_SELF'] . '?state=2&submit=view_checkedout'); } diff --git a/filetypes.php b/filetypes.php new file mode 100644 index 00000000..6267352a --- /dev/null +++ b/filetypes.php @@ -0,0 +1,145 @@ +isRoot() == true) +{ + header('Location:' . $secureurl->encode('error.php?ec=24')); + exit; +} + +if(isset($_REQUEST['submit']) && $_REQUEST['submit']=='update') +{ + if(!isset($_POST['last_message'])) + { + + $_POST['last_message']=''; + } + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + $filetypes->edit(); + draw_footer(); +} +elseif(isset($_REQUEST['submit']) && $_REQUEST['submit'] == 'Save') +{ + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + if($filetypes->save($_POST)) + { + $_POST['last_message'] = $GLOBALS['lang']['message_all_actions_successfull']; + } + else + { + $_POST['last_message'] = $GLOBALS['lang']['message_error_performing_action']; + } + $GLOBALS['smarty']->assign('last_message', $_POST['last_message']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + $filetypes->edit(); + draw_footer(); +} +elseif (isset($_REQUEST['submit']) and $_REQUEST['submit'] == 'Cancel') +{ + if(!isset($_POST['last_message'])) + { + + $_POST['last_message']=''; + } + header('Location: ' . $secureurl->encode("admin.php?last_message=" . urlencode(msg('message_action_cancelled')))); +} +elseif(isset($_REQUEST['submit']) and $_REQUEST['submit'] == 'AddNew') +{ + if(!isset($_POST['last_message'])) + { + + $_POST['last_message']=''; + } + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + display_smarty_template('filetype_add.tpl'); + draw_footer(); +} +elseif(isset($_REQUEST['submit']) and $_REQUEST['submit'] == 'AddNewSave') +{ + if($filetypes->add($_POST)) + { + $_POST['last_message'] = $GLOBALS['lang']['message_all_actions_successfull']; + } + else + { + $_POST['last_message'] = $GLOBALS['lang']['message_error_performing_action']; + } + $GLOBALS['smarty']->assign('last_message', $_POST['last_message']); + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + $filetypes->edit(); + draw_footer(); +} +elseif(isset($_REQUEST['submit']) and $_REQUEST['submit'] == 'DeleteSelect') +{ + if(!isset($_POST['last_message'])) + { + + $_POST['last_message']=''; + } + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + $filetypes->deleteSelect(); + draw_footer(); +} +elseif(isset($_REQUEST['submit']) and $_REQUEST['submit'] == 'Delete') +{ + if($filetypes->delete($_POST)) + { + $_POST['last_message'] = $GLOBALS['lang']['message_all_actions_successfull']; + } + else + { + $_POST['last_message'] = $GLOBALS['lang']['message_error_performing_action']; + } + $GLOBALS['smarty']->assign('last_message', $_POST['last_message']); + draw_header(msg('label_filetypes')); + draw_menu($_SESSION['uid']); + draw_status_bar(msg('label_filetypes'), $_POST['last_message']); + $filetypes->edit(); + draw_footer(); +} +else +{ + header('Location: ' . $secureurl->encode("admin.php?last_message=" . urlencode(msg('message_nothing_to_do')))); +} + diff --git a/forgot_password.php b/forgot_password.php index bef2c97a..b8ddb956 100644 --- a/forgot_password.php +++ b/forgot_password.php @@ -2,7 +2,7 @@ /* forgot_password.php - utility to reset a user password Copyright (C) 2005-2006 Glowball Solutions & Stephen Lawrence Jr. - Copyright (C) 2005-2010 Stephen Lawrence Jr. + Copyright (C) 2005-2011 Stephen Lawrence Jr. This page was added to the core files for this utility. This program is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -include_once('config.php'); +include_once('odm-load.php'); if(isset($GLOBALS['CONFIG']['allow_password_reset']) && $GLOBALS['CONFIG']['allow_password_reset'] != 'On') { @@ -181,19 +181,6 @@ // default form else { - // build the header and navigation - /* - - - - - - ADD FORMATTING HERE - - - - - */ if (strlen($_REQUEST['last_message'])) echo "

" . $_REQUEST['last_message'] . ".

\n"; ?> @@ -215,16 +202,4 @@ template_dir = dirname(__FILE__) . '/templates/' . $GLOBALS['CONFIG']['theme'] .'/'; $GLOBALS['smarty']->compile_dir = dirname(__FILE__) . '/templates_c/'; + /**** SET g_ vars from Global Config arr ***/ foreach($GLOBALS['CONFIG'] as $key => $value) { @@ -49,161 +49,174 @@ functions.php - various utility functions { $GLOBALS['smarty']->assign('g_lang_' . $key, msg($key)); } - // BEGIN FUNCTIONS - // function to format mySQL DATETIME values - function fix_date($val) - { - //split it up into components - if( $val != 0 ) - { - $arr = explode(' ', $val); - $timearr = explode(':', $arr[1]); - $datearr = explode('-', $arr[0]); - // create a timestamp with mktime(), format it with date() - return date('d M Y (H:i)', mktime($timearr[0], $timearr[1], $timearr[2], $datearr[1], $datearr[2], $datearr[0])); - } - else - { - return 0; - } - } - - // Return a copy of $string where all the spaces are converted into underscores - function space_to_underscore($string) - { - $string_len = strlen($string); - $index = 0; - while( $index< $string_len ) - { - if($string[$index] == ' ') - { - $string[$index]= '_'; - } - $index++; - } - return $string; - } - // Draw the status bar for each page - function draw_status_bar($message, $lastmessage='') - { - if(!isset($_REQUEST['state'])) - $_REQUEST['state']=1; - echo "\n".''."\n"; - if (!isset ($message)) - { - $message='Select'; - } - echo ''."\n"; - echo '
'."\n"; - echo ''."\n"; - echo ''."\n"; - //echo ''."\n"; - echo '"; - echo '"; - echo '"; - ?> - - + +
'."\n"; - //echo ''."\n"; - //echo $message; - //echo ''."\n"; - echo '' .msg('home'). ''."\n'."\n"; - echo '' .msg('preferences').''."\n'."\n"; - echo ''.msg('help').''."\n| - addCrumb($_REQUEST['state'], $message, $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']); + +// Check if dataDir is working +if(!is_dir($GLOBALS['CONFIG']['dataDir'])) +{ + echo $GLOBALS['lang']['message_datadir_problem_exists'] . ' ' . $GLOBALS['lang']['label_settings'] . '
'; +} +elseif(!is_writable($GLOBALS['CONFIG']['dataDir'])) +{ + echo $GLOBALS['lang']['message_datadir_problem_writable'] . ' ' . $GLOBALS['lang']['label_settings'] . '
'; +} + + +// BEGIN FUNCTIONS +// function to format mySQL DATETIME values +function fix_date($val) +{ + //split it up into components + if( $val != 0 ) + { + $arr = explode(' ', $val); + $timearr = explode(':', $arr[1]); + $datearr = explode('-', $arr[0]); + // create a timestamp with mktime(), format it with date() + return date('d M Y (H:i)', mktime($timearr[0], $timearr[1], $timearr[2], $datearr[1], $datearr[2], $datearr[0])); + } + else + { + return 0; + } +} + +// Return a copy of $string where all the spaces are converted into underscores +function space_to_underscore($string) +{ + $string_len = strlen($string); + $index = 0; + while( $index< $string_len ) + { + if($string[$index] == ' ') + { + $string[$index]= '_'; + } + $index++; + } + return $string; +} +// Draw the status bar for each page +function draw_status_bar($message, $lastmessage='') +{ + if(!isset($_REQUEST['state'])) + $_REQUEST['state']=1; + if (!isset ($message)) + { + $message='Select'; + } + echo ''."\n"; + echo '
'."\n"; + echo ''."\n"; + echo ''."\n"; + //echo ''."\n"; + if(isset($_SESSION['uid'])) + { + $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); + echo ''; + } + echo '"; + echo '"; + echo '"; + ?> + +'; } - ?> - - -
'."\n"; + //echo ''."\n"; + //echo $message; + //echo ''."\n"; + echo '' . $user_obj->getName() . ''."\n"; + echo '' .msg('home'). ''."\n'."\n"; + echo '' .msg('preferences').''."\n'."\n"; + echo ''.msg('help').''."\n| + addCrumb($_REQUEST['state'], $message, $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']); $crumb->printTrail($_REQUEST['state']); - echo ''."\n"; + echo ''."\n"; if ( $lastmessage != "" ) { echo ''; echo msg('message_last_message') . ': '.$lastmessage; echo '
-
+ ?> +
+
+ - isAdmin()) - { - $GLOBALS['smarty']->assign('isadmin', 'yes'); - } - $GLOBALS['smarty']->assign('site_title', $GLOBALS['CONFIG']['title']); - $GLOBALS['smarty']->assign('base_url', $GLOBALS['CONFIG']['base_url']); - $GLOBALS['smarty']->display('menu.tpl'); - } - function draw_header($page_title) - { - if(is_dir('install')) - { - echo '' . msg('install_folder') . ''; - } - $GLOBALS['smarty']->assign('page_title', $page_title); - $GLOBALS['smarty']->display('header.tpl'); - /* +// This function draws the menu screen +function draw_menu($uid='') +{ + if($uid != NULL) + { + $current_user_obj = new User($uid, $GLOBALS['connection'], DB_NAME); + } + if($uid != NULL && $current_user_obj->isAdmin()) + { + $GLOBALS['smarty']->assign('isadmin', 'yes'); + } + $GLOBALS['smarty']->assign('site_title', $GLOBALS['CONFIG']['title']); + $GLOBALS['smarty']->assign('base_url', $GLOBALS['CONFIG']['base_url']); + display_smarty_template('menu.tpl'); +} +function draw_header($page_title) +{ + $GLOBALS['smarty']->assign('page_title', $page_title); + $GLOBALS['smarty']->display('header.tpl'); + /* if (!isset($page_title)) { $page_title='Main'; @@ -232,18 +245,22 @@ function popup(mylink, windowname) echo ' '."\n"; echo ' '."\n"; echo ''."\n"; - */ - } + */ + if(is_dir('install')) + { + echo '' . msg('install_folder') . ''; + } +} - function draw_error($message) - { - header ('Location:' . $message); - } +function draw_error($message) +{ + header ('Location:' . $message); +} - function draw_footer() - { - $GLOBALS['smarty']->display('footer.tpl'); - /* +function draw_footer() +{ + $GLOBALS['smarty']->display('footer.tpl'); + /* echo "\n".''."\n"; echo '
'."\n"; echo '
'.$GLOBALS['CONFIG']['current_version'].'
'; @@ -251,762 +268,492 @@ function draw_footer() echo ' '."\n"; echo ''."\n"; echo ''."\n"; - */ - } - function email_all($mail_from, $mail_subject, $mail_body, $mail_header) - { - $query = "SELECT Email FROM {$GLOBALS['CONFIG']['db_prefix']}user"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query . " . mysql_error()); - while( list($mail_to) = mysql_fetch_row($result) ) - { - mail($mail_to, $mail_subject, $mail_body, $mail_header); - } - mysql_free_result($result); - } - function email_dept($mail_from, $dept_id, $mail_subject, $mail_body, $mail_header) - { - $query = "SELECT Email FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE department = $dept_id"; - $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query . " . mysql_error()); - while( list($mail_to) = mysql_fetch_row($result) ) - { - mail($mail_to, $mail_subject, $mail_body, $mail_header); - } - mysql_free_result($result); - } - function email_users_obj($mail_from, $user_OBJ_array, $mail_subject, $mail_body, $mail_header) + */ +} +function email_all($mail_from, $mail_subject, $mail_body, $mail_header) +{ + $query = "SELECT Email FROM {$GLOBALS['CONFIG']['db_prefix']}user"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query . " . mysql_error()); + while( list($mail_to) = mysql_fetch_row($result) ) + { + mail($mail_to, $mail_subject, $mail_body, $mail_header); + } + mysql_free_result($result); +} +function email_dept($mail_from, $dept_id, $mail_subject, $mail_body, $mail_header) +{ + $query = "SELECT Email FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE department = $dept_id"; + $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query . " . mysql_error()); + while( list($mail_to) = mysql_fetch_row($result) ) + { + mail($mail_to, $mail_subject, $mail_body, $mail_header); + } + mysql_free_result($result); +} +function email_users_obj($mail_from, $user_OBJ_array, $mail_subject, $mail_body, $mail_header) +{ + for($i = 0; $i< sizeof($user_OBJ_array); $i++) + { + mail($user_OBJ_array[$i]->getEmailAddress(), $mail_subject, $mail_body, $mail_header); + } +} +function email_users_id($mail_from, $user_ID_array, $mail_subject, $mail_body, $mail_header) +{ + for($i = 0; $i' . msg('message_no_files_found') . "\n"; + return -1; + } + + foreach($fileid_array as $fileid) + { + $file_obj = new FileData($fileid, $GLOBALS['connection'], DB_NAME); + if ($file_obj->getStatus() == 0 and $userperms_obj->getAuthority($fileid) >= $userperms_obj->WRITE_RIGHT) { - for($i = 0; $i< sizeof($user_OBJ_array); $i++) - { - mail($user_OBJ_array[$i]->getEmailAddress(), $mail_subject, $mail_body, $mail_header); - } + $lock = false; } - function email_users_id($mail_from, $user_ID_array, $mail_subject, $mail_body, $mail_header) + else { - for($i = 0; $igetDescription() == '') { - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); + $description = 'No description available'; } + // set filename for filesize() call below + //$filename = $dataDir . $file_obj->getId() . '.dat'; + $fid = $file_obj->getId(); - function list_files($fileid_array, $userperms_obj, $page_url, $dataDir, $sort_order = 'asc', $sort_by = 'id', $starting_index = 0, $stoping_index = 5, $showCheckBox = 'false', $with_caption = 'false') - { - $secureurl= new phpsecureurl; - if(sizeof($fileid_array)==0 || !isset($fileid_array[0])) - { - echo'' . msg('message_no_files_found') . "\n"; - return -1; - } - echo "\n".''."\n"; - $checkbox_index = 0; - $count = sizeof($fileid_array); - $css_td_class = "'listtable'"; - if($sort_order == 'asc') - { - $sort_img = $GLOBALS['CONFIG']['base_url'] . '/images/icon_sort_az.gif'; - $next_sort = 'desc'; - } - else if($sort_order == 'desc') - { - $sort_img = $GLOBALS['CONFIG']['base_url'] . '/images/icon_sort_za.gif'; - $next_sort = 'asc'; - } - else - { - $sort_img = $GLOBALS['CONFIG']['base_url'] . '/images/icon_sort_null'; - $next_sort = 'asc'; - } - echo ' '.$starting_index.'-'.$stoping_index.'/'; - echo $count; - echo(" " . msg('message_found_documents')."\n"); - echo('

'."\n"); - $index = $starting_index; - $url_pre = ''; - $url_post = ' '; - $default_url_pre = ""); - echo(""); - if($showCheckBox=='true') - { - echo ''; - } - if($sort_by == 'id') - { - $str = $url_pre.'ID'.$url_post; - } - else - { - $str = $default_url_pre . $secureurl->encode($link . 'id') . $default_url_mid.'ID'.$default_url_post; - } - echo($str); + // begin displaying file list with basic information + $comment = $file_obj->getComment(); + $description = $file_obj->getDescription(); + $description = substr($description, 0, 35); - echo ('' . msg('label_view') . ''); - if($sort_by == 'file_name') - { - $str = $url_pre.'File Name'.$url_post; - } - else - { - $str = $default_url_pre . $secureurl->encode($link .'file_name') . $default_url_mid.msg('label_file_name').$default_url_post; - } - echo($str); + $created_date = fix_date($file_obj->getCreatedDate()); + if ($file_obj->getModifiedDate()) + { + $modified_date = fix_date($file_obj->getModifiedDate()); + } - if($sort_by == 'description') - { - $str = $url_pre.msg('label_description').$url_post; - } - else - { - $str = $default_url_pre. $secureurl->encode($link .'description') . $default_url_mid.msg('label_description').$default_url_post; - } - echo($str); + //echo "$modified_date and $fid fid"; - if($sort_by == 'access_right') - { - $str = '' .msg('label_rights'). ''; - } - else - { - $str = '' .msg('label_rights'). ''; - } - echo($str); - if($sort_by == 'created_date') - { - $str = $url_pre . msg('label_created_date') . $url_post; - } - else - { - $str = $default_url_pre . $secureurl->encode($link .'created_date') . $default_url_mid . msg('label_created_date') . $default_url_post; - } - echo($str); + $full_name_array = $file_obj->getOwnerFullName(); + $owner_name = $full_name_array[1].', '.$full_name_array[0]; + //$user_obj = new User($file_obj->getOwner(), $file_obj->connection, $file_obj->database); + $dept_name = $file_obj->getDeptName(); + $realname = $file_obj->getRealname(); + //$filesize = $file_obj->getFileSize(); + //Get the file size in bytes. + $filesize = display_filesize($GLOBALS['CONFIG']['dataDir'] . $fileid. '.dat'); - if($sort_by == 'modified_on') + if ($userperms_obj->getAuthority($fileid) >= $userperms_obj->READ_RIGHT) + { + $suffix = strtolower((substr($realname,((strrpos($realname,".")+1))))); + if( !isset($GLOBALS['mimetypes']["$suffix"]) ) { - $str = $url_pre . msg('label_modified_date') . $url_post; + $lmimetype = $GLOBALS['mimetypes']['default']; } else { - $str = $default_url_pre . $secureurl->encode($link .'modified_on') . $default_url_mid.msg('label_modified_date').$default_url_post; + $lmimetype = $GLOBALS['mimetypes']["$suffix"]; } - echo($str); - if($sort_by == 'author') - { - $str = $url_pre . msg('author') . $url_post; - } - else - { - $str = $default_url_pre . $secureurl->encode($link .'author') . $default_url_mid . msg('author') . $default_url_post; - } - echo($str); + $view_link = 'view_file.php?submit=view&id=' . urlencode($fid).'&mimetype='.urlencode("$lmimetype"); + } + else + { + $view_link = ' '; + } - if($sort_by == 'department') - { - $str = $url_pre . msg('department') . $url_post; - } - else - { - $str = $default_url_pre . $secureurl->encode($link . 'department') . $default_url_mid . msg('department') . $default_url_post; - } - echo($str); - $str = '' . msg('label_size') . ''; - echo($str); + $details_link = $secureurl->encode('details.php?id=' . $fid . '&state=' . ($_REQUEST['state']+1)); - if($sort_by == 'status') - { - $str = '' . msg('label_status') . ' '; - } - else - { - $str = '' . msg('label_status') . ''; - } - echo($str); - echo ''; - echo ''; - $even_row_color = 'FCFCFC'; - $odd_row_color = 'E3E7F9'; - $unlock_highlighted_color = '#bdf9b6'; - $lock_highlighted_color = '#ea7741'; - echo "\n"; - if(!isset($fileid_array)) - { - echo ''; - return 0; - } - if(!isset($_REQUEST['state'])) + $read = array($userperms_obj->READ_RIGHT, 'r'); + $write = array($userperms_obj->WRITE_RIGHT, 'w'); + $admin = array($userperms_obj->ADMIN_RIGHT, 'a'); + $rights = array($read, $write, $admin); + $userright = $userperms_obj->getAuthority($file_obj->getId()); + $index_found = -1; + //$rights[max][0] = admin, $rights[max-1][0]=write, ..., $right[min][0]=view + //if $userright matches with $rights[max][0], then this user has all the rights of $rights[max][0] + //and everything below it. + for($i = sizeof($rights)-1; $i>=0; $i--) + { + if($userright==$rights[$i][0]) { - $_REQUEST['state']=1; + $index_found = $i; + $i = 0; } - while($index=$starting_index and $index<=$stoping_index) - { - if($index%2!=0) - { - $tr_bgcolor = $odd_row_color; - } - else - { - $tr_bgcolor = $even_row_color; - } - $file_obj = new FileData($fileid_array[$index], $GLOBALS['connection'], $GLOBALS['database']); - if ($file_obj->getStatus() == 0 and $userperms_obj->getAuthority($fileid_array[$index]) >= $userperms_obj->WRITE_RIGHT) - { - $lock = false; - $highlighted_color = $unlock_highlighted_color; - } - else - { - $lock = true; - $highlighted_color = $lock_highlighted_color; - } - - if($with_caption == true ) - { - // correction for empty description - echo ''; - } - else - { - echo ''; - } - if ($file_obj->getDescription() == '') - { - $description = 'No description available'; - } - // set filename for filesize() call below - //$filename = $dataDir . $file_obj->getId() . '.dat'; - $fid = $file_obj->getId(); - - - // begin displaying file list with basic information - $comment = $file_obj->getComment(); - $description = $file_obj->getDescription(); - $description = substr($description, 0, 35); + } + //Found the user right, now bold every below it. For those that matches, make them different. + for($i = $index_found; $i>=0; $i--) + { + $rights[$i][1]=''. $rights[$i][1] . ''; + } + //For everything above it, blank out + for($i = $index_found+1; $i$fid, + 'view_link'=>$view_link, + 'details_link'=>$details_link, + 'filename'=>$realname, + 'description'=>$description, + 'rights'=>$rights, + 'created_date'=>$created_date, + 'modified_date'=>$modified_date, + 'owner_name'=>$owner_name, + 'dept_name'=>$dept_name, + 'filesize'=>$filesize, + 'lock'=>$lock, + 'showCheckbox'=>$showCheckBox, + 'rejectpage'=>$rejectpage + ); + //print_r($file_list_arr);exit; - $created_date = fix_date($file_obj->getCreatedDate()); - if ($file_obj->getModifiedDate()) - { - $modified_date = fix_date($file_obj->getModifiedDate()); - } + } - //echo "$modified_date and $fid fid"; + //print_r($file_list_arr);exit; + $GLOBALS['smarty']->assign('file_list_arr', $file_list_arr); + //print_r($GLOBALS['smarty']); + display_smarty_template('out.tpl'); +} - $full_name_array = $file_obj->getOwnerFullName(); - $owner_name = $full_name_array[1].', '.$full_name_array[0]; - //$user_obj = new User($file_obj->getOwner(), $file_obj->connection, $file_obj->database); - $dept_name = $file_obj->getDeptName(); - $realname = $file_obj->getRealname(); - //$filesize = $file_obj->getFileSize(); - //Get the file size in bytes. - $filesize = display_filesize($GLOBALS['CONFIG']['dataDir'] . $fileid_array[$index] . '.dat'); +function sort_browser() +{ + ?> + - - -' . msg('label_page') . ':  '; - - //calculate number of pages for the number of hits on - $num_pages = ceil($total_hit/($page_limit)); - - //init - $shown_pages = 0; - $index_result = 0; - - // if there are more pages than the configed number of link allowed per page - // show all upto $link_limit - if($num_pages > $link_limit ) $shown_pages = $link_limit; - - // if the number is the same or less than, show all - else { $shown_pages = $num_pages; } - - // suppose $current_page=2, $page_limit=15, then this will give a link to print - // starting_index=15 and stopping_index=29. That will be the Prev. link. - // Page 0: 0-14, Page 1: 15-29, Page 2: 30-44 - if( $current_page > 0 ) - { - echo '' . msg('label_prev') . '   '; - } - - /* Suppose $link_limit is 20 and $current_page is 12. Then $i=12 - 10=2. - See for loop below to see what $i is. */ - if($current_page >= $link_limit/2) - { $i = $current_page - $link_limit/2; } - /* Suppose $current_page is 8. Then $i = 0*/ - else if($current_page < $link_limit/2) - { $i = 0; } - - // Suppose the admin define $link_limit = 20. That means there are only 20 links available - // on the navigator. Ten of them is for moving backward and the other 10 is for moving forward - // Suppose there are only 200 pages and $current_page is at 198. Then the last page is the 200, - // the max number of pages. - if( $current_page + ceil($link_limit/2) > $num_pages) $last_page = $num_pages; - - /* If not, the last page will be the current page + 10*/ - else $last_page = $current_page + ceil($link_limit/2); - /*Suppose $i=2, $link_limit is 20, $current_page is 12, and $last_page=12+10=22 - So why do I set $i? Since $current_page=12, then the for loop will start at link 2 - 12 - 22, - where 12 is right in the middle. Every time the user move forward, the window of 20 links, - 10 on the left and 10 on the right, will move.*/ - for(; $i < $last_page; $i++) - { - /* There is no need to have the current page be a link. The user only needs link - to move forward or backward. */ - //if($current_page== $i) echo $i . '  '; - $d = $i + 1; - if($current_page== $i) - { - echo $d . '  '; - } - - /* Generate link */ - else - echo '' . $d . '  '; - $index_result = $index_result + $page_limit; - } - - //Generate Next link - if( $current_page < $num_pages-1 ) - { - echo '' . msg('label_next') . '   '; - } - echo '
'; - } - - function sort_browser() - { -?> - '."\n"; -?> -
+ ///////////////////////////////FOR DEPARTMENT////////////////////////// + $query = "SELECT name, id FROM {$GLOBALS['CONFIG']['db_prefix']}department ORDER BY name ASC"; + $result = mysql_query($query, $GLOBALS['connection']) or die('Error in query'. mysql_error()); + $count = mysql_num_rows($result); + $index = 0; + echo("department_array = new Array();\n"); + while($index < $count) + { + list($dept, $id) = mysql_fetch_row($result); + echo("\tdepartment_array[$index] = new Array(\"$dept\", $id);\n"); + $index++; + } + ///////////////////////////////FOR FILE CATEGORY//////////////////////////////////////// + $query = "SELECT name, id FROM {$GLOBALS['CONFIG']['db_prefix']}category ORDER BY name ASC"; + $result = mysql_query($query, $GLOBALS['connection']) or die('Error in query'. mysql_error()); + $count = mysql_num_rows($result); + $index = 0; + echo("category_array = new Array();\n"); + while($index < $count) + { + list($category, $id) = mysql_fetch_row($result); + echo("\tcategory_array[$index] = new Array(\"$category\", $id);\n"); + $index++; + } + udf_functions_java_array(); + /////////////////////////////////////////////////////////////////////// + echo ''."\n"; + ?> + + + + + + + + + + + - -
- - -
-
-"); - } - } - function display_array2D($array) - { - for($i=0; $i"); - } - } - } - function makeRandomPassword() + + + + + + + "); } - function checkUserPermission($file_id, $permittable_right) - { - $userperm_obj = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], $GLOBALS['database']); - if(!$userperm_obj->user_obj->isAdmin() && $userperm_obj->getAuthority($file_id) < $permittable_right) - { - echo msg('error').': '.msg('message_unable_to_find_file') . "\n"; - echo ' ' . msg('message_please_email') . ' ' . msg('area_admin') . ''; - exit(); - } - } - function fmove($source_file, $destination_file) - { - //read and close - $lfhandler = fopen ($source_file, "r"); - $lfcontent = fread($lfhandler, filesize ($source_file)); - fclose ($lfhandler); - //write and close - $lfhandler = fopen ($destination_file, "w"); - fwrite($lfhandler, $lfcontent); - fclose ($lfhandler); - //delete source file - unlink($source_file); - } - /* return a 2D array of users. - array[0][0] = id - array[0][1] = "LastName, FirstName" - array[0][2] = "username" - */ - function getAllUsers() - { - $lquery = "SELECT id, last_name, first_name, username FROM {$GLOBALS['CONFIG']['db_prefix']}user"; - $lresult = mysql_query($lquery) or die(msg('error'). ':'. $lquery . mysql_error()); - $llen = mysql_num_rows($lresult); - $return_array = array(); - for($li = 0;$li<$llen; $li++) - { - list($lid, $llast_name, $lfirst_name, $lusername) = mysql_fetch_row($lresult); - $return_array[$li] = array($lid, "$llast_name, $lfirst_name", $lusername); - } - return $return_array; - } - function display_filesize($file) +} +function display_array2D($array) +{ + for($i=0; $i"); + } + } +} +function makeRandomPassword() +{ + $pass=''; + $salt = 'abchefghjkmnpqrstuvw3456789'; + srand((double)microtime()*1000000); + $i = 0; + while ($i <= 7) + { + $num = rand() % 33; + $tmp = substr($salt, $num, 1); + $pass = $pass . $tmp; + $i++; + } + return $pass; +} +function checkUserPermission($file_id, $permittable_right) +{ + $userperm_obj = new UserPermission($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); + if(!$userperm_obj->user_obj->isAdmin() && $userperm_obj->getAuthority($file_id) < $permittable_right) + { + echo msg('error').': '.msg('message_unable_to_find_file') . "\n"; + echo ' ' . msg('message_please_email') . ' ' . msg('area_admin') . ''; + exit(); + } +} +function fmove($source_file, $destination_file) +{ + //read and close + $lfhandler = fopen ($source_file, "r"); + $lfcontent = fread($lfhandler, filesize ($source_file)); + fclose ($lfhandler); + //write and close + $lfhandler = fopen ($destination_file, "w"); + fwrite($lfhandler, $lfcontent); + fclose ($lfhandler); + //delete source file + unlink($source_file); +} +/* return a 2D array of users. + array[0][0] = id + array[0][1] = "LastName, FirstName" + array[0][2] = "username" +*/ +function getAllUsers() +{ + $lquery = "SELECT id, last_name, first_name, username FROM {$GLOBALS['CONFIG']['db_prefix']}user"; + $lresult = mysql_query($lquery) or die(msg('error'). ':'. $lquery . mysql_error()); + $llen = mysql_num_rows($lresult); + $return_array = array(); + for($li = 0;$li<$llen; $li++) + { + list($lid, $llast_name, $lfirst_name, $lusername) = mysql_fetch_row($lresult); + $return_array[$li] = array($lid, "$llast_name, $lfirst_name", $lusername); + } + return $return_array; +} +function display_filesize($file) +{ + // Does the file exist? + if(is_file($file)) + { - //Setup some common file size measurements. - $kb=1024; - $mb=1048576; - $gb=1073741824; - $tb=1099511627776; + //Setup some common file size measurements. + $kb=1024; + $mb=1048576; + $gb=1073741824; + $tb=1099511627776; - //Get the file size in bytes. - $size = filesize($file); + //Get the file size in bytes. + $size = filesize($file); - //Format file size + //Format file size - if($size < $kb) - { - return $size." B"; - } - elseif($size < $mb) - { - return round($size/$kb,2)." KB"; - } - elseif($size < $gb) - { - return round($size/$mb,2)." MB"; - } - elseif($size < $tb) - { - return round($size/$gb,2)." GB"; - } - else - { - return round($size/$tb,2)." TB"; - } - } - else - { - return "X"; - } + if($size < $kb) + { + return $size." B"; } - function valid_username($username) + elseif($size < $mb) { - $unrx = '/^[a-z]+[\w.-]*$/i'; // allow only letters and numbers. Limit 5 - 25 characters. - if(!preg_match($unrx, $username)) - return false; - else - return true; + return round($size/$kb,2)." KB"; + } + elseif($size < $gb) + { + return round($size/$mb,2)." MB"; + } + elseif($size < $tb) + { + return round($size/$gb,2)." GB"; + } + else + { + return round($size/$tb,2)." TB"; } + } + else + { + return "X"; + } +} +function valid_username($username) +{ + if(preg_match('/^\w+$/',$username)) + return true; + else + return false; +} + -function cleanInput($input) { - -$search = array( - '@]*?>.*?@si', // Strip out javascript - '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags - '@]*?>.*?@siU', // Strip style tags properly - '@@' // Strip multi-line comments -); - +function cleanInput($input) +{ + + $search = array( + '@]*?>.*?@si', // Strip out javascript + '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags + '@]*?>.*?@siU', // Strip style tags properly + '@@' // Strip multi-line comments + ); $output = preg_replace($search, '', $input); return $output; } -function sanitizeme($input) { - if (is_array($input)) +function sanitizeme($input) +{ + if (is_array($input)) { - foreach($input as $var=>$val) + foreach($input as $var=>$val) { $output[$var] = sanitizeme($val); } - } - else + } + else { - if (get_magic_quotes_gpc()) + if (get_magic_quotes_gpc()) { $input = stripslashes($input); } + //echo "Raw Input:" . $input . "
"; $input = cleanInput($input); + //echo "Clean Input:" . $input . "
"; $output = mysql_real_escape_string($input); + //echo "mysql_escape output" . $output . "
"; + } if(isset($output) && $output != '') { @@ -1017,12 +764,14 @@ function sanitizeme($input) { return false; } } + /** * Translate a string using the global lang set * @param string $s * @return string */ -function msg($s){ +function msg($s) +{ if (isset($GLOBALS['lang'][$s])) { return $GLOBALS['lang'][$s]; @@ -1031,10 +780,31 @@ function msg($s){ { //error_log("l10n error:LANG:" . // $GLOBALS['CONFIG']['language']. ",message:'$s'"); + return $s; } } +/* + * This function will check for the existence of a template file + * in the current template folder and if not there will search for it + * in the templates/common folder. This is a form of over-ride for customizations + * @param string $template_file The name of the template file ending in .tpl +*/ +function display_smarty_template($template_file) +{ + /* @var $template_file string */ + if(file_exists('templates/' . $GLOBALS['CONFIG']['theme'] . '/' . $template_file)) + { + $GLOBALS['smarty']->display($template_file); + } + else + { + $GLOBALS['smarty']->display(ABSPATH . '/templates/common/' . $template_file); + } +} + + /* * callPluginMethod * @param string $method The name of the plugin method being envoked. @@ -1051,4 +821,4 @@ function callPluginMethod($method) $plugin_obj = new $value; $plugin_obj->$method(); } - } \ No newline at end of file + } diff --git a/history.php b/history.php index 3b95dd99..7860c3a4 100644 --- a/history.php +++ b/history.php @@ -2,7 +2,7 @@ /* history.php - display revision history Copyright (C) 2002, 2003, 2004 Stephen Lawrence Jr., Khoa Nguyen -Copyright (C) 2005-2010 Stephen Lawrence Jr. +Copyright (C) 2005-2011 Stephen Lawrence Jr. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -27,7 +27,7 @@ header('Location:index.php?redirection=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); exit; } -include('config.php'); +include('odm-load.php'); if (!isset($_REQUEST['id']) || $_REQUEST['id'] == '') { @@ -51,7 +51,7 @@ { list($_REQUEST['id'], $lrevision_id) = explode('_' , $_REQUEST['id']); } -$datafile = new FileData($_REQUEST['id'], $GLOBALS['connection'], $GLOBALS['database']); +$datafile = new FileData($_REQUEST['id'], $GLOBALS['connection'], DB_NAME); // verify if ($datafile->getError() != NULL) { diff --git a/in.php b/in.php index ac67623c..b23dbb8f 100644 --- a/in.php +++ b/in.php @@ -1,7 +1,7 @@ + + + + + + AutoFill example + + + + + + + +
+
+ AutoFill example +
+ +

Preamble

+

+ AutoFill provides a number of customisable callback functions so you can tailor it's + actions to exactly what you need. This specific example shows fnCallback, which is fired when the mouse is released. Further documentation is below. +

+ +
    +
  • + fnRead - Called when a cell is read for it's value. This allows you to override the default of reading the HTML value (or 'input' elements value if there is one present). For example reading the value from a select list. +
      +
    • Parameter 1: Node - TD element to be read from
    • +
    • Returns: String - read value
    • +
    +
  • +
  • + fnWrite - Called when a cell is to read to. This allows you to write in a specific format, or perhaps to an element within the cell. +
      +
    • Parameter 1: Node - TD element to be written to
    • +
    • Parameter 2: String - Value to write
    • +
    • Parameter 3: Boolean - Last cell to be written (useful for speeding up DataTables' fnUpdate)
    • +
    • Returns: void
    • +
    +
  • +
  • + fnStep - Called to calculate the new value to give to a cell +
      +
    • Parameter 1: Node - TD element to be written to
    • +
    • Parameter 2: String - Statement with a token to be replace with the calculated value
    • +
    • Parameter 3: Int - Step counter
    • +
    • Parameter 4: Boolean - increment (true), or decrement (false)
    • +
    • Parameter 5: String - Token to replace
    • +
    • Returns: String - string to write into the cell
    • +
    +
  • +
  • + fnCallback - Called when the AutoFill is complete, with information about the fill. This can be useful for updating a server database for example. +
      +
    • Parameter 1: Array - An array of objects with information about each cell that was written to. Object parameters are: "td", "newValue" and "oldValue".
    • +
    • Returns: void
    • +
    +
  • +
+ + +

Live example

+
+
+ Information about each update will appear here.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable();
+	new AutoFill( oTable, {
+		"aoColumnDefs": [ {
+			"fnCallback": function ( ao ) {
+				var n = document.getElementById('output');
+				for ( var i=0, iLen=ao.length ; i<iLen ; i++ ) {
+					n.innerHTML += "Update: old value: {"+
+						ao[i].oldValue+"} - new value: {"+ao[i].newValue+"}<br>";
+				}
+				n.scrollTop = n.scrollHeight;
+			},
+			"aTargets": [ "_all" ]
+		} ]
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/columns.html b/includes/DataTables-1.7.5/extras/AutoFill/columns.html new file mode 100755 index 00000000..2d7ad1d5 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/columns.html @@ -0,0 +1,503 @@ + + + + + + + AutoFill example + + + + + + + +
+
+ AutoFill example with column selection options +
+ +

Preamble

+

+ Columns can be enabled (default) and disabled from providing the end user the AutoFill option + by using either aoColumns or aoColumnDefs and the bEnable option. These two arrays work in + exactly the same way has for DataTables. +

+

+ This example shows how disabling columns counting from the right hand side of the table + can be achieved. In this case, the last three columns. +

+ + +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable();
+	new AutoFill( oTable, {
+		"aoColumnDefs": [ {
+			"bEnable": false,
+			"aTargets": [ -1, -2, -3 ]
+		} ]
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/index.html b/includes/DataTables-1.7.5/extras/AutoFill/index.html new file mode 100755 index 00000000..c9e95570 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/index.html @@ -0,0 +1,489 @@ + + + + + + + AutoFill example + + + + + + + +
+
+ AutoFill example +
+ +

Preamble

+

+ AutoFill gives an Excel like option to a DataTable to click and drag over multiple + cells, filling in information over the selected cells and incrementing numbers as needed. +

+

Thanks to Phoniax AS for their sponsorship of this plug-in for DataTables.

+ + + +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable();
+	new AutoFill( oTable );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/inputs.html b/includes/DataTables-1.7.5/extras/AutoFill/inputs.html new file mode 100755 index 00000000..bdb91400 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/inputs.html @@ -0,0 +1,519 @@ + + + + + + + AutoFill example + + + + + + + +
+
+ AutoFill example with input elements +
+ +

Preamble

+

+ AutoFill works with Input elements and Select elements, as well as plain HTML cells. This + example shows all inputs cells, combined with DataTables' DOM sorting plug-in. You can + even combine input and plain HTML cells if you wanted (useful from something like jEditable). +

+ + + +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
+{
+	var aData = [];
+	$( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
+		aData.push( this.value );
+	} );
+	return aData;
+}
+
+$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"aoColumnDefs": [
+			{ "sSortDataType": "dom-text", "aTargets": [ "_all" ] },
+			{ "sType": "numeric", "aTargets": [ -2 ] }
+		]
+	} );
+	new AutoFill( oTable );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/css/AutoFill.css b/includes/DataTables-1.7.5/extras/AutoFill/media/css/AutoFill.css new file mode 100644 index 00000000..cab59b3a --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/css/AutoFill.css @@ -0,0 +1,24 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * AutoFill styles + */ + +div.AutoFill_filler { + display: none; + position: absolute; + height: 14px; + width: 14px; + background: url(../images/filler.png) no-repeat center center; + z-index: 1002; +} + +div.AutoFill_border { + display: none; + position: absolute; + background-color: #0063dc; + z-index: 1001; + + box-shadow: 0px 0px 5px #76b4ff; + -moz-box-shadow: 0px 0px 5px #76b4ff; + -webkit-box-shadow: 0px 0px 5px #76b4ff; +} + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/css/default.css b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/css/default.css new file mode 100644 index 00000000..b9dde3b1 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/css/default.css @@ -0,0 +1,418 @@ +/* + * TABLE OF CONTENTS: + * - Browser reset + * - HTML elements + * - JsDoc styling + */ + + + + + + +/* + * BEGIN BROWSER RESET + */ + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { + margin:0; + padding:0 +} +html { + height:100%; + overflow:-moz-scrollbars-vertical; + overflow-x:auto +} +table { + border:0; + border-collapse:collapse; + border-spacing:0 +} +fieldset,img { + border:0 +} +address,caption,cite,code,dfn,em,strong,th,var { + font-style:normal; + font-weight:normal +} +em,cite { + font-style:italic +} +strong { + font-weight:bold +} +ol,ul { + list-style:none +} +caption,th { + text-align:left +} +h1,h2,h3,h4,h5,h6 { + font-size:100%; + font-weight:normal; + margin:0; + padding:0 +} +q:before,q:after { + content:'' +} +abbr,acronym { + border:0 +} + +/* + * END BROWSER RESET + */ + + + + + + +/* + * HTML ELEMENTS + */ + +* { + line-height: 1.4em; +} + +html { + font-size: 100%; +} + +body { + font-size: 0.75em !important; + padding: 15px 0; + background: #eee; + background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9); + background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)); + } + +body, +input, +select, +textarea { + color: #000; + font-family: Arial, Geneva, sans-serif; +} + +a:link, +a:hover, +a:active, +a:visited { + color: #19199e; +} +a:hover, +a:focus { + color: #00f; + text-decoration: none; +} + +p { + margin: 0 0 1.5em 0; +} + +/* + * END HTML ELEMENTS + */ + + + +/* + * BEGIN HACK + */ + +div.containerMain:after, +div.safeBox:after { + content:""; + display:block; + height:0; + clear:both; +} + +/* + * END HACK + */ + + + +/* + * BEGIN JSDOC + */ + +div.index *.heading1 { + margin-bottom: 0.5em; + border-bottom: 1px solid #999999; + padding: 0.5em 0 0.1em 0; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.3em; + letter-spacing: 1px; +} + +div.index { + float: left; + width: 30%; + min-width: 100px; + max-width: 250px; +} +div.index div.menu { + margin: 0 15px 0 -15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + padding: 15px 15px 15px 30px; + background-color: #FFFFFF; + background-color: rgba(255, 255, 255, 0.5); + -moz-box-shadow: 0px 0px 10px #c4c4c4; + -webkit-box-shadow: 0px 0px 10px #c4c4c4; + box-shadow: 0px 0px 10px #c4c4c4; +} +*+html div.index div.menu { + background-color: #FFFFFF; +} +* html div.index div.menu { + background-color: #FFFFFF; +} + +div.index div.menu div { + text-align: left; +} + +div.index div.menu a { + text-decoration: none; +} +div.index div.menu a:hover { + text-decoration: underline; +} + +div.index ul.classList a { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.index div.fineprint { + padding: 15px 30px 15px 15px; + color: #777; + font-size: 0.9em; +} +div.index div.fineprint a { + color: #777; +} + + + +div.content { + float: left; + width: 70%; + min-width: 300px; + max-width: 600px; +} +div.innerContent { + padding: 0 0 0 2.5em; +} + +div.content ul, +div.content ol { + margin-bottom: 3em; +} + +div.content *.classTitle { + margin-bottom: 0.5em; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 2.5em; + letter-spacing: 2px; +} + +div.content *.classTitle span { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.content p.summary { + font-size: 1.2em; +} + +div.content ul *.classname a, +div.content ul *.filename a { + font-family: Consolas, "Courier New", Courier, monospace; + text-decoration: none; + font-weight: bold; +} +div.content ul *.classname a:hover, +div.content ul *.filename a:hover { + text-decoration: underline; +} + +div.content div.props { + position: relative; + left: -10px; + margin-bottom: 2.5em; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 10px 15px 15px 15px; + overflow: hidden; + background: #fff; + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ + background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); + -moz-box-shadow: 0px 0px 10px #ccc; + -webkit-box-shadow: 0px 0px 5px #bbb; + box-shadow: 0px 0px 5px #bbb; +} + +div.content div.props div.sectionTitle { + padding-bottom: 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +div.content div.hr { + margin: 0 10px 0 0; + height: 4em; +} + + + +table.summaryTable { + position: relative; + left: -10px; + width: 100%; + border-collapse: collapse; + box-sizing: content-box; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -ms-box-sizing: content-box; + -o-box-sizing: content-box; + -icab-box-sizing: content-box; + -khtml-box-sizing: content-box; +} + +table.summaryTable caption { + padding: 0 10px 10px 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +table.summaryTable td, +table.summaryTable th { + padding: 0px 10px 10px 10px; + vertical-align: top; +} +table.summaryTable tr:last-child td { + padding-bottom: 0; +} + +table.summaryTable th { + font-weight: bold; +} + +table.summaryTable td.attributes { + width: 35%; + font-family: Consolas, "Courier New", Courier, monospace; + color: #666; +} + +table.summaryTable td.nameDescription { + width: 65% +} + +table.summaryTable td.nameDescription div.fixedFont { + font-weight: bold; +} + +table.summaryTable div.description { + color: #333; +} + + + +dl.detailList { + margin-top: 0.5em; +} + +dl.detailList.nomargin + dl.detailList.nomargin { + margin-top: 0; +} + +dl.detailList dt { + display: inline; + margin-right: 5px; + font-weight: bold; +} + +dl.detailList dt:before { + display: block; + content: ""; +} + +dl.detailList dd { + display: inline; +} + +dl.detailList.params dt { + display: block; +} +dl.detailList.params dd { + display: block; + padding-left: 2em; + padding-bottom: 0.4em; +} + + + + +ul.fileList li { + margin-bottom: 1.5em; +} + + + +.fixedFont { + font-family: Consolas, "Courier New", Courier, monospace; +} + +.fixedFont.heading { + margin-bottom: 0.5em; + font-size: 1.25em; + line-height: 1.1em +} + +.fixedFont.heading + .description { + font-size: 1.2em; +} + +.fixedFont.heading .light, +.fixedFont.heading .lighter { + font-weight: bold; +} + +pre.code { + margin: 10px 0 10px 0; + padding: 10px; + border: 1px solid #ccc; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: auto; + font-family: Consolas, "Courier New", Courier, monospace; + background: #eee; +} + +.light { + color: #666; +} + +.lighter { + color: #999; +} + +.clear { + clear: both; + width: 100%; + min-height: 0; +} + +/* + * END JSDOC + */ \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/files.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/files.html new file mode 100644 index 00000000..fb34805d --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/files.html @@ -0,0 +1,79 @@ + + + + + + JsDoc Reference - File Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

File Index

+ + +
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/index.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/index.html new file mode 100644 index 00000000..553e5aa3 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/index.html @@ -0,0 +1,115 @@ + + + + + JsDoc Reference - Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

Class Index

+ +
    + +
  • +

    _global_

    +

    +
  • + +
  • +

    AutoFill

    +

    AutoFill

    +
  • + +
  • +

    AutoFill#dom

    +

    Common and useful DOM elements for the class instance

    +
  • + +
  • +

    AutoFill#s

    +

    Settings object which contains customisable information for AutoFill instance

    +
  • + +
  • +

    AutoFill#s.border

    +

    Cached information about the border display

    +
  • + +
  • +

    AutoFill#s.columns

    +

    Information stored for each column.

    +
  • + +
  • +

    AutoFill#s.drag

    +

    Store for live information for the current drag

    +
  • + +
  • +

    AutoFill#s.filler

    +

    Cached information about the little dragging icon (the filler)

    +
  • + +
  • +

    AutoFill#s.screen

    +

    Data cache for information that we need for scrolling the screen when we near + the edges

    +
  • + +
  • +

    AutoFill#s.scroller

    +

    Data cache for the position of the DataTables scrolling element (when scrolling + is enabled)

    +
  • + +
+
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#dom.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#dom.html new file mode 100644 index 00000000..1dfd7de9 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#dom.html @@ -0,0 +1,159 @@ + + + + + + + JsDoc Reference - AutoFill#dom + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#dom +

+ +

+ + + + + Common and useful DOM elements for the class instance + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#dom +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.border.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.border.html new file mode 100644 index 00000000..40b58ea2 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.border.html @@ -0,0 +1,159 @@ + + + + + + + JsDoc Reference - AutoFill#s.border + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.border +

+ +

+ + + + + Cached information about the border display + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.border +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.columns.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.columns.html new file mode 100644 index 00000000..5be5b209 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.columns.html @@ -0,0 +1,159 @@ + + + + + + + JsDoc Reference - AutoFill#s.columns + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.columns +

+ +

+ + + + + Information stored for each column. An array of objects + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.columns +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.drag.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.drag.html new file mode 100644 index 00000000..1725f599 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.drag.html @@ -0,0 +1,159 @@ + + + + + + + JsDoc Reference - AutoFill#s.drag + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.drag +

+ +

+ + + + + Store for live information for the current drag + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.drag +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.filler.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.filler.html new file mode 100644 index 00000000..d453aea0 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.filler.html @@ -0,0 +1,159 @@ + + + + + + + JsDoc Reference - AutoFill#s.filler + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.filler +

+ +

+ + + + + Cached information about the little dragging icon (the filler) + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.filler +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.html new file mode 100644 index 00000000..0ab936c7 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.html @@ -0,0 +1,164 @@ + + + + + + + JsDoc Reference - AutoFill#s + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s +

+ +

+ + + + + Settings object which contains customisable information for AutoFill instance + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.screen.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.screen.html new file mode 100644 index 00000000..adb913a2 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.screen.html @@ -0,0 +1,160 @@ + + + + + + + JsDoc Reference - AutoFill#s.screen + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.screen +

+ +

+ + + + + Data cache for information that we need for scrolling the screen when we near + the edges + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.screen +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.scroller.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.scroller.html new file mode 100644 index 00000000..90731744 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill#s.scroller.html @@ -0,0 +1,160 @@ + + + + + + + JsDoc Reference - AutoFill#s.scroller + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:50 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace AutoFill#s.scroller +

+ +

+ + + + + Data cache for the position of the DataTables scrolling element (when scrolling + is enabled) + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ AutoFill#s.scroller +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill.html new file mode 100644 index 00000000..0cc5ae83 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/AutoFill.html @@ -0,0 +1,1470 @@ + + + + + + + JsDoc Reference - AutoFill + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Class AutoFill +

+ +

+ + + + + AutoFill + + +
Defined in: AutoFill.js. + +

+ + +
+ + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ AutoFill(DataTables, Configuration) +
+
AutoFill provides Excel like auto fill features for a DataTable
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<constant>   +
+ CLASS +
+
Name of this class
+
<static> <constant>   +
+ AutoFill.VERSION +
+
AutoFill version
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<private>   + +
+
<private>   +
_fnColumnDefs(aoColumnDefs) +
+
+
<private>   +
_fnColumnOptions(i, opts) +
+
+
<private>   +
_fnColumnsAll(aoColumns) +
+
+
<private>   + +
Display the drag handle on mouse over cell
+
<private>   + +
Mouse move event handler for during a move.
+
<private>   + +
Mouse down event handler for starting a drag
+
<private>   + +
Mouse release handler - end the drag and take action to update the cells with the needed values
+
<private>   + +
Position the filler icon over a cell
+
<private>   +
_fnInit(oDT, oConfig) +
+
Initialisation
+
<private>   +
_fnPrep(sStr) +
+
Chunk a string such that it can be filled in by the stepper function
+
<private>   +
_fnReadCell(nTd) +
+
Read informaiton from a cell, possibly using live DOM elements if suitable
+
<private>   +
_fnStep(nTd, oPrepped, iDiff, bIncrement, sToken) +
+
Render a string for it's position in the table after the drag (incrememt numbers)
+
<private>   + +
Find out the coordinates of a given TD cell in a table
+
<private>   +
_fnUpdateBorder(nStart, nEnd) +
+
Display the border around one or more cells (from start to end)
+
<private>   +
_fnWriteCell(nTd, sVal, bLast) +
+
Write informaiton to a cell, possibly using live DOM elements if suitable
+
  + +
Retreieve the settings object from an instance
+
+
+ + + + + + + + + + +
+
+ + +
+ Class Detail +
+ +
+ AutoFill(DataTables, Configuration) +
+ +
+ AutoFill provides Excel like auto fill features for a DataTable + +
+ + + + +
+
Parameters:
+ +
+ {object} DataTables + +
+
settings object
+ +
+ {object} Configuration + +
+
object for AutoFill
+ +
+ + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <constant> + + + {String} + + CLASS +
+ +
+ Name of this class + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ AutoFill +
+ +
+ + +
+ + + +
+ + <static> <constant> + + + {String} + + AutoFill.VERSION +
+ +
+ AutoFill version + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ 1.1.1 +
+ +
+ + + + +
+
+ + + + +
+
+
+ Method Detail +
+ + + + +
+ + <private> + + + + + _fnAddColumn(i) +
+ +
+ + + + + +
+ + + + +
+
Parameters:
+ +
+ i + +
+
+ +
+ + + + +
+ + + +
+ + <private> + + + + + _fnColumnDefs(aoColumnDefs) +
+ +
+ + + + + +
+ + + + +
+
Parameters:
+ +
+ aoColumnDefs + +
+
+ +
+ + + + +
+ + + +
+ + <private> + + + + + _fnColumnOptions(i, opts) +
+ +
+ + + + + +
+ + + + +
+
Parameters:
+ +
+ i + +
+
+ +
+ opts + +
+
+ +
+ + + + +
+ + + +
+ + <private> + + + + + _fnColumnsAll(aoColumns) +
+ +
+ + + + + +
+ + + + +
+
Parameters:
+ +
+ aoColumns + +
+
+ +
+ + + + +
+ + + +
+ + <private> + + + + + _fnFillerDisplay(e) +
+ +
+ Display the drag handle on mouse over cell + + + + +
+ + + + +
+
Parameters:
+ +
+ {Object} e + +
+
Event object
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnFillerDragMove(e) +
+ +
+ Mouse move event handler for during a move. See if we want to update the display based on the +new cursor position + + + + +
+ + + + +
+
Parameters:
+ +
+ {Object} e + +
+
Event object
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnFillerDragStart(e) +
+ +
+ Mouse down event handler for starting a drag + + + + +
+ + + + +
+
Parameters:
+ +
+ {Object} e + +
+
Event object
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnFillerFinish(e) +
+ +
+ Mouse release handler - end the drag and take action to update the cells with the needed values + + + + +
+ + + + +
+
Parameters:
+ +
+ {Object} e + +
+
Event object
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnFillerPosition(nTd) +
+ +
+ Position the filler icon over a cell + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nTd + +
+
Cell to position filler icon over
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnInit(oDT, oConfig) +
+ +
+ Initialisation + + + + +
+ + + + +
+
Parameters:
+ +
+ {object} oDT + +
+
DataTables settings object
+ +
+ {object} oConfig + +
+
Configuration object for AutoFill
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Object} + + _fnPrep(sStr) +
+ +
+ Chunk a string such that it can be filled in by the stepper function + + + + +
+ + + + +
+
Parameters:
+ +
+ {String} sStr + +
+
String to prep
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{Object} with parameters, iStart, sStr and sPostFix
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {String} + + _fnReadCell(nTd) +
+ +
+ Read informaiton from a cell, possibly using live DOM elements if suitable + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nTd + +
+
Cell to read
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{String} Read value
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {String} + + _fnStep(nTd, oPrepped, iDiff, bIncrement, sToken) +
+ +
+ Render a string for it's position in the table after the drag (incrememt numbers) + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nTd + +
+
Cell being written to
+ +
+ {Object} oPrepped + +
+
Prepared object for the stepper (from _fnPrep)
+ +
+ {Int} iDiff + +
+
Step difference
+ +
+ {Boolean} bIncrement + +
+
Increment (true) or decriment (false)
+ +
+ {String} sToken + +
+
Token to replace
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{String} Rendered information
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Object} + + _fnTargetCoords(nTd) +
+ +
+ Find out the coordinates of a given TD cell in a table + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nTd + +
+
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{Object} x and y properties, for the position of the cell in the tables DOM
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnUpdateBorder(nStart, nEnd) +
+ +
+ Display the border around one or more cells (from start to end) + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nStart + +
+
Starting cell
+ +
+ {Node} nEnd + +
+
Ending cell
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnWriteCell(nTd, sVal, bLast) +
+ +
+ Write informaiton to a cell, possibly using live DOM elements if suitable + + + + +
+ + + + +
+
Parameters:
+ +
+ {Node} nTd + +
+
Cell to write
+ +
+ {String} sVal + +
+
Value to write
+ +
+ {Boolean} bLast + +
+
Flag to show if this is that last update
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + + + + {object} + + fnSettings() +
+ +
+ Retreieve the settings object from an instance + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
{object} AutoFill settings object
+ + + + + + + +
+ + + + +
+
+ + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/_global_.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/_global_.html new file mode 100644 index 00000000..914b6663 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/_global_.html @@ -0,0 +1,109 @@ + + + + + + + JsDoc Reference - _global_ + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:49 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Built-In Namespace _global_ +

+ +

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/src/js_AutoFill.js.html b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/src/js_AutoFill.js.html new file mode 100644 index 00000000..e294a563 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/docs/symbols/src/js_AutoFill.js.html @@ -0,0 +1,821 @@ +
  1 /*
+  2  * File:        AutoFill.js
+  3  * Version:     1.1.1
+  4  * CVS:         $Id$
+  5  * Description: AutoFill for DataTables
+  6  * Author:      Allan Jardine (www.sprymedia.co.uk)
+  7  * Created:     Mon  6 Sep 2010 16:54:41 BST
+  8  * Modified:    $Date$ by $Author$
+  9  * Language:    Javascript
+ 10  * License:     GPL v2 or BSD 3 point
+ 11  * Project:     DataTables
+ 12  * Contact:     www.sprymedia.co.uk/contact
+ 13  * 
+ 14  * Copyright 2010 Allan Jardine, all rights reserved.
+ 15  *
+ 16  */
+ 17 
+ 18 /* Global scope for AutoFill */
+ 19 var AutoFill;
+ 20 
+ 21 (function($) {
+ 22 
+ 23 /** 
+ 24  * AutoFill provides Excel like auto fill features for a DataTable
+ 25  * @class AutoFill
+ 26  * @constructor
+ 27  * @param {object} DataTables settings object
+ 28  * @param {object} Configuration object for AutoFill
+ 29  */
+ 30 AutoFill = function( oDT, oConfig )
+ 31 {
+ 32 	/* Santiy check that we are a new instance */
+ 33 	if ( !this.CLASS || this.CLASS != "AutoFill" )
+ 34 	{
+ 35 		alert( "Warning: AutoFill must be initialised with the keyword 'new'" );
+ 36 		return;
+ 37 	}
+ 38 
+ 39 	if ( !$.fn.dataTableExt.fnVersionCheck('1.7.0') )
+ 40 	{
+ 41 		alert( "Warning: AutoFill requires DataTables 1.7 or greater - www.datatables.net/download");
+ 42 		return;
+ 43 	}
+ 44 	
+ 45 	
+ 46 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ 47 	 * Public class variables
+ 48 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ 49 	
+ 50 	/**
+ 51 	 * @namespace Settings object which contains customisable information for AutoFill instance
+ 52 	 */
+ 53 	this.s = {
+ 54 		/**
+ 55 		 * @namespace Cached information about the little dragging icon (the filler)
+ 56 		 */
+ 57 		filler: {
+ 58 			height: 0,
+ 59 			width: 0
+ 60 		},
+ 61 		
+ 62 		/**
+ 63 		 * @namespace Cached information about the border display
+ 64 		 */
+ 65 		border: {
+ 66 			width: 2
+ 67 		},
+ 68 		
+ 69 		/**
+ 70 		 * @namespace Store for live information for the current drag
+ 71 		 */
+ 72 		drag: {
+ 73 			startX: -1,
+ 74 			startY: -1,
+ 75 			startTd: null,
+ 76 			endTd: null,
+ 77 			dragging: false
+ 78 		},
+ 79 		
+ 80 		/**
+ 81 		 * @namespace Data cache for information that we need for scrolling the screen when we near
+ 82 		 *   the edges
+ 83 		 */
+ 84 		screen: {
+ 85 			interval: null,
+ 86 			y: 0,
+ 87 			height: 0,
+ 88 			scrollTop: 0
+ 89 		},
+ 90 		
+ 91 		/**
+ 92 		 * @namespace Data cache for the position of the DataTables scrolling element (when scrolling
+ 93 		 *   is enabled)
+ 94 		 */
+ 95 		scroller: {
+ 96 			top: 0,
+ 97 			bottom: 0
+ 98 		},
+ 99 		
+100 		
+101 		/**
+102 		 * @namespace Information stored for each column. An array of objects
+103 		 */
+104 		columns: []
+105 	};
+106 	
+107 	
+108 	/**
+109 	 * @namespace Common and useful DOM elements for the class instance
+110 	 */
+111 	this.dom = {
+112 		table: null,
+113 		filler: null,
+114 		borderTop: null,
+115 		borderRight: null,
+116 		borderBottom: null,
+117 		borderLeft: null,
+118 		currentTarget: null
+119 	};
+120 	
+121 	
+122 	
+123 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+124 	 * Public class methods
+125 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+126 	
+127 	/**
+128 	 * Retreieve the settings object from an instance
+129 	 *  @method fnSettings
+130 	 *  @returns {object} AutoFill settings object
+131 	 */
+132 	this.fnSettings = function () {
+133 		return this.s;
+134 	};
+135 	
+136 	
+137 	/* Constructor logic */
+138 	this._fnInit( oDT, oConfig );
+139 	return this;
+140 };
+141 
+142 
+143 
+144 AutoFill.prototype = {
+145 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+146 	 * Private methods (they are of course public in JS, but recommended as private)
+147 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+148 	
+149 	/**
+150 	 * Initialisation
+151 	 *  @method _fnInit
+152  	 *  @param {object} oDT DataTables settings object
+153  	 *  @param {object} oConfig Configuration object for AutoFill
+154 	 *  @returns void
+155 	 */
+156 	_fnInit: function ( oDT, oConfig )
+157 	{
+158 		var
+159 			that = this,
+160 			i, iLen;
+161 		
+162 		/*
+163 		 * Settings
+164 		 */
+165 		this.s.dt = oDT.fnSettings();
+166 		
+167 		this.dom.table = this.s.dt.nTable;
+168 		
+169 		/* Add and configure the columns */
+170 		for ( i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+171 		{
+172 			this._fnAddColumn( i );
+173 		}
+174 		
+175 		if ( typeof oConfig != 'undefined' && typeof oConfig.aoColumnDefs != 'undefined' )
+176 		{
+177 			this._fnColumnDefs( oConfig.aoColumnDefs );
+178 		}
+179 		
+180 		if ( typeof oConfig != 'undefined' && typeof oConfig.aoColumns != 'undefined' )
+181 		{
+182 			this._fnColumnsAll( oConfig.aoColumns );
+183 		}
+184 		
+185 		
+186 		/*
+187 		 * DOM
+188 		 */
+189 		
+190 		/* Auto Fill click and drag icon */
+191 		var filler = document.createElement('div');
+192 		filler.className = "AutoFill_filler";
+193 		document.body.appendChild( filler );
+194 		this.dom.filler = filler;
+195 		
+196 		filler.style.display = "block";
+197 		this.s.filler.height = $(filler).height();
+198 		this.s.filler.width = $(filler).width();
+199 		filler.style.display = "none";
+200 		
+201 		/* Border display - one div for each side. We can't just use a single one with a border, as
+202 		 * we want the events to effectively pass through the transparent bit of the box
+203 		 */
+204 		var border;
+205 		var appender = document.body;
+206 		if ( that.s.dt.oScroll.sY !== "" )
+207 		{
+208 			that.s.dt.nTable.parentNode.style.position = "relative";
+209 			appender = that.s.dt.nTable.parentNode;
+210 		}
+211 		
+212 		border = document.createElement('div');
+213 		border.className = "AutoFill_border";
+214 		appender.appendChild( border );
+215 		this.dom.borderTop = border;
+216 		
+217 		border = document.createElement('div');
+218 		border.className = "AutoFill_border";
+219 		appender.appendChild( border );
+220 		this.dom.borderRight = border;
+221 		
+222 		border = document.createElement('div');
+223 		border.className = "AutoFill_border";
+224 		appender.appendChild( border );
+225 		this.dom.borderBottom = border;
+226 		
+227 		border = document.createElement('div');
+228 		border.className = "AutoFill_border";
+229 		appender.appendChild( border );
+230 		this.dom.borderLeft = border;
+231 		
+232 		/*
+233 		 * Events
+234 		 */
+235 		
+236 		$(filler).mousedown( function (e) {
+237 			this.onselectstart = function() { return false; };
+238 			that._fnFillerDragStart.call( that, e );
+239 			return false;
+240 		} );
+241 		
+242 		$('tbody>tr>td', this.dom.table).live( 'mouseover mouseout', function (e) {
+243 			that._fnFillerDisplay.call( that, e );
+244 		} );
+245 	},
+246 	
+247 	
+248 	_fnColumnDefs: function ( aoColumnDefs )
+249 	{
+250 		var
+251 			i, j, k, iLen, jLen, kLen,
+252 			aTargets;
+253 		
+254 		/* Loop over the column defs array - loop in reverse so first instace has priority */
+255 		for ( i=aoColumnDefs.length-1 ; i>=0 ; i-- )
+256 		{
+257 			/* Each column def can target multiple columns, as it is an array */
+258 			aTargets = aoColumnDefs[i].aTargets;
+259 			for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
+260 			{
+261 				if ( typeof aTargets[j] == 'number' && aTargets[j] >= 0 )
+262 				{
+263 					/* 0+ integer, left to right column counting. */
+264 					this._fnColumnOptions( aTargets[j], aoColumnDefs[i] );
+265 				}
+266 				else if ( typeof aTargets[j] == 'number' && aTargets[j] < 0 )
+267 				{
+268 					/* Negative integer, right to left column counting */
+269 					this._fnColumnOptions( this.s.dt.aoColumns.length+aTargets[j], aoColumnDefs[i] );
+270 				}
+271 				else if ( typeof aTargets[j] == 'string' )
+272 				{
+273 					/* Class name matching on TH element */
+274 					for ( k=0, kLen=this.s.dt.aoColumns.length ; k<kLen ; k++ )
+275 					{
+276 						if ( aTargets[j] == "_all" ||
+277 						     this.s.dt.aoColumns[k].nTh.className.indexOf( aTargets[j] ) != -1 )
+278 						{
+279 							this._fnColumnOptions( k, aoColumnDefs[i] );
+280 						}
+281 					}
+282 				}
+283 			}
+284 		}
+285 	},
+286 		
+287 		
+288 	_fnColumnsAll: function ( aoColumns )
+289 	{
+290 		for ( var i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+291 		{
+292 			this._fnColumnOptions( i, aoColumns[i] );
+293 		}
+294 	},
+295 	
+296 	
+297 	_fnAddColumn: function ( i )
+298 	{
+299 		this.s.columns[i] = {
+300 			enable: true,
+301 			read: this._fnReadCell,
+302 			write: this._fnWriteCell,
+303 			step: this._fnStep,
+304 			complete: null
+305 		};
+306 	},
+307 	
+308 	_fnColumnOptions: function ( i, opts )
+309 	{
+310 		if ( typeof opts.bEnable != 'undefined' )
+311 		{
+312 			this.s.columns[i].enable = opts.bEnable;
+313 		}
+314 		
+315 		if ( typeof opts.fnRead != 'undefined' )
+316 		{
+317 			this.s.columns[i].read = opts.fnRead;
+318 		}
+319 		
+320 		if ( typeof opts.fnWrite != 'undefined' )
+321 		{
+322 			this.s.columns[i].write = opts.fnWrite;
+323 		}
+324 		
+325 		if ( typeof opts.fnStep != 'undefined' )
+326 		{
+327 			this.s.columns[i].step = opts.fnStep;
+328 		}
+329 		
+330 		if ( typeof opts.fnCallback != 'undefined' )
+331 		{
+332 			this.s.columns[i].complete = opts.fnCallback;
+333 		}
+334 	},
+335 	
+336 	
+337 	/**
+338 	 * Find out the coordinates of a given TD cell in a table
+339 	 *  @method  _fnTargetCoords
+340 	 *  @param   {Node} nTd
+341 	 *  @returns {Object} x and y properties, for the position of the cell in the tables DOM
+342 	 */
+343 	_fnTargetCoords: function ( nTd )
+344 	{
+345 		var nTr = nTd.parentNode;
+346 		
+347 		return {
+348 			x: $('td', nTr).index(nTd),
+349 			y: $('tr', nTr.parentNode).index(nTr)
+350 		};
+351 	},
+352 	
+353 	
+354 	/**
+355 	 * Display the border around one or more cells (from start to end)
+356 	 *  @method  _fnUpdateBorder
+357 	 *  @param   {Node} nStart Starting cell
+358 	 *  @param   {Node} nEnd Ending cell
+359 	 *  @returns void
+360 	 */
+361 	_fnUpdateBorder: function ( nStart, nEnd )
+362 	{
+363 		var
+364 			border = this.s.border.width,
+365 			offsetStart = $(nStart).offset(),
+366 			offsetEnd = $(nEnd).offset(),
+367 			x1 = offsetStart.left - border,
+368 			x2 = offsetEnd.left + $(nEnd).outerWidth(),
+369 			y1 = offsetStart.top - border,
+370 			y2 = offsetEnd.top + $(nEnd).outerHeight(),
+371 			width = offsetEnd.left + $(nEnd).outerWidth() - offsetStart.left + (2*border),
+372 			height = offsetEnd.top + $(nEnd).outerHeight() - offsetStart.top + (2*border),
+373 			oStyle;
+374 		
+375 		if ( this.s.dt.oScroll.sY !== "" )
+376 		{
+377 			/* The border elements are inside the DT scroller - so position relative to that */
+378 			var
+379 				offsetScroll = $(this.s.dt.nTable.parentNode).offset(),
+380 				scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(),
+381 				scrollLeft = $(this.s.dt.nTable.parentNode).scrollLeft();
+382 			
+383 			x1 -= offsetScroll.left - scrollLeft;
+384 			x2 -= offsetScroll.left - scrollLeft;
+385 			y1 -= offsetScroll.top - scrollTop;
+386 			y2 -= offsetScroll.top - scrollTop;
+387 		}
+388 		
+389 		/* Top */
+390 		oStyle = this.dom.borderTop.style;
+391 		oStyle.top = y1+"px";
+392 		oStyle.left = x1+"px";
+393 		oStyle.height = this.s.border.width+"px";
+394 		oStyle.width = width+"px";
+395 		
+396 		/* Bottom */
+397 		oStyle = this.dom.borderBottom.style;
+398 		oStyle.top = y2+"px";
+399 		oStyle.left = x1+"px";
+400 		oStyle.height = this.s.border.width+"px";
+401 		oStyle.width = width+"px";
+402 		
+403 		/* Left */
+404 		oStyle = this.dom.borderLeft.style;
+405 		oStyle.top = y1+"px";
+406 		oStyle.left = x1+"px";
+407 		oStyle.height = height+"px";
+408 		oStyle.width = this.s.border.width+"px";
+409 		
+410 		/* Right */
+411 		oStyle = this.dom.borderRight.style;
+412 		oStyle.top = y1+"px";
+413 		oStyle.left = x2+"px";
+414 		oStyle.height = height+"px";
+415 		oStyle.width = this.s.border.width+"px";
+416 	},
+417 	
+418 	
+419 	/**
+420 	 * Mouse down event handler for starting a drag
+421 	 *  @method  _fnFillerDragStart
+422 	 *  @param   {Object} e Event object
+423 	 *  @returns void
+424 	 */
+425 	_fnFillerDragStart: function (e)
+426 	{
+427 		var that = this;
+428 		var startingTd = this.dom.currentTarget;
+429 		
+430 		this.s.drag.dragging = true;
+431 		
+432 		that.dom.borderTop.style.display = "block";
+433 		that.dom.borderRight.style.display = "block";
+434 		that.dom.borderBottom.style.display = "block";
+435 		that.dom.borderLeft.style.display = "block";
+436 		
+437 		var coords = this._fnTargetCoords( startingTd );
+438 		this.s.drag.startX = coords.x;
+439 		this.s.drag.startY = coords.y;
+440 		
+441 		this.s.drag.startTd = startingTd;
+442 		this.s.drag.endTd = startingTd;
+443 		
+444 		this._fnUpdateBorder( startingTd, startingTd );
+445 		
+446 		$(document).bind('mousemove.AutoFill', function (e) {
+447 			that._fnFillerDragMove.call( that, e );
+448 		} );
+449 		
+450 		$(document).bind('mouseup.AutoFill', function (e) {
+451 			that._fnFillerFinish.call( that, e );
+452 		} );
+453 		
+454 		/* Scrolling information cache */
+455 		this.s.screen.y = e.pageY;
+456 		this.s.screen.height = $(window).height();
+457 		this.s.screen.scrollTop = $(document).scrollTop();
+458 		
+459 		if ( this.s.dt.oScroll.sY !== "" )
+460 		{
+461 			this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top;
+462 			this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height();
+463 		}
+464 		
+465 		/* Scrolling handler - we set an interval (which is cancelled on mouse up) which will fire
+466 		 * regularly and see if we need to do any scrolling
+467 		 */
+468 		this.s.screen.interval = setInterval( function () {
+469 			var iScrollTop = $(document).scrollTop();
+470 			var iScrollDelta = iScrollTop - that.s.screen.scrollTop;
+471 			that.s.screen.y += iScrollDelta;
+472 			
+473 			if ( that.s.screen.height - that.s.screen.y + iScrollTop < 50 )
+474 			{
+475 				$('html, body').animate( {
+476 					scrollTop: iScrollTop + 50
+477 				}, 240, 'linear' );
+478 			}
+479 			else if ( that.s.screen.y - iScrollTop < 50 )
+480 			{
+481 				$('html, body').animate( {
+482 					scrollTop: iScrollTop - 50
+483 				}, 240, 'linear' );
+484 			}
+485 			
+486 			if ( that.s.dt.oScroll.sY !== "" )
+487 			{
+488 				if ( that.s.screen.y > that.s.scroller.bottom - 50 )
+489 				{
+490 					$(that.s.dt.nTable.parentNode).animate( {
+491 						scrollTop: $(that.s.dt.nTable.parentNode).scrollTop() + 50
+492 					}, 240, 'linear' );
+493 				}
+494 				else if ( that.s.screen.y < that.s.scroller.top + 50 )
+495 				{
+496 					$(that.s.dt.nTable.parentNode).animate( {
+497 						scrollTop: $(that.s.dt.nTable.parentNode).scrollTop() - 50
+498 					}, 240, 'linear' );
+499 				}
+500 			}
+501 		}, 250 );
+502 	},
+503 	
+504 	
+505 	/**
+506 	 * Mouse move event handler for during a move. See if we want to update the display based on the
+507 	 * new cursor position
+508 	 *  @method  _fnFillerDragMove
+509 	 *  @param   {Object} e Event object
+510 	 *  @returns void
+511 	 */
+512 	_fnFillerDragMove: function (e)
+513 	{
+514 		if ( e.target && e.target.nodeName.toUpperCase() == "TD" &&
+515 		 	e.target != this.s.drag.endTd )
+516 		{
+517 			var coords = this._fnTargetCoords( e.target );
+518 			
+519 			if ( coords.x != this.s.drag.startX )
+520 			{
+521 				e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0];
+522 			 	coords = this._fnTargetCoords( e.target );
+523 			}
+524 			
+525 			if ( coords.x == this.s.drag.startX )
+526 			{
+527 				var drag = this.s.drag;
+528 				drag.endTd = e.target;
+529 				
+530 				if ( coords.y >= this.s.drag.startY )
+531 				{
+532 					this._fnUpdateBorder( drag.startTd, drag.endTd );
+533 				}
+534 				else
+535 				{
+536 					this._fnUpdateBorder( drag.endTd, drag.startTd );
+537 				}
+538 				this._fnFillerPosition( e.target );
+539 			}
+540 		}
+541 		
+542 		/* Update the screen information so we can perform scrolling */
+543 		this.s.screen.y = e.pageY;
+544 		this.s.screen.scrollTop = $(document).scrollTop();
+545 		
+546 		if ( this.s.dt.oScroll.sY !== "" )
+547 		{
+548 			this.s.scroller.scrollTop = $(this.s.dt.nTable.parentNode).scrollTop();
+549 			this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top;
+550 			this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height();
+551 		}
+552 	},
+553 	
+554 	
+555 	/**
+556 	 * Mouse release handler - end the drag and take action to update the cells with the needed values
+557 	 *  @method  _fnFillerFinish
+558 	 *  @param   {Object} e Event object
+559 	 *  @returns void
+560 	 */
+561 	_fnFillerFinish: function (e)
+562 	{
+563 		var that = this;
+564 		
+565 		$(document).unbind('mousemove.AutoFill');
+566 		$(document).unbind('mouseup.AutoFill');
+567 		
+568 		this.dom.borderTop.style.display = "none";
+569 		this.dom.borderRight.style.display = "none";
+570 		this.dom.borderBottom.style.display = "none";
+571 		this.dom.borderLeft.style.display = "none";
+572 		
+573 		this.s.drag.dragging = false;
+574 		
+575 		clearInterval( this.s.screen.interval );
+576 		
+577 		var coordsStart = this._fnTargetCoords( this.s.drag.startTd );
+578 		var coordsEnd = this._fnTargetCoords( this.s.drag.endTd );
+579 		var aTds = [];
+580 		var bIncrement;
+581 		
+582 		if ( coordsStart.y <= coordsEnd.y )
+583 		{
+584 			bIncrement = true;
+585 			for ( i=coordsStart.y ; i<=coordsEnd.y ; i++ )
+586 			{
+587 				aTds.push( $('tbody>tr:eq('+i+')>td:eq('+coordsStart.x+')', this.dom.table)[0] );
+588 			}
+589 		}
+590 		else
+591 		{
+592 			bIncrement = false;
+593 			for ( i=coordsStart.y ; i>=coordsEnd.y ; i-- )
+594 			{
+595 				aTds.push( $('tbody>tr:eq('+i+')>td:eq('+coordsStart.x+')', this.dom.table)[0] );
+596 			}
+597 		}
+598 		
+599 		
+600 		var iColumn = coordsStart.x;
+601 		var bLast = false;
+602 		var aoEdited = [];
+603 		var sStart = this.s.columns[iColumn].read.call( this, this.s.drag.startTd );
+604 		var oPrepped = this._fnPrep( sStart );
+605 		
+606 		for ( i=0, iLen=aTds.length ; i<iLen ; i++ )
+607 		{
+608 			if ( i==iLen-1 )
+609 			{
+610 				bLast = true;
+611 			}
+612 			
+613 			var original = this.s.columns[iColumn].read.call( this, aTds[i] );
+614 			var step = this.s.columns[iColumn].step.call( this, aTds[i], oPrepped, i, bIncrement, 
+615 				'SPRYMEDIA_AUTOFILL_STEPPER' );
+616 			this.s.columns[iColumn].write.call( this, aTds[i], step, bLast );
+617 			
+618 			aoEdited.push( {
+619 				td: aTds[i],
+620 				newValue: step,
+621 				oldValue: original
+622 			} );
+623 		}
+624 		
+625 		if ( this.s.columns[iColumn].complete !== null )
+626 		{
+627 			this.s.columns[iColumn].complete.call( this, aoEdited );
+628 		}
+629 	},
+630 	
+631 	
+632 	/**
+633 	 * Chunk a string such that it can be filled in by the stepper function
+634 	 *  @method  _fnPrep
+635 	 *  @param   {String} sStr String to prep
+636 	 *  @returns {Object} with parameters, iStart, sStr and sPostFix
+637 	 */
+638 	_fnPrep: function ( sStr )
+639 	{
+640 		var aMatch = sStr.match(/[\d\.]+/g);
+641 		if ( !aMatch || aMatch.length === 0 )
+642 		{
+643 			return {
+644 				iStart: 0,
+645 				sStr: sStr,
+646 				sPostFix: ""
+647 			};
+648 		}
+649 		
+650 		var sLast = aMatch[ aMatch.length-1 ];
+651 		var num = parseInt(sLast, 10);
+652 		var regex = new RegExp( '^(.*)'+sLast+'(.*?)$' );
+653 		var decimal = sLast.match(/\./) ? "."+sLast.split('.')[1] : "";
+654 		
+655 		return {
+656 			iStart: num,
+657 			sStr: sStr.replace(regex, "$1SPRYMEDIA_AUTOFILL_STEPPER$2"),
+658 			sPostFix: decimal
+659 		};
+660 	},
+661 	
+662 	
+663 	/**
+664 	 * Render a string for it's position in the table after the drag (incrememt numbers)
+665 	 *  @method  _fnStep
+666 	 *  @param   {Node} nTd Cell being written to
+667 	 *  @param   {Object} oPrepped Prepared object for the stepper (from _fnPrep)
+668 	 *  @param   {Int} iDiff Step difference
+669 	 *  @param   {Boolean} bIncrement Increment (true) or decriment (false)
+670 	 *  @param   {String} sToken Token to replace
+671 	 *  @returns {String} Rendered information
+672 	 */
+673 	_fnStep: function ( nTd, oPrepped, iDiff, bIncrement, sToken )
+674 	{
+675 		var iReplace = bIncrement ? (oPrepped.iStart+iDiff) : (oPrepped.iStart-iDiff);
+676 		if ( isNaN(iReplace) )
+677 		{
+678 			iReplace = "";
+679 		}
+680 		return oPrepped.sStr.replace( sToken, iReplace+oPrepped.sPostFix );
+681 	},
+682 	
+683 	
+684 	/**
+685 	 * Read informaiton from a cell, possibly using live DOM elements if suitable
+686 	 *  @method  _fnReadCell
+687 	 *  @param   {Node} nTd Cell to read
+688 	 *  @returns {String} Read value
+689 	 */
+690 	_fnReadCell: function ( nTd )
+691 	{
+692 		var jq = $('input', nTd);
+693 		if ( jq.length > 0 )
+694 		{
+695 			return $(jq).val();
+696 		}
+697 		
+698 		jq = $('select', nTd);
+699 		if ( jq.length > 0 )
+700 		{
+701 			return $(jq).val();
+702 		}
+703 		
+704 		return nTd.innerHTML;
+705 	},
+706 	
+707 	
+708 	/**
+709 	 * Write informaiton to a cell, possibly using live DOM elements if suitable
+710 	 *  @method  _fnWriteCell
+711 	 *  @param   {Node} nTd Cell to write
+712 	 *  @param   {String} sVal Value to write
+713 	 *  @param   {Boolean} bLast Flag to show if this is that last update
+714 	 *  @returns void
+715 	 */
+716 	_fnWriteCell: function ( nTd, sVal, bLast )
+717 	{
+718 		var jq = $('input', nTd);
+719 		if ( jq.length > 0 )
+720 		{
+721 			$(jq).val( sVal );
+722 			return;
+723 		}
+724 		
+725 		jq = $('select', nTd);
+726 		if ( jq.length > 0 )
+727 		{
+728 			$(jq).val( sVal );
+729 			return;
+730 		}
+731 		
+732 		var pos = this.s.dt.oInstance.fnGetPosition( nTd );
+733 		this.s.dt.oInstance.fnUpdate( sVal, pos[0], pos[2], bLast );
+734 	},
+735 	
+736 	
+737 	/**
+738 	 * Display the drag handle on mouse over cell
+739 	 *  @method  _fnFillerDisplay
+740 	 *  @param   {Object} e Event object
+741 	 *  @returns void
+742 	 */
+743 	_fnFillerDisplay: function (e)
+744 	{
+745 		/* Don't display automatically when dragging */
+746 		if ( this.s.drag.dragging)
+747 		{
+748 			return;
+749 		}
+750 		
+751 		/* Check that we are allowed to AutoFill this column or not */
+752 		var iX = this._fnTargetCoords(e.target).x;
+753 		if ( !this.s.columns[iX].enable )
+754 		{
+755 			return;
+756 		}
+757 		
+758 		var filler = this.dom.filler;
+759 		if (e.type == 'mouseover')
+760 		{
+761 			this.dom.currentTarget = e.target;
+762 			this._fnFillerPosition( e.target );
+763 			
+764 			filler.style.display = "block";
+765 		}
+766 		else if ( !e.relatedTarget || !e.relatedTarget.className.match(/AutoFill/) )
+767 		{
+768 			filler.style.display = "none";
+769 		}
+770 	},
+771 	
+772 	
+773 	/**
+774 	 * Position the filler icon over a cell
+775 	 *  @method  _fnFillerPosition
+776 	 *  @param   {Node} nTd Cell to position filler icon over
+777 	 *  @returns void
+778 	 */
+779 	_fnFillerPosition: function ( nTd )
+780 	{
+781 		var offset = $(nTd).offset();
+782 		var filler = this.dom.filler;
+783 		filler.style.top = (offset.top - (this.s.filler.height / 2)-1 + $(nTd).outerHeight())+"px";
+784 		filler.style.left = (offset.left - (this.s.filler.width / 2)-1 + $(nTd).outerWidth())+"px";
+785 	}
+786 };
+787 
+788 
+789 
+790 
+791 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+792  * Constants
+793  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+794 
+795 /**
+796  * Name of this class
+797  *  @constant CLASS
+798  *  @type     String
+799  *  @default  AutoFill
+800  */
+801 AutoFill.prototype.CLASS = "AutoFill";
+802 
+803 
+804 /**
+805  * AutoFill version
+806  *  @constant  VERSION
+807  *  @type      String
+808  *  @default   1.1.1
+809  */
+810 AutoFill.VERSION = "1.1.1";
+811 AutoFill.prototype.VERSION = "1.1.1";
+812 
+813 
+814 })(jQuery);
\ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/images/filler.png b/includes/DataTables-1.7.5/extras/AutoFill/media/images/filler.png new file mode 100644 index 00000000..f2af65d8 Binary files /dev/null and b/includes/DataTables-1.7.5/extras/AutoFill/media/images/filler.png differ diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.js b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.js new file mode 100755 index 00000000..cd012f6b --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.js @@ -0,0 +1,814 @@ +/* + * File: AutoFill.js + * Version: 1.1.1 + * CVS: $Id$ + * Description: AutoFill for DataTables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Mon 6 Sep 2010 16:54:41 BST + * Modified: $Date$ by $Author$ + * Language: Javascript + * License: GPL v2 or BSD 3 point + * Project: DataTables + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2010 Allan Jardine, all rights reserved. + * + */ + +/* Global scope for AutoFill */ +var AutoFill; + +(function($) { + +/** + * AutoFill provides Excel like auto fill features for a DataTable + * @class AutoFill + * @constructor + * @param {object} DataTables settings object + * @param {object} Configuration object for AutoFill + */ +AutoFill = function( oDT, oConfig ) +{ + /* Santiy check that we are a new instance */ + if ( !this.CLASS || this.CLASS != "AutoFill" ) + { + alert( "Warning: AutoFill must be initialised with the keyword 'new'" ); + return; + } + + if ( !$.fn.dataTableExt.fnVersionCheck('1.7.0') ) + { + alert( "Warning: AutoFill requires DataTables 1.7 or greater - www.datatables.net/download"); + return; + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * @namespace Settings object which contains customisable information for AutoFill instance + */ + this.s = { + /** + * @namespace Cached information about the little dragging icon (the filler) + */ + "filler": { + "height": 0, + "width": 0 + }, + + /** + * @namespace Cached information about the border display + */ + "border": { + "width": 2 + }, + + /** + * @namespace Store for live information for the current drag + */ + "drag": { + "startX": -1, + "startY": -1, + "startTd": null, + "endTd": null, + "dragging": false + }, + + /** + * @namespace Data cache for information that we need for scrolling the screen when we near + * the edges + */ + "screen": { + "interval": null, + "y": 0, + "height": 0, + "scrollTop": 0 + }, + + /** + * @namespace Data cache for the position of the DataTables scrolling element (when scrolling + * is enabled) + */ + "scroller": { + "top": 0, + "bottom": 0 + }, + + + /** + * @namespace Information stored for each column. An array of objects + */ + "columns": [] + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + "table": null, + "filler": null, + "borderTop": null, + "borderRight": null, + "borderBottom": null, + "borderLeft": null, + "currentTarget": null + }; + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @method fnSettings + * @returns {object} AutoFill settings object + */ + this.fnSettings = function () { + return this.s; + }; + + + /* Constructor logic */ + this._fnInit( oDT, oConfig ); + return this; +}; + + + +AutoFill.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private methods (they are of course public in JS, but recommended as private) + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Initialisation + * @method _fnInit + * @param {object} oDT DataTables settings object + * @param {object} oConfig Configuration object for AutoFill + * @returns void + */ + "_fnInit": function ( oDT, oConfig ) + { + var + that = this, + i, iLen; + + /* + * Settings + */ + this.s.dt = oDT.fnSettings(); + + this.dom.table = this.s.dt.nTable; + + /* Add and configure the columns */ + for ( i=0, iLen=this.s.dt.aoColumns.length ; itr>td', this.dom.table).live( 'mouseover mouseout', function (e) { + that._fnFillerDisplay.call( that, e ); + } ); + }, + + + "_fnColumnDefs": function ( aoColumnDefs ) + { + var + i, j, k, iLen, jLen, kLen, + aTargets; + + /* Loop over the column defs array - loop in reverse so first instace has priority */ + for ( i=aoColumnDefs.length-1 ; i>=0 ; i-- ) + { + /* Each column def can target multiple columns, as it is an array */ + aTargets = aoColumnDefs[i].aTargets; + for ( j=0, jLen=aTargets.length ; j= 0 ) + { + /* 0+ integer, left to right column counting. */ + this._fnColumnOptions( aTargets[j], aoColumnDefs[i] ); + } + else if ( typeof aTargets[j] == 'number' && aTargets[j] < 0 ) + { + /* Negative integer, right to left column counting */ + this._fnColumnOptions( this.s.dt.aoColumns.length+aTargets[j], aoColumnDefs[i] ); + } + else if ( typeof aTargets[j] == 'string' ) + { + /* Class name matching on TH element */ + for ( k=0, kLen=this.s.dt.aoColumns.length ; k that.s.scroller.bottom - 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() + 50 + }, 240, 'linear' ); + } + else if ( that.s.screen.y < that.s.scroller.top + 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() - 50 + }, 240, 'linear' ); + } + } + }, 250 ); + }, + + + /** + * Mouse move event handler for during a move. See if we want to update the display based on the + * new cursor position + * @method _fnFillerDragMove + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDragMove": function (e) + { + if ( e.target && e.target.nodeName.toUpperCase() == "TD" && + e.target != this.s.drag.endTd ) + { + var coords = this._fnTargetCoords( e.target ); + + if ( coords.x != this.s.drag.startX ) + { + e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0]; + coords = this._fnTargetCoords( e.target ); + } + + if ( coords.x == this.s.drag.startX ) + { + var drag = this.s.drag; + drag.endTd = e.target; + + if ( coords.y >= this.s.drag.startY ) + { + this._fnUpdateBorder( drag.startTd, drag.endTd ); + } + else + { + this._fnUpdateBorder( drag.endTd, drag.startTd ); + } + this._fnFillerPosition( e.target ); + } + } + + /* Update the screen information so we can perform scrolling */ + this.s.screen.y = e.pageY; + this.s.screen.scrollTop = $(document).scrollTop(); + + if ( this.s.dt.oScroll.sY !== "" ) + { + this.s.scroller.scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(); + this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top; + this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height(); + } + }, + + + /** + * Mouse release handler - end the drag and take action to update the cells with the needed values + * @method _fnFillerFinish + * @param {Object} e Event object + * @returns void + */ + "_fnFillerFinish": function (e) + { + var that = this; + + $(document).unbind('mousemove.AutoFill'); + $(document).unbind('mouseup.AutoFill'); + + this.dom.borderTop.style.display = "none"; + this.dom.borderRight.style.display = "none"; + this.dom.borderBottom.style.display = "none"; + this.dom.borderLeft.style.display = "none"; + + this.s.drag.dragging = false; + + clearInterval( this.s.screen.interval ); + + var coordsStart = this._fnTargetCoords( this.s.drag.startTd ); + var coordsEnd = this._fnTargetCoords( this.s.drag.endTd ); + var aTds = []; + var bIncrement; + + if ( coordsStart.y <= coordsEnd.y ) + { + bIncrement = true; + for ( i=coordsStart.y ; i<=coordsEnd.y ; i++ ) + { + aTds.push( $('tbody>tr:eq('+i+')>td:eq('+coordsStart.x+')', this.dom.table)[0] ); + } + } + else + { + bIncrement = false; + for ( i=coordsStart.y ; i>=coordsEnd.y ; i-- ) + { + aTds.push( $('tbody>tr:eq('+i+')>td:eq('+coordsStart.x+')', this.dom.table)[0] ); + } + } + + + var iColumn = coordsStart.x; + var bLast = false; + var aoEdited = []; + var sStart = this.s.columns[iColumn].read.call( this, this.s.drag.startTd ); + var oPrepped = this._fnPrep( sStart ); + + for ( i=0, iLen=aTds.length ; i 0 ) + { + return $(jq).val(); + } + + jq = $('select', nTd); + if ( jq.length > 0 ) + { + return $(jq).val(); + } + + return nTd.innerHTML; + }, + + + /** + * Write informaiton to a cell, possibly using live DOM elements if suitable + * @method _fnWriteCell + * @param {Node} nTd Cell to write + * @param {String} sVal Value to write + * @param {Boolean} bLast Flag to show if this is that last update + * @returns void + */ + "_fnWriteCell": function ( nTd, sVal, bLast ) + { + var jq = $('input', nTd); + if ( jq.length > 0 ) + { + $(jq).val( sVal ); + return; + } + + jq = $('select', nTd); + if ( jq.length > 0 ) + { + $(jq).val( sVal ); + return; + } + + var pos = this.s.dt.oInstance.fnGetPosition( nTd ); + this.s.dt.oInstance.fnUpdate( sVal, pos[0], pos[2], bLast ); + }, + + + /** + * Display the drag handle on mouse over cell + * @method _fnFillerDisplay + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDisplay": function (e) + { + /* Don't display automatically when dragging */ + if ( this.s.drag.dragging) + { + return; + } + + /* Check that we are allowed to AutoFill this column or not */ + var iX = this._fnTargetCoords(e.target).x; + if ( !this.s.columns[iX].enable ) + { + return; + } + + var filler = this.dom.filler; + if (e.type == 'mouseover') + { + this.dom.currentTarget = e.target; + this._fnFillerPosition( e.target ); + + filler.style.display = "block"; + } + else if ( !e.relatedTarget || !e.relatedTarget.className.match(/AutoFill/) ) + { + filler.style.display = "none"; + } + }, + + + /** + * Position the filler icon over a cell + * @method _fnFillerPosition + * @param {Node} nTd Cell to position filler icon over + * @returns void + */ + "_fnFillerPosition": function ( nTd ) + { + var offset = $(nTd).offset(); + var filler = this.dom.filler; + filler.style.top = (offset.top - (this.s.filler.height / 2)-1 + $(nTd).outerHeight())+"px"; + filler.style.left = (offset.left - (this.s.filler.width / 2)-1 + $(nTd).outerWidth())+"px"; + } +}; + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Constants + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Name of this class + * @constant CLASS + * @type String + * @default AutoFill + */ +AutoFill.prototype.CLASS = "AutoFill"; + + +/** + * AutoFill version + * @constant VERSION + * @type String + * @default 1.1.1 + */ +AutoFill.VERSION = "1.1.1"; +AutoFill.prototype.VERSION = "1.1.1"; + + +})(jQuery); \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js new file mode 100644 index 00000000..fe500eed --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js @@ -0,0 +1,33 @@ +/* + * File: AutoFill.min.js + * Version: 1.1.1 + * Author: Allan Jardine (www.sprymedia.co.uk) + * + * Copyright 2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD (3 point) style license, as supplied with this software. + * + * This source file 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 license files for details. + */ +var AutoFill; +(function(d){AutoFill=function(b,a){if(!this.CLASS||this.CLASS!="AutoFill")alert("Warning: AutoFill must be initialised with the keyword 'new'");else if(d.fn.dataTableExt.fnVersionCheck("1.7.0")){this.s={filler:{height:0,width:0},border:{width:2},drag:{startX:-1,startY:-1,startTd:null,endTd:null,dragging:false},screen:{interval:null,y:0,height:0,scrollTop:0},scroller:{top:0,bottom:0},columns:[]};this.dom={table:null,filler:null,borderTop:null,borderRight:null,borderBottom:null,borderLeft:null,currentTarget:null}; +this.fnSettings=function(){return this.s};this._fnInit(b,a);return this}else alert("Warning: AutoFill requires DataTables 1.7 or greater - www.datatables.net/download")};AutoFill.prototype={_fnInit:function(b,a){var c=this,e;this.s.dt=b.fnSettings();this.dom.table=this.s.dt.nTable;b=0;for(e=this.s.dt.aoColumns.length;btr>td",this.dom.table).live("mouseover mouseout",function(f){c._fnFillerDisplay.call(c,f)})},_fnColumnDefs:function(b){var a,c,e,f, +h,g;for(a=b.length-1;a>=0;a--){g=b[a].aTargets;c=0;for(f=g.length;c=0)this._fnColumnOptions(g[c],b[a]);else if(typeof g[c]=="number"&&g[c]<0)this._fnColumnOptions(this.s.dt.aoColumns.length+g[c],b[a]);else if(typeof g[c]=="string"){e=0;for(h=this.s.dt.aoColumns.length;ea.s.scroller.bottom-50)d(a.s.dt.nTable.parentNode).animate({scrollTop:d(a.s.dt.nTable.parentNode).scrollTop()+50},240,"linear");else a.s.screen.ytr:eq("+a.y+")>td:eq("+this.s.drag.startX+")",this.dom.table)[0];a=this._fnTargetCoords(b.target)}if(a.x==this.s.drag.startX){var c=this.s.drag;c.endTd=b.target;a.y>=this.s.drag.startY?this._fnUpdateBorder(c.startTd,c.endTd):this._fnUpdateBorder(c.endTd,c.startTd);this._fnFillerPosition(b.target)}}this.s.screen.y=b.pageY;this.s.screen.scrollTop=d(document).scrollTop();if(this.s.dt.oScroll.sY!==""){this.s.scroller.scrollTop= +d(this.s.dt.nTable.parentNode).scrollTop();this.s.scroller.top=d(this.s.dt.nTable.parentNode).offset().top;this.s.scroller.bottom=this.s.scroller.top+d(this.s.dt.nTable.parentNode).height()}},_fnFillerFinish:function(){d(document).unbind("mousemove.AutoFill");d(document).unbind("mouseup.AutoFill");this.dom.borderTop.style.display="none";this.dom.borderRight.style.display="none";this.dom.borderBottom.style.display="none";this.dom.borderLeft.style.display="none";this.s.drag.dragging=false;clearInterval(this.s.screen.interval); +var b=this._fnTargetCoords(this.s.drag.startTd),a=this._fnTargetCoords(this.s.drag.endTd),c=[],e;if(b.y<=a.y){e=true;for(i=b.y;i<=a.y;i++)c.push(d("tbody>tr:eq("+i+")>td:eq("+b.x+")",this.dom.table)[0])}else{e=false;for(i=b.y;i>=a.y;i--)c.push(d("tbody>tr:eq("+i+")>td:eq("+b.x+")",this.dom.table)[0])}b=b.x;a=false;var f=[],h=this._fnPrep(this.s.columns[b].read.call(this,this.s.drag.startTd));i=0;for(iLen=c.length;i0)return d(a).val();a=d("select",b);if(a.length>0)return d(a).val();return b.innerHTML},_fnWriteCell:function(b,a,c){var e=d("input",b);if(e.length>0)d(e).val(a);else{e=d("select",b);if(e.length>0)d(e).val(a);else{b=this.s.dt.oInstance.fnGetPosition(b);this.s.dt.oInstance.fnUpdate(a,b[0],b[2],c)}}},_fnFillerDisplay:function(b){if(!this.s.drag.dragging)if(this.s.columns[this._fnTargetCoords(b.target).x].enable){var a= +this.dom.filler;if(b.type=="mouseover"){this.dom.currentTarget=b.target;this._fnFillerPosition(b.target);a.style.display="block"}else if(!b.relatedTarget||!b.relatedTarget.className.match(/AutoFill/))a.style.display="none"}},_fnFillerPosition:function(b){var a=d(b).offset(),c=this.dom.filler;c.style.top=a.top-this.s.filler.height/2-1+d(b).outerHeight()+"px";c.style.left=a.left-this.s.filler.width/2-1+d(b).outerWidth()+"px"}};AutoFill.prototype.CLASS="AutoFill";AutoFill.VERSION="1.1.1";AutoFill.prototype.VERSION= +"1.1.1"})(jQuery); diff --git a/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js.gz b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js.gz new file mode 100644 index 00000000..c253f34a Binary files /dev/null and b/includes/DataTables-1.7.5/extras/AutoFill/media/js/AutoFill.min.js.gz differ diff --git a/includes/DataTables-1.7.5/extras/AutoFill/scrolling.html b/includes/DataTables-1.7.5/extras/AutoFill/scrolling.html new file mode 100755 index 00000000..ee65a513 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/AutoFill/scrolling.html @@ -0,0 +1,496 @@ + + + + + + + AutoFill example + + + + + + + +
+
+ AutoFill example with scrolling +
+ +

Preamble

+

+ When dragging an AutoFill handle, the table (if DataTables scrolling is enabled) or the window will be automatically scrolled, as you approach the edge of the scrolling component. The example below shows the effect with DataTables scrolling (and also window if needed). +

+ + + +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable({
+		"sScrollY": 200,
+		"bScrollCollapse": true,
+		"bPaginate": false
+	});
+	new AutoFill( oTable );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/alt_insert.html b/includes/DataTables-1.7.5/extras/ColReorder/alt_insert.html new file mode 100755 index 00000000..6ed194dd --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/alt_insert.html @@ -0,0 +1,493 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with alternative insert styling +
+ +

Preamble

+

Using CSS it is relatively easy to modify the insert bar to suit your web-site. This + example shows how an arrow can be used to show the insert point rather than the straight + bar used in the other examples.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip'
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/colvis.html b/includes/DataTables-1.7.5/extras/ColReorder/colvis.html new file mode 100755 index 00000000..7810264f --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/colvis.html @@ -0,0 +1,501 @@ + + + + + + + ColReorder example + + + + + + + + +
+
+ ColReorder example with ColVis +
+ +

Preamble

+

The ColReorder plug-in interacts with the ColVis plug-in for DataTables by updating the + order of the list of columns whenever a reorder is done. This is shown in the example + below, where one column has been hidden by default to add extra emphasis to ColVis.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'RC<"clear">lfrtip',
+		"aoColumnDefs": [
+			{ "bVisible": false, "aTargets": [ 1 ] }
+		]
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/fixedcolumns.html b/includes/DataTables-1.7.5/extras/ColReorder/fixedcolumns.html new file mode 100755 index 00000000..79791c96 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/fixedcolumns.html @@ -0,0 +1,601 @@ + + + + + + + ColReorder example + + + + + + + + +
+
+ ColReorder example with FixedColumns +
+ +

Preamble

+

While ColReorder works great with scrolling in DataTables (and thus FixedColumns), + it also presents an additional option called 'iFixedColumns' which allows you to not + let the user reorder certain columns (specific the number given, counting left to + right). So in the case of FixedColumns this is useful because you typically won't want + to let your fixed column be reordered. This is shown below in the FixedColumns index column + example.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Rendering engineBrowserPlatform(s)Engine versionCSS grade
1TridentInternet + Explorer 4.0Win 95+4X
2TridentInternet + Explorer 5.0Win 95+5C
3TridentInternet + Explorer 5.5Win 95+5.5A
4TridentInternet + Explorer 6Win 98+6A
5TridentInternet Explorer 7Win XP SP2+7A
6TridentAOL browser (AOL desktop)Win XP6A
7GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
8GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
9GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
10GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
11GeckoCamino 1.0OSX.2+1.8A
12GeckoCamino 1.5OSX.3+1.8A
13GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
14GeckoNetscape Browser 8Win 98SE+1.7A
15GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
16GeckoMozilla 1.0Win 95+ / OSX.1+1A
17GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
18GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
19GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
20GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
21GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
22GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
23GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
24GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
25GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
26GeckoEpiphany 2.20Gnome1.8A
27WebkitSafari 1.2OSX.3125.5A
28WebkitSafari 1.3OSX.3312.8A
29WebkitSafari 2.0OSX.4+419.3A
30WebkitSafari 3.0OSX.4+522.1A
31WebkitOmniWeb 5.5OSX.4+420A
32WebkitiPod Touch / iPhoneiPod420.1A
33WebkitS60S60413A
34PrestoOpera 7.0Win 95+ / OSX.1+-A
35PrestoOpera 7.5Win 95+ / OSX.2+-A
36PrestoOpera 8.0Win 95+ / OSX.2+-A
37PrestoOpera 8.5Win 95+ / OSX.2+-A
38PrestoOpera 9.0Win 95+ / OSX.3+-A
39PrestoOpera 9.2Win 88+ / OSX.3+-A
40PrestoOpera 9.5Win 88+ / OSX.3+-A
41PrestoOpera for WiiWii-A
42PrestoNokia N800N800-A
43PrestoNintendo DS browserNintendo DS8.5C/A1
44KHTMLKonqureror 3.1KDE 3.13.1C
45KHTMLKonqureror 3.3KDE 3.33.3A
46KHTMLKonqureror 3.5KDE 3.53.5A
47TasmanInternet Explorer 4.5Mac OS 8-9-X
48TasmanInternet Explorer 5.1Mac OS 7.6-91C
49TasmanInternet Explorer 5.2Mac OS 8-X1C
50MiscNetFront 3.1Embedded devices-C
51MiscNetFront 3.4Embedded devices-A
52MiscDillo 0.8Embedded devices-X
53MiscLinksText only-X
54MiscLynxText only-X
55MiscIE MobileWindows Mobile 6-C
56MiscPSP browserPSP-C
57Other browsersAll others--U
 Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"sScrollX": "100%",
+		"sScrollXInner": "150%",
+		"bScrollCollapse": true,
+		"fnDrawCallback": function ( oSettings ) {
+			/* Need to redo the counters if filtered or sorted */
+			if ( oSettings.bSorted || oSettings.bFiltered ) {
+				for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) {
+					$('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
+				}
+			}
+		},
+		"aoColumnDefs": [
+			{ "bSortable": false, "sClass": "index", "aTargets": [ 0 ] }
+		],
+		"aaSorting": [[ 1, 'asc' ]],
+		"oColReorder": {
+			"iFixedColumns": 1
+		}
+	} );
+	new FixedColumns( oTable );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/fixedheader.html b/includes/DataTables-1.7.5/extras/ColReorder/fixedheader.html new file mode 100755 index 00000000..deaa4ecf --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/fixedheader.html @@ -0,0 +1,497 @@ + + + + + + + ColReorder example + + + + + + + + +
+
+ ColReorder example with FixedHeader +
+ +

Preamble

+

FixedHeader is a particularly useful plug-in for DataTables, allowing a table header + to float at the top of a scrolling window. ColReorder works well with FixedHeader, allowing + you to reorder columns even using the floating header, as shown in the example below.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		 "sDom": 'RC<"clear">lfrtip'
+	} );
+	new FixedHeader( oTable );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/index.html b/includes/DataTables-1.7.5/extras/ColReorder/index.html new file mode 100755 index 00000000..d6069360 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/index.html @@ -0,0 +1,494 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example +
+ +

Preamble

+

This example shows the basic use case of the ColReorder plug-in. With ColReorder enabled + for a table, the user has the ability to click and drag any table header cell, and drop + it where they wish the column to be inserted. The insert point is shown visually, and + the column reordering is done as soon as the mouse button is released.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip'
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/css/ColReorder.css b/includes/DataTables-1.7.5/extras/ColReorder/media/css/ColReorder.css new file mode 100644 index 00000000..9c597e34 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/css/ColReorder.css @@ -0,0 +1,21 @@ +/* + * Namespace DTCR - "DataTables ColReorder" plug-in + */ + +table.DTCR_clonedTable { + background-color: white; + z-index: 202; +} + +div.DTCR_pointer { + width: 1px; + background-color: #0259C4; + z-index: 201; +} + +body.alt div.DTCR_pointer { + margin-top: -15px; + margin-left: -9px; + width: 18px; + background: url('../images/insert.png') no-repeat top left; +} \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/css/default.css b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/css/default.css new file mode 100644 index 00000000..b9dde3b1 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/css/default.css @@ -0,0 +1,418 @@ +/* + * TABLE OF CONTENTS: + * - Browser reset + * - HTML elements + * - JsDoc styling + */ + + + + + + +/* + * BEGIN BROWSER RESET + */ + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { + margin:0; + padding:0 +} +html { + height:100%; + overflow:-moz-scrollbars-vertical; + overflow-x:auto +} +table { + border:0; + border-collapse:collapse; + border-spacing:0 +} +fieldset,img { + border:0 +} +address,caption,cite,code,dfn,em,strong,th,var { + font-style:normal; + font-weight:normal +} +em,cite { + font-style:italic +} +strong { + font-weight:bold +} +ol,ul { + list-style:none +} +caption,th { + text-align:left +} +h1,h2,h3,h4,h5,h6 { + font-size:100%; + font-weight:normal; + margin:0; + padding:0 +} +q:before,q:after { + content:'' +} +abbr,acronym { + border:0 +} + +/* + * END BROWSER RESET + */ + + + + + + +/* + * HTML ELEMENTS + */ + +* { + line-height: 1.4em; +} + +html { + font-size: 100%; +} + +body { + font-size: 0.75em !important; + padding: 15px 0; + background: #eee; + background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9); + background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)); + } + +body, +input, +select, +textarea { + color: #000; + font-family: Arial, Geneva, sans-serif; +} + +a:link, +a:hover, +a:active, +a:visited { + color: #19199e; +} +a:hover, +a:focus { + color: #00f; + text-decoration: none; +} + +p { + margin: 0 0 1.5em 0; +} + +/* + * END HTML ELEMENTS + */ + + + +/* + * BEGIN HACK + */ + +div.containerMain:after, +div.safeBox:after { + content:""; + display:block; + height:0; + clear:both; +} + +/* + * END HACK + */ + + + +/* + * BEGIN JSDOC + */ + +div.index *.heading1 { + margin-bottom: 0.5em; + border-bottom: 1px solid #999999; + padding: 0.5em 0 0.1em 0; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.3em; + letter-spacing: 1px; +} + +div.index { + float: left; + width: 30%; + min-width: 100px; + max-width: 250px; +} +div.index div.menu { + margin: 0 15px 0 -15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + padding: 15px 15px 15px 30px; + background-color: #FFFFFF; + background-color: rgba(255, 255, 255, 0.5); + -moz-box-shadow: 0px 0px 10px #c4c4c4; + -webkit-box-shadow: 0px 0px 10px #c4c4c4; + box-shadow: 0px 0px 10px #c4c4c4; +} +*+html div.index div.menu { + background-color: #FFFFFF; +} +* html div.index div.menu { + background-color: #FFFFFF; +} + +div.index div.menu div { + text-align: left; +} + +div.index div.menu a { + text-decoration: none; +} +div.index div.menu a:hover { + text-decoration: underline; +} + +div.index ul.classList a { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.index div.fineprint { + padding: 15px 30px 15px 15px; + color: #777; + font-size: 0.9em; +} +div.index div.fineprint a { + color: #777; +} + + + +div.content { + float: left; + width: 70%; + min-width: 300px; + max-width: 600px; +} +div.innerContent { + padding: 0 0 0 2.5em; +} + +div.content ul, +div.content ol { + margin-bottom: 3em; +} + +div.content *.classTitle { + margin-bottom: 0.5em; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 2.5em; + letter-spacing: 2px; +} + +div.content *.classTitle span { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.content p.summary { + font-size: 1.2em; +} + +div.content ul *.classname a, +div.content ul *.filename a { + font-family: Consolas, "Courier New", Courier, monospace; + text-decoration: none; + font-weight: bold; +} +div.content ul *.classname a:hover, +div.content ul *.filename a:hover { + text-decoration: underline; +} + +div.content div.props { + position: relative; + left: -10px; + margin-bottom: 2.5em; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 10px 15px 15px 15px; + overflow: hidden; + background: #fff; + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ + background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); + -moz-box-shadow: 0px 0px 10px #ccc; + -webkit-box-shadow: 0px 0px 5px #bbb; + box-shadow: 0px 0px 5px #bbb; +} + +div.content div.props div.sectionTitle { + padding-bottom: 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +div.content div.hr { + margin: 0 10px 0 0; + height: 4em; +} + + + +table.summaryTable { + position: relative; + left: -10px; + width: 100%; + border-collapse: collapse; + box-sizing: content-box; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -ms-box-sizing: content-box; + -o-box-sizing: content-box; + -icab-box-sizing: content-box; + -khtml-box-sizing: content-box; +} + +table.summaryTable caption { + padding: 0 10px 10px 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +table.summaryTable td, +table.summaryTable th { + padding: 0px 10px 10px 10px; + vertical-align: top; +} +table.summaryTable tr:last-child td { + padding-bottom: 0; +} + +table.summaryTable th { + font-weight: bold; +} + +table.summaryTable td.attributes { + width: 35%; + font-family: Consolas, "Courier New", Courier, monospace; + color: #666; +} + +table.summaryTable td.nameDescription { + width: 65% +} + +table.summaryTable td.nameDescription div.fixedFont { + font-weight: bold; +} + +table.summaryTable div.description { + color: #333; +} + + + +dl.detailList { + margin-top: 0.5em; +} + +dl.detailList.nomargin + dl.detailList.nomargin { + margin-top: 0; +} + +dl.detailList dt { + display: inline; + margin-right: 5px; + font-weight: bold; +} + +dl.detailList dt:before { + display: block; + content: ""; +} + +dl.detailList dd { + display: inline; +} + +dl.detailList.params dt { + display: block; +} +dl.detailList.params dd { + display: block; + padding-left: 2em; + padding-bottom: 0.4em; +} + + + + +ul.fileList li { + margin-bottom: 1.5em; +} + + + +.fixedFont { + font-family: Consolas, "Courier New", Courier, monospace; +} + +.fixedFont.heading { + margin-bottom: 0.5em; + font-size: 1.25em; + line-height: 1.1em +} + +.fixedFont.heading + .description { + font-size: 1.2em; +} + +.fixedFont.heading .light, +.fixedFont.heading .lighter { + font-weight: bold; +} + +pre.code { + margin: 10px 0 10px 0; + padding: 10px; + border: 1px solid #ccc; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: auto; + font-family: Consolas, "Courier New", Courier, monospace; + background: #eee; +} + +.light { + color: #666; +} + +.lighter { + color: #999; +} + +.clear { + clear: both; + width: 100%; + min-height: 0; +} + +/* + * END JSDOC + */ \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/files.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/files.html new file mode 100644 index 00000000..8c8b6375 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/files.html @@ -0,0 +1,69 @@ + + + + + + JsDoc Reference - File Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

File Index

+ + +
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/index.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/index.html new file mode 100644 index 00000000..aebfe6c7 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/index.html @@ -0,0 +1,78 @@ + + + + + JsDoc Reference - Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

Class Index

+ + +
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#dom.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#dom.html new file mode 100644 index 00000000..578be591 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#dom.html @@ -0,0 +1,278 @@ + + + + + + + JsDoc Reference - ColReorder#dom + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColReorder#dom +

+ +

+ + + + + Common and useful DOM elements for the class instance + + +
Defined in: ColReorder.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColReorder#dom.drag +
+
Dragging element (the one the mouse is moving)
+
<static>   +
+ ColReorder#dom.pointer +
+
The insert cursor
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColReorder#dom +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {element} + + ColReorder#dom.drag +
+ +
+ Dragging element (the one the mouse is moving) + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {element} + + ColReorder#dom.pointer +
+ +
+ The insert cursor + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.html new file mode 100644 index 00000000..ab78e9fd --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.html @@ -0,0 +1,365 @@ + + + + + + + JsDoc Reference - ColReorder#s + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColReorder#s +

+ +

+ + + + + Settings object which contains customisable information for ColReorder instance + + +
Defined in: ColReorder.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColReorder#s.aoTargets +
+
Information which is used for positioning the insert cusor and knowing where to do the +insert.
+
<static>   +
+ ColReorder#s.dt +
+
DataTables settings object
+
<static>   +
+ ColReorder#s.fixed +
+
Number of columns to fix (not allow to be reordered)
+
<static>   +
+ ColReorder#s.init +
+
Initialisation object used for this instance
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColReorder#s +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {array} + + ColReorder#s.aoTargets +
+ +
+ Information which is used for positioning the insert cusor and knowing where to do the +insert. Array of objects with the properties: + x: x-axis position + to: insert point + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <static> + + + {Object} + + ColReorder#s.dt +
+ +
+ DataTables settings object + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {int} + + ColReorder#s.fixed +
+ +
+ Number of columns to fix (not allow to be reordered) + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ 0 +
+ +
+ + +
+ + + +
+ + <static> + + + {object} + + ColReorder#s.init +
+ +
+ Initialisation object used for this instance + + + +
+ + + + + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.mouse.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.mouse.html new file mode 100644 index 00000000..e68a4959 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder#s.mouse.html @@ -0,0 +1,149 @@ + + + + + + + JsDoc Reference - ColReorder#s.mouse + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColReorder#s.mouse +

+ +

+ + + + + Information used for the mouse drag + + +
Defined in: ColReorder.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColReorder#s.mouse +
+ +
+ + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder.html new file mode 100644 index 00000000..dbbe0282 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/ColReorder.html @@ -0,0 +1,949 @@ + + + + + + + JsDoc Reference - ColReorder + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Class ColReorder +

+ +

+ + + + + ColReorder + + +
Defined in: ColReorder.js. + +

+ + +
+ + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ ColReorder(DataTables, ColReorder) +
+
ColReorder provides column visiblity control for DataTables
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColReorder.aoInstances +
+
Array of all ColReorder instances for later reference
+
<constant>   +
+ CLASS +
+
Name of this class
+
<static> <constant>   +
+ ColReorder.VERSION +
+
ColReorder version
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<private>   + +
Constructor logic
+
<private>   + +
Copy the TH element that is being drags so the user has the idea that they are actually +moving it around the page.
+
<private>   +
_fnMouseDown(event) +
+
Mouse down on a TH element in the table header
+
<private>   +
_fnMouseMove(event) +
+
Deal with a mouse move event while dragging a node
+
<private>   +
_fnMouseUp(event) +
+
Finish off the mouse drag and insert the column where needed
+
<private>   +
_fnOrderColumns(array) +
+
Set the column order from an array
+
<private>   +
_fnStateSave(string) +
+
This function effectively replaces the state saving function in DataTables (this is needed +because otherwise DataTables would state save the columns in their reordered state, not the +original which is needed on first draw).
+
<static>   +
ColReorder.fnReset(object) +
+
Reset the column ordering for a DataTables instance
+
  +
fnReset() +
+
+
+
+ + + + + + + + + + +
+
+ + +
+ Class Detail +
+ +
+ ColReorder(DataTables, ColReorder) +
+ +
+ ColReorder provides column visiblity control for DataTables + +
+ + + + +
+
Parameters:
+ +
+ {object} DataTables + +
+
object
+ +
+ {object} ColReorder + +
+
options
+ +
+ + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {array} + + ColReorder.aoInstances +
+ +
+ Array of all ColReorder instances for later reference + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <constant> + + + {String} + + CLASS +
+ +
+ Name of this class + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ ColReorder +
+ +
+ + +
+ + + +
+ + <static> <constant> + + + {String} + + ColReorder.VERSION +
+ +
+ ColReorder version + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ 1.0.0 +
+ +
+ + + + +
+
+ + + + +
+
+
+ Method Detail +
+ + + + +
+ + <private> + + + + + _fnConstruct() +
+ +
+ Constructor logic + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnCreateDragNode() +
+ +
+ Copy the TH element that is being drags so the user has the idea that they are actually +moving it around the page. + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnMouseDown(event) +
+ +
+ Mouse down on a TH element in the table header + + + + +
+ + + + +
+
Parameters:
+ +
+ event + +
+
e Mouse event
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnMouseMove(event) +
+ +
+ Deal with a mouse move event while dragging a node + + + + +
+ + + + +
+
Parameters:
+ +
+ event + +
+
e Mouse event
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnMouseUp(event) +
+ +
+ Finish off the mouse drag and insert the column where needed + + + + +
+ + + + +
+
Parameters:
+ +
+ event + +
+
e Mouse event
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnOrderColumns(array) +
+ +
+ Set the column order from an array + + + + +
+ + + + +
+
Parameters:
+ +
+ array + +
+
a An array of integers which dictate the column order that should be applied
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnStateSave(string) +
+ +
+ This function effectively replaces the state saving function in DataTables (this is needed +because otherwise DataTables would state save the columns in their reordered state, not the +original which is needed on first draw). This is sensitive to any changes in the DataTables +state saving method! + + + + +
+ + + + +
+
Parameters:
+ +
+ string + +
+
sCurrentVal
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
string JSON encoded cookie string for DataTables
+ + + + + + + +
+ + +
+ + + +
+ + <static> + + + + + ColReorder.fnReset(object) +
+ +
+ Reset the column ordering for a DataTables instance + + + + +
+ + + + +
+
Parameters:
+ +
+ object + +
+
oTable DataTables instance to consider
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + + + + + + fnReset() +
+ +
+ + + + + +
+ + + + + + + + + +
+
+ + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/_global_.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/_global_.html new file mode 100644 index 00000000..4983870c --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/_global_.html @@ -0,0 +1,99 @@ + + + + + + + JsDoc Reference - _global_ + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:57:11 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Built-In Namespace _global_ +

+ +

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/src/js_ColReorder.js.html b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/src/js_ColReorder.js.html new file mode 100644 index 00000000..7213c3e9 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/docs/symbols/src/js_ColReorder.js.html @@ -0,0 +1,904 @@ +
  1 /*
+  2  * File:        ColReorder.js
+  3  * Version:     1.0.0
+  4  * CVS:         $Id$
+  5  * Description: Controls for column visiblity in DataTables
+  6  * Author:      Allan Jardine (www.sprymedia.co.uk)
+  7  * Created:     Wed Sep 15 18:23:29 BST 2010
+  8  * Modified:    $Date$ by $Author$
+  9  * Language:    Javascript
+ 10  * License:     LGPL
+ 11  * Project:     DataTables
+ 12  * Contact:     www.sprymedia.co.uk/contact
+ 13  * 
+ 14  * Copyright 2010 Allan Jardine, all rights reserved.
+ 15  *
+ 16  */
+ 17 
+ 18 
+ 19 (function($, window, document) {
+ 20 
+ 21 
+ 22 /**
+ 23  * Switch the key value pairing of an index array to be value key (i.e. the old value is now the
+ 24  * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ].
+ 25  *  @method  fnInvertKeyValues
+ 26  *  @param   array aIn Array to switch around
+ 27  *  @returns array
+ 28  */
+ 29 function fnInvertKeyValues( aIn )
+ 30 {
+ 31 	var aRet=[];
+ 32 	for ( var i=0, iLen=aIn.length ; i<iLen ; i++ )
+ 33 	{
+ 34 		aRet[ aIn[i] ] = i;
+ 35 	}
+ 36 	return aRet;
+ 37 }
+ 38 
+ 39 
+ 40 /**
+ 41  * Modify an array by switching the position of two elements
+ 42  *  @method  fnArraySwitch
+ 43  *  @param   array aArray Array to consider, will be modified by reference (i.e. no return)
+ 44  *  @param   int iFrom From point
+ 45  *  @param   int iTo Insert point
+ 46  *  @returns void
+ 47  */
+ 48 function fnArraySwitch( aArray, iFrom, iTo )
+ 49 {
+ 50 	var mStore = aArray.splice( iFrom, 1 )[0];
+ 51 	aArray.splice( iTo, 0, mStore );
+ 52 }
+ 53 
+ 54 
+ 55 /**
+ 56  * Switch the positions of nodes in a parent node (note this is specifically designed for 
+ 57  * table rows)
+ 58  *  @method  fnDomSwitch
+ 59  *  @param   node nParent Parent node (i.e. the TR)
+ 60  *  @param   string sTag Tag to consider
+ 61  *  @param   int iFrom Element to move
+ 62  *  @param   int Point to element the element to (before this point), can be null for append
+ 63  *  @returns void
+ 64  */
+ 65 function fnDomSwitch( nParent, sTag, iFrom, iTo )
+ 66 {
+ 67 	var nTags = nParent.getElementsByTagName(sTag);
+ 68 	var nStore = nTags[ iFrom ];
+ 69 	
+ 70 	if ( iTo !== null )
+ 71 	{
+ 72 		nParent.insertBefore( nStore, nTags[iTo] );
+ 73 	}
+ 74 	else
+ 75 	{
+ 76 		nParent.appendChild( nStore );
+ 77 	}
+ 78 }
+ 79 
+ 80 
+ 81 
+ 82 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ 83  * DataTables plug-in API functions
+ 84  *
+ 85  * This are required by ColReorder in order to perform the tasks required, and also keep this
+ 86  * code portable, to be used for other column reordering projects with DataTables, if needed.
+ 87  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ 88 
+ 89 
+ 90 /**
+ 91  * Plug-in for DataTables which will reorder the internal column structure by taking the column
+ 92  * from one position (iFrom) and insert it into a given point (iTo).
+ 93  *  @method  $.fn.dataTableExt.oApi.fnColReorder
+ 94  *  @param   object oSettings DataTables settings object - automatically added by DataTables! 
+ 95  *  @param   int iFrom Take the column to be repositioned from this point
+ 96  *  @param   int iTo and insert it into this point
+ 97  *  @returns void
+ 98  */
+ 99 $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
+100 {
+101 	var i, iLen, j, jLen, iCols=oSettings.aoColumns.length;
+102 	
+103 	/* Sanity check in the input */
+104 	if ( iFrom == iTo )
+105 	{
+106 		/* Pointless reorder */
+107 		return;
+108 	}
+109 	
+110 	if ( iFrom < 0 || iFrom >= iCols )
+111 	{
+112 		this.oApi._fnLog( oSettings, 1, "ColReorder 'from' index is out of bounds: "+iFrom );
+113 		return;
+114 	}
+115 	
+116 	if ( iTo < 0 || iTo >= iCols )
+117 	{
+118 		this.oApi._fnLog( oSettings, 1, "ColReorder 'to' index is out of bounds: "+iTo );
+119 		return;
+120 	}
+121 	
+122 	/*
+123 	 * Calculate the new column array index, so we have a mapping between the old and new
+124 	 */
+125 	var aiMapping = [];
+126 	for ( i=0, iLen=iCols ; i<iLen ; i++ )
+127 	{
+128 		aiMapping[i] = i;
+129 	}
+130 	fnArraySwitch( aiMapping, iFrom, iTo );
+131 	var aiInvertMapping = fnInvertKeyValues( aiMapping );
+132 	
+133 	
+134 	/*
+135 	 * Convert all internal indexing to the new column order indexes
+136 	 */
+137 	/* Sorting */
+138 	for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
+139 	{
+140 		oSettings.aaSorting[i][0] = aiInvertMapping[ oSettings.aaSorting[i][0] ];
+141 	}
+142 	
+143 	/* Fixed sorting */
+144 	if ( oSettings.aaSortingFixed !== null )
+145 	{
+146 		for ( i=0, iLen=oSettings.aaSortingFixed.length ; i<iLen ; i++ )
+147 		{
+148 			oSettings.aaSortingFixed[i][0] = aiInvertMapping[ oSettings.aaSortingFixed[i][0] ];
+149 		}
+150 	}
+151 	
+152 	/* Data column sorting (the column which the sort for a given column should take place on) */
+153 	for ( i=0, iLen=iCols ; i<iLen ; i++ )
+154 	{
+155 		oSettings.aoColumns[i].iDataSort = aiInvertMapping[ oSettings.aoColumns[i].iDataSort ];
+156 	}
+157 	
+158 	
+159 	/*
+160 	 * Move the DOM elements
+161 	 */
+162 	if ( oSettings.aoColumns[iFrom].bVisible )
+163 	{
+164 		/* Calculate the current visible index and the point to insert the node before. The insert
+165 		 * before needs to take into account that there might not be an element to insert before,
+166 		 * in which case it will be null, and an appendChild should be used
+167 		 */
+168 		var iVisibleIndex = this.oApi._fnColumnIndexToVisible( oSettings, iFrom );
+169 		var iInsertBeforeIndex = null;
+170 		
+171 		i = iTo < iFrom ? iTo : iTo + 1;
+172 		while ( iInsertBeforeIndex === null && i < iCols )
+173 		{
+174 			iInsertBeforeIndex = this.oApi._fnColumnIndexToVisible( oSettings, i );
+175 			i++;
+176 		}
+177 		
+178 		/* Header */
+179 		fnDomSwitch( oSettings.nTHead.getElementsByTagName('tr')[0], 'TH', 
+180 			iVisibleIndex, iInsertBeforeIndex );
+181 		
+182 		/* Footer */
+183 		if ( oSettings.nTFoot !== null )
+184 		{
+185 			fnDomSwitch( oSettings.nTFoot.getElementsByTagName('tr')[0], 'TH', 
+186 			 	iVisibleIndex, iInsertBeforeIndex );
+187 		}
+188 		
+189 		/* Body */
+190 		for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
+191 		{
+192 			fnDomSwitch( oSettings.aoData[i].nTr, 'td', 
+193 			 	iVisibleIndex, iInsertBeforeIndex );
+194 		}
+195 	}
+196 	
+197 	
+198 	/* 
+199 	 * Move the internal array elements
+200 	 */
+201 	/* Columns */
+202 	fnArraySwitch( oSettings.aoColumns, iFrom, iTo );
+203 	
+204 	/* Search columns */
+205 	fnArraySwitch( oSettings.aoPreSearchCols, iFrom, iTo );
+206 	
+207 	/* Array array - internal data anodes cache */
+208 	for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
+209 	{
+210 		fnArraySwitch( oSettings.aoData[i]._aData, iFrom, iTo );
+211 		fnArraySwitch( oSettings.aoData[i]._anHidden, iFrom, iTo );
+212 	}
+213 	
+214 	
+215 	/*
+216 	 * Update DataTables' event handlers
+217 	 */
+218 	
+219 	/* Sort listener */
+220 	for ( i=0, iLen=iCols ; i<iLen ; i++ )
+221 	{
+222 		$(oSettings.aoColumns[i].nTh).unbind('click');
+223 		this.oApi._fnSortAttachListener( oSettings, oSettings.aoColumns[i].nTh, i );
+224 	}
+225 	
+226 	
+227 	/*
+228 	 * Any extra operations
+229 	 */
+230 	if ( typeof ColVis != 'undefined' )
+231 	{
+232 		ColVis.fnRebuild( oSettings.oInstance );
+233 	}
+234 };
+235 
+236 
+237 
+238 
+239 /** 
+240  * ColReorder provides column visiblity control for DataTables
+241  * @class ColReorder
+242  * @constructor
+243  * @param {object} DataTables object
+244  * @param {object} ColReorder options
+245  */
+246 ColReorder = function( oTable, oOpts )
+247 {
+248 	/* Santiy check that we are a new instance */
+249 	if ( !this.CLASS || this.CLASS != "ColReorder" )
+250 	{
+251 		alert( "Warning: ColReorder must be initialised with the keyword 'new'" );
+252 	}
+253 	
+254 	if ( typeof oOpts == 'undefined' )
+255 	{
+256 		oOpts = {};
+257 	}
+258 	
+259 	
+260 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+261 	 * Public class variables
+262 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+263 	
+264 	/**
+265 	 * @namespace Settings object which contains customisable information for ColReorder instance
+266 	 */
+267 	this.s = {
+268 		/**
+269 		 * DataTables settings object
+270 		 *  @property dt
+271 		 *  @type     Object
+272 		 *  @default  null
+273 		 */
+274 		dt: null,
+275 		
+276 		/**
+277 		 * Initialisation object used for this instance
+278 		 *  @property init
+279 		 *  @type     object
+280 		 *  @default  {}
+281 		 */
+282 		init: oOpts,
+283 		
+284 		/**
+285 		 * Number of columns to fix (not allow to be reordered)
+286 		 *  @property fixed
+287 		 *  @type     int
+288 		 *  @default  0
+289 		 */
+290 		fixed: 0,
+291 		
+292 		/**
+293 		 * @namespace Information used for the mouse drag
+294 		 */
+295 		mouse: {
+296 			startX: -1,
+297 			startY: -1,
+298 			offsetX: -1,
+299 			offsetY: -1,
+300 			target: -1,
+301 			targetIndex: -1,
+302 			fromIndex: -1
+303 		},
+304 		
+305 		/**
+306 		 * Information which is used for positioning the insert cusor and knowing where to do the
+307 		 * insert. Array of objects with the properties:
+308 		 *   x: x-axis position
+309 		 *   to: insert point
+310 		 *  @property aoTargets
+311 		 *  @type     array
+312 		 *  @default  []
+313 		 */
+314 		aoTargets: []
+315 	};
+316 	
+317 	
+318 	/**
+319 	 * @namespace Common and useful DOM elements for the class instance
+320 	 */
+321 	this.dom = {
+322 		/**
+323 		 * Dragging element (the one the mouse is moving)
+324 		 *  @property drag
+325 		 *  @type     element
+326 		 *  @default  null
+327 		 */
+328 		drag: null,
+329 		
+330 		/**
+331 		 * The insert cursor
+332 		 *  @property pointer
+333 		 *  @type     element
+334 		 *  @default  null
+335 		 */
+336 		pointer: null
+337 	};
+338 	
+339 	
+340 	/* Constructor logic */
+341 	this.s.dt = oTable.fnSettings();
+342 	this._fnConstruct();
+343 	
+344 	/* Store the instance for later use */
+345 	ColReorder.aoInstances.push( this );
+346 	return this;
+347 };
+348 
+349 
+350 
+351 ColReorder.prototype = {
+352 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+353 	 * Public methods
+354 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+355 	
+356 	fnReset: function ()
+357 	{
+358 		var a = [];
+359 		for ( var i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+360 		{
+361 			a.push( this.s.dt.aoColumns[i]._ColReorder_iOrigCol );
+362 		}
+363 		
+364 		this._fnOrderColumns( a );
+365 	},
+366 	
+367 	
+368 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+369 	 * Private methods (they are of course public in JS, but recommended as private)
+370 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+371 	
+372 	/**
+373 	 * Constructor logic
+374 	 *  @method  _fnConstruct
+375 	 *  @returns void
+376 	 *  @private 
+377 	 */
+378 	_fnConstruct: function ()
+379 	{
+380 		var that = this;
+381 		var i, iLen;
+382 		
+383 		/* Columns discounted from reordering - counting left to right */
+384 		if ( typeof this.s.init.iFixedColumns != 'undefined' )
+385 		{
+386 			this.s.fixed = this.s.init.iFixedColumns;
+387 		}
+388 		
+389 		/* Add event handlers for the drag and drop, and also mark the original column order */
+390 		for ( i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+391 		{
+392 			if ( i > this.s.fixed-1 )
+393 			{
+394 				$(this.s.dt.aoColumns[i].nTh).bind( 'mousedown.ColReorder', function (e) {
+395 					that._fnMouseDown.call( that, e );
+396 					return false;
+397 				} );
+398 			}
+399 			
+400 			/* Mark the original column order for later reference */
+401 			this.s.dt.aoColumns[i]._ColReorder_iOrigCol = i;
+402 		}
+403 		
+404 		/* State saving */
+405 		this.s.dt.aoStateSave.push( {
+406 			fn: function (oS, sVal) {
+407 				return that._fnStateSave.call( that, sVal );
+408 			},
+409 			sName: "ColReorder_State"
+410 		} );
+411 		
+412 		/* An initial column order has been specified */
+413 		var aiOrder = null;
+414 		if ( typeof this.s.init.aiOrder != 'undefined' )
+415 		{
+416 			aiOrder = this.s.init.aiOrder.slice();
+417 		}
+418 		
+419 		/* State loading, overrides the column order given */
+420 		if ( this.s.dt.oLoadedState && typeof this.s.dt.oLoadedState.ColReorder != 'undefined' &&
+421 		  this.s.dt.oLoadedState.ColReorder.length == this.s.dt.aoColumns.length )
+422 		{
+423 			aiOrder = this.s.dt.oLoadedState.ColReorder;
+424 		}
+425 		
+426 		/* If we have an order to apply - do so */
+427 		if ( aiOrder )
+428 		{
+429 			/* We might be called during or after the DataTables initialisation. If before, then we need
+430 			 * to wait until the draw is done, if after, then do what we need to do right away
+431 			 */
+432 			if ( !that.s.dt._bInitComplete )
+433 			{
+434 				var bDone = false;
+435 				this.s.dt.aoDrawCallback.push( {
+436 					fn: function () {
+437 						if ( !that.s.dt._bInitComplete && !bDone )
+438 						{
+439 							bDone = true;
+440 							var resort = fnInvertKeyValues( aiOrder );
+441 							that._fnOrderColumns.call( that, resort );
+442 						}
+443 					},
+444 					sName: "ColReorder_Pre"
+445 				} );
+446 			}
+447 			else
+448 			{
+449 				var resort = fnInvertKeyValues( aiOrder );
+450 				that._fnOrderColumns.call( that, resort );
+451 			}
+452 		}
+453 	},
+454 	
+455 	
+456 	/**
+457 	 * Set the column order from an array
+458 	 *  @method  _fnOrderColumns
+459 	 *  @param   array a An array of integers which dictate the column order that should be applied
+460 	 *  @returns void
+461 	 *  @private 
+462 	 */
+463 	_fnOrderColumns: function ( a )
+464 	{
+465 		if ( a.length != this.s.dt.aoColumns.length )
+466 		{
+467 			this.s.dt.oInstance.oApi._fnLog( oDTSettings, 1, "ColReorder - array reorder does not "+
+468 			 	"match known number of columns. Skipping." );
+469 			return;
+470 		}
+471 		
+472 		for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+473 		{
+474 			var currIndex = $.inArray( i, a );
+475 			if ( i != currIndex )
+476 			{
+477 				/* Reorder our switching array */
+478 				fnArraySwitch( a, currIndex, i );
+479 				
+480 				/* Do the column reorder in the table */
+481 				this.s.dt.oInstance.fnColReorder( currIndex, i );
+482 			}
+483 		}
+484 		
+485 		/* When scrolling we need to recalculate the column sizes to allow for the shift */
+486 		if ( this.s.dt.oScroll.sX !== "" || this.s.dt.oScroll.sY !== "" )
+487 		{
+488 			this.s.dt.oInstance.fnAdjustColumnSizing();
+489 		}
+490 			
+491 		/* Save the state */
+492 		this.s.dt.oInstance.oApi._fnSaveState( this.s.dt );
+493 	},
+494 	
+495 	
+496 	/**
+497 	 * This function effectively replaces the state saving function in DataTables (this is needed
+498 	 * because otherwise DataTables would state save the columns in their reordered state, not the
+499 	 * original which is needed on first draw). This is sensitive to any changes in the DataTables
+500 	 * state saving method!
+501 	 *  @method  _fnStateSave
+502 	 *  @param   string sCurrentVal 
+503 	 *  @returns string JSON encoded cookie string for DataTables
+504 	 *  @private 
+505 	 */
+506 	_fnStateSave: function ( sCurrentVal )
+507 	{
+508 		var i, iLen, sTmp;
+509 		var sValue = sCurrentVal.split('"aaSorting"')[0];
+510 		var a = [];
+511 		var oSettings = this.s.dt;
+512 		
+513 		/* Sorting */
+514 		sValue += '"aaSorting":[ ';
+515 		for ( i=0 ; i<oSettings.aaSorting.length ; i++ )
+516 		{
+517 			sValue += '['+oSettings.aoColumns[ oSettings.aaSorting[i][0] ]._ColReorder_iOrigCol+
+518 				',"'+oSettings.aaSorting[i][1]+'"],';
+519 		}
+520 		sValue = sValue.substring(0, sValue.length-1);
+521 		sValue += "],";
+522 		
+523 		/* Column filter */
+524 		for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+525 		{
+526 			a[ oSettings.aoColumns[i]._ColReorder_iOrigCol ] = {
+527 				sSearch: encodeURIComponent(oSettings.aoPreSearchCols[i].sSearch),
+528 				bRegex: !oSettings.aoPreSearchCols[i].bRegex
+529 			};
+530 		}
+531 		
+532 		sValue += '"aaSearchCols":[ ';
+533 		for ( i=0 ; i<a.length ; i++ )
+534 		{
+535 			sValue += '["'+a[i].sSearch+'",'+a[i].bRegex+'],';
+536 		}
+537 		sValue = sValue.substring(0, sValue.length-1);
+538 		sValue += "],";
+539 		
+540 		/* Visibility */
+541 		a = [];
+542 		for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+543 		{
+544 			a[ oSettings.aoColumns[i]._ColReorder_iOrigCol ] = oSettings.aoColumns[i].bVisible;
+545 		}
+546 		
+547 		sValue += '"abVisCols":[ ';
+548 		for ( i=0 ; i<a.length ; i++ )
+549 		{
+550 			sValue += a[i]+",";
+551 		}
+552 		sValue = sValue.substring(0, sValue.length-1);
+553 		sValue += "],";
+554 		
+555 		/* Column reordering */
+556 		a = [];
+557 		for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ ) {
+558 			a.push( oSettings.aoColumns[i]._ColReorder_iOrigCol );
+559 		}
+560 		sValue += '"ColReorder":['+a.join(',')+']';
+561 		
+562 		return sValue;
+563 	},
+564 	
+565 	
+566 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+567 	 * Mouse drop and drag
+568 	 */
+569 	
+570 	/**
+571 	 * Mouse down on a TH element in the table header
+572 	 *  @method  _fnMouseDown
+573 	 *  @param   event e Mouse event
+574 	 *  @returns void
+575 	 *  @private 
+576 	 */
+577 	_fnMouseDown: function ( e )
+578 	{
+579 		var
+580 			that = this,
+581 			aoColumns = this.s.dt.aoColumns;
+582 		
+583 		/* Store information about the mouse position */
+584 		var offset = $(e.target).offset();
+585 		this.s.mouse.startX = e.pageX;
+586 		this.s.mouse.startY = e.pageY;
+587 		this.s.mouse.offsetX = e.pageX - offset.left;
+588 		this.s.mouse.offsetY = e.pageY - offset.top;
+589 		this.s.mouse.target = e.target;
+590 		this.s.mouse.targetIndex = $('th', e.target.parentNode).index( e.target );
+591 		this.s.mouse.fromIndex = this.s.dt.oInstance.oApi._fnVisibleToColumnIndex( this.s.dt, 
+592 			this.s.mouse.targetIndex );
+593 		
+594 		/* Calculate a cached array with the points of the column inserts, and the 'to' points */
+595 		this.s.aoTargets.splice( 0, this.s.aoTargets.length );
+596 		
+597 		this.s.aoTargets.push( {
+598 			x:  $(this.s.dt.nTable).offset().left,
+599 			to: 0
+600 		} );
+601 		
+602 		var iToPoint = 0;
+603 		for ( var i=0, iLen=aoColumns.length ; i<iLen ; i++ )
+604 		{
+605 			/* For the column / header in question, we want it's position to remain the same if the 
+606 			 * position is just to it's immediate left or right, so we only incremement the counter for
+607 			 * other columns
+608 			 */
+609 			if ( i != this.s.mouse.fromIndex )
+610 			{
+611 				iToPoint++;
+612 			}
+613 			
+614 			if ( aoColumns[i].bVisible )
+615 			{
+616 				this.s.aoTargets.push( {
+617 					x:  $(aoColumns[i].nTh).offset().left + $(aoColumns[i].nTh).outerWidth(),
+618 					to: iToPoint
+619 				} );
+620 			}
+621 		}
+622 		
+623 		/* Disallow columns for being reordered by drag and drop, counting left to right */
+624 		if ( this.s.fixed !== 0 )
+625 		{
+626 			this.s.aoTargets.splice( 0, this.s.fixed );
+627 		}
+628 		
+629 		/* Add event handlers to the document */
+630 		$(document).bind( 'mousemove.ColReorder', function (e) {
+631 			that._fnMouseMove.call( that, e );
+632 		} );
+633 		
+634 		$(document).bind( 'mouseup.ColReorder', function (e) {
+635 			that._fnMouseUp.call( that, e );
+636 		} );
+637 	},
+638 	
+639 	
+640 	/**
+641 	 * Deal with a mouse move event while dragging a node
+642 	 *  @method  _fnMouseMove
+643 	 *  @param   event e Mouse event
+644 	 *  @returns void
+645 	 *  @private 
+646 	 */
+647 	_fnMouseMove: function ( e )
+648 	{
+649 		var that = this;
+650 		
+651 		if ( this.dom.drag === null )
+652 		{
+653 			/* Only create the drag element if the mouse has moved a specific distance from the start
+654 			 * point - this allows the user to make small mouse movements when sorting and not have a
+655 			 * possibly confusing drag element showing up
+656 			 */
+657 			if ( Math.pow(
+658 				Math.pow(e.pageX - this.s.mouse.startX, 2) + 
+659 				Math.pow(e.pageY - this.s.mouse.startY, 2), 0.5 ) < 5 )
+660 			{
+661 				return;
+662 			}
+663 			this._fnCreateDragNode();
+664 		}
+665 		
+666 		/* Position the element - we respect where in the element the click occured */
+667 		this.dom.drag.style.left = (e.pageX - this.s.mouse.offsetX) + "px";
+668 		this.dom.drag.style.top = (e.pageY - this.s.mouse.offsetY) + "px";
+669 		
+670 		/* Based on the current mouse position, calculate where the insert should go */
+671 		var bSet = false;
+672 		for ( var i=1, iLen=this.s.aoTargets.length ; i<iLen ; i++ )
+673 		{
+674 			if ( e.pageX < this.s.aoTargets[i-1].x + ((this.s.aoTargets[i].x-this.s.aoTargets[i-1].x)/2) )
+675 			{
+676 				this.dom.pointer.style.left = this.s.aoTargets[i-1].x +"px";
+677 				this.s.mouse.toIndex = this.s.aoTargets[i-1].to;
+678 				bSet = true;
+679 				break;
+680 			}
+681 		}
+682 		
+683 		/* The insert element wasn't positioned in the array (less than operator), so we put it at 
+684 		 * the end
+685 		 */
+686 		if ( !bSet )
+687 		{
+688 			this.dom.pointer.style.left = this.s.aoTargets[this.s.aoTargets.length-1].x +"px";
+689 			this.s.mouse.toIndex = this.s.aoTargets[this.s.aoTargets.length-1].to;
+690 		}
+691 	},
+692 	
+693 	
+694 	/**
+695 	 * Finish off the mouse drag and insert the column where needed
+696 	 *  @method  _fnMouseUp
+697 	 *  @param   event e Mouse event
+698 	 *  @returns void
+699 	 *  @private 
+700 	 */
+701 	_fnMouseUp: function ( e )
+702 	{
+703 		var that = this;
+704 		
+705 		$(document).unbind( 'mousemove.ColReorder' );
+706 		$(document).unbind( 'mouseup.ColReorder' );
+707 		
+708 		if ( this.dom.drag !== null )
+709 		{
+710 			/* Remove the guide elements */
+711 			document.body.removeChild( this.dom.drag );
+712 			document.body.removeChild( this.dom.pointer );
+713 			this.dom.drag = null;
+714 			this.dom.pointer = null;
+715 			
+716 			/* Actually do the reorder */
+717 			this.s.dt.oInstance.fnColReorder( this.s.mouse.fromIndex, this.s.mouse.toIndex );
+718 			
+719 			/* When scrolling we need to recalculate the column sizes to allow for the shift */
+720 			if ( this.s.dt.oScroll.sX !== "" || this.s.dt.oScroll.sY !== "" )
+721 			{
+722 				this.s.dt.oInstance.fnAdjustColumnSizing();
+723 			}
+724 			
+725 			/* Save the state */
+726 			this.s.dt.oInstance.oApi._fnSaveState( this.s.dt );
+727 		}
+728 	},
+729 	
+730 	
+731 	/**
+732 	 * Copy the TH element that is being drags so the user has the idea that they are actually 
+733 	 * moving it around the page.
+734 	 *  @method  _fnCreateDragNode
+735 	 *  @returns void
+736 	 *  @private 
+737 	 */
+738 	_fnCreateDragNode: function ()
+739 	{
+740 		var that = this;
+741 		
+742 		this.dom.drag = $(this.s.dt.nTHead.parentNode).clone(true)[0];
+743 		this.dom.drag.className += " DTCR_clonedTable";
+744 		while ( this.dom.drag.getElementsByTagName('tbody').length > 0 )
+745 		{
+746 			this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tbody')[0] );
+747 		}
+748 		while ( this.dom.drag.getElementsByTagName('tfoot').length > 0 )
+749 		{
+750 			this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tfoot')[0] );
+751 		}
+752 		
+753 		$('thead tr:eq(0)', this.dom.drag).each( function () {
+754 			$('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove();
+755 		} );
+756 		$('tr', this.dom.drag).height( $(that.s.dt.nTHead).height() );
+757 		
+758 		$('thead tr:gt(0)', this.dom.drag).remove();
+759 		
+760 		$('thead th:eq(0)', this.dom.drag).each( function (i) {
+761 			this.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).width()+"px";
+762 		} );
+763 		
+764 		this.dom.drag.style.position = "absolute";
+765 		this.dom.drag.style.top = "0px";
+766 		this.dom.drag.style.left = "0px";
+767 		this.dom.drag.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).outerWidth()+"px";
+768 		
+769 		
+770 		this.dom.pointer = document.createElement( 'div' );
+771 		this.dom.pointer.className = "DTCR_pointer";
+772 		this.dom.pointer.style.position = "absolute";
+773 		
+774 		if ( this.s.dt.oScroll.sX === "" && this.s.dt.oScroll.sY === "" )
+775 		{
+776 			this.dom.pointer.style.top = $(this.s.dt.nTable).offset().top+"px";
+777 			this.dom.pointer.style.height = $(this.s.dt.nTable).height()+"px";
+778 		}
+779 		else
+780 		{
+781 			this.dom.pointer.style.top = $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top+"px";
+782 			this.dom.pointer.style.height = $('div.dataTables_scroll', this.s.dt.nTableWrapper).height()+"px";
+783 		}
+784 	
+785 		document.body.appendChild( this.dom.pointer );
+786 		document.body.appendChild( this.dom.drag );
+787 	}
+788 };
+789 
+790 
+791 
+792 
+793 
+794 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+795  * Static parameters
+796  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+797 
+798 /**
+799  * Array of all ColReorder instances for later reference
+800  *  @property ColReorder.aoInstances
+801  *  @type     array
+802  *  @default  []
+803  *  @static
+804  */
+805 ColReorder.aoInstances = [];
+806 
+807 
+808 
+809 
+810 
+811 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+812  * Static functions
+813  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+814 
+815 /**
+816  * Reset the column ordering for a DataTables instance
+817  *  @method  ColReorder.fnReset
+818  *  @param   object oTable DataTables instance to consider
+819  *  @returns void
+820  *  @static
+821  */
+822 ColReorder.fnReset = function ( oTable )
+823 {
+824 	for ( var i=0, iLen=ColReorder.aoInstances.length ; i<iLen ; i++ )
+825 	{
+826 		if ( ColReorder.aoInstances[i].s.dt.oInstance == oTable )
+827 		{
+828 			ColReorder.aoInstances[i].fnReset();
+829 		}
+830 	}
+831 };
+832 
+833 
+834 
+835 
+836 
+837 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+838  * Constants
+839  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+840 
+841 /**
+842  * Name of this class
+843  *  @constant CLASS
+844  *  @type     String
+845  *  @default  ColReorder
+846  */
+847 ColReorder.prototype.CLASS = "ColReorder";
+848 
+849 
+850 /**
+851  * ColReorder version
+852  *  @constant  VERSION
+853  *  @type      String
+854  *  @default   1.0.0
+855  */
+856 ColReorder.VERSION = "1.0.0";
+857 ColReorder.prototype.VERSION = ColReorder.VERSION;
+858 
+859 
+860 
+861 
+862 
+863 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+864  * Initialisation
+865  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+866 
+867 /*
+868  * Register a new feature with DataTables
+869  */
+870 if ( typeof $.fn.dataTable == "function" &&
+871      typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
+872      $.fn.dataTableExt.fnVersionCheck('1.7.4') )
+873 {
+874 	$.fn.dataTableExt.aoFeatures.push( {
+875 		fnInit: function( oDTSettings ) {
+876 			var oTable = oDTSettings.oInstance;
+877 			if ( typeof oTable._oPluginColReorder == 'undefined' ) {
+878 				var opts = typeof oDTSettings.oInit.oColReorder != 'undefined' ? 
+879 					oDTSettings.oInit.oColReorder : {};
+880 				oTable._oPluginColReorder = new ColReorder( oDTSettings.oInstance, opts );
+881 			} else {
+882 				oTable.oApi._fnLog( oDTSettings, 1, "ColReorder attempted to initialise twice. Ignoring second" );
+883 			}
+884 			
+885 			return null; /* No node to insert */
+886 		},
+887 		cFeature: "R",
+888 		sFeature: "ColReorder"
+889 	} );
+890 }
+891 else
+892 {
+893 	alert( "Warning: ColReorder requires DataTables 1.7.4 or greater - www.datatables.net/download");
+894 }
+895 
+896 })(jQuery, window, document);
+897 
\ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/images/insert.png b/includes/DataTables-1.7.5/extras/ColReorder/media/images/insert.png new file mode 100644 index 00000000..15d5522d Binary files /dev/null and b/includes/DataTables-1.7.5/extras/ColReorder/media/images/insert.png differ diff --git a/includes/DataTables-1.7.5/extras/ColReorder/media/js/ColReorder.js b/includes/DataTables-1.7.5/extras/ColReorder/media/js/ColReorder.js new file mode 100755 index 00000000..d2627053 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/media/js/ColReorder.js @@ -0,0 +1,896 @@ +/* + * File: ColReorder.js + * Version: 1.0.0 + * CVS: $Id$ + * Description: Controls for column visiblity in DataTables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Wed Sep 15 18:23:29 BST 2010 + * Modified: $Date$ by $Author$ + * Language: Javascript + * License: LGPL + * Project: DataTables + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2010 Allan Jardine, all rights reserved. + * + */ + + +(function($, window, document) { + + +/** + * Switch the key value pairing of an index array to be value key (i.e. the old value is now the + * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ]. + * @method fnInvertKeyValues + * @param array aIn Array to switch around + * @returns array + */ +function fnInvertKeyValues( aIn ) +{ + var aRet=[]; + for ( var i=0, iLen=aIn.length ; i= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'from' index is out of bounds: "+iFrom ); + return; + } + + if ( iTo < 0 || iTo >= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'to' index is out of bounds: "+iTo ); + return; + } + + /* + * Calculate the new column array index, so we have a mapping between the old and new + */ + var aiMapping = []; + for ( i=0, iLen=iCols ; i this.s.fixed-1 ) + { + $(this.s.dt.aoColumns[i].nTh).bind( 'mousedown.ColReorder', function (e) { + that._fnMouseDown.call( that, e ); + return false; + } ); + } + + /* Mark the original column order for later reference */ + this.s.dt.aoColumns[i]._ColReorder_iOrigCol = i; + } + + /* State saving */ + this.s.dt.aoStateSave.push( { + "fn": function (oS, sVal) { + return that._fnStateSave.call( that, sVal ); + }, + "sName": "ColReorder_State" + } ); + + /* An initial column order has been specified */ + var aiOrder = null; + if ( typeof this.s.init.aiOrder != 'undefined' ) + { + aiOrder = this.s.init.aiOrder.slice(); + } + + /* State loading, overrides the column order given */ + if ( this.s.dt.oLoadedState && typeof this.s.dt.oLoadedState.ColReorder != 'undefined' && + this.s.dt.oLoadedState.ColReorder.length == this.s.dt.aoColumns.length ) + { + aiOrder = this.s.dt.oLoadedState.ColReorder; + } + + /* If we have an order to apply - do so */ + if ( aiOrder ) + { + /* We might be called during or after the DataTables initialisation. If before, then we need + * to wait until the draw is done, if after, then do what we need to do right away + */ + if ( !that.s.dt._bInitComplete ) + { + var bDone = false; + this.s.dt.aoDrawCallback.push( { + "fn": function () { + if ( !that.s.dt._bInitComplete && !bDone ) + { + bDone = true; + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + }, + "sName": "ColReorder_Pre" + } ); + } + else + { + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + } + }, + + + /** + * Set the column order from an array + * @method _fnOrderColumns + * @param array a An array of integers which dictate the column order that should be applied + * @returns void + * @private + */ + "_fnOrderColumns": function ( a ) + { + if ( a.length != this.s.dt.aoColumns.length ) + { + this.s.dt.oInstance.oApi._fnLog( oDTSettings, 1, "ColReorder - array reorder does not "+ + "match known number of columns. Skipping." ); + return; + } + + for ( var i=0, iLen=a.length ; i 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tbody')[0] ); + } + while ( this.dom.drag.getElementsByTagName('tfoot').length > 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tfoot')[0] ); + } + + $('thead tr:eq(0)', this.dom.drag).each( function () { + $('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove(); + } ); + $('tr', this.dom.drag).height( $(that.s.dt.nTHead).height() ); + + $('thead tr:gt(0)', this.dom.drag).remove(); + + $('thead th:eq(0)', this.dom.drag).each( function (i) { + this.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).width()+"px"; + } ); + + this.dom.drag.style.position = "absolute"; + this.dom.drag.style.top = "0px"; + this.dom.drag.style.left = "0px"; + this.dom.drag.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).outerWidth()+"px"; + + + this.dom.pointer = document.createElement( 'div' ); + this.dom.pointer.className = "DTCR_pointer"; + this.dom.pointer.style.position = "absolute"; + + if ( this.s.dt.oScroll.sX === "" && this.s.dt.oScroll.sY === "" ) + { + this.dom.pointer.style.top = $(this.s.dt.nTable).offset().top+"px"; + this.dom.pointer.style.height = $(this.s.dt.nTable).height()+"px"; + } + else + { + this.dom.pointer.style.top = $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top+"px"; + this.dom.pointer.style.height = $('div.dataTables_scroll', this.s.dt.nTableWrapper).height()+"px"; + } + + document.body.appendChild( this.dom.pointer ); + document.body.appendChild( this.dom.drag ); + } +}; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static parameters + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Array of all ColReorder instances for later reference + * @property ColReorder.aoInstances + * @type array + * @default [] + * @static + */ +ColReorder.aoInstances = []; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static functions + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Reset the column ordering for a DataTables instance + * @method ColReorder.fnReset + * @param object oTable DataTables instance to consider + * @returns void + * @static + */ +ColReorder.fnReset = function ( oTable ) +{ + for ( var i=0, iLen=ColReorder.aoInstances.length ; i=g)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+c);else if(d<0||d>=g)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+d);else{var h= +[];b=0;for(e=g;bthis.s.fixed-1&&f(this.s.dt.aoColumns[c].nTh).bind("mousedown.ColReorder",function(g){a._fnMouseDown.call(a,g);return false});this.s.dt.aoColumns[c]._ColReorder_iOrigCol=c}this.s.dt.aoStateSave.push({fn:function(g,h){return a._fnStateSave.call(a,h)},sName:"ColReorder_State"});var b=null;if(typeof this.s.init.aiOrder!= +"undefined")b=this.s.init.aiOrder.slice();if(this.s.dt.oLoadedState&&typeof this.s.dt.oLoadedState.ColReorder!="undefined"&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length)b=this.s.dt.oLoadedState.ColReorder;if(b)if(a.s.dt._bInitComplete){c=l(b);a._fnOrderColumns.call(a,c)}else{var e=false;this.s.dt.aoDrawCallback.push({fn:function(){if(!a.s.dt._bInitComplete&&!e){e=true;var g=l(b);a._fnOrderColumns.call(a,g)}},sName:"ColReorder_Pre"})}},_fnOrderColumns:function(a){if(a.length!= +this.s.dt.aoColumns.length)this.s.dt.oInstance.oApi._fnLog(oDTSettings,1,"ColReorder - array reorder does not match known number of columns. Skipping.");else{for(var c=0,d=a.length;c0;)this.dom.drag.removeChild(this.dom.drag.getElementsByTagName("tbody")[0]); +for(;this.dom.drag.getElementsByTagName("tfoot").length>0;)this.dom.drag.removeChild(this.dom.drag.getElementsByTagName("tfoot")[0]);f("thead tr:eq(0)",this.dom.drag).each(function(){f("th:not(:eq("+a.s.mouse.targetIndex+"))",this).remove()});f("tr",this.dom.drag).height(f(a.s.dt.nTHead).height());f("thead tr:gt(0)",this.dom.drag).remove();f("thead th:eq(0)",this.dom.drag).each(function(){this.style.width=f("th:eq("+a.s.mouse.targetIndex+")",a.s.dt.nTHead).width()+"px"});this.dom.drag.style.position= +"absolute";this.dom.drag.style.top="0px";this.dom.drag.style.left="0px";this.dom.drag.style.width=f("th:eq("+a.s.mouse.targetIndex+")",a.s.dt.nTHead).outerWidth()+"px";this.dom.pointer=i.createElement("div");this.dom.pointer.className="DTCR_pointer";this.dom.pointer.style.position="absolute";if(this.s.dt.oScroll.sX===""&&this.s.dt.oScroll.sY===""){this.dom.pointer.style.top=f(this.s.dt.nTable).offset().top+"px";this.dom.pointer.style.height=f(this.s.dt.nTable).height()+"px"}else{this.dom.pointer.style.top= +f("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top+"px";this.dom.pointer.style.height=f("div.dataTables_scroll",this.s.dt.nTableWrapper).height()+"px"}i.body.appendChild(this.dom.pointer);i.body.appendChild(this.dom.drag)}};ColReorder.aoInstances=[];ColReorder.fnReset=function(a){for(var c=0,d=ColReorder.aoInstances.length;c + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with predefined column ordering +
+ +

Preamble

+

ColReorder provides the ability to specify a column ordering which is not that of the + HTML (which typically you will want) through the parameter oColReorder.aiOrder. This is + an array of integers with the column ordering you want.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"oColReorder": {
+			"aiOrder": [ 4, 3, 2, 1, 0 ]
+		}
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/reset.html b/includes/DataTables-1.7.5/extras/ColReorder/reset.html new file mode 100755 index 00000000..c90451bb --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/reset.html @@ -0,0 +1,531 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with the ability to reset the ordering +
+ +

Preamble

+

One useful control option to present the end user when using ColReorder is the ability + to reset the column ordering to that which was found in the HTML. This can be done by + calling the fnReset API function. While ColReorder does not provide a visual element for + this itself (in order to provide maximum flexibility) it is easy to hook to an event + handler, as shown in this example.

+ +

Live example

+
+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"oColReorder": {
+			"aiOrder": [ 4, 3, 2, 1, 0 ]
+		}
+	} );
+	
+	$('#reset').click( function () {
+		ColReorder.fnReset( oTable );
+		return false;
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/scrolling.html b/includes/DataTables-1.7.5/extras/ColReorder/scrolling.html new file mode 100755 index 00000000..48f04358 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/scrolling.html @@ -0,0 +1,495 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with scrolling +
+ +

Preamble

+

This is a simple example to show ColReorder working with DataTables scrolling.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"sScrollY": "200px",
+		"bPaginate": false
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/server_side.html b/includes/DataTables-1.7.5/extras/ColReorder/server_side.html new file mode 100755 index 00000000..f5e3478e --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/server_side.html @@ -0,0 +1,117 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with server-side processing +
+ +

Preamble

+

Server-side processing can be exceptionally useful in DataTables when dealing with + massive data sets, and ColReorder works with this as would be expected. There must be + special consideration for the column ordering on the server-side script since the + columns can be in an unexpected order. For this the sName parameter of each column + must be specified and the server-side script take this into account. This is + shown in this example.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"bProcessing": true,
+		"bServerSide": true,
+		"sAjaxSource": "../../examples/examples_support/server_processing_ordering.php",
+		"aoColumns": [
+			{ "sName": "engine" },
+			{ "sName": "browser" },
+			{ "sName": "platform" },
+			{ "sName": "version" },
+			{ "sName": "grade" }
+		]
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColReorder/state_save.html b/includes/DataTables-1.7.5/extras/ColReorder/state_save.html new file mode 100755 index 00000000..fa2b0619 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColReorder/state_save.html @@ -0,0 +1,496 @@ + + + + + + + ColReorder example + + + + + + + +
+
+ ColReorder example with state saving +
+ +

Preamble

+

A useful interaction pattern to use in DataTables is state saving, so when the end user + reloads or revisits a page its previous state is retained. ColReorder works seamlessly + with state saving in DataTables, remembering and restoring the column positions, as well + as everything else such as sorting and filtering.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	var oTable = $('#example').dataTable( {
+		"sDom": 'Rlfrtip',
+		"bStateSave": true
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/exclude_columns.html b/includes/DataTables-1.7.5/extras/ColVis/exclude_columns.html new file mode 100755 index 00000000..584c0833 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/exclude_columns.html @@ -0,0 +1,497 @@ + + + + + + + ColVis example + + + + + + + +
+
+ ColVis example - exclude columns from list +
+ +

Preamble

+

It can at times be useful to exclude columns from being in the 'show / hide' list (for + example if you have hidden information that the end user shouldn't be able to make + visible. This can be done by the oColVis.aiExclude initialisation parameter when creating + the DataTable. This is simply an array of integers, indicating which columns should + be excluded. This example shows the first column being excluded.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	$('#example').dataTable( {
+		"sDom": 'C<"clear">lfrtip',
+		"oColVis": {
+			"aiExclude": [ 0 ]
+		}
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/index.html b/includes/DataTables-1.7.5/extras/ColVis/index.html new file mode 100755 index 00000000..d5a3823a --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/index.html @@ -0,0 +1,487 @@ + + + + + + + ColVis example + + + + + + + +
+
+ ColVis example +
+ +

Preamble

+

ColVis is a plug-in for DataTables which presents a list of all columns to a user and allows them to select which ones they wish to be visible. Click the 'Show / hide columns' button to be presented with a list of columns in the table, and click the buttons to show and hide them as you wish.

+ +

Live example

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet Explorer 4.0Win 95+ (Entity: &)4X
TridentInternet Explorer 5.0Win 95+5C
TridentInternet Explorer 5.5Win 95+5.5A
TridentInternet Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
Gecko (UTF-8: $¢€)Firefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1.1A
GeckoMozilla 1.2Win 95+ / OSX.1+1.2A
GeckoMozilla 1.3Win 95+ / OSX.1+1.3A
GeckoMozilla 1.4Win 95+ / OSX.1+1.4A
GeckoMozilla 1.5Win 95+ / OSX.1+1.5A
GeckoMozilla 1.6Win 95+ / OSX.1+1.6A
GeckoMozilla 1.7Win 98+ / OSX.1+1.7A
GeckoMozilla 1.8Win 98+ / OSX.1+1.8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1.8A
GeckoEpiphany 2.20Gnome1.8A
WebkitSafari 1.2OSX.3125.5A
WebkitSafari 1.3OSX.3312.8A
WebkitSafari 2.0OSX.4+419.3A
WebkitSafari 3.0OSX.4+522.1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420.1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8.5C/A1
KHTMLKonqureror 3.1KDE 3.13.1C
KHTMLKonqureror 3.3KDE 3.33.3A
KHTMLKonqureror 3.5KDE 3.53.5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
+
+
+
+ + +

Examples

+ + + +

Initialisation code

+
$(document).ready( function () {
+	$('#example').dataTable( {
+		"sDom": 'C<"clear">lfrtip'
+	} );
+} );
+ + +
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/css/ColVis.css b/includes/DataTables-1.7.5/extras/ColVis/media/css/ColVis.css new file mode 100755 index 00000000..d41be479 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/css/ColVis.css @@ -0,0 +1,76 @@ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * TableTools styles + */ +.TableTools { + float: right; + margin-bottom: 1em; +} + +.TableTools_Button { + position: relative; + float: left; + margin-right: 3px; + padding: 3px 5px; + height: 30px; + background-color: #fff; + border: 1px solid #d0d0d0; + cursor: pointer; + *cursor: hand; +} + +button.TableTools_Button::-moz-focus-inner { + border: none !important; + padding: 0; +} + +.TableTools_text_hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + +div.TableTools_collectionBackground { + background-color: black; + z-index: 1100; +} + +div.TableTools_collection { + position: relative; + width: 150px; + background-color: #f3f3f3; + padding: 3px; + border: 1px solid #ccc; + z-index: 1102; +} + +div.TableTools_collection button.TableTools_Button { + background-color: white; + width: 100%; + float: none; + margin-bottom: 2px; +} + +div.TableTools_catcher { + position: absolute; + z-index: 1101; +} + +.disabled { + color: #999; +} + + + +button.ColVis_Button { + text-align: left; +} + +div.ColVis_collection button.ColVis_Button:hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + +span.ColVis_radio { + display: inline-block; + width: 20px; +} diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/css/default.css b/includes/DataTables-1.7.5/extras/ColVis/media/docs/css/default.css new file mode 100644 index 00000000..b9dde3b1 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/css/default.css @@ -0,0 +1,418 @@ +/* + * TABLE OF CONTENTS: + * - Browser reset + * - HTML elements + * - JsDoc styling + */ + + + + + + +/* + * BEGIN BROWSER RESET + */ + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { + margin:0; + padding:0 +} +html { + height:100%; + overflow:-moz-scrollbars-vertical; + overflow-x:auto +} +table { + border:0; + border-collapse:collapse; + border-spacing:0 +} +fieldset,img { + border:0 +} +address,caption,cite,code,dfn,em,strong,th,var { + font-style:normal; + font-weight:normal +} +em,cite { + font-style:italic +} +strong { + font-weight:bold +} +ol,ul { + list-style:none +} +caption,th { + text-align:left +} +h1,h2,h3,h4,h5,h6 { + font-size:100%; + font-weight:normal; + margin:0; + padding:0 +} +q:before,q:after { + content:'' +} +abbr,acronym { + border:0 +} + +/* + * END BROWSER RESET + */ + + + + + + +/* + * HTML ELEMENTS + */ + +* { + line-height: 1.4em; +} + +html { + font-size: 100%; +} + +body { + font-size: 0.75em !important; + padding: 15px 0; + background: #eee; + background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9); + background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)); + } + +body, +input, +select, +textarea { + color: #000; + font-family: Arial, Geneva, sans-serif; +} + +a:link, +a:hover, +a:active, +a:visited { + color: #19199e; +} +a:hover, +a:focus { + color: #00f; + text-decoration: none; +} + +p { + margin: 0 0 1.5em 0; +} + +/* + * END HTML ELEMENTS + */ + + + +/* + * BEGIN HACK + */ + +div.containerMain:after, +div.safeBox:after { + content:""; + display:block; + height:0; + clear:both; +} + +/* + * END HACK + */ + + + +/* + * BEGIN JSDOC + */ + +div.index *.heading1 { + margin-bottom: 0.5em; + border-bottom: 1px solid #999999; + padding: 0.5em 0 0.1em 0; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.3em; + letter-spacing: 1px; +} + +div.index { + float: left; + width: 30%; + min-width: 100px; + max-width: 250px; +} +div.index div.menu { + margin: 0 15px 0 -15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + padding: 15px 15px 15px 30px; + background-color: #FFFFFF; + background-color: rgba(255, 255, 255, 0.5); + -moz-box-shadow: 0px 0px 10px #c4c4c4; + -webkit-box-shadow: 0px 0px 10px #c4c4c4; + box-shadow: 0px 0px 10px #c4c4c4; +} +*+html div.index div.menu { + background-color: #FFFFFF; +} +* html div.index div.menu { + background-color: #FFFFFF; +} + +div.index div.menu div { + text-align: left; +} + +div.index div.menu a { + text-decoration: none; +} +div.index div.menu a:hover { + text-decoration: underline; +} + +div.index ul.classList a { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.index div.fineprint { + padding: 15px 30px 15px 15px; + color: #777; + font-size: 0.9em; +} +div.index div.fineprint a { + color: #777; +} + + + +div.content { + float: left; + width: 70%; + min-width: 300px; + max-width: 600px; +} +div.innerContent { + padding: 0 0 0 2.5em; +} + +div.content ul, +div.content ol { + margin-bottom: 3em; +} + +div.content *.classTitle { + margin-bottom: 0.5em; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 2.5em; + letter-spacing: 2px; +} + +div.content *.classTitle span { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.content p.summary { + font-size: 1.2em; +} + +div.content ul *.classname a, +div.content ul *.filename a { + font-family: Consolas, "Courier New", Courier, monospace; + text-decoration: none; + font-weight: bold; +} +div.content ul *.classname a:hover, +div.content ul *.filename a:hover { + text-decoration: underline; +} + +div.content div.props { + position: relative; + left: -10px; + margin-bottom: 2.5em; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 10px 15px 15px 15px; + overflow: hidden; + background: #fff; + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ + background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); + -moz-box-shadow: 0px 0px 10px #ccc; + -webkit-box-shadow: 0px 0px 5px #bbb; + box-shadow: 0px 0px 5px #bbb; +} + +div.content div.props div.sectionTitle { + padding-bottom: 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +div.content div.hr { + margin: 0 10px 0 0; + height: 4em; +} + + + +table.summaryTable { + position: relative; + left: -10px; + width: 100%; + border-collapse: collapse; + box-sizing: content-box; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -ms-box-sizing: content-box; + -o-box-sizing: content-box; + -icab-box-sizing: content-box; + -khtml-box-sizing: content-box; +} + +table.summaryTable caption { + padding: 0 10px 10px 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +table.summaryTable td, +table.summaryTable th { + padding: 0px 10px 10px 10px; + vertical-align: top; +} +table.summaryTable tr:last-child td { + padding-bottom: 0; +} + +table.summaryTable th { + font-weight: bold; +} + +table.summaryTable td.attributes { + width: 35%; + font-family: Consolas, "Courier New", Courier, monospace; + color: #666; +} + +table.summaryTable td.nameDescription { + width: 65% +} + +table.summaryTable td.nameDescription div.fixedFont { + font-weight: bold; +} + +table.summaryTable div.description { + color: #333; +} + + + +dl.detailList { + margin-top: 0.5em; +} + +dl.detailList.nomargin + dl.detailList.nomargin { + margin-top: 0; +} + +dl.detailList dt { + display: inline; + margin-right: 5px; + font-weight: bold; +} + +dl.detailList dt:before { + display: block; + content: ""; +} + +dl.detailList dd { + display: inline; +} + +dl.detailList.params dt { + display: block; +} +dl.detailList.params dd { + display: block; + padding-left: 2em; + padding-bottom: 0.4em; +} + + + + +ul.fileList li { + margin-bottom: 1.5em; +} + + + +.fixedFont { + font-family: Consolas, "Courier New", Courier, monospace; +} + +.fixedFont.heading { + margin-bottom: 0.5em; + font-size: 1.25em; + line-height: 1.1em +} + +.fixedFont.heading + .description { + font-size: 1.2em; +} + +.fixedFont.heading .light, +.fixedFont.heading .lighter { + font-weight: bold; +} + +pre.code { + margin: 10px 0 10px 0; + padding: 10px; + border: 1px solid #ccc; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: auto; + font-family: Consolas, "Courier New", Courier, monospace; + background: #eee; +} + +.light { + color: #666; +} + +.lighter { + color: #999; +} + +.clear { + clear: both; + width: 100%; + min-height: 0; +} + +/* + * END JSDOC + */ \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/files.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/files.html new file mode 100644 index 00000000..31e2afda --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/files.html @@ -0,0 +1,67 @@ + + + + + + JsDoc Reference - File Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:22 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

File Index

+ + +
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/index.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/index.html new file mode 100644 index 00000000..8fd88c59 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/index.html @@ -0,0 +1,71 @@ + + + + + JsDoc Reference - Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:22 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

Class Index

+ +
    + +
  • +

    _global_

    +

    +
  • + +
  • +

    ColVis

    +

    ColVis

    +
  • + +
  • +

    ColVis#dom

    +

    Common and useful DOM elements for the class instance

    +
  • + +
  • +

    ColVis#s

    +

    Settings object which contains customisable information for ColVis instance

    +
  • + +
+
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#dom.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#dom.html new file mode 100644 index 00000000..79f678ad --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#dom.html @@ -0,0 +1,468 @@ + + + + + + + JsDoc Reference - ColVis#dom + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:21 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColVis#dom +

+ +

+ + + + + Common and useful DOM elements for the class instance + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis#dom.background +
+
Background node used for shading the display and event capturing
+
<static>   +
+ ColVis#dom.button +
+
Activation button
+
<static>   +
+ ColVis#dom.buttons +
+
List of button elements
+
<static>   +
+ ColVis#dom.catcher +
+
Element to position over the activation button to catch mouse events when using mouseover
+
<static>   +
+ ColVis#dom.collection +
+
Collection list node
+
<static>   +
+ ColVis#dom.wrapper +
+
Wrapper for the button - given back to DataTables as the node to insert
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColVis#dom +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {Node} + + ColVis#dom.background +
+ +
+ Background node used for shading the display and event capturing + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.button +
+ +
+ Activation button + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Array} + + ColVis#dom.buttons +
+ +
+ List of button elements + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.catcher +
+ +
+ Element to position over the activation button to catch mouse events when using mouseover + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.collection +
+ +
+ Collection list node + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.wrapper +
+ +
+ Wrapper for the button - given back to DataTables as the node to insert + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#s.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#s.html new file mode 100644 index 00000000..c805fbae --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis#s.html @@ -0,0 +1,420 @@ + + + + + + + JsDoc Reference - ColVis#s + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:21 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColVis#s +

+ +

+ + + + + Settings object which contains customisable information for ColVis instance + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ ColVis#s +
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis#s.activate +
+
Mode of activation.
+
<static>   +
+ ColVis#s.aiExclude +
+
List of columns (integers) which should be excluded from the list
+
<static>   +
+ ColVis#s.buttonText +
+
Text used for the button
+
<static>   +
+ ColVis#s.dt +
+
DataTables settings object
+
<static>   +
+ ColVis#s.hidden +
+
Flag to say if the collection is hidden
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColVis#s +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {String} + + ColVis#s.activate +
+ +
+ Mode of activation. Can be 'click' or 'mouseover' + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ click +
+ +
+ + +
+ + + +
+ + <static> + + + {Array} + + ColVis#s.aiExclude +
+ +
+ List of columns (integers) which should be excluded from the list + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <static> + + + {String} + + ColVis#s.buttonText +
+ +
+ Text used for the button + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ Show / hide columns +
+ +
+ + +
+ + + +
+ + <static> + + + {Object} + + ColVis#s.dt +
+ +
+ DataTables settings object + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {boolean} + + ColVis#s.hidden +
+ +
+ Flag to say if the collection is hidden + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ true +
+ +
+ + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis.html new file mode 100644 index 00000000..ea575792 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/ColVis.html @@ -0,0 +1,494 @@ + + + + + + + JsDoc Reference - ColVis + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:21 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Class ColVis +

+ +

+ + + + + ColVis + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ ColVis(DataTables) +
+
ColVis provides column visiblity control for DataTables
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis.aInstances +
+
Collection of all ColVis instances
+
<constant>   +
+ CLASS +
+
Name of this class
+
<static> <constant>   +
+ ColVis.VERSION +
+
ColVis version
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<static>   +
ColVis.fnRebuild(object) +
+
Rebuild the collection for a given table, or all tables if no parameter given
+
  + +
Rebuild the list of buttons for this instance (i.e.
+
+
+ + + + + + + + + + +
+
+ + +
+ Class Detail +
+ +
+ ColVis(DataTables) +
+ +
+ ColVis provides column visiblity control for DataTables + +
+ + + + +
+
Parameters:
+ +
+ {object} DataTables + +
+
settings object
+ +
+ + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {Array} + + ColVis.aInstances +
+ +
+ Collection of all ColVis instances + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <constant> + + + {String} + + CLASS +
+ +
+ Name of this class + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ ColVis +
+ +
+ + +
+ + + +
+ + <static> <constant> + + + {String} + + ColVis.VERSION +
+ +
+ ColVis version + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ 1.0.3 +
+ +
+ + + + +
+
+ + + + +
+
+
+ Method Detail +
+ + + + +
+ + <static> + + + + + ColVis.fnRebuild(object) +
+ +
+ Rebuild the collection for a given table, or all tables if no parameter given + + + + +
+ + + + +
+
Parameters:
+ +
+ object + +
+
oTable DataTable instance to consider - optional
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + + + + + + fnRebuild() +
+ +
+ Rebuild the list of buttons for this instance (i.e. if there is a column header update) + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + + + +
+
+ + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/_global_.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/_global_.html new file mode 100644 index 00000000..d2cb29d9 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/_global_.html @@ -0,0 +1,97 @@ + + + + + + + JsDoc Reference - _global_ + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:21 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Built-In Namespace _global_ +

+ +

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/src/js_ColVis.js.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/src/js_ColVis.js.html new file mode 100644 index 00000000..a3e66ddc --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs/symbols/src/js_ColVis.js.html @@ -0,0 +1,679 @@ +
  1 /*
+  2  * File:        ColVis.js
+  3  * Version:     1.0.3
+  4  * CVS:         $Id$
+  5  * Description: Controls for column visiblity in DataTables
+  6  * Author:      Allan Jardine (www.sprymedia.co.uk)
+  7  * Created:     Wed Sep 15 18:23:29 BST 2010
+  8  * Modified:    $Date$ by $Author$
+  9  * Language:    Javascript
+ 10  * License:     LGPL
+ 11  * Project:     Just a little bit of fun :-)
+ 12  * Contact:     www.sprymedia.co.uk/contact
+ 13  * 
+ 14  * Copyright 2010 Allan Jardine, all rights reserved.
+ 15  *
+ 16  */
+ 17 
+ 18 (function($) {
+ 19 
+ 20 /** 
+ 21  * ColVis provides column visiblity control for DataTables
+ 22  * @class ColVis
+ 23  * @constructor
+ 24  * @param {object} DataTables settings object
+ 25  */
+ 26 ColVis = function( oDTSettings )
+ 27 {
+ 28 	/* Santiy check that we are a new instance */
+ 29 	if ( !this.CLASS || this.CLASS != "ColVis" )
+ 30 	{
+ 31 		alert( "Warning: ColVis must be initialised with the keyword 'new'" );
+ 32 	}
+ 33 	
+ 34 	
+ 35 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ 36 	 * Public class variables
+ 37 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ 38 	
+ 39 	/**
+ 40 	 * @namespace Settings object which contains customisable information for ColVis instance
+ 41 	 */
+ 42 	this.s = {
+ 43 		/**
+ 44 		 * DataTables settings object
+ 45 		 *  @property dt
+ 46 		 *  @type     Object
+ 47 		 *  @default  null
+ 48 		 */
+ 49 		dt: null,
+ 50 		
+ 51 		/**
+ 52 		 * Mode of activation. Can be 'click' or 'mouseover'
+ 53 		 *  @property activate
+ 54 		 *  @type     String
+ 55 		 *  @default  click
+ 56 		 */
+ 57 		activate: "click",
+ 58 		
+ 59 		/**
+ 60 		 * Text used for the button
+ 61 		 *  @property buttonText
+ 62 		 *  @type     String
+ 63 		 *  @default  Show / hide columns
+ 64 		 */
+ 65 		buttonText: "Show / hide columns",
+ 66 		
+ 67 		/**
+ 68 		 * Flag to say if the collection is hidden
+ 69 		 *  @property hidden
+ 70 		 *  @type     boolean
+ 71 		 *  @default  true
+ 72 		 */
+ 73 		hidden: true,
+ 74 		
+ 75 		/**
+ 76 		 * List of columns (integers) which should be excluded from the list
+ 77 		 *  @property aiExclude
+ 78 		 *  @type     Array
+ 79 		 *  @default  []
+ 80 		 */
+ 81 		aiExclude: []
+ 82 	};
+ 83 	
+ 84 	
+ 85 	/**
+ 86 	 * @namespace Common and useful DOM elements for the class instance
+ 87 	 */
+ 88 	this.dom = {
+ 89 		/**
+ 90 		 * Wrapper for the button - given back to DataTables as the node to insert
+ 91 		 *  @property wrapper
+ 92 		 *  @type     Node
+ 93 		 *  @default  null
+ 94 		 */
+ 95 		wrapper: null,
+ 96 		
+ 97 		/**
+ 98 		 * Activation button
+ 99 		 *  @property button
+100 		 *  @type     Node
+101 		 *  @default  null
+102 		 */
+103 		button: null,
+104 		
+105 		/**
+106 		 * Collection list node
+107 		 *  @property collection
+108 		 *  @type     Node
+109 		 *  @default  null
+110 		 */
+111 		collection: null,
+112 		
+113 		/**
+114 		 * Background node used for shading the display and event capturing
+115 		 *  @property background
+116 		 *  @type     Node
+117 		 *  @default  null
+118 		 */
+119 		background: null,
+120 		
+121 		/**
+122 		 * Element to position over the activation button to catch mouse events when using mouseover
+123 		 *  @property catcher
+124 		 *  @type     Node
+125 		 *  @default  null
+126 		 */
+127 		catcher: null,
+128 		
+129 		/**
+130 		 * List of button elements
+131 		 *  @property buttons
+132 		 *  @type     Array
+133 		 *  @default  []
+134 		 */
+135 		buttons: []
+136 	};
+137 	
+138 	
+139 	
+140 	
+141 	
+142 	/* Constructor logic */
+143 	this.s.dt = oDTSettings;
+144 	this._fnConstruct();
+145 	return this;
+146 };
+147 
+148 
+149 
+150 ColVis.prototype = {
+151 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+152 	 * Public methods
+153 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+154 	
+155 	/**
+156 	 * Rebuild the list of buttons for this instance (i.e. if there is a column header update)
+157 	 *  @method  fnRebuild
+158 	 *  @returns void
+159 	 */
+160 	fnRebuild: function ()
+161 	{
+162 		/* Remove the old buttons */
+163 		for ( var i=this.dom.buttons.length-1 ; i>=0 ; i-- )
+164 		{
+165 			this.dom.collection.removeChild( this.dom.buttons[i] )
+166 		}
+167 		this.dom.buttons.splice( 0, this.dom.buttons.length );
+168 		
+169 		/* Re-add them (this is not the optimal way of doing this, it is fast and effective) */
+170 		this._fnAddButtons();
+171 		
+172 		/* Update the checkboxes */
+173 		this._fnDrawCallback();
+174 	},
+175 	
+176 	
+177 	
+178 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+179 	 * Private methods (they are of course public in JS, but recommended as private)
+180 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+181 	
+182 	/**
+183 	 * Constructor logic
+184 	 *  @method  _fnConstruct
+185 	 *  @returns void
+186 	 *  @private 
+187 	 */
+188 	_fnConstruct: function ()
+189 	{
+190 		this._fnApplyCustomisation();
+191 		
+192 		var that = this;
+193 		this.dom.wrapper = document.createElement('div');
+194 		this.dom.wrapper.className = "ColVis TableTools";
+195 		
+196 		this.dom.button = this._fnDomBaseButton( this.s.buttonText );
+197 		this.dom.wrapper.appendChild( this.dom.button );
+198 		
+199 		this.dom.catcher = this._fnDomCatcher();
+200 		this.dom.collection = this._fnDomCollection();
+201 		this.dom.background = this._fnDomBackground();
+202 		
+203 		this._fnAddButtons();
+204 		
+205 		this.s.dt.aoDrawCallback.push( {
+206 			fn: function () {
+207 				that._fnDrawCallback.call( that );
+208 			},
+209 			sName: "ColVis"
+210 		} );
+211 	},
+212 	
+213 	
+214 	/**
+215 	 * Apply any customisation to the settings from the DataTables initialisation
+216 	 *  @method  _fnApplyCustomisation
+217 	 *  @returns void
+218 	 *  @private 
+219 	 */
+220 	_fnApplyCustomisation: function ()
+221 	{
+222 		if ( typeof this.s.dt.oInit.oColVis != 'undefined' )
+223 		{
+224 			var oConfig = this.s.dt.oInit.oColVis;
+225 			
+226 			if ( typeof oConfig.activate != 'undefined' )
+227 			{
+228 				this.s.activate = oConfig.activate;
+229 			}
+230 			
+231 			if ( typeof oConfig.buttonText != 'undefined' )
+232 			{
+233 				this.s.buttonText = oConfig.buttonText;
+234 			}
+235 			
+236 			if ( typeof oConfig.aiExclude != 'undefined' )
+237 			{
+238 				this.s.aiExclude = oConfig.aiExclude;
+239 			}
+240 		}
+241 	},
+242 	
+243 	
+244 	/**
+245 	 * On each table draw, check the visiblity checkboxes as needed. This allows any process to
+246 	 * update the table's column visiblity and ColVis will still be accurate.
+247 	 *  @method  _fnDrawCallback
+248 	 *  @returns void
+249 	 *  @private 
+250 	 */
+251 	_fnDrawCallback: function ()
+252 	{
+253 		var aoColumns = this.s.dt.aoColumns;
+254 		
+255 		for ( var i=0, iLen=aoColumns.length ; i<iLen ; i++ )
+256 		{
+257 			if ( this.dom.buttons[i] !== null )
+258 			{
+259 				if ( aoColumns[i].bVisible )
+260 				{
+261 					$('input', this.dom.buttons[i]).attr('checked','checked');
+262 				}
+263 				else
+264 				{
+265 					$('input', this.dom.buttons[i]).removeAttr('checked');
+266 				}
+267 			}
+268 		}
+269 	},
+270 	
+271 	
+272 	/**
+273 	 * Loop through the columns in the table and as a new button for each one.
+274 	 *  @method  _fnAddButtons
+275 	 *  @returns void
+276 	 *  @private 
+277 	 */
+278 	_fnAddButtons: function ()
+279 	{
+280 		var
+281 			nButton,
+282 			sExclude = ","+this.s.aiExclude.join(',')+",";
+283 		
+284 		for ( var i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+285 		{
+286 			if ( sExclude.indexOf( ","+i+"," ) == -1 )
+287 			{
+288 				nButton = this._fnDomColumnButton( i );
+289 				this.dom.buttons.push( nButton );
+290 				this.dom.collection.appendChild( nButton );
+291 			}
+292 			else
+293 			{
+294 				this.dom.buttons.push( null );
+295 			}
+296 		}
+297 	},
+298 	
+299 	
+300 	/**
+301 	 * Create the DOM for a show / hide button
+302 	 *  @method  _fnDomColumnButton
+303 	 *  @param {int} i Column in question
+304 	 *  @returns {Node} Created button
+305 	 *  @private 
+306 	 */
+307 	_fnDomColumnButton: function ( i )
+308 	{
+309 		var
+310 			that = this,
+311 			oColumn = this.s.dt.aoColumns[i],
+312 		  nButton = document.createElement('button'),
+313 		  nSpan = document.createElement('span');
+314 		
+315 		nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
+316 			"ColVis_Button TableTools_Button ui-button ui-state-default";
+317 		nButton.appendChild( nSpan );
+318 		$(nSpan).html(
+319 			'<span class="ColVis_radio"><input type="checkbox"></span>'+
+320 			'<span class="ColVis_title">'+oColumn.sTitle+'</span>' );
+321 		
+322 		$(nButton).click( function (e) {
+323 			var showHide = $('input',this).attr('checked')===true ? false : true;
+324 			if ( e.target.nodeName.toLowerCase() == "input" )
+325 			{
+326 				showHide = $('input',this).attr('checked');
+327 			}
+328 			
+329 			/* Need to consider the case where the initialiser created more than one table - change the
+330 			 * API index that DataTables is using
+331 			 */
+332 			var oldIndex = $.fn.dataTableExt.iApiIndex;
+333 			$.fn.dataTableExt.iApiIndex = that._fnDataTablesApiIndex.call(that);
+334 			that.s.dt.oInstance.fnSetColumnVis( i, showHide );
+335 			$.fn.dataTableExt.iApiIndex = oldIndex; /* Restore */
+336 		} );
+337 		
+338 		return nButton;
+339 	},
+340 	
+341 	
+342 	/**
+343 	 * Get the position in the DataTables instance array of the table for this instance of ColVis
+344 	 *  @method  _fnDataTablesApiIndex
+345 	 *  @returns {int} Index
+346 	 *  @private 
+347 	 */
+348 	_fnDataTablesApiIndex: function ()
+349 	{
+350 		for ( var i=0, iLen=this.s.dt.oInstance.length ; i<iLen ; i++ )
+351 		{
+352 			if ( this.s.dt.oInstance[i] == this.s.dt.nTable )
+353 			{
+354 				return i;
+355 			}
+356 		}
+357 		return 0;
+358 	},
+359 	
+360 	
+361 	/**
+362 	 * Create the DOM needed for the button and apply some base properties. All buttons start here
+363 	 *  @method  _fnDomBaseButton
+364 	 *  @param   {String} text Button text
+365 	 *  @returns {Node} DIV element for the button
+366 	 *  @private 
+367 	 */
+368 	_fnDomBaseButton: function ( text )
+369 	{
+370 		var
+371 			that = this,
+372 		  nButton = document.createElement('button'),
+373 		  nSpan = document.createElement('span'),
+374 			sEvent = this.s.activate=="mouseover" ? "mouseover" : "click";
+375 		
+376 		nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
+377 			"ColVis_Button TableTools_Button ui-button ui-state-default";
+378 		nButton.appendChild( nSpan );
+379 		nSpan.innerHTML = text;
+380 		
+381 		$(nButton).bind( sEvent, function (e) {
+382 			that._fnCollectionShow();
+383 			e.preventDefault();
+384 		} );
+385 		
+386 		return nButton;
+387 	},
+388 	
+389 	
+390 	/**
+391 	 * Create the element used to contain list the columns (it is shown and hidden as needed)
+392 	 *  @method  _fnDomCollection
+393 	 *  @returns {Node} div container for the collection
+394 	 *  @private 
+395 	 */
+396 	_fnDomCollection: function ()
+397 	{
+398 		var that = this;
+399 		var nHidden = document.createElement('div');
+400 		nHidden.style.display = "none";
+401 		nHidden.className = !this.s.dt.bJUI ? "ColVis_collection TableTools_collection" :
+402 			"ColVis_collection TableTools_collection ui-buttonset ui-buttonset-multi";
+403 		nHidden.style.position = "absolute";
+404 		$(nHidden).css('opacity', 0);
+405 		
+406 		return nHidden;
+407 	},
+408 	
+409 	
+410 	/**
+411 	 * An element to be placed on top of the activate button to catch events
+412 	 *  @method  _fnDomCatcher
+413 	 *  @returns {Node} div container for the collection
+414 	 *  @private 
+415 	 */
+416 	_fnDomCatcher: function ()
+417 	{
+418 		var 
+419 			that = this,
+420 			nCatcher = document.createElement('div');
+421 		nCatcher.className = "ColVis_catcher TableTools_catcher";
+422 		
+423 		$(nCatcher).click( function () {
+424 			that._fnCollectionHide.call( that, null, null );
+425 		} );
+426 		
+427 		return nCatcher;
+428 	},
+429 	
+430 	
+431 	/**
+432 	 * Create the element used to shade the background, and capture hide events (it is shown and 
+433 	 * hidden as needed)
+434 	 *  @method  _fnDomBackground
+435 	 *  @returns {Node} div container for the background
+436 	 *  @private 
+437 	 */
+438 	_fnDomBackground: function ()
+439 	{
+440 		var that = this;
+441 		
+442 		var nBackground = document.createElement('div');
+443 		nBackground.style.position = "absolute";
+444 		nBackground.style.left = "0px";
+445 		nBackground.style.top = "0px";
+446 		nBackground.className = "TableTools_collectionBackground";
+447 		$(nBackground).css('opacity', 0);
+448 		
+449 		$(nBackground).click( function () {
+450 			that._fnCollectionHide.call( that, null, null );
+451 		} );
+452 		
+453 		/* When considering a mouse over action for the activation, we also consider a mouse out
+454 		 * which is the same as a mouse over the background - without all the messing around of
+455 		 * bubbling events. Use the catcher element to avoid messing around with bubbling
+456 		 */
+457 		if ( this.s.activate == "mouseover" )
+458 		{
+459 			$(nBackground).mouseover( function () {
+460 				that.s.overcollection = false;
+461 				that._fnCollectionHide.call( that, null, null );
+462 			} );
+463 		}
+464 		
+465 		return nBackground;
+466 	},
+467 	
+468 	
+469 	/**
+470 	 * Show the show / hide list and the background
+471 	 *  @method  _fnCollectionShow
+472 	 *  @returns void
+473 	 *  @private 
+474 	 */
+475 	_fnCollectionShow: function ()
+476 	{
+477 		var that = this;
+478 		var oPos = $(this.dom.button).offset();
+479 		var nHidden = this.dom.collection;
+480 		var nBackground = this.dom.background;
+481 		var iDivX = parseInt(oPos.left, 10);
+482 		var iDivY = parseInt(oPos.top + $(this.dom.button).outerHeight(), 10);
+483 		
+484 		nHidden.style.left = iDivX+"px";
+485 		nHidden.style.top = iDivY+"px";
+486 		nHidden.style.display = "block";
+487 		$(nHidden).css('opacity',0);
+488 		
+489 		var iWinHeight = $(window).height(), iDocHeight = $(document).height(),
+490 		 	iWinWidth = $(window).width(), iDocWidth = $(document).width();
+491 		
+492 		nBackground.style.height = ((iWinHeight>iDocHeight)? iWinHeight : iDocHeight) +"px";
+493 		nBackground.style.width = ((iWinWidth<iDocWidth)? iWinWidth : iDocWidth) +"px";
+494 		
+495 		var oStyle = this.dom.catcher.style;
+496 		oStyle.height = $(this.dom.button).outerHeight()+"px";
+497 		oStyle.width = $(this.dom.button).outerWidth()+"px";
+498 		oStyle.top = oPos.top+"px";
+499 		oStyle.left = iDivX+"px";
+500 		
+501 		document.body.appendChild( nBackground );
+502 		document.body.appendChild( nHidden );
+503 		document.body.appendChild( this.dom.catcher );
+504 		
+505 		/* Visual corrections to try and keep the collection visible */
+506 		var iDivWidth = $(nHidden).outerWidth();
+507 		var iDivHeight = $(nHidden).outerHeight();
+508 		
+509 		if ( iDivX + iDivWidth > iDocWidth )
+510 		{
+511 			nHidden.style.left = (iDocWidth-iDivWidth)+"px";
+512 		}
+513 		
+514 		if ( iDivY + iDivHeight > iDocHeight )
+515 		{
+516 			nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
+517 		}
+518 		
+519 		
+520 		/* This results in a very small delay for the end user but it allows the animation to be
+521 		 * much smoother. If you don't want the animation, then the setTimeout can be removed
+522 		 */
+523 		setTimeout( function () {
+524 			$(nHidden).animate({opacity: 1}, 500);
+525 			$(nBackground).animate({opacity: 0.1}, 500, 'linear', function () {
+526 				/* In IE6 if you set the checked attribute of a hidden checkbox, then this is not visually
+527 				 * reflected. As such, we need to do it here, once it is visible. Unbelievable.
+528 				 */
+529 				if ( jQuery.browser.msie && jQuery.browser.version == "6.0" )
+530 				{
+531 					that._fnDrawCallback();
+532 				}
+533 			});
+534 		}, 10 );
+535 		
+536 		this.s.hidden = false;
+537 	},
+538 	
+539 	
+540 	/**
+541 	 * Hide the show / hide list and the background
+542 	 *  @method  _fnCollectionHide
+543 	 *  @returns void
+544 	 *  @private 
+545 	 */
+546 	_fnCollectionHide: function (  )
+547 	{
+548 		var that = this;
+549 		
+550 		if ( !this.s.hidden && this.dom.collection !== null )
+551 		{
+552 			this.s.hidden = true;
+553 			
+554 			$(this.dom.collection).animate({opacity: 0}, 500, function (e) {
+555 				this.style.display = "none";
+556 			} );
+557 			
+558 			$(this.dom.background).animate({opacity: 0}, 500, function (e) {
+559 				document.body.removeChild( that.dom.background );
+560 				document.body.removeChild( that.dom.catcher );
+561 			} );
+562 		}
+563 	}
+564 };
+565 
+566 
+567 
+568 
+569 
+570 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+571  * Static object methods
+572  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+573 
+574 /**
+575  * Rebuild the collection for a given table, or all tables if no parameter given
+576  *  @method  ColVis.fnRebuild
+577  *  @static
+578  *  @param   object oTable DataTable instance to consider - optional
+579  *  @returns void
+580  */
+581 ColVis.fnRebuild = function ( oTable )
+582 {
+583 	var nTable = null;
+584 	if ( typeof oTable != 'undefined' )
+585 	{
+586 		nTable = oTable.fnSettings().nTable;
+587 	}
+588 	
+589 	for ( var i=0, iLen=ColVis.aInstances.length ; i<iLen ; i++ )
+590 	{
+591 		if ( typeof oTable == 'undefined' || nTable == ColVis.aInstances[i].s.dt.nTable )
+592 		{
+593 			ColVis.aInstances[i].fnRebuild();
+594 		}
+595 	}
+596 };
+597 
+598 
+599 
+600 
+601 
+602 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+603  * Static object propterties
+604  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+605 
+606 /**
+607  * Collection of all ColVis instances
+608  *  @property ColVis.aInstances
+609  *  @static
+610  *  @type     Array
+611  *  @default  []
+612  */
+613 ColVis.aInstances = [];
+614 
+615 
+616 
+617 
+618 
+619 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+620  * Constants
+621  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+622 
+623 /**
+624  * Name of this class
+625  *  @constant CLASS
+626  *  @type     String
+627  *  @default  ColVis
+628  */
+629 ColVis.prototype.CLASS = "ColVis";
+630 
+631 
+632 /**
+633  * ColVis version
+634  *  @constant  VERSION
+635  *  @type      String
+636  *  @default   1.0.3
+637  */
+638 ColVis.VERSION = "1.0.3";
+639 ColVis.prototype.VERSION = ColVis.VERSION;
+640 
+641 
+642 
+643 
+644 
+645 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+646  * Initialisation
+647  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+648 
+649 /*
+650  * Register a new feature with DataTables
+651  */
+652 if ( typeof $.fn.dataTable == "function" &&
+653      typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
+654      $.fn.dataTableExt.fnVersionCheck('1.7.0') )
+655 {
+656 	$.fn.dataTableExt.aoFeatures.push( {
+657 		fnInit: function( oDTSettings ) {
+658 			var oColvis = new ColVis( oDTSettings );
+659 			ColVis.aInstances.push( oColvis );
+660 			return oColvis.dom.wrapper;
+661 		},
+662 		cFeature: "C",
+663 		sFeature: "ColVis"
+664 	} );
+665 }
+666 else
+667 {
+668 	alert( "Warning: ColVis requires DataTables 1.7 or greater - www.datatables.net/download");
+669 }
+670 
+671 })(jQuery);
+672 
\ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/css/default.css b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/css/default.css new file mode 100644 index 00000000..b9dde3b1 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/css/default.css @@ -0,0 +1,418 @@ +/* + * TABLE OF CONTENTS: + * - Browser reset + * - HTML elements + * - JsDoc styling + */ + + + + + + +/* + * BEGIN BROWSER RESET + */ + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,input,textarea,p,blockquote,th,td { + margin:0; + padding:0 +} +html { + height:100%; + overflow:-moz-scrollbars-vertical; + overflow-x:auto +} +table { + border:0; + border-collapse:collapse; + border-spacing:0 +} +fieldset,img { + border:0 +} +address,caption,cite,code,dfn,em,strong,th,var { + font-style:normal; + font-weight:normal +} +em,cite { + font-style:italic +} +strong { + font-weight:bold +} +ol,ul { + list-style:none +} +caption,th { + text-align:left +} +h1,h2,h3,h4,h5,h6 { + font-size:100%; + font-weight:normal; + margin:0; + padding:0 +} +q:before,q:after { + content:'' +} +abbr,acronym { + border:0 +} + +/* + * END BROWSER RESET + */ + + + + + + +/* + * HTML ELEMENTS + */ + +* { + line-height: 1.4em; +} + +html { + font-size: 100%; +} + +body { + font-size: 0.75em !important; + padding: 15px 0; + background: #eee; + background-image: -moz-linear-gradient(left, #dddddd, #f9f9f9); + background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, #dddddd),color-stop(1, #f9f9f9)); + } + +body, +input, +select, +textarea { + color: #000; + font-family: Arial, Geneva, sans-serif; +} + +a:link, +a:hover, +a:active, +a:visited { + color: #19199e; +} +a:hover, +a:focus { + color: #00f; + text-decoration: none; +} + +p { + margin: 0 0 1.5em 0; +} + +/* + * END HTML ELEMENTS + */ + + + +/* + * BEGIN HACK + */ + +div.containerMain:after, +div.safeBox:after { + content:""; + display:block; + height:0; + clear:both; +} + +/* + * END HACK + */ + + + +/* + * BEGIN JSDOC + */ + +div.index *.heading1 { + margin-bottom: 0.5em; + border-bottom: 1px solid #999999; + padding: 0.5em 0 0.1em 0; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.3em; + letter-spacing: 1px; +} + +div.index { + float: left; + width: 30%; + min-width: 100px; + max-width: 250px; +} +div.index div.menu { + margin: 0 15px 0 -15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + padding: 15px 15px 15px 30px; + background-color: #FFFFFF; + background-color: rgba(255, 255, 255, 0.5); + -moz-box-shadow: 0px 0px 10px #c4c4c4; + -webkit-box-shadow: 0px 0px 10px #c4c4c4; + box-shadow: 0px 0px 10px #c4c4c4; +} +*+html div.index div.menu { + background-color: #FFFFFF; +} +* html div.index div.menu { + background-color: #FFFFFF; +} + +div.index div.menu div { + text-align: left; +} + +div.index div.menu a { + text-decoration: none; +} +div.index div.menu a:hover { + text-decoration: underline; +} + +div.index ul.classList a { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.index div.fineprint { + padding: 15px 30px 15px 15px; + color: #777; + font-size: 0.9em; +} +div.index div.fineprint a { + color: #777; +} + + + +div.content { + float: left; + width: 70%; + min-width: 300px; + max-width: 600px; +} +div.innerContent { + padding: 0 0 0 2.5em; +} + +div.content ul, +div.content ol { + margin-bottom: 3em; +} + +div.content *.classTitle { + margin-bottom: 0.5em; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 2.5em; + letter-spacing: 2px; +} + +div.content *.classTitle span { + font-family: Consolas, "Courier New", Courier, monospace; +} + +div.content p.summary { + font-size: 1.2em; +} + +div.content ul *.classname a, +div.content ul *.filename a { + font-family: Consolas, "Courier New", Courier, monospace; + text-decoration: none; + font-weight: bold; +} +div.content ul *.classname a:hover, +div.content ul *.filename a:hover { + text-decoration: underline; +} + +div.content div.props { + position: relative; + left: -10px; + margin-bottom: 2.5em; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 10px 15px 15px 15px; + overflow: hidden; + background: #fff; + background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)); /* FF3.6 */ + background: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255, 255, 255, 0.7)),color-stop(1, rgba(255, 255, 255, 0.2))); + -moz-box-shadow: 0px 0px 10px #ccc; + -webkit-box-shadow: 0px 0px 5px #bbb; + box-shadow: 0px 0px 5px #bbb; +} + +div.content div.props div.sectionTitle { + padding-bottom: 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +div.content div.hr { + margin: 0 10px 0 0; + height: 4em; +} + + + +table.summaryTable { + position: relative; + left: -10px; + width: 100%; + border-collapse: collapse; + box-sizing: content-box; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -ms-box-sizing: content-box; + -o-box-sizing: content-box; + -icab-box-sizing: content-box; + -khtml-box-sizing: content-box; +} + +table.summaryTable caption { + padding: 0 10px 10px 10px; + font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; + font-size: 1.4em; + letter-spacing: 1px; +} + +table.summaryTable td, +table.summaryTable th { + padding: 0px 10px 10px 10px; + vertical-align: top; +} +table.summaryTable tr:last-child td { + padding-bottom: 0; +} + +table.summaryTable th { + font-weight: bold; +} + +table.summaryTable td.attributes { + width: 35%; + font-family: Consolas, "Courier New", Courier, monospace; + color: #666; +} + +table.summaryTable td.nameDescription { + width: 65% +} + +table.summaryTable td.nameDescription div.fixedFont { + font-weight: bold; +} + +table.summaryTable div.description { + color: #333; +} + + + +dl.detailList { + margin-top: 0.5em; +} + +dl.detailList.nomargin + dl.detailList.nomargin { + margin-top: 0; +} + +dl.detailList dt { + display: inline; + margin-right: 5px; + font-weight: bold; +} + +dl.detailList dt:before { + display: block; + content: ""; +} + +dl.detailList dd { + display: inline; +} + +dl.detailList.params dt { + display: block; +} +dl.detailList.params dd { + display: block; + padding-left: 2em; + padding-bottom: 0.4em; +} + + + + +ul.fileList li { + margin-bottom: 1.5em; +} + + + +.fixedFont { + font-family: Consolas, "Courier New", Courier, monospace; +} + +.fixedFont.heading { + margin-bottom: 0.5em; + font-size: 1.25em; + line-height: 1.1em +} + +.fixedFont.heading + .description { + font-size: 1.2em; +} + +.fixedFont.heading .light, +.fixedFont.heading .lighter { + font-weight: bold; +} + +pre.code { + margin: 10px 0 10px 0; + padding: 10px; + border: 1px solid #ccc; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: auto; + font-family: Consolas, "Courier New", Courier, monospace; + background: #eee; +} + +.light { + color: #666; +} + +.lighter { + color: #999; +} + +.clear { + clear: both; + width: 100%; + min-height: 0; +} + +/* + * END JSDOC + */ \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/files.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/files.html new file mode 100644 index 00000000..fcda0bac --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/files.html @@ -0,0 +1,67 @@ + + + + + + JsDoc Reference - File Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:17 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

File Index

+ + +
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/index.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/index.html new file mode 100644 index 00000000..84955c1e --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/index.html @@ -0,0 +1,71 @@ + + + + + JsDoc Reference - Index + + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:17 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

Class Index

+ +
    + +
  • +

    _global_

    +

    +
  • + +
  • +

    ColVis

    +

    ColVis

    +
  • + +
  • +

    ColVis#dom

    +

    Common and useful DOM elements for the class instance

    +
  • + +
  • +

    ColVis#s

    +

    Settings object which contains customisable information for ColVis instance

    +
  • + +
+
+
+ + \ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#dom.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#dom.html new file mode 100644 index 00000000..e19e78e2 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#dom.html @@ -0,0 +1,468 @@ + + + + + + + JsDoc Reference - ColVis#dom + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:17 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColVis#dom +

+ +

+ + + + + Common and useful DOM elements for the class instance + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis#dom.background +
+
Background node used for shading the display and event capturing
+
<static>   +
+ ColVis#dom.button +
+
Activation button
+
<static>   +
+ ColVis#dom.buttons +
+
List of button elements
+
<static>   +
+ ColVis#dom.catcher +
+
Element to position over the activation button to catch mouse events when using mouseover
+
<static>   +
+ ColVis#dom.collection +
+
Collection list node
+
<static>   +
+ ColVis#dom.wrapper +
+
Wrapper for the button - given back to DataTables as the node to insert
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColVis#dom +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {Node} + + ColVis#dom.background +
+ +
+ Background node used for shading the display and event capturing + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.button +
+ +
+ Activation button + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Array} + + ColVis#dom.buttons +
+ +
+ List of button elements + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.catcher +
+ +
+ Element to position over the activation button to catch mouse events when using mouseover + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.collection +
+ +
+ Collection list node + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {Node} + + ColVis#dom.wrapper +
+ +
+ Wrapper for the button - given back to DataTables as the node to insert + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#s.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#s.html new file mode 100644 index 00000000..b563aba4 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis#s.html @@ -0,0 +1,420 @@ + + + + + + + JsDoc Reference - ColVis#s + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:17 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Namespace ColVis#s +

+ +

+ + + + + Settings object which contains customisable information for ColVis instance + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Namespace Summary
Constructor AttributesConstructor Name and Description
  +
+ ColVis#s +
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis#s.activate +
+
Mode of activation.
+
<static>   +
+ ColVis#s.aiExclude +
+
List of columns (integers) which should be excluded from the list
+
<static>   +
+ ColVis#s.buttonText +
+
Text used for the button
+
<static>   +
+ ColVis#s.dt +
+
DataTables settings object
+
<static>   +
+ ColVis#s.hidden +
+
Flag to say if the collection is hidden
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ Namespace Detail +
+ +
+ ColVis#s +
+ +
+ + +
+ + + + + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {String} + + ColVis#s.activate +
+ +
+ Mode of activation. Can be 'click' or 'mouseover' + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ click +
+ +
+ + +
+ + + +
+ + <static> + + + {Array} + + ColVis#s.aiExclude +
+ +
+ List of columns (integers) which should be excluded from the list + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <static> + + + {String} + + ColVis#s.buttonText +
+ +
+ Text used for the button + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ Show / hide columns +
+ +
+ + +
+ + + +
+ + <static> + + + {Object} + + ColVis#s.dt +
+ +
+ DataTables settings object + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ null +
+ +
+ + +
+ + + +
+ + <static> + + + {boolean} + + ColVis#s.hidden +
+ +
+ Flag to say if the collection is hidden + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ true +
+ +
+ + + + +
+
+ + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis.html new file mode 100644 index 00000000..d8f3db3b --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/ColVis.html @@ -0,0 +1,1215 @@ + + + + + + + JsDoc Reference - ColVis + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:16 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Class ColVis +

+ +

+ + + + + ColVis + + +
Defined in: ColVis.js. + +

+ + +
+ + + + + + + + + + + + + + +
Class Summary
Constructor AttributesConstructor Name and Description
  +
+ ColVis(DataTables) +
+
ColVis provides column visiblity control for DataTables
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
Field AttributesField Name and Description
<static>   +
+ ColVis.aInstances +
+
Collection of all ColVis instances
+
<constant>   +
+ CLASS +
+
Name of this class
+
<static> <constant>   +
+ ColVis.VERSION +
+
ColVis version
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Method AttributesMethod Name and Description
<private>   + +
Loop through the columns in the table and as a new button for each one.
+
<private>   + +
Apply any customisation to the settings from the DataTables initialisation
+
<private>   + +
Hide the show / hide list and the background
+
<private>   + +
Show the show / hide list and the background
+
<private>   + +
Constructor logic
+
<private>   + +
Get the position in the DataTables instance array of the table for this instance of ColVis
+
<private>   + +
Create the element used to shade the background, and capture hide events (it is shown and +hidden as needed)
+
<private>   + +
Create the DOM needed for the button and apply some base properties.
+
<private>   + +
An element to be placed on top of the activate button to catch events
+
<private>   + +
Create the element used to contain list the columns (it is shown and hidden as needed)
+
<private>   + +
Create the DOM for a show / hide button
+
<private>   + +
On each table draw, check the visiblity checkboxes as needed.
+
<static>   +
ColVis.fnRebuild(object) +
+
Rebuild the collection for a given table, or all tables if no parameter given
+
  + +
Rebuild the list of buttons for this instance (i.e.
+
+
+ + + + + + + + + + +
+
+ + +
+ Class Detail +
+ +
+ ColVis(DataTables) +
+ +
+ ColVis provides column visiblity control for DataTables + +
+ + + + +
+
Parameters:
+ +
+ {object} DataTables + +
+
settings object
+ +
+ + + +
+
+ + + + +
+
+ +
+ Field Detail +
+ + + + +
+ + <static> + + + {Array} + + ColVis.aInstances +
+ +
+ Collection of all ColVis instances + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ [] +
+ +
+ + +
+ + + +
+ + <constant> + + + {String} + + CLASS +
+ +
+ Name of this class + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ ColVis +
+ +
+ + +
+ + + +
+ + <static> <constant> + + + {String} + + ColVis.VERSION +
+ +
+ ColVis version + + + +
+ + + + +
+ + + + + +
Default Value:
+
+ 1.0.3 +
+ +
+ + + + +
+
+ + + + +
+
+
+ Method Detail +
+ + + + +
+ + <private> + + + + + _fnAddButtons() +
+ +
+ Loop through the columns in the table and as a new button for each one. + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnApplyCustomisation() +
+ +
+ Apply any customisation to the settings from the DataTables initialisation + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnCollectionHide() +
+ +
+ Hide the show / hide list and the background + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnCollectionShow() +
+ +
+ Show the show / hide list and the background + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnConstruct() +
+ +
+ Constructor logic + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {int} + + _fnDataTablesApiIndex() +
+ +
+ Get the position in the DataTables instance array of the table for this instance of ColVis + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
{int} Index
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Node} + + _fnDomBackground() +
+ +
+ Create the element used to shade the background, and capture hide events (it is shown and +hidden as needed) + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
{Node} div container for the background
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Node} + + _fnDomBaseButton(text) +
+ +
+ Create the DOM needed for the button and apply some base properties. All buttons start here + + + + +
+ + + + +
+
Parameters:
+ +
+ {String} text + +
+
Button text
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{Node} DIV element for the button
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Node} + + _fnDomCatcher() +
+ +
+ An element to be placed on top of the activate button to catch events + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
{Node} div container for the collection
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Node} + + _fnDomCollection() +
+ +
+ Create the element used to contain list the columns (it is shown and hidden as needed) + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
{Node} div container for the collection
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + {Node} + + _fnDomColumnButton(i) +
+ +
+ Create the DOM for a show / hide button + + + + +
+ + + + +
+
Parameters:
+ +
+ {int} i + +
+
Column in question
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
{Node} Created button
+ + + + + + + +
+ + +
+ + + +
+ + <private> + + + + + _fnDrawCallback() +
+ +
+ On each table draw, check the visiblity checkboxes as needed. This allows any process to +update the table's column visiblity and ColVis will still be accurate. + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + <static> + + + + + ColVis.fnRebuild(object) +
+ +
+ Rebuild the collection for a given table, or all tables if no parameter given + + + + +
+ + + + +
+
Parameters:
+ +
+ object + +
+
oTable DataTable instance to consider - optional
+ +
+ + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + +
+ + + +
+ + + + + + + fnRebuild() +
+ +
+ Rebuild the list of buttons for this instance (i.e. if there is a column header update) + + + + +
+ + + + + + +
+ + + + + + + + +
Returns:
+ +
void
+ + + + + + + +
+ + + + +
+
+ + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/_global_.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/_global_.html new file mode 100644 index 00000000..41ae66eb --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/_global_.html @@ -0,0 +1,97 @@ + + + + + + + JsDoc Reference - _global_ + + + + + + +
+ + +
+ + Generated by JsDoc Toolkit 2.4.0 on Wed Dec 15 2010 21:56:16 GMT-0000 (GMT)
+ HTML template: Codeview +
+
+ +
+
+

+ + Built-In Namespace _global_ +

+ +

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/src/js_ColVis.js.html b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/src/js_ColVis.js.html new file mode 100644 index 00000000..a3e66ddc --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/docs_private/symbols/src/js_ColVis.js.html @@ -0,0 +1,679 @@ +
  1 /*
+  2  * File:        ColVis.js
+  3  * Version:     1.0.3
+  4  * CVS:         $Id$
+  5  * Description: Controls for column visiblity in DataTables
+  6  * Author:      Allan Jardine (www.sprymedia.co.uk)
+  7  * Created:     Wed Sep 15 18:23:29 BST 2010
+  8  * Modified:    $Date$ by $Author$
+  9  * Language:    Javascript
+ 10  * License:     LGPL
+ 11  * Project:     Just a little bit of fun :-)
+ 12  * Contact:     www.sprymedia.co.uk/contact
+ 13  * 
+ 14  * Copyright 2010 Allan Jardine, all rights reserved.
+ 15  *
+ 16  */
+ 17 
+ 18 (function($) {
+ 19 
+ 20 /** 
+ 21  * ColVis provides column visiblity control for DataTables
+ 22  * @class ColVis
+ 23  * @constructor
+ 24  * @param {object} DataTables settings object
+ 25  */
+ 26 ColVis = function( oDTSettings )
+ 27 {
+ 28 	/* Santiy check that we are a new instance */
+ 29 	if ( !this.CLASS || this.CLASS != "ColVis" )
+ 30 	{
+ 31 		alert( "Warning: ColVis must be initialised with the keyword 'new'" );
+ 32 	}
+ 33 	
+ 34 	
+ 35 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ 36 	 * Public class variables
+ 37 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ 38 	
+ 39 	/**
+ 40 	 * @namespace Settings object which contains customisable information for ColVis instance
+ 41 	 */
+ 42 	this.s = {
+ 43 		/**
+ 44 		 * DataTables settings object
+ 45 		 *  @property dt
+ 46 		 *  @type     Object
+ 47 		 *  @default  null
+ 48 		 */
+ 49 		dt: null,
+ 50 		
+ 51 		/**
+ 52 		 * Mode of activation. Can be 'click' or 'mouseover'
+ 53 		 *  @property activate
+ 54 		 *  @type     String
+ 55 		 *  @default  click
+ 56 		 */
+ 57 		activate: "click",
+ 58 		
+ 59 		/**
+ 60 		 * Text used for the button
+ 61 		 *  @property buttonText
+ 62 		 *  @type     String
+ 63 		 *  @default  Show / hide columns
+ 64 		 */
+ 65 		buttonText: "Show / hide columns",
+ 66 		
+ 67 		/**
+ 68 		 * Flag to say if the collection is hidden
+ 69 		 *  @property hidden
+ 70 		 *  @type     boolean
+ 71 		 *  @default  true
+ 72 		 */
+ 73 		hidden: true,
+ 74 		
+ 75 		/**
+ 76 		 * List of columns (integers) which should be excluded from the list
+ 77 		 *  @property aiExclude
+ 78 		 *  @type     Array
+ 79 		 *  @default  []
+ 80 		 */
+ 81 		aiExclude: []
+ 82 	};
+ 83 	
+ 84 	
+ 85 	/**
+ 86 	 * @namespace Common and useful DOM elements for the class instance
+ 87 	 */
+ 88 	this.dom = {
+ 89 		/**
+ 90 		 * Wrapper for the button - given back to DataTables as the node to insert
+ 91 		 *  @property wrapper
+ 92 		 *  @type     Node
+ 93 		 *  @default  null
+ 94 		 */
+ 95 		wrapper: null,
+ 96 		
+ 97 		/**
+ 98 		 * Activation button
+ 99 		 *  @property button
+100 		 *  @type     Node
+101 		 *  @default  null
+102 		 */
+103 		button: null,
+104 		
+105 		/**
+106 		 * Collection list node
+107 		 *  @property collection
+108 		 *  @type     Node
+109 		 *  @default  null
+110 		 */
+111 		collection: null,
+112 		
+113 		/**
+114 		 * Background node used for shading the display and event capturing
+115 		 *  @property background
+116 		 *  @type     Node
+117 		 *  @default  null
+118 		 */
+119 		background: null,
+120 		
+121 		/**
+122 		 * Element to position over the activation button to catch mouse events when using mouseover
+123 		 *  @property catcher
+124 		 *  @type     Node
+125 		 *  @default  null
+126 		 */
+127 		catcher: null,
+128 		
+129 		/**
+130 		 * List of button elements
+131 		 *  @property buttons
+132 		 *  @type     Array
+133 		 *  @default  []
+134 		 */
+135 		buttons: []
+136 	};
+137 	
+138 	
+139 	
+140 	
+141 	
+142 	/* Constructor logic */
+143 	this.s.dt = oDTSettings;
+144 	this._fnConstruct();
+145 	return this;
+146 };
+147 
+148 
+149 
+150 ColVis.prototype = {
+151 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+152 	 * Public methods
+153 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+154 	
+155 	/**
+156 	 * Rebuild the list of buttons for this instance (i.e. if there is a column header update)
+157 	 *  @method  fnRebuild
+158 	 *  @returns void
+159 	 */
+160 	fnRebuild: function ()
+161 	{
+162 		/* Remove the old buttons */
+163 		for ( var i=this.dom.buttons.length-1 ; i>=0 ; i-- )
+164 		{
+165 			this.dom.collection.removeChild( this.dom.buttons[i] )
+166 		}
+167 		this.dom.buttons.splice( 0, this.dom.buttons.length );
+168 		
+169 		/* Re-add them (this is not the optimal way of doing this, it is fast and effective) */
+170 		this._fnAddButtons();
+171 		
+172 		/* Update the checkboxes */
+173 		this._fnDrawCallback();
+174 	},
+175 	
+176 	
+177 	
+178 	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+179 	 * Private methods (they are of course public in JS, but recommended as private)
+180 	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+181 	
+182 	/**
+183 	 * Constructor logic
+184 	 *  @method  _fnConstruct
+185 	 *  @returns void
+186 	 *  @private 
+187 	 */
+188 	_fnConstruct: function ()
+189 	{
+190 		this._fnApplyCustomisation();
+191 		
+192 		var that = this;
+193 		this.dom.wrapper = document.createElement('div');
+194 		this.dom.wrapper.className = "ColVis TableTools";
+195 		
+196 		this.dom.button = this._fnDomBaseButton( this.s.buttonText );
+197 		this.dom.wrapper.appendChild( this.dom.button );
+198 		
+199 		this.dom.catcher = this._fnDomCatcher();
+200 		this.dom.collection = this._fnDomCollection();
+201 		this.dom.background = this._fnDomBackground();
+202 		
+203 		this._fnAddButtons();
+204 		
+205 		this.s.dt.aoDrawCallback.push( {
+206 			fn: function () {
+207 				that._fnDrawCallback.call( that );
+208 			},
+209 			sName: "ColVis"
+210 		} );
+211 	},
+212 	
+213 	
+214 	/**
+215 	 * Apply any customisation to the settings from the DataTables initialisation
+216 	 *  @method  _fnApplyCustomisation
+217 	 *  @returns void
+218 	 *  @private 
+219 	 */
+220 	_fnApplyCustomisation: function ()
+221 	{
+222 		if ( typeof this.s.dt.oInit.oColVis != 'undefined' )
+223 		{
+224 			var oConfig = this.s.dt.oInit.oColVis;
+225 			
+226 			if ( typeof oConfig.activate != 'undefined' )
+227 			{
+228 				this.s.activate = oConfig.activate;
+229 			}
+230 			
+231 			if ( typeof oConfig.buttonText != 'undefined' )
+232 			{
+233 				this.s.buttonText = oConfig.buttonText;
+234 			}
+235 			
+236 			if ( typeof oConfig.aiExclude != 'undefined' )
+237 			{
+238 				this.s.aiExclude = oConfig.aiExclude;
+239 			}
+240 		}
+241 	},
+242 	
+243 	
+244 	/**
+245 	 * On each table draw, check the visiblity checkboxes as needed. This allows any process to
+246 	 * update the table's column visiblity and ColVis will still be accurate.
+247 	 *  @method  _fnDrawCallback
+248 	 *  @returns void
+249 	 *  @private 
+250 	 */
+251 	_fnDrawCallback: function ()
+252 	{
+253 		var aoColumns = this.s.dt.aoColumns;
+254 		
+255 		for ( var i=0, iLen=aoColumns.length ; i<iLen ; i++ )
+256 		{
+257 			if ( this.dom.buttons[i] !== null )
+258 			{
+259 				if ( aoColumns[i].bVisible )
+260 				{
+261 					$('input', this.dom.buttons[i]).attr('checked','checked');
+262 				}
+263 				else
+264 				{
+265 					$('input', this.dom.buttons[i]).removeAttr('checked');
+266 				}
+267 			}
+268 		}
+269 	},
+270 	
+271 	
+272 	/**
+273 	 * Loop through the columns in the table and as a new button for each one.
+274 	 *  @method  _fnAddButtons
+275 	 *  @returns void
+276 	 *  @private 
+277 	 */
+278 	_fnAddButtons: function ()
+279 	{
+280 		var
+281 			nButton,
+282 			sExclude = ","+this.s.aiExclude.join(',')+",";
+283 		
+284 		for ( var i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
+285 		{
+286 			if ( sExclude.indexOf( ","+i+"," ) == -1 )
+287 			{
+288 				nButton = this._fnDomColumnButton( i );
+289 				this.dom.buttons.push( nButton );
+290 				this.dom.collection.appendChild( nButton );
+291 			}
+292 			else
+293 			{
+294 				this.dom.buttons.push( null );
+295 			}
+296 		}
+297 	},
+298 	
+299 	
+300 	/**
+301 	 * Create the DOM for a show / hide button
+302 	 *  @method  _fnDomColumnButton
+303 	 *  @param {int} i Column in question
+304 	 *  @returns {Node} Created button
+305 	 *  @private 
+306 	 */
+307 	_fnDomColumnButton: function ( i )
+308 	{
+309 		var
+310 			that = this,
+311 			oColumn = this.s.dt.aoColumns[i],
+312 		  nButton = document.createElement('button'),
+313 		  nSpan = document.createElement('span');
+314 		
+315 		nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
+316 			"ColVis_Button TableTools_Button ui-button ui-state-default";
+317 		nButton.appendChild( nSpan );
+318 		$(nSpan).html(
+319 			'<span class="ColVis_radio"><input type="checkbox"></span>'+
+320 			'<span class="ColVis_title">'+oColumn.sTitle+'</span>' );
+321 		
+322 		$(nButton).click( function (e) {
+323 			var showHide = $('input',this).attr('checked')===true ? false : true;
+324 			if ( e.target.nodeName.toLowerCase() == "input" )
+325 			{
+326 				showHide = $('input',this).attr('checked');
+327 			}
+328 			
+329 			/* Need to consider the case where the initialiser created more than one table - change the
+330 			 * API index that DataTables is using
+331 			 */
+332 			var oldIndex = $.fn.dataTableExt.iApiIndex;
+333 			$.fn.dataTableExt.iApiIndex = that._fnDataTablesApiIndex.call(that);
+334 			that.s.dt.oInstance.fnSetColumnVis( i, showHide );
+335 			$.fn.dataTableExt.iApiIndex = oldIndex; /* Restore */
+336 		} );
+337 		
+338 		return nButton;
+339 	},
+340 	
+341 	
+342 	/**
+343 	 * Get the position in the DataTables instance array of the table for this instance of ColVis
+344 	 *  @method  _fnDataTablesApiIndex
+345 	 *  @returns {int} Index
+346 	 *  @private 
+347 	 */
+348 	_fnDataTablesApiIndex: function ()
+349 	{
+350 		for ( var i=0, iLen=this.s.dt.oInstance.length ; i<iLen ; i++ )
+351 		{
+352 			if ( this.s.dt.oInstance[i] == this.s.dt.nTable )
+353 			{
+354 				return i;
+355 			}
+356 		}
+357 		return 0;
+358 	},
+359 	
+360 	
+361 	/**
+362 	 * Create the DOM needed for the button and apply some base properties. All buttons start here
+363 	 *  @method  _fnDomBaseButton
+364 	 *  @param   {String} text Button text
+365 	 *  @returns {Node} DIV element for the button
+366 	 *  @private 
+367 	 */
+368 	_fnDomBaseButton: function ( text )
+369 	{
+370 		var
+371 			that = this,
+372 		  nButton = document.createElement('button'),
+373 		  nSpan = document.createElement('span'),
+374 			sEvent = this.s.activate=="mouseover" ? "mouseover" : "click";
+375 		
+376 		nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
+377 			"ColVis_Button TableTools_Button ui-button ui-state-default";
+378 		nButton.appendChild( nSpan );
+379 		nSpan.innerHTML = text;
+380 		
+381 		$(nButton).bind( sEvent, function (e) {
+382 			that._fnCollectionShow();
+383 			e.preventDefault();
+384 		} );
+385 		
+386 		return nButton;
+387 	},
+388 	
+389 	
+390 	/**
+391 	 * Create the element used to contain list the columns (it is shown and hidden as needed)
+392 	 *  @method  _fnDomCollection
+393 	 *  @returns {Node} div container for the collection
+394 	 *  @private 
+395 	 */
+396 	_fnDomCollection: function ()
+397 	{
+398 		var that = this;
+399 		var nHidden = document.createElement('div');
+400 		nHidden.style.display = "none";
+401 		nHidden.className = !this.s.dt.bJUI ? "ColVis_collection TableTools_collection" :
+402 			"ColVis_collection TableTools_collection ui-buttonset ui-buttonset-multi";
+403 		nHidden.style.position = "absolute";
+404 		$(nHidden).css('opacity', 0);
+405 		
+406 		return nHidden;
+407 	},
+408 	
+409 	
+410 	/**
+411 	 * An element to be placed on top of the activate button to catch events
+412 	 *  @method  _fnDomCatcher
+413 	 *  @returns {Node} div container for the collection
+414 	 *  @private 
+415 	 */
+416 	_fnDomCatcher: function ()
+417 	{
+418 		var 
+419 			that = this,
+420 			nCatcher = document.createElement('div');
+421 		nCatcher.className = "ColVis_catcher TableTools_catcher";
+422 		
+423 		$(nCatcher).click( function () {
+424 			that._fnCollectionHide.call( that, null, null );
+425 		} );
+426 		
+427 		return nCatcher;
+428 	},
+429 	
+430 	
+431 	/**
+432 	 * Create the element used to shade the background, and capture hide events (it is shown and 
+433 	 * hidden as needed)
+434 	 *  @method  _fnDomBackground
+435 	 *  @returns {Node} div container for the background
+436 	 *  @private 
+437 	 */
+438 	_fnDomBackground: function ()
+439 	{
+440 		var that = this;
+441 		
+442 		var nBackground = document.createElement('div');
+443 		nBackground.style.position = "absolute";
+444 		nBackground.style.left = "0px";
+445 		nBackground.style.top = "0px";
+446 		nBackground.className = "TableTools_collectionBackground";
+447 		$(nBackground).css('opacity', 0);
+448 		
+449 		$(nBackground).click( function () {
+450 			that._fnCollectionHide.call( that, null, null );
+451 		} );
+452 		
+453 		/* When considering a mouse over action for the activation, we also consider a mouse out
+454 		 * which is the same as a mouse over the background - without all the messing around of
+455 		 * bubbling events. Use the catcher element to avoid messing around with bubbling
+456 		 */
+457 		if ( this.s.activate == "mouseover" )
+458 		{
+459 			$(nBackground).mouseover( function () {
+460 				that.s.overcollection = false;
+461 				that._fnCollectionHide.call( that, null, null );
+462 			} );
+463 		}
+464 		
+465 		return nBackground;
+466 	},
+467 	
+468 	
+469 	/**
+470 	 * Show the show / hide list and the background
+471 	 *  @method  _fnCollectionShow
+472 	 *  @returns void
+473 	 *  @private 
+474 	 */
+475 	_fnCollectionShow: function ()
+476 	{
+477 		var that = this;
+478 		var oPos = $(this.dom.button).offset();
+479 		var nHidden = this.dom.collection;
+480 		var nBackground = this.dom.background;
+481 		var iDivX = parseInt(oPos.left, 10);
+482 		var iDivY = parseInt(oPos.top + $(this.dom.button).outerHeight(), 10);
+483 		
+484 		nHidden.style.left = iDivX+"px";
+485 		nHidden.style.top = iDivY+"px";
+486 		nHidden.style.display = "block";
+487 		$(nHidden).css('opacity',0);
+488 		
+489 		var iWinHeight = $(window).height(), iDocHeight = $(document).height(),
+490 		 	iWinWidth = $(window).width(), iDocWidth = $(document).width();
+491 		
+492 		nBackground.style.height = ((iWinHeight>iDocHeight)? iWinHeight : iDocHeight) +"px";
+493 		nBackground.style.width = ((iWinWidth<iDocWidth)? iWinWidth : iDocWidth) +"px";
+494 		
+495 		var oStyle = this.dom.catcher.style;
+496 		oStyle.height = $(this.dom.button).outerHeight()+"px";
+497 		oStyle.width = $(this.dom.button).outerWidth()+"px";
+498 		oStyle.top = oPos.top+"px";
+499 		oStyle.left = iDivX+"px";
+500 		
+501 		document.body.appendChild( nBackground );
+502 		document.body.appendChild( nHidden );
+503 		document.body.appendChild( this.dom.catcher );
+504 		
+505 		/* Visual corrections to try and keep the collection visible */
+506 		var iDivWidth = $(nHidden).outerWidth();
+507 		var iDivHeight = $(nHidden).outerHeight();
+508 		
+509 		if ( iDivX + iDivWidth > iDocWidth )
+510 		{
+511 			nHidden.style.left = (iDocWidth-iDivWidth)+"px";
+512 		}
+513 		
+514 		if ( iDivY + iDivHeight > iDocHeight )
+515 		{
+516 			nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
+517 		}
+518 		
+519 		
+520 		/* This results in a very small delay for the end user but it allows the animation to be
+521 		 * much smoother. If you don't want the animation, then the setTimeout can be removed
+522 		 */
+523 		setTimeout( function () {
+524 			$(nHidden).animate({opacity: 1}, 500);
+525 			$(nBackground).animate({opacity: 0.1}, 500, 'linear', function () {
+526 				/* In IE6 if you set the checked attribute of a hidden checkbox, then this is not visually
+527 				 * reflected. As such, we need to do it here, once it is visible. Unbelievable.
+528 				 */
+529 				if ( jQuery.browser.msie && jQuery.browser.version == "6.0" )
+530 				{
+531 					that._fnDrawCallback();
+532 				}
+533 			});
+534 		}, 10 );
+535 		
+536 		this.s.hidden = false;
+537 	},
+538 	
+539 	
+540 	/**
+541 	 * Hide the show / hide list and the background
+542 	 *  @method  _fnCollectionHide
+543 	 *  @returns void
+544 	 *  @private 
+545 	 */
+546 	_fnCollectionHide: function (  )
+547 	{
+548 		var that = this;
+549 		
+550 		if ( !this.s.hidden && this.dom.collection !== null )
+551 		{
+552 			this.s.hidden = true;
+553 			
+554 			$(this.dom.collection).animate({opacity: 0}, 500, function (e) {
+555 				this.style.display = "none";
+556 			} );
+557 			
+558 			$(this.dom.background).animate({opacity: 0}, 500, function (e) {
+559 				document.body.removeChild( that.dom.background );
+560 				document.body.removeChild( that.dom.catcher );
+561 			} );
+562 		}
+563 	}
+564 };
+565 
+566 
+567 
+568 
+569 
+570 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+571  * Static object methods
+572  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+573 
+574 /**
+575  * Rebuild the collection for a given table, or all tables if no parameter given
+576  *  @method  ColVis.fnRebuild
+577  *  @static
+578  *  @param   object oTable DataTable instance to consider - optional
+579  *  @returns void
+580  */
+581 ColVis.fnRebuild = function ( oTable )
+582 {
+583 	var nTable = null;
+584 	if ( typeof oTable != 'undefined' )
+585 	{
+586 		nTable = oTable.fnSettings().nTable;
+587 	}
+588 	
+589 	for ( var i=0, iLen=ColVis.aInstances.length ; i<iLen ; i++ )
+590 	{
+591 		if ( typeof oTable == 'undefined' || nTable == ColVis.aInstances[i].s.dt.nTable )
+592 		{
+593 			ColVis.aInstances[i].fnRebuild();
+594 		}
+595 	}
+596 };
+597 
+598 
+599 
+600 
+601 
+602 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+603  * Static object propterties
+604  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+605 
+606 /**
+607  * Collection of all ColVis instances
+608  *  @property ColVis.aInstances
+609  *  @static
+610  *  @type     Array
+611  *  @default  []
+612  */
+613 ColVis.aInstances = [];
+614 
+615 
+616 
+617 
+618 
+619 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+620  * Constants
+621  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+622 
+623 /**
+624  * Name of this class
+625  *  @constant CLASS
+626  *  @type     String
+627  *  @default  ColVis
+628  */
+629 ColVis.prototype.CLASS = "ColVis";
+630 
+631 
+632 /**
+633  * ColVis version
+634  *  @constant  VERSION
+635  *  @type      String
+636  *  @default   1.0.3
+637  */
+638 ColVis.VERSION = "1.0.3";
+639 ColVis.prototype.VERSION = ColVis.VERSION;
+640 
+641 
+642 
+643 
+644 
+645 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+646  * Initialisation
+647  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+648 
+649 /*
+650  * Register a new feature with DataTables
+651  */
+652 if ( typeof $.fn.dataTable == "function" &&
+653      typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
+654      $.fn.dataTableExt.fnVersionCheck('1.7.0') )
+655 {
+656 	$.fn.dataTableExt.aoFeatures.push( {
+657 		fnInit: function( oDTSettings ) {
+658 			var oColvis = new ColVis( oDTSettings );
+659 			ColVis.aInstances.push( oColvis );
+660 			return oColvis.dom.wrapper;
+661 		},
+662 		cFeature: "C",
+663 		sFeature: "ColVis"
+664 	} );
+665 }
+666 else
+667 {
+668 	alert( "Warning: ColVis requires DataTables 1.7 or greater - www.datatables.net/download");
+669 }
+670 
+671 })(jQuery);
+672 
\ No newline at end of file diff --git a/includes/DataTables-1.7.5/extras/ColVis/media/js/ColVis.js b/includes/DataTables-1.7.5/extras/ColVis/media/js/ColVis.js new file mode 100755 index 00000000..82c7b757 --- /dev/null +++ b/includes/DataTables-1.7.5/extras/ColVis/media/js/ColVis.js @@ -0,0 +1,671 @@ +/* + * File: ColVis.js + * Version: 1.0.3 + * CVS: $Id$ + * Description: Controls for column visiblity in DataTables + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Wed Sep 15 18:23:29 BST 2010 + * Modified: $Date$ by $Author$ + * Language: Javascript + * License: LGPL + * Project: Just a little bit of fun :-) + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2010 Allan Jardine, all rights reserved. + * + */ + +(function($) { + +/** + * ColVis provides column visiblity control for DataTables + * @class ColVis + * @constructor + * @param {object} DataTables settings object + */ +ColVis = function( oDTSettings ) +{ + /* Santiy check that we are a new instance */ + if ( !this.CLASS || this.CLASS != "ColVis" ) + { + alert( "Warning: ColVis must be initialised with the keyword 'new'" ); + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * @namespace Settings object which contains customisable information for ColVis instance + */ + this.s = { + /** + * DataTables settings object + * @property dt + * @type Object + * @default null + */ + "dt": null, + + /** + * Mode of activation. Can be 'click' or 'mouseover' + * @property activate + * @type String + * @default click + */ + "activate": "click", + + /** + * Text used for the button + * @property buttonText + * @type String + * @default Show / hide columns + */ + "buttonText": "Show / hide columns", + + /** + * Flag to say if the collection is hidden + * @property hidden + * @type boolean + * @default true + */ + "hidden": true, + + /** + * List of columns (integers) which should be excluded from the list + * @property aiExclude + * @type Array + * @default [] + */ + "aiExclude": [] + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + /** + * Wrapper for the button - given back to DataTables as the node to insert + * @property wrapper + * @type Node + * @default null + */ + "wrapper": null, + + /** + * Activation button + * @property button + * @type Node + * @default null + */ + "button": null, + + /** + * Collection list node + * @property collection + * @type Node + * @default null + */ + "collection": null, + + /** + * Background node used for shading the display and event capturing + * @property background + * @type Node + * @default null + */ + "background": null, + + /** + * Element to position over the activation button to catch mouse events when using mouseover + * @property catcher + * @type Node + * @default null + */ + "catcher": null, + + /** + * List of button elements + * @property buttons + * @type Array + * @default [] + */ + "buttons": [] + }; + + + + + + /* Constructor logic */ + this.s.dt = oDTSettings; + this._fnConstruct(); + return this; +}; + + + +ColVis.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Rebuild the list of buttons for this instance (i.e. if there is a column header update) + * @method fnRebuild + * @returns void + */ + "fnRebuild": function () + { + /* Remove the old buttons */ + for ( var i=this.dom.buttons.length-1 ; i>=0 ; i-- ) + { + this.dom.collection.removeChild( this.dom.buttons[i] ) + } + this.dom.buttons.splice( 0, this.dom.buttons.length ); + + /* Re-add them (this is not the optimal way of doing this, it is fast and effective) */ + this._fnAddButtons(); + + /* Update the checkboxes */ + this._fnDrawCallback(); + }, + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private methods (they are of course public in JS, but recommended as private) + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Constructor logic + * @method _fnConstruct + * @returns void + * @private + */ + "_fnConstruct": function () + { + this._fnApplyCustomisation(); + + var that = this; + this.dom.wrapper = document.createElement('div'); + this.dom.wrapper.className = "ColVis TableTools"; + + this.dom.button = this._fnDomBaseButton( this.s.buttonText ); + this.dom.wrapper.appendChild( this.dom.button ); + + this.dom.catcher = this._fnDomCatcher(); + this.dom.collection = this._fnDomCollection(); + this.dom.background = this._fnDomBackground(); + + this._fnAddButtons(); + + this.s.dt.aoDrawCallback.push( { + "fn": function () { + that._fnDrawCallback.call( that ); + }, + "sName": "ColVis" + } ); + }, + + + /** + * Apply any customisation to the settings from the DataTables initialisation + * @method _fnApplyCustomisation + * @returns void + * @private + */ + "_fnApplyCustomisation": function () + { + if ( typeof this.s.dt.oInit.oColVis != 'undefined' ) + { + var oConfig = this.s.dt.oInit.oColVis; + + if ( typeof oConfig.activate != 'undefined' ) + { + this.s.activate = oConfig.activate; + } + + if ( typeof oConfig.buttonText != 'undefined' ) + { + this.s.buttonText = oConfig.buttonText; + } + + if ( typeof oConfig.aiExclude != 'undefined' ) + { + this.s.aiExclude = oConfig.aiExclude; + } + } + }, + + + /** + * On each table draw, check the visiblity checkboxes as needed. This allows any process to + * update the table's column visiblity and ColVis will still be accurate. + * @method _fnDrawCallback + * @returns void + * @private + */ + "_fnDrawCallback": function () + { + var aoColumns = this.s.dt.aoColumns; + + for ( var i=0, iLen=aoColumns.length ; i'+ + ''+oColumn.sTitle+'' ); + + $(nButton).click( function (e) { + var showHide = $('input',this).attr('checked')===true ? false : true; + if ( e.target.nodeName.toLowerCase() == "input" ) + { + showHide = $('input',this).attr('checked'); + } + + /* Need to consider the case where the initialiser created more than one table - change the + * API index that DataTables is using + */ + var oldIndex = $.fn.dataTableExt.iApiIndex; + $.fn.dataTableExt.iApiIndex = that._fnDataTablesApiIndex.call(that); + that.s.dt.oInstance.fnSetColumnVis( i, showHide ); + $.fn.dataTableExt.iApiIndex = oldIndex; /* Restore */ + } ); + + return nButton; + }, + + + /** + * Get the position in the DataTables instance array of the table for this instance of ColVis + * @method _fnDataTablesApiIndex + * @returns {int} Index + * @private + */ + "_fnDataTablesApiIndex": function () + { + for ( var i=0, iLen=this.s.dt.oInstance.length ; i