99 lines
2 KiB
JavaScript
99 lines
2 KiB
JavaScript
//V.0.1
|
|
//02-05-2014 spostato showVersion da funciont a sidebar
|
|
/* dialog box*/
|
|
$(function() {
|
|
$("#sidebarInfo").dialog({
|
|
autoOpen: false,
|
|
show: {
|
|
effect: "blind",
|
|
duration: 100
|
|
},
|
|
/*hide: {
|
|
effect: "explode",
|
|
duration: 1000
|
|
}*/
|
|
});
|
|
|
|
});
|
|
|
|
/* treeview menu */
|
|
$(document).ready(function(){
|
|
|
|
$("#mymenu").treeview({
|
|
animated:100,
|
|
persist: "cookie",
|
|
collapsed: true,
|
|
unique: true
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
$('#slideleft button').click(function() {
|
|
var $lefty = $(this).next();
|
|
$lefty.animate({
|
|
left: parseInt($lefty.css('left'),10) == 0 ?
|
|
-$lefty.outerWidth() :
|
|
0
|
|
});
|
|
});
|
|
});
|
|
|
|
/*---------------------------------------------*/
|
|
|
|
/* menu hide/show*/
|
|
|
|
$(document).ready(function(){
|
|
|
|
// Variables
|
|
var objMain = $('#main');
|
|
|
|
// Show sidebar
|
|
function showSidebar(){
|
|
objMain.addClass('use-sidebar');
|
|
$.cookie('sidebar-pref2', 'use-sidebar', { expires: 30 });
|
|
}
|
|
|
|
// Hide sidebar
|
|
function hideSidebar(){
|
|
objMain.removeClass('use-sidebar');
|
|
$.cookie('sidebar-pref2', null, { expires: 30 });
|
|
}
|
|
|
|
// Sidebar separator
|
|
var objSeparator = $('#separator');
|
|
|
|
objSeparator.click(function(e){
|
|
e.preventDefault();
|
|
if ( objMain.hasClass('use-sidebar') ){
|
|
hideSidebar();
|
|
}
|
|
else {
|
|
showSidebar();
|
|
}
|
|
}).css('height', objSeparator.parent().outerHeight() + 'px');
|
|
|
|
// Load preference
|
|
if ( $.cookie('sidebar-pref2') == null ){
|
|
objMain.removeClass('use-sidebar');
|
|
}
|
|
});
|
|
|
|
function showVersion(theId)
|
|
{
|
|
$("#"+theId).toggle(500);
|
|
|
|
}
|
|
|
|
/////////////////////////////////////////////////
|
|
function showVersionInfo(libVersion,className)
|
|
{
|
|
aWindow=window.open("Menu.abl?cmd=showVersionInfo&_cn="+className,"listwindow", "resizable=yes,scrollbars=yes,status=0,width=600,height=600");
|
|
/*fetch("Menu.abl", "cmd=showVersionInfo&_cn="+className, "sidebarInfo", null, false);
|
|
// parent.f2.$('#testdiv').dialog('open')
|
|
$( "#sidebarInfo" ).dialog("option", "title", "Version Info Log for "+libVersion);
|
|
$( "#sidebarInfo" ).dialog( "open" );*/
|
|
|
|
|
|
|
|
}
|