diff --git a/codepot/src/codepot/views/project_catalog.php b/codepot/src/codepot/views/project_catalog.php index 014cc700..94126314 100644 --- a/codepot/src/codepot/views/project_catalog.php +++ b/codepot/src/codepot/views/project_catalog.php @@ -33,7 +33,7 @@ function prepare_page_button (i, req_size) var filter = codepot_ascii_to_hex(last_successful_filter); var offset = parseInt($(this).text()); $.ajax({ - url: "/project/catalog_json/" + filter + "/" + ((offset - 1) * req_size), + url: codepot_merge_path("", "/project/catalog_json/" + filter + "/" + ((offset - 1) * req_size)), dataType: "json", success: function(data) { render_project_list (data); } }); @@ -146,7 +146,7 @@ $(function () { var filter = codepot_ascii_to_hex(last_attempted_filter); $.ajax({ - url: "/project/catalog_json/" + filter, + url: codepot_merge_path("", "/project/catalog_json/" + filter), dataType: "json", success: function(data) { render_project_list (data); } }); diff --git a/codepot/src/codepot/views/project_home.php b/codepot/src/codepot/views/project_home.php index d252baa6..50381f1d 100644 --- a/codepot/src/codepot/views/project_home.php +++ b/codepot/src/codepot/views/project_home.php @@ -53,7 +53,7 @@ function render_wiki() }); $("#project_home_sidebar_log_all_button").button ().click (function () { - $(location).attr ('href', "/project/log/" + "id; ?>"); + $(location).attr ('href', codepot_merge_path("", "/project/log/" + "id; ?>")); }); } diff --git a/codepot/src/codepot/views/site_home.php b/codepot/src/codepot/views/site_home.php index 2ee00d15..525a1b5e 100644 --- a/codepot/src/codepot/views/site_home.php +++ b/codepot/src/codepot/views/site_home.php @@ -47,7 +47,7 @@ $(function () { }); $("#site_home_sidebar_log_all_button").button ().click (function () { - $(location).attr ('href', "/site/log"); + $(location).attr ('href', codepot_merge_path("", "/site/log")); }); }); diff --git a/codepot/src/codepot/views/taskbar.php b/codepot/src/codepot/views/taskbar.php index 0c8f52ad..2a1c9f3d 100644 --- a/codepot/src/codepot/views/taskbar.php +++ b/codepot/src/codepot/views/taskbar.php @@ -163,13 +163,13 @@ $(function () { var term = codepot_string_to_hex(request.term); $.ajax({ - url: "/project/quickfind_json/" + term, + url: codepot_merge_path("", "/project/quickfind_json/" + term), dataType: "json", success: function(data) { response(data); }, }); }, select: function( event, ui ) { - $(location).attr ('href', "/project/home/" + ui.item.id); + $(location).attr ('href', codepot_merge_path("", "/project/home/" + ui.item.id)); //ui.item.value , ui.item.id , this.value } }); diff --git a/codepot/src/css/log.css b/codepot/src/css/log.css index 142c1e8a..a29d7cfe 100644 --- a/codepot/src/css/log.css +++ b/codepot/src/css/log.css @@ -62,6 +62,7 @@ white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; + color: #333333; } #log_mainarea_result_table td.pages { diff --git a/codepot/src/js/codepot.js b/codepot/src/js/codepot.js index 16f92925..19270a97 100644 --- a/codepot/src/js/codepot.js +++ b/codepot/src/js/codepot.js @@ -442,3 +442,19 @@ function codepot_string_to_hex (x) var utf8 = codepot_utf8_encode(x); return codepot_ascii_to_hex(utf8); } + +function codepot_merge_path (base, path) +{ + // + // if 'base' ends with '/', remove all leading slashes off 'path' + // before adding 'base' and 'path'. + // + if (base.charAt(base.length - 1) == "/") + { + var i; + for (i = 0; path.charAt(i) == '/'; i++); + return base + path.substr(i); + } + else return base + path; +} +