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";
|
echo "\t" . '<div class="bmleft">' . "\n";
|
||||||
# the checkbox
|
# the checkbox
|
||||||
if ($show_checkbox){
|
if ($show_checkbox){
|
||||||
echo "\t\t" . '<input class="link" type="checkbox" name="' . $value['id'] . '">' . "\n";
|
echo "\t\t" . '<input 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 "\n\t</div>\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 sprintf ($delete_image, "Delete");
|
||||||
echo "</a>\n";
|
echo "</a>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\t</div>\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
|
# the link
|
||||||
if ($settings['open_new_window']) {
|
if ($settings['open_new_window']) {
|
||||||
$target = ' target="_blank"';
|
$target = ' target="_blank"';
|
||||||
@@ -114,7 +114,8 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
|
|||||||
else {
|
else {
|
||||||
$link = $value['title'];
|
$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
|
# the description and if not empty
|
||||||
if ($show_desc && $value['description'] != "") {
|
if ($show_desc && $value['description'] != "") {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ else {
|
|||||||
|
|
||||||
<div class="bookmarkcaption" style="background-color: #bbb;">
|
<div class="bookmarkcaption" style="background-color: #bbb;">
|
||||||
<div class="bmleft">
|
<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">
|
<img src="./images/bookmark_image.gif" alt="" class="invisible">
|
||||||
</div>
|
</div>
|
||||||
<div class="bmright">
|
<div class="bmright">
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ var parameter='';
|
|||||||
http://www.squarefree.com/bookmarklets/
|
http://www.squarefree.com/bookmarklets/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function selection(boxes){
|
function selectthem(boxes, stat){
|
||||||
var x,k,f,j;
|
var x,k,f,j;
|
||||||
x=document.forms;
|
x=document.forms;
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ function selection(boxes){
|
|||||||
f[j].checked = !f[j].checked ;
|
f[j].checked = !f[j].checked ;
|
||||||
}
|
}
|
||||||
else if (boxes == "checkall") {
|
else if (boxes == "checkall") {
|
||||||
f[j].checked = document.getElementsByName('CheckAll')[0].checked;
|
f[j].checked = stat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,9 +166,6 @@ div.description {
|
|||||||
div.description, span.private, span.public, span.date {
|
div.description, span.private, span.public, span.date {
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
input.link {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.invisible {
|
.invisible {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user