Commits

Chun-Ping Chang  committed c8ac7cb

remove unuse file for production and compress js file

  • Participants
  • Parent commits 454f64d
  • Branches production

Comments (0)

Files changed (34)

File apidoc.html

-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <title>Documentation - GaiaSup</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="keywords" content="GaiaSup,LBS,Geo,Spatial,Location Base Service,Spatial Publish Subscribe,SPS,ImonCloud" />
-    <meta name="description" content="Spatial PubSub Service for your Geo / Spatial / Location Base Service in the cloud by Imonology">
-    <meta name="author" content="Imonology LLC">
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
-    <!-- styles -->
-    <!--<link href="../../assets/css/bs_united.css" rel="stylesheet">-->
-    <link href="/assets/css/bs_united.css" rel="stylesheet">
-    <style type="text/css">
-      body {
-        padding-top: 60px;
-        padding-bottom: 40px;
-      }
-    </style>
-    <!--<link href="../../assets/css/bootstrap-responsive.css" rel="stylesheet">-->
-    <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
-
-    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <!-- fav and touch icons -->
-    <!--<link rel="shortcut icon" href="./assets/ico/favicon.ico">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">-->
-  </head>
-
-  <body>
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="/">GaiaSup</a>
-          <div class="nav-collapse">
-            <ul class="nav">
-              <li><a href="/">Home</a></li>
-              <li><a href="/pricing">Pricing</a></li>
-              <li><a href="/manage">Manage</a></li>
-              <li class="active"><a href="/doc/api">Documentation</a></li>
-              <li><a data-toggle="modal" href="#contact">Contact us</a></li>
-              <!--<li><a href="/contact">Contact us</a></li>-->
-            </ul>
-
-            <!-- The drop down menu -->
-            <ul class="nav pull-right">
-              <li><a href="/login">Log In / Sign Up</a></li>
-              <!--<li class="divider-vertical"></li>-->
-              <!--<li class="drop down">-->
-              <!--<a class="dropdown-toggle" href="#" data-toggle="dropdown">Log In <strong class="caret"></strong></a>-->
-              <!--<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">-->
-                <!--<form id="frmLogin">-->
-                  <!--<input id="txtUserID" style="margin-bottom: 15px;" type="text" name="txtUserID" size="30" />-->
-                  <!--<input id="txtUserPW" style="margin-bottom: 15px;" type="password" name="txtUserPW" size="30" />-->
-
-                  <!--<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="button" id="btnLogin" name="btnLogin" value="Log In" />-->
-                <!--</form>-->
-              <!--</div>-->
-              <!--</li>-->
-            </ul>
-          </div>
-          <!--/.nav-collapse -->
-        </div>
-      </div>
-    </div>
-
-    <div class="container">
-      <div class="hero-unit" id="restapi">
-        <h2>REST API Documentation</h2>
-        <hr/>
-        <ul class="nav nav-pills" id="apifilter">
-          <li class="active">
-            <a href="#">All</a>
-          </li>
-          <li>
-            <a href="#layer">Layer</a>
-          </li>
-          <li>
-            <a href="#node">Node</a>
-          </li>
-          <li>
-            <a href="#pos">Position</a>
-          </li>
-          <li>
-            <a href="#msg">Message</a>
-          </li>
-          <li>
-            <a href="#misc">Misc.</a>
-          </li>
-        </ul>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">API Name</th>
-              <th class="span1">Method</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr data-group="layer">
-              <td><a href="/doc/api/register_layer">Register Layer</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Register a Layer under a given API key. Returns OK on success or already exist.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/register_node">Register Node</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Register a Node under a given API key and Layer. Returns OK on success or if already exist.</td>
-            </tr>
-            <tr data-group="pos">
-              <td><a href="/doc/api/publish_pos">Publish Pos</a></td>
-              <td><center><span class="label label-info">POST</span></center></td>
-              <td>Publish self position for other Nodes to see.</td>
-            </tr>
-            <tr data-group="pos">
-              <td><a href="/doc/api/query_square">Query Square</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Obtain the positions of other Nodes within a square area.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/query_node">Query Node (Single)</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Obtain the information of a Node.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/query_node_multi">Query Node (Multiple)</a></td>
-              <td><center><span class="label label-info">POST</span></center></td>
-              <td>Obtain the information of a list of Nodes.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/subscribe_node">Subscribe Node (Single)</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Subscribe the updates of a Node.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/subscribe_node_multi">Subscribe Node (Multiple)</a></td>
-              <td><center><span class="label label-info">POST</span></center></td>
-              <td>Subscribe the updates of a list of Nodes at once.</td>
-            </tr>
-            <tr data-group="misc">
-              <td><a href="/doc/api/get_subscribers#gs_self">Get Subscribers (Self)</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Get the list of subscribers to the current Node.</td>
-            </tr>
-            <tr data-group="misc">
-              <td><a href="/doc/api/get_subscribers#gs_other">Get Subscribers (Other)</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Get the subscriber list of another specified Node.</td>
-            </tr>
-            <tr data-group="misc">
-              <td><a href="/doc/api/valid">Valid</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Validate whether a particular Node is registered.</td>
-            </tr>
-            <tr data-group="layer">
-              <td><a href="/doc/api/revoke_layer">Revoke Layer</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Revoke a currently existing Layer.</td>
-            </tr>
-            <tr data-group="node">
-              <td><a href="/doc/api/revoke_node">Revoke Node</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Revoke a currently existing Node</td>
-            </tr>
-            <tr data-group="msg">
-              <td><a href="/doc/api/send_msg">Send Message (Single)</a></td>
-              <td><center><span class="label label-info">POST</span></center></td>
-              <td>Send message to a node.</td>
-            </tr>
-            <tr data-group="msg">
-              <td><a href="/doc/api/send_msg_multi">Send Message (Multiple)</a></td>
-              <td><center><span class="label label-info">POST</span></center></td>
-              <td>Send message to some nodes at once.</td>
-            </tr>
-            <tr data-group="msg">
-              <td><a href="/doc/api/recv_msg">Receive Message</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Receive new messages.</td>
-            </tr>
-            <tr data-group="msg">
-              <td><a href="/doc/api/query_msg">Query Message</a></td>
-              <td><center><span class="label label-success">GET</span></center></td>
-              <td>Query from message history.</td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <hr>
-
-      <div class="hero-unit" id="lib">
-        <h2>Libraries</h2>
-        <em>You can get those language binding on <a href="https://github.com/GaiaSup/api" target="_blank">Github</a></em>
-        <hr/>
-        <ol>
-          <li>
-            <a href="/doc/lib/js">JavaScript</a>
-          </li>
-          <li>
-            <a href="/doc/lib/py">Python</a>
-          </li>
-        </ol>
-      </div>
-
-    <hr>
-
-    <footer>
-    <center>
-      <p>&copy; 2012, <a href="http://imonology.com/" target="_blank">Imonology, LLC</a>. All rights reserved.</p>
-    </center>
-    </footer>
-
-    </div>
-    <!-- /container -->
-
-    <!-- Modals -->
-    <div class="modal hide fade" id="contact">
-      <div class="modal-header">
-        <a class="close" data-dismiss="modal">×</a>
-        <h3>Contact us</h3>
-      </div>
-      <div class="modal-body">
-        <p>You can send feedback or report bug to <a href="mailto:contact@GaiaSup.com">contact@GaiaSup.com</a></p>
-      </div>
-      <div class="modal-footer">
-        <a data-dismiss="modal" href="#" class="btn btn-primary" id="ContactUsClose">Close</a>
-      </div>
-    </div>
-
-    <!-- Le javascript
-    ================================================== -->
-    <!-- Placed at the end of the document so the pages load faster -->
-    <script src="/assets/js/jquery.js"></script>
-    <script src="/assets/js/bootstrap-transition.js"></script>
-    <script src="/assets/js/bootstrap-alert.js"></script>
-    <script src="/assets/js/bootstrap-modal.js"></script>
-    <script src="/assets/js/bootstrap-dropdown.js"></script>
-    <script src="/assets/js/bootstrap-scrollspy.js"></script>
-    <script src="/assets/js/bootstrap-tab.js"></script>
-    <script src="/assets/js/bootstrap-tooltip.js"></script>
-    <script src="/assets/js/bootstrap-popover.js"></script>
-    <script src="/assets/js/bootstrap-button.js"></script>
-    <script src="/assets/js/bootstrap-collapse.js"></script>
-    <script src="/assets/js/bootstrap-carousel.js"></script>
-    <script src="/assets/js/bootstrap-typeahead.js"></script>
-
-    <script src="/assets/js/custom/apidoc.js"></script>
-
-  </body>
-</html>

