Ray's changes for new backend
This commit is contained in:
1 parent
194773f064
commit
ee51240102
30 files changed
+9454
-1091
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* jQuery Masonry v2.1.05
|
||||
* A dynamic layout plugin for jQuery
|
||||
* The flip-side of CSS Floats
|
||||
* http://masonry.desandro.com
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* Copyright 2012 David DeSandro
|
||||
*/
|
||||
(function(a,b,c){"use strict";var d=b.event,e;d.special.smartresize={setup:function(){b(this).bind("resize",d.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",d.special.smartresize.handler)},handler:function(a,c){var d=this,f=arguments;a.type="smartresize",e&&clearTimeout(e),e=setTimeout(function(){b.event.handle.apply(d,f)},c==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Mason=function(a,c){this.element=b(c),this._create(a),this._init()},b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}},b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return b?a.filter(b).add(a.find(b)):a},_getBricks:function(a){var b=this._filterFindBricks(a).css({position:"absolute"}).addClass("masonry-brick");return b},_create:function(c){this.options=b.extend(!0,{},b.Mason.settings,c),this.styleQueue=[];var d=this.element[0].style;this.originalStyle={height:d.height||""};var e=this.options.containerStyle;for(var f in e)this.originalStyle[f]=d[f]||"";this.element.css(e),this.horizontalDirection=this.options.isRTL?"right":"left",this.offset={x:parseInt(this.element.css("padding-"+this.horizontalDirection),10),y:parseInt(this.element.css("padding-top"),10)},this.isFluid=this.options.columnWidth&&typeof this.options.columnWidth=="function";var g=this;setTimeout(function(){g.element.addClass("masonry")},0),this.options.isResizable&&b(a).bind("smartresize.masonry",function(){g.resize()}),this.reloadItems()},_init:function(a){this._getColumns(),this._reLayout(a)},option:function(a,c){b.isPlainObject(a)&&(this.options=b.extend(!0,this.options,a))},layout:function(a,b){for(var c=0,d=a.length;c<d;c++)this._placeBrick(a[c]);var e={};e.height=Math.max.apply(Math,this.colYs);if(this.options.isFitWidth){var f=0;c=this.cols;while(--c){if(this.colYs[c]!==0)break;f++}e.width=(this.cols-f)*this.columnWidth-this.options.gutterWidth}this.styleQueue.push({$el:this.element,style:e});var g=this.isLaidOut?this.options.isAnimated?"animate":"css":"css",h=this.options.animationOptions,i;for(c=0,d=this.styleQueue.length;c<d;c++)i=this.styleQueue[c],i.$el[g](i.style,h);this.styleQueue=[],b&&b.call(a),this.isLaidOut=!0},_getColumns:function(){var a=this.options.isFitWidth?this.element.parent():this.element,b=a.width();this.columnWidth=this.isFluid?this.options.columnWidth(b):this.options.columnWidth||this.$bricks.outerWidth(!0)||b,this.columnWidth+=this.options.gutterWidth,this.cols=Math.floor((b+this.options.gutterWidth)/this.columnWidth),this.cols=Math.max(this.cols,1)},_placeBrick:function(a){var c=b(a),d,e,f,g,h;d=Math.ceil(c.outerWidth(!0)/this.columnWidth),d=Math.min(d,this.cols);if(d===1)f=this.colYs;else{e=this.cols+1-d,f=[];for(h=0;h<e;h++)g=this.colYs.slice(h,h+d),f[h]=Math.max.apply(Math,g)}var i=Math.min.apply(Math,f),j=0;for(var k=0,l=f.length;k<l;k++)if(f[k]===i){j=k;break}var m={top:i+this.offset.y};m[this.horizontalDirection]=this.columnWidth*j+this.offset.x,this.styleQueue.push({$el:c,style:m});var n=i+c.outerHeight(!0),o=this.cols+1-l;for(k=0;k<o;k++)this.colYs[j+k]=n},resize:function(){var a=this.cols;this._getColumns(),(this.isFluid||this.cols!==a)&&this._reLayout()},_reLayout:function(a){var b=this.cols;this.colYs=[];while(b--)this.colYs.push(0);this.layout(this.$bricks,a)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(a){this.reloadItems(),this._init(a)},appended:function(a,b,c){if(b){this._filterFindBricks(a).css({top:this.element.height()});var d=this;setTimeout(function(){d._appended(a,c)},1)}else this._appended(a,c)},_appended:function(a,b){var c=this._getBricks(a);this.$bricks=this.$bricks.add(c),this.layout(c,b)},remove:function(a){this.$bricks=this.$bricks.not(a),a.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="",this.style.top="",this.style.left=""});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"),b(a).unbind(".masonry")}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var f=function(b){a.console&&a.console.error(b)};b.fn.masonry=function(a){if(typeof a=="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"masonry");if(!d){f("cannot call methods on masonry prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunctiLine truncated
|
||||
+125
-117
@@ -1,118 +1,126 @@
|
||||
(function(a){
|
||||
function b(b,c){
|
||||
function w(a){
|
||||
if(!(g.ratio>=1)){
|
||||
o.now=Math.min(i[c.axis]-j[c.axis],Math.max(0,o.start+((k?a.pageX:a.pageY)-p.start)));
|
||||
n=o.now*h.ratio;g.obj.css(l,-n);
|
||||
j.obj.css(l,o.now)
|
||||
}
|
||||
return false
|
||||
}
|
||||
function v(b){
|
||||
a(document).unbind("mousemove",w);
|
||||
a(document).unbind("mouseup",v);
|
||||
j.obj.unbind("mouseup",v);
|
||||
document.ontouchmove=j.obj[0].ontouchend=document.ontouchend=null;
|
||||
return false
|
||||
}
|
||||
function u(b){
|
||||
if(!(g.ratio>=1)){
|
||||
var b=b||window.event;
|
||||
var d=b.wheelDelta?b.wheelDelta/120:-b.detail/3;
|
||||
n-=d*c.wheel;
|
||||
n=Math.min(g[c.axis]-f[c.axis],Math.max(0,n));
|
||||
j.obj.css(l,n/h.ratio);
|
||||
g.obj.css(l,-n);
|
||||
b=a.event.fix(b);
|
||||
b.preventDefault()
|
||||
}
|
||||
}
|
||||
function t(b){
|
||||
p.start=k?b.pageX:b.pageY;
|
||||
var c=parseInt(j.obj.css(l));
|
||||
o.start=c=="auto"?0:c;
|
||||
a(document).bind("mousemove",w);
|
||||
document.ontouchmove=function(b){
|
||||
a(document).unbind("mousemove");
|
||||
w(b.touches[0])
|
||||
};
|
||||
a(document).bind("mouseup",v);
|
||||
j.obj.bind("mouseup",v);
|
||||
j.obj[0].ontouchend=document.ontouchend=function(b){
|
||||
a(document).unbind("mouseup");
|
||||
j.obj.unbind("mouseup");
|
||||
v(b.touches[0])
|
||||
};
|
||||
return false
|
||||
}
|
||||
function s(){
|
||||
j.obj.bind("mousedown",t);
|
||||
j.obj[0].ontouchstart=function(a){
|
||||
a.preventDefault();
|
||||
j.obj.unbind("mousedown");
|
||||
t(a.touches[0]);
|
||||
return false
|
||||
};
|
||||
i.obj.bind("mouseup",w);
|
||||
if(c.scroll&&this.addEventListener){
|
||||
e[0].addEventListener("DOMMouseScroll",u,false);
|
||||
e[0].addEventListener("mousewheel",u,false)
|
||||
}else if(c.scroll){
|
||||
e[0].onmousewheel=u
|
||||
}
|
||||
}
|
||||
function r(){
|
||||
j.obj.css(l,n/h.ratio);
|
||||
g.obj.css(l,-n);
|
||||
p["start"]=j.obj.offset()[l];
|
||||
var a=m.toLowerCase();
|
||||
h.obj.css(a,i[c.axis]);
|
||||
i.obj.css(a,i[c.axis]);
|
||||
j.obj.css(a,j[c.axis])
|
||||
}
|
||||
function q(){
|
||||
d.update();
|
||||
s();
|
||||
return d
|
||||
}
|
||||
var d=this;
|
||||
var e=b;
|
||||
var f={obj:a(".viewport",b)};
|
||||
var g={obj:a(".overview",b)};
|
||||
var h={obj:a(".scrollbar",b)};
|
||||
var i={obj:a(".track",h.obj)};
|
||||
var j={obj:a(".thumb",h.obj)};
|
||||
var k=c.axis=="x",
|
||||
l=k?"left":"top",
|
||||
m=k?"Width":"Height";
|
||||
var n,
|
||||
o={start:0,now:0},
|
||||
p={};
|
||||
this.update=function(a){
|
||||
f[c.axis]=f.obj[0]["offset"+m];
|
||||
g[c.axis]=g.obj[0]["scroll"+m];
|
||||
g.ratio=f[c.axis]/g[c.axis];
|
||||
h.obj.toggleClass("disable",g.ratio>=1);
|
||||
i[c.axis]=c.size=="auto"?f[c.axis]:c.size;
|
||||
j[c.axis]=Math.min(i[c.axis],Math.max(0,c.sizethumb=="auto"?i[c.axis]*g.ratio:c.sizethumb));
|
||||
h.ratio=c.sizethumb=="auto"?g[c.axis]/i[c.axis]:(g[c.axis]-f[c.axis])/(i[c.axis]-j[c.axis]);
|
||||
n=a=="relative"&&g.ratio<=1?Math.min(g[c.axis]-f[c.axis],Math.max(0,n)):0;
|
||||
n=a=="bottom"&&g.ratio<=1?g[c.axis]-f[c.axis]:isNaN(parseInt(a))?n:parseInt(a);
|
||||
r()
|
||||
};
|
||||
return q()
|
||||
}
|
||||
a.tiny=a.tiny||{};
|
||||
a.tiny.scrollbar={options:{axis:"y",wheel:40,scroll:true,size:"auto",sizethumb:"auto"}};
|
||||
a.fn.tinyscrollbar=function(c){
|
||||
var c=a.extend({},a.tiny.scrollbar.options,c);
|
||||
this.each(function(){
|
||||
a(this).data("tsb",new b(a(this),c))
|
||||
});
|
||||
return this
|
||||
};
|
||||
a.fn.tinyscrollbar_update=function(b){
|
||||
return a(this).data("tsb").update(b)
|
||||
};
|
||||
})
|
||||
(function(a){
|
||||
function b(b,c){
|
||||
function w(a){
|
||||
if(!(g.ratio>=1)){
|
||||
o.now=Math.min(i[c.axis]-j[c.axis],Math.max(0,o.start+((k?a.pageX:a.pageY)-p.start)));
|
||||
n=o.now*h.ratio;
|
||||
g.obj.css(l,-n);
|
||||
j.obj.css(l,o.now)
|
||||
}
|
||||
return false
|
||||
}
|
||||
function v(b){
|
||||
a(document).unbind("mousemove",w);
|
||||
a(document).unbind("mouseup",v);
|
||||
j.obj.unbind("mouseup",v);
|
||||
document.ontouchmove=j.obj[0].ontouchend=document.ontouchend=null;
|
||||
return false
|
||||
}
|
||||
function u(b){
|
||||
if(!(g.ratio>=1)){
|
||||
var b=b||window.event;
|
||||
var d=b.wheelDelta?b.wheelDelta/120:-b.detail/3;
|
||||
n-=d*c.wheel;
|
||||
n=Math.min(g[c.axis]-f[c.axis],Math.max(0,n));
|
||||
j.obj.css(l,n/h.ratio);
|
||||
g.obj.css(l,-n);
|
||||
b=a.event.fix(b);
|
||||
b.preventDefault()
|
||||
}
|
||||
}
|
||||
function t(b){
|
||||
p.start=k?b.pageX:b.pageY;
|
||||
var c=parseInt(j.obj.css(l));
|
||||
o.start=c=="auto"?0:c;
|
||||
a(document).bind("mousemove",w);
|
||||
document.ontouchmove=function(b){
|
||||
a(document).unbind("mousemove");
|
||||
w(b.touches[0])
|
||||
};
|
||||
a(document).bind("mouseup",v);
|
||||
j.obj.bind("mouseup",v);
|
||||
j.obj[0].ontouchend=document.ontouchend=function(b){
|
||||
a(document).unbind("mouseup");
|
||||
j.obj.unbind("mouseup");
|
||||
v(b.touches[0])};
|
||||
return false
|
||||
}
|
||||
function s(){
|
||||
j.obj.bind("mousedown",t);
|
||||
j.obj[0].ontouchstart=function(a){
|
||||
a.preventDefault();
|
||||
j.obj.unbind("mousedown");
|
||||
t(a.touches[0]);
|
||||
return false
|
||||
};
|
||||
i.obj.bind("mouseup",w);
|
||||
if(c.scroll&&this.addEventListener){
|
||||
e[0].addEventListener("DOMMouseScroll",u,false);
|
||||
e[0].addEventListener("mousewheel",u,false)
|
||||
}else if(c.scroll){
|
||||
e[0].onmousewheel=u
|
||||
}
|
||||
}
|
||||
function r(){
|
||||
j.obj.css(l,n/h.ratio);
|
||||
g.obj.css(l,-n);
|
||||
p["start"]=j.obj.offset()[l];
|
||||
var a=m.toLowerCase();
|
||||
h.obj.css(a,i[c.axis]);
|
||||
i.obj.css(a,i[c.axis]);
|
||||
j.obj.css(a,j[c.axis])
|
||||
}
|
||||
function q(){
|
||||
d.update();
|
||||
s();
|
||||
return d
|
||||
}
|
||||
var d=this;
|
||||
var e=b;
|
||||
var f={obj:a(".viewport",b)};
|
||||
var g={obj:a(".overview",b)};
|
||||
var h={obj:a(".scrollbar",b)};
|
||||
var i={obj:a(".track",h.obj)};
|
||||
var j={obj:a(".thumb",h.obj)};
|
||||
var k=c.axis=="x",
|
||||
l=k?"left":"top",
|
||||
m=k?"Width":"Height";
|
||||
var n,
|
||||
o={start:0,now:0},
|
||||
p={};
|
||||
this.update=function(a){
|
||||
f[c.axis]=f.obj[0]["offset"+m];
|
||||
g[c.axis]=g.obj[0]["scroll"+m];
|
||||
g.ratio=f[c.axis]/g[c.axis];
|
||||
h.obj.toggleClass("disable",g.ratio>=1);
|
||||
i[c.axis]=c.size=="auto"?f[c.axis]:c.size;
|
||||
j[c.axis]=Math.min(i[c.axis],Math.max(0,c.sizethumb=="auto"?i[c.axis]*g.ratio:c.sizethumb));
|
||||
h.ratio=c.sizethumb=="auto"?g[c.axis]/i[c.axis]:(g[c.axis]-f[c.axis])/(i[c.axis]-j[c.axis]);
|
||||
n=a=="relative"&&g.ratio<=1?Math.min(g[c.axis]-f[c.axis],Math.max(0,n)):0;
|
||||
n=a=="bottom"&&g.ratio<=1?g[c.axis]-f[c.axis]:isNaN(parseInt(a))?n:parseInt(a);
|
||||
r()
|
||||
};
|
||||
return q()
|
||||
}
|
||||
a.tiny=a.tiny||{};
|
||||
a.tiny.scrollbar={
|
||||
options:{
|
||||
axis:"y",
|
||||
wheel:40,
|
||||
scroll:true,
|
||||
size:"auto",
|
||||
sizethumb:"auto"
|
||||
}
|
||||
};
|
||||
a.fn.tinyscrollbar=function(c){
|
||||
var c=a.extend({},a.tiny.scrollbar.options,c);
|
||||
this.each(function(){
|
||||
a(this).data("tsb",new b(a(this),c))
|
||||
});
|
||||
return this
|
||||
};
|
||||
a.fn.tinyscrollbar_update=function(b){
|
||||
return a(this).data("tsb").update(b)
|
||||
};
|
||||
})
|
||||
(jQuery)
|
||||
@@ -8,6 +8,7 @@
|
||||
//= require jquery_ujs
|
||||
//= require jquery.form
|
||||
//= require bootstrap
|
||||
//= require jquery.masonry.min
|
||||
//= require jquery.isotope.min
|
||||
//= require jquery.tinyscrollbar.min
|
||||
//= require orbit-1.0
|
||||
|
||||
+208
-115
@@ -1,115 +1,208 @@
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
windH=document.clientHeight;
|
||||
windW=document.clientWidht;
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.privacy', function() {
|
||||
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
var $role = $('.select-role');
|
||||
var method =$('.privacy:eq(1)').attr('checked');
|
||||
if(method == 'checked'){
|
||||
$role.slideDown(0);
|
||||
}
|
||||
$('.privacy').each(function($i) {
|
||||
$(this).click(function() {
|
||||
switch ($i) {
|
||||
case 0:
|
||||
$role.slideUp(300);
|
||||
break;
|
||||
case 1:
|
||||
$role.slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2,
|
||||
$subWiget = $('#sub-wiget').width()+18;
|
||||
$orbitBar = $('#orbit-bar').height(),
|
||||
$mainSidebar = $('#main-sidebar').width()+5,
|
||||
$formActionPadding = parseInt($('.form-fixed').css("padding-left"))+parseInt($('.form-fixed').css("padding-right"));
|
||||
$('#main-sidebar').css("height", viewportheight-$orbitBar);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-$orbitBar);
|
||||
$('#post-body').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget);
|
||||
$('.post-title').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget-16);
|
||||
$('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('.form-fixed').css("width", viewportwidth-$mainWrapMarginLeft-$formActionPadding);
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-$orbitBar-4)});
|
||||
$('.detal-list').tinyscrollbar();
|
||||
mainTablePosition();
|
||||
|
||||
/*isotope*/
|
||||
var $container = $('#isotope');
|
||||
$container.isotope({
|
||||
itemSelector : '.item',
|
||||
layoutMode : 'masonry',
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$(window).resize(function(){
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2,
|
||||
$subWiget = $('#sub-wiget').width()+18;
|
||||
$orbitBar = $('#orbit-bar').height(),
|
||||
$mainSidebar = $('#main-sidebar').width()+5,
|
||||
$formActionPadding = parseInt($('.form-fixed').css("padding-left"))+parseInt($('.form-fixed').css("padding-right"));
|
||||
$('#main-sidebar').css("height", viewportheight-$orbitBar);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-$orbitBar);
|
||||
$('#post-body').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget);
|
||||
$('.post-title').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget-16);
|
||||
$('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('.form-fixed').css("width", viewportwidth-$mainWrapMarginLeft-$formActionPadding);
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-$orbitBar-4)});
|
||||
mainTablePosition();
|
||||
});
|
||||
/*main-table position*/
|
||||
function mainTablePosition() {
|
||||
var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height();
|
||||
var $table = $('.main-list').length && $('.main-list:last');
|
||||
if($table && $table==0){
|
||||
$table.css({marginTop:$height});
|
||||
}
|
||||
else if($table){
|
||||
if($height>0){
|
||||
$height = $height-17;
|
||||
}
|
||||
$table.stop().animate({marginTop:$height},500);
|
||||
}
|
||||
else if($('#main-wrap .subnav')){
|
||||
var $object = $('#main-wrap .subnav').next();
|
||||
$object.css({marginTop:$height});
|
||||
};
|
||||
};
|
||||
$(window).scroll(function () {
|
||||
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
|
||||
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
|
||||
var $winLeft = $(window).scrollLeft()
|
||||
$(".table-label").css({left:$winLeft*-1} );
|
||||
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
|
||||
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
|
||||
});
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
windH=document.clientHeight;
|
||||
windW=document.clientWidht;
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
$(document).on('click', '.privacy', function() {
|
||||
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
var $role = $('.select-role');
|
||||
var method =$('.privacy:eq(1)').attr('checked');
|
||||
if(method == 'checked'){
|
||||
$role.slideDown(0);
|
||||
}
|
||||
$('.privacy').each(function($i) {
|
||||
$(this).click(function() {
|
||||
switch ($i) {
|
||||
case 0:
|
||||
$role.slideUp(300);
|
||||
break;
|
||||
case 1:
|
||||
$role.slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
mainResize()
|
||||
mainTablePosition();
|
||||
itemPosition()
|
||||
$('#collapse-menu').on({
|
||||
click: function(){
|
||||
$('body').toggleClass("folded");
|
||||
if($('#collapse-menu > i').attr("class")=="icon-chevron-right"){
|
||||
$('#collapse-menu > i').removeClass('icon-chevron-right');
|
||||
$('#collapse-menu > i').addClass('icon-chevron-left');
|
||||
} else if($('#collapse-menu > i').attr("class")=="icon-chevron-left"){
|
||||
$('#collapse-menu > i').removeClass('icon-chevron-left');
|
||||
$('#collapse-menu > i').addClass('icon-chevron-right');
|
||||
}
|
||||
resize();
|
||||
mainResize();
|
||||
mainTablePosition();
|
||||
itemPosition()
|
||||
}
|
||||
})
|
||||
|
||||
$('.with_action').on({
|
||||
mouseleave: function(){
|
||||
$('.quick-edit').find('.dropdown').removeClass("open");
|
||||
}
|
||||
})
|
||||
|
||||
$(window).resize(function(){
|
||||
resize();
|
||||
mainResize();
|
||||
mainTablePosition();
|
||||
itemPosition()
|
||||
});
|
||||
|
||||
});
|
||||
/*main-table position*/
|
||||
function mainTablePosition() {
|
||||
var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height();
|
||||
var $table = $('.main-list').length && $('.main-list:last');
|
||||
if($table && $table==0){
|
||||
// $table.css({marginTop:$height});
|
||||
$table.stop().animate({marginTop:$height}, 500)
|
||||
}
|
||||
else if($table){
|
||||
if($height>0){
|
||||
$height = $height-18;
|
||||
}
|
||||
$table.stop().animate({marginTop:$height}, 500, function(){
|
||||
resize();
|
||||
mainResize();
|
||||
});
|
||||
}
|
||||
else if($('#main-wrap .subnav')){
|
||||
var $object = $('#main-wrap .subnav').next();
|
||||
// $object.css({marginTop:$height});
|
||||
$object.stop().animate({marginTop:$height}, 500)
|
||||
};
|
||||
};
|
||||
|
||||
function moduleNav() {
|
||||
var $moduleNav = $('#module-nav'),
|
||||
$userDataW = $('.user-data').width();
|
||||
$moduleNav.css("width", $userDataW);
|
||||
}
|
||||
function itemPosition() {
|
||||
moduleNav();
|
||||
if($('#isotope').length>0 && $('.user-info').length>0){
|
||||
if(viewportwidth<=1200){
|
||||
if($('body').attr("class")=="folded"){
|
||||
$('#isotope').find('.detail').css("width", 550);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}else{
|
||||
$('#isotope').find('.detail').css("width", 435);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}
|
||||
}else if(viewportwidth>=1201 && viewportwidth<=1280){
|
||||
if($('body').attr("class")=="folded"){
|
||||
$('#isotope').find('.detail').css("width", 385);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}else{
|
||||
$('#isotope').find('.detail').css("width", 325);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}
|
||||
}else if(viewportwidth>=1281 && viewportwidth<=1440){
|
||||
if($('body').attr("class")=="folded"){
|
||||
$('#isotope').find('.detail').css("width", 470);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}else{
|
||||
$('#isotope').find('.detail').css("width", 410);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}
|
||||
}else if(viewportwidth>=1441){
|
||||
if($('#isotope').length>0){
|
||||
$('#isotope').find('.detail').css("width", 500);
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}
|
||||
}
|
||||
}else if($('#isotope').length>0){
|
||||
$('#isotope').masonry({
|
||||
itemSelector: '.item',
|
||||
isAnimated: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function mainResize() {
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2,
|
||||
$subWiget = $('#sub-wiget').width()+18;
|
||||
$orbitBar = $('#orbit-bar').height(),
|
||||
$brand = $('#brand').height(),
|
||||
$collapseMenu = $('#collapse-menu').height()+$('#position').height()+1,
|
||||
$mainSidebar = $('#main-sidebar').width()+5,
|
||||
$formActionPadding = parseInt($('.form-fixed').css("padding-left"))+parseInt($('.form-fixed').css("padding-right")),
|
||||
$scrollContent = $('#main-sidebar .nav-list').height();
|
||||
$('#main-sidebar').css("height", viewportheight-$orbitBar);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-$orbitBar-$collapseMenu);
|
||||
$('.user-roles .viewport').css("height", viewportheight-$orbitBar-$brand-30);
|
||||
$('#main-sidebar .viewport').css("top", $collapseMenu);
|
||||
$('#main-sidebar .scrollbar').css("top", $collapseMenu);
|
||||
$('#post-body').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget);
|
||||
$('.post-title').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget-20);
|
||||
$('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('#main-wrap .table-label').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('.form-fixed').css("width", viewportwidth-$mainWrapMarginLeft-$formActionPadding);
|
||||
$('.user-info').css("height", viewportheight-$orbitBar-30);
|
||||
$('#main-sidebar').tinyscrollbar();
|
||||
$('.detal-list').tinyscrollbar();
|
||||
$('.user-roles').tinyscrollbar();
|
||||
if((viewportheight-$orbitBar-$collapseMenu)>=$scrollContent){
|
||||
$('#main-sidebar .overview').css("top", '0px');
|
||||
}
|
||||
};
|
||||
$(window).scroll(function () {
|
||||
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
|
||||
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
|
||||
var $winLeft = $(window).scrollLeft()
|
||||
$(".table-label").css({left:$winLeft*-1} );
|
||||
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
|
||||
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
|
||||
});
|
||||
@@ -0,0 +1,115 @@
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
windH=document.clientHeight;
|
||||
windW=document.clientWidht;
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.privacy', function() {
|
||||
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
var $role = $('.select-role');
|
||||
var method =$('.privacy:eq(1)').attr('checked');
|
||||
if(method == 'checked'){
|
||||
$role.slideDown(0);
|
||||
}
|
||||
$('.privacy').each(function($i) {
|
||||
$(this).click(function() {
|
||||
switch ($i) {
|
||||
case 0:
|
||||
$role.slideUp(300);
|
||||
break;
|
||||
case 1:
|
||||
$role.slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2,
|
||||
$subWiget = $('#sub-wiget').width()+18;
|
||||
$orbitBar = $('#orbit-bar').height(),
|
||||
$mainSidebar = $('#main-sidebar').width()+5,
|
||||
$formActionPadding = parseInt($('.form-fixed').css("padding-left"))+parseInt($('.form-fixed').css("padding-right"));
|
||||
$('#main-sidebar').css("height", viewportheight-$orbitBar);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-$orbitBar);
|
||||
$('#post-body').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget);
|
||||
$('.post-title').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget-16);
|
||||
$('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('.form-fixed').css("width", viewportwidth-$mainWrapMarginLeft-$formActionPadding);
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-$orbitBar-4)});
|
||||
$('.detal-list').tinyscrollbar();
|
||||
mainTablePosition();
|
||||
|
||||
/*isotope*/
|
||||
var $container = $('#isotope');
|
||||
$container.isotope({
|
||||
itemSelector : '.item',
|
||||
layoutMode : 'masonry',
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$(window).resize(function(){
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2,
|
||||
$subWiget = $('#sub-wiget').width()+18;
|
||||
$orbitBar = $('#orbit-bar').height(),
|
||||
$mainSidebar = $('#main-sidebar').width()+5,
|
||||
$formActionPadding = parseInt($('.form-fixed').css("padding-left"))+parseInt($('.form-fixed').css("padding-right"));
|
||||
$('#main-sidebar').css("height", viewportheight-$orbitBar);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-$orbitBar);
|
||||
$('#post-body').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget);
|
||||
$('.post-title').css("width", viewportwidth-$mainWrapMarginLeft-$subWiget-16);
|
||||
$('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft);
|
||||
$('.form-fixed').css("width", viewportwidth-$mainWrapMarginLeft-$formActionPadding);
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-$orbitBar-4)});
|
||||
mainTablePosition();
|
||||
});
|
||||
/*main-table position*/
|
||||
function mainTablePosition() {
|
||||
var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height();
|
||||
var $table = $('.main-list').length && $('.main-list:last');
|
||||
if($table && $table==0){
|
||||
$table.css({marginTop:$height});
|
||||
}
|
||||
else if($table){
|
||||
if($height>0){
|
||||
$height = $height-17;
|
||||
}
|
||||
$table.stop().animate({marginTop:$height},500);
|
||||
}
|
||||
else if($('#main-wrap .subnav')){
|
||||
var $object = $('#main-wrap .subnav').next();
|
||||
$object.css({marginTop:$height});
|
||||
};
|
||||
};
|
||||
$(window).scroll(function () {
|
||||
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
|
||||
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
|
||||
var $winLeft = $(window).scrollLeft()
|
||||
$(".table-label").css({left:$winLeft*-1} );
|
||||
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
|
||||
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
|
||||
});
|
||||
@@ -1,23 +1,25 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.search').tooltip({
|
||||
placement: "bottom"
|
||||
});
|
||||
});
|
||||
$(document).on('click', '.orbit-bar-search', function (){
|
||||
if ($(this).parents('.search').hasClass('visible')){
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'28px',
|
||||
});
|
||||
},500);
|
||||
$('.navbar-search').stop().animate({
|
||||
'left':'30px',
|
||||
'opacity':'0',
|
||||
},200);
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'transparent',
|
||||
});
|
||||
$(this).parents('.search').removeClass('visible');
|
||||
$(this).parents('.search').removeClass('visible');
|
||||
}
|
||||
else{
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'265px',
|
||||
});
|
||||
},200);
|
||||
$('.navbar-search').stop().animate({
|
||||
'left':'7px',
|
||||
'opacity':'1'
|
||||
},500);
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'rgba(0, 0, 0, 0.5)',
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user