isotope embedded inside desktop kernel

This commit is contained in:
harrybomrah authored and saurabhbhatia committed 2013-08-30 10:58:08 +08:00
1 parent ff64fb5230
commit 82b6be483a
13 files changed
+197 -69

No files matched your search

@@ -17,4 +17,5 @@
//= require desktop/jquery.gridster
//= require desktop/books_pages
//= require select2
//= require jquery.isotope.min.js
//= require orbit_js_1.0.1-front-end
+70 -27
View File
@@ -330,13 +330,9 @@ var orbitDesktop = function(dom){
});
$(window).resize(function(){
// var ww = $(window).width();
// $("img#thmbackground").attr({"width":ww});
// if( $('.tinycanvas').length > 0 ){
$('.tinycanvas').tinyscrollbar_update('relative');
// }
if($(o.contentHolder).find("div.app_frame").length > 0){
$(o.contentHolder).find("div.app_frame").each(function(){
$('.tinycanvas').tinyscrollbar_update('relative');
if($("body").find("div.app_frame").length > 0){
$("body").find("div.app_frame").each(function(){
var app_holder_height = $(this).height() - 60;
var app_holder_width = $(this).width();
$(this).find("div.app_holder").height(app_holder_height);
@@ -361,14 +357,6 @@ var orbitDesktop = function(dom){
var extractLast = function( term ) {
return split( term ).pop();
}
// $("body").on("keydown","*[autocomplete]", function( event ) {
// var autocompleteList = $(this).attr("autocomplete-list");
// console.log($(this));
// });
//
};
this.layout_data = function(h){
@@ -460,13 +448,51 @@ var orbitDesktop = function(dom){
$("div[container=true] div.overview").html(f.markup);
var settings = {main : ".tinycanvas"};
var tsettings = {};
var ist = function(){
$('#holder').css('height', $('#container').height() - 72);
$('.tinycanvas').css('height', $('#panel_r').height() - 36);
var dom = $("*[isotope=true]").isotope({
layoutMode: 'fitColumns',
onLayout: function($elems, instance){
$elems.width(base_width);
setTimeout(function(){
dom.isotope('reLayout',function(){
$("div[container=true] div.overview").width(dom.width());
o.tinyscrollbar.tinyscrollbar_update("relative");
})
},500);
}
});
$(window).resize(function(){
if($("*[isotope=true]").length > 0){
$('#holder').css('height', $('#container').height() - 72);
$('.tinycanvas').css('height', $('#panel_r').height() - 36);
$(".isotope").isotope('reLayout',function(){
$("div[container=true] div.overview").width($(".isotope").width());
o.tinyscrollbar.tinyscrollbar_update("relative");
});
}
});
$('.s_grid_h_full').parent().css('height','100%');
return dom;
}
if($("*[isotope=true]").length > 0){
var dom = ist();
f.width = dom.width();
}
if(f.width){
settings.fill = f.width;
}
if(pagination_variable){
var page_no = 1;
tsettings.onMove = function(x){
if(x < 50){
tsettings.onMove = function(e){
if(e < 50){
if(!pagination_link)
pagination_link = o.lastlink;
if(o.paging){
@@ -477,6 +503,8 @@ var orbitDesktop = function(dom){
}
}
}
// call other functions here
o.tinyscrollbar_ext(settings,tsettings);
o.simple_drop_down();
@@ -484,6 +512,7 @@ var orbitDesktop = function(dom){
o.use_select2();
o.check_simple_layout();
}
this.paging = true;
this.pagination = function(link,variable,page_no){
var retvalue = null;
@@ -492,17 +521,31 @@ var orbitDesktop = function(dom){
type : "get",
success : function(html){
var f = o.layout_data.generate_layout_html(html);
// console.log(f.total)
if(f.total > 0){
$("div[container=true] .overview").append(f.markup);
if(f.width){
var w = $("div[container=true] .overview").width();
$("div[container=true] .overview").width(w+f.width);
if($("*[isotope=true]").length > 0){
var $ul = $(f.markup),
elems = $ul.children("li[item=true]");
if(elems.length > 1)
o.paging = true;
else
o.paging = false;
$(".isotope").append(elems).isotope("appended",elems,function(){
$(".isotope").isotope("reLayout",function(){
$("div[container=true] div.overview").width($(".isotope").width()+50);
o.tinyscrollbar.tinyscrollbar_update("relative");
})
});
}else{
if(f.total > 0){
$("div[container=true] .overview").append(f.markup);
if(f.width){
var w = $("div[container=true] .overview").width();
$("div[container=true] .overview").width(w+f.width);
}
o.tinyscrollbar.tinyscrollbar_update("relative");
o.paging = true;
} else {
o.paging = false;
}
o.tinyscrollbar.tinyscrollbar_update("relative");
o.paging = true;
} else {
o.paging = false;
}
}
});