[Mapbender-commits] r7755 - in branches/metador/http: php plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Apr 7 03:16:55 EDT 2011
Author: apour
Date: 2011-04-07 00:16:54 -0700 (Thu, 07 Apr 2011)
New Revision: 7755
Added:
branches/metador/http/php/heartbeat.php
branches/metador/http/plugins/bw_editUserGroupSelf.js
branches/metador/http/plugins/bw_include.js
branches/metador/http/plugins/heartbeat.js
Log:
added heartbeat
Added: branches/metador/http/php/heartbeat.php
===================================================================
--- branches/metador/http/php/heartbeat.php (rev 0)
+++ branches/metador/http/php/heartbeat.php 2011-04-07 07:16:54 UTC (rev 7755)
@@ -0,0 +1,7 @@
+<?php
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
+if (!Mapbender::session()->get("mb_user_id") ||
+ !Mapbender::session()->get("mb_user_ip") ) {
+ echo "session expired";
+}
+?>
Added: branches/metador/http/plugins/bw_editUserGroupSelf.js
===================================================================
--- branches/metador/http/plugins/bw_editUserGroupSelf.js (rev 0)
+++ branches/metador/http/plugins/bw_editUserGroupSelf.js 2011-04-07 07:16:54 UTC (rev 7755)
@@ -0,0 +1,15 @@
+var $this = $(this);
+
+var EditUserGroupSelfApi = function (o) {
+ var that = this;
+
+ Mapbender.events.afterInit.register(function () {
+ $this.append($("<iframe />", {
+ src: o.src,
+ width: "100%",
+ height: "100%"
+ }));
+ });
+};
+
+$this.mapbender(new EditUserGroupSelfApi(options));
Added: branches/metador/http/plugins/bw_include.js
===================================================================
--- branches/metador/http/plugins/bw_include.js (rev 0)
+++ branches/metador/http/plugins/bw_include.js 2011-04-07 07:16:54 UTC (rev 7755)
@@ -0,0 +1,5 @@
+var that = this;
+$.get(options.src, function(data){
+ $(that).append(data);
+
+})
Added: branches/metador/http/plugins/heartbeat.js
===================================================================
--- branches/metador/http/plugins/heartbeat.js (rev 0)
+++ branches/metador/http/plugins/heartbeat.js 2011-04-07 07:16:54 UTC (rev 7755)
@@ -0,0 +1,8 @@
+// prevent Session timeouts while the browserwindow remains open, by pinging the server periodically
+var id = window.setInterval(function(){
+ $.get("../php/heartbeat.php", function(data){
+ if(data !== ""){
+ alert("Ihre Session ist abgelaufen, bitte loggen sie sich erneut ein.");
+ }
+ });
+},60000);
More information about the Mapbender_commits
mailing list