Target version and Assignee fields are now supported (#24)
This commit is contained in:
parent
e6cedf5965
commit
ae90053312
@ -25,7 +25,7 @@ This plugin uses [FontAwesome icons](http://fontawesome.io/)
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
* **v.0.6.4** : version field with checkbox display is now supported (Github request #24)
|
* **v.0.6.4** : version field with checkbox display is now supported, Target version and Assignee fields are also supported (Github request #24)
|
||||||
* **v 0.6.3** : fixed Github issue #22 : DatepickerFallback raised an error
|
* **v 0.6.3** : fixed Github issue #22 : DatepickerFallback raised an error
|
||||||
* **v 0.6.2** : fixed Github issue #22 : long description is now supported (no more 414 errors)
|
* **v 0.6.2** : fixed Github issue #22 : long description is now supported (no more 414 errors)
|
||||||
* **v 0.6.1** : fixed Github issue #20
|
* **v 0.6.1** : fixed Github issue #20
|
||||||
|
|||||||
@ -92,6 +92,38 @@ function initEditFields()
|
|||||||
htmlCopy).addClass('value');
|
htmlCopy).addClass('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($('select#issue_assigned_to_id').length > 0)
|
||||||
|
{
|
||||||
|
var htmlCopy = $('select#issue_assigned_to_id').get(0).outerHTML;
|
||||||
|
// 2 technics with simple or double quote (safety first)
|
||||||
|
htmlCopy = htmlCopy.replace(/id="/g, 'id="dynamic_').replace(/id='/g, "id='dynamic_");
|
||||||
|
|
||||||
|
var editHTML = "<span class='dynamicEdit' id='dynamic_edit_assigned_to_id'>";
|
||||||
|
editHTML += htmlCopy;
|
||||||
|
editHTML += " <a href='#' class='btn btn-primary close' aria-label='" + _TXT_CANCEL_BTN + "'><i class='fa fa-times fa-fw' aria-hidden='true'></i></a>";
|
||||||
|
editHTML += "</span>";
|
||||||
|
|
||||||
|
$('.details .attributes .assigned-to.attribute .value').html('<span class="showValue">' +
|
||||||
|
$('.details .attributes .assigned-to.attribute .value').html() + '</span> <i class="fa fa-pencil fa-fw" aria-hidden="true"></i>' +
|
||||||
|
editHTML);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($('select#issue_fixed_version_id').length > 0)
|
||||||
|
{
|
||||||
|
var htmlCopy = $('select#issue_fixed_version_id').get(0).outerHTML;
|
||||||
|
// 2 technics with simple or double quote (safety first)
|
||||||
|
htmlCopy = htmlCopy.replace(/id="/g, 'id="dynamic_').replace(/id='/g, "id='dynamic_");
|
||||||
|
|
||||||
|
var editHTML = "<span class='dynamicEdit' id='dynamic_edit_fixed_version'>";
|
||||||
|
editHTML += htmlCopy;
|
||||||
|
editHTML += " <a href='#' class='btn btn-primary close' aria-label='" + _TXT_CANCEL_BTN + "'><i class='fa fa-times fa-fw' aria-hidden='true'></i></a>";
|
||||||
|
editHTML += "</span>";
|
||||||
|
|
||||||
|
$('.details .attributes .fixed-version.attribute .value').html('<span class="showValue">' +
|
||||||
|
$('.details .attributes .fixed-version.attribute .value').html() + '</span> <i class="fa fa-pencil fa-fw" aria-hidden="true"></i>' +
|
||||||
|
editHTML);
|
||||||
|
}
|
||||||
|
|
||||||
for(var i = 0 ; i < CF_VALUE_JSON.length ; i++)
|
for(var i = 0 ; i < CF_VALUE_JSON.length ; i++)
|
||||||
{
|
{
|
||||||
var info = CF_VALUE_JSON[i].custom_field;
|
var info = CF_VALUE_JSON[i].custom_field;
|
||||||
@ -436,6 +468,24 @@ function initEditFieldListeners()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dynamic_edit_assigned_to_id = $('body').find('#dynamic_edit_assigned_to_id select');
|
||||||
|
|
||||||
|
if(dynamic_edit_assigned_to_id.length)
|
||||||
|
{
|
||||||
|
dynamic_edit_assigned_to_id.on('change', function(e){
|
||||||
|
issueDynamicUpdate('assigned_to_id', dynamic_edit_assigned_to_id.val(), 'select', 'assigned-to');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var dynamic_edit_fixed_version = $('body').find('#dynamic_edit_fixed_version select');
|
||||||
|
|
||||||
|
if(dynamic_edit_fixed_version.length)
|
||||||
|
{
|
||||||
|
dynamic_edit_fixed_version.on('change', function(e){
|
||||||
|
issueDynamicUpdate('fixed_version_id', dynamic_edit_fixed_version.val(), 'select', 'fixed-version');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* end Description */
|
/* end Description */
|
||||||
|
|
||||||
/* Custom fields */
|
/* Custom fields */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user