File assets/js/custom/apidoc.js

-$(document).ready( function () {
-
-  var apiFilter = function (filterStr) {
-    var apiType = $('#restapi tbody');
-
-    if (filterStr.length === 0 || filterStr === 'lib') {
-      apiType.children().show();
-      filterStr = '';
-    }
-    else {
-      apiType.find('tr[data-group="' + filterStr + '"]').show();
-      apiType.find('tr[data-group!="' + filterStr + '"]').hide();
-    }
-
-    var filterCmd = $('#apifilter li a');
-    filterCmd.parent().removeClass('active');
-    filterCmd.filter('[href="#' + filterStr + '"]').parent().addClass('active');
-  }
-
-  $('#apifilter li a').click( function (e) {
-    apiFilter($(this).attr('href').substr(1));
-  });
-
-  apiFilter(window.location.hash.substring(1));
-
-});

File assets/js/custom/common.js

-$(document).ready( function () {
-
-});

File assets/js/custom/common.min.js

+$(document).ready(function(){});

File assets/js/custom/manage.js

-$(document).ready( function () {
-  var g_actMode = undefined,
-      g_objID = undefined,
-      g_hashUserID = undefined,
-      g_targetObj = {},
-      g_apiKey = [],
-      g_apiDatas = undefined;
-
-  var idxOldApiKey = undefined,
-      oldObjID = undefined,
-      spnApiKey = undefined,
-      newApiData = undefined;
-
-  var callCount = 0;
-
-  // Add Project Dialog
-  $("#modalAddMod").bind("show", function() {
-    switch ( g_actMode ) {
-      case 'ADD':
-        targetUrl = '/create/apikey';
-        break;
-      case 'MODIFY':
-        targetUrl = '/store/apikey/' + g_objID;
-    }
-
-    $("#btnSave").click( function () {
-      var projInfo = {};
-      projInfo.name = $('#txtProjName').val();
-      projInfo.link = $('#txtWebLink').val();
-      projInfo.desc = $('#txtDesc').val();
-      $.ajax({
-        type:   'POST',
-        url:    targetUrl,
-        dataType: 'json',
-        cache:  true,
-        data:   JSON.stringify(projInfo),
-        success: function (res) {
-          switch ( g_actMode ) {
-            case 'ADD':
-              init();
-              break;
-            case 'MODIFY':
-              init();
-          }
-        }
-      });
-
-      $("#modalAddMod").modal('hide');
-    });
-
-    $("#btnCancel").click( function () {
-      $("#modalAddMod").modal('hide');
-    });
-  });
-
-  $("#modalAddMod").bind("hide", function() {
-    $("#modalAddMod a.btn").unbind();
-  });
-
-  $("#modalAddMod").modal({
-    "backdrop"  : true,
-    "keyboard"  : false,
-    "show"      : false
-  });
-
-  // Delete Project Confirm Dialog
-  $("#modalDelAlert").bind("show", function() {
-    $("#delYes").click( function () {
-      $.ajax({
-        type:   'GET',
-        url:    '/delete/apikey/' + g_objID,
-        dataType: 'json',
-        cache:  false,
-        success: function (res) {
-          g_targetObj.fadeOut();
-        }
-      });
-      $("#modalDelAlert").modal('hide');
-    });
-
-    $("#delNo").click( function () {
-      $("#modalDelAlert").modal('hide');
-    });
-  });
-
-  $("#modalDelAlert").bind("hide", function() {
-    $("#modalDelAlert a.btn").unbind();
-  });
-
-  $("#modalDelAlert").modal({
-    "backdrop"  : true,
-    "keyboard"  : true,
-    "show"      : false
-  });
-
-  // Regen API key Confirm Dialog
-  $("#modalRegenAlert").bind("show", function() {
-    $("#regenYes").click( function () {
-      $.ajax({
-        type:   'GET',
-        url:    '/regen/apikey/' + g_objID,
-        dataType: 'json',
-        success: function (res) {
-          if (callCount === 0) {
-            g_apiKey[idxOldApiKey] = res[0];
-            g_apiDatas[res[0]] = newApiData;
-            delete g_apiDatas[oldObjID];
-            g_targetObj.attr('id', g_apiKey[idxOldApiKey]);
-            g_objID = g_targetObj.attr('id');
-            spnApiKey.text(res[0]);
-            callCount += 1;
-          }
-        },
-        error: function (res) {
-          spnApiKey.text('Can not re-generate API key.');
-        }
-      });
-
-      callCount = 0;
-      $("#modalRegenAlert").modal('hide');
-    });
-
-    $("#regenNo").click( function () {
-      $("#modalRegenAlert").modal('hide');
-    });
-  });
-
-  $("#modalDelAlert").bind("hide", function() {
-    $("#modalDelAlert a.btn").unbind();
-  });
-
-  $("#modalDelAlert").modal({
-    "backdrop"  : true,
-    "keyboard"  : true,
-    "show"      : false
-  });
-  function init () {
-    // Load Project List
-    $.ajax({
-      type:   'GET',
-      url:    '/query/user/self',
-      dataType: 'json',
-      cache:  false,
-      success: function (res) {
-        $('span.spnUserID').text(res[0].id);
-        var hashIDObj = new jsSHA(res[0]);
-        g_hashUserID = hashIDObj.getHash('SHA-1', 'HEX');
-        g_apiKey = JSON.stringify(res[0].apikey);
-        $.ajax({
-          type: 'POST',
-          url: '/query/apikeys',
-          dataType: 'json',
-          cache: false,
-          data:  g_apiKey,
-          success: function (resApiDatas) {
-            g_apiDatas = resApiDatas[0]
-            g_apiKey = $.parseJSON(g_apiKey);
-            $('div.div_table').empty().append("<div class='div_table_row'> \n\t <div class='div_table_col_projname'><strong>Project Name</strong></div> \n\t <div class='div_table_col_appkeys'><strong>API Keys</strong></div> \n\t <div class='div_table_col_manage'><strong>Manage</strong></div></div>");
-            for ( key in g_apiKey ) {
-              $('div.div_table').append("<div id='" + g_apiKey[key] + "' class='div_table_row'> \n <div class='div_table_col_projname'><span>" + g_apiDatas[g_apiKey[key]].name + "</span></div> \n <div class='div_table_col_appkeys'><span>" + g_apiKey[key] + "</span></div> \n <div class='div_table_col_manage'><span> <a class='btn btn-primary btn-small modify' href='#'> <i class='icon-pencil icon-white'></i> </a> </span> <span> <a class='btn btn-success btn-small regen' href='#'> <i class='icon-repeat icon-white'></i> </a> </span> <span> <a class='btn btn-danger btn-small del' href='#'> <i class='icon-remove icon-white'></i> </a> </span></div></div>");
-            }
-          }
-        });
-      },
-      error: function (res) {
-        $('div.div_table').empty().append("<div class='center'><h3>Load API List Failed!</h3></div>");
-      }
-    });
-  }
-
-  init();
-
-  // bind event to func button
-  $('.add').on('click', function (e) {
-    e.preventDefault();
-    $('#modalAct').text('Add');
-    g_actMode = 'ADD';
-    $('#frmAddModify').find(':input').each(function() {
-      switch(this.type) {
-        case 'password':
-        case 'select-multiple':
-        case 'select-one':
-        case 'text':
-        case 'textarea':
-          $(this).val('');
-          break;
-        case 'checkbox':
-        case 'radio':
-          this.checked = false;
-      }
-    });
-    $('#modalAddMod').modal();
-  });
-
-  $('div.div_table').on('click', 'a.del', function (e) {
-    e.preventDefault();
-    g_objID = $(this).parent().parent().parent().attr('id');
-    g_targetObj = $(this).parent().parent().parent();
-    $('#spnProjName').text(g_apiDatas[g_objID].name);
-    $('#modalDelAlert').modal();
-  });
-
-  $('div.div_table').on('click', 'a.modify', function (e) {
-    e.preventDefault();
-    $('#modalAct').text('Modify');
-    g_actMode = 'MODIFY';
-    g_objID = $(this).parent().parent().parent().attr('id');
-    $('#txtProjName').val(g_apiDatas[g_objID].name);
-    $('#txtWebLink').val(g_apiDatas[g_objID].link);
-    $('#txtDesc').val(g_apiDatas[g_objID].desc);
-    $('#modalAddMod').modal();
-  });
-
-  $('div.div_table').on('click', 'a.regen', function (e) {
-    e.preventDefault();
-
-    idxOldApiKey = $.inArray(g_objID, g_apiKey);
-    g_objID = $(this).parent().parent().parent().attr('id');
-    oldObjID = g_objID;
-    g_targetObj = $(this).parent().parent().parent();
-    spnApiKey = $(this).parent().parent().parent().children('.div_table_col_appkeys').children('span');
-    newApiData = g_apiDatas[g_objID];
-
-    $('#modalRegenAlert').modal();
-  });
-});

