diff --git a/ui (gen4)/css/layout.less b/ui (gen4)/css/layout.less index 7694a0b8..67a84262 100755 --- a/ui (gen4)/css/layout.less +++ b/ui (gen4)/css/layout.less @@ -1482,6 +1482,23 @@ stretching in width... */ opacity: 1; } +/* Capslock indicator.. */ +.overlay-info .capslock-state { + font-size: small; + font-style: italic; + margin: 0px 10pt; +} +.overlay-info .capslock-state:not(.on) { + opacity: 0.2; +} +.overlay-info .capslock-state.on { + color: yellow; + opacity: 0.6; +} +.overlay-info .capslock-state:hover { + opacity: 1 +} + /*************************************************** Global status ***/ diff --git a/ui (gen4)/features/keyboard.js b/ui (gen4)/features/keyboard.js index 82c41b02..beb0e30a 100755 --- a/ui (gen4)/features/keyboard.js +++ b/ui (gen4)/features/keyboard.js @@ -271,16 +271,20 @@ module.GLOBAL_KEYBOARD = { shift_End: 'lastRibbon', Up: 'prevRibbon', + caps_shift_Up: 'prevRibbon', Down: 'nextRibbon', + caps_shift_Down: 'nextRibbon', // shifting... shift_Up: 'shiftImageUp', + caps_Up: 'shiftImageUp', alt_shift_Up: 'travelImageUp', ctrl_shift_Up: 'shiftImageUpNewRibbon', ctrl_Up: 'shiftMarkedUp', shift_Down: 'shiftImageDown', + caps_Down: 'shiftImageDown', alt_shift_Down: 'travelImageDown', ctrl_shift_Down: 'shiftImageDownNewRibbon', ctrl_Down: 'shiftMarkedDown', diff --git a/ui (gen4)/features/meta.js b/ui (gen4)/features/meta.js index 996ca2b8..2fde753f 100755 --- a/ui (gen4)/features/meta.js +++ b/ui (gen4)/features/meta.js @@ -64,7 +64,6 @@ core.ImageGridFeatures.Feature('viewer-testing', [ 'ui-single-image', //'ui-partial-ribbons', - // XXX this is still experimental but seems to already work faster... 'ui-partial-ribbons-2', 'marks', diff --git a/ui (gen4)/features/ui-status.js b/ui (gen4)/features/ui-status.js index 43e94249..fd33504d 100755 --- a/ui (gen4)/features/ui-status.js +++ b/ui (gen4)/features/ui-status.js @@ -62,6 +62,7 @@ var StatusBarActions = actions.Actions({ // separates left/right aligned elements... '---', + 'edit-mode', 'mark', 'bookmark', ], @@ -90,7 +91,39 @@ var StatusBarActions = actions.Actions({ }, __statusbar_elements__: { + /* item template... + item: function(item){ + // cleanup... + if(item == null){ + // XXX + return + } + + // setup the item DOM... + if(typeof(item) == typeof('str')){ + var type = item + item = $('') + .addClass('item-example') + .attr('type', item) + .text('example') + + // get stuff from the item... + } else { + var type = item.attr('type') + } + + // update the item... + // XXX + + return item + }, + */ index: function(item, gid, img){ + // cleanup... + if(item == null){ + return + } + var that = this gid = gid || this.current @@ -188,6 +221,11 @@ var StatusBarActions = actions.Actions({ return item }, ribbon: function(item, gid, img){ + // cleanup... + if(item == null){ + return + } + var that = this // get ribbon number... @@ -248,6 +286,11 @@ var StatusBarActions = actions.Actions({ return item }, changes: function(item, gid, img){ + // cleanup... + if(item == null){ + return + } + if(typeof(item) == typeof('str')){ item = $('') .addClass('changes') @@ -260,6 +303,11 @@ var StatusBarActions = actions.Actions({ }, // XXX handle path correctly... gid: function(item, gid, img){ + // cleanup... + if(item == null){ + return + } + var that = this gid = gid || this.current img = img || (this.images && gid in this.images && this.images[gid]) @@ -309,8 +357,54 @@ var StatusBarActions = actions.Actions({ return item }, path: 'gid', + 'edit-mode': function(item){ + // cleanup... + if(item == null){ + this.__edit_mode_indicator_update + && this.off('keyPress', this.__edit_mode_indicator_update) + delete this.__edit_mode_indicator_update + return + } + + var update = this.__edit_mode_indicator_update = this.__edit_mode_indicator_update + || (function(){ + var caps = this.keyboard.capslock + caps = typeof(event) != 'undefined' && event.getModifierState ? + event.getModifierState('CapsLock') + : caps + item + .attr('info', 'Edit mode ' + + (caps ? 'on' : 'off') + + ' (Click to update / Press CapsLock to toggle)') + [caps ? 'addClass' : 'removeClass']('on') + }).bind(this) + + + if(typeof(item) == typeof('str')){ + var type = item + item = $('') + .addClass('capslock-state expanding-text') + .append($('') + .text('E')) + .append($('