...
|
...
|
@@ -4,10 +4,9 @@ |
|
|
* @date: 2017/03/09
|
|
|
*/
|
|
|
|
|
|
/* global gDomains injected from client.hbs*/
|
|
|
/* global gDomains injected from client.hbs*/ // eslint-disable-line
|
|
|
var $ = require('yoho-jquery');
|
|
|
var Handlebars = require('yoho-handlebars');
|
|
|
var config = require('../../../config/common');
|
|
|
|
|
|
// dialog html
|
|
|
var $view = '<div class="mask-dialog preview-dialog">' +
|
...
|
...
|
@@ -35,7 +34,9 @@ var $viewHbs = Handlebars.compile($view); |
|
|
* @param cb 上传成功的回调
|
|
|
*/
|
|
|
function Paste(sl, cb) {
|
|
|
if (typeof sl !== 'string') { return; }
|
|
|
if (typeof sl !== 'string') {
|
|
|
return;
|
|
|
}
|
|
|
this.$el = document.querySelector(sl);
|
|
|
this.formData = null;
|
|
|
this.uploadCb = cb;
|
...
|
...
|
@@ -143,7 +144,12 @@ Paste.prototype = { |
|
|
},
|
|
|
|
|
|
open: function() {
|
|
|
var dh, vh = $(window).height();
|
|
|
var $main = $('.preview-dialog .dialog-main');
|
|
|
|
|
|
this.$preview.show();
|
|
|
dh = $main.height();
|
|
|
$main.css('top', (vh - dh - 40) / 2);
|
|
|
},
|
|
|
|
|
|
close: function() {
|
...
|
...
|
|