File assets/js/custom/manage.min.js

+$(document).ready(function(){function h(){$.ajax({type:"GET",url:"/query/user/self",dataType:"json",cache:!1,success:function(a){$("span.spnUserID").text(a[0].id);(new jsSHA(a[0])).getHash("SHA-1","HEX");c=JSON.stringify(a[0].apikey);$.ajax({type:"POST",url:"/query/apikeys",dataType:"json",cache:!1,data:c,success:function(a){d=a[0];c=$.parseJSON(c);$("div.div_table").empty().append("<div class='div_table_row'> \n\t <div class='div_table_col_projname'><strong>Project Name</strong></div> \n\t <div class='div_table_col_appkeys'><strong>API Keys</strong></div> \n\t <div class='div_table_col_manage'><strong>Manage</strong></div></div>");
+for(key in c)$("div.div_table").append("<div id='"+c[key]+"' class='div_table_row'> \n <div class='div_table_col_projname'><span>"+d[c[key]].name+"</span></div> \n <div class='div_table_col_appkeys'><span>"+c[key]+"</span></div> \n <div class='div_table_col_manage'><span> <a class='btn btn-primary btn-small modify' href='#'> <i class='icon-pencil icon-white'></i> </a> </span> <span> <a class='btn btn-success btn-small regen' href='#'> <i class='icon-repeat icon-white'></i> </a> </span> <span> <a class='btn btn-danger btn-small del' href='#'> <i class='icon-remove icon-white'></i> </a> </span></div></div>")}})},
+error:function(){$("div.div_table").empty().append("<div class='center'><h3>Load API List Failed!</h3></div>")}})}var f=void 0,b=void 0,e={},c=[],d=void 0,j=void 0,l=void 0,k=void 0,m=void 0,g=0;$("#modalAddMod").bind("show",function(){switch(f){case "ADD":targetUrl="/create/apikey";break;case "MODIFY":targetUrl="/store/apikey/"+b}$("#btnSave").click(function(){var a={};a.name=$("#txtProjName").val();a.link=$("#txtWebLink").val();a.desc=$("#txtDesc").val();$.ajax({type:"POST",url:targetUrl,dataType:"json",
+cache:!0,data:JSON.stringify(a),success:function(){switch(f){case "ADD":h();break;case "MODIFY":h()}}});$("#modalAddMod").modal("hide")});$("#btnCancel").click(function(){$("#modalAddMod").modal("hide")})});$("#modalAddMod").bind("hide",function(){$("#modalAddMod a.btn").unbind()});$("#modalAddMod").modal({backdrop:!0,keyboard:!1,show:!1});$("#modalDelAlert").bind("show",function(){$("#delYes").click(function(){$.ajax({type:"GET",url:"/delete/apikey/"+b,dataType:"json",cache:!1,success:function(){e.fadeOut()}});
+$("#modalDelAlert").modal("hide")});$("#delNo").click(function(){$("#modalDelAlert").modal("hide")})});$("#modalDelAlert").bind("hide",function(){$("#modalDelAlert a.btn").unbind()});$("#modalDelAlert").modal({backdrop:!0,keyboard:!0,show:!1});$("#modalRegenAlert").bind("show",function(){$("#regenYes").click(function(){$.ajax({type:"GET",url:"/regen/apikey/"+b,dataType:"json",success:function(a){0===g&&(c[j]=a[0],d[a[0]]=m,delete d[l],e.attr("id",c[j]),b=e.attr("id"),k.text(a[0]),g+=1)},error:function(){k.text("Can not re-generate API key.")}});
+g=0;$("#modalRegenAlert").modal("hide")});$("#regenNo").click(function(){$("#modalRegenAlert").modal("hide")})});$("#modalDelAlert").bind("hide",function(){$("#modalDelAlert a.btn").unbind()});$("#modalDelAlert").modal({backdrop:!0,keyboard:!0,show:!1});h();$(".add").on("click",function(a){a.preventDefault();$("#modalAct").text("Add");f="ADD";$("#frmAddModify").find(":input").each(function(){switch(this.type){case "password":case "select-multiple":case "select-one":case "text":case "textarea":$(this).val("");
+break;case "checkbox":case "radio":this.checked=!1}});$("#modalAddMod").modal()});$("div.div_table").on("click","a.del",function(a){a.preventDefault();b=$(this).parent().parent().parent().attr("id");e=$(this).parent().parent().parent();$("#spnProjName").text(d[b].name);$("#modalDelAlert").modal()});$("div.div_table").on("click","a.modify",function(a){a.preventDefault();$("#modalAct").text("Modify");f="MODIFY";b=$(this).parent().parent().parent().attr("id");$("#txtProjName").val(d[b].name);$("#txtWebLink").val(d[b].link);
+$("#txtDesc").val(d[b].desc);$("#modalAddMod").modal()});$("div.div_table").on("click","a.regen",function(a){a.preventDefault();j=$.inArray(b,c);l=b=$(this).parent().parent().parent().attr("id");e=$(this).parent().parent().parent();k=$(this).parent().parent().parent().children(".div_table_col_appkeys").children("span");m=d[b];$("#modalRegenAlert").modal()})});

