...
|
...
|
@@ -4,6 +4,7 @@ |
|
|
* @date: 2016/3/1
|
|
|
*/
|
|
|
var $ = require('yoho-jquery');
|
|
|
var ImgPreview = require('../common/img-preview');
|
|
|
|
|
|
var $comment = $('.comment-table'),
|
|
|
$remarkBtn = $comment.find('.remark-btn');
|
...
|
...
|
@@ -14,7 +15,8 @@ var $dialog = $('#comment-dialog-widget'), |
|
|
|
|
|
var pageW = $(document).width(),
|
|
|
pageH = $(document).height(),
|
|
|
winH = $(window).height();
|
|
|
winH = $(window).height(),
|
|
|
preview = new ImgPreview();
|
|
|
|
|
|
var dialog = {
|
|
|
canmove: false,
|
...
|
...
|
@@ -90,6 +92,13 @@ $(document).mousemove(function(e) { |
|
|
dialog.canmove = false;
|
|
|
});
|
|
|
|
|
|
$('.img-preview').on('click', 'i.view', function() {
|
|
|
|
|
|
var url = $(this).closest('.img-preview').find('img').attr('src');
|
|
|
|
|
|
preview.preview(url);
|
|
|
});
|
|
|
|
|
|
$dialog.on('click', '.dialog-save-btn', function() {
|
|
|
var remark = $.trim($commentArea.val()),
|
|
|
param;
|
...
|
...
|
@@ -126,8 +135,8 @@ $dialog.on('click', '.dialog-close-btn', function() { |
|
|
$dialog.addClass('hide');
|
|
|
});
|
|
|
|
|
|
$('.comment-add input:file').each(function(e) {
|
|
|
var $this = $('#upload-img-' + e),
|
|
|
$('.comment-add input[type="file"]').each(function(i, it) {
|
|
|
var $this = $(it),
|
|
|
$par = $this.closest('.problem-description');
|
|
|
|
|
|
if (!window.location.origin) {
|
...
|
...
|
@@ -140,8 +149,8 @@ $('.comment-add input:file').each(function(e) { |
|
|
file_post_name: 'fileData',
|
|
|
button_text: '<span class="btn_upload_text">上传图片</span>',
|
|
|
button_text_style: '.btn_upload_text{color: #ffffff;}',
|
|
|
button_width: 116,
|
|
|
button_height: 33,
|
|
|
button_width: 60,
|
|
|
button_height: 60,
|
|
|
button_text_left_padding: 32,
|
|
|
button_text_top_padding: 8,
|
|
|
button_action: window.SWFUpload.BUTTON_ACTION.SELECT_FILE,
|
...
|
...
|
@@ -169,6 +178,11 @@ $('.comment-add input:file').each(function(e) { |
|
|
// comment form
|
|
|
$('.comment-table').on('click', '[data-role="showCommentForm"]', function() {
|
|
|
// $('[data-role="showCommentForm"]).
|
|
|
var $ntr = $(this).closest('tr').next('tr');
|
|
|
|
|
|
if ($ntr.attr('data-role') === 'commentAddForm') {
|
|
|
$ntr.toggle();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|