We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit f3e0cd0b authored by Zach Copley's avatar Zach Copley

Some special .js for the bookmark plugin, so we can control the form in the second step

parent eaca17be
......@@ -130,6 +130,11 @@ class BookmarkPlugin extends MicroAppPlugin
return true;
function onEndShowScripts($action)
return true;
* Load related modules when needed
var Bookmark = {
// Special XHR that sends in some code to be run
// when the full bookmark form gets loaded
BookmarkXHR: function(form)
SN.U.FormXHR(form, Bookmark.InitBookmarkForm);
return false;
// Special initialization function just for the
// second step in the bookmarking workflow
InitBookmarkForm: function() {
// Put fancy stuff here
$(document).ready(function() {
// Stop normal live event stuff
$('form.ajax input[type=submit]').die();
// Make the bookmark submit super special
$('#form_initial_bookmark').bind('submit', function(e) {
return false;
// Restore live event stuff to other forms & submit buttions
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment