Skip to content

Commit

Permalink
more fixes for cash replacing zepto
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmunro committed Feb 7, 2019
1 parent f01406b commit bc9232a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions modules/core/site.js
Expand Up @@ -3,10 +3,15 @@
/*
* TODO:
* - swipe support
* - clean up Hm_Ajax_Request if possible
*/

/* extend cash.js with some useful bits */
$.fn.swipeLeft = function(callback) {
};
$.fn.swipeRight = function(callback) {
};
$.fn.swipeDown = function(callback) {
};
$.inArray = function(item, list) {
for (var i in list) {
if (list[i] === item) {
Expand All @@ -17,8 +22,9 @@ $.inArray = function(item, list) {
};
$.isEmptyObject = function(obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
if(obj.hasOwnProperty(key)) {
return false;
}
}
return true;
};
Expand All @@ -36,18 +42,11 @@ $.fn.serializeArray = function() {
};
$.fn.sort = function(sort_function) {
var list = [];
var len = this.length;
for (var i=0; i < len; i++) {
for (var i=0, len=this.length; i < len; i++) {
list.push(this[i]);
}
return $(list.sort(sort_function));
};
$.fn.swipeLeft = function() {
};
$.fn.swipeRight = function() {
};
$.fn.swipeDown = function() {
};

/* ajax multiplexer */
var Hm_Ajax = {
Expand Down Expand Up @@ -1045,11 +1044,7 @@ var Hm_Folders = {
var path = hm_list_path();
$('.folder_list').find('*').removeClass('selected_menu');
if (path.length) {
if (hm_list_parent()) {
$('a', $('.'+Hm_Utils.clean_selector(hm_list_parent()))).addClass('selected_menu');
$('.menu_'+Hm_Utils.clean_selector(hm_list_parent())).addClass('selected_menu');
}
else if (page == 'message_list' || page == 'message') {
if (page == 'message_list' || page == 'message') {
$("[data-id='"+Hm_Utils.clean_selector(path)+"']").addClass('selected_menu');
$('.menu_'+Hm_Utils.clean_selector(path)).addClass('selected_menu');
}
Expand Down
2 changes: 1 addition & 1 deletion modules/github/site.js
Expand Up @@ -112,7 +112,7 @@ if (hm_page_name() == 'servers') {
}
return true;
});
$('.remove_repo').submit(function(e) {
$('.github_remove_repo').on("click", function(e) {
if (!hm_delete_prompt()) {
e.preventDefault();
return false;
Expand Down

0 comments on commit bc9232a

Please sign in to comment.