From f88bdbdaad44c5a99e8bf68f700767d305732bb5 Mon Sep 17 00:00:00 2001 From: Rich Village Date: Sun, 16 Sep 2018 00:08:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8D=B0=EC=8A=A4=ED=81=AC=ED=83=91=20?= =?UTF-8?q?=EC=9A=B0=ED=81=B4=EB=A6=AD=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80,=20=EC=95=B1=20=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=B0=8F=20=EB=8D=B0=EC=8A=A4=ED=81=AC=ED=83=91=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=B0=BD=20=EC=B6=94=EA=B0=80=20Added=20Desktop=20?= =?UTF-8?q?Right=20Click=20Event,=20App=20List=20and=20Desktop=20Settings?= =?UTF-8?q?=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- res/ui_front/app-drawer.html | 11 +++++++++++ res/ui_front/css/context_menu.css | 31 ++++++++++++++++++++++++++++++ res/ui_front/desktop-settings.html | 11 +++++++++++ res/ui_front/desktop.html | 18 +++++++++++++++-- res/ui_front/js/clock.js | 10 ++++++++-- res/ui_front/js/context_menu.js | 23 ++++++++++++++++++++++ 6 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 res/ui_front/app-drawer.html create mode 100644 res/ui_front/css/context_menu.css create mode 100644 res/ui_front/desktop-settings.html create mode 100644 res/ui_front/js/context_menu.js diff --git a/res/ui_front/app-drawer.html b/res/ui_front/app-drawer.html new file mode 100644 index 0000000..cd20a02 --- /dev/null +++ b/res/ui_front/app-drawer.html @@ -0,0 +1,11 @@ + + + + + + App Drawer + + + Installed Apps + + diff --git a/res/ui_front/css/context_menu.css b/res/ui_front/css/context_menu.css new file mode 100644 index 0000000..d2de339 --- /dev/null +++ b/res/ui_front/css/context_menu.css @@ -0,0 +1,31 @@ +#context-menu { + list-style: none; + margin: 0px; + margin-top: 4px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 3px; + font-size: 15px; + color: #ffffff; +} + +#rc-menu { + display: none; + position: fixed; + border: 1px solid green; + width: 200px; + background: #616161; + box-shadow: 3px 3px 2px #E9E9E9; + border-radius: 4px; +} + +li { + padding; 3px; + padding-left: 10px; +} + +#context-menu :hover { + color: white; + background: #9E9E9E; + border-radius: 2px; +} diff --git a/res/ui_front/desktop-settings.html b/res/ui_front/desktop-settings.html new file mode 100644 index 0000000..32b2543 --- /dev/null +++ b/res/ui_front/desktop-settings.html @@ -0,0 +1,11 @@ + + + + + + Desktop Settings + + + Desktop Settings + + diff --git a/res/ui_front/desktop.html b/res/ui_front/desktop.html index 0e1c904..d9f4c8f 100644 --- a/res/ui_front/desktop.html +++ b/res/ui_front/desktop.html @@ -3,8 +3,10 @@ + +
@@ -16,7 +18,19 @@

- + + +
+ +
+ + + - \ No newline at end of file + diff --git a/res/ui_front/js/clock.js b/res/ui_front/js/clock.js index 10fc37d..a29e655 100644 --- a/res/ui_front/js/clock.js +++ b/res/ui_front/js/clock.js @@ -13,6 +13,11 @@ hour = hour - 12; } + else if (hour == 0) { + AMPM = "오전"; + hour = hour + 12; + } + else if (hour == 12) { AMPM = "오후"; } @@ -23,7 +28,8 @@ minute = checkTime(minute); second = checkTime(second); - + month = checkTime(month); + document.getElementById('clock').innerHTML = AMPM + " " + hour + ":" + minute; document.getElementById('date').innerHTML = year + "-" + month + "-" + date; var t = setTimeout(startTime, 500); @@ -35,4 +41,4 @@ function checkTime (i) { i = "0" + i; } return i; -} \ No newline at end of file +} diff --git a/res/ui_front/js/context_menu.js b/res/ui_front/js/context_menu.js new file mode 100644 index 0000000..1590cd1 --- /dev/null +++ b/res/ui_front/js/context_menu.js @@ -0,0 +1,23 @@ +// Right Click context menu, requires jQuery +$(document).bind("contextmenu", function(e) { + e.preventDefault(); + $("#rc-menu").css("left", e.pageX); + $("#rc-menu").css("top", e.pageY); + $("#rc-menu").fadeIn(100, startFocusOut()); +}); + +function startFocusOut() { + $(document).on("click", function() { + $("#rc-menu").hide(); + $(document).off("click"); + }); +} + +$("#context-menu > li").click(function() { + if ($(this).text() == "Open App Drawer") { + window.open("./app-drawer.html", "App List", "width=1280,height=720"); + } + if ($(this).text() == "Open Desktop Settings") { + window.open("./desktop-settings.html", "Desktop Settings", "width=1280,height=720"); + } +});