You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:14
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14991 Modified Files: index.php Log Message: Added custom styles for pages Added style selection for the adminCP Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** index.php 5 May 2007 20:12:57 -0000 1.66 --- index.php 4 Jun 2007 21:14:02 -0000 1.67 *************** *** 25,28 **** --- 25,35 ---- // + // Load and instatiate page and block classes + // + $mx_page = new mx_page(); + $mx_page->init( $page_id ); + $mx_block = new mx_block(); + + // // Start session, user and style (template + theme) management // - populate $userdata, $lang, $theme, $images and initiate $template. *************** *** 41,51 **** // - // Load and instatiate page and block classes - // - $mx_page = new mx_page(); - $mx_page->init( $page_id ); - $mx_block = new mx_block(); - - // // Show copyrights // --- 48,51 ---- |
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:14
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14991/admin Modified Files: admin_mx_page_cp.php admin_mx_portal.php Log Message: Added custom styles for pages Added style selection for the adminCP Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** admin_mx_portal.php 13 May 2007 20:33:03 -0000 1.31 --- admin_mx_portal.php 4 Jun 2007 21:14:01 -0000 1.32 *************** *** 39,42 **** --- 39,45 ---- $new['portal_url'] = $mx_request_vars->post('portal_url', MX_TYPE_NO_TAGS, ''); $new['portal_phpbb_url'] = $mx_request_vars->post('portal_phpbb_url', MX_TYPE_NO_TAGS, ''); + $new['default_admin_style'] = $mx_request_vars->post('mx_default_admin_style', MX_TYPE_NO_TAGS, '-1'); + $new['default_style'] = $mx_request_vars->post('mx_default_style', MX_TYPE_NO_TAGS, '-1'); + $new['override_user_style'] = $mx_request_vars->post('mx_override_user_style', MX_TYPE_NO_TAGS, '1'); $new['overall_header'] = $mx_request_vars->post('overall_header', MX_TYPE_NO_TAGS, 'overall_header.tpl'); $new['overall_footer'] = $mx_request_vars->post('overall_footer', MX_TYPE_NO_TAGS, 'overall_footer.tpl'); *************** *** 51,54 **** --- 54,60 ---- portal_url = '" . str_replace("\'", "''", $new['portal_url']) . "', portal_phpbb_url = '" . str_replace("\'", "''", $new['portal_phpbb_url']) . "', + default_admin_style = '" . str_replace("\'", "''", $new['default_admin_style']) . "', + default_style = '" . str_replace("\'", "''", $new['default_style']) . "', + override_user_style = '" . str_replace("\'", "''", $new['override_user_style']) . "', overall_header = '" . str_replace("\'", "''", $new['overall_header']) . "', overall_footer = '" . str_replace("\'", "''", $new['overall_footer']) . "', *************** *** 90,93 **** --- 96,109 ---- $phpbb_server_name = $board_config['server_name']; + // Default to phpBB default + $portal_config['default_admin_style'] = $portal_config['default_admin_style'] == -1 ? $board_config['default_style'] : $portal_config['default_admin_style']; + $portal_config['default_style'] = $portal_config['default_style'] == -1 ? $board_config['default_style'] : $portal_config['default_style']; + $portal_config['override_user_style'] = $portal_config['override_user_style'] == -1 ? $board_config['override_user_style'] : $portal_config['override_user_style']; + + $style_select = mx_style_select($portal_config['default_style'], 'mx_default_style'); + $style_admin_select = mx_style_select($portal_config['default_admin_style'], 'mx_default_admin_style'); + $override_user_style_yes = ( $portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; + $override_user_style_no = ( !$portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; + $template->assign_vars(array( "S_CONFIG_ACTION" => append_sid("admin_mx_portal.$phpEx"), *************** *** 100,103 **** --- 116,120 ---- "L_GENERAL_SETTINGS" => $lang['Portal_General_settings'], "L_GENERAL_CONFIG_INFO" => $lang['Portal_General_config_info'] . "<br />" . $lang['Portal_General_config_info_explain'], + "L_STYLE_SETTINGS" => $lang['Portal_Style_settings'], "L_PORTAL_NAME" => $lang['Portal_Name'], *************** *** 145,148 **** --- 162,175 ---- "MX_USE_CACHE" => $portal_config['mx_use_cache'], + "L_DEFAULT_STYLE" => $lang['Default_style'], + "L_DEFAULT_ADMIN_STYLE" => $lang['Default_admin_style'], + "L_OVERRIDE_STYLE" => $lang['Override_style'], + "L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'], + + "STYLE_SELECT" => $style_select, + "ADMIN_STYLE_SELECT" => $style_admin_select, + "OVERRIDE_STYLE_YES" => $override_user_style_yes, + "OVERRIDE_STYLE_NO" => $override_user_style_no, + "L_MX_MOD_REWRITE" => $lang['Mx_mod_rewrite'], "L_MX_MOD_REWRITE_EXPLAIN" => $lang['Mx_mod_rewrite_explain'], Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** admin_mx_page_cp.php 13 May 2007 20:33:03 -0000 1.22 --- admin_mx_page_cp.php 4 Jun 2007 21:14:01 -0000 1.23 *************** *** 251,254 **** --- 251,257 ---- 'L_PAGE_ID' => empty($lang['Page_Id']) ? "Page Id" : $lang['Page_Id'], 'L_PAGE_ICON' => empty($lang['Page_icon']) ? "Page Icon" : $lang['Page_icon'], + "L_DEFAULT_STYLE" => empty($lang['Default_page_style']) ? "Default page style" : $lang['Default_page_style'], + "L_OVERRIDE_STYLE" => empty($lang['Override_page_style']) ? "Override page style" : $lang['Override_page_style'], + "L_OVERRIDE_STYLE_EXPLAIN" => empty($lang['Override_page_style_explain']) ? "Override page style explain" : $lang['Override_page_style_explain'], 'L_PAGE_HEADER' => empty($lang['Page_header']) ? "Page header file" : $lang['Page_header'], 'L_PAGE_FOOTER' => empty($lang['Page_footer']) ? "Page footer file" : $lang['Page_footer'], *************** *** 670,673 **** --- 673,682 ---- $navigation_block_list = get_list_formatted('block_list', $page_rows[$page_count]['navigation_block'], 'navigation_block', 'mx_menu_nav.php'); + $style_select = mx_style_select($page_rows[$page_count]['default_style'], 'mx_default_style', 'templates', true); + + $override_user_style_yes = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == 1 ? "checked=\"checked\"" : "" ) : ""; + $override_user_style_no = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == 0 ? "checked=\"checked\"" : "" ) : ""; + $override_user_style_default = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == -1 ? "checked=\"checked\"" : "" ) : "checked=\"checked\""; + $icon_tmp = ( !empty($page_icon) && $page_icon != 'none' && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . "images/page_icons/" . $page_icon)) ? '<img align="absmiddle" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . "images/page_icons/" . $page_icon . '" />' : ''; *************** *** 753,756 **** --- 762,773 ---- // + // Style + // + "STYLE_SELECT" => $style_select, + "OVERRIDE_STYLE_YES" => $override_user_style_yes, + "OVERRIDE_STYLE_NO" => $override_user_style_no, + "OVERRIDE_STYLE_DEFAULT" => $override_user_style_default, + + // // IP filter // |
|
From: Jon O. <jon...@us...> - 2007-06-03 20:42:34
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18641 Modified Files: db_install.php db_upgrade.php Log Message: fix Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** db_install.php 30 Jan 2007 16:26:09 -0000 1.29 --- db_install.php 3 Jun 2007 20:42:20 -0000 1.30 *************** *** 30,34 **** } ! $mx_module_version = '2.2.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** db_upgrade.php 30 Jan 2007 16:26:09 -0000 1.23 --- db_upgrade.php 3 Jun 2007 20:42:20 -0000 1.24 *************** *** 30,34 **** } ! $mx_module_version = '2.2.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2007-06-03 20:42:34
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18641/pafiledb/includes Modified Files: functions_pafiledb.php Log Message: fix Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** functions_pafiledb.php 28 Apr 2007 19:57:58 -0000 1.45 --- functions_pafiledb.php 3 Jun 2007 20:42:21 -0000 1.46 *************** *** 1609,1613 **** else { ! $message = $lang['Rerror'] . "<br /><br />" . sprintf( $lang['Click_return'], "<a href=\"" . append_sid( linkdb_this_mxurl( "action=link&link_id=$file_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 1609,1613 ---- else { ! $message = $lang['Rerror'] . "<br /><br />" . sprintf( $lang['Click_return'], "<a href=\"" . append_sid( $this->this_mxurl( "action=link&link_id=$file_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:59:15
|
Update of /cvsroot/mxbb/mx_sitestats In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv550 Modified Files: db_install.php Log Message: fix Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/db_install.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** db_install.php 12 Sep 2006 19:34:15 -0000 1.9 --- db_install.php 2 Jun 2007 21:58:40 -0000 1.10 *************** *** 57,61 **** "DROP TABLE IF EXISTS " . SITESTATS_REFERER_TABLE, "CREATE TABLE " . SITESTATS_REFERER_TABLE . " ( ! id INT(11) DEFAULT '0' NOT NULL auto_increment, host VARCHAR(255) DEFAULT '' NOT NULL, hits INT(11) DEFAULT '0' NOT NULL, --- 57,61 ---- "DROP TABLE IF EXISTS " . SITESTATS_REFERER_TABLE, "CREATE TABLE " . SITESTATS_REFERER_TABLE . " ( ! id INT(11) DEFAULT '0' NOT NULL, host VARCHAR(255) DEFAULT '' NOT NULL, hits INT(11) DEFAULT '0' NOT NULL, |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:59:15
|
Update of /cvsroot/mxbb/mx_sitestats/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv550/templates/subSilver Modified Files: sitestats_toptopics_body.tpl Log Message: fix Index: sitestats_toptopics_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/templates/subSilver/sitestats_toptopics_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sitestats_toptopics_body.tpl 5 Apr 2006 21:38:55 -0000 1.2 --- sitestats_toptopics_body.tpl 2 Jun 2007 21:58:40 -0000 1.3 *************** *** 3,12 **** <td width="50%" valign="top" style="padding-right:2px;"> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline"> ! <tr> <th class="thHead" align="center"> {L_TITLE1} </th> </tr> ! <tr> <td> --- 3,12 ---- <td width="50%" valign="top" style="padding-right:2px;"> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline" style="border-top:none;"> ! <tr> <th class="thHead" align="center"> {L_TITLE1} </th> </tr> ! <tr> <td> *************** *** 32,36 **** <td width="50%" valign="top" style="padding-left:2px;"> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline"> <tr> <th class="thHead" align="center"> {L_TITLE2} </th> --- 32,36 ---- <td width="50%" valign="top" style="padding-left:2px;"> ! <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline" style="border-top:none;"> <tr> <th class="thHead" align="center"> {L_TITLE2} </th> |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:43:29
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/plugins In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24871 Added Files: .htaccess Log Message: ADDED --- NEW FILE: .htaccess --- allow from all |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:42:21
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/js In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24344 Modified Files: init_view.js management.js.php Log Message: updated Index: init_view.js =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/js/init_view.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** init_view.js 2 Jun 2007 20:37:56 -0000 1.3 --- init_view.js 2 Jun 2007 21:42:17 -0000 1.4 *************** *** 68,83 **** var initialLocation = dhtmlHistory.getCurrentLocation(); - // The App has received a standard GET url - if (articlePath != '') - { - initialLocation = articlePath; - } // if no location specified, use the default ! else if ((initialLocation == '' || initialLocation == null) && tree.allNodes[0]) { if (tree.allNodes[0].childNodes) { // First set default, then loop to find real document queryPath = tree.allNodes[0].id; - for (var i = 0; i < tree.allNodes[0].childNodes.length; i++) { if (tree.allNodes[0].childNodes[i].isDocument()) { --- 68,77 ---- var initialLocation = dhtmlHistory.getCurrentLocation(); // if no location specified, use the default ! if ((initialLocation == '' || initialLocation == null) && tree.allNodes[0]) { if (tree.allNodes[0].childNodes) { // First set default, then loop to find real document queryPath = tree.allNodes[0].id; for (var i = 0; i < tree.allNodes[0].childNodes.length; i++) { if (tree.allNodes[0].childNodes[i].isDocument()) { *************** *** 100,104 **** } } - } --- 94,97 ---- Index: management.js.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/js/management.js.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** management.js.php 2 Jun 2007 20:37:56 -0000 1.5 --- management.js.php 2 Jun 2007 21:42:17 -0000 1.6 *************** *** 42,58 **** } ! //var tabsLoading = new Fader("tabs-loading"); ! //var tabsSaving = new Fader("tabs-saving"); //var AjaxRequest = new AjaxRequest(); ! ! //function tabsLoadingOn() { document.getElementById("tabs-loading").style.display = "block"; tabsLoading.start(); } ! function tabsLoadingOn() { } ! //function tabsLoadingOff() { document.getElementById("tabs-loading").style.display = "none"; tabsLoading.stop(); } ! function tabsLoadingOff() { } ! //function tabsSavingOn() { document.getElementById("tabs-saving").style.display = "block"; tabsSaving.start(); } ! function tabsSavingOn() { } ! //function tabsSavingOff() { document.getElementById("tabs-saving").style.display = "none"; tabsSaving.stop(); } ! function tabsSavingOff() { } function documentInfo() { --- 42,53 ---- } ! var tabsLoading = new Fader("tabs-loading"); ! var tabsSaving = new Fader("tabs-saving"); //var AjaxRequest = new AjaxRequest(); ! function tabsLoadingOn() { document.getElementById("tabs-loading").style.display = "block"; tabsLoading.start(); } ! function tabsLoadingOff() { document.getElementById("tabs-loading").style.display = "none"; tabsLoading.stop(); } ! function tabsSavingOn() { document.getElementById("tabs-saving").style.display = "block"; tabsSaving.start(); } ! function tabsSavingOff() { document.getElementById("tabs-saving").style.display = "none"; tabsSaving.stop(); } function documentInfo() { *************** *** 139,145 **** AjaxRequest.get( { ! 'url':'modules/mx_kb/kb/modules/tabs/kb__tab-view.php' ! ,'parameters':{ 'mode':'article', 'k': escape(treeGetId().substr(treeGetId().lastIndexOf("/")+1)), 'id': escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ! ,'onLoading':function() { clearTabs(); tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = stripBodyHtml(req.responseText); generateParentTOC('view'); generateTOC('view');} --- 134,140 ---- AjaxRequest.get( { ! 'url':'modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-view-publish.php' ! ,'parameters':{ 'id': escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ! ,'onLoading':function() { el('tabs-data').innerHTML = ""; tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = stripBodyHtml(req.responseText); generateParentTOC('view'); generateTOC('view');} *************** *** 182,186 **** } - // The top right toc // this snippet doesn't work if there is a folder named "html" // Only used when the doc is generated as part of the app - inline (scripts are stripped in plain code) --- 177,180 ---- *************** *** 231,235 **** } - // ?? // this snippet doesn't work if there is a folder named "html" // Only used when the doc is generated as part of the app - inline (scripts are stripped in plain code) --- 225,228 ---- *************** *** 242,247 **** if(!document.getElementById("sectioncontents")) { ! //document.getElementById("tabs-data").innerHTML = addTocDiv(''); ! document.getElementById("tabs-data").innerHTML = addTocDiv(document.getElementById("tabs-data").innerHTML); } --- 235,239 ---- if(!document.getElementById("sectioncontents")) { ! document.getElementById("tabs-data").innerHTML = addTocDiv(''); } *************** *** 335,341 **** function clearTabs() { ! if(el('tab1')) {el('tab1').className = "tab";} ! if(el('tab2')) {el('tab2').className = "tab right";} ! if(el('tabs-data')) {el('tabs-data').innerHTML = "";} } --- 327,333 ---- function clearTabs() { ! el('tab1').className = "tab"; ! el('tab2').className = "tab right"; ! el('tabs-data').innerHTML = ""; } |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:41:36
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23804 Modified Files: .htaccess Log Message: updated Index: .htaccess =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/.htaccess,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .htaccess 17 Jun 2006 22:16:39 -0000 1.1 --- .htaccess 2 Jun 2007 21:41:31 -0000 1.2 *************** *** 1 **** ! deny from all --- 1 ---- ! allow from all |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:05:26
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulTabs In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651/XulTabs Added Files: XulTabs.css.php XulTabs.js Log Message: added --- NEW FILE: XulTabs.js --- // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | // +--------------------------------------------------------------------+ // | XulTabs.js | // | Automatic tabs creation. | // +--------------------------------------------------------------------+ // | Author: Cezary Tomczak [www.gosu.pl] | // | Project: SimpleDoc | // | URL: http://gosu.pl/php/simpledoc.html | // | License: GPL | // +--------------------------------------------------------------------+ function XulTabs(id) { this.init = function() { this.parse(document.getElementById(this.id).childNodes); if (this.tabs != this.data) { alert("XulTabs.init() failed, tabs="+this.tabs+", data="+this.data); } }; this.parse = function(nodes) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (/tab/.test(nodes[i].className)) { nodes[i].id = this.id+"-"+this.tabs; nodes[i].onclick = click; this.tabs++; } if (/data/.test(nodes[i].className)) { nodes[i].id = this.id+"-"+this.data+"-data"; this.data++; } if (nodes[i].childNodes) { this.parse(nodes[i].childNodes); } } }; this.show = function(id) { this.hide(); document.getElementById(id).className = document.getElementById(id).className.replace(/tab/, "tab-active"); document.getElementById(id+"-data").style.display = "block"; this.active = id; }; this.hide = function() { if (this.active) { document.getElementById(this.active).className = document.getElementById(this.active).className.replace(/tab-active/, "tab"); document.getElementById(this.active+"-data").style.display = "none"; this.active = ""; } }; function click() { self.show(this.id); this.blur(); } var self = this; this.id = id; this.active = ""; this.tabs = 0; this.data = 0; } --- NEW FILE: XulTabs.css.php --- /* SimpleDoc [www.gosu.pl], style for tabs */ .XulTabs .wrap1 { height: 23px; } .XulTabs .wrap1 td { vertical-align: bottom; } .XulTabs .tab, .XulTabs .tab:hover, .XulTabs .tab-active, .XulTabs .tab-active:hover { text-decoration: none; padding: 3px 10px 3px 10px; border-top: 1px solid #91A7B4; border-left: 1px solid #919B9C; color: #000000; cursor: default; white-space: nowrap; display: block; } .XulTabs .tab:hover { border-top: 2px solid #FFC73C; padding-top: 2px; } .XulTabs .tab-active, .XulTabs .tab-active:hover { border-top: 3px solid #FFC73C; padding-top: 2px; padding-bottom: 4px; font-weight: bold; } .XulTabs .view { border-right: 1px solid #919B9C; } .XulTabs .content { border: 1px solid #919B9C; background: #ffffff; width: 100%; height: 100%; } .XulTabs .wrap2 { vertical-align: top; padding: 15px; } .XulTabs .data { display: none; } * html .XulTabs .tab, * html .XulTabs .tab:hover, * html .XulTabs .tab-active, * html .XulTabs .tab-active:hover { width: 100%; } |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:05:26
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulMenu/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651/XulMenu/images Added Files: arrow1.gif arrow2.gif Log Message: added --- NEW FILE: arrow2.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow1.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:05:25
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulMenu In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651/XulMenu Added Files: XulMenu.css.php XulMenu.js ie5.js Log Message: added --- NEW FILE: XulMenu.css.php --- .XulMenu { font-family: georgia, tahoma, verdana; font-size: 11px; -moz-user-select: none; } .XulMenu .button, .XulMenu .button:hover, .XulMenu .button-active, .XulMenu .button-active:hover { line-height: normal; padding: 4px 8px 3px 8px; border: 1px solid #ECE9D8; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .button:hover { border-color: #ffffff #ACA899 #ACA899 #ffffff; } .XulMenu .button-active, .XulMenu .button-active:hover { border-color: #ACA899 #ffffff #ffffff #ACA899; } .XulMenu .item, .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #ffffff; line-height: normal; padding: 3px 30px 3px 20px; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #316AC5; color: #ffffff; } .XulMenu .section { background: #ffffff; border: 1px solid; border-color: #F1EFE2 #716F64 #716F64 #F1EFE2; padding: 2px 1px 1px 2px; position: absolute; visibility: hidden; z-index: -1; margin-top: 25px; } .XulMenu .arrow { position: absolute; top: 7px; right: 8px; border: 0; } .XulMenu .hr { font-size: 0px; border-width: 1px; border-color: #aca899; border-style: solid none none none; margin-top: 2px; margin-bottom: 2px; margin-left: 4px; margin-right: 4px; } * html .XulMenu td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: ie5.js --- // +----------------------------------------------------------------+ // | Array functions that are missing in IE 5.0 | // | Author: Cezary Tomczak [www.gosu.pl] | // | Free for any use as long as all copyright messages are intact. | // +----------------------------------------------------------------+ // Removes the last element from an array and returns that element. if (!Array.prototype.pop) { Array.prototype.pop = function() { var last; if (this.length) { last = this[this.length - 1]; this.length -= 1; } return last; }; } // Adds one or more elements to the end of an array and returns the new length of the array. if (!Array.prototype.push) { Array.prototype.push = function() { for (var i = 0; i < arguments.length; ++i) { this[this.length] = arguments[i]; } return this.length; }; } // Removes the first element from an array and returns that element. if (!Array.prototype.shift) { Array.prototype.shift = function() { var first; if (this.length) { first = this[0]; for (var i = 0; i < this.length - 1; ++i) { this[i] = this[i + 1]; } this.length -= 1; } return first; }; } // Adds one or more elements to the front of an array and returns the new length of the array. if (!Array.prototype.unshift) { Array.prototype.unshift = function() { if (arguments.length) { var i, len = arguments.length; for (i = this.length + len - 1; i >= len; --i) { this[i] = this[i - len]; } for (i = 0; i < len; ++i) { this[i] = arguments[i]; } } return this.length; }; } // Adds and/or removes elements from an array. if (!Array.prototype.splice) { Array.prototype.splice = function(index, howMany) { var elements = [], removed = [], i; for (i = 2; i < arguments.length; ++i) { elements.push(arguments[i]); } for (i = index; (i < index + howMany) && (i < this.length); ++i) { removed.push(this[i]); } for (i = index + howMany; i < this.length; ++i) { this[i - howMany] = this[i]; } this.length -= removed.length; for (i = this.length + elements.length - 1; i >= index + elements.length; --i) { this[i] = this[i - elements.length]; } for (i = 0; i < elements.length; ++i) { this[index + i] = elements[i]; } return removed; }; } --- NEW FILE: XulMenu.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.4.0 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ /* This code has been modified a little to get it work with SimpleDoc the way I wanted */ function XulMenu(id) { this.type = "horizontal"; this.position = { "level1": { "top": 0, "left": 0}, "levelX": { "top": 0, "left": 0} } this.zIndex = { "visible": 1, "hidden": -1 } this.arrow1 = null; this.arrow2 = null; /* Initialize the menu */ this.init = function() { if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. XulMenu cannot be initialized."); if (this.type != "horizontal" && this.type != "vertical") { return alert("XulMenu.init() failed. Unknown menu type: '"+this.type+"'"); } document.onmousedown = click; if (!document.all) { this.fixSections(); } this.parse(document.getElementById(this.id).childNodes, this.tree, this.id); } /* Search for .section elements and set width for them */ this.fixSections = function() { var arr = document.getElementById(this.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]); } } for (var i = 0; i < sections.length; i++) { widths.push(this.getMaxWidth(sections[i].childNodes)); } for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px"; } } /* Search for an element with highest width, return that width */ this.getMaxWidth = function(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue; } if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth; } return maxWidth; } /* Parse menu structure, create events, position elements */ this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue }; switch (nodes[i].className) { case "button": nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = buttonOver; nodes[i].onclick = buttonClick; break; case "item": nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; nodes[i].onclick = itemClick; break; case "section": nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px"; } else if (this.type == "vertical") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px"; } } else { box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px"; box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px"; } break; case "arrow": nodes[i].id = id + "-" + (tree.length - 1) + "-arrow"; break; } if (nodes[i].childNodes) { if (nodes[i].className == "section") { this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1)); } else { this.parse(nodes[i].childNodes, tree, id); } } } } /* Hide all sections */ this.hideAll = function() { for (var i = this.visible.length - 1; i >= 0; i--) { this.hide(this.visible[i]); } } /* Hide higher or equal levels */ this.hideHigherOrEqualLevels = function(n) { for (var i = this.visible.length - 1; i >= 0; i--) { var el = new Element(this.visible[i]); if (el.level >= n) { this.hide(el.id); } else { return; } } } /* Hide a section */ this.hide = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button" : "item"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow1; } document.getElementById(id + "-section").style.visibility = "hidden"; document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden; if (this.visible.contains(id)) { if (this.visible.getLast() == id) { this.visible.pop(); } else { throw "XulMenu.hide("+id+") failed, trying to hide element that is not deepest visible element"; } } else { throw "XulMenu.hide("+id+") failed, cannot hide element that is not visible"; } } /* Show a section */ this.show = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow2; } document.getElementById(id + "-section").style.visibility = "visible"; document.getElementById(id + "-section").style.zIndex = this.zIndex.visible; this.visible.push(id); } /* event, document.onmousedown */ function click(e) { var el = null; if (e) { el = e.target.tagName ? e.target : e.target.parentNode; } else { el = window.event.srcElement; } if (!self.visible.length) { return }; if (!el.onclick) { self.hideAll(); } } /* event, button.onmouseover */ function buttonOver() { if (!self.visible.length) { return; } if (self.visible.contains(this.id)) { return }; self.hideAll(); var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id); } } /* event, button.onclick */ function buttonClick() { this.blur(); if (self.visible.length) { self.hideAll(); } else { var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id); } } } /* event, item.onmouseover */ function itemOver() { var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id); } } /* event, item.onmouseout */ function itemOut() { var el = new Element(this.id); if (!el.hasChilds()) { document.getElementById(this.id).className = "item"; } } /* event, item.onclick */ function itemClick() { this.blur(); var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id); } } function Element(id) { /* Get Level of given id * Examples: menu-1 (1 level), menu-1-4 (2 level) */ this.getLevel = function() { var s = this.id.substr(this.menu.id.length); return s.substrCount("-"); } /* Check whether an element has a sub-section */ this.hasChilds = function() { return Boolean(document.getElementById(this.id + "-section")); } if (!id) { throw "XulMenu.Element(id) failed, id cannot be empty"; } this.menu = self; this.id = id; this.level = this.getLevel(); } this.id = id; var self = this; this.tree = new Array(); /* Multidimensional array, structure of the menu */ this.visible = new Array(); /* Example: Array("menu-0", "menu-0-4", ...), succession is important ! */ } |
Update of /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651/DynamicTree/images Added Files: delete.gif insert.gif moveDown.gif moveLeft.gif moveRight.gif moveUp.gif tree-branch.gif tree-doc.gif tree-folder-open.gif tree-folder.gif tree-leaf-end.gif tree-leaf.gif tree-node-end.gif tree-node-open-end.gif tree-node-open.gif tree-node.gif tree.gif Log Message: added --- NEW FILE: moveDown.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-branch.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node-open-end.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-folder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node-end.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: insert.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-leaf-end.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-leaf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: moveRight.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: moveLeft.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: moveUp.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node-open.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-doc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-folder-open.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: delete.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:05:21
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651/DynamicTree Added Files: DynamicTree.css.php DynamicTree.js DynamicTree.txt Log Message: added --- NEW FILE: DynamicTree.js --- // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | // +--------------------------------------------------------------------+ // | DynamicTree.js | // | Dynamic tree editing and displaying. | // +--------------------------------------------------------------------+ // | Author: Cezary Tomczak [www.gosu.pl] | // | Project: SimpleDoc | // | URL: http://gosu.pl/php/simpledoc.html | // | License: GPL | // +--------------------------------------------------------------------+ /* See also: http://gosu.pl/dhtml/mygosumenu.html */ /* The code has been modified for SimpleDoc specific needs */ /* Object name must be the same as id, ex. var tree = new DynamicTree("tree"); */ function DynamicTree(id) { this.path = "DynamicTree/images/"; this.cookiePath = ""; this.cookieDomain = ""; this.img = { "branch": "tree-branch.gif", "doc": "tree-doc.gif", "folder": "tree-folder.gif", "folderOpen": "tree-folder-open.gif", "leaf": "tree-leaf.gif", "leafEnd": "tree-leaf-end.gif", "node": "tree-node.gif", "nodeEnd": "tree-node-end.gif", "nodeOpen": "tree-node-open.gif", "nodeOpenEnd": "tree-node-open-end.gif" }; this.imgObjects = []; this.init = function() { var img; for (var i in this.img) { img = new Image(); img.src = this.path + this.img[i]; this.imgObjects.push(img); } this.parse(document.getElementById(this.id).childNodes, this.tree, 1); this.loadState(); if (window.addEventListener) { window.addEventListener("unload", function(e) { self.saveState(); }, false); } else if (window.attachEvent) { window.attachEvent("onunload", function(e) { self.saveState(); }); } this.updateHtml(); }; this.parse = function(nodes, tree) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1) { if (!nodes[i].id) { throw "DynamicTree.parse() failed, el.id is empty, el.innerText = '"+(nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "undefined")+"'"; } if (!nodes[i].className) { throw "DynamicTree.parse() failed, el.className is empty, el.innerText = '"+(nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "undefined")+"'"; } var node = new Node(); node.id = nodes[i].id; node.text = (nodes[i].firstChild ? nodes[i].firstChild.nodeValue.trim() : ""); node.parentNode = tree; node.childNodes = (nodes[i].className == "folder" ? new Array() : null); node.isDoc = (nodes[i].className == "doc"); node.isFolder = (nodes[i].className == "folder"); tree.childNodes.push(node); this.allNodes.push(node); } if (nodes[i].nodeType == 1 && nodes[i].childNodes) { this.parse(nodes[i].childNodes, tree.childNodes.getLast()); } } }; this.nodeClick = function(id) { var el = document.getElementById(id+"-section"); var node = document.getElementById(id+"-node"); //var icon = document.getElementById(id+"-icon"); if (el.style.display == "block") { el.style.display = "none"; if (findNode(id).isLast()) { node.src = this.path+"tree-node-end.gif"; } else { node.src = this.path+"tree-node.gif"; } //icon.src = this.path+"tree-folder.gif"; this.opened.removeByValue(id); } else { el.style.display = "block"; if (findNode(id).isLast()) { node.src = this.path+"tree-node-open-end.gif"; } else { node.src = this.path+"tree-node-open.gif"; } //icon.src = this.path+"tree-folder-open.gif"; this.opened.push(id); } if (document.all) setTimeout(this.id+".fixImages('"+id+"')", 50); }; // ie fix, icon & node images disappearing this.fixImages = function(id) { var node = document.getElementById(id+"-node"); //var icon = document.getElementById(id+"-icon"); if (node.outerHTML) node.outerHTML = node.outerHTML; //if (icon.outerHTML) icon.outerHTML = icon.outerHTML; }; this.textClick = function(id) { // bad design ! checkContentSaved(); if (this.active) { document.getElementById(this.active+"-text").className = "text"; } document.getElementById(id+"-text").className = "text-active"; this.active = id; this.textClickListener.call(); }; this.toHtml = function() { var s = ""; var nodes = this.tree.childNodes; for (var i = 0; i < nodes.length; i++) { s += nodes[i].toHtml(); } return s; }; this.updateHtml = function() { document.getElementById(this.id).innerHTML = this.toHtml(); }; this.loadState = function() { var opened = this.getStatesUrl(); if (opened) { this.opened = opened.split("|"); var i, invalid = []; for (i = 0; i < this.opened.length; i++) { if (findNode(this.opened[i])) { var node = findNode(this.opened[i]); if (!node.isFolder || (node.isFolder && !node.childNodes.length)) { invalid.push(node.id); } } else { invalid.push(this.opened[i]); } } for (i = 0; i < invalid.length; i++) { this.opened.removeByValue(invalid[i]); } } }; // // Simulate the loadState cookie behaviour // this.getStatesUrl = function() { if (this.queryPath) { var openedTMP = ''; for (i = 0; i < this.queryPath.split("/").length - 1; i++) { if(i > 0) { openedTMP = openedTMP + "|" + 'tree-' + this.queryPath.split("/")[i-1] + '/' + this.queryPath.split("/")[i]; }else{ openedTMP = 'tree-' + this.queryPath.split("/")[i]; } } return openedTMP; } }; this.saveState = function() { if (this.opened.length) { this.cookie.set("opened", this.opened.join("|"), 3600*24*30); } else { this.clearState(); } }; this.clearState = function() { this.cookie.del("opened"); }; this.mayMoveUp = function() { return this.active && !findNode(this.active).isFirst(); }; this.mayMoveDown = function() { return this.active && !findNode(this.active).isLast(); }; this.mayMoveLeft = function() { return this.active && (findNode(this.active).getLevel() > 1); }; this.mayMoveRight = function() { if (this.active) { var node = findNode(this.active).getNextSibling(); while (node) { if (node.isFolder) { return true; } node = node.getNextSibling(); } } return false; }; this.mayInsertBefore = function() { return Boolean(this.active); }; this.mayInsertAfter = function() { return Boolean(this.active); }; this.mayInsertInside = function() { return this.active && findNode(this.active).isFolder; }; this.mayRemove = function() { if (this.active) { var node = findNode(this.active); if (node.isDoc) { return true; } if (node.isFolder && !node.childNodes.length) { return true; } } return false; }; this.moveUp = function() { var node = findNode(this.active); var index = node.getIndex(); var parent = node.parentNode; parent.removeChild(node); parent.appendChildAtIndex(node, index-1); this.updateHtml(); }; this.moveDown = function() { var node = findNode(this.active); var index = node.getIndex(); var parent = node.parentNode; parent.removeChild(node); parent.appendChildAtIndex(node, index+1); this.updateHtml(); }; this.moveLeft = function() { opened1(); var node = findNode(this.active); var left = node.parentNode; left.removeChild(node); left.parentNode.appendChildAtIndex(node, left.getIndex()); this.active = node.id; opened2(); this.updateHtml(); }; this.moveRight = function() { opened1(); var node = findNode(this.active); var next = node.getNextSibling(); var rightId = null; while (next) { if (next.isFolder) { rightId = next.id; break; } next = next.getNextSibling(); } var right = findNode(rightId); node.parentNode.removeChild(node); if (right.childNodes.length) { right.appendChildAtIndex(node, 0); } else { right.appendChild(node); } this.active = node.id; opened2(); this.updateHtml(); }; this.createNode = function(id, text, type) { id = unescape(id); if (!id || findNode(id) || !text || (type != "doc" && type != "folder")) { throw this.id+'.createNode("'+id+'", "'+text+'", "'+type+'") failed, illegal action'; } var node; if (type == "doc") { node = new Node(id, text, null, null, true, false); } else { node = new Node(id, text, null, new Array(), false, true); } this.allNodes.push(node); return node; }; this.insert = function(name, text, type) { var node = this.createNode("tree-"+name, text, type); if (this.tree.childNodes.length) { this.tree.appendChildAtIndex(node, 0); } else { this.tree.appendChild(node); } this.updateHtml(); }; this.insertBefore = function(name, text, type) { if (!this.mayInsertBefore()) { throw this.id+'.insertBefore() failed, illegal action'; } var active = findNode(this.active); var id = active.parentNode.getRealId() ? active.parentNode.getRealId()+"/"+name : "tree-"+name; var node = this.createNode(id, text, type); active.parentNode.appendChildAtIndex(node, active.getIndex()); this.updateHtml(); }; this.insertAfter = function(name, text, type) { if (!this.mayInsertAfter()) { throw this.id+'.insertAfter() failed, illegal action'; } var active = findNode(this.active); var id = active.parentNode.getRealId() ? active.parentNode.getRealId()+"/"+name : "tree-"+name; var node = this.createNode(id, text, type); if (active.parentNode.childNodes[active.getIndex()+1]) { active.parentNode.appendChildAtIndex(node, active.getIndex()+1); } else { active.parentNode.appendChild(node); } this.updateHtml(); }; this.insertInsideAtStart = function(name, text, type) { if (!this.mayInsertInside()) { throw this.id+'.insertInsideAtStart() failed, illegal action'; } var active = findNode(this.active); var id = active.getRealId() ? active.getRealId()+"/"+name : "tree-"+name; var node = this.createNode(id, text, type); if (active.childNodes.length) { active.appendChildAtIndex(node, 0); } else { active.appendChild(node); } this.updateHtml(); }; this.insertInsideAtEnd = function(name, text, type) { if (!this.mayInsertInside()) { throw this.id+'.insertInsideAtEnd() failed, illegal action'; } var active = findNode(this.active); var id = active.getRealId() ? active.getRealId()+"/"+name : "tree-"+name; var node = this.createNode(id, text, type); active.appendChild(node); this.updateHtml(); }; this.remove = function() { var node = findNode(this.active); node.parentNode.removeChild(node); removeNode(this.active); this.active = ""; this.updateHtml(); }; this.rename = function(product_data) { build_name = product_data.substr(product_data.lastIndexOf(";")+1); product_data = product_data.substr(0,product_data.lastIndexOf(";")); edition_name = product_data.substr(product_data.lastIndexOf(";")+1); product_data = product_data.substr(0,product_data.lastIndexOf(";")); product_name = product_data.substr(product_data.lastIndexOf(";")+1); var build = findNode(this.active); build.text = product_name; if (build.getLevel() > 1) { var edition = build.parentNode; edition.text = edition_name; if (edition.getLevel() > 1) { var product = edition.parentNode; product.text = build_name; } } this.updateHtml(); }; function Node(id, text, parentNode, childNodes, isDoc, isFolder) { this.id = id; this.text = text; this.parentNode = parentNode; this.childNodes = childNodes; this.isDoc = isDoc; this.isFolder = isFolder; this.isDocument = function() { return this.isDoc; } this.isFirst = function() { if (this.parentNode) { return this.parentNode.childNodes[0].id == this.id; } throw "DynamicTree.Node.isFirst() failed, this func cannot be called for the root element"; }; this.isLast = function() { if (this.parentNode) { return this.parentNode.childNodes.getLast().id == this.id; } throw "DynamicTree.Node.isLast() failed, this func cannot be called for the root element"; }; this.getName = function() { if (this.id == "tree") { return ""; } if (this.id.lastIndexOf("/") == -1) { return this.id.substr("tree-".length); } return this.id.substr(this.id.lastIndexOf("/")+1); }; this.getRealId = function() { var ret = this.getName(); var parent = this.parentNode; while (parent) { if (parent.parentNode) { ret = parent.getName() +'/'+ ret; } else { ret = "tree-" + ret; } parent = parent.parentNode; } return ret; }; this.fixIds = function() { this.id = this.getRealId(); if (this.isFolder) { for (var i = 0; i < this.childNodes.length; ++i) { this.childNodes[i].fixIds(); } } }; this.getLevel = function() { var level = 0; var node = this; while (node.parentNode) { level++; node = node.parentNode; } return level; }; this.getNextSibling = function() { if (this.parentNode) { var nodes = this.parentNode.childNodes; var start = false; for (var i = 0; i < nodes.length; i++) { if (start) { return nodes[i]; } if (!start && this.id != nodes[i].id) { continue; } start = true; } return false; } throw "DynamicTree.Node.getNextSibling() failed, this func cannot be called for the root element"; }; this.getPreviousSibling = function() { if (this.parentNode) { var nodes = this.parentNode.childNodes; for (var i = 0; i < nodes.length; i++) { if (nodes[i].id == this.id) { if (i) { return nodes[i-1]; } else { return false; } } } throw "DynamicTree.Node.getPreviousSibling() failed, unknown error"; } throw "DynamicTree.Node.getPreviousSibling() failed, this func cannot be called for the root element"; }; this.getIndex = function() { if (this.parentNode) { var nodes = this.parentNode.childNodes; for (var i = 0; i < nodes.length; i++) { if (nodes[i].id == this.id) { return i; } } throw "DynamicTree.Node.getIndex() failed, unknown error"; } throw "DynamicTree.Node.getIndex() failed, this func cannot be called for the root element"; }; this.removeChild = function(node) { this.childNodes.removeByIndex(node.getIndex()); node.parentNode = null; }; this.appendChild = function(node) { this.childNodes.push(node); node.parentNode = this; node.fixIds(); }; this.appendChildAtIndex = function(node, index) { this.childNodes.pushAtIndex(node, index); node.parentNode = this; node.fixIds(); }; this.toHtml = function() { var s = '<div onselectstart="return false" class="'+(this.isFolder ? "folder" : "doc")+'" id="'+this.id+'">'; if (this.isFolder) { var nodeIcon; if (this.childNodes.length) { nodeIcon = (self.opened.contains(this.id) ? (this.isLast() ? "tree-node-open-end.gif" : "tree-node-open.gif") : (this.isLast() ? "tree-node-end.gif" : "tree-node.gif")); } else { nodeIcon = (this.isLast() ? "tree-leaf-end.gif" : "tree-leaf.gif"); } var icon = ((self.opened.contains(this.id) && this.childNodes.length) ? "tree-folder-open.gif" : "tree-folder.gif"); if (this.childNodes.length) { s += '<a href="javascript:void(0)" onclick="'+self.id+'.nodeClick(\''+this.id+'\'); this.blur();">'; } s += '<img id="'+this.id+'-node" src="'+self.path+nodeIcon+'" width="18" height="18" alt="" />'; if (this.childNodes.length) { s += '</a>'; } //s += '<img id="'+this.id+'-icon" src="'+self.path+icon+'" width="18" height="18" alt="" />'; s += '<span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" '+(this.childNodes.length ? 'ondblclick="'+self.id+'.nodeClick(\''+this.id+'\'); this.blur();"' : "")+' onclick="'+self.id+'.textClick(\''+this.id+'\')">'+this.text+'</span>'; if (this.childNodes.length) { s += '<div class="section'+(this.isLast() ? " last" : "")+'" id="'+this.id+'-section"'; if (self.opened.contains(this.id)) { s += ' style="display: block;"'; } s += '>'; for (var i = 0; i < this.childNodes.length; i++) { s += this.childNodes[i].toHtml(); } s += '</div>'; } } if (this.isDoc) { s += '<img src="'+self.path+(this.isLast() ? "tree-leaf-end.gif" : "tree-leaf.gif")+'" width="18" height="18" alt="" />'; //<img src="'+self.path+'tree-doc.gif" />'; s += '<span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" onclick="'+self.id+'.textClick(\''+this.id+'\')">'+this.text+'</span>'; } s += '</div>'; return s; }; this.toToc = function(parentNode) { var s = ''; s += '<ul>'; if (this.isFolder) { s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" '+(this.childNodes.length ? 'ondblclick="tree.nodeClick(\''+this.id+'\'); this.blur();"' : "")+' onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; if (this.childNodes.length) { for (var i = 0; i < this.childNodes.length; i++) { s += this.childNodes[i].toToc(this.parentNode.id); } } } if (this.isDoc) { s += '<li><a href="javascript:void(0)"><span id="'+this.id+'-text" class="text'+(self.active == this.id ? '-active' : '')+'" onclick="tree.textClick(\''+this.id+'\')">'+this.text+'</span></a></li>'; } if (s != '') { } s += '</ul>'; return s; }; } function Listener() { this.funcs = []; this.add = function(func) { this.funcs.push(func); }; this.call = function() { for (var i = 0; i < this.funcs.length; ++i) { this.funcs[i](); } }; } function findNode(id) { for (var i = 0; i < self.allNodes.length; ++i) { if (self.allNodes[i].id == id) { return self.allNodes[i]; } } return false; } function removeNode(id) { for (var i = 0; i < self.allNodes.length; ++i) { if (self.allNodes[i].id == id) { self.allNodes.splice(i, 1); return true; } } return false; } function opened1() { self.openedNodes = []; for (var i = 0; i < self.opened.length; ++i) { self.openedNodes.push(findNode(self.opened[i])); } } function opened2() { self.opened = []; for (var j = 0; j < self.openedNodes.length; ++j) { self.opened.push(self.openedNodes[j].id); } } this.getActiveNode = function() { if (this.active) { return findNode(this.active); } }; // // Fix for initializing the active entry // this.setActive = function() { // bad design ! checkContentSaved(); if (this.active) { document.getElementById(this.active+"-text").className = "text"; } document.getElementById('tree-' + this.queryPath+"-text").className = "text-active"; this.active = 'tree-' + this.queryPath; this.textClickListener.call(); }; var self = this; this.id = id; this.tree = new Node("tree", "", null, new Array(), false, true); this.allNodes = []; this.opened = []; // opened folders this.openedNodes = []; this.active = ""; // active node, text clicked this.cookie = new Cookie(); this.textClickListener = new Listener(); // other modules also need to know when user clicks on text this.queryPath = ''; } --- NEW FILE: DynamicTree.css.php --- /* SimpleDoc [www.gosu.pl], style for DynamicTree */ .DynamicTree { font-family: georgia, tahoma; font-size: 11px; white-space: nowrap; cursor: default; } .DynamicTree .wrap1, .DynamicTree .actions { -moz-user-select: none; } .DynamicTree a, .DynamicTree a:hover { color: #000000; text-decoration: none; cursor: default; } .DynamicTree .text { padding: 1px; cursor: pointer; } .DynamicTree .text-active { background: #CEE3FF; padding: 1px; cursor: pointer; } .DynamicTree div.folder img, .DynamicTree div.doc img { border: 0; vertical-align: -30%; } * html .DynamicTree .folder img, * html .DynamicTree .doc img { vertical-align: -40%; } .DynamicTree .section { background: url(images/tree-branch.gif) repeat-y; display: none; } .DynamicTree .last { background: none; } .DynamicTree div.folder div.folder { margin-left: 18px; } .DynamicTree div.doc div.doc, .DynamicTree div.folder div.doc { margin-left: 18px; } .DynamicTree ul {} .DynamicTree li.folder {} .DynamicTree li.doc {} .DynamicTree .actions { position: relative; margin-top: 7px; margin-left: 0px; height: 20px; } .DynamicTree .tooltip { position: absolute; line-height: 22px; left: 0px; } .DynamicTree .moveUp, .DynamicTree .moveDown, .DynamicTree .moveLeft, .DynamicTree .moveRight, .DynamicTree .insert, .DynamicTree .remove { width: 20px; height: 20px; display: block; position: absolute; border: 1px solid #F1EFE2; z-index: 5; cursor: default; } .DynamicTree .moveUp:hover, .DynamicTree .moveDown:hover, .DynamicTree .moveLeft:hover, .DynamicTree .moveRight:hover, .DynamicTree .insert:hover, .DynamicTree .remove:hover { background-color: #ffffff; border: 1px solid #ACA899; } .DynamicTree .moveUp { left: 0px; } .DynamicTree .moveDown { left: 25px; } .DynamicTree .moveLeft { left: 50px; } .DynamicTree .moveRight { left: 75px; } .DynamicTree .insert { left: 100px; } .DynamicTree .remove { left: 125px; } .DynamicTree .top { padding-left: 0px; line-height: 20px; color: #333333; border-width: 1px; border-color: #aca899; border-style: none none border-width: 1px; border-color: #aca899; border-style: none none solid none; margin-bottom: 5px;} .DynamicTree .wrap1 { padding: 10px; border: 1px solid #919B9C; width: 148px; } .DynamicTree .wrap2 { margin-left: 2px; } .DynamicTree #tree-insert-form { display: none; margin-top: 1em; } .DynamicTree #tree-insert-form .label { text-align: right; width: 50px; padding-right: 8px; } .DynamicTree #tree-insert-form .input { margin-bottom: 2px; padding-left: 3px; } .DynamicTree #tree-insert-form select { margin-bottom: 2px; } .DynamicTree #tree-insert-form .button { margin-top: 4px; } --- NEW FILE: DynamicTree.txt --- /* API: node.delete node.moveUp node.moveDown node.moveLeft node.moveRight node.insertBefore node.insertAfter node.modify openAll() closeAll() export() import() */ |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:05:18
|
Update of /cvsroot/mxbb/mx_kb/kb/shared In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6651 Added Files: .htaccess index.htm Log Message: added --- NEW FILE: .htaccess --- allow from all --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:04:33
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulMenu/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6201/images Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared/XulMenu/images added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:04:11
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6118/images Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree/images added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:03:58
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulMenu In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5766/XulMenu Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared/XulMenu added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:03:58
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5766/DynamicTree Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared/DynamicTree added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:03:58
|
Update of /cvsroot/mxbb/mx_kb/kb/shared/XulTabs In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5766/XulTabs Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared/XulTabs added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 21:00:32
|
Update of /cvsroot/mxbb/mx_kb/kb/shared In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4369/shared Log Message: Directory /cvsroot/mxbb/mx_kb/kb/shared added to the repository |
Update of /cvsroot/mxbb/mx_kb/kb/includes/js In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2123 Added Files: .htaccess common.js debug.js form.js index.htm init_view.js management.js.php request.js.php Log Message: added --- NEW FILE: form.js --- // Forms, some help functions. // Author: Cezary Tomczak [www.gosu.pl] // submit button must have name "submit" to get this working window.onload = function() { document.forms[0].onsubmit = function() { if (!document.forms[0].submit.disabled) { document.forms[0].submit.disabled = true; return true; } return false; }; }; function isNumber(s) { if (s.length && s.charAt(0) == "-") { return isNumber(s.substr(1)); } if (!(/^[\d.]+$/.test(s))) { return false; } if (s.indexOf(".") != -1 && (s.indexOf(".") != s.lastIndexOf("."))) { return false; } if (s.charAt(0) == ".") { return false; } if (s.length >= 2 && s.charAt(0) == "0" && s.charAt(1) != ".") { return false; } return !isNaN(s); } --- NEW FILE: init_view.js --- function treeGetId() { if (tree.active) { return tree.active.substr("tree-".length); } return ""; } /** RSH must be initialized after the page is finished loading. */ window.onload = initialize; // This updates docs whenever a node is clicked OR updateUI() is called tree.textClickListener.add(function() { if (tree.getActiveNode().isDocument()) { documentView(); dhtmlHistory.add( treeGetId(), el(tree.active+"-text").innerHTML ); queryPath = tree.getActiveNode().id; tree.queryPath = queryPath.replace('tree-', ""); tree.active = queryPath; tree.loadState(); tree.updateHtml(); document.title = el(tree.active+"-text").innerHTML; } else { el('tabs-data').innerHTML = ""; } }); // Activate first doc in the clicked folder tree.textClickListener.add(function() { if (!tree.getActiveNode().isDocument()) { generateParentTOC('view'); dhtmlHistory.add( treeGetId(), el(tree.active+"-text").innerHTML ); //queryPath = tree.getActiveNode().id; //tree.queryPath = queryPath.replace('tree-', ""); //tree.active = queryPath; //tree.loadState(); //tree.updateHtml(); //if (tree.getActiveNode().childNodes) { //for (var i = 0; i < tree.getActiveNode().childNodes.length; i++) { //if (tree.getActiveNode().childNodes[i].isDocument()) { //queryPath = tree.getActiveNode().childNodes[i].id; //tree.queryPath = queryPath.replace('tree-', ""); //tree.active = queryPath; //tree.loadState(); //tree.updateHtml(); //break; //} //} //} } }); function initialize() { // initialize RSH dhtmlHistory.initialize(); // add ourselves as a listener for history change events dhtmlHistory.addListener(handleHistoryChange); if (dhtmlHistory.isFirstLoad()) { // determine our current location so we can initialize ourselves at startup var initialLocation = dhtmlHistory.getCurrentLocation(); // The App has received a standard GET url if (articlePath != '') { initialLocation = articlePath; } // if no location specified, use the default else if ((initialLocation == '' || initialLocation == null) && tree.allNodes[0]) { if (tree.allNodes[0].childNodes) { // First set default, then loop to find real document queryPath = tree.allNodes[0].id; for (var i = 0; i < tree.allNodes[0].childNodes.length; i++) { if (tree.allNodes[0].childNodes[i].isDocument()) { queryPath = tree.allNodes[0].childNodes[i].id; break; } } } else { queryPath = tree.allNodes[0].id; } initialLocation = queryPath.replace('tree-', ""); } // now initialize our starting UI if (tree.allNodes[0]) { updateUI(initialLocation, null); } } } /** A function that is called whenever the user presses the back or forward buttons. This function will be passed the newLocation, as well as any history data we associated with the location. */ function handleHistoryChange(newLocation, historyData) { // use the history data to update our UI updateUI(newLocation, historyData); } /** A simple method that updates our user interface using the new location. */ function updateUI(newLocation, historyData) { //alert('updateUI'); tree.queryPath = newLocation; tree.setActive(); tree.loadState(); tree.updateHtml(); } --- NEW FILE: management.js.php --- <?php //require '../../../config.php'; //$CONFIG['encoding'] is replaced by iso-8859-1 ?> // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | // +--------------------------------------------------------------------+ // | management.js | // | Some functions, stuff for documents & folders management. | // +--------------------------------------------------------------------+ // | Author: Cezary Tomczak [www.gosu.pl] | // | Project: SimpleDoc | // | URL: http://gosu.pl/php/simpledoc.html | // | License: GPL | // +--------------------------------------------------------------------+ function Fader(id) { this.start = function() { this.timerId = setInterval(change, 80); }; this.stop = function() { clearInterval(this.timerId); this.opacity = 80; this.direction = 0; document.getElementById(this.id).style.opacity = 1; document.getElementById(this.id).style.MozOpacity = 1; document.getElementById(this.id).style.filter = 80; }; function change() { self.opacity += (self.direction ? 10 : -10); document.getElementById(self.id).style.opacity = self.opacity/100; document.getElementById(self.id).style.MozOpacity = self.opacity/100; document.getElementById(self.id).style.filter = "alpha(opacity="+self.opacity+")"; if (self.opacity == 20) { self.direction = 1; } if (self.opacity == 80) { self.direction = 0; } } var self = this; this.id = id; this.timerId = null; this.opacity = 80; this.direction = 0; } //var tabsLoading = new Fader("tabs-loading"); //var tabsSaving = new Fader("tabs-saving"); //var AjaxRequest = new AjaxRequest(); //function tabsLoadingOn() { document.getElementById("tabs-loading").style.display = "block"; tabsLoading.start(); } function tabsLoadingOn() { } //function tabsLoadingOff() { document.getElementById("tabs-loading").style.display = "none"; tabsLoading.stop(); } function tabsLoadingOff() { } //function tabsSavingOn() { document.getElementById("tabs-saving").style.display = "block"; tabsSaving.start(); } function tabsSavingOn() { } //function tabsSavingOff() { document.getElementById("tabs-saving").style.display = "none"; tabsSaving.stop(); } function tabsSavingOff() { } function documentInfo() { if (!tree.active || !tree.getActiveNode().isDocument()) { alert("You have to select a document in the Tree View to perform this action."); return; } checkContentSaved(); AjaxRequest.get( { 'url':'modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-document-info.php' ,'parameters':{ 'id':escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ,'onLoading':function() { clearTabs(); tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = req.responseText; updateTabs('tab1'); dhtmlHistory.add( treeGetId(), el(tree.active+"-text").innerHTML );} ,'onError':function(req){ el('tabs-data').innerHTML = 'Error!\nStatusText='+req.statusText+'\nContents='+req.responseText;} ,'timeout':5000 ,'onTimeout':function(){ clearTabs(); tabsLoadingOff(); el('tabs-data').innerHTML = 'Timed out. Try again!'; } } ); } function editContent() { if (!tree.active || !tree.getActiveNode().isDocument()) { alert("You have to select a document in the Tree View to perform this action."); return; } checkContentSaved(); AjaxRequest.get( { 'url':'modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-edit-content.php' ,'parameters':{ 'id':escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ,'onLoading':function() { clearTabs(); tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = req.responseText; initSimpleEditor(); el('body-tmp').value = el('body').value; updateTabs('tab2'); dhtmlHistory.add( treeGetId(), el(tree.active+"-text").innerHTML );} ,'onError':function(req){ el('tabs-data').innerHTML = 'Error!\nStatusText='+req.statusText+'\nContents='+req.responseText;} ,'timeout':5000 ,'onTimeout':function(){ clearTabs(); tabsLoadingOff(); el('tabs-data').innerHTML = 'Timed out. Try again!'; } } ); } var ste = null; function initSimpleEditor(){ ste = new SimpleTextEditor("body", "ste"); ste.path = "modules/mx_simpledoc/simpledoc/shared/SimpleTextEditor/"; ste.charset = "iso-8859-1"; ste.init(); ste.frame.document.onkeydown = keyPress; // aaa!! next IE bug, editor images not loading :\ if (document.all) { setTimeout(loadEditorImages, 50); } } function documentPreview() { if (!tree.active || !tree.getActiveNode().isDocument()) { alert("You have to select a document in the Tree View to perform this action."); return; } AjaxRequest.get( { 'url':'modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-view-content.php' ,'parameters':{ 'id':escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ,'onLoading':function() { clearTabs(); tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = addTocDiv(stripBodyHtml(req.responseText)); generateTOC('index'); updateTabs('tab3'); } ,'onError':function(req){ el('tabs-data').innerHTML = 'Error!\nStatusText='+req.statusText+'\nContents='+req.responseText;} ,'timeout':5000 ,'onTimeout':function(){ clearTabs(); tabsLoadingOff(); el('tabs-data').innerHTML = 'Timed out. Try again!'; } } ); } function documentView() { if (!tree.active || !tree.getActiveNode().isDocument()) { alert("You have to select a document in the Tree View to perform this action."); return; } AjaxRequest.get( { 'url':'modules/mx_kb/kb/modules/tabs/kb__tab-view.php' ,'parameters':{ 'mode':'article', 'k': escape(treeGetId().substr(treeGetId().lastIndexOf("/")+1)), 'id': escape(treeGetId()), 'block_id':mxBlock.block_id, 'page_id':mxBlock.page_id } ,'onLoading':function() { clearTabs(); tabsLoadingOn(); } ,'onComplete':function() { tabsLoadingOff(); } ,'onSuccess':function(req){ el('tabs-data').innerHTML = stripBodyHtml(req.responseText); generateParentTOC('view'); generateTOC('view');} ,'onError':function(req){ el('tabs-data').innerHTML = 'Error!\nStatusText='+req.statusText+'\nContents='+req.responseText; } ,'timeout':5000 ,'onTimeout':function(){ clearTabs(); tabsLoadingOff(); el('tabs-data').innerHTML = 'Timed out. Try again!'; } } ); } function saveContent(theform) { tabsSavingOn(); el('save-document').disabled = true; //el('tabs-data').style.visibility = "hidden"; var status = AjaxRequest.submit( theform ,{ 'onSuccess':function(req){ } } ); el('save-document').disabled = false; el('body-tmp').value = el('body').value; tabsSavingOff(); //var data = {"body": el('body').value} //var save = httpSave("modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-save-content.php?id="+escape(treeGetId())+'&block_id='+mxBlock.block_id+'&page_id='+mxBlock.page_id, data); if ((typeof status == "boolean" && !status) || typeof status == "string") { alert("Unknown error, cannot save document."); } else { el("saved").innerHTML = "Saved successfuly on "+(new Date()+"<br>(this message will disappear in 3 seconds)"); if (savedTimerID) clearTimeout(savedTimerID); savedTimerID = setTimeout(function(){ el("saved").innerHTML = ""; }, 3000); } return status; } // The top right toc // this snippet doesn't work if there is a folder named "html" // Only used when the doc is generated as part of the app - inline (scripts are stripped in plain code) function generateTOC(mode) { var contents = ""; var link = escape(treeGetId()); contents = '<div><a target="_blank" href="index.php?page='+mxBlock.page_id+'&mode='+mode+'#'+link+'">Permanent Link to this page</a></div>'; var all = document.getElementById("tabs-data").childNodes; var contents2 = ""; var text = ""; var found = false; var h3 = false; contents2 += '<b>Contents</b><ul>'; for (var i = 0; i < all.length; ++i) { if (all[i].nodeName == "H2" || all[i].nodeName == "H3") { if (all[i].nodeName == "H2") { if (h3) contents2 += '</ul>'; h3 = false; } if (all[i].nodeName == "H3") { if (!h3) contents2 += '<ul>'; h3 = true; } found = true; text = all[i].innerHTML.replace(/<[^>]+>/g,""); all[i].innerHTML = '<a name="'+text+'">'+text+'</a>'; contents2 += '<li><a href="index.php?page='+mxBlock.page_id+'&mode='+mode+'#'+text+'">'+text+'</a></li>'; } } contents2 += '</ul>'; if (found) { if (contents) contents += '<br>'; contents += contents2; } if (contents) { document.getElementById("contents").className = "contents"; document.getElementById("contents").innerHTML = contents; } //alert(document.getElementById("tabs-data").innerHTML); } // ?? // this snippet doesn't work if there is a folder named "html" // Only used when the doc is generated as part of the app - inline (scripts are stripped in plain code) function generateParentTOC(mode) { var contents = ""; var loc = ""; var contents2 = ""; var title = "<h1>Section Contents</h1>"; var s = ''; if(!document.getElementById("sectioncontents")) { //document.getElementById("tabs-data").innerHTML = addTocDiv(''); document.getElementById("tabs-data").innerHTML = addTocDiv(document.getElementById("tabs-data").innerHTML); } var node = tree.getActiveNode(); while (node && node.parentNode) { loc = (!node.isDocument() ? ' » ' + '<a href="javascript:void(0)"><span '+(node.childNodes.length ? 'ondblclick="tree.nodeClick(\''+node.id+'\'); node.blur();"' : "")+' onclick="tree.textClick(\''+node.id+'\')">'+node.text+'</span></a>' : '') + loc; node = node.parentNode; } loc = '<a href="index.php?page='+mxBlock.page_id+'&mode='+mode+'">Table of Contents</a> ' + loc; node = tree.getActiveNode(); if (node.childNodes) { for (var i = 0; i < node.childNodes.length; i++) { contents2 += node.childNodes[i].toToc(); } } contents2 = contents2 != '' ? title + contents2 : ''; contents = loc + ' <hr align="left"> ' + contents2; if (contents) { document.getElementById("sectioncontents").className = "sectioncontents"; document.getElementById("sectioncontents").innerHTML = contents; } } function stripBodyHtml(html) { // Remove HTML comments //html = html.replace(/<!--[\w\s\d@{}:.;,'"%!#_=&|?~()[*+\/\-\]]*-->/gi, "" ); // Remove all HTML tags //html = html.replace(/<\/?\s*HTML[^>]*>/gi, "" ); // Remove all BODY tags //html = html.replace(/<\/?\s*BODY[^>]*>/gi, "" ); // Remove all META tags //html = html.replace(/<\/?\s*META[^>]*>/gi, "" ); // Remove all TITLE tags & content //html = html.replace(/<\s*TITLE[^>]*>([^<]*)<\/\s*TITLE\s*>/i, "" ); // Remove all HEAD tags & content //html = html.replace(/<\s*HEAD[^>]*>([^<]*)<\/\s*HEAD\s*>/i, "" ); // Remove all SCRIPT tags //html = html.replace(/<\s*SCRIPT[^>]*>([^<]*)<\/\s*SCRIPT\s*>/i, "" ); // Remove all SPAN tags //html = html.replace(/<\/?\s*SPAN[^>]*>/gi, "" ); // Remove all STYLE tags //html = html.replace(/<\s*STYLE[^>]*>([^<]*)<\/\s*STYLE\s*>/i, "" ); // Remove Class attributes //html = html.replace(/<\s*(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "") ; // Remove Style attributes //html = html.replace(/<\s*(\w[^>]*) style="([^"]*)"([^>]*)/gi, "") ; //html = html.replace(/<\s*br[^>]*>/gi,""); html = html.trim(); return html; } function addTocDiv(html) { html = '<div id="contents"></div>' + '<div id="sectioncontents"></div>' + html; return html; } function loadEditorImages() { var a = el('tabs-data').getElementsByTagName("img"); for (var i = 0; i < a.length; ++i) { if (!a[i].complete && a[i].outerHTML) { a[i].outerHTML = a[i].outerHTML; } } } var savedTimerID = null; function isContentSaved() { if (ste && el("body") && el("save-document")) { ste.submit(); if (el("body").value != el("body-tmp").value) { return false; } } return true; } function checkContentSaved() { if (!isContentSaved()) { if (confirm("Content has not been saved since last change.\nSave it ?")) { saveContent(); } } } function clearTabs() { if(el('tab1')) {el('tab1').className = "tab";} if(el('tab2')) {el('tab2').className = "tab right";} if(el('tabs-data')) {el('tabs-data').innerHTML = "";} } function updateTabs(active){ el('tab1').className = "tab"+((active=='tab1')?"-active":""); el('tab2').className = "tab"+((active=='tab2')?"-active":"")+" right"; el('tab3').className = "tab"+((active=='tab3')?"-active":"")+" view"; } function keyPress(e) { if (!e) { if (!this.parentWindow) return; e = this.parentWindow.event; } if (e.ctrlKey && e.keyCode == 83) { if (el("body") && el("save-document")) { el("save-document").click(); } } if (e.altKey && e.keyCode == 49) documentInfo(); if (e.altKey && e.keyCode == 50) editContent(); } document.onkeydown = keyPress; --- NEW FILE: .htaccess --- allow from all --- NEW FILE: request.js.php --- <?php //require '../../../config.php'; //$CONFIG['encoding'] is replaced by iso-8859-1 ?> // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | // +--------------------------------------------------------------------+ // | request.js | // | Functions for getting and saving data using XMLHttpRequest object. | // +--------------------------------------------------------------------+ // | Author: Cezary Tomczak [www.gosu.pl] | // | Project: SimpleDoc | // | URL: http://gosu.pl/php/simpledoc.html | // | License: GPL | // +--------------------------------------------------------------------+ /* Note (httpLoad): seems like IE always caches retrieved data until you close the browser, so when you call a few times the same url, it always returns the same, even if the content in the given url changed. There are 2 solutions: add to url some random query string or in the url script send NOCACHE headers. */ // returns: false|string(responseText) function httpLoad(url) { var req; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.open("GET", url, false); req.setRequestHeader('Accept-Charset','iso-8859-1'); req.send(null); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.open("GET", url, false); req.setRequestHeader('Accept-Charset','iso-8859-1'); req.send(); } else { alert("Could not create ActiveXObject (XMLHttpRequest)"); return false; } } else { alert("Your browser does not support XMLHttpRequest object"); return false; } if (req.status != 200) { alert("There was a problem while retrieving the data:\n" + req.statusText); req.abort(); return false; } return req.responseText; } // returns: true|false|string(responseText) function httpSave(url, data) { var req; var p; var content = ""; if (data) { for (var p in data) { if (content) { content += "&"; } content += (p + "=" + escape(data[p])); } } if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.open("POST", url, false); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-1"); req.send(content); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.open("POST", url, false); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-1"); req.send(content); } else { alert("Could not create ActiveXObject (XMLHttpRequest)"); return false; } } else { alert("Your browser does not support XMLHttpRequest object"); return false; } if (req.status != 200) { alert("There was a problem while sending the data:\n" + req.statusText); req.abort(); return false; } if (req.responseText.length) { alert(req.responseText); return false; } return true; } --- NEW FILE: common.js --- // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | // +--------------------------------------------------------------------+ // | common.js | // | Some common help functions used all over the project. | // +--------------------------------------------------------------------+ // | Author: Cezary Tomczak [www.gosu.pl] | // | Project: SimpleDoc | // | URL: http://gosu.pl/php/simpledoc.html | // | License: GPL | // +--------------------------------------------------------------------+ function element(id) { return document.getElementById(id); } function elem(id) { return document.getElementById(id); } function el(id) { return document.getElementById(id); } /* Check whether array contains given string */ Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true; } } return false; }; /* Finds the index of the first occurence of item in the array, or -1 if not found */ Array.prototype.indexOf = function(item) { for (var i = 0; i < this.length; i++) { if (this[i] === item) { return i; } } return -1; }; /* Get the last element from the array */ Array.prototype.getLast = function() { return this[this.length-1]; }; /* Remove element with given index (mutates) */ Array.prototype.removeByIndex = function(index) { this.splice(index, 1); }; /* Remove elements with such value (mutates) */ Array.prototype.removeByValue = function(value) { var i, indexes = []; for (i = 0; i < this.length; i++) { if (this[i] === value) { indexes.push(i); } } for (i = indexes.length - 1; i >= 0; i--) { this.splice(indexes[i], 1); } }; /* Push an element at specified index */ Array.prototype.pushAtIndex = function(el, index) { this.splice(index, 0, el); }; /* Strip whitespace from the beginning and end of a string */ String.prototype.trim = function() { return this.replace(/^\s*|\s*$/g, ""); }; /* Count the number of substring occurrences */ String.prototype.substrCount = function(s) { return this.split(s).length - 1; }; // Getting, Setting and Deleteing cookies. // Author: Cezary Tomczak [www.gosu.pl] // Note: name cannot contain 2 chars: =; function Cookie() { this.get = function(name) { var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; ++i) { var a = cookies[i].split("="); if (a.length == 2) { a[0] = a[0].trim(); a[1] = a[1].trim(); if (a[0] == name) { return unescape(a[1]); } } } return ""; }; this.set = function(name, value, seconds, path) { var cookie = (name + "=" + escape(value)); if (seconds) { var date = new Date(new Date().getTime()+seconds*1000); cookie += ("; expires="+date.toGMTString()); } cookie += (path ? "; path="+path : ""); document.cookie = cookie; }; this.del = function(name, path) { var cookie = (name + "="); cookie += (path ? "; path="+path : ""); cookie += "; expires=Thu, 01-Jan-70 00:00:01 GMT"; document.cookie = cookie; }; } var COOKIE_MONTH = 3600*24*30; var COOKIE_YEAR = 3600*24*30*12; function getCookie(name) { var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; ++i) { var a = cookies[i].split("="); if (a.length == 2) { a[0] = a[0].trim(); a[1] = a[1].trim(); if (a[0] == name) { return unescape(a[1]); } } } return ""; } function setCookie(name, value, seconds, path) { var cookie = (name + "=" + escape(value)); if (seconds) { var date = new Date(new Date().getTime()+seconds*1000); cookie += ("; expires="+date.toGMTString()); } cookie += (path ? "; path="+path : ""); document.cookie = cookie; } function delCookie(name, path) { var cookie = (name + "="); cookie += (path ? "; path="+path : ""); cookie += "; expires=Thu, 01-Jan-70 00:00:01 GMT"; document.cookie = cookie; } function addEvent(obj, event, func) { if (obj.addEventListener) { obj.addEventListener(event, func, false); } else if (obj.attachEvent) { obj.attachEvent("on"+event, func); } } --- NEW FILE: debug.js --- var debugWindow = null; function debug(s, name) { if (!debugWindow) { debugWindow = window.open("", "debugWindow", "width=400,height=500,scrollbars=yes,resizable=yes"); debugWindow.document.write("<pre>"); } if (name) { debugWindow.document.write('<div style="font: 12px sans-serif; font-weight: bold;">'+name+'</div>'); } debugWindow.document.write(s + "\n"); } function debugObject(obj, name) { var s = ''; for (var i in obj) { if (obj[i] && (typeof obj[i] == "object" || typeof obj[i] == "function") && obj[i].toString) { s += "Object." + i + "=" + obj[i].toString().replace(/\n/g, "") + "\n"; } else { s += "Object." + i + "=" + obj[i] + "\n"; } } debug(s, name); } function debugArray(arr, name) { var s = ''; for (var i = 0; i < arr.length; ++i) { s += "Array[" + i + "]=" + arr[i] + "\n"; } debug(s, name); } --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2007-06-02 20:55:44
|
Update of /cvsroot/mxbb/mx_kb/kb/includes/js In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2041/js Log Message: Directory /cvsroot/mxbb/mx_kb/kb/includes/js added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-02 20:52:52
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv775 Modified Files: lang_main.php Log Message: updated Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_main.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** lang_main.php 31 May 2007 19:52:42 -0000 1.17 --- lang_main.php 2 Jun 2007 20:52:48 -0000 1.18 *************** *** 268,277 **** $lang['sd_Project'] = 'Project'; $lang['sd_Management'] = 'Management'; - $lang['sd_Publish'] = 'Publish'; - $lang['sd_Import_content'] = 'Import content'; - $lang['sd_Export_content'] = 'Export content *'; $lang['sd_Doc_view'] = 'View Document'; $lang['sd_Options'] = 'Options'; - $lang['sd_Settings'] = 'Settings'; $lang['sd_Help'] = 'Help'; $lang['sd_Contents'] = 'Contents *'; --- 268,273 ---- |
|
From: Jon O. <jon...@us...> - 2007-06-02 20:52:42
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv748 Modified Files: kb_app.php Log Message: updated Index: kb_app.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_app.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kb_app.php 2 Jun 2007 19:56:53 -0000 1.1 --- kb_app.php 2 Jun 2007 20:52:37 -0000 1.2 *************** *** 45,52 **** // 'MODE_MANAGE_URL' => $this->this_mxurl('mode=index'), - 'MODE_PUBLISH_URL' => $this->this_mxurl('mode=publish'), - 'MODE_PUBLISH_EXPORT_URL' => $this->this_mxurl('mode=publish_export'), - 'MODE_IMPORT_URL' => $this->this_mxurl('mode=import'), - 'MODE_EXPORT_URL' => $this->this_mxurl('mode=export'), 'MODE_SETTINGS_URL' => $this->this_mxurl('mode=settings'), 'TREE_HTML' => $tree_html, --- 45,48 ---- *************** *** 57,65 **** 'L_PROJECT' => $lang['sd_Project'], 'L_MANAGEMENT' => $lang['sd_Management'], - 'L_PUBLISH' => $lang['sd_Publish'], - 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], - 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], 'L_OPTIONS' => $lang['sd_Options'], - 'L_SETTINGS' => $lang['sd_Settings'], 'L_HELP' => $lang['sd_Help'], 'L_CONTENTS' => $lang['sd_Contents'], --- 53,57 ---- |