1
0

Updated tableless design and added new search function.

This commit is contained in:
Stefan Frech
2008-06-01 19:29:18 +00:00
committed by Jonas Kattendick
parent 1aedf85d34
commit 2ea7cfb866
8 changed files with 88 additions and 15 deletions

View File

@@ -17,3 +17,4 @@
17.05.2008, Version 0.8.11_beta
- Added a link to use Online-Bookmarks as a real Firefox Sidebar. Many thanks to Adam Patterson.
- You can find the link "Change Password" under "Settings" from now on.

View File

@@ -35,7 +35,6 @@ $message2 = '';
<li><a href="./export.php">Export</a></li>
<li><a href="./sidebar.php">View as Sidebar</a></li>
<li><a href="./settings.php">Settings</a></li>
<li><a href="javascript:chpw()">Change Password</a></li>
<li><a href="./index.php?logout=1">Logout</a></li>
</ul>
<!-- Menu ends here. -->

View File

@@ -39,10 +39,10 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
$folder_image = $folder_opened;
}
$expand = $tree->get_path_to_root ($value['fid']);
echo '<td style="width:' . $column_width_folder . ';">';
echo "\t" . '<div style="width:' . $column_width_folder . '; float: left;">';
echo '<a class="f" href="./index.php?expand=' . implode (",", $expand) . '&folderid='. $value['fid'] .'#' . $value['fid'] . '">';
echo $folder_image . " " . $value['name'] . "</a>";
echo "</td>\n";
echo "</div>\n";
}
# the checkbox and favicon section
@@ -118,7 +118,13 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
# the description and if not empty
if ($show_desc && $value['description'] != "") {
echo '<div class="description">' . $value['description'] . "</div>\n";
if ($show_folder) {
$css_extension = ' style="margin-left: ' . $column_width_folder . ';"';
}
else {
$css_extension = "";
}
echo "\t" . '<div class="description"' . $css_extension . '>' . $value['description'] . "</div>\n";
}
echo "</div>\n\n";

View File