File assets/js/custom/signin.js

-$(document).ready( function () {
-  $('#btnLogin').click( function () {
-    var hashIDObj = new jsSHA($('#txtUserID').val());
-    var hashUserID = hashIDObj.getHash('SHA-1', 'HEX');
-    var hashPWObj = new jsSHA($('#txtUserPW').val());
-    var hashPassWD = hashPWObj.getHash('SHA-512', 'HEX');
-    var targetUrl = '/auth';
-
-    $.ajax({
-        type: 'POST',
-        url:  targetUrl,
-        dataType: 'json',
-        cache: false,
-        data: {
-          userhash: hashUserID,
-          passwd: hashPassWD
-        },
-        error: function () {
-          //$('#msg').text('Login failed!');
-          alert('Login failed');
-        },
-        success: function (res) {
-          var retStatus = res[0];
-          //var errMsg = res[1];
-          if ( retStatus === "OK" ) {
-            window.location = '/manage';
-          }
-          else {
-            //$('#msg').text('Login failed!');
-            alert('Login failed');
-          }
-        }
-      });
-  });
-
-  $('input:text').bind('keypress', function(e) {
-    if(e.keyCode==13){
-      $('#btnLogin').click();
-    }
-  });
-  $('input:password').bind('keypress', function(e) {
-    if(e.keyCode==13){
-      $('#btnLogin').click();
-    }
-  });
-});

File assets/js/custom/signin.min.js

+$(document).ready(function(){$("#btnLogin").click(function(){var a=(new jsSHA($("#txtUserID").val())).getHash("SHA-1","HEX"),b=(new jsSHA($("#txtUserPW").val())).getHash("SHA-512","HEX");$.ajax({type:"POST",url:"/auth",dataType:"json",cache:!1,data:{userhash:a,passwd:b},error:function(){alert("Login failed")},success:function(a){"OK"===a[0]?window.location="/manage":alert("Login failed")}})});$("input:text").bind("keypress",function(a){13==a.keyCode&&$("#btnLogin").click()});$("input:password").bind("keypress",
+function(a){13==a.keyCode&&$("#btnLogin").click()})});

File assets/js/custom/signup.js

