mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Optimize icons, and now yes use them!
This commit is contained in:
26
js/script.js
26
js/script.js
@@ -449,7 +449,7 @@ View.prototype = {
|
||||
getSortData: {
|
||||
pinnedNote: function(itemElem) {
|
||||
var $item = $(itemElem);
|
||||
return $item.find('.icon-checkmark').hasClass('fixed-header-icon') ? -1 : $item.index();
|
||||
return $item.find('.icon-pinned').hasClass('fixed-header-icon') ? -1 : $item.index();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -583,15 +583,23 @@ View.prototype = {
|
||||
);
|
||||
});
|
||||
|
||||
$('#app-content').on("click", ".icon-checkmark", function (event) {
|
||||
$('#app-content').on("click", ".icon-pin", function (event) {
|
||||
event.stopPropagation();
|
||||
if ($(this).hasClass("fixed-header-icon")) {
|
||||
$(this).removeClass("fixed-header-icon");
|
||||
$(this).addClass("hide-header-icon");
|
||||
} else {
|
||||
$(this).removeClass("hide-header-icon");
|
||||
$(this).addClass("fixed-header-icon");
|
||||
}
|
||||
$(this).removeClass("hide-header-icon");
|
||||
$(this).addClass("fixed-header-icon");
|
||||
$(this).removeClass("icon-pin");
|
||||
$(this).addClass("icon-pinned");
|
||||
|
||||
$('.notes-grid').isotope('updateSortData').isotope();
|
||||
});
|
||||
|
||||
$('#app-content').on("click", ".icon-pinned", function (event) {
|
||||
event.stopPropagation();
|
||||
$(this).removeClass("fixed-header-icon");
|
||||
$(this).addClass("hide-header-icon");
|
||||
$(this).removeClass("icon-pinned");
|
||||
$(this).addClass("icon-pin");
|
||||
|
||||
$('.notes-grid').isotope('updateSortData').isotope();
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<div class="icon-header-note icon-checkmark hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
|
||||
<!--
|
||||
{{#if sharedwith}}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<div class="icon-header-note icon-checkmark hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
|
||||
<!--
|
||||
{{#if sharedwith}}
|
||||
|
||||
Reference in New Issue
Block a user