mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-18 09:24:55 +00:00
基本完成
This commit is contained in:
@@ -1153,7 +1153,9 @@ Note.fixNetOrAuthError = function() {
|
||||
}
|
||||
};
|
||||
|
||||
// 同步进度显示
|
||||
Note.syncProcess = function(msg) {
|
||||
$('body').show();
|
||||
$('#allProcess').hide();
|
||||
$('#syncProcess').html(msg);
|
||||
};
|
||||
|
@@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
Reference in New Issue
Block a user