-$(document).ready( function () {
-  var userID = {};
-  var userEMail = {}
-  var hashPWObj = {};
-  var hashPassWD = '';
-  var g_txtUserID = '';
-  var g_txtEmail = '';
-
-  $('#txtUserID').blur( function () {
-    userID.id = $('#txtUserID').val();
-    if ( $('#txtUserID').val() != "" ){
-      $.ajax({
-        type:   'POST',
-        url:    '/valid',
-        dataType: 'json',
-        cache:  false,
-        data:   JSON.stringify(userID),
-        success: function (res) {
-          console.log(res[0]);
-          if ( res[0] === "OK" ) {
-            $('#txtUserID').css('border', '3px #C33 solid');
-          }
-          else {
-            $('#txtUserID').css('border', '1px #aaa solid');
-          }
-        },
-        error: function (res) {
-          console.log(res[0]);
-          if ( $('#txtUserID').val() != "" ) {
-            $('#txtUserID').css('border', '3px #C33 solid');
-          }
-          else {
-            $('#txtUserID').css('border', '1px #aaa solid');
-          }
-        }
-      });
-    }
-  });
-
-  $('#txtUserEMail').blur( function () {
-    userEMail.email = $('#txtUserEMail').val();
-    if ( $('#txtUserEMail').val() != "" ){
-      $.ajax({
-        type:   'POST',
-        url:    '/valid',
-        dataType: 'json',
-        cache:  false,
-        data:   JSON.stringify(userEMail),
-        success: function (res) {
-          console.log(res[0]);
-          if ( res[0] === "OK" ) {
-            $('#txtUserEMail').css('border', '3px #C33 solid');
-          }
-          else {
-            $('#txtUserEMail').css('border', '1px #aaa solid');
-          }
-        },
-        error: function (res) {
-          console.log(res[0]);
-          if ( $('#txtUserEMail').val() != "" ) {
-            $('#txtUserEMail').css('border', '3px #C33 solid');
-          }
-          else {
-            $('#txtUserEMail').css('border', '1px #aaa solid');
-          }
-        }
-      });
-    }
-  });
-
-  $('#btnReg').click( function () {
-    var targetUrl = '/create/user';
-    var hashPWObj = new jsSHA($('#txtUserPW').val());
-    var hashPassWD = hashPWObj.getHash('SHA-512', 'HEX');
-
-    $.ajax({
-        type: 'POST',
-        url:  targetUrl,
-        dataType: 'json',
-        data: {
-          id: $('#txtUserID').val(),
-          email: $('#txtUserEMail').val(),
-          passwd: hashPassWD
-        },
-        beforeSend: function () {
-          $('#frmSignup').validate({
-            focusInvalid: true,
-            rules:{
-              txtUserConfirmPW: {
-                equalTo: '#txtUserPW'
-              }
-            },
-            messages:{
-              txtUserID: { required: 'This field is required.' },
-              txtUserPW: { required: 'This field is required.' },
-              txtUserConfirmPW: {
-                required: 'This field is required.',
-                equalTo: 'Please enter the same password in this field.'
-              },
-              txtUserEMail: {
-                required: 'This field is required.',
-                email: 'Please enter a valid email address.'
-              }
-            }
-          });
-          return $('#frmSignup').valid();
-        },
-        error: function () {
-          alert('Sign up failed');
-          console.log('error');
-        },
-        success: function (res) {
-          var retStatus = res[0];
-          var errMsg = res[1];
-            console.log(retStatus, errMsg);
-
-          if ( retStatus === "OK" ) {
-            window.location = '/manage';
-          }
-        }
-      });
-  });
-
-  $('input:text').bind('keypress', function(e) {
-    if(e.keyCode==13){
-      $('#btnReg').click();
-    }
-  });
-  $('input:password').bind('keypress', function(e) {
-    if(e.keyCode==13){
-      $('#btnReg').click();
-    }
-  });
-});

File assets/js/custom/validate_rule.js

-//--------------------------------------------------
-// validate_rule.js
-//--------------------------------------------------
-
-$(document).ready(function() {
-  $('#frmSignup').validate({
-    rules:{
-      txtUserConfirmPW: {
-        equalTo: '#txtUserPW'
-      }
-    },
-
-    //messages:{
-      //txtUserID: { required: '此為必填欄位' },
-      //txtUserPW: { required: '此為必填欄位' },
-      //txtUserConfirmPW: {
-        //required: '此為必填欄位',
-        //equalTo: '密碼不相符,請重新輸入'
-      //},
-      //txtUserEMail: {
-        //required: '此為必填欄位',
-        //email: '請輸入正確/有效的電子郵件位址'
-      //}
-    //}
-
-    messages:{
-      txtUserID: { required: 'This field is required.' },
-      txtUserPW: { required: 'This field is required.' },
-      txtUserConfirmPW: {
-        required: 'This field is required.',
-        equalTo: 'Please enter the same password in this field.'
-      },
-      txtUserEMail: {
-        required: 'This field is required.',
-        email: 'Please enter a valid email address.'
-      }
-    },
-
-    submitHandler: function(form) {
-      form.submit(function () {
-        var targetUrl = '/create/user';
-        var hashPWObj = new jsSHA($('#txtUserPW').val());
-        var hashPassWD = hashPWObj.getHash('SHA-512', 'HEX');
-
-        $.ajax({
-            type: 'POST',
-            url:  targetUrl,
-            dataType: 'json',
-            data: {
-              id: $('#txtUserID').val(),
-              email: $('#txtUserEMail').val(),
-              passwd: hashPassWD
-            },
-            error: function () {
-              console.log('error');
-            },
-            success: function (res) {
-              var retStatus = res[0];
-              var errMsg = res[1];
-                console.log(retStatus, errMsg);
-
-              if ( retStatus === "OK" ) {
-                window.location = '/manage';
-              }
-            }
-        });
-      });
-    }
-  });
-
-
-});

File contact.html

