version 1.11, 2012/05/14 16:39:41
|
version 1.12, 2012/05/15 01:41:27
|
Line 511 sub getNodesToArray {
|
Line 511 sub getNodesToArray {
|
# Return a script-tag containing Javascript-function |
# Return a script-tag containing Javascript-function |
# needed for wishlist actions like 'new link' ect. |
# needed for wishlist actions like 'new link' ect. |
sub JSforWishlist { |
sub JSforWishlist { |
my $startPagePopup = &Apache::loncommon::start_page('Wishlist',undef, |
my $startPagePopup = &Apache::loncommon::start_page('Stored Links',undef, |
{'only_body' => 1, |
{'only_body' => 1, |
'js_ready' => 1, |
'js_ready' => 1, |
'bgcolor' => '#FFFFFF',}); |
'bgcolor' => '#FFFFFF',}); |
Line 1415 sub makePage {
|
Line 1415 sub makePage {
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/wishlist?mode='.$mode, |
{ href => '/adm/wishlist?mode='.$mode, |
text => 'Wishlist'}); |
text => 'Stored Links'}); |
my $startPage = &Apache::loncommon::start_page('Wishlist',undef, |
my $startPage = &Apache::loncommon::start_page('Stored Links',undef, |
{'add_entries' => { |
{'add_entries' => { |
'onload' => 'javascript:onLoadAction('."'".$mode."'".');', |
'onload' => 'javascript:onLoadAction('."'".$mode."'".');', |
'onunload' => 'javascript:window.name = '."'loncapaclient'"}}); |
'onunload' => 'javascript:window.name = '."'loncapaclient'"}}); |
|
|
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('Wishlist').&Apache::loncommon::help_open_topic('Wishlist')); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('Stored Links').&Apache::loncommon::help_open_topic('Wishlist')); |
|
|
# get javascript-code for wishlist-interactions |
# get javascript-code for wishlist-interactions |
my $js = &JSforWishlist(); |
my $js = &JSforWishlist(); |
Line 1513 sub makePage {
|
Line 1513 sub makePage {
|
$inner .= &Apache::loncommon::end_data_table(); |
$inner .= &Apache::loncommon::end_data_table(); |
} |
} |
else { |
else { |
$inner .= '<span class="LC_info">'.&mt("Your wishlist ist currently empty.").'</span>'; |
$inner .= '<span class="LC_info">'.&mt("Your Store Links list is currently empty.").'</span>'; |
} |
} |
$wishlistHTMLedit = ''; |
$wishlistHTMLedit = ''; |
} |
} |
Line 1523 sub makePage {
|
Line 1523 sub makePage {
|
$inner .= '<table class="LC_data_table LC_tableOfContent">'.$wishlistHTMLview.'</table>'; |
$inner .= '<table class="LC_data_table LC_tableOfContent">'.$wishlistHTMLview.'</table>'; |
} |
} |
else { |
else { |
$inner .= '<span class="LC_info">'.&mt("Your wishlist ist currently empty.").'</span>'; |
$inner .= '<span class="LC_info">'.&mt("Your Stored Links list is currently empty.").'</span>'; |
} |
} |
$wishlistHTMLview = ''; |
$wishlistHTMLview = ''; |
} |
} |
Line 1586 sub makePopUpNewLink {
|
Line 1586 sub makePopUpNewLink {
|
|
|
# HTML-Markup for the Pop-Up-window 'Set a link for this resource to wishlist' |
# HTML-Markup for the Pop-Up-window 'Set a link for this resource to wishlist' |
my $startPageWishlistlink = |
my $startPageWishlistlink = |
&Apache::loncommon::start_page('Set link to wishlist',undef, |
&Apache::loncommon::start_page('Save to Stored Links',undef, |
{'only_body' => 1, |
{'only_body' => 1, |
'bgcolor' => '#FFFFFF',}); |
'bgcolor' => '#FFFFFF',}); |
|
|
Line 1595 sub makePopUpNewLink {
|
Line 1595 sub makePopUpNewLink {
|
'or to external websites. Paths to LON-CAPA resources must be of the form /res/dom/usr... . '. |
'or to external websites. Paths to LON-CAPA resources must be of the form /res/dom/usr... . '. |
'Paths to external websites must contain the network protocol (e.g. http://...).'); |
'Paths to external websites must contain the network protocol (e.g. http://...).'); |
|
|
my $inPageWishlistlink1 = '<h1>'.&mt('Set a link to wishlist').'</h1>'; |
my $inPageWishlistlink1 = '<h1>'.&mt('Save to Stored Links').'</h1>'; |
# If no title is delivered, 'New Link' is called up from the wishlist-interface, so after |
# If no title is delivered, 'New Link' is called up from the wishlist-interface, so after |
# submitting the window should close instead of offering a link to wishlist (like it should do |
# submitting the window should close instead of offering a link to wishlist (like it should do |
# if we call 'Set New Link' from within a browsed ressource) |
# if we call 'Set New Link' from within a browsed ressource) |
Line 1743 SCRIPT
|
Line 1743 SCRIPT
|
# Returns the HTML-Markup for the page, shown when a link was set |
# Returns the HTML-Markup for the page, shown when a link was set |
sub makePageSet { |
sub makePageSet { |
# start_page |
# start_page |
my $startPage = &Apache::loncommon::start_page('Wishlist',undef, |
my $startPage = &Apache::loncommon::start_page('Stored Links',undef, |
{'only_body' => 1}); |
{'only_body' => 1}); |
|
|
# confirm success and offer link to wishlist |
# confirm success and offer link to wishlist |
my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Link successfully set!')); |
my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Link successfully saved!')); |
$message = &Apache::loncommon::confirmwrapper($message); |
$message = &Apache::loncommon::confirmwrapper($message); |
|
|
my $inner .= '<br>'.$message.'<br/><br/>'. |
my $inner .= '<br>'.$message.'<br/><br/>'. |
'<a href="javascript:;" onclick="opener.open('."'/adm/wishlist'".');window.close();">'.&mt('Go to wishlist').'</a>'. |
'<a href="javascript:;" onclick="opener.open('."'/adm/wishlist'".');window.close();">'.&mt('Go to Stored Links').'</a>'.(' ' x 3). |
' <a href="javascript:;" onclick="window.close();">'.&mt('Close this window').'</a>'; |
'<a href="javascript:;" onclick="window.close();">'.&mt('Close this window').'</a>'; |
|
|
# end_page |
# end_page |
my $endPage = &Apache::loncommon::end_page(); |
my $endPage = &Apache::loncommon::end_page(); |
Line 1772 sub makePageImport {
|
Line 1772 sub makePageImport {
|
$root = $rootgiven; |
$root = $rootgiven; |
@childrenRt = $root->children(); |
@childrenRt = $root->children(); |
# start_page |
# start_page |
my $startPage = &Apache::loncommon::start_page('Wishlist',undef, |
my $startPage = &Apache::loncommon::start_page('Stored Links',undef, |
{'only_body' => 1}); |
{'only_body' => 1}); |
|
|
# get javascript-code for wishlist-interactions |
# get javascript-code for wishlist-interactions |
my $js = &JSforWishlist(); |
my $js = &JSforWishlist(); |
$js .= &JSforImport($rat); |
$js .= &JSforImport($rat); |
|
|
my $inner = '<h1>'.&mt('Import Resources from Wishlist').'</h1>'; |
my $inner = '<h1>'.&mt('Import Resources from Stored Links').'</h1>'; |
if (!$rat) { |
if (!$rat) { |
$inner .= '<p><span class="LC_info">'.&mt("Please note that you can use the checkboxes corresponding to a folder to ". |
$inner .= '<p><span class="LC_info">'.&mt("Please note that you can use the checkboxes corresponding to a folder to ". |
"easily check all links within this folder. The folder structure itself can't be imported. ". |
"easily check all links within this folder. The folder structure itself can't be imported. ". |
Line 1818 sub makePageImport {
|
Line 1818 sub makePageImport {
|
$inner .= '<table class="LC_data_table LC_tableOfContent">'.$wishlistHTMLimport.'</table>'; |
$inner .= '<table class="LC_data_table LC_tableOfContent">'.$wishlistHTMLimport.'</table>'; |
} |
} |
else { |
else { |
$inner .= '<span class="LC_info">'.&mt("Your wishlist ist currently empty.").'</span>'; |
$inner .= '<span class="LC_info">'.&mt("Your Stored Links list is currently empty.").'</span>'; |
} |
} |
$wishlistHTMLimport = ''; |
$wishlistHTMLimport = ''; |
|
|
Line 1840 sub makeErrorPage {
|
Line 1840 sub makeErrorPage {
|
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/wishlist', |
{ href => '/adm/wishlist', |
text => 'Wishlist'}); |
text => 'Wishlist'}); |
my $startPage = &Apache::loncommon::start_page('Wishlist'); |
my $startPage = &Apache::loncommon::start_page('Stored Links'); |
|
|
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('Wishlist').&Apache::loncommon::help_open_topic('Wishlist')); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('Stored Links').&Apache::loncommon::help_open_topic('Wishlist')); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
|
# error-message |
# error-message |