基本完成

This commit is contained in:
life
2015-03-05 21:50:59 +08:00
parent b8fc9c6df4
commit 0e6fc7ac2b
120 changed files with 424 additions and 318 deletions

View File

@@ -1153,7 +1153,9 @@ Note.fixNetOrAuthError = function() {
}
};
// 同步进度显示
Note.syncProcess = function(msg) {
$('body').show();
$('#allProcess').hide();
$('#syncProcess').html(msg);
};

View File

@@ -1410,6 +1410,13 @@ function initPage() {
});
});
win.on('focus', function() {
$('body').removeClass('blur');
});
win.on('blur', function() {
$('body').addClass('blur');
});
// 注入前端变量#
WebService.set(Notebook, Note, Attach, Tag);
@@ -1465,7 +1472,8 @@ function initPage() {
// 开始时显示loading......
// 隐藏mask
$("#mainMask").html("");
$("#mainMask").hide(100);
$("#mainMask").hide(0);
$('body').show();
});
};

View File

@@ -62,15 +62,14 @@ var win = gui.Window.get();
win.resizeTo(1100, 600);
win.setPosition('center');
$(function() {
$('.tool-close').click(function() {
$('.tool-close, .tool-close-blur').click(function() {
win.close();
});
$('.tool-min').click(function() {
$('.tool-min, .tool-min-blur').click(function() {
win.minimize();
});
$('.tool-max').click(function() {
$('.tool-max, .tool-max-blur').click(function() {
win.maximize();
// win.toggleFullscreen(); // mac下是新屏幕
// 全屏模式
// win.toggleKioskMode();
@@ -80,13 +79,6 @@ $(function() {
// bind close event
// 保存当前打开的笔记
win.on('focus', function() {
console.log('window is focused ');
});
win.on('blur', function() {
console.log('not focuse ');
});
function isURL(str_url) {
var re = new RegExp("^((https|http|ftp|rtsp|mms|emailto)://).+");
return re.test(str_url);

View File

@@ -1397,6 +1397,16 @@ function commonCmd(e) {
document.execCommand('cut');
}
}
};
}
function loadToolIcons() {
var imgs = ['traffic-close-hover@2x.png', 'traffic-minimise-hover@2x.png', 'traffic-zoom-hover@2x.png'];
for(var i in imgs) {
var imageObj = new Image();
imageObj.src = 'public/css/icon/' + imgs[i];
}
}
// loadToolIcons();
ContextTips.init();