aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/item.php5
-rw-r--r--version.inc2
-rw-r--r--view/tpl/notes.tpl17
3 files changed, 19 insertions, 5 deletions
diff --git a/mod/item.php b/mod/item.php
index d8101cf01..226d05d7e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -1133,14 +1133,13 @@ function fix_attached_photo_permissions($uid,$xchan_hash,$body,
if($r) {
$r = q("UPDATE photo SET allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s'
- WHERE resource_id = '%s' AND uid = %d AND album = '%s' ",
+ WHERE resource_id = '%s' AND uid = %d ",
dbesc($str_contact_allow),
dbesc($str_group_allow),
dbesc($str_contact_deny),
dbesc($str_group_deny),
dbesc($image_uri),
- intval($uid),
- dbesc( t('Wall Photos'))
+ intval($uid)
);
// also update the linked item (which is probably invisible)
diff --git a/version.inc b/version.inc
index a8c40c9ac..8c914af3a 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-03-31.633
+2014-04-01.634
diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl
index b67f66f5b..3ec57ba12 100644
--- a/view/tpl/notes.tpl
+++ b/view/tpl/notes.tpl
@@ -1,8 +1,23 @@
<div class="widget">
<script>
+var noteSaveTimer = null;
$(document).on('focusout',"#note-text",function(e){
- $.post('notes', { 'note_text' : $('#note-text').val() });
+ if(noteSaveTimer)
+ clearTimeout(noteSaveTimer);
+ noteSaveChanges();
+ if(noteSaveTimer)
+ clearTimeout(noteSaveTimer);
+ noteSaveTimer = null;
+});
+
+$(document).on('focusin',"#note-text",function(e){
+ noteSaveTimer = setTimeout(noteSaveChanges,10000);
});
+
+function noteSaveChanges() {
+ $.post('notes', { 'note_text' : $('#note-text').val() });
+ noteSaveTimer = setTimeout(noteSaveChanges,10000);
+}
</script>
<h3>{{$banner}}</h3>