js/01conf.js in tdiary-4.0.2.20140201 vs js/01conf.js in tdiary-4.0.3
- old
+ new
@@ -39,9 +39,25 @@
});
return false;
});
/*
+ * theme thumbnail changer
+ */
+ $(document).on('change', '#theme_selection',function(){
+ var list = $(this);
+ var image = $('#theme_thumbnail');
+
+ var theme = '';
+ if ( list.selectedIndex == 0 ) {
+ theme = 'nowprinting';
+ } else {
+ theme = list.val().replace(/^.*\//, '');
+ }
+ image.attr('src', 'http://www.tdiary.org/theme.image/' + theme + '.jpg');
+ });
+
+ /*
* old ruby alert
*/
$('#alert-old-ruby').on('click', function(){
var data = 'conf=old_ruby_alert;saveconf=OK';
var csrf_key = $('#conf-form input[name=csrf_protection_key]').attr('value');