]> git.nbdom.net Git - nb.git/commitdiff
doc
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 17 Jun 2016 08:59:31 +0000 (10:59 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 17 Jun 2016 08:59:31 +0000 (10:59 +0200)
etc/dbs/rent.php
lib/js/nb.js

index 2b0c21d7f93b26d7964d1f0568e4eb984c8c8815..2d0429ae25409e5a728adc36736ca2f4297889b2 100644 (file)
@@ -112,6 +112,7 @@ function rent_doc($table,&$r) {
 
   }
 
+  if (!empty($r['doc'])) $r['doc'] = '<div class="doc">'.$r['doc'].'</div>';
 }
 
 ?>
index 1002dea0008f5af2f52003e4843e2d8776270467..748738fcba1914bfa4a7bd33ac9bdca0f976594a 100644 (file)
@@ -287,7 +287,7 @@ function NB(args) {
     return text;
   };
 
-  this.str2a = function(elems,compact,class_exp_file) {
+  this.e2links = function(elems,compact,class_exp_file) {
     compact = (typeof compact === 'undefined') ? true : compact;
     class_exp_file = (typeof class_exp_file === 'undefined') ? 'doc|dir|path' : class_exp_file;
     $(elems).each(function(){
@@ -310,9 +310,7 @@ function NB(args) {
         if (this.className.match(re) && !url.match(/^\w+:/)) url = 'file://'+encodeURI(url);
       }
 
-      if (compact) {
-        text = that.str_trunc(text);
-      }
+      if (compact) text = that.str_trunc(text);
       //console.log(text);
 
       $(this).html('<a href="'+url+'" class="small" target="_blank">'+text+'</a>');