Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup; merge ptressel

  • Loading branch information...
commit 5fd2bae1b65b5af180a9182e7588d874da8d0ea4 1 parent 4b7e0d0
@flavour authored
View
5 README
@@ -3,3 +3,8 @@ Sahana Eden is an Emergency Development Environment - an Open Source framework t
It is a web based collaboration tool that addresses the common coordination problems during a disaster from finding missing people, managing aid, managing volunteers, tracking camps effectively between Government groups, the civil society (NGOs) and the victims themselves.
Please see the website for more details: http://eden.sahanafoundation.org/
+
+Note to developers -- get started here!
+http://eden.sahanafoundation.org/wiki/Develop
+Before your first pull request, sign the Contributor's License Agreement, which protects your rights to your code, while allowing it to be distributed and used in Sahana Eden.
+http://bit.ly/SSF-eCLA
View
2  VERSION
@@ -1 +1 @@
-2782e9d (2012-12-03 11:23:35)
+4b7e0d0 (2012-12-03 11:47:27)
View
7 modules/s3/s3msg.py
@@ -738,14 +738,11 @@ def send_email(self,
limit = settings.get_mail_limit()
if limit:
- db = current.db
- s3db = current.db
- table = s3db.msg_limit
# Check whether we've reached our daily limit
day = datetime.timedelta(hours=24)
cutoff = current.request.utcnow - day
- query = (table.created_on > cutoff)
- check = db(query).count()
+ table = current.s3db.msg_limit
+ check = current.db(table.created_on > cutoff).count()
if check >= limit:
return False
# Log the sending
View
15 private/templates/SandyRelief/views/footer.html
@@ -1,18 +1,9 @@
<a href='/{{=appname}}/default/index/contact' class='action-btn'>HELP</a>
{{if auth.is_logged_in():}}
-<a id="sandychat" href='http://sandyrelief.sahanafoundation.org:9090?nick={{="SR%s_%s" % (s3_fullname(auth.user).replace(" ", "_"), s3db.org_site_represent(auth.user.site_id, show_link=False).replace(" ", "_"))}}&channels=SandyRelief' target='_blank' class='action-btn'>Online Chat</a>
+<a id="sandychat" href='http://sandyrelief.sahanafoundation.org:9090?nick={{="%s_%s_SR" % (s3_fullname(auth.user).replace(" ", "_"), s3db.org_site_represent(auth.user.site_id, show_link=False).replace(" ", "_"))}}&channels=SandyRelief' target='_blank' class='action-btn'>Online Chat</a>
+{{s3.jquery_ready.append("$('#sandychat').click(function(){splitview($('#sandychat').attr('href'),'Help chat',0.4);return false})")}}
{{pass}}
<p id='poweredby'>
<img src='/{{=appname}}/static/img/S3menu_logo.png' width='30' height='28' style='vertical-align: middle;' alt='{{=T("Powered by Sahana Eden")}}' /><a target='_blank' href='http://eden.sahanafoundation.org' title='{{=T("Powered by Sahana Eden")}}'>{{=T("Powered by Sahana Eden")}}</a>
</p>
-<div class='cf'></div>
-{{if auth.is_logged_in():}}
-<script type="text/javascript">
-jQuery(function() {
- jQuery("#sandychat").click( function() {
- splitview('http://sandyrelief.sahanafoundation.org:9090?nick={{="SR%s_%s" % (s3_fullname(auth.user).replace(" ", "_"), s3db.org_site_represent(auth.user.site_id, show_link=False).replace(" ", "_"))}}&channels=SandyRelief', "Help chat", 0.4);
- return false;
- });
-});
-</script>
-{{pass}}
+<div class='cf'></div>
View
2  static/themes/SandyRelief/eden.min.css
1 addition, 1 deletion not shown
View
22 static/themes/SandyRelief/js/splitview.js
@@ -1,15 +1,13 @@
function splitview(url, title, ratio) {
- var availablex = window.innerWidth; // Total available width
- var availabley = window.innerHeight; // Total available height
- var leftwindowx = Math.floor(availablex * (1-ratio)); // Left windows' width
- var rightwindowx = Math.floor(availablex * ratio); // Right windows' size
- var tolerance = 20; // Some browser seem to make measuring mistakes. This ensures there is a gap between the two windows. If the two windows overlay each other, increase this.
-
-
- if(typeof window.resizeTo(leftwindowx, availabley) == "undefined") { // We might not be allowed to change the browsers' size, so there is a fallback.
- console.log("Your browser does not support window resizing, opening a popup instead");
- window.open(document.location.href, "Sahana Eden", "innerWidth=" + leftwindowx + ", innerHeight=" + availabley + ", screenY=" + window.screenY + ", screenX=" + window.screenX);
- }
- window.open(url, title, "innerWidth=" + (rightwindowx - tolerance) + ", innerHeight=" + availabley + ", screenY=" + window.screenY + ", screenX=" + (window.screenX + leftwindowx + tolerance));
+ var availablex = window.innerWidth; // Total available width
+ var availabley = window.innerHeight; // Total available height
+ var leftwindowx = Math.floor(availablex * (1-ratio)); // Left windows' width
+ var rightwindowx = Math.floor(availablex * ratio); // Right windows' size
+ var tolerance = 20; // Some browsers seem to make measuring mistakes. This ensures there is a gap between the two windows. If the two windows overlay each other, increase this.
+ if (typeof window.resizeTo(leftwindowx, availabley) == 'undefined') { // We might not be allowed to change the browsers' size, so there is a fallback.
+ console.log('Your browser does not support window resizing, opening a popup instead');
+ window.open(document.location.href, 'Sahana Eden', 'innerWidth=' + leftwindowx + ', innerHeight=' + availabley + ', screenY=' + window.screenY + ', screenX=' + window.screenX);
+ }
+ window.open(url, title, 'innerWidth=' + (rightwindowx - tolerance) + ', innerHeight=' + availabley + ', screenY=' + window.screenY + ', screenX=' + (window.screenX + leftwindowx + tolerance));
}

0 comments on commit 5fd2bae

Please sign in to comment.
Something went wrong with that request. Please try again.