tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-08-13 20:02:16 +03:00
parent 66f83629e3
commit 51cf555609
4 changed files with 47 additions and 17 deletions

2
bootstrap.js vendored

File diff suppressed because one or more lines are too long

View File

@ -3,43 +3,49 @@
display: block;
}
.item.checked {
opacity: 0.3;
}
.item.checked:hover {
opacity: 0.8;
}
.item.checked .item-content * {
text-decoration: line-through;
text-decoration: line-through;
}
.button {
text-decoration: none;
text-decoration: none;
}
.button:last-child {
margin-right: 5px;
margin-right: 5px;
}
.separator~* {
float: right;
float: right;
}
.item:hover {
background-color: rgba(0, 0, 0, 0.05);
background-color: rgba(0, 0, 0, 0.05);
}
.item .button {
display: none;
display: none;
}
.item:hover .button {
display: inline-block;
display: inline-block;
}
.sort-handle {
opacity: 0.1;
padding-left: 5px;
padding-right: 5px;
cursor: pointer;
text-decoration: none;
opacity: 0.1;
padding-left: 5px;
padding-right: 5px;
cursor: pointer;
text-decoration: none;
}
.item:hover .sort-handle {
opacity: 0.3;
opacity: 0.3;
}
.sort-placeholder {
display: block;
display: block;
}
/* vim:set ts=4 sw=4 ft=css : */

View File

@ -46,7 +46,7 @@ var reload = () => {
// initial state...
.each(function(){
var path = $(this).attr('saveto')
var value = !!Wiki.get(path).data.checked
var value = !!Wiki.get(path).attr('checked')
$(this)
.prop('checked', value)
@ -58,7 +58,7 @@ var reload = () => {
var path = $(this).attr('saveto')
var value = $(this).prop('checked')
Wiki.get(path).data.checked = value
Wiki.get(path).attr('checked', value)
$(this)
.parents('.item').first()

24
wiki.js
View File

@ -992,6 +992,30 @@ var Wiki = {
get data(){
return this.__wiki_data[this.acquire()] },
attr: function(name, value){
// no args...
if(arguments.length == 0){
return this
// name...
} else if(arguments.length == 1
&& typeof(name) == typeof('str')){
return this.data[name]
// object...
} else if(arguments.length == 1){
var that = this
Object.keys(name).forEach(function(k){
that.data[k] = name[k]
})
// name value pair...
} else {
this.data[name] = value
}
return this
},
// XXX experimental...
get config(){