Sha256: c987a4d36561850e765dfd507249dab86e00e3a808b9fb27479a2ad0ebe11887

Contents?: true

Size: 670 Bytes

Versions: 22

Compression:

Stored size: 670 Bytes

Contents

/*
 category.js: javascript for category.rb plugin of tDiary

 Copyright (C) 2011 by TADA Tadashi <t@tdtds.jp>
 You can redistribute it and/or modify it under GPL2.
 */

$(function(){
	// insert clicked category item into textarea of update form
	function insertCategoryItem(item) {
		$('#body').insertAtCaret( '[' + item.text() + ']' );
	}

	$('.category-item')
	.hover(function(){
		$(this).css('cursor', 'pointer');
	}, function(){
		$(this).css('cursor', 'default');
	})
	.click(function(){
		insertCategoryItem($(this));
	});

	$('#category-candidate').change(function(){
		$('option:selected', this).each(function(){
			insertCategoryItem($(this));
		});
	});
});

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
tdiary-4.0.5.1 js/category.js
tdiary-4.0.5 js/category.js
tdiary-4.0.4 js/category.js
tdiary-4.0.3 js/category.js
tdiary-4.0.2.20140201 js/category.js
tdiary-4.0.2 js/category.js
tdiary-4.0.1.20131102 js/category.js
tdiary-4.0.1.20130929 js/category.js
tdiary-4.0.1.20130903 js/category.js
tdiary-4.0.1 js/category.js
tdiary-4.0.0.20130826 js/category.js
tdiary-4.0.0 js/category.js
tdiary-3.2.2.20130727 js/category.js
tdiary-3.2.2.20130722 js/category.js
tdiary-3.2.2.20130720 js/category.js
tdiary-3.2.2.20130617 js/category.js
tdiary-3.2.2.20130614 js/category.js
tdiary-3.2.2.20130604 js/category.js
tdiary-3.2.2.20130527 js/category.js
tdiary-3.2.2.20130518 js/category.js