diff --git a/inc/databap.php b/inc/databap.php index 518f265..8baebd0 100644 --- a/inc/databap.php +++ b/inc/databap.php @@ -335,7 +335,7 @@ class Databap extends PhpObject return $this->iUserId; } - public function getPage($sPage, $asVars=array()) + public function getPage($sPage, $oItemId, $asVars=array()) { $oPage = new Mask('index'); $oPage->setTag('version', self::VERSION); @@ -346,6 +346,7 @@ class Databap extends PhpObject //Constants $asConstants = array( 'version'=>self::VERSION, 'default_page'=>$sPage, + 'default_id'=>$oItemId, 'disconnected'=>self::DISCONNECTED, 'success'=>self::SUCCESS, 'error'=>self::ERROR, diff --git a/index.php b/index.php index 9fba67b..b4d6509 100644 --- a/index.php +++ b/index.php @@ -206,7 +206,7 @@ if($bUserOk && $sAction!=Databap::EXT_ACCESS) //Loading a page else { - $sResult = $oDatabap->getPage($sPage, $_GET); + $sResult = $oDatabap->getPage($sPage, $oItemId, $_GET); } } //External Access with token @@ -241,6 +241,9 @@ else { //$oDatabap->setExpectedPage($_SERVER['REQUEST_URI']); $sResult = $oDatabap->getLogonPage($sToken==''); + + //TODO delete in v1.0.0 + if($_SERVER['QUERY_STRING']!='') header('Location:'.$_GET['serv_name']); } //clean unwanted error log diff --git a/jquery/databap.js b/jquery/databap.js index b5dd266..d81162d 100644 --- a/jquery/databap.js +++ b/jquery/databap.js @@ -64,7 +64,7 @@ function Databap() $(window).bind('hashchange', self.onHashChange); //Init first page - if(self.hash()=='') self.goToInternalLink(self.consts.default_hash); + if(self.hash()=='') self.goToInternalLink(self.consts.default_hash, self.consts.default_id); //Fix for old links else self.onHashChange(); //Load cache @@ -866,11 +866,14 @@ function Databap() this.setScrollBarSize = function(iBoxSize) { - var $Box = self.tmp('scrollbar').find('.scrollbar_box'); - if(iBoxSize=='optimize') self.maximizeElem($Box, true); - else if(iBoxSize=='maximize') self.maximizeElem($Box, false); - else $Box.height(iBoxSize); - self.updateScrollBar(); + if(self.tmp('scrollbar')) + { + var $Box = self.tmp('scrollbar').find('.scrollbar_box'); + if(iBoxSize=='optimize') self.maximizeElem($Box, true); + else if(iBoxSize=='maximize') self.maximizeElem($Box, false); + else $Box.height(iBoxSize); + self.updateScrollBar(); + } }; this.updateScrollBar = function(sPos) diff --git a/masks/logon.html b/masks/logon.html index 1871317..b335555 100755 --- a/masks/logon.html +++ b/masks/logon.html @@ -41,7 +41,10 @@ -

L'authentification a changé !
Nom et prénom : pas de changement sauf qu'il faut bien mettre les accents
Mot de passe : initialisé avec le nom de votre entreprise en minuscule

+

+ L'authentification a changé ! + Nom et prénom : pas de changement, bien mettre les accents
Mot de passe : initialisé avec le nom de votre entreprise en minuscule
+