This commit is contained in:
Yagami
2018-11-16 13:07:17 +08:00
16 changed files with 74 additions and 36 deletions
+2
View File
@@ -523,6 +523,8 @@ $lang->searchMore = "More results:";
$lang->chooseUsersToMail = "Choose users to be notified.";
$lang->browserNotice = 'Your current browser might not display the best effect. Use Chrome, Firefox, IE9+, Opera or Safari.';
$lang->noticePasteImg = "Paste images here";
$lang->pasteImgFail = "Paste image fail, try again later.";
$lang->pasteImgUploading = "Please wait image uploading...";
/* Time formats settings. */
if(!defined('DT_DATETIME1')) define('DT_DATETIME1', 'Y-m-d H:i:s');
+2
View File
@@ -520,6 +520,8 @@ $lang->searchMore = "搜索此关键字的更多结果:";
$lang->chooseUsersToMail = "选择要发信通知的用户...";
$lang->browserNotice = '你目前使用的浏览器可能无法得到最佳浏览效果,建议使用Chrome、火狐、IE9+、Opera、Safari浏览器。';
$lang->noticePasteImg = "可以在编辑器直接贴图。";
$lang->pasteImgFail = "贴图失败,请稍后重试。";
$lang->pasteImgUploading = "正在上传图片,请稍后...";
/* 时间格式设置。*/
if(!defined('DT_DATETIME1')) define('DT_DATETIME1', 'Y-m-d H:i:s');
+37 -9
View File
@@ -37,6 +37,7 @@ $uid = uniqid('');
'table', 'code', '|', 'pagebreak', 'anchor', '|',
'fullscreen', 'source', 'preview', 'about'];
var editorToolsMap = {fullTools: fullTools, simpleTools: simpleTools, bugTools: bugTools};
var imageLoadingEle = '<div class="image-loading-ele small" style="padding: 5px; background: #f1f1f1; width: 300px; border-radius: 2px;"><i class="icon icon-spin icon-spinner-indicator text-muted"></i> <?php echo $this->lang->pasteImgUploading?></div>';
// Kindeditor default options
var editorDefaults =
@@ -119,6 +120,29 @@ $uid = uniqid('');
placeholder += ' <?php echo $this->lang->noticePasteImg?>';
}
var pasteBegin = function()
{
$.enableForm(false);
$('body').one('click.ke' + kuid, function(){$.enableForm(true);});
cmd.inserthtml(imageLoadingEle);
keditor.readonly(true);
};
var pasteEnd = function(error)
{
if(error)
{
if(error === true) error = '<?php echo $this->lang->pasteImgFail;?>';
$.zui.messager.danger(error, {placement: 'center'});
}
$.enableForm(true);
$('body').off('.ke' + kuid);
$(doc.body).find('.image-loading-ele').remove();
keditor.readonly(false);
};
var pasteUrl = createLink('file', 'ajaxPasteImage', 'uid=' + kuid);
/* Paste in chrome.*/
/* Code reference from http://www.foliotek.com/devblog/copy-images-from-clipboard-in-javascript/. */
if(K.WEBKIT)
@@ -130,8 +154,7 @@ $uid = uniqid('');
var file = original.clipboardData.items[0].getAsFile();
if(file)
{
$('#submit').attr('disabled', 'disabled');
$("body").click(function(){$('#submit').removeAttr('disabled');});
pasteBegin();
var reader = new FileReader();
reader.onload = function(evt)
@@ -142,10 +165,13 @@ $uid = uniqid('');
var contentType = arr[0].split(";")[0].split(":")[1];
html = '<img src="' + result + '" alt="" />';
$.post(createLink('file', 'ajaxPasteImage', 'uid=' + kuid), {editor: html}, function(data)
$.post(pasteUrl, {editor: html}, function(data)
{
cmd.inserthtml(data);
$('#submit').removeAttr('disabled');
pasteEnd();
}).error(function()
{
pasteEnd(true);
});
};
reader.readAsDataURL(file);
@@ -162,13 +188,15 @@ $uid = uniqid('');
var html = K(doc.body).html();
if(html.search(/<img src="data:.+;base64,/) > -1)
{
$('#submit').attr('disabled', 'disabled');
$("body").click(function(){$('#submit').removeAttr('disabled');});
$.post(createLink('file', 'ajaxPasteImage', 'uid=' + kuid), {editor: html}, function(data)
pasteBegin();
$.post(pasteUrl, {editor: html}, function(data)
{
if(data.indexOf('<img') == 0) data = '<p>' + data + '</p>';
if(data.indexOf('<img') === 0) data = '<p>' + data + '</p>';
frame.html(data);
$('#submit').removeAttr('disabled');
pasteEnd();
}).error(function()
{
pasteEnd(true);
});
}
}, 80);
+8
View File
@@ -12,3 +12,11 @@
#urlCard .url-content{padding-left:55px;}
#urlCard .url-title{font-weight:bold; font-size:16px; min-height:20px}
#urlCard .url-href a{color:#888;}
.main-row > .side-col {transition: width .2s;}
.main-row > .main-col .article-content {transition: max-width; margin: 0 auto!important;}
.main-row > .side-col > .cell {transition: opacity .2s;}
.doc-fullscreen .main-row > .side-col {width: 0; position: relative; overflow: hidden}
.doc-fullscreen .main-row > .side-col > .cell {opacity: 0}
.doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972'}
.doc-fullscreen .main-row > .main-col .article-content {max-width: 1360px;}
+4 -14
View File
@@ -1,19 +1,9 @@
$(function()
{
$('#urlIframe').height($('#mainContent').height() - 35);
$('#mainMenu .fullScreen').click(function()
$('#mainMenu .fullscreen-btn').click(function()
{
if(!$(this).hasClass('collapse'))
{
$(this).addClass('collapse');
$(this).find('i').attr('class', 'icon-exchange');
$('.side-col').hide();
}
else
{
$(this).removeClass('collapse');
$(this).find('i').attr('class', 'icon-fullscreen');
$('.side-col').show();
}
})
$('body').toggleClass('doc-fullscreen');
setTimeout($.resetToolbarPosition, 250);
});
})
+1 -1
View File
@@ -65,7 +65,7 @@
</div>
</div>
<div class="btn-toolbar pull-right">
<a href='###' class='fullScreen btn'><i class='icon-fullscreen'></i></a>
<button type='button' class='btn fullscreen-btn'><i class='icon icon-fullscreen'></i></button>
</div>
</div>
<div id="mainContent" class="main-row">
+1 -1
View File
@@ -221,7 +221,7 @@
<td colspan='13'>
<div class="table-row segments-list">
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
<?php printf($lang->project->countSummary, $groupSum, $groupWait, $groupDoing);?>
<?php printf($lang->project->countSummary, $groupSum, $groupDoing, $groupWait);?>
<?php printf($lang->project->timeSummary, $groupEstimate, $groupConsumed, $groupLeft);?>
</div>
</td>
+1 -1
View File
@@ -59,7 +59,7 @@
<td class='text-center'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
<td class='text-center'><?php echo $release->date;?></td>
<td class='c-status' title='<?php echo zget($lang->release->statusList, $release->status);?>'>
<td class='c-status text-center' title='<?php echo zget($lang->release->statusList, $release->status);?>'>
<span class="status-release status-<?php echo $release->status?>">
<?php echo zget($lang->release->statusList, $release->status);?>
</span>
+6 -4
View File
@@ -177,10 +177,11 @@ class todo extends control
$columns = 7;
if($account == '') $account = $this->app->user->account;
$bugs = $this->bug->getUserBugPairs($account);
$tasks = $this->task->getUserTaskPairs($account, $status);
$allTodos = $this->todo->getList($type, $account, $status);
if($this->post->todoIDList) $todoIDList = $this->post->todoIDList;
$bugs = $this->bug->getUserBugPairs($account);
$tasks = $this->task->getUserTaskPairs($account, $status);
$storys = $this->loadModel('story')->getUserStoryPairs($account);
$allTodos = $this->todo->getList($type, $account, $status);
if($this->post->todoIDList) $todoIDList = $this->post->todoIDList;
/* Initialize todos whose need to edited. */
foreach($allTodos as $todo)
@@ -217,6 +218,7 @@ class todo extends control
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
$this->view->bugs = $bugs;
$this->view->tasks = $tasks;
$this->view->storys = $storys;
$this->view->editedTodos = $editedTodos;
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
$this->view->time = date::now();
+2 -1
View File
@@ -34,7 +34,7 @@ class todoModel extends model
->setIF($this->post->begin == false, 'begin', '2400')
->setIF($this->post->end == false, 'end', '2400')
->stripTags($this->config->todo->editor->create['id'], $this->config->allowedTags)
->remove('bug, task, uid')
->remove('bug, task, story, uid')
->get();
if(empty($todo->cycle)) unset($todo->config);
if(!empty($todo->cycle))
@@ -224,6 +224,7 @@ class todoModel extends model
$todo->end = isset($data->ends[$todoID]) ? $data->ends[$todoID] : 2400;
if($todo->type == 'task') $todo->idvalue = isset($data->tasks[$todoID]) ? $data->tasks[$todoID] : 0;
if($todo->type == 'bug') $todo->idvalue = isset($data->bugs[$todoID]) ? $data->bugs[$todoID] : 0;
if($todo->type == 'story')$todo->idvalue = isset($data->storys[$todoID]) ? $data->storys[$todoID] : 0;
$todos[$todoID] = $todo;
}
+7 -3
View File
@@ -60,15 +60,19 @@
<?php
if($todo->type == 'custom' or $todo->type == 'cycle')
{
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
}
elseif($todo->type == 'task')
{
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
}
elseif($todo->type == 'bug')
{
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
}
elseif($todo->type == 'story')
{
echo html::select("storys[$todo->id]", $storys, $todo->idvalue, 'class="form-control chosen"');
}
?>
</div>
File diff suppressed because one or more lines are too long
Binary file not shown.
+1
View File
@@ -135,6 +135,7 @@
<glyph unicode="&#xe96f;" glyph-name="hand-right-alt" d="M204.799 335.644h563.201c28.277 0 51.2-22.923 51.2-51.2v-51.2c0-28.277-22.923-51.2-51.2-51.2h-563.201v153.6zM204.799 489.244h742.4c42.416 0 76.8-34.385 76.8-76.8s-34.385-76.8-76.8-76.8h-742.4v153.6zM281.599 694.045c42.416 0 76.8-34.385 76.8-76.8v-128h-153.6v128c0 42.416 34.385 76.8 76.8 76.8zM76.8 489.244h25.601c28.277 0 51.2-22.923 51.2-51.2v-512c0-28.277-22.923-51.2-51.2-51.2h-25.601c-42.416 0-76.8 34.385-76.8 76.8v460.8c0 42.416 34.385 76.8 76.8 76.8v0zM204.799 182.043h512c28.277 0 51.2-22.923 51.2-51.2v-51.2c0-28.277-22.923-51.2-51.2-51.2h-512v153.6zM204.799 28.443h460.8c28.277 0 51.2-22.923 51.2-51.2v-25.601c0-42.416-34.385-76.8-76.8-76.8h-435.2v153.6z" />
<glyph unicode="&#xe970;" glyph-name="change" d="M28.444 796.444v-1024M56.889 796.444v-1024M85.333 796.444v-1024M113.778 796.444v-1024M142.222 796.444v-1024M170.667 796.444v-1024M199.111 796.444v-1024M227.556 796.444v-1024M256 796.444v-1024M284.444 796.444v-1024M312.889 796.444v-1024M341.333 796.444v-1024M369.778 796.444v-1024M398.222 796.444v-1024M426.667 796.444v-1024M455.111 796.444v-1024M483.556 796.444v-1024M512 796.444v-1024M540.444 796.444v-1024M568.889 796.444v-1024M597.333 796.444v-1024M625.778 796.444v-1024M654.222 796.444v-1024M682.667 796.444v-1024M711.111 796.444v-1024M739.556 796.444v-1024M768 796.444v-1024M796.444 796.444v-1024M824.889 796.444v-1024M853.333 796.444v-1024M881.778 796.444v-1024M910.222 796.444v-1024M938.667 796.444v-1024M967.111 796.444v-1024M995.556 796.444v-1024M0 768h1024M0 739.555h1024M0 711.111h1024M0 682.666h1024M0 654.222h1024M0 625.777h1024M0 597.333h1024M0 568.888h1024M0 540.444h1024M0 512h1024M0 483.555h1024M0 455.111h1024M0 426.666h1024M0 398.222h1024M0 369.777h1024M0 341.333h1024M0 312.888h1024M0 284.444h1024M0 256h1024M0 227.555h1024M0 199.111h1024M0 170.666h1024M0 142.222h1024M0 113.777h1024M0 85.333h1024M0 56.888h1024M0 28.444h1024M0 0h1024M0-28.445h1024M0-56.889h1024M0-85.334h1024M0-113.778h1024M0-142.223h1024M0-170.667h1024M0-199.112h1024M827.088 687.645l32.821-78.769-700.028-291.679c-0.293-0.991 234.218-125.363 703.533-373.115l-39.83-75.468-703.61 371.349c-17.744 9.363-31.67 24.616-39.388 43.136-18.335 44 2.473 94.53 46.473 112.866l700.030 291.68zM839.511 739.968l13.65-3.659c39.026-10.455 62.183-50.569 51.726-89.593l-60.133-224.425-84.309 22.59 79.067 295.086zM606.148 712.135l22.59 84.309 224.423-60.133c39.026-10.457 62.183-50.569 51.726-89.593l-3.659-13.65-295.081 79.067zM837.559-171.078l13.65 3.659c39.026 10.455 62.183 50.569 51.726 89.593l-60.133 224.423-84.309-22.59 79.067-295.084zM604.196-143.245l22.59-84.309 224.423 60.133c39.026 10.455 62.183 50.569 51.726 89.593l-3.659 13.65-295.081-79.067z" />
<glyph unicode="&#xe971;" glyph-name="treemap-alt" d="M410.864 663.701v-202.271h202.271v202.271h-202.271zM549.928 82.171h37.927c27.928 0 50.568-22.64 50.568-50.568v-151.704c0-27.928-22.64-50.568-50.568-50.568h-151.704c-27.928 0-50.568 22.64-50.568 50.568v151.704c0 27.928 22.64 50.568 50.568 50.568h37.927v143.659h-255.138v-143.659h40.225c27.928 0 50.568-22.64 50.568-50.568v-151.704c0-27.928-22.64-50.568-50.568-50.568h-151.704c-27.928 0-50.568 22.64-50.568 50.568v151.704c0 27.928 22.64 50.568 50.568 50.568h35.626v168.942c0 27.928 22.64 50.568 50.568 50.568h280.423v83.896h-63.21c-41.892 0-75.852 33.96-75.852 75.852v202.271c0 41.892 33.96 75.852 75.852 75.852h202.271c41.892 0 75.852-33.96 75.852-75.852v-202.271c0-41.892-33.96-75.852-75.852-75.852h-63.21v-83.896h280.423c27.928 0 50.568-22.64 50.568-50.568v-168.942h35.626c27.928 0 50.568-22.64 50.568-50.568v-151.704c0-27.928-22.64-50.568-50.568-50.568h-151.704c-27.928 0-50.568 22.64-50.568 50.568v151.704c0 27.928 22.64 50.568 50.568 50.568h40.225v143.659h-255.138v-143.659zM132.742 6.32v-101.137h101.137v101.137h-101.137zM790.123 6.32v-101.137h101.137v101.137h-101.137zM461.432 6.32v-101.137h101.137v101.137h-101.137z" />
<glyph unicode="&#xe972;" glyph-name="fullscreen-exit" d="M637.387 167.182h313.469v-125.387h-188.082v-188.082h-125.387v313.469zM73.143 167.182h313.469v-313.469h-125.387v188.082h-188.082v125.387zM261.224 731.427h125.387v-313.469h-313.469v125.387h188.082v188.082zM950.857 543.345v-125.387h-313.469v313.469h125.387v-188.082h188.082z" />
<glyph unicode="&#xe982;" glyph-name="spinner-indicator" d="M416-131.556c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM0 284.444c0 53.020 42.982 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM832 284.444c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM121.844 578.6c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM710.156-9.712c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM121.844-9.712c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM710.156 578.6c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96z" />
<glyph unicode="&#xf016;" glyph-name="file, file-empty" horiz-adv-x="878" d="M838.857 587.428c21.143-21.143 38.857-63.429 38.857-93.714v-658.286c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h512c30.286 0 72.571-17.714 93.714-38.857zM585.143 726.857v-214.857h214.857c-3.429 9.714-8.571 19.429-12.571 23.429l-178.857 178.857c-4 4-13.714 9.143-23.429 12.571zM804.571-146.286v585.143h-237.714c-30.286 0-54.857 24.571-54.857 54.857v237.714h-438.857v-877.714h731.429z" />
<glyph unicode="&#xf02d;" glyph-name="book" d="M948.764 510.653c13.529-19.482 17.318-44.918 9.741-69.81l-148.822-490.3c-13.529-45.999-61.152-81.716-107.693-81.716h-499.501c-55.199 0-114.186 43.835-134.21 100.116-8.658 24.352-8.658 48.165-1.083 68.728 1.083 10.823 3.248 21.647 3.789 34.635 0.541 8.658-4.329 15.694-3.248 22.188 2.165 12.988 13.529 22.188 22.188 36.799 16.235 27.058 34.635 70.893 40.587 99.033 2.706 10.281-2.706 22.188 0 31.388 2.706 10.281 12.988 17.859 18.401 27.6 14.612 24.894 33.554 73.058 36.259 98.493 1.083 11.364-4.329 23.811-1.083 32.471 3.789 12.447 15.694 17.859 23.811 28.682 12.988 17.859 34.635 69.269 37.881 97.952 1.083 9.199-4.329 18.401-2.706 28.14 2.165 10.281 15.153 21.106 23.811 33.554 22.728 33.554 27.058 107.693 95.787 88.211l-0.541-1.623c9.199 2.165 18.401 4.871 27.6 4.871h411.831c25.434 0 48.165-11.364 61.694-30.306 14.070-19.482 17.318-44.918 9.741-70.352l-148.281-490.3c-25.434-83.34-39.505-101.74-108.235-101.74h-470.277c-7.035 0-15.694-1.623-20.565-8.117-4.329-6.495-4.871-11.364-0.541-23.269 10.823-31.388 48.165-37.881 77.93-37.881h499.501c20.024 0 43.293 11.364 49.247 30.846l162.352 534.135c3.248 10.281 3.248 21.106 2.706 30.846 12.447-4.871 23.811-12.447 31.929-23.269zM372.959 509.57c-3.248-9.741 2.165-17.318 11.905-17.318h329.032c9.199 0 19.482 7.576 22.728 17.318l11.364 34.635c3.248 9.741-2.165 17.318-11.905 17.318h-329.032c-9.199 0-19.482-7.576-22.728-17.318zM328.043 371.031c-3.248-9.741 2.165-17.318 11.905-17.318h329.032c9.199 0 19.482 7.576 22.728 17.318l11.364 34.635c3.248 9.741-2.165 17.318-11.905 17.318h-329.032c-9.199 0-19.482-7.576-22.728-17.318z" />

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.
Binary file not shown.