Ext.onReady(function(){
OS.REG.JS.NETWORK.TRANSPORT.ENABLE=0;
OS.REG.SHARE.SYSTEM.PATH.LOGIN=OS.REG.SHARE.SYSTEM.PATH.VIRTUAL+'login.php';
OS.cmd('load OS/LIB/CLIENT/CSS/overview/css/overview.css');
// console.log(Ext.getBody());
Ext.getBody().hide();
Ext.getBody().applyStyles("scroll:auto;font-family:tahoma,arial,helvetica,sans-serif;");
var _height = Ext.getBody().getViewSize().height-(Ext.isIE?80:60);
clog(_height);
Ext.getBody().update('\
INFORMATIVA SU USO DI COOKIE Questo sito NON utilizza alcun cookie. Per saperne di più
Chiudi
Ai sensi di individuazione delle modalità semplificate per informativa e acquisizione del consenso per uso dei cookie - 8 maggio 2014 (Pubblicato sulla Gazzetta Ufficiale n. 126 del 3 giugno 2014).
Questo sito NON utilizza alcun cookie ne di profilazione ne di carattere tecnico.
\
\
\
\
\
');
Ext.ns('Ext.app');
Ext.app.Overview = (function(){
var menu,
content,
sectionScrolls = [],
active,
wrap,
corners = [],
minHeight = 600,
activeContentSection,
contentHeight = minHeight;
return {
init : function() {
// Initializing the application
menu = Ext.get('manual-nav');
content = Ext.get('content');
wrap = Ext.get('content-wrap');
this.initMarkup();
this.initEvents();
this.syncHeight();
// by default navigate to the overview
this.navigateTo(menu.child('li.group', true));
},
initMarkup : function() {
var me = this;
// create corners for each tabgroup
Ext.each(menu.query('li.group'), function() {
me.createCorner(this, 'top-left');
me.createCorner(this, 'bottom-left');
});
// create corners for the content panel
corners.push(me.createCorner(wrap, 'top-left'));
corners.push(me.createCorner(wrap, 'top-right'));
corners.push(me.createCorner(wrap, 'bottom-left'));
corners.push(me.createCorner(wrap, 'bottom-right'));
},
initEvents : function() {
menu.on('click', this.onMenuClick, this);
content.on('scroll', this.onContentScroll, this);
},
createCorner: function(el, pos){
return Ext.fly(el).createChild({
cls: 'box-corner box-corner-' + pos
});
},
onMenuClick: function(e){
if (e.button != 0) {
return;
}
e.preventDefault();
var t = this.findTargets(e);
if (t.expand) {
this.toggleGroup(t.group);
}
else if (t.group) {
if(t.group !== active) {
this.expandGroup(t.group);
}
this.navigateTo(t.group, t.section);
}
if(t.link) {
t.link.blur();
}
},
findTargets : function(e) {
var el = e.getTarget('li', menu);
if (el) {
return {
expand: e.getTarget('a.group-expand-btn', menu),
group: e.getTarget('li.group', menu),
section: e.getTarget('a.section-title', menu),
link: e.getTarget('a', menu)
};
}
return {
expand: null,
group: null,
section: null,
link: null
};
},
onContentScroll : function(e) {
var scrollPerc = content.dom.scrollTop / (content.dom.scrollHeight - contentHeight);
Ext.each(sectionScrolls, function() {
if(
this.section !== activeContentSection &&
scrollPerc >= this.from &&
scrollPerc < this.to
) {
activeContentSection = this.section;
var link = menu.child('a.section-title[href$="' + this.section.id + '"]');
menu.select('li.section-active').removeClass('section-active');
if(link) {
link.parent().addClass('section-active');
}
}
});
},
updateContentSections : function() {
var sections = content.select('div.sect'),
totalHeight = content.dom.scrollHeight,
itemHeight,
previous = {
section: null,
from: 0,
to: 0,
bottom: 0
};
sectionScrolls = [];
contentHeight = content.getHeight();
sections.each(function(item, sections, index) {
itemHeight = item.getOffsetsTo(content)[1] - previous.bottom + item.getHeight();
sectionScrolls.push({
section: item.dom,
from: previous.to,
to: previous.to + (itemHeight / totalHeight),
bottom: previous.bottom + itemHeight
});
previous = sectionScrolls[sectionScrolls.length-1];
});
},
navigateTo : function(group, section) {
section = section || false;
Ext.fly(document.body).scrollTo('top', 0);
Ext.fly(group).radioClass('group-active');
var href = Ext.fly(group).child('a.group-title', true).href;
var afterLoad = function() {
if(section) {
var contentSection = Ext.get(section.href.split('#')[1]);
if(contentSection) {
content.scrollTo('top', contentSection.getOffsetsTo(content)[1] + content.dom.scrollTop);
(function() {
menu.select('li.section-active').removeClass('section-active');
activeContentSection = contentSection.dom;
Ext.fly(section).parent('li').addClass('section-active');
contentSection.highlight();
}).defer(50);
}
}
else {
content.scrollTo('top', '0');
(function() {
menu.select('li.section-active').removeClass('section-active');
Ext.fly(group).child('li').addClass('section-active');
}).defer(50);
}
if(active !== group) {
this.updateContentSections();
}
active = group;
}
if(group !== active) {
menu.select('li.section-active').removeClass('section-active');
content.load({
url: href,
callback: afterLoad,
scope: this
});
} else {
afterLoad();
}
},
toggleGroup : function(group) {
Ext.fly(group).toggleClass('group-expanded');
this.syncHeight();
},
expandGroup : function(group) {
Ext.fly(group).addClass('group-expanded');
this.syncHeight();
},
// syncHeight : function() {
// menu.setHeight();
// var height = Math.max(minHeight, menu.getHeight());
// menu.setHeight(height);
// content.setHeight(height - wrap.getPadding('t,b'));
// if(Ext.isBorderBox) {
// corners[2].removeClass('box-corner').addClass('box-corner');
// corners[3].removeClass('box-corner').addClass('box-corner');
// }
// this.updateContentSections();
// }
syncHeight : function() {
menu.setHeight();
var height = Ext.getBody().getViewSize().height;
height = height - 235;
menu.setHeight(height);
content.setHeight(height - wrap.getPadding('t,b'));
if(Ext.isBorderBox) {
corners[2].removeClass('box-corner').addClass('box-corner');
corners[3].removeClass('box-corner').addClass('box-corner');
}
this.updateContentSections();
}
}
})();
Ext.onReady(Ext.app.Overview.init, Ext.app.Overview);
Ext.onReady(function(){
if(!Ext.getDom('hd')){
return;
}
var activeMenu;
function createMenu(name){
var el = Ext.get(name+'-link');
var tid = 0, menu, doc = Ext.getDoc();
var handleOver = function(e, t){
if(t != el.dom && t != menu.dom && !e.within(el) && !e.within(menu)){
hideMenu();
}
};
var hideMenu = function(){
if(menu){
menu.hide();
el.setStyle('text-decoration', '');
doc.un('mouseover', handleOver);
doc.un('mousedown', handleDown);
}
}
var handleDown = function(e){
if(!e.within(menu)){
hideMenu();
}
}
var showMenu = function(){
clearTimeout(tid);
tid = 0;
if (!menu) {
menu = new Ext.Layer({shadow:'sides',hideMode: 'display'}, name+'-menu');
}
menu.hideMenu = hideMenu;
menu.el = el;
if(activeMenu && menu != activeMenu){
activeMenu.hideMenu();
}
activeMenu = menu;
if (!menu.isVisible()) {
menu.show();
menu.alignTo(el, 'tl-bl?');
menu.sync();
el.setStyle('text-decoration', 'underline');
doc.on('mouseover', handleOver, null, {buffer:150});
doc.on('mousedown', handleDown);
}
}
el.on('mouseover', function(e){
if(!tid){
tid = showMenu.defer(150);
}
});
el.on('mouseout', function(e){
if(tid && !e.within(el, true)){
clearTimeout(tid);
tid = 0;
}
});
}
createMenu('products');
createMenu('support');
createMenu('store');
// expanders
Ext.getBody().on('click', function(e, t){
t = Ext.get(t);
e.stopEvent();
var bd = t.next('div.expandable-body');
bd.enableDisplayMode();
var bdi = bd.first();
var expanded = bd.isVisible();
if(expanded){
bd.hide();
}else{
bdi.hide();
bd.show();
bdi.slideIn('l', {duration:.2, stopFx: true, easing:'easeOut'});
}
t.update(!expanded ? 'Hide details' : 'Show details');
}, null, {delegate:'a.expander'});
var gs = Ext.get('gsearch-box');
if(gs){
gs.on('focus', function(){
if(gs.getValue() == 'Search with google'){
gs.dom.value = '';
gs.up('div').addClass('gs-active');
}
});
gs.on('blur', function(){
if(gs.getValue() == ''){
gs.dom.value = 'Search with google';
gs.up('div').removeClass('gs-active');
}
});
if(gs.getValue() == ''){
gs.dom.value = 'Search with google';
}
}
// messages
var msgs = [
{text: 'Ext Enterprise Training Now Available »', url:'http://extjs.com/support/training/'},
{text: 'Ext GWT 1.2 Release Now Available »', url:'http://extjs.com/products/gxt/'},
{text: 'Ext 2.2.1 Release Now Available »', url:'http://extjs.com/products/extjs/download.php'}
];
var msgIndex = 0;
var msg = Ext.get('msg'),
msgInner = Ext.get('msg-inner'),
active = null;
msgInner.addClassOnOver('msg-over');
msg.on('click', function(){
window.location = active.url;
});
function doUpdate(){
msgInner.update(active.text);
msg.slideIn('b');
}
function showMsg(index){
if(!msgInner.hasClass('msg-over')) {
active = msgs[index];
if(msg.isVisible()){
msg.slideOut('b', {callback: doUpdate});
}else{
doUpdate();
}
}
}
setInterval(function(){
msgIndex = msgs[msgIndex+1] ? msgIndex+1 : 0;
showMsg(msgIndex);
}, 5000);
showMsg(0);
var hd = Ext.get('hd');
if(hd){
hd.createChild({tag:'a', cls:'extcon', href: 'http://extjs.com/conference/'});
}
});
Ext.getBody().fadeIn({stopFx:true,duration:.7});
(function(){
Ext.get('portal_bank_label_login').hide().update(" AREA RISERVATA
").slideIn('t', {stopFx:true,duration:.3});
/*OS.runner.start({
run: function(){
if(Ext.get('portal_bank_label_login'))Ext.get('portal_bank_label_login').frame();
},
interval: 5000 //1 second
});*/
new Ext.Panel({
renderTo:'galleryTop',
layout:'fit',
border:false,
id:'galleryTopPAnel',
// html:'sdf',
listeners:{
render:function(_this){
/*OS.cmd({
// direct:true,
event:'openFile',
// xtype:'os_grid',
// name:'os_grid',
path:'OS/APP/INTRANET/news/Notizie.tbl',
// src:'OS/APP/INTRANET/news/Notizie.tbl',
owner:_this,
ownerAdd:_this
});*/
}
}
});
}).defer(2000);
});