@@ -47,7 +47,6 @@ if (!isset ($_POST['browser']) || $_POST['browser'] == "" ||
<li><a href="./export.php">Export</a></li>
<li><a href="./sidebar.php">View as Sidebar</a></li>
<li><a href="./settings.php">Settings</a></li>
<li><a href="javascript:chpw()">Change Password</a></li>
<li><a href="./index.php?logout=1">Logout</a></li>
</ul>
<!-- Menu ends here. -->

View File

@@ -24,7 +24,6 @@ logged_in_only ();
<li><a href="./export.php">Export</a></li>
<li><a href="./sidebar.php">View as Sidebar</a></li>
<li><a href="./settings.php">Settings</a></li>
<li><a href="javascript:chpw()">Change Password</a></li>
<li><a href="./index.php?logout=1">Logout</a></li>
</ul>
<!-- Menu ends here. -->

View File

@@ -18,13 +18,25 @@ else {
<div style="min-width: <?php echo 230 + $settings['column_width_folder']; ?>px;">
<!-- Menu starts here. -->
<div id="menu">
<h2 class="nav">Search</h2>
<ul class="nav">
<li>
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="GET" class="nav">
<input type="text" name="search" size="8" value="<?php echo $search; ?>">
<input type="submit" value="Go" name="submit">
</form>
</li>
</ul>
<h2 class="nav">Bookmarks</h2>
<ul class="nav">
<?php if ($search_mode) { ?>
<li><a href="./index.php"><?php echo $settings['root_folder_name']; ?></a></li>
<?php } ?>
<li><a href="javascript:bookmarknew('<?php echo $folderid; ?>')">New Bookmark</a></li>
<li><a href="javascript:bookmarkedit(checkselected())">Edit Bookmarks</a></li>
<li><a href="javascript:bookmarkmove(checkselected())">Move Bookmarks</a></li>
<li><a href="javascript:bookmarkdelete(checkselected())">Delete Bookmarks</a></li>
<li><a href="javascript:selection('toggle')">Toggle Selection</a></li>
<li><a href="./shared.php">Shared Bookmarks</a></li>
</ul>
@@ -46,7 +58,6 @@ else {
<li><a href="./export.php">Export</a></li>
<li><a href="./sidebar.php">View as Sidebar</a></li>
<li><a href="./settings.php">Settings</a></li>
<li><a href="javascript:chpw()">Change Password</a></li>
<li><a href="./index.php?logout=1">Logout</a></li>
</ul>
<!-- Menu ends here. -->
@@ -55,6 +66,54 @@ else {
<!-- Main content starts here. -->
<div id="main">
<?php if ($search_mode): ?>
<div style="height: <?php echo $table_height; ?>; overflow:auto;">
<div class="bookmark">
<a class="f" href="./index.php?expand=&folderid=0#0"><img src="./images/folder_open.gif" alt=""> My Bookmarks</a>
</div>
<?php
require_once ('./lib/BooleanSearch.php');
$searchfields = array ('url', 'title', 'description');
$query = assemble_query ($search, $searchfields);
if ($mysql->query ($query)) {
$bookmarks = array ();
while ($row = mysql_fetch_assoc ($mysql->result)) {
array_push ($bookmarks, $row);
}
if (count ($bookmarks) > 0) {
require_once (ABSOLUTE_PATH . "bookmarks.php");
list_bookmarks ($bookmarks,
true,
true,
$settings['show_bookmark_icon'],
true,
$settings['show_bookmark_description'],
$settings['show_column_date'],
$settings['show_column_edit'],
$settings['show_column_move'],
$settings['show_column_delete'],
$settings['show_public']);
}
else {
echo '<div id="content"> No Bookmarks found matching <b>' . $search . '</b>.</div>';
}
}
else {
message ($mysql->error);
}
?>
</div>
<?php else: ?>
<!-- Folders starts here. -->
<div id="folders" style="width: <?php echo $column_width_folder; ?>; height: <?php echo $table_height; ?>;">
@@ -107,6 +166,9 @@ else {
<!-- Bookmarks ends here. -->
</div>
<?php endif; ?>
<!-- Main content ends here. -->
</div>
<!-- Wrapper ends here. -->

View File

@@ -129,7 +129,6 @@ function check_date_format () {
<li><a href="./export.php">Export</a></li>
<li><a href="./sidebar.php">View as Sidebar</a></li>
<li><a href="./settings.php">Settings</a></li>
<li><a href="javascript:chpw()">Change Password</a></li>
<li><a href="./index.php?logout=1">Logout</a></li>
</ul>
<!-- Menu ends here. -->
@@ -140,7 +139,7 @@ function check_date_format () {
<table>
<tr>
<td>
<td valign="top">
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="POST">
<table>
<tr>
@@ -287,7 +286,13 @@ function check_date_format () {
</form>
</td>
<td style="width: 40%;">
<td valign="top" style="width: 40%;">
<p>
<b><a href="javascript:chpw()">Change Password</a></b>
</p>
<hr>
<?php
if (isset($_SERVER['HTTPS'])) {
$scheme = 'https://';

View File

@@ -89,6 +89,9 @@ ul.nav a:hover {
ul.nav a:active {
text-decoration: none;
}
form.nav {
margin: 0px;
}
/* Folders section */
div#folders {
@@ -133,7 +136,6 @@ div.bookmark:hover {
background-color: #eee;
}
div.bmleft {
margin-top: -2px;
float: left;
padding-right: 5px;
}
@@ -145,19 +147,19 @@ div.bmright {
text-align: center;
}
div.link {
padding: 2px;
padding: 0px 0px 2px;
}
span.private {
background-color: #E7FBE9;
color: #177F23;
}
span.public {
background-color: #F9E7E9;
background-color: #F9E7E9;
color: #E42037;
}
div.description {
margin-top: 5px;
}
}
div.description, span.private, span.public, span.date {
font-size: smaller;
}