Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F884414
revisions_browser.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
998 B
Subscribers
None
revisions_browser.js
View Options
/**
* modules/revisions_browser/revisions_browser.js
* Revisions browser frontend code
*
* Copyright Gottfried Haider, Danja Vasiliev 2010.
* This source code is licensed under the GNU General Public License.
* See the file COPYING for more details.
*/
$
(
document
).
ready
(
function
()
{
$
(
'#revisions_browser_revert_btn'
).
bind
(
'click'
,
function
(
e
)
{
$
.
glue
.
backend
({
method
:
'glue.revert'
,
page
:
$
.
glue
.
page
},
function
(
data
)
{
var
a
=
$
.
glue
.
page
.
split
(
'.'
);
window
.
location
=
$
.
glue
.
base_url
+
'?'
+
a
[
0
]
+
'/edit'
;
});
return
false
;
});
$
(
document
).
bind
(
'keydown'
,
function
(
e
)
{
// keyboard navigation
if
(
e
.
which
==
37
&&
$
(
'#revisions_browser_prev > a'
).
length
)
{
window
.
location
=
$
(
'#revisions_browser_prev > a'
).
attr
(
'href'
);
}
else
if
(
e
.
which
==
39
&&
$
(
'#revisions_browser_next > a'
).
length
)
{
window
.
location
=
$
(
'#revisions_browser_next > a'
).
attr
(
'href'
);
}
// prevent scrolling
if
(
e
.
which
==
37
||
e
.
which
==
39
)
{
return
false
;
}
});
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 6, 10:25 (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23979
Default Alt Text
revisions_browser.js (998 B)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment