some tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-08 06:24:56 +03:00
parent de6850bc36
commit 8da34990b5
4 changed files with 39 additions and 20 deletions

View File

@ -197,7 +197,7 @@ body {
.browse-widget .list .item .sort-handle { .browse-widget .list .item .sort-handle {
display: inline-block; display: inline-block;
float: right; float: left;
padding-left: 0.2em; padding-left: 0.2em;
padding-right: 0.5em; padding-right: 0.5em;

View File

@ -303,48 +303,49 @@
/* numbers... */ /* numbers... */
/* XXX need to show this only on devices with keyboards... */ /* XXX need to show this only on devices with keyboards... */
.browse-widget .list .text:before { .browse-widget .list .item:before {
opacity: 0.3; opacity: 0.3;
float: left; float: left;
font-size: small; font-size: small;
} }
.browse-widget.filtering .list .item .text:first-child:before { .browse-widget.filtering .list .item:before {
display: none; display: none;
} }
.browse-widget .list .item .text:first-child:before { .browse-widget .list .item:before {
width: 12px; width: 12px;
margin-left: -15px; margin-left: -15px;
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(1) .text:first-child:before { /* XXX these are messed up with groups... */
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(1):before {
content: "1"; content: "1";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(2) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(2):before {
content: "2"; content: "2";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(3) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(3):before {
content: "3"; content: "3";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(4) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(4):before {
content: "4"; content: "4";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(5) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(5):before {
content: "5"; content: "5";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(6) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(6):before {
content: "6"; content: "6";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(7) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(7):before {
content: "7"; content: "7";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(8) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(8):before {
content: "8"; content: "8";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(9) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(9):before {
content: "9"; content: "9";
} }
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(10) .text:first-child:before { .browse-widget:not(.no-item-numbers) .list .item:nth-of-type(10):before {
content: "0"; content: "0";
} }

View File

@ -733,11 +733,19 @@ var URLHistoryUIActions = actions.Actions({
to_remove: to_remove, to_remove: to_remove,
/*/ XXX not sure if this is the right way...
pins_buttons: [
// open...
['<span class="show-on-hover">&#8599;</span>',
function(p){ dialog.browsePath(p) }],
'PIN',
'REMOVE',
],
//*/
buttons: [ buttons: [
// open... // open...
['<span class="show-on-hover">&#8599;</span>', ['<span class="show-on-hover">&#8599;</span>',
function(p){ dialog.browsePath(p) }], function(p){ dialog.browsePath(p) }],
// XXX should the pins have a "to top" button???
['&diams;', 'TO_TOP'], ['&diams;', 'TO_TOP'],
'PIN', 'PIN',
'REMOVE', 'REMOVE',

View File

@ -815,10 +815,16 @@ function(list, options){
// make sortable... // make sortable...
if(options.sortable){ if(options.sortable){
// add sort handle... // add sort handle...
res.find('.text:first-child')
.before($('<span>')
.addClass('sort-handle')
.html('&#x2630;'))
/*
res.find('.button-container') res.find('.button-container')
.before($('<span>') .before($('<span>')
.addClass('sort-handle') .addClass('sort-handle')
.html('&#x2630;')) .html('&#x2630;'))
//*/
// make the block sortable... // make the block sortable...
res.parent().sortable({ res.parent().sortable({
handle: '.sort-handle', handle: '.sort-handle',
@ -1014,6 +1020,7 @@ function(list, pins, options){
//------------------------------------ setup options: main/pins --- //------------------------------------ setup options: main/pins ---
// buttons... // buttons...
var buttons = options.buttons = (options.buttons || []).slice() var buttons = options.buttons = (options.buttons || []).slice()
var pins_buttons = (options.pins_buttons || buttons).slice()
// pin/unpin button... // pin/unpin button...
var pin = [ var pin = [
'<span class="pin-set">&#9679;</span>' '<span class="pin-set">&#9679;</span>'
@ -1041,10 +1048,13 @@ function(list, pins, options){
// XXX this is slow... // XXX this is slow...
that.dialog.update() that.dialog.update()
}] }]
var i = buttons.indexOf('PIN') ;[buttons, pins_buttons]
i < 0 ? .forEach(function(b){
buttons.push(pin) var i = b.indexOf('PIN')
: (buttons[i] = pin) i < 0 ?
b.push(pin)
: (b[i] = pin)
})
options.isItemHidden = function(e){ return pins.indexOf(e) >= 0 } options.isItemHidden = function(e){ return pins.indexOf(e) >= 0 }
options.skipHiddenItems = options.skipHiddenItems !== false ? true : false options.skipHiddenItems = options.skipHiddenItems !== false ? true : false
@ -1056,7 +1066,7 @@ function(list, pins, options){
isItemHidden: null, isItemHidden: null,
buttons: (options.pins_buttons || options.buttons).slice(), buttons: pins_buttons,
} }
pins_options.__proto__ = options pins_options.__proto__ = options
var sortable = pins_options.sortable = var sortable = pins_options.sortable =