Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F773298
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 2, 6:53 AM
Size
56 KB
Mime Type
text/x-diff
Expires
Tue, Feb 4, 6:53 AM (1 h, 17 m)
Engine
blob
Format
Raw Data
Handle
556542
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/browse.php
===================================================================
--- trunk/admin/browse.php (revision 766)
+++ trunk/admin/browse.php (revision 767)
@@ -1,943 +1,473 @@
<?php
-
##############################################################
-
##In-portal ##
-
##############################################################
-
## In-portal ##
-
## Intechnic Corporation ##
-
## All Rights Reserved, 1998-2002 ##
-
## ##
-
## No portion of this code may be copied, reproduced or ##
-
## otherwise redistributed without proper written ##
-
## consent of Intechnic Corporation. Violation will ##
-
## result in revocation of the license and support ##
-
## privileges along maximum prosecution allowed by law. ##
-
##############################################################
-
//$pathtoroot="";
-
-
$b_topmargin = "0";
-
//$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='position:absolute; width:100%;top:0px;' align='right'><img src='images/logo_bg.gif'></div><img src='images/spacer.gif' width=1 height=15><br><div style='z-Index:1; position:relative'>";
-
-
if(!strlen($pathtoroot))
-
{
-
$path=dirname(realpath(__FILE__));
-
if(strlen($path))
-
{
-
/* determine the OS type for path parsing */
-
$pos = strpos($path,":");
-
if ($pos === false)
-
{
-
$gOS_TYPE="unix";
-
$pathchar = "/";
-
}
-
else
-
{
-
$gOS_TYPE="win";
-
$pathchar="\\";
-
}
-
$p = $path.$pathchar;
-
/*Start looking for the root flag file */
-
while(!strlen($pathtoroot) && strlen($p))
-
{
-
$sub = substr($p,strlen($pathchar)*-1);
-
if($sub==$pathchar)
-
{
-
$filename = $p."root.flg";
-
}
-
else
-
$filename = $p.$pathchar."root.flg";
-
if(file_exists($filename))
-
{
-
$pathtoroot = $p;
-
}
-
else
-
{
-
$parent = realpath($p.$pathchar."..".$pathchar);
-
if($parent!=$p)
-
{
-
$p = $parent;
-
}
-
else
-
$p = "";
-
}
-
}
-
if(!strlen($pathtoroot))
-
$pathtoroot = ".".$pathchar;
-
}
-
else
-
{
-
$pathtoroot = ".".$pathchar;
-
}
-
}
-
-
$sub = substr($pathtoroot,strlen($pathchar)*-1);
-
if($sub!=$pathchar)
-
{
-
$pathtoroot = $pathtoroot.$pathchar;
-
}
-
//echo $pathtoroot;
-
-
require_once($pathtoroot."kernel/startup.php");
-
-
if (!admin_login())
-
{
-
if(!headers_sent())
-
setcookie("sid"," ",time()-3600);
-
$objSession->Logout();
-
header("Location: ".$adminURL."/login.php");
-
die();
-
//require_once($pathtoroot."admin/login.php");
-
}
-
-
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
-
$admin = $objConfig->Get("AdminDirectory");
-
if(!strlen($admin))
-
$admin = "admin";
-
-
$localURL=$rootURL."kernel/";
-
$adminURL = $rootURL.$admin;
-
$imagesURL = $adminURL."/images";
-
$browseURL = $adminURL."/browse";
-
$cssURL = $adminURL."/include";
-
-
$indexURL = $rootURL."index.php";
-
-
$m_var_list_update["cat"] = 0;
-
$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
-
unset($m_var_list_update["cat"]);
-
-
$envar = "env=" . BuildEnv();
-
-
if($objCatList->CurrentCategoryID()>0)
-
{
-
$c = $objCatList->CurrentCat();
-
$upURL = "javascript:AdminCatNav('".$c->Admin_Parent_Link()."');";
-
}
-
else
-
$upURL = $_SERVER["PHP_SELF"]."?".$envar;
-
-
//admin only util
-
-
$pathtolocal = $pathtoroot."kernel/";
-
require_once ($pathtoroot.$admin."/include/elements.php");
-
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
-
require_once ($pathtolocal."admin/include/navmenu.php");
-
require_once($pathtoroot.$admin."/browse/toolbar.php");
-
-
$m = GetModuleArray();
-
foreach($m as $key=>$value)
-
{
-
$path = $pathtoroot.$value."admin/include/parser.php";
-
if(file_exists($path))
-
{
-
//echo "<!-- $path -->";
-
@include_once($path);
-
}
-
}
-
if(!defined('IS_INSTALL'))define('IS_INSTALL',0);
-
if(!IS_INSTALL)
-
{
-
if (!admin_login())
-
{
-
if(!headers_sent())
-
setcookie("sid"," ",time()-3600);
-
$objSession->Logout();
-
header("Location: ".$adminURL."/login.php");
-
die();
-
//require_once($pathtoroot."admin/login.php");
-
}
-
}
-
//Set Section
-
$section = 'in-portal:browse';
-
-
//Set Environment Variable
-
-
//echo $objCatList->ItemsOnClipboard()." Categories on the clipboard<br>\n";
-
//echo $objTopicList->ItemsOnClipboard()." Topics on the clipboard<br>\n";
-
//echo $objLinkList->ItemsOnClipboard()." Links on the clipboard<br>\n";
-
//echo $objArticleList->ItemsOnClipboard()." Articles on the clipboard<br>\n";
-
-
// save last category visited
-
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
-
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
-
-
/* // for testing
-
$last_cat = $objSession->GetVariable('last_category');
-
$prev_cat = $objSession->GetVariable('prev_category');
-
echo "Last CAT: [$last_cat]<br>";
-
echo "Prev CAT: [$prev_cat]<br>";
-
*/
-
$SearchType = $objSession->GetVariable("SearchType");
-
if(!strlen($SearchType))
-
$SearchType = "all";
-
$SearchLabel = "la_SearchLabel";
-
if( GetVar('SearchWord') !== false ) $objSession->SetVariable('admin_seach_words', GetVar('SearchWord') );
-
$SearchWord = $objSession->GetVariable('admin_seach_words');
-
-
$objSession->SetVariable("HasChanges", 0);
-
-
// where should all edit popups submit changes
-
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
-
/* page header */
-
print <<<END
-
<html>
-
<head>
-
<title>In-portal</title>
-
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-
<meta http-equiv="Pragma" content="no-cache">
-
<script language="JavaScript">
-
imagesPath='$imagesURL'+'/';
-
</script>
-
-
END;
-
-
require_once($pathtoroot.$admin."/include/mainscript.php");
-
-
print <<<END
-
<script type="text/javascript">
-
if (window.opener != null) {
-
theMainScript.CloseAndRefreshParent();
-
}
-
</script>
-
END;
-
-
print <<<END
-
<script src="$browseURL/toolbar.js"></script>
-
<script src="$browseURL/checkboxes_new.js"></script>
-
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
-
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
-
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
-
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
-
END;
-
load_module_styles();
-
if( !isset($list) ) $list = '';
-
if(($SearchType=="categories" || $SearchType="all") && strlen($list))
-
{
-
int_SectionHeader(NULL,NULL,NULL,admin_language("la_Title_SearchResults"));
-
}
-
else
-
int_SectionHeader();
-
-
$filter = false; // always initialize variables before use
-
-
if($objSession->GetVariable("SearchWord") != '') {
-
$filter = true;
-
}
-
else {
-
$bit_combo = $objModules->ExecuteFunction('GetModuleInfo', 'all_bitmask');
-
$bit_combo = $objModules->MergeReturn($bit_combo);
-
foreach($bit_combo['VarName'] as $mod_name => $VarName)
-
{
-
//echo "VarName: [$VarName] = [".$objConfig->Get($VarName)."], ALL = [".$bit_combo['Bits'][$mod_name]."]<br>";
-
if( $objConfig->Get($VarName) )
-
if( $objConfig->Get($VarName) != $bit_combo['Bits'][$mod_name] )
-
{
-
$filter = true;
-
break;
-
}
-
}
-
}
-
?>
-
</div>
-
<!-- alex mark -->
-
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
-
<tbody>
-
<tr>
-
<td>
-
<div name="toolBar" id="mainToolBar">
-
<tb:button action="upcat" alt="<?php echo admin_language("la_ToolTip_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="homecat" alt="<?php echo admin_language("la_ToolTip_Home"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="new_cat" alt="<?php echo admin_language("la_ToolTip_New_Category"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="editcat" alt="<?php echo admin_language("la_ToolTip_Edit_Current_Category"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
-
<?php
-
foreach($NewButtons as $btn)
-
{
-
print "<tb:button action=\"".$btn["Action"]."\" alt=\"".$btn["Alt"]."\" ImagePath=\"".$btn["ImagePath"]."\" ";
-
if(strlen($btn["Tab"])>0)
-
print "tab=\"".$btn["Tab"]."\"";
-
print ">\n";
-
}
-
?>
-
<tb:button action="edit" alt="<?php echo admin_language("la_ToolTip_Edit"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="delete" alt="<?php echo admin_language("la_ToolTip_Delete"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="approve" alt="<?php echo admin_language("la_ToolTip_Approve"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="decline" alt="<?php echo admin_language("la_ToolTip_Decline"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="cut" alt="<?php echo admin_language("la_ToolTip_Cut"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="copy" alt="<?php echo admin_language("la_ToolTip_Copy"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="paste" alt="<?php echo admin_language("la_ToolTip_Paste"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="move_up" alt="<?php echo admin_language("la_ToolTip_Move_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="move_down" alt="<?php echo admin_language("la_ToolTip_Move_Down"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="print" alt="<?php echo admin_language("la_ToolTip_Print"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
</div>
-
</td>
-
</tr>
-
</tbody>
-
</table>
-
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
-
<tbody>
-
<tr>
-
<td><img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
-
<span class="navbar"><?php $attribs["admin"]=1; print m_navbar($attribs); ?></span>
-
</td>
-
<td align="right">
-
<FORM METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" NAME="admin_search" ID="admin_search"><INPUT ID="SearchScope" NAME="SearchScope" type="hidden" VALUE="<?php echo $objSession->GetVariable("SearchScope"); ?>"><INPUT ID="SearchType" NAME="SearchType" TYPE="hidden" VALUE="<?php echo $objSession->GetVariable("SearchType"); ?>"><INPUT ID="NewSearch" NAME="NewSearch" TYPE="hidden" VALUE="0"><INPUT TYPE="HIDDEN" NAME="Action" value="m_Exec_Search">
-
<table cellspacing="0" cellpadding="0"><tr>
-
<td><?php echo admin_language($SearchLabel); ?> </td>
-
<td><input ID="SearchWord" type="text" value="<?php echo inp_htmlize($SearchWord,1); ?>" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: 999999"></td>
-
<td><img id="imgSearch" action="search_b" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif'" style="cursor:hand" width="22" width="22"><!--<img action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16.gif'" style="cursor:hand">-->
-
<img action="search_c" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="document.all.SearchWord.value = ''; this.action = this.getAttribute('action'); actionHandler(this);" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif'" style="cursor:hand" width="22" width="22">
-
</td>
-
</tr></table>
-
</FORM>
-
<!--tb:button action="search_b" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
-
<tb:button action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
-
</td>
-
</tr>
-
</tbody>
-
</table>
-
<?php if ($filter) { ?>
-
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
-
<tr>
-
<td valign="top">
-
<?php int_hint_red(admin_language("la_Warning_Filter")); ?>
-
</td>
-
</tr>
-
</table>
-
<?php } ?>
-
<br>
-
<!-- CATEGORY DIVIDER -->
-
<?php
-
-
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
-
$objCatList->Clear();
-
$IsSearch = FALSE;
-
if($SearchType == 'categories' || $SearchType == 'all')
-
{
-
$list = $objSession->GetVariable("SearchWord");
-
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
-
if(strlen($SearchQuery))
-
{
-
$SearchQuery = " (".$SearchQuery.") ";
-
if( strlen($CatScopeClause) ) {
$SearchQuery .= " AND ParentId = ".$objCatList->CurrentCategoryID();//" AND ".$CatScopeClause;
}
-
$objCatList->LoadCategories($SearchQuery.$CategoryFilter,$OrderBy);
-
$IsSearch = TRUE;
-
}
-
else
-
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
-
}
-
else
-
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter, $OrderBy);
-
-
$TotalItemCount += $objCatList->QueryItemCount;
-
-
?>
-
<?php
-
$e = $Errors->GetAdminUserErrors();
-
if(count($e)>0)
-
{
-
echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">";
-
for($ex = 0; $ex<count($e);$ex++)
-
{
-
echo "<tr><td width=\100%\" class=\"error\">".prompt_language($e[$ex])."</td></tr>";
-
}
-
echo "</TABLE><br>";
-
}
-
?>
-
<table cellspacing="0" cellpadding="0" width="100%" border="0">
-
<tbody>
-
<tr>
-
<td width="138" height="20" nowrap="nowrap" class="active_tab" onclick="toggleCategoriesB(this)" id="cats_tab">
-
<table cellspacing="0" cellpadding="0" width="100%" border="0">
-
<tr>
-
<td id="l_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_l.gif" class="left_tab">
-
<img src="<?php echo $imagesURL; ?>/itemtabs/divider_up.gif" width="20" height="20" border="0" align="absmiddle">
-
</td>
-
<td id="m_cat" nowrap background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
-
<?php echo admin_language("la_ItemTab_Categories"); ?>:
-
</td>
-
<td id="m1_cat" align="right" valign="top" background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
-
<span class="cats_stats">(<?php echo $objCatList->QueryItemCount; ?>)</span>
-
</td>
-
<td id="r_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif" class="right_tab">
-
<img src="<?php echo $imagesURL; ?>/spacer.gif" width="21" height="20">
-
</td>
-
</tr>
-
</table>
-
</td>
-
<td> </td>
-
</tr>
-
</tbody>
-
</table>
-
<div class="divider" style="" id="categoriesDevider"><img width="1" height="1" src="<?php echo $imagesURL; ?>/spacer.gif"></div>
-
</DIV>
-
</div>
-
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index:0" id="firstContainer">
-
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index:2" id="secondContainer">
-
<!-- CATEGORY OUTPUT START -->
-
<div id="categories" tabtitle="Categories">
-
<form id="categories_form" name="categories_form" action="" method="post">
-
<input type="hidden" name="Action">
-
<?php
-
if($IsSearch)
-
{
-
$template = "cat_search_element.tpl";
-
}
-
else {
-
$template = "cat_element.tpl";
-
}
-
print adListSubCats($objCatList->CurrentCategoryID(),$template);
-
?>
-
</form>
-
</div>
-
<BR>
-
<!-- CATEGORY OUTPUT END -->
-
<?php
-
print $ItemTabs->TabRow();
-
if(count($ItemTabs->Tabs))
-
{
-
?>
-
<div class="divider" id="tabsDevider"><img width=1 height=1 src="images/spacer.gif"></div>
-
<?php
-
}
-
?>
-
</DIV>
-
<?php
-
unset($m);
-
$m = GetModuleArray("admin");
-
foreach($m as $key=>$value)
-
{
-
$path = $pathtoroot.$value."admin/browse.php";
-
if(file_exists($path))
-
{
-
//echo "\n<!-- $path -->\n";
-
include_once($path);
-
}
-
}
-
?>
-
<form method="post" action="browse.php?env=<?php echo BuildEnv(); ?>" name="viewmenu">
-
<input type="hidden" name="fieldname" value="">
-
<input type="hidden" name="varvalue" value="">
-
<input type="hidden" name="varvalue2" value="">
-
<input type="hidden" name="Action" value="">
-
</form>
-
</DIV>
-
<!-- END CODE-->
-
<script language="JavaScript">
-
InitPage();
-
-
-
cats_on = theMainScript.GetCookie('cats_tab_on');
-
if (cats_on == 0) {
-
toggleCategoriesB(document.getElementById('cats_tab'), true);
-
}
-
-
tabs_on = theMainScript.GetCookie('tabs_on');
-
if (tabs_on == '1' || tabs_on == null) {
-
if(default_tab.length == 0 || default_tab == 'categories' )
-
{
-
cookie_start = theMainScript.GetCookie('active_tab');
-
if (cookie_start != null) start_tab = cookie_start;
-
if(start_tab!=null) {
-
//alert('ok');
-
toggleTabB(start_tab, true);
-
}
-
}
-
else
-
{
-
//alert('ok');
-
toggleTabB(default_tab,true);
-
}
-
}
-
-
d = document.getElementById('SearchWord');
-
if(d)
-
{
-
d.onkeyup = function(event) {
-
if(window.event.keyCode==13)
-
{
-
var el = document.getElementById('imgSearch');
-
el.onclick();
-
}
-
}
-
}
-
</script>
-
-
<?php int_footer(); ?>
\ No newline at end of file
Property changes on: trunk/admin/browse.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.10
\ No newline at end of property
Index: trunk/admin/browse/toolbar.js
===================================================================
--- trunk/admin/browse/toolbar.js (revision 766)
+++ trunk/admin/browse/toolbar.js (revision 767)
@@ -1,219 +1,219 @@
var toolbar;
//var imagesPath = "images/";
var separatorImg = "divider";
var imagesPreName = "tool_";
var imagesPostName_Active = "_f2";
var imagesPostName_Disabled = "_f3";
var imagesExt = ".gif";
var preloadImages = new Array();
preloadImage(getButtonSrc(separatorImg, 0));
function initToolbar(id, actionHandler)
{
toolbar = document.getElementById(id);
if (!toolbar) return;
toolbar.actionHandler = actionHandler;
toolbar.className = "toolbarDiv"
var childNodes = toolbar.getElementsByTagName("*");
if (childNodes.length == 0) childNodes = toolbar.childNodes;
var _oTable = document.createElement("TABLE");
var _oTBody = document.createElement("TBODY");
var _oTR = document.createElement("TR");
var _oTD = document.createElement("TD");
_oTD.className = "toolbarTD";
_oTR.appendChild(_oTD);
_oTBody.appendChild(_oTR);
_oTable.appendChild(_oTBody);
_oTable.align = "left";
_oTable.cellSpacing = 0;
_oTable.cellPadding = 0;
_oTable.border = 0;
_oTable.className= "toolbarTable"
_oTable.width = "100%";
var oTable = document.createElement("TABLE");
var oTBody = document.createElement("TBODY");
var oTR = document.createElement("TR");
oTR.parentToolbar = toolbar;
oTBody.appendChild(oTR);
oTable.appendChild(oTBody);
oTable.align = "left";
oTable.cellSpacing = 0;
oTable.cellPadding = 0;
oTable.border = 0;
// oTable.width = "100%";
oTable.className= "toolbarTable"
_oTD.appendChild(oTable);
for (var i = 0; i < childNodes.length; i++)
if (childNodes[i].nodeType == 1)
{
oTD = document.createElement("TD");
oTD.action = childNodes[i].getAttribute("action");
// oTD.width = "1%";
oIMG = document.createElement("IMG");
if (childNodes[i].getAttribute("align") == "right" && !oTR.alignedRight)
{
_owTD = document.createElement("TD");
_owTD.innerHTML = " ";
_owTD.width = "99%";
oTR.appendChild(_owTD);
oTR.alignedRight = true;
}
switch(childNodes[i].tagName.toLowerCase())
{
case "tb:separator" :
oIMG.basepath = childNodes[i].getAttribute("ImagePath");
oIMG.action = "divider";
oIMG.src = getButtonSrc(oIMG, 0);
break;
case "tb:button" :
oIMG.toolbar = toolbar;
oIMG.action = childNodes[i].getAttribute("action");
var enabled = new String(childNodes[i].getAttribute("enabled"));
oIMG.disabled = (enabled == "false");
oIMG.basepath = childNodes[i].getAttribute("ImagePath");
oIMG.src = getButtonSrc(oIMG, (oIMG.disabled) ? 2 : 0)
for (var j = 0; j < 3; j++)
preloadImage(getButtonSrc(oIMG, j),oIMG.basepath);
oIMG.style.cursor = (oIMG.disabled) ? "default" : "hand";
oIMG.setAttribute("alt", childNodes[i].getAttribute("alt"));
oIMG.onclick = function()
{
if (this.disabled) return;
if (this.toolbar.actionHandler)
this.toolbar.actionHandler(this)
}
oIMG.onmouseover = function(e)
{
if (this.disabled) return;
this.src = getButtonSrc(this, 1);
var evt = (e) ? e : event; evt.cancelBubble = true;
}
oIMG.onmouseout = function(e)
{
if (this.disabled) return;
this.src = getButtonSrc(this, 0);
var evt = (e) ? e : event; evt.cancelBubble = true;
}
break;
}
var tab = (childNodes[i].getAttribute("tab")) ? childNodes[i].getAttribute("tab") : "";
oTD.tab = tab;
if (tab != "") oTD.style.display = "none";
oTD.appendChild(oIMG);
oTR.appendChild(oTD)
}
toolbar.appendChild(_oTable);
toolbar.setTab = toolbarSetTab;
toolbar.showButton = toolbarShowButton;
toolbar.enableButton = toolbarEnableButton;
toolbar.disableButton = toolbarDisableButton;
}
function toolbarSetTab(tab)
{
var TDs = this.getElementsByTagName("TD");
for (var i = 0; i < TDs.length; i++)
if (TDs[i].tab)
if (TDs[i].tab != "")
{
if (TDs[i].tab == tab) TDs[i].style.display = ""
else TDs[i].style.display = "none";
}
}
function toolbarShowButton(action, value)
{
var TDs = this.getElementsByTagName("TD");
for (var i = 0; i < TDs.length; i++)
if (TDs[i].action == action)
TDs[i].style.display = (value) ? "" : "none";
}
function findButton(toolbar, action)
{
if (!toolbar) return;
var buttons = toolbar.getElementsByTagName("IMG");
for (var i = 0; i < buttons.length; i++)
if (buttons[i].action == action) return buttons[i];
}
function toolbarEnableButton(action, value)
{
var button = findButton(this, action);
if (!button) return;
button.src = getButtonSrc(button, (value == false) ? 2 : 0)
button.style.cursor = (value == false) ? "default" : "hand";
button.disabled = (value == false) ? true : false;
}
function toolbarDisableButton(action)
{
this.enableButton(action, false)
}
function getButtonSrc(button, state)
{
var stateExt;
switch(state)
{
case (1) : stateExt = imagesPostName_Active; break;
case (2) : stateExt = imagesPostName_Disabled; break;
default : stateExt = "";
}
return button.basepath + imagesPreName + button.action + stateExt + imagesExt;
}
function preloadImage(src)
{
var img = new Image();
img.src = src;
preloadImages[preloadImages.length] = img;
}
function showContextMenu(evt) {
- initContextMenu(evt.clientX,evt.clientY);
- window.FW_showMenu(window.contextMenu,evt.clientX,evt.clientY);
+ initContextMenu(evt.clientX,evt.clientY+document.body.scrollTop);
+ window.FW_showMenu(window.contextMenu,evt.clientX,evt.clientY+document.body.scrollTop);
evt.returnValue = false;
evt.cancelBubble = true;
return false;
}
function initContextMenu(){
window.contextMenu = new Menu("Context");
contextMenu.addMenuItem("Edit","check_submit('','edit');","");
contextMenu.addMenuItem("Delete","check_submit('admin/browse','delete');","");
contextMenu.addMenuSeparator();
contextMenu.addMenuItem("Approve","check_submit('admin/browse','approve');","");
contextMenu.addMenuItem("Decline","check_submit('admin/browse','decline');","");
contextMenu.addMenuSeparator();
contextMenu.addMenuItem("Cut","check_submit('admin/browse','cut');","");
contextMenu.addMenuItem("Copy","check_submit('admin/browse','copy');","");
if (typeof(activeTab) != 'undefined') {
if(TabPasteEnabled(activeTab.title))
contextMenu.addMenuItem("Paste","check_submit('admin/browse','paste');","");
}
window.triedToWriteMenus = false;
window.contextMenu.writeMenus();
return true;
}
Property changes on: trunk/admin/browse/toolbar.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/include/toolbar.js
===================================================================
--- trunk/admin/include/toolbar.js (revision 766)
+++ trunk/admin/include/toolbar.js (revision 767)
@@ -1,806 +1,405 @@
<?php
-
//***********************************
-
//***********************************
-
//The dropdown menu
-
//***********************************
-
-
function int_view_init()
-
{
-
global $section, $pathtoroot, $envar, $g_status, $n_categories_articles, $n_categories, $n_articles, $n_cat_filter, $n_article_filter, $n_lead_article, $n_archived_article, $n_pending_article, $n_disabled_article, $n_pending_category, $n_disabled_category, $n_category_sort, $n_category_sortby, $n_article_sort, $n_article_sortby, $n_article_perpage;
-
-
if ($g_status == 'cut' || $g_status == 'copy')
-
$pasteval = "true";
-
else
-
$pasteval = "false";
-
-
-
// Select viewing categories or articles
-
if ($n_categories_articles == "1")
-
$n_categories = 1;
-
if ($n_categories_articles == "2")
-
$n_articles = 1;
-
if ($n_categories_articles == "3")
-
{ $n_articles = 1;
-
$n_categories = 1;
-
}
-
-
// Article filter
-
if ($n_lead_article == 1)
-
$n_article_filter .= " AND LeadStory=1";
-
if ($n_archived_article == 1)
-
$n_article_filter .= " AND Archived=1";
-
if ($n_pending_article == 1)
-
$n_article_filter .= " AND Pending=1";
-
if ($n_disabled_article == 1)
-
$n_article_filter .= " AND Visible=0";
-
-
// Category filter
-
if ($n_pending_category == 1)
-
$n_cat_filter .= " AND Pending=1";
-
if ($n_disabled_category == 1)
-
$n_cat_filter .= " AND Visible=0";
-
-
// Sorting
-
$varname = "n_category_sort_" . $n_category_sort;
-
$$varname = 1;
-
-
$varname = "n_category_sortby_" . $n_category_sortby;
-
$$varname = 1;
-
-
$varname = "n_article_sort_" . $n_article_sort;
-
$$varname = 1;
-
-
$varname = "n_article_sortby_" . $n_article_sortby;
-
$$varname = 1;
-
-
$varname = "n_article_perpage_" . $n_article_perpage;
-
$$varname = 1;
-
-
-
-
print <<<END
-
<script language="JavaScript">
-
<!--
-
-
function n_categories_articles(val){
-
document.viewmenu.fieldname.value = "n_categories_articles";
-
document.viewmenu.varvalue.value = val;
-
document.viewmenu.submit();
-
}
-
-
function n_filter(fieldnum, val){
-
var field;
-
switch(fieldnum){
-
case 1:
-
field = "n_lead_article";
-
break;
-
case 2:
-
field = "n_archived_article";
-
break;
-
case 3:
-
field = "n_pending_article";
-
break;
-
case 4:
-
field = "n_pending_category";
-
break;
-
case 5:
-
field = "n_disabled_article";
-
break;
-
case 6:
-
field = "n_disabled_category";
-
break;
-
}
-
document.viewmenu.fieldname.value = "n_serval";
-
document.viewmenu.varvalue.value = field;
-
-
if (val == 1)
-
document.viewmenu.varvalue2.value = "0";
-
else
-
document.viewmenu.varvalue2.value = "1";
-
-
document.viewmenu.submit();
-
-
}
-
-
function n_cat_sort(val){
-
var field;
-
switch(val){
-
case 1:
-
field = "asc";
-
break;
-
case 2:
-
field = "desc";
-
break;
-
}
-
document.viewmenu.fieldname.value = "n_setval";
-
document.viewmenu.varvalue.value = "n_category_sort";
-
document.viewmenu.varvalue2.value = field;
-
document.viewmenu.submit();
-
}
-
-
function n_cat_sortby(val){
-
var field;
-
switch(val){
-
case 1:
-
field = "Name";
-
break;
-
case 2:
-
field = "Description";
-
break;
-
case 3:
-
field = "Priority";
-
break;
-
}
-
document.viewmenu.fieldname.value = "n_setval";
-
document.viewmenu.varvalue.value = "n_category_sortby";
-
document.viewmenu.varvalue2.value = field;
-
document.viewmenu.submit();
-
}
-
-
function n_article_sort(val){
-
var field;
-
switch(val){
-
case 1:
-
field = "asc";
-
break;
-
case 2:
-
field = "desc";
-
break;
-
}
-
document.viewmenu.fieldname.value = "n_setval";
-
document.viewmenu.varvalue.value = "n_article_sort";
-
document.viewmenu.varvalue2.value = field;
-
document.viewmenu.submit();
-
}
-
-
function n_article_sortby(val){
-
var field;
-
switch(val){
-
case 1:
-
field = "Title";
-
break;
-
case 2:
-
field = "Author";
-
break;
-
case 3:
-
field = "Priority";
-
break;
-
}
-
document.viewmenu.fieldname.value = "n_setval";
-
document.viewmenu.varvalue.value = "n_article_sortby";
-
document.viewmenu.varvalue2.value = field;
-
document.viewmenu.submit();
-
}
-
-
function n_article_perpage(val){
-
document.viewmenu.fieldname.value = "n_setval";
-
document.viewmenu.varvalue.value = "n_article_perpage";
-
document.viewmenu.varvalue2.value = val;
-
document.viewmenu.submit();
-
}
-
-
var userchecks = [];
-
-
function adduserchecks(val){
-
userchecks[userchecks.length] = val;
-
}
-
-
function select(val){
-
-
if (val == 1 || val == 2)
-
for(i=0; i<newschecks.length; i++)
-
{
-
ob = document.getElementById(newschecks[i]);
-
ob.all[0].checked = true;
-
usenews_add(ob);
-
}
-
if (val == 1 || val == 3)
-
for(i=0; i<catchecks.length; i++)
-
{
-
ob = document.getElementById(catchecks[i]);
-
ob.all[1].checked = true;
-
usecat_add(ob);
-
}
-
}
-
-
function unselect(){
for(i=0; i<newschecks.length; i++)
-
{
-
ob = document.getElementById(newschecks[i]);
-
if (ob.all[0].checked)
-
{ ob.all[0].checked = false;
-
usenews_sub(ob);
-
}
-
}
-
for(i=0; i<catchecks.length; i++)
-
{
-
ob = document.getElementById(catchecks[i]);
-
if (ob.all[1].checked)
-
{ ob.all[1].checked = false;
-
usecat_sub(ob);
-
}
-
}
-
}
-
-
function invert(){
for(i=0; i<catchecks.length; i++)
-
{
-
ob = document.getElementById(catchecks[i]);
-
if (ob.all[1].checked)
-
{ ob.all[1].checked = false;
-
usecat_sub(ob);
-
}
-
else
-
{ ob.all[1].checked = true;
-
usecat_add(ob);
-
}
-
-
}
-
for(i=0; i<newschecks.length; i++)
-
{
-
ob = document.getElementById(newschecks[i]);
-
if (ob.all[0].checked)
-
{ ob.all[0].checked = false;
-
usenews_sub(ob);
-
}
-
else
-
{ ob.all[0].checked = true;
-
usenews_add(ob);
-
}
-
-
}
-
-
}
-
-
function fwLoadMenus() {
-
if (window.fw_menu_0) return;
-
window.fw_menu_0_1 = new Menu("Filter",150,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_1.addMenuItem("Leading Articles","location='javascript:n_filter(1,$n_lead_article);'","$n_lead_article");
-
fw_menu_0_1.addMenuItem("Archived Articles","location='javascript:n_filter(2,$n_archived_article);'","$n_archived_article");
-
fw_menu_0_1.addMenuSeparator();
-
fw_menu_0_1.addMenuItem("Pending Articles","location='javascript:n_filter(3,$n_pending_article);'","$n_pending_article");
-
fw_menu_0_1.addMenuItem("Pending Categories","location='javascript:n_filter(4,$n_pending_category);'","$n_pending_category");
-
fw_menu_0_1.addMenuSeparator();
-
fw_menu_0_1.addMenuItem("Disabled Articles","location='javascript:n_filter(5,$n_disabled_article);'","$n_disabled_article");
-
fw_menu_0_1.addMenuItem("Disabled Categories","location='javascript:n_filter(6,$n_disabled_category);'","$n_disabled_category");
-
fw_menu_0_1.fontWeight="normal";
-
fw_menu_0_1.hideOnMouseOut=true;
-
window.fw_menu_0_2_1 = new Menu("Categories",105,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_2_1.addMenuItem("Ascending","location='javascript:n_cat_sort(1);'","$n_category_sort_asc");
-
fw_menu_0_2_1.addMenuItem("Descending","location='javascript:n_cat_sort(2);'","$n_category_sort_desc");
-
fw_menu_0_2_1.addMenuSeparator();
-
fw_menu_0_2_1.addMenuItem("Name","location='javascript:n_cat_sortby(1);'","$n_category_sortby_Name");
-
fw_menu_0_2_1.addMenuItem("Description","location='javascript:n_cat_sortby(2);'","$n_category_sortby_Description");
-
fw_menu_0_2_1.addMenuItem("Priority","location='javascript:n_cat_sortby(3);'","$n_category_sortby_Priority");
-
fw_menu_0_2_1.fontWeight="normal";
-
fw_menu_0_2_1.hideOnMouseOut=true;
-
window.fw_menu_0_2_2 = new Menu("Articles",105,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_2_2.addMenuItem("Ascending","location='javascript:n_article_sort(1);'","$n_article_sort_asc");
-
fw_menu_0_2_2.addMenuItem("Descending","location='javascript:n_article_sort(2);'","$n_article_sort_desc");
-
fw_menu_0_2_2.addMenuSeparator();
-
fw_menu_0_2_2.addMenuItem("Title","location='javascript:n_article_sortby(1);'","$n_article_sortby_Title");
-
fw_menu_0_2_2.addMenuItem("Author","location='javascript:n_article_sortby(2);'","$n_article_sortby_Author");
-
fw_menu_0_2_2.addMenuItem("Priority","location='javascript:n_article_sortby(3);'","$n_article_sortby_Priority");
-
fw_menu_0_2_2.fontWeight="normal";
-
fw_menu_0_2_2.hideOnMouseOut=true;
-
window.fw_menu_0_2 = new Menu("Sorting",100,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_2.addMenuItem(fw_menu_0_2_1,"","");
-
fw_menu_0_2.addMenuItem(fw_menu_0_2_2,"","");
-
fw_menu_0_2.fontWeight="normal";
-
fw_menu_0_2.hideOnMouseOut=true;
-
fw_menu_0_2.childMenuIcon="images/arrows.gif";
-
window.fw_menu_0_3 = new Menu("Results per Page",55,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_3.addMenuItem("10","location='javascript:n_article_perpage(10);'","$n_article_perpage_10");
-
fw_menu_0_3.addMenuItem("20","location='javascript:n_article_perpage(20);'","$n_article_perpage_20");
-
fw_menu_0_3.addMenuItem("50","location='javascript:n_article_perpage(50);'","$n_article_perpage_50");
-
fw_menu_0_3.addMenuItem("100","location='javascript:n_article_perpage(100);'","$n_article_perpage_100");
-
fw_menu_0_3.fontWeight="normal";
-
fw_menu_0_3.hideOnMouseOut=true;
-
window.fw_menu_0_4 = new Menu("Select",115,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0_4.addMenuItem("All","javascript:select(1);","");
-
fw_menu_0_4.addMenuItem("All Articles","javascript:select(2);","");
-
fw_menu_0_4.addMenuItem("All Categories","javascript:select(3);","");
-
fw_menu_0_4.addMenuItem("Unselect","javascript:unselect();","");
-
fw_menu_0_4.addMenuItem("Invert","javascript:invert();","");
-
fw_menu_0_4.fontWeight="normal";
-
fw_menu_0_4.hideOnMouseOut=true;
-
window.fw_menu_0 = new Menu("root",135,19,"",11,"#000000","#000000","#f0f1eb","#e0e0da");
-
fw_menu_0.addMenuItem("Categories","location='javascript:n_categories_articles(1);'","$n_categories");
-
fw_menu_0.addMenuItem("Articles","location='javascript:n_categories_articles(2);'","$n_articles");
-
fw_menu_0.addMenuSeparator();
-
fw_menu_0.addMenuItem(fw_menu_0_1);
-
fw_menu_0.addMenuItem(fw_menu_0_2);
-
fw_menu_0.addMenuItem(fw_menu_0_3);
-
fw_menu_0.addMenuItem(fw_menu_0_4);
-
fw_menu_0.fontWeight="normal";
-
fw_menu_0.hideOnMouseOut=true;
-
fw_menu_0.childMenuIcon="images/arrows.gif";
-
-
fw_menu_0.writeMenus();
-
} // fwLoadMenus()
-
//-->
-
</script>
-
-
<script language="JavaScript1.2" src="include/fw_menu.js"></script>
-
-
<script language="Javascript">
-
<!--
-
-
var userchecked = 0;
-
var edit_ = false;
-
var delete_ = false;
-
var approve_ = false;
-
var addgroup_ = false;
-
-
function user_add(el){
-
userchecked++;
-
tool_perm();
-
el.name = el.className;
-
el.className = 'selection';
-
}
-
function user_sub(el){
-
userchecked--;
-
tool_perm();
-
el.className = el.name;
-
}
-
-
function check_edit(){
-
if (userchecked != 0)
-
{
-
document.listform.action='adduser.php?$envar';
-
document.listform.submit();
-
}
-
}
-
END;
-
-
if ($section == 'in-portal:user_list')
-
print<<<END
-
function tool_perm(){
-
//edit/move button
-
-
//if ((edit && moveup && movedown) != null)
-
if (edit != null)
-
{
-
if (userchecked == 0)
-
{
-
edit.src = '$pathtoroot' + 'admin/images/' + "tool_edit_2.gif";
-
approve.src = '$pathtoroot' + 'admin/images/' + "tool_approve_2.gif";
-
del.src = '$pathtoroot' + 'admin/images/' + "tool_del_2.gif";
-
adduser.src = '$pathtoroot' + 'admin/images/' + "tool_adduser_2.gif";
-
edit_ = false;
-
delete_ = false;
-
approve_ = false;
-
addgroup_ = false;
-
}
-
else
-
{
-
edit.src = '$pathtoroot' + 'admin/images/' + "tool_edit.gif";
-
approve.src = '$pathtoroot' + 'admin/images/' + "tool_approve.gif";
-
del.src = '$pathtoroot' + 'admin/images/' + "tool_del.gif";
-
adduser.src = '$pathtoroot' + 'admin/images/' + "tool_adduser.gif";
-
edit_ = true;
-
delete_ = true;
-
approve_ = true;
-
addgroup_ = true;
-
}
-
}
-
-
}
-
END;
-
else
-
print<<<END
-
function tool_perm(){
-
-
}
-
-
END;
-
-
print<<<END
-
//-->
-
</script>
-
-
END;
-
}
-
?>
\ No newline at end of file
Property changes on: trunk/admin/include/toolbar.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/FCKeditor/js/fck_editor.js
===================================================================
--- trunk/admin/editor/FCKeditor/js/fck_editor.js (revision 766)
+++ trunk/admin/editor/FCKeditor/js/fck_editor.js (revision 767)
@@ -1,619 +1,311 @@
/*
* FCKeditor - The text editor for internet
-
* Copyright (C) 2003 Frederico Caldeira Knabben
-
*
-
* Licensed under the terms of the GNU Lesser General Public License
-
* (http://www.opensource.org/licenses/lgpl-license.php)
-
*
-
* For further information go to http://www.fredck.com/FCKeditor/
-
* or contact fckeditor@fredck.com.
-
*
-
* fck_editor.js: Main script that initializes the editor.
-
*
-
* Authors:
-
* Frederico Caldeira Knabben (fckeditor@fredck.com)
-
*/
-
-
var bInitialized = false ;
-
var bDataLoaded = false ;
-
-
function initEditor()
-
{
-
if (! bInitialized)
-
{
-
bInitialized = true ;
-
-
loadToolbarSet() ;
-
loadToolbarSourceSet() ;
-
-
objContent.BaseURL = config.BaseUrl ;
-
}
-
-
if (! bDataLoaded && ! objContent.Busy)
-
{
-
bDataLoaded = true ;
-
-
objContent.DOM.body.onpaste = onPaste ;
-
objContent.DOM.body.ondrop = onDrop ;
-
-
objContent.DOM.body.onkeydown = onKeyDown ;
-
-
objContent.ShowBorders = config.StartupShowBorders ;
-
objContent.ShowDetails = config.StartupShowDetails ;
-
-
//alert(config.EditorAreaCSS);
-
objContent.DOM.createStyleSheet(config.EditorAreaCSS) ;
-
setLinkedField() ;
-
setTimeout("loadStylesheet()",1000);
-
}
-
}
-
-
// Method: loadToolbarSet()
-
// Description: Loads a toobar buttons set from an array inside the Toolbar holder.
-
// Author: FredCK
-
function loadToolbarSet()
-
{
-
var sToolBarSet = URLParams["Toolbar"] == null ? "Default" : URLParams["Toolbar"] ;
-
-
// FredCK: Toobar holder (DIV)
-
var oToolbarHolder = document.getElementById("divToolbar") ;
-
-
var oToolbar = new TBToolbar() ;
-
oToolbar.LoadButtonsSet( sToolBarSet ) ;
-
oToolbarHolder.innerHTML = oToolbar.GetHTML() ;
-
-
}
-
-
function loadToolbarSourceSet()
-
{
-
// FredCK: Toobar holder (DIV)
-
var oToolbarHolder = document.getElementById("divToolbarSource") ;
-
-
var oToolbar = new TBToolbar() ;
-
oToolbar.LoadButtonsSet( "Source" ) ;
-
oToolbarHolder.innerHTML = oToolbar.GetHTML() ;
-
}
-
-
function switchEditMode()
-
{
-
var bSource = (trSource.style.display == "none") ;
-
-
if (bSource)
-
txtSource.value = objContent.DOM.body.innerHTML ;
-
else
-
{
-
objContent.DOM.body.innerHTML = "<div id=__tmpFCKRemove__> </div>" + txtSource.value ;
-
objContent.DOM.getElementById('__tmpFCKRemove__').removeNode(true) ;
-
}
-
-
trEditor.style.display = bSource ? "none" : "inline" ;
-
trSource.style.display = bSource ? "inline" : "none" ;
-
-
events.fireEvent('onViewMode', bSource) ;
-
}
-
-
// setValue(): called from reset() to make a select list show the current font
-
// or style attributes
-
function selValue(el, str, text)
-
{
-
//if (!RichEditor.txtView) return; // Disabled in View Source mode
-
for (var i = 0; i < el.length; i++)
-
{
-
if (((text || !el[i].value) && el[i].text == str) || ((!text || el[i].value) && el[i].value == str))
-
{
-
el.selectedIndex = i;
-
return;
-
}
-
}
-
el.selectedIndex = 0;
-
}
-
-
var oLinkedField = null ;
-
function setLinkedField()
-
{
-
if (! URLParams['FieldName']) return ;
-
-
oLinkedField = parent.document.getElementsByName(URLParams['FieldName'])[0] ;
-
-
if (! oLinkedField) return ;
-
-
// __tmpFCKRemove__ added and removed to solve DHTML component error when loading "<p><hr></p>"
-
objContent.DOM.body.innerHTML = "<div id=__tmpFCKRemove__> </div>" + oLinkedField.value ;
-
objContent.DOM.getElementById('__tmpFCKRemove__').removeNode(true) ;
-
-
var oForm = oLinkedField.form ;
-
-
if (!oForm) return ;
-
-
// Attaches the field update to the onsubmit event
-
oForm.attachEvent("onsubmit", setFieldValue) ;
-
-
// Attaches the field update to the submit method (IE doesn't fire onsubmit on this case)
-
if (! oForm.updateFCKEditor) oForm.updateFCKEditor = new Array() ;
-
oForm.updateFCKEditor[oForm.updateFCKEditor.length] = setFieldValue ;
-
if (! oForm.originalSubmit)
-
{
-
oForm.originalSubmit = oForm.submit ;
-
oForm.submit = function()
-
{
-
if (this.updateFCKEditor)
-
{
-
for (var i = 0 ; i < this.updateFCKEditor.length ; i++)
-
{
-
this.updateFCKEditor[i]() ;
-
}
-
}
-
this.originalSubmit() ;
-
}
-
}
-
}
-
-
function setFieldValue()
-
{
-
if (trSource.style.display != "none")
-
{
-
switchEditMode() ;
-
}
-
-
if (config.EnableXHTML)
-
{
-
window.status = lang["ProcessingXHTML"] ;
-
oLinkedField.value = getXhtml( objContent.DOM.body ) ;
-
window.status = 'Done' ;
-
}
-
else
-
oLinkedField.value = objContent.DOM.body.innerHTML ;
-
}
-
-
function onPaste()
-
{
-
if (config.ForcePasteAsPlainText)
-
{
-
pastePlainText() ;
-
return false ;
-
}
-
else if (config.AutoDetectPasteFromWord && BrowserInfo.IsIE55OrMore)
-
{
-
var sHTML = GetClipboardHTML() ;
-
var re = /<\w[^>]* class="?MsoNormal"?/gi ;
-
if ( re.test( sHTML ) )
-
{
-
if ( confirm( lang["PasteWordConfirm"] ) )
-
{
-
cleanAndPaste( sHTML ) ;
-
return false ;
-
}
-
}
-
}
-
else
-
return true ;
-
}
-
-
function onDrop()
-
{
-
if (config.ForcePasteAsPlainText)
-
{
-
var sText = HTMLEncode( objContent.DOM.parentWindow.event.dataTransfer.getData("Text") ) ;
-
sText = sText.replace(/\n/g,'<BR>') ;
-
insertHtml(sText) ;
-
return false ;
-
}
-
else if (config.AutoDetectPasteFromWord && BrowserInfo.IsIE55OrMore)
-
{
-
// TODO
-
// To find a way to get the HTML that is dropped,
-
// clean it and insert it into the document.
-
return true ;
-
}
-
else
-
return true ;
-
}
-
-
function onKeyDown()
-
{
-
var oWindow = objContent.DOM.parentWindow ;
-
-
if ( oWindow.event.ctrlKey || oWindow.event.altKey || oWindow.event.shiftKey )
-
{
-
oWindow.event.returnValue = true ;
-
return ;
-
}
-
-
if ( oWindow.event.keyCode == 9 && config.TabSpaces > 0 ) // added tab support
-
{
-
var sSpaces = "" ;
-
for ( i = 0 ; i < config.TabSpaces ; i++ )
-
sSpaces += " " ;
-
insertHtml( sSpaces ) ;
-
}
-
else if ( oWindow.event.keyCode == 13 && config.UseBROnCarriageReturn )
-
{
-
if ( objContent.DOM.queryCommandState( 'InsertOrderedList' ) || objContent.DOM.queryCommandState( 'InsertUnorderedList' ) )
-
{
-
oWindow.event.returnValue = true ;
-
return ;
-
}
-
-
insertHtml("<br> ") ;
-
-
var oRange = objContent.DOM.selection.createRange() ;
-
oRange.moveStart('character',-1) ;
-
oRange.select() ;
-
objContent.DOM.selection.clear() ;
-
-
oWindow.event.returnValue = false ;
-
}
-
}
-
-
function loadStylesheet()
-
{
-
var a,b;
-
var styleList = new Array();
-
-
passedValue = objContent.DOM.styleSheets;
-
-
for (var i = 0; passedValue && i < passedValue.length; i++)
-
{
-
for (var j = 0; j < passedValue[i].rules.length; j++)
-
{
-
// Extract the rule and the rule definition from the passed style
-
// data.
-
a = passedValue[i].rules[j].selectorText.toString();
-
b = passedValue[i].rules[j].style.cssText;
-
//alert(a + " --> " + b);
-
//document.body.innerHTML += a + " --> " + b + "<Br>";
-
// Ignore non-style entries
-
if (!a || !b) continue;
-
-
// Id: These are added to the document style sheet but are not
-
// available in the style dropdown
-
if (a.indexOf("#") != -1)
-
{
-
continue;
-
}
-
-
// Class: Append a cless element to the style list
-
if (a.indexOf(".") == 0)
-
{
-
styleList[styleList.length] = [a.substr(1), "Class " + a, 1];
-
//alert('Adding class '+a);
-
}
-
-
// SubClass: Append the sub-class to the style list
-
else if(a.indexOf(".") > 0)
-
{
-
l = a.split(".");
-
styleList[styleList.length] = [l[1], a, 1];
-
}
-
-
// Otherwise, assume it's a tag and select the existing tag entry
-
// in the style list.
-
else
-
{
-
styleList[styleList.length] = [a, a.toLowerCase(), 1];
-
}
-
}
-
}
-
-
for (var i = 0; i < styleList.length; i++)
-
{
-
var oOption = document.createElement("OPTION");
-
if (styleList[i][0]) oOption.value = styleList[i][0];
-
oOption.text = styleList[i][1];
-
oOption.style.backgroundColor = 'white';
-
// Choose the combobox, in this case cmbFontStyle
-
if(document.all.cmbFontStyle)
-
{
-
document.all.cmbFontStyle.add(oOption);
-
}
-
}
-
}
\ No newline at end of file
Property changes on: trunk/admin/editor/FCKeditor/js/fck_editor.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/listview/listview.js
===================================================================
--- trunk/admin/listview/listview.js (revision 766)
+++ trunk/admin/listview/listview.js (revision 767)
@@ -1,237 +1,241 @@
var lcp = 0;
var cbContainers = new Array();
getEventSrcElement = window.event ? function(e){var targ=e.target;return targ.nodeType==1?targ:targ.parentNode} : function() {return event.srcElement}
function initSelectiorContainers()
{
var selectorType;
var inputs = document.getElementsByTagName("INPUT");
for (var i = 0; i < inputs.length; i++)
if (inputs[i].getAttribute("isSelector"))
{
selectorType = inputs[i].type;
break;
}
if (!selectorType) return;
for (var i = 0; i < inputs.length; i++)
if (inputs[i].type == selectorType && inputs[i].getAttribute("isSelector"))
{
var container = inputs[i].parentNode.parentNode;
inputs[i].container = container;
container.chB = inputs[i];
cbContainers[cbContainers.length] = container;
inputs[i].checked=false;
if (selectorType != "radio")
container.chB.onclick = function(e)
{
this.lcp = lcp++;
eval(this.getAttribute("onclicksrc"));
var evt = (e) ? e : window.event;
if (!evt) return;
evt.cancelBubble = true;
}
else container.chB.onclick = container.onclick;
container.chB.onclickA = function()
{
eval(this.getAttribute("onclicksrc"));
}
container.onclick = function(e)
{
var evt = (e) ? e : window.event;
if (!evt) return;
if (evt.ctrlKey && selectorType != "radio")
{
this.chB.checked = !this.chB.checked;
this.chB.onclick();
if (document.selection) document.selection.empty();
return;
}
if (evt.shiftKey && selectorType != "radio")
{
var maxLcp = 0;
var maxIndex = 0;
var cIndex = 0;
for (var i = 0; i < cbContainers.length; i++)
{
if (cbContainers[i].chB.lcp > maxLcp)
{
maxLcp = cbContainers[i].chB.lcp;
maxIndex = i;
}
if (cbContainers[i] == this) cIndex = i;
}
for (var i = 0; i < cbContainers.length; i++)
{
var cChb = (i <= cIndex && i >= maxIndex && maxIndex <= cIndex || i >= cIndex && i <= maxIndex && maxIndex > cIndex);
if (cChb != cbContainers[i].chB.checked)
{
cbContainers[i].chB.checked = cChb;
cbContainers[i].chB.onclickA();
}
}
if (document.selection) document.selection.empty();
return;
}
selectAll(false);
this.chB.checked = !this.chB.checked;
if (selectorType != "radio") this.chB.onclick()
else
{
var checkArray;
this.chB.onclickA();
for (var i = 0; i < cbContainers.length; i++)
if (this.id != cbContainers[i].id)
{
var rowId = cbContainers[i].chB.getAttribute('rowId')
try
{
if (!checkArray) checkArray = eval(cbContainers[i].chB.getAttribute('checkArrayName'))
}
catch (err)
{
}
checkArray.CheckValues[rowId]=0;
cbContainers[i].className = "table_color" + (i % 2 + 1);
}
if (checkArray) checkArray.itemschecked = (this.chB.checked) ? 1 : 0;
}
}
container.ondblclick = function(e)
{ if (selectorType == "radio") return;
selectAll(false);
if (this.chB.checked != true) this.chB.checked = true;
this.chB.onclick();
handleDoubleClick();
}
container.oncontextmenu = function(e)
- { if (selectorType == "radio") return;
- var evt = (e) ? e : window.event;
- if (!evt) return;
- evt.cancelBubble = true;
- evt.returnValue = false;
+ {
+ if (selectorType == "radio") return;
+ var evt = (!document.all) ? e : event;
+ if(evt)
+ {
+ evt.cancelBubble = true;
+ evt.returnValue = false;
+ }
if (!this.chB.checked)
{
selectAll(false);
this.chB.checked = !this.chB.checked;
this.chB.onclick();
}
- showContextMenu();
+
+ showContextMenu(evt);
return false;
}
}
document.onkeydown = function(e)
{ if (selectorType == "radio") return;
var evt = (e) ? e : window.event;
if (!evt) return;
var keyCode = (e) ? e.which : window.event.keyCode;
if (keyCode == 65 && evt.ctrlKey)
{
selectAll(true)
if (document.selection) document.selection.empty();
evt.returnValue = false;
evt.cancelBubble = true;
return false;
}
}
}
function selectAll(value)
{
for (var i = 0; i < cbContainers.length; i++)
if (value != cbContainers[i].chB.checked)
{
cbContainers[i].chB.checked = value;
cbContainers[i].chB.onclickA();
}
}
-function showContextMenu()
+function showContextMenu(evt)
{
- if(initContextMenu())
+ if(initContextMenu(evt.clientX,evt.clientY+document.body.scrollTop))
{
- window.FW_showMenu(window.contextMenu,window.event.clientX,window.event.clientY);
- window.event.returnValue = false;
- window.event.cancelBubble = true;
+ window.FW_showMenu(window.contextMenu,evt.clientX,evt.clientY+document.body.scrollTop);
+ evt.returnValue = false;
+ evt.cancelBubble = true;
}
return false;
}
//unchanged
function ShowViewMenu()
{
button = document.getElementById('viewmenubutton');
if(button)
{
x = getRealLeft(button);
y = getRealTop(button);
fwLoadMenus();
window.FW_showMenu(window.view_menu,x,y+32);
}
return false;
}
//This overrides the function in tabs.js for use in lists
function edit_submit(formname, status_field, targetURL, save_value,env_str)
{
var full_env = env;
if( HasParam(env_str) ) full_env += env_str;
if(full_env.substr(0,3) != "env") full_env = 'env='+full_env;
var URLPrefix = '';
if( targetURL.substring(0, rootURL.length) != rootURL ) URLPrefix = rootURL;
var loc = URLPrefix + targetURL + '?' + full_env;
document.location = loc;
}
function HandleKeyPress(e)
{
alert(e.which);
}
// Event Handling Stuff Cross-Browser
getEvent = window.Event
? function(e){return e}
: function() {return event}
getEventSrcElement = window.Event
? function(e){var targ=e.target;return targ.nodeType==1?targ:targ.parentNode}
: function() {return event.srcElement}
function getKeyCode(e){return e.charCode||e.keyCode}
function getKey(eMoz)
{
var e = getEvent(eMoz)
var keyCode = getKeyCode(e)
if(keyCode == 13)
{
var el = document.getElementById('imgSearch');
el.onclick();
}
}
d = document.getElementById('ListSearchWord');
if(d) d.onkeyup = getKey
Property changes on: trunk/admin/listview/listview.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property
Event Timeline
Log In to Comment