Adding the 'select all' possibility to the bookmarks header.
This commit is contained in:
@@ -49,18 +49,7 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
|
||||
echo "\t" . '<div class="bmleft">' . "\n";
|
||||
# the checkbox
|
||||
if ($show_checkbox){
|
||||
echo "\t\t" . '<input class="link" type="checkbox" name="' . $value['id'] . '">' . "\n";
|
||||
}
|
||||
|
||||
# the favicon
|
||||
echo "\t\t";
|
||||
if ($show_icon){
|
||||
if ($value['favicon'] && is_file ($value['favicon'])) {
|
||||
echo '<img src="' . $value['favicon'] . '" width="16" height="16">';
|
||||
}
|
||||
else {
|
||||
echo $bookmark_image;
|
||||
}
|
||||
echo "\t\t" . '<input type="checkbox" name="' . $value['id'] . '">' . "\n";
|
||||
}
|
||||
echo "\n\t</div>\n";
|
||||
|
||||
@@ -97,9 +86,20 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
|
||||
echo sprintf ($delete_image, "Delete");
|
||||
echo "</a>\n";
|
||||
}
|
||||
|
||||
echo "\t</div>\n";
|
||||
|
||||
# the favicon
|
||||
echo "\t" . '<div class="link">' . "\n";
|
||||
echo "\t\t";
|
||||
if ($show_icon){
|
||||
if ($value['favicon'] && is_file ($value['favicon'])) {
|
||||
echo '<img src="' . $value['favicon'] . '" width="16" height="16" alt="">' . "\n";
|
||||
}
|
||||
else {
|
||||
echo $bookmark_image . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
# the link
|
||||
if ($settings['open_new_window']) {
|
||||
$target = ' target="_blank"';
|
||||
@@ -114,7 +114,8 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
|
||||
else {
|
||||
$link = $value['title'];
|
||||
}
|
||||
echo "\t" . '<div class="link">' . $link . "</div>\n";
|
||||
echo "\t\t$link\n";
|
||||
echo "\t</div>\n";
|
||||
|
||||
# the description and if not empty
|
||||
if ($show_desc && $value['description'] != "") {
|
||||
|
||||
@@ -135,7 +135,7 @@ else {
|
||||
|
||||
<div class="bookmarkcaption" style="background-color: #bbb;">
|
||||
<div class="bmleft">
|
||||
<input class="link" type="checkbox" name="CheckAll" onClick="selection('checkall')">
|
||||
<input type="checkbox" name="CheckAll" onClick="selectthem('checkall', this.checked)">
|
||||
<img src="./images/bookmark_image.gif" alt="" class="invisible">
|
||||
</div>
|
||||
<div class="bmright">
|
||||
|
||||
@@ -89,7 +89,7 @@ var parameter='';
|
||||
http://www.squarefree.com/bookmarklets/
|
||||
*/
|
||||
|
||||
function selection(boxes){
|
||||
function selectthem(boxes, stat){
|
||||
var x,k,f,j;
|
||||
x=document.forms;
|
||||
|
||||
@@ -107,7 +107,7 @@ function selection(boxes){
|
||||
f[j].checked = !f[j].checked ;
|
||||
}
|
||||
else if (boxes == "checkall") {
|
||||
f[j].checked = document.getElementsByName('CheckAll')[0].checked;
|
||||
f[j].checked = stat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user