Class ::xowiki::includelet::bookmarklet-button
::xowiki::includelet::bookmarklet-button
create ... \
[ -__decoration (default "none") ] \
[ -parameter_declaration (default "
{-siteurl ""}
{-label ""}
") ]
Include bookmarklet button that makes it easy to add the
current page as a bookmark in the browser of the client.
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tclClass Relations
- class: ::xowiki::IncludeletClass
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- superclass: ::xowiki::Includelet
![[i]](/resources/acs-subsite/ZoomIn16.gif)
::xowiki::IncludeletClass create ::xowiki::includelet::bookmarklet-button \
-superclass ::xowiki::Includelet
Methods (to be applied on instances)
__decoration (setter)
parameter_declaration (setter)
render (scripted)
:get_parameters
set parent_id [${:__including_page} parent_id]
set url [::$package_id pretty_link -absolute 1 -siteurl $siteurl -parent_id $parent_id news-item]
if {$label eq ""} {set label "Add to [::$package_id instance_name]"}
if {![info exists :id]} {set :id [::xowiki::Includelet html_id [self]]}
template::add_event_listener -id [:id] -script [subst {
d=document;w=window;t='';
if(d.selection){t=d.selection.createRange().text;}
else if(d.getSelection){t=d.getSelection();}
else if(w.getSelection){t=w.getSelection();}
void(open('$url?m=create-new&title='+escape(d.title)+
'&detail_link='+escape(d.location.href)+'&text='+escape(t),'_blank',
'scrollbars=yes,width=700,height=575,status=yes,resizable=yes,scrollbars=yes'));
}]
return "<a id='[:id]' href='#' title='[ns_quotehtml $label]' class='rss'>[ns_quotehtml $label]</a>"