41 lines
852 B
JavaScript
Executable File
41 lines
852 B
JavaScript
Executable File
/**
|
|
* Set duplicate field.
|
|
*
|
|
* @param string $resolution
|
|
* @param int $storyID
|
|
* @access public
|
|
* @return void
|
|
*/
|
|
function setDuplicateAndChild(resolution, storyID)
|
|
{
|
|
if(resolution == 'duplicate')
|
|
{
|
|
$('#childStoryBox' + storyID).hide();
|
|
$('#duplicateStoryBox' + storyID).show();
|
|
}
|
|
else if(resolution == 'subdivided')
|
|
{
|
|
$('#duplicateStoryBox' + storyID).hide();
|
|
$('#childStoryBox' + storyID).show();
|
|
}
|
|
else
|
|
{
|
|
$('#duplicateStoryBox' + storyID).hide();
|
|
$('#childStoryBox' + storyID).hide();
|
|
}
|
|
}
|
|
|
|
$(function()
|
|
{
|
|
$('select[id^="duplicateStoryIDList"]').picker(
|
|
{
|
|
disableEmptySearch : true,
|
|
dropWidth : 'auto',
|
|
onReady: function(event)
|
|
{
|
|
$(event.picker.$container).addClass('required');
|
|
}
|
|
|
|
});
|
|
});
|