Skip to content

Commit 48e435a

Browse files
committed
Fixes & improvements
1 parent 962a00a commit 48e435a

File tree

8 files changed

+158
-250
lines changed

8 files changed

+158
-250
lines changed

Unit1.dfm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
object Main: TMain
22
Left = 199
33
Top = 129
4-
BorderIcons = [biSystemMenu, biMinimize]
5-
BorderStyle = bsSingle
4+
Width = 621
5+
Height = 462
66
Caption = 'eNotes'
7-
ClientHeight = 580
8-
ClientWidth = 721
97
Color = clBtnFace
108
Font.Charset = DEFAULT_CHARSET
119
Font.Color = clWindowText
@@ -23,14 +21,14 @@ object Main: TMain
2321
object WebView: TWebBrowser
2422
Left = 0
2523
Top = 0
26-
Width = 721
27-
Height = 580
24+
Width = 605
25+
Height = 424
2826
Align = alClient
2927
TabOrder = 0
3028
OnBeforeNavigate2 = WebViewBeforeNavigate2
3129
OnDocumentComplete = WebViewDocumentComplete
3230
ControlData = {
33-
4C000000844A0000F23B00000000000000000000000000000000000000000000
31+
4C000000873E0000D22B00000000000000000000000000000000000000000000
3432
000000004C000000000000000000000001000000E0D057007335CF11AE690800
3533
2B2E126208000000000000004C0000000114020000000000C000000000000046
3634
8000000000000000000000000000000000000000000000000000000000000000

Unit1.pas

Lines changed: 100 additions & 146 deletions
Large diffs are not rendered by default.

bg.png

-147 Bytes
Binary file not shown.

done.png

237 Bytes
Loading
442 Bytes
Binary file not shown.

main.htm

Lines changed: 53 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -2,116 +2,72 @@
22
<html>
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5-
<meta name="description" content="eNotes"/>
6-
<title>Заметки</title>
5+
<meta name="description" content="Описание"/>
6+
<title>Заголовок</title>
77
<link rel="stylesheet" href="all.css">
88
<style type="text/css">
99
html,body{padding:0;margin:0;}
1010
body{font-family:Segoe UI; color:#666666; background-color:#f8f8f8;}
11-
#clear{clear:both;float:none;height:0;}
11+
#clear{clear:both;float:none; height:0;}
1212

13-
#header{background-color:#017d93; text-align:center; height:50px; color:white; border-bottom:solid 1px #005665; font-size: 16px; cursor: default;}
14-
#header #back{float:left; width:120px; height:46px;}
15-
#header #back_btn{margin:7px 10px; padding:7px 14px; cursor:pointer; background-color:#007185; }
16-
#header #back_btn:hover{background-color:#008aa3;}
17-
#header #MainTitle{display: inline-block; margin-top:10px; font-size:20px;}
18-
#header #button{margin:7px 10px; padding:7px 14px; cursor:pointer; background-color:#007185; }
19-
#header #button:hover{background-color:#008aa3;}
13+
#wrapper{position:fixed; width:100%;height:100%;}
2014

21-
#list{overflow:auto; height:528px; cursor:default; font-size:16px; color:black;}
22-
#list #note{cursor:pointer; height:40px; border-bottom:1px solid #ededed;}
23-
#list #note:hover{background-color:#ededed;}
24-
#list #note #title{float:left; margin:8px;}
25-
#list #note #date{float:right; color:#454545; font-size:10pt; margin:10px;}
15+
#panel{width:100%; height:40px; overflow:hidden; background-color:#017d93; color:white; text-align:center; cursor:default;}
16+
#btn{width:20px; height:20px; padding:9px 10px; cursor:pointer;}
17+
#btn:hover{opacity:0.7;}
2618

27-
#meta{display:none; color:#ac5942; margin:8px 10px; font-size:11pt; cursor:default;}
28-
#meta #DayAgo{float:left; font-weight:bold;}
29-
#meta #DateNote{float:right;}
19+
#panel .title{display:inline-block; max-width:60%; margin-top:7px; font-size:16px; font-weight:400px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
3020

31-
#memo{display:none; margin-top:6px; color:#ac5942; background-image: url(bg.png);}
32-
#memo textarea{background-color:transparent; font-family:Segoe UI; font-size: 16px; border:none; overflow:auto; width: 702px; height: inherit; line-height: 40px; margin: 0 8px; height:482px;}
21+
#list{float:left; width:33%; height:100%; font-size:14px; color:black;}
22+
#list #items{overflow:auto; border-right: 1px solid #d5d5d5;}
23+
#list #items #note{cursor:pointer; height:40px; border-bottom:1px solid #ededed; overflow:hidden;}
24+
#list #items #note:hover{background-color:#ededed;}
25+
#list #items #note #title{float:left; margin:10px 4px 10px 8px; width:48%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
26+
#list #items #note #date{float:right; color:#454545; font-size:10pt; margin:10px 10px 10px 4px;}
3327

34-
#additional{display:none; position:absolute; height:50px; width:100%; border-top:solid 1px #cecece; background-color:#dadada;}
35-
#add_btn, #add_btn2{float:left; margin:6px 0 6px 10px; padding:7px 14px; cursor:pointer; background-color:#b9b8b8; color:black;}
36-
#add_btn:hover, #add_btn2:hover{background-color:#afafaf;}
37-
#add_btn2{float:right; margin:6px 10px 6px 0;}
28+
#editor{float:right; width:67%; height:100%;}
29+
#meta{color:#ac5942; height:38px; width:100%; font-size:14px; cursor:default; overflow:hidden; white-space:nowrap;}
30+
#meta #DayAgo{float:left; font-weight:bold; margin:8px 0 0 12px;}
31+
#meta #DateNote{float:right; margin:8px 12px 0 0;}
32+
33+
#editor #memo{display:block; width:96%; margin:0% 2%; background-color:transparent; font-family:Segoe UI; font-size: 14px; border:none; overflow:auto; }
3834
</style>
39-
<script type="text/javascript">
40-
function btn()
41-
{
42-
switch (document.getElementById("button").innerHTML) {
43-
case "+" :
44-
document.location='#new';
45-
break;
46-
default:
47-
document.location='#button';
48-
break;
49-
}
50-
51-
}
52-
53-
function GetSelectedText(){
54-
var userSelection, ta;
55-
if (window.getSelection && document.activeElement){
56-
if (document.activeElement.nodeName == "TEXTAREA" ||
57-
(document.activeElement.nodeName == "INPUT" &&
58-
document.activeElement.getAttribute("type").toLowerCase() == "text")){
59-
ta = document.activeElement;
60-
userSelection = ta.value.substring(ta.selectionStart, ta.selectionEnd);
61-
} else {
62-
userSelection = window.getSelection();
63-
}
64-
return userSelection.toString();
65-
} else {
66-
// all browsers, except IE before version 9
67-
if (document.getSelection){
68-
userSelection = document.getSelection();
69-
return userSelection.toString();
70-
}
71-
// IE below version 9
72-
else if (document.selection){
73-
userSelection = document.selection.createRange();
74-
return userSelection.text;
75-
}
76-
}
77-
}
78-
79-
function CopySelect()
80-
{
81-
document.getElementById("Clipbrd_value").value=GetSelectedText();
82-
document.getElementById("text").style.height='442px';
83-
document.getElementById("additional").style.display='block';
84-
}
85-
86-
function HideSubMenu()
87-
{
88-
document.getElementById('additional').style.display='none';
89-
document.getElementById('text').style.height='482px';
90-
}
91-
92-
function Copy()
93-
{
94-
document.location='#copy';
95-
HideSubMenu();
96-
}
97-
35+
<script type="text/javascript">
36+
function UpdateSizes(){
37+
if (window.innerHeight - 40 > 0)
38+
document.getElementById("items").style.height=window.innerHeight - 40 + 'px';
39+
if (window.innerHeight - 82 > 0)
40+
document.getElementById("memo").style.height=window.innerHeight - 82 + 'px';
41+
}
42+
43+
document.addEventListener("DOMContentLoaded", function(event) {
44+
UpdateSizes();
45+
});
46+
47+
window.onresize = function(event) {
48+
UpdateSizes();
49+
}
9850
</script>
9951
</head>
10052
<body oncontextmenu="return false">
101-
<div id="header" onselectstart="return false">
102-
<div id="back"><div onclick="document.location='#all';" id="back_btn">Назад</div></div>
103-
<div id="MainTitle">Заметки (9)</div>
104-
<div style="float:right; width:120px; height:46px;"><div onclick="btn();" id="button">+</div></div>
105-
</div>
106-
<div id="list" onselectstart="return false">
107-
<div onclick="document.location='#note1';" id="note"><div id="title">Пример</div><div id="date">17:55</div></div>
108-
</div>
109-
<div id="meta" onselectstart="return false"><div id="DayAgo">3 дня назад</div><div id="DateNote">25 сент. 2:29</div></div>
110-
<div id="clear"></div>
111-
<div id="memo">
112-
<textarea onselect="CopySelect();" onkeypress="if (document.getElementById('button').innerHTML=='Удалить') document.getElementById('button').innerHTML='Обновить';if (document.getElementById('button').innerHTML=='Delete') document.getElementById('button').innerHTML='Update';HideSubMenu();" id="text"></textarea>
113-
<input id="Clipbrd_value" value="" type="hidden" />
53+
<div id="wrapper">
54+
<div id="list" onselectstart="return false">
55+
<div id="panel">
56+
<div id="btn" class="add" style="float:left;" onclick="document.location='#new';"><img src="new.png" /></div>
57+
<div class="title" id="NotesCount">Заметки (3)</div>
58+
<div id="btn" style="float:right;cursor:default;"></div>
59+
</div>
60+
<div id="items">
61+
<div onclick="document.location='#note1';" id="note"><div id="title">Пример</div><div id="date">17:55</div></div>
62+
</div>
63+
</div>
64+
65+
<div id="editor">
66+
<div id="panel" onselectstart="return false"><div id="btn" style="float:left;" onclick="document.location='#rem';"><img src="rm.png" /></div><div class="title" id="NoteTitle">Заметка</div><div id="btn" style="float:right;" onclick="document.location='#done';"><img src="done.png" /></div></div>
67+
<div id="meta" onselectstart="return false"><div id="DayAgo">3 дня назад</div><div id="DateNote">25 сент. 2:29</div></div>
68+
<div id="clear"></div>
69+
<textarea id="memo">Текст</textarea>
70+
</div>
11471
</div>
115-
<div id="additional" onselectstart="return false"><div onclick="Copy();" id="add_btn">Копировать</div><div onclick="HideSubMenu();" id="add_btn2"></div></div>
11672
</body>
11773
</html>

new.png

197 Bytes
Loading

rm.png

236 Bytes
Loading

0 commit comments

Comments
 (0)