fixed notes logic

This commit is contained in:
Dmitriy Zaporozhets 2012-02-27 19:05:27 +02:00
parent f0f14c8eab
commit 1e689bfba3
6 changed files with 109 additions and 79 deletions

View file

@ -23,9 +23,6 @@ $(document).ready(function(){
$(this).select();
});
$('select#branch').selectmenu({style:'popup', width:200});
$('select#tag').selectmenu({style:'popup', width:200});
$(".account-box").mouseenter(showMenu);
$(".account-box").mouseleave(resetMenu);
@ -45,6 +42,9 @@ $(document).ready(function(){
}
});
/**
* Focus search field by pressing 's' key
*/
$(document).keypress(function(e) {
if( $(e.target).is(":input") ) return;
switch(e.which) {
@ -52,27 +52,12 @@ $(document).ready(function(){
e.preventDefault();
}
});
});
function focusSearch() {
$("#search").focus();
}
function taggifyForm(){
var tag_field = $('#tag_field').tagify();
tag_field.tagify('inputField').autocomplete({
source: '/tags.json'
});
$('form').submit( function() {
var tag_field = $('#tag_field')
tag_field.val( tag_field.tagify('serialize') );
return true;
});
}
function updatePage(data){
$.ajax({type: "GET", url: location.href, data: data, dataType: "script"});
}
@ -84,5 +69,3 @@ function showMenu() {
function resetMenu() {
$(this).removeClass("hover");
}