|
@@ -908,6 +908,12 @@
|
|
|
//Context Menu variables
|
|
|
var menuStartLocation = [0, 0];
|
|
|
|
|
|
+ //Input Method Editor objects
|
|
|
+ window.ime = {
|
|
|
+ handler: null,
|
|
|
+ focus: null
|
|
|
+ };
|
|
|
+
|
|
|
//Others
|
|
|
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
|
var daysNames = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
|
|
@@ -917,6 +923,7 @@
|
|
|
var downloadMode = false;
|
|
|
var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
|
|
|
|
+
|
|
|
//Initiation functions
|
|
|
initDesktopTheme();
|
|
|
initDesktopHostInfo();
|
|
@@ -1957,7 +1964,7 @@
|
|
|
//Move the current fw to top, its z index is now 101
|
|
|
MoveFloatWindowToTop(object);
|
|
|
var windowID = $(object).attr("windowId");
|
|
|
- console.log("Pinning window " + windowID)
|
|
|
+ console.log("[Desktop] Pinning window ID: " + windowID)
|
|
|
//Move this to fixed layer position
|
|
|
$(object).addClass("topmost");
|
|
|
$(object).css("z-index", 501);
|
|
@@ -4320,6 +4327,16 @@
|
|
|
if( index >= 0){
|
|
|
$(object).find(".renameInput")[0].setSelectionRange(0, index);
|
|
|
}
|
|
|
+
|
|
|
+ //Updates 4-5-2021: Added IME support on rename input
|
|
|
+ $(object).find(".renameInput")[0].addEventListener("keydown", function(event){
|
|
|
+ if (window.ime && window.ime.handler != null){
|
|
|
+ window.ime.handler(event);
|
|
|
+ }else{
|
|
|
+ //No IME handler. Just continue the input
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.ime.focus = $(object).find(".renameInput")[0];
|
|
|
}
|
|
|
|
|
|
function exitRenameMode() {
|
|
@@ -4516,7 +4533,11 @@
|
|
|
//Set the icon location
|
|
|
setIconDesktopLocation(newfn, closestGridIndexLocation[0], closestGridIndexLocation[1], function(){
|
|
|
//Refresh the desktop
|
|
|
- refresh();
|
|
|
+ refresh(function(){
|
|
|
+ var targetNewFile = getObjectFromGridLocation(closestGridIndexLocation[0], closestGridIndexLocation[1]);
|
|
|
+ console.log("Renaming ", targetNewFile);
|
|
|
+ enableRenameOnLaunchIconObject(targetNewFile);
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -4986,6 +5007,23 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ function bindObjectToIMEEvents(object){
|
|
|
+ object.addEventListener("keydown", function(event){
|
|
|
+ if (window.ime && window.ime.handler != null){
|
|
|
+ window.ime.handler(event);
|
|
|
+ }else{
|
|
|
+ //No IME handler. Just continue the input
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ object.addEventListener("focus", function(event){
|
|
|
+ if (window.ime){
|
|
|
+ //IME exists. Set this field to focused field
|
|
|
+ window.ime.focus = event.target;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
|