mirror of
https://github.com/flynx/pWiki.git
synced 2026-01-11 12:17:44 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
66f83629e3
commit
51cf555609
2
bootstrap.js
vendored
2
bootstrap.js
vendored
File diff suppressed because one or more lines are too long
@ -3,43 +3,49 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item.checked {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
.item.checked:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
.item.checked .item-content * {
|
.item.checked .item-content * {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.button:last-child {
|
.button:last-child {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.separator~* {
|
.separator~* {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item:hover {
|
.item:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.05);
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
.item .button {
|
.item .button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.item:hover .button {
|
.item:hover .button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-handle {
|
.sort-handle {
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.item:hover .sort-handle {
|
.item:hover .sort-handle {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
.sort-placeholder {
|
.sort-placeholder {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set ts=4 sw=4 ft=css : */
|
/* vim:set ts=4 sw=4 ft=css : */
|
||||||
|
|||||||
@ -46,7 +46,7 @@ var reload = () => {
|
|||||||
// initial state...
|
// initial state...
|
||||||
.each(function(){
|
.each(function(){
|
||||||
var path = $(this).attr('saveto')
|
var path = $(this).attr('saveto')
|
||||||
var value = !!Wiki.get(path).data.checked
|
var value = !!Wiki.get(path).attr('checked')
|
||||||
|
|
||||||
$(this)
|
$(this)
|
||||||
.prop('checked', value)
|
.prop('checked', value)
|
||||||
@ -58,7 +58,7 @@ var reload = () => {
|
|||||||
var path = $(this).attr('saveto')
|
var path = $(this).attr('saveto')
|
||||||
var value = $(this).prop('checked')
|
var value = $(this).prop('checked')
|
||||||
|
|
||||||
Wiki.get(path).data.checked = value
|
Wiki.get(path).attr('checked', value)
|
||||||
|
|
||||||
$(this)
|
$(this)
|
||||||
.parents('.item').first()
|
.parents('.item').first()
|
||||||
|
|||||||
24
wiki.js
24
wiki.js
@ -992,6 +992,30 @@ var Wiki = {
|
|||||||
|
|
||||||
get data(){
|
get data(){
|
||||||
return this.__wiki_data[this.acquire()] },
|
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...
|
// XXX experimental...
|
||||||
get config(){
|
get config(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user