2011-04-18 10:37:51 +09:00
|
|
|
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() {
|
2011-04-18 13:41:42 +09:00
|
|
|
SN.Init.CheckBoxes();
|
|
|
|
$('fieldset fieldset label').inFieldLabels({ fadeOpacity:0 });
|
2011-04-22 04:35:33 +09:00
|
|
|
SN.Init.NoticeFormSetup($('#form_new_bookmark'));
|
2011-04-18 10:37:51 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
// Stop normal live event stuff
|
2013-09-23 19:07:37 +09:00
|
|
|
$(document).off("submit", "form.ajax");
|
|
|
|
$(document).off("click", "form.ajax input[type=submit]");
|
2011-04-18 10:37:51 +09:00
|
|
|
|
|
|
|
// Make the bookmark submit super special
|
2013-09-14 20:41:04 +09:00
|
|
|
$(document).on('submit', '#form_initial_bookmark', function (e) {
|
2011-04-18 10:37:51 +09:00
|
|
|
Bookmark.BookmarkXHR($(this));
|
|
|
|
e.stopPropagation();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2011-04-18 12:34:05 +09:00
|
|
|
// Restore live event stuff to other forms & submit buttons
|
2011-04-18 10:37:51 +09:00
|
|
|
SN.Init.AjaxForms();
|
|
|
|
|
|
|
|
});
|