[open-ils-commits] r17366 - trunk/Open-ILS/xul/staff_client/server/cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 30 08:26:05 EDT 2010
Author: dbs
Date: 2010-08-30 08:26:04 -0400 (Mon, 30 Aug 2010)
New Revision: 17366
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
Log:
Refine the backspace operation in spine label editor
Make backspace at the start of a line also move up to the previous row.
Modified: trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-08-27 21:58:24 UTC (rev 17365)
+++ trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-08-30 12:26:04 UTC (rev 17366)
@@ -380,7 +380,7 @@
case dojo.keys.BACKSPACE : {
/* Delete line if at the start of an input box */
- if (sel_start == 0) {
+ if (sel_start == 0 && sel_end == sel_start) {
var new_label = '';
var chunk;
var x = 0;
@@ -405,6 +405,13 @@
generate({"acn": row_id.acn, "label": new_label});
$(row_id.prefix + row_id.spine).focus();
}
+ if (sel_start == 0) {
+ /* Move to the previous row */
+ var prev_row = $(row_id.prefix + (parseInt(row_id.spine) - 1));
+ if (prev_row) {
+ prev_row.focus();
+ }
+ }
break;
}
More information about the open-ils-commits
mailing list