display:none;
}
- div.osd {
- top: 9px;
- position: fixed;
- width: 100%;
- text-align: right;
- }
-
- div.osd span {
- border: 1px solid #999;
- background-color: #f5f5f5;
- padding: 8px;
- color: #999;
- -webkit-border-bottom-left-radius: 10px;
- visibility: hidden;
- }
-
.selected {
outline: 1px dotted black;
background-color: #eef;
console.log ("speed_dial-save-delete " + id);
}
- var key_id = 's';
- var key_timeout;
-
- document.onkeypress = function ()
- {
- key_id = key_id + String.fromCharCode (event.which);
-
- clearTimeout (key_timeout);
-
- document.getElementById('dialing').innerText = key_id.substr(1);
- document.getElementById('dialing').style.visibility = 'visible';
-
- var div = document.getElementById(key_id);
- if (div)
- {
- if (key_id.substr(1) > 9)
- {
- if (getAction (key_id))
- document.location = div.childNodes[0].childNodes[1].href;
- key_id = 's';
- }
- else
- key_timeout = setTimeout ('if (getAction (key_id)) document.location = document.getElementById(key_id).childNodes[0].childNodes[1].href; key_id = \'s\'', 1000);
- }
- else
- key_id = 's';
-
- if (key_id.length <= 1)
- document.getElementById('dialing').style.visibility = 'hidden';
-
- return false;
- }
var firstNode, secondNode;
var cursor;
</script>
</head>
<body>
- <div class="osd" >
- <span id="dialing"></span>
- </div>
<div id="content">
get_thumb (tile, uri);
}
markup.append_printf ("""
- <div class="shortcut" id="s%u"><div class="preview">
- <a class="cross" href="#" onclick='clearShortcut("s%u");'></a>
+ <div class="shortcut" id="%u"><div class="preview">
+ <a class="cross" href="#" onclick='clearShortcut("%u");'></a>
<a href="%s"><img src="data:image/png;base64,%s" title='%s'></a>
- </div><div class="title" onclick='renameShortcut("s%u");'>%s</div></div>
+ </div><div class="title" onclick='renameShortcut("%u");'>%s</div></div>
""",
slot, slot, uri, encoded ?? "", title, slot, title ?? "");
}
}
markup.append_printf ("""
- <div class="shortcut" id="s%u"><div class="preview new">
- <a class="add" href="#" onclick='return getAction("s%u");'></a>
+ <div class="shortcut" id="%u"><div class="preview new">
+ <a class="add" href="#" onclick='return getAction("%u");'></a>
</div><div class="title">%s</div></div>
""",
slot_count + 1, slot_count + 1, _("Click to add a shortcut"));
if (action == "add" || action == "rename"
|| action == "delete" || action == "swap") {
- uint slot_id = parts[1].next_char().to_int () ;
+ uint slot_id = parts[1].to_int () ;
string dial_id = "Dial %u".printf (slot_id);
if (action == "delete") {
keyfile.set_string (dial_id, "title", title);
}
else if (action == "swap") {
- uint slot2_id = parts[2].next_char().to_int ();
+ uint slot2_id = parts[2].to_int ();
string dial2_id = "Dial %u".printf (slot2_id);
string uri = keyfile.get_string (dial_id, "uri");
Katze.assert_str_equal (json, dial_data.get_next_free_slot (), "Dial 2");
Katze.assert_str_equal (json, dial_json.get_next_free_slot (), "Dial 2");
- dial_data.save_message ("speed_dial-save-rename s1 Lorem");
+ dial_data.save_message ("speed_dial-save-rename 1 Lorem");
Katze.assert_str_equal (data, dial_data.keyfile.get_string ("Dial 1", "title"), "Lorem");
- dial_data.save_message ("speed_dial-save-delete s1");
+ dial_data.save_message ("speed_dial-save-delete 1");
Katze.assert_str_equal (data, dial_data.get_next_free_slot (), "Dial 1");
}