Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -6,3 +6,25 @@ $(function()
|
||||
location.href = createLink('project', 'burn', 'projectID=' + projectID + '&type=' + type + '&interval=' + $(this).val());
|
||||
});
|
||||
})
|
||||
|
||||
/* Save burn as image.*/
|
||||
function downloadBurn()
|
||||
{
|
||||
var canvas = $('#burnCanvas');
|
||||
var type = 'png';
|
||||
var imgSrc = canvas.get(0).toDataURL("image/png");
|
||||
imgData = imgSrc.replace(type,'image/octet-stream');
|
||||
var filename = 'burn.' + type;
|
||||
saveFile(imgData,filename);
|
||||
}
|
||||
|
||||
var saveFile = function(data, filename)
|
||||
{
|
||||
var saveLink = document.createElement('a');
|
||||
saveLink.href = data;
|
||||
saveLink.download = filename;
|
||||
|
||||
var event = document.createEvent('MouseEvents');
|
||||
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
saveLink.dispatchEvent(event);
|
||||
};
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
<?php echo html::submitButton($lang->export, "onclick='downloadBurn();'", 'btn btn-primary');?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<h2 class='text-center'><?php echo $projectName . ' ' . $this->lang->project->burn;?></h2>
|
||||
|
||||
@@ -1472,8 +1472,8 @@ class story extends control
|
||||
$story->verify = str_replace(' ', ' ', $story->verify);
|
||||
}
|
||||
/* fill some field with useful value. */
|
||||
if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)";
|
||||
if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module] . "(#$story->module)";
|
||||
if(isset($products[$story->product])) $story->product = $this->post->fileType == 'word' ? $products[$story->product] : $products[$story->product] . "(#$story->product)";
|
||||
if(isset($relatedModules[$story->module])) $story->module = $this->post->fileType == 'word' ? $relatedModules[$story->module] : $relatedModules[$story->module] . "(#$story->module)";
|
||||
if(isset($relatedBranch[$story->branch])) $story->branch = $relatedBranch[$story->branch] . "(#$story->branch)";
|
||||
if(isset($story->plan))
|
||||
{
|
||||
@@ -1481,7 +1481,7 @@ class story extends control
|
||||
foreach(explode(',', $story->plan) as $planID)
|
||||
{
|
||||
if(empty($planID)) continue;
|
||||
if(isset($relatedPlans[$planID])) $plans .= $relatedPlans[$planID] . "(#$planID)";
|
||||
if(isset($relatedPlans[$planID])) $plans .= $this->post->fileType == 'word' ? $relatedPlans[$planID] : $relatedPlans[$planID] . "(#$planID)";
|
||||
}
|
||||
$story->plan = $plans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user