-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <title>GaiaSup</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="keywords" content="GaiaSup,LBS,Geo,Spatial,Location Base Service,Spatial Publish Subscribe,SPS,ImonCloud" />
-    <meta name="description" content="Spatial PubSub Service for your Geo / Spatial / Location Base Service in the cloud by Imonology">
-    <meta name="author" content="Imonology LLC">
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
-    <!-- styles -->
-    <link href="/assets/css/bs_united.css" rel="stylesheet">
-    <style type="text/css">
-      body {
-        padding-top: 60px;
-        padding-bottom: 40px;
-      }
-    </style>
-    <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
-
-    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <!-- fav and touch icons -->
-    <!--<link rel="shortcut icon" href="./assets/ico/favicon.ico">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">-->
-  </head>
-
-  <body>
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="/">GaiaSup</a>
-          <div class="nav-collapse">
-            <ul class="nav">
-              <li class="active"><a href="/">Home</a></li>
-              <li><a href="/manage">Manage</a></li>
-              <li><a href="/doc/api">Documentation</a></li>
-              <!--<li><a data-toggle="modal" href="#contact">Contact us</a></li>-->
-              <li><a href="/contact">Contact us</a></li>
-            </ul>
-
-            <!-- The drop down menu -->
-            <ul class="nav pull-right">
-              <li><a href="/login">Log In / Sign Up</a></li>
-              <!--<li class="divider-vertical"></li>-->
-              <!--<li class="drop down">-->
-              <!--<a class="dropdown-toggle" href="#" data-toggle="dropdown">Log In <strong class="caret"></strong></a>-->
-              <!--<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">-->
-                <!--<form id="frmLogin">-->
-                  <!--<input id="txtUserID" style="margin-bottom: 15px;" type="text" name="txtUserID" size="30" />-->
-                  <!--<input id="txtUserPW" style="margin-bottom: 15px;" type="password" name="txtUserPW" size="30" />-->
-
-                  <!--<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="button" id="btnLogin" name="btnLogin" value="Log In" />-->
-                <!--</form>-->
-              <!--</div>-->
-              <!--</li>-->
-            </ul>
-          </div>
-          <!--/.nav-collapse -->
-        </div>
-      </div>
-    </div>
-
-    <div class="container">
-
-      <!-- Main hero unit for a primary marketing message or call to action -->
-      <div class="hero-unit">
-        <h1>GaiaSup</h1>
-        <p>A Spatial PubSub Service (SPS) for your Geo / Spatial / Location Base Service in the cloud.</p>
-        <p><a class="btn btn-primary btn-large" href="http://gaiasup.com/demo/demo.html" target="_blank">View demo &raquo;</a></p>
-      </div>
-
-      <div class="row">
-      	<div class="span4">
-          <h2>Powerful</h2>
-          <ul>
-          	<li>Support multiple Spaces and Layers.</li>
-          	<li>HTTP / Comet / WebSocket / SPDY support.</li>
-          </ul>
-      	</div>
-      	<div class="span4">
-      		<h2>Easy to use</h2>
-          <ul>
-          	<li>Zero installation cost, fast query.</li>
-          	<li>Simple RESTful API, JSON format request/response.</li>
-          </ul>
-      	</div>
-      	<div class="span4">
-          <h2>Perfect integration</h2>
-          <ul>
-            <li><a href="http://vastlib.wikispaces.com/SPS" target="_blank">SPS</a> for any kind of game or LBS apps.</li>
-            <li>Perfect integration with <a href="http://http://www.imonology.com/imoncloud.php" target="_blank">ImonCloud</a>.</li>
-          </ul>
-      	</div>
-      </div>
-
-      <hr>
-
-    <footer>
-    <center>
-      <p>&copy; 2012, <a href="http://imonology.com/" target="_blank">Imonology, LLC</a>. All rights reserved.</p>
-    </center>
-    </footer>
-
-    </div>
-    <!-- /container -->
-
-
-    <!-- Modals -->
-    <div class="modal hide fade" id="contact">
-      <div class="modal-header">
-        <a class="close" data-dismiss="modal">×</a>
-        <h3>Contact us</h3>
-      </div>
-      <div class="modal-body">
-        <p>You can send feedback or report bug to <a href="mailto:contact@GaiaSup.com">contact@GaiaSup.com</a></p>
-      </div>
-      <div class="modal-footer">
-        <a data-dismiss="modal" href="#" class="btn btn-primary" id="ContactUsClose">Close</a>
-      </div>
-    </div>
-
-    <!-- Le javascript
-    ================================================== -->
-    <!-- Placed at the end of the document so the pages load faster -->
-    <script src="/assets/js/jquery.js"></script>
-    <script src="/assets/js/bootstrap-transition.js"></script>
-    <script src="/assets/js/bootstrap-alert.js"></script>
-    <script src="/assets/js/bootstrap-modal.js"></script>
-    <script src="/assets/js/bootstrap-dropdown.js"></script>
-    <script src="/assets/js/bootstrap-scrollspy.js"></script>
-    <script src="/assets/js/bootstrap-tab.js"></script>
-    <script src="/assets/js/bootstrap-tooltip.js"></script>
-    <script src="/assets/js/bootstrap-popover.js"></script>
-    <script src="/assets/js/bootstrap-button.js"></script>
-    <script src="/assets/js/bootstrap-collapse.js"></script>
-    <script src="/assets/js/bootstrap-carousel.js"></script>
-    <script src="/assets/js/bootstrap-typeahead.js"></script>
-
-  </body>
-</html>

File docs/lib/js.html

