var wakaTemplate = function(){ // variable de localisation! return { chargementTemplate : new Ext.Template('
Having a Waka.ca account lets you access your searches from different computers, no matter where you are.
Registering with Waka.ca will ensure your real estate file remains intact, even if cookies are deleted from your computer.
' +
'Inappropriate Content' +
'
'
, '' + 'Select a city or a region in the left tree and use the buttons in the middle to add or remove your selections.' + '
' + '
' +
'' +
'' + // 'Select a city or a region in the left tree and use the buttons in the middle to add or remove your selections.' + //'
' + '

' +
'' +
'' + '
'
+ 'Modify your icon'
+ ''
+ '
' +
'Type' +
'' +
'' +
'' +
'
' +
'Status' +
'' +
'' +
'' +
'' +
'
' +
'Add a note' +
'
' +
'{prenom} {nom}' +
'
' +
'Suggest a website
' +
'Suggest an improvement
','
" : "
";
var m = Ext.DomHelper.append(msgCt, {html:createBox(img + title, s)}, true);
var height = msgCt.dom.offsetHeight;
var width = msgCt.dom.clientWidth;
msgCt.alignTo(document, 't-t');
m.fadeIn();
if (close && typeof close == "boolean" && close == true){
msgCt.on("click",
function(e){
var id = e.getTarget().className;
if (id == "fermerAlert"){
m.fadeOut({remove:true});
}
}, this, true
);
}else{
Ext.select("img.fermerAlert", msgCt).each(function(e){ e.remove(); });
m.pause(pauseTimeOut).fadeOut({remove:true});
}
}
};
}();
// overriding the window.alert window for our custom one!
// if(document.getElementById){window.alert = function(str, error, close){if (!close && typeof close != "boolean"){close = false;};wakaMsg.alert("Waka.ca", str, error, close);}}
var noeudSelectionne = null;
var scrollFn = function(startEl, stopEl){
var doc = startEl ? Ext.get(startEl) : Ext.get(document.body.parentNode);
var x = function() {
// si le scroller est plus bas que l'element ou l'on doit arreter
if (doc.getScroll().top >= stopEl.getTop()) {
return doc.getScroll().top - stopEl.getTop() - stopEl.getHeight()
} else {
// si le scroller est plus haut que l'element ou l'on doit arreter
return doc.getScroll().top;
}
}();
doc.scrollTo("top", parseInt(x), true);
}
var hlFocus = function(el, blnScroll){
/*fonction qui met le focus sur l'element en parametre et fait une surbrilliance*/
el.focus();
if (blnScroll){
scrollFn(null, el);
}
el.highlight();
}
var hlMsg = function(el, msg, blnScroll){
/*fonction qui insere un message d'erreur et qui fait une surbrilliance*/
if (!el) {
el = Ext.get("messErrGlobale");
}
el.update(msg);
el.removeClass("hide");
el.setStyle({"display" : "block"});
if (blnScroll) {
scrollFn(null,el);
}
el.highlight();
}
var wakaInitLoad = function(){
return {
init : function(){
this.el = Ext.get("initLoading");
if (this.el) {
this.titleEl = Ext.get(Ext.query("div h4", "initLoading")[0]);
this.textEl = Ext.get(Ext.query("div p", "initLoading")[0]);
}
}
, setText : function(i){
if (!this.el) {return false;}
var a = [
"Initialization..."
, "Loading your Waka Real Estate file..."
, "Loading your search data tree..."
, "Loading the data grid..."
, "Loading the search criteria..."
];
this.textEl.update(a[i]);
return true;
}
, destroy : function() {
if (!this.el) {return false;}
this.el.fadeOut({remove: true});
this.el = null;
this.titleEl = null;
this.textEl = null;
return true;
}
}
}();
wakaInitLoad.init();
wakaInitLoad.setText(0);
var wakaExt = function(){
function replaceBr(text){
while (text.indexOf("
" : "
";
var m = Ext.DomHelper.append(msgCt, {html:createBox(img + title, s)}, true);
var height = msgCt.dom.offsetHeight;
var width = msgCt.dom.clientWidth;
msgCt.alignTo(document, 't-t');
m.fadeIn();
if (close && typeof close == "boolean" && close == true){
msgCt.on("click",
function(e){
var id = e.getTarget().className;
if (id == "fermerAlert"){
m.fadeOut({remove:true});
}
}, this, true
);
}else{
Ext.select("img.fermerAlert", msgCt).each(function(e){ e.remove(); });
m.pause(pauseTimeOut).fadeOut({remove:true});
}
}
};
}();
// overriding the window.alert window for our custom one!
// if(document.getElementById){window.alert = function(str, error, close){if (!close && typeof close != "boolean"){close = false;};wakaMsg.alert("Waka.ca", str, error, close);}}
var noeudSelectionne = null;
var scrollFn = function(startEl, stopEl){
var doc = startEl ? Ext.get(startEl) : Ext.get(document.body.parentNode);
var x = function() {
// si le scroller est plus bas que l'element ou l'on doit arreter
if (doc.getScroll().top >= stopEl.getTop()) {
return doc.getScroll().top - stopEl.getTop() - stopEl.getHeight()
} else {
// si le scroller est plus haut que l'element ou l'on doit arreter
return doc.getScroll().top;
}
}();
doc.scrollTo("top", parseInt(x), true);
}
var hlFocus = function(el, blnScroll){
/*fonction qui met le focus sur l'element en parametre et fait une surbrilliance*/
el.focus();
if (blnScroll){
scrollFn(null, el);
}
el.highlight();
}
var hlMsg = function(el, msg, blnScroll){
/*fonction qui insere un message d'erreur et qui fait une surbrilliance*/
if (!el) {
el = Ext.get("messErrGlobale");
}
el.update(msg);
el.removeClass("hide");
el.setStyle({"display" : "block"});
if (blnScroll) {
scrollFn(null,el);
}
el.highlight();
}
var wakaInitLoad = function(){
return {
init : function(){
this.el = Ext.get("initLoading");
if (this.el) {
this.titleEl = Ext.get(Ext.query("div h4", "initLoading")[0]);
this.textEl = Ext.get(Ext.query("div p", "initLoading")[0]);
}
}
, setText : function(i){
if (!this.el) {return false;}
var a = [
"Initialization..."
, "Loading your Waka Real Estate file..."
, "Loading your search data tree..."
, "Loading the data grid..."
, "Loading the search criteria..."
];
this.textEl.update(a[i]);
return true;
}
, destroy : function() {
if (!this.el) {return false;}
this.el.fadeOut({remove: true});
this.el = null;
this.titleEl = null;
this.textEl = null;
return true;
}
}
}();
wakaInitLoad.init();
wakaInitLoad.setText(0);
var wakaExt = function(){
function replaceBr(text){
while (text.indexOf("