[bknr-cvs] hans changed trunk/projects/quickhoney/website/static/javascript.js
BKNR Commits
bknr at bknr.net
Wed Aug 27 02:38:29 UTC 2008
Revision: 3740
Author: hans
URL: http://bknr.net/trac/changeset/3740
Repair deep linking, add function to determine scroll position (not yet used).
U trunk/projects/quickhoney/website/static/javascript.js
Modified: trunk/projects/quickhoney/website/static/javascript.js
===================================================================
--- trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 02:08:00 UTC (rev 3739)
+++ trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 02:38:29 UTC (rev 3740)
@@ -20,7 +20,6 @@
/* logged_in - will be set when the user has CMS access */
var logged_in;
-var wants_cms = false;
/* current colors */
@@ -81,15 +80,7 @@
replaceChildNodes("username", json_result.login);
$("login_status").style.visibility = 'visible';
show_cms_window();
- } else {
- if (wants_cms && (document.login_form.username.value || document.login_form.password.value)) {
- $("login_form").style.visibility = 'hidden';
- $("login_failure").style.visibility = 'visible';
- setTimeout("show_login();", 2000);
- }
}
-
- show_page('home');
}
/* CMS functionality */
@@ -226,6 +217,20 @@
return result;
}
+function getScrollXY() {
+ if (typeof (window.pageYOffset) == 'number') {
+ // Netscape compliant
+ return { x: window.pageXOffset, y: window.pageYOffset };
+ } else if (document.body && ( document.body.scrollLeft || document.body.scrollTop)) {
+ // DOM compliant
+ return { x: document.body.scrollLeft, y: document.body.scrollTop };
+ } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+ // IE standards compliant mode
+ return { x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop };
+ } else {
+ return { x: 0, y: 0 };
+ }
+}
function make_upload_item(item, revealer)
{
item.category = (findValue(item.keywords, 'pixel') == -1) ? 'vector' : 'pixel';
More information about the Bknr-cvs
mailing list