diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/friendika.php | 2 | ||||
-rw-r--r-- | mod/match.php | 1 | ||||
-rw-r--r-- | mod/photos.php | 26 | ||||
-rw-r--r-- | mod/qsearch.php | 2 | ||||
-rw-r--r-- | mod/settings.php | 26 | ||||
-rw-r--r-- | mod/uexport.php | 4 |
6 files changed, 57 insertions, 4 deletions
diff --git a/mod/friendika.php b/mod/friendika.php index 8bd6e3437..7762bfbb5 100644 --- a/mod/friendika.php +++ b/mod/friendika.php @@ -24,7 +24,7 @@ function friendika_init(&$a) { ); - echo str_replace('\\/','/',json_encode($data)); + echo json_encode($data); killme(); } } diff --git a/mod/match.php b/mod/match.php index 2742b4a88..12138a26c 100644 --- a/mod/match.php +++ b/mod/match.php @@ -38,6 +38,7 @@ function match_content(&$a) { if(count($j->results)) { foreach($j->results as $jj) { + $o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">'; $o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->url . ']' . '" /></a></div>'; $o .= '<div class="profile-match-break"></div>'; diff --git a/mod/photos.php b/mod/photos.php index 71d00ed25..926b33dbe 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -45,6 +45,32 @@ function photos_init(&$a) { if(! x($a->page,'aside')) $a->page['aside'] = ''; $a->page['aside'] .= $o; + + + $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ; + + $a->page['htmlhead'] .= <<< EOT + + $(document).ready(function() { + + $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { + var selstr; + $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { + selstr = $(this).text(); + $('#jot-perms-icon').removeClass('unlock').addClass('lock'); + $('#jot-public').hide(); + }); + if(selstr == null) { + $('#jot-perms-icon').removeClass('lock').addClass('unlock'); + $('#jot-public').show(); + } + + }).trigger('change'); + + }); + + </script> +EOT; } return; diff --git a/mod/qsearch.php b/mod/qsearch.php index 9b3f2b087..c35e253b6 100644 --- a/mod/qsearch.php +++ b/mod/qsearch.php @@ -44,7 +44,7 @@ function qsearch_init(&$a) { $results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']); } - echo str_replace('\\/','/',json_encode((object) $results)); + echo json_encode((object) $results); killme(); } diff --git a/mod/settings.php b/mod/settings.php index f898f171c..86d1ae015 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -6,6 +6,32 @@ function settings_init(&$a) { profile_load($a,$a->user['nickname']); } + $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ; + + $a->page['htmlhead'] .= <<< EOT + + $(document).ready(function() { + + $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { + var selstr; + $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { + selstr = $(this).text(); + $('#jot-perms-icon').removeClass('unlock').addClass('lock'); + $('#jot-public').hide(); + }); + if(selstr == null) { + $('#jot-perms-icon').removeClass('lock').addClass('unlock'); + $('#jot-public').show(); + } + + }).trigger('change'); + + }); + + </script> +EOT; + + } diff --git a/mod/uexport.php b/mod/uexport.php index 96f062c41..e1fb22855 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -39,7 +39,7 @@ function uexport_init(&$a) { $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile ); header("Content-type: application/json"); - echo str_replace('\\/','/',json_encode($output)); + echo json_encode($output); $r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ", intval(local_user()) @@ -63,7 +63,7 @@ function uexport_init(&$a) { } $output = array('item' => $item); - echo str_replace('\\/','/',json_encode($output)); + echo json_encode($output); } |