Fixed JS error when no description (Github issue #16)
This commit is contained in:
parent
0942111f16
commit
4d15ab5797
@ -19,6 +19,7 @@ This plugin uses [FontAwesome icons](http://fontawesome.io/)
|
||||
|
||||
### Changelog
|
||||
|
||||
* **v 0.4.8** : fixed Github issues #15 and #16
|
||||
* **v 0.4.7** : if error on dynamic update, put back old values in details block (fixed Github issue #8)
|
||||
* **v 0.4.6** : description is now dynamically editable (edit field appears if there's already a description written) (Github request #14)
|
||||
* **v 0.4.5** : fixed Github issue #13 : CSS display for custom attributes, added Title dynamic edition (Github request #14)
|
||||
|
||||
@ -364,15 +364,19 @@ function initEditFieldListeners()
|
||||
});/* end Title */
|
||||
|
||||
var domInputDescription = $('body').find('#DescriptionInput textarea');
|
||||
$('#DescriptionInput a.btn.validate').on('click', function(e)
|
||||
|
||||
if(domInputDescription.length)
|
||||
{
|
||||
e.preventDefault();
|
||||
issueDynamicUpdate('description', domInputDescription.serialize().split('description=')[1], 'textarea', 'description');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var wikiToolbar = new jsToolBar(document.getElementById('description_textarea')); wikiToolbar.setHelpLink('/help/fr/wiki_syntax_textile.html'); wikiToolbar.draw();
|
||||
$('#DescriptionInput a.btn.validate').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
issueDynamicUpdate('description', domInputDescription.serialize().split('description=')[1], 'textarea', 'description');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var wikiToolbar = new jsToolBar(document.getElementById('description_textarea')); wikiToolbar.setHelpLink('/help/fr/wiki_syntax_textile.html'); wikiToolbar.draw();
|
||||
}
|
||||
|
||||
/* end Description */
|
||||
}
|
||||
|
||||
2
init.rb
2
init.rb
@ -6,7 +6,7 @@ Redmine::Plugin.register :redmine_issue_dynamic_edit do
|
||||
name 'Redmine Dynamic edit Issue plugin'
|
||||
author 'Hugo Zilliox'
|
||||
description 'Allows users to dynamically update issue attributes in detailed view without refreshing the page (JIRA style)'
|
||||
version '0.4.7'
|
||||
version '0.4.8'
|
||||
url 'https://github.com/ilogeek/redmine_issue_dynamic_edit'
|
||||
author_url 'https://hzilliox.fr'
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user