new search for app manager and few javascript fixes
This commit is contained in:
1 parent
ad68f63a7a
commit
cff77fbee5
3 files changed
+39
-38
No files matched your search
@@ -638,18 +638,6 @@ var orbitDesktop = function(dom){
|
||||
// $('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
||||
// dom.addClass('thmc1 thmtxt active');
|
||||
}
|
||||
this.highlight_sub_menu_item = function(no){
|
||||
$('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
||||
var dom;
|
||||
if(typeof no == "number"){
|
||||
dom = $('*[content-type=menu] a').eq(no);
|
||||
dom.addClass('thmc1 thmtxt active');
|
||||
}else if(typeof no == "object"){
|
||||
dom = no;
|
||||
dom.addClass('thmc1 thmtxt active');
|
||||
}
|
||||
return dom;
|
||||
}
|
||||
|
||||
this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles
|
||||
target = (!target) ? 'desktop' : target;
|
||||
@@ -829,7 +817,7 @@ var orbitDesktop = function(dom){
|
||||
$.post("desktop/twitter",function(){});
|
||||
};
|
||||
|
||||
this.initializeAppSearch = function(target,url,cache){ //this is application search ie is app manager initialization
|
||||
this.initializeAppManager = function(target,url,cache){ //this is application search ie is app manager initialization
|
||||
var searchArray,allApps;
|
||||
var bindHandlers = function(){ // bind handler for app manager page
|
||||
var gn = $('.g_col').length,
|
||||
@@ -841,29 +829,32 @@ var orbitDesktop = function(dom){
|
||||
if($(this).val()){
|
||||
$("#app_manager .search_result").empty();
|
||||
$("#app_manager #seperator").hide();
|
||||
searchArray = $("#app_manager .element:containsi("+$(this).val()+")");
|
||||
if(searchArray.length>0){
|
||||
$("#app_manager #seperator").show();
|
||||
var i = 0;
|
||||
var $column;
|
||||
searchArray = $("#app_manager .element:not(:containsi("+$(this).val()+"))");
|
||||
if(searchArray.length > 0){
|
||||
searchArray.each(function(){
|
||||
i++;
|
||||
if(i == 1){
|
||||
$column = $("<div style='width:120px; float:left;'></div>");
|
||||
}
|
||||
var $newelement = $('<div class="search element w1 h1 hp vp thmc2" data-category="desktop">'+$(this).html()+'</div>');
|
||||
$column.append($newelement);
|
||||
if(i == 4){
|
||||
$("#app_manager .search_result").append($column);
|
||||
i = 0;
|
||||
}
|
||||
$(this).hide("fold","fast");
|
||||
})
|
||||
if(i != 0){
|
||||
$("#app_manager .search_result").append($column);
|
||||
}
|
||||
// $("#app_manager #seperator").show();
|
||||
// var i = 0;
|
||||
// var $column;
|
||||
// searchArray.each(function(){
|
||||
// i++;
|
||||
// if(i == 1){
|
||||
// $column = $("<div style='width:120px; float:left;'></div>");
|
||||
// }
|
||||
// var $newelement = $('<div class="search element w1 h1 hp vp thmc2" data-category="desktop">'+$(this).html()+'</div>');
|
||||
// $column.append($newelement);
|
||||
// if(i == 4){
|
||||
// $("#app_manager .search_result").append($column);
|
||||
// i = 0;
|
||||
// }
|
||||
// })
|
||||
// if(i != 0){
|
||||
// $("#app_manager .search_result").append($column);
|
||||
// }
|
||||
}
|
||||
}else{$("#app_manager #seperator").hide();$("#app_manager .search_result").empty();}
|
||||
}).blur(function(){$(this).val("Search");});
|
||||
}else{$("#app_manager .element").show("fold","fast");}
|
||||
}).blur(function(){if($(this).val()=="")$(this).val("Search");});
|
||||
|
||||
//for Alphabet sorting
|
||||
$("#app_manager #alphabet_sort_btn").click(function(){
|
||||
@@ -1602,6 +1593,20 @@ var orbitDesktop = function(dom){
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.highlight_sub_menu_item = function(no){
|
||||
$('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
||||
var dom;
|
||||
if(typeof no == "number"){
|
||||
dom = $('*[content-type=menu] a').eq(no);
|
||||
dom.addClass('thmc1 thmtxt active');
|
||||
}else if(typeof no == "object"){
|
||||
dom = no;
|
||||
dom.addClass('thmc1 thmtxt active');
|
||||
}
|
||||
return dom;
|
||||
}
|
||||
|
||||
this.use_select2 = function(){
|
||||
$('select:not(.select2-offscreen)').select2({
|
||||
minimumResultsForSearch: -1
|
||||
|
||||
Reference in new issue
Block a user