Changeset 49 for branches/go_to_page
- Timestamp:
- 02/15/09 12:18:29 (3 years ago)
- Location:
- branches/go_to_page
- Files:
-
- 2 modified
-
manifest.xml (modified) (2 diffs)
-
scripts.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/go_to_page/manifest.xml
r45 r49 4 4 <id>go_to_page</id> 5 5 <title>Go To Page</title> 6 <version>1. 0</version>6 <version>1.1</version> 7 7 <description>Allows quickly go to the specified page</description> 8 8 <author>daris</author> … … 27 27 $forum_head['go_to_page_js'] = '<script type="text/javascript" src="'.$ext_info['url'].'/scripts.js"></script>'; 28 28 $forum_head['go_to_page_js2'] = '<script type="text/javascript"">var current_url = "'.get_current_url().'"; '.$get.' var lang_common_go = \''.$lang_common['Go'].'\'; var url_page = \''.$forum_url['page'].'\';</script>'; 29 $forum_head[' ape_css'] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/style.css" />';29 $forum_head['go_to_page_css'] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/style.css" />'; 30 30 31 31 ]]></hook> -
branches/go_to_page/scripts.js
r46 r49 3 3 4 4 /* 5 Shows popup popup5 Shows popup 6 6 */ 7 7 function go_to_page(element, link) 8 8 { 9 if (document.getElementById('go_to_page_popup')) 10 { 11 hide_go_to_page_popup(); 12 return; 13 } 14 9 15 var pos = findPos(element); 10 16 pos[1] += element.offsetHeight + 3; … … 30 36 } 31 37 32 popup.innerHTML = '<form action="' + link + '" method="get">' + hidden + '<input type="text" size="3" id="go_to_page" name="p"' + (page != 0 ? ' value="' + page + '"' : '') +'/><input type="submit" value="' + lang_common_go + '" /></form>';38 popup.innerHTML = '<form id="go_to_page_form" action="' + link + '" method="get">' + hidden + '<input type="text" size="3" id="go_to_page" name="p"' + (page != 0 ? ' value="' + page + '"' : '') +' onkeypress="go_to_page_onkeypress(event)" /><input type="submit" value="' + lang_common_go + '" /></form>'; 33 39 34 40 document.body.appendChild(popup); … … 47 53 48 54 /* 49 Hides popup popup55 Hides popup 50 56 */ 51 57 function hide_go_to_page_popup() … … 56 62 } 57 63 64 65 /* 66 Workaround for closing popup when user press Enter and mouse is outside popup 67 */ 68 function go_to_page_onkeypress(e) 69 { 70 if (e.keyCode == 13) 71 document.getElementById('go_to_page_form').submit(); 72 } 58 73 59 74