Browse Source

datefix

version-14
Rushabh Mehta 13 years ago
parent
commit
dd3adc7604
5 changed files with 5 additions and 35 deletions
  1. +0
    -12
      conf/_conf.py
  2. +3
    -11
      conf/apache.conf
  3. +0
    -11
      conf/conf.py
  4. +1
    -0
      js/legacy/utils/datetime.js
  5. +1
    -1
      js/legacy/wnf.compressed.js

+ 0
- 12
conf/_conf.py View File

@@ -1,12 +0,0 @@
# Main Configuration File

# Copy this into conf.py
# ----------------------

# Index URL
# ---------

# URL path to index.html
# if you are installing within a folder, add the folderpath
index_path = '/'


+ 3
- 11
conf/apache.conf View File

@@ -13,21 +13,13 @@ Listen 8080
Order allow,deny Order allow,deny
Allow from all Allow from all


# enable direct execution of .py files
Options +ExecCGI
#AddHandler cgi-script .cgi
AddHandler cgi-script .py
Options -Indexes +ExecCGI
AddHandler cgi-script


DirectoryIndex index.html
DirectoryIndex index.cgi index.html


RewriteEngine On RewriteEngine On
# all model calls will be redirected to model.py
# to call a model - mysite/models/type/name eg. mysite.com/models/Organization/WebNotes
RewriteRule /models/(.*)$ /lib/model.py/$1 [L,QSA] RewriteRule /models/(.*)$ /lib/model.py/$1 [L,QSA]
# all page calls will be redircted to page.py
# page/home
RewriteRule /pages/(.*)$ /lib/page.py/$1 [L,QSA] RewriteRule /pages/(.*)$ /lib/page.py/$1 [L,QSA]
</Directory> </Directory>


+ 0
- 11
conf/conf.py View File

@@ -1,11 +0,0 @@
# Main Configuration File

# Copy this into conf.py
# ----------------------

# Index URL
# ---------

# URL path to index.html
# if you are installing within a folder, add the folderpath
index_path = '/'

+ 1
- 0
js/legacy/utils/datetime.js View File

@@ -261,6 +261,7 @@ if ( typeof jQuery != "undefined" )
}; };


var comment_when = prettyDate; var comment_when = prettyDate;
wn.datetme.comment_when = prettyDate;


// globals (deprecate) // globals (deprecate)
var date = dateutil = wn.datetime; var date = dateutil = wn.datetime;


+ 1
- 1
js/legacy/wnf.compressed.js View File

@@ -119,7 +119,7 @@ var date=new Date((time||"").replace(/-/g,"/").replace(/[TZ]/g," ").replace(/\.[
return'';return day_diff==0&&(diff<60&&"just now"||diff<120&&"1 minute ago"||diff<3600&&Math.floor(diff/60)+" minutes ago"||diff<7200&&"1 hour ago"||diff<86400&&Math.floor(diff/3600)+" hours ago")||day_diff==1&&"Yesterday"||day_diff<7&&day_diff+" days ago"||day_diff<31&&Math.ceil(day_diff/7)+" weeks ago"||day_diff<365&&Math.ceil(day_diff/30)+" months ago"||"more than "+Math.floor(day_diff/365)+" year(s) ago";} return'';return day_diff==0&&(diff<60&&"just now"||diff<120&&"1 minute ago"||diff<3600&&Math.floor(diff/60)+" minutes ago"||diff<7200&&"1 hour ago"||diff<86400&&Math.floor(diff/3600)+" hours ago")||day_diff==1&&"Yesterday"||day_diff<7&&day_diff+" days ago"||day_diff<31&&Math.ceil(day_diff/7)+" weeks ago"||day_diff<365&&Math.ceil(day_diff/30)+" months ago"||"more than "+Math.floor(day_diff/365)+" year(s) ago";}
if(typeof jQuery!="undefined") if(typeof jQuery!="undefined")
jQuery.fn.prettyDate=function(){return this.each(function(){var date=prettyDate(this.title);if(date) jQuery.fn.prettyDate=function(){return this.each(function(){var date=prettyDate(this.title);if(date)
jQuery(this).text(date);});};var comment_when=prettyDate;var date=dateutil=wn.datetime;var get_today=wn.datetime.get_today
jQuery(this).text(date);});};var comment_when=prettyDate;wn.datetme.comment_when=prettyDate;var date=dateutil=wn.datetime;var get_today=wn.datetime.get_today
var time_to_ampm=wn.datetime.time_to_ampm;var time_to_hhmm=wn.datetime.time_to_hhmm;var only_date=wn.datetime.only_date; var time_to_ampm=wn.datetime.time_to_ampm;var time_to_hhmm=wn.datetime.time_to_hhmm;var only_date=wn.datetime.only_date;
/* /*
* lib/js/legacy/utils/dom.js * lib/js/legacy/utils/dom.js


Loading…
Cancel
Save