-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <title>JavaScript - Library - Documentation - GaiaSup</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="keywords" content="GaiaSup,LBS,Geo,Spatial,Location Base Service,Spatial Publish Subscribe,SPS,ImonCloud" />
-    <meta name="description" content="Spatial PubSub Service for your Geo / Spatial / Location Base Service in the cloud by Imonology">
-    <meta name="author" content="Imonology LLC">
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
-    <!-- styles -->
-    <link href="/assets/css/bs_united.css" rel="stylesheet">
-    <style type="text/css">
-      body {
-        padding-top: 60px;
-        padding-bottom: 40px;
-      }
-    </style>
-    <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
-    <link href="/assets/css/prettify.css" rel="stylesheet">
-
-    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <!-- fav and touch icons -->
-    <!--<link rel="shortcut icon" href="./assets/ico/favicon.ico">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">-->
-  </head>
-
-  <body onload="prettyPrint()">
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="/">GaiaSup</a>
-          <div class="nav-collapse">
-            <ul class="nav">
-              <li><a href="/">Home</a></li>
-              <li><a href="/pricing">Pricing</a></li>
-              <li><a href="/manage">Manage</a></li>
-              <li class="active"><a href="/doc/api">Documentation</a></li>
-              <li><a data-toggle="modal" href="#contact">Contact us</a></li>
-              <!--<li><a href="/contact">Contact us</a></li>-->
-            </ul>
-
-            <!-- The drop down menu -->
-            <ul class="nav pull-right">
-              <li><a href="/login">Log In / Sign Up</a></li>
-              <!--<li class="divider-vertical"></li>-->
-              <!--<li class="drop down">-->
-              <!--<a class="dropdown-toggle" href="#" data-toggle="dropdown">Log In <strong class="caret"></strong></a>-->
-              <!--<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">-->
-                <!--<form id="frmLogin">-->
-                  <!--<input id="txtUserID" style="margin-bottom: 15px;" type="text" name="txtUserID" size="30" />-->
-                  <!--<input id="txtUserPW" style="margin-bottom: 15px;" type="password" name="txtUserPW" size="30" />-->
-
-                  <!--<input class="btn btn-primary" style="clear: left; width: 100%; height: 32px; font-size: 13px;" type="button" id="btnLogin" name="btnLogin" value="Log In" />-->
-                <!--</form>-->
-              <!--</div>-->
-              <!--</li>-->
-            </ul>
-          </div>
-          <!--/.nav-collapse -->
-        </div>
-      </div>
-    </div>
-
-    <div class="container">
-      <ul class="breadcrumb">
-        <li><a href="/doc/api">Documentation</a> <span class="divider">→</span></li>
-        <li><a href="/doc/api#lib">Libraries</a> <span class="divider">→</span></li>
-        <li class="active">JavaScript</li>
-      </ul>
-
-      <div class="hero-unit">
-        <h2>gaia.Position(:x, :y, :z)</h2>
-        <em>A Position object used by GaiaSup.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-// my self position
-var myPosition = new gaia.Position(1, 2, 3); </pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:x</div>
-              </td>
-              <td>
-                <div>
-                  x value of the Position
-                </div>
-                <br/>
-                <div>
-                  <strong>Example Value: </strong>
-                  <span>0</span>
-                </div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:y</div>
-              </td>
-              <td>
-                <div>
-                  y value of the Position
-                </div>
-                <br/>
-                <div>
-                  <strong>Example Value: </strong>
-                  <span>1</span>
-                </div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:z</div>
-              </td>
-              <td>
-                <div>
-                  z value of the Position
-                </div>
-                <br/>
-                <div>
-                  <strong>Example Value: </strong>
-                  <span>2</span>
-                </div>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Position.equals(:pos)</h2>
-        <em>Check if two positions are equal.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var myPosition = new gaia.Position(0, 0, 0);
-
-// new position
-var newpos = new gaia.Position(3, 2, 1);
-
-// check for position change
-if (myPosition.equals(newpos) === false) {
-  myPosition = newpos;
-  pos_changed = true;
-} </pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:pos</div>
-              </td>
-              <td>
-                <div>
-                  another gaia.Position object to be checked against
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node(:api_key, <em>:id</em>, <em>:layer</em>, <em>:pos</em>)</h2>
-        <em>A Node object representing a position with attributes in the system.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var myPosition = new gaia.Position(0, 0, 0);
-
-// reference to gaiaNode object, with API key provided
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887', 'BlueT', 'GaiaSup', myPosition); </pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:api_key</div>
-              </td>
-              <td>
-                <div>
-                  unique API key for the application using GaiaSup
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Optional Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:id</div>
-              </td>
-              <td>
-                <div>
-                  unique id for this Node
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:layer</div>
-              </td>
-              <td>
-                <div>
-                  layer name for this Node
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:pos</div>
-              </td>
-              <td>
-                <div>
-                  a gaia.Position object indicating the initial position
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.registerLayer(:layer, :onDone)</h2>
-        <em>Register a new Layer.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.registerLayer('GaiaSup',
-  function (ret) {
-    // do something when register layer succeed ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:layer</div>
-              </td>
-              <td>
-                <div>
-                  layer name for this Node
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to return result
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.registerNode(:id, :onDone)</h2>
-        <em>Register a Node under the current API key and Layer.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.registerNode('BlueT',
-  function (ret) {
-    // do something when register node succeed ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:id</div>
-              </td>
-              <td>
-                <div>
-                  unique identification for the Node
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to return result
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.revokeLayer(:onDone)</h2>
-        <em>Revoke the currently used Layer.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.revokeLayer( function (ret) {
-  // do something when revoke current layer succeed ...
-});</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to notify when done
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.revokeNode(:onDone)</h2>
-        <em>Revoke the current Node.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.revokeNode( function (ret) {
-  // do something when revoke current node succeed ...
-});</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to notify when done
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.querySquare(:xmin, :ymin, :zmin, :xmax, :ymax, zmax, :onDone)</h2>
-        <em>Obtain the positions of other Nodes within a square area.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.querySquare(100, 200, 300, 300, 400, 500,
-  function (ret) {
-    // do something when query succeed ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:xmin</div>
-              </td>
-              <td>
-                <div>
-                  The minimal value of x of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:ymin</div>
-              </td>
-              <td>
-                <div>
-                  The minimal value of y of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:zmin</div>
-              </td>
-              <td>
-                <div>
-                  The minimal value of z of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:xmax</div>
-              </td>
-              <td>
-                <div>
-                  The maximal value of x of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:ymax</div>
-              </td>
-              <td>
-                <div>
-                  The maximal value of y of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:zmax</div>
-              </td>
-              <td>
-                <div>
-                  The maximal value of z of the queried square area
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to return result
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.publishPos(:pos)</h2>
-        <em>Publish self position for other Nodes to see.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var myPosition = new gaia.Position(1, 2, 3);
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.publishPos(myPosition)</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:post</div>
-              </td>
-              <td>
-                <div>
-                  a gaia.Position object for current position
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.queryNearby(:radius, :onListReceived)</h2>
-        <em>Query for all neighboring Nodes within a radius.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.queryNearby(500,
-  function (lstNode) {
-    // do something when node list (lstNode) Received ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:radius</div>
-              </td>
-              <td>
-                <div>
-                  the radius to query
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onListReceived</div>
-              </td>
-              <td>
-                <div>
-                  a list of neighbor Nodes (gaia.Node objects)
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.valid(:layer, :id, :onDone)</h2>
-        <em>Validate whether a particular Node is registered.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.valid('GaiaSup', 'BlueT',
-  function (ret) {
-    // do something when check succeed ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:layer</div>
-              </td>
-              <td>
-                <div>
-                  Layer name of the Node to check for existence
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:id</div>
-              </td>
-              <td>
-                <div>
-                  Unique ID of the Node to check for existence
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  return result of the check
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.sendMessage(:msg, :onDone)</h2>
-        <em>Send message all currently known Nodes.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.sendMessage('Hello, Gaia!',
-  function (ret) {
-    // do something when message sent ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:msg</div>
-              </td>
-              <td>
-                <div>
-                  message content
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to notify when the send is done
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.recvMessage(:onReceived)</h2>
-        <em>Receive new messages sent by other Nodes.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.recvMessage( function (msg) {
-  // do something when message received ...
-});
-</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:onReceived</div>
-              </td>
-              <td>
-                <div>
-                  callback to return back a received message
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.queryMessage(:start, :stop, :onDone)</h2>
-        <em>Query messages sent to self Node from history.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.queryMessage(1347468776, 1347498729
-  function (msg) {
-    // do something when message received ...
-  }
-);</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:start</div>
-              </td>
-              <td>
-                <div>
-                  Time for the earliest message to retrieve (in epoch format)
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:stop</div>
-              </td>
-              <td>
-                <div>
-                  Time for the latest message to retrieve  (in epoch format)
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onDone</div>
-              </td>
-              <td>
-                <div>
-                  callback to notify received messages
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <br/>
-
-      <div>
-        <legend>Shortcut Methods</legend>
-      </div>
-      <div class="hero-unit">
-        <h2>gaia.Node.join(:layer, :id)</h2>
-        <em>Join the system directly with a Node. perform registerLayer and registerNode together.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.join('GaiaSup', 'BlueT');</pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:layer</div>
-              </td>
-              <td>
-                <div>
-                  Layer to join
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:id</div>
-              </td>
-              <td>
-                <div>
-                  unique ID for the joining Node
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.subscribeNearby(:radius, :onUpdate, :interval)</h2>
-        <em>Subscribe the updates of Nodes within a radius. this method performs querySqaure periodically as specified by 'interval'.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.join('GaiaSup', 'BlueT');
-
-gaiaNode.subscribeNearby(500, updateHandler, 1000); </pre>
-          <br/>
-        </div>
-        <table class="table">
-          <thead>
-            <tr>
-              <th class="span3">Parameters</th>
-              <th>Description</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr>
-              <td>
-                <div>:radius</div>
-              </td>
-              <td>
-                <div>
-                  radius around my Node center to subscribe for updates
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:onUpdate</div>
-              </td>
-              <td>
-                <div>
-                  callback to notify when there's join/update/leave of Nodes
-                </div>
-                <br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <div>:interval</div>
-              </td>
-              <td>
-                <div>
-                  interval time for querying the neighboring Node states
-                </div>
-                <br/>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.getNeighbors()</h2>
-        <em>Get a list of neighbor Nodes currently known (i.e., Nodes that are learned by calling querySquare).</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.join('GaiaSup', 'BlueT');
-
-gaiaNode.getNeighbors();</pre>
-          <br/>
-          <strong>Return</strong>
-          <br/> <br/>
-          <pre>gaia.Node[]</pre>
-          <br/>
-        </div>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.isJoined()</h2>
-        <em>Check if the current Node has joined successfully (i.e., has performed registerLayer and registerNode successfully).</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.join('GaiaSup', 'BlueT');
-
-gaiaNode.isJoined();</pre>
-          <br/>
-          <strong>Return</strong>
-          <br/> <br/>
-          <pre>bool</pre>
-          <br/>
-        </div>
-      </div>
-
-      <div class="hero-unit">
-        <h2>gaia.Node.toString()</h2>
-        <em>Print a string format of the current Node.</em>
-        <div>
-          <br/>
-          <strong>Example: </strong>
-          <br/> <br/>
-          <pre class="prettyprint linenums lang-js">
-var gaiaNode = new gaia.Node('ff003eee35778519ff3dee61ae91833233d0e887');
-
-gaiaNode.join('GaiaSup', 'BlueT');
-
-gaiaNode.toString();</pre>
-          <br/>
-        </div>
-      </div>
-
-    <hr>
-
-    <footer>
-    <center>
-      <p>&copy; 2012, <a href="http://imonology.com/" target="_blank">Imonology, LLC</a>. All rights reserved.</p>
-    </center>
-    </footer>
-
-    </div>
-    <!-- /container -->
-
-    <!-- Modals -->
-    <div class="modal hide fade" id="contact">
-      <div class="modal-header">
-        <a class="close" data-dismiss="modal">×</a>
-        <h3>Contact us</h3>
-      </div>
-      <div class="modal-body">
-        <p>You can send feedback or report bug to <a href="mailto:contact@GaiaSup.com">contact@GaiaSup.com</a></p>
-      </div>
-      <div class="modal-footer">
-        <a data-dismiss="modal" href="#" class="btn btn-primary" id="ContactUsClose">Close</a>
-      </div>
-    </div>
-
-    <!-- Le javascript
-    ================================================== -->
-    <!-- Placed at the end of the document so the pages load faster -->
-    <script src="/assets/js/jquery.js"></script>
-    <script src="/assets/js/bootstrap-transition.js"></script>
-    <script src="/assets/js/bootstrap-alert.js"></script>
-    <script src="/assets/js/bootstrap-modal.js"></script>
-    <script src="/assets/js/bootstrap-dropdown.js"></script>
-    <script src="/assets/js/bootstrap-scrollspy.js"></script>
-    <script src="/assets/js/bootstrap-tab.js"></script>
-    <script src="/assets/js/bootstrap-tooltip.js"></script>
-    <script src="/assets/js/bootstrap-popover.js"></script>
-    <script src="/assets/js/bootstrap-button.js"></script>
-    <script src="/assets/js/bootstrap-collapse.js"></script>
-    <script src="/assets/js/bootstrap-carousel.js"></script>
-    <script src="/assets/js/bootstrap-typeahead.js"></script>
-
-    <script src="/assets/js/prettify.js"></script>
-
-  </body>
-</html>

File docs/lib/py.html

-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <title>Python - Library - Documentation - GaiaSup</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="keywords" content="GaiaSup,LBS,Geo,Spatial,Location Base Service,Spatial Publish Subscribe,SPS,ImonCloud" />
-    <meta name="description" content="Spatial PubSub Service for your Geo / Spatial / Location Base Service in the cloud by Imonology">
-    <meta name="author" content="Imonology LLC">
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
-    <!-- styles -->
-    <link href="/assets/css/bs_united.css" rel="stylesheet">
-    <style type="text/css">
-      body {
-        padding-top: 60px;
-        padding-bottom: 40px;
-      }
-    </style>
-    <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
-    <link href="/assets/css/prettify.css" rel="stylesheet">
-
-    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <!-- fav and touch icons -->
-    <!--<link rel="shortcut icon" href="./assets/ico/favicon.ico">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">-->
-    <!--<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">-->
-  </head>
-
-  <body onload="prettyPrint()">
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="/">GaiaSup</a>
-          <div class="nav-collapse">
-            <ul class="nav"><