diff options
-rw-r--r-- | include/RedDAV/RedBrowser.php | 6 | ||||
-rw-r--r-- | include/enotify.php | 17 | ||||
-rw-r--r-- | mod/filestorage.php | 6 | ||||
-rw-r--r-- | mod/ping.php | 4 | ||||
-rw-r--r-- | mod/settings.php | 5 | ||||
-rw-r--r-- | view/theme/redbasic/css/mod_events.css | 23 | ||||
-rw-r--r-- | view/theme/redbasic/css/mod_group.php | 32 | ||||
-rw-r--r-- | view/theme/redbasic/css/mod_profile_photo.css | 10 | ||||
-rw-r--r-- | view/theme/redbasic/css/mod_profiles.css | 39 | ||||
-rw-r--r-- | view/theme/redbasic/css/mod_profperm.css | 32 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 168 | ||||
-rw-r--r-- | view/tpl/attach_edit.tpl | 43 | ||||
-rwxr-xr-x | view/tpl/photos_upload.tpl | 35 | ||||
-rwxr-xr-x | view/tpl/settings.tpl | 2 |
14 files changed, 240 insertions, 182 deletions
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php index d07f60083..709f6339b 100644 --- a/include/RedDAV/RedBrowser.php +++ b/include/RedDAV/RedBrowser.php @@ -342,6 +342,7 @@ class RedBrowser extends DAV\Browser\Plugin { 'application/octet-stream' => 'icon-file-alt', //Text + 'text/plain' => 'icon-file-text-alt', 'application/msword' => 'icon-file-text-alt', 'application/pdf' => 'icon-file-text-alt', 'application/vnd.oasis.opendocument.text' => 'icon-file-text-alt', @@ -365,6 +366,11 @@ class RedBrowser extends DAV\Browser\Plugin { 'audio/mpeg' => 'icon-music', 'audio/wav' => 'icon-music', 'application/ogg' => 'icon-music', + + //Video + 'video/quicktime' => 'icon-film', + + ); $iconFromType = 'icon-file-alt'; diff --git a/include/enotify.php b/include/enotify.php index f3eb80117..3fef3ba0a 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -357,9 +357,21 @@ function notification($params) { // create notification entry in DB + $seen = 0; + + // Mark some notifications as seen right away + // Note! The notification have to be created, because they are used to send emails + // So easiest solution to hide them from Notices is to mark them as seen right away. + // Another option would be to not add them to the DB, and change how emails are handled (probably would be better that way) + $always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices'); + if(!$always_show_in_notices) { + if(($params['type'] == NOTIFY_WALL) || ($params['type'] == NOTIFY_MAIL) || ($params['type'] == NOTIFY_INTRO)) { + $seen = 1; + } + } - $r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,type,verb,otype) - values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,'%s','%s')", + $r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,seen,type,verb,otype) + values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,%d,'%s','%s')", dbesc($datarray['hash']), dbesc($datarray['name']), dbesc($datarray['url']), @@ -369,6 +381,7 @@ function notification($params) { intval($datarray['uid']), dbesc($datarray['link']), dbesc($datarray['parent']), + intval($seen), intval($datarray['type']), dbesc($datarray['verb']), dbesc($datarray['otype']) diff --git a/mod/filestorage.php b/mod/filestorage.php index a76a218af..6b731e440 100644 --- a/mod/filestorage.php +++ b/mod/filestorage.php @@ -127,10 +127,14 @@ function filestorage_content(&$a) { $lockstate = (($f['allow_cid'] || $f['allow_gid'] || $f['deny_cid'] || $f['deny_gid']) ? 'lock' : 'unlock'); + // Encode path that is used for link so it's a valid URL + // Keep slashes as slashes, otherwise mod_rewrite doesn't work correctly + $encoded_path = str_replace('%2F', '/', rawurlencode($cloudpath)); + $o = replace_macros(get_markup_template('attach_edit.tpl'), array( '$header' => t('Edit file permissions'), '$file' => $f, - '$cloudpath' => z_root() . '/' . $cloudpath, + '$cloudpath' => z_root() . '/' . $encoded_path, '$parentpath' => $parentpath, '$uid' => $channel['channel_id'], '$channelnick' => $channel['channel_address'], diff --git a/mod/ping.php b/mod/ping.php index cdb6aa0b2..593ae21f8 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -277,7 +277,7 @@ function ping_init(&$a) { $r = q("SELECT * FROM item WHERE item_restrict = %d and ( item_flags & %d ) > 0 and uid = %d - and author_xchan != '%s' ", + and author_xchan != '%s' ORDER BY created DESC", intval(ITEM_VISIBLE), intval(ITEM_UNSEEN), intval(local_user()), @@ -300,7 +300,7 @@ function ping_init(&$a) { if(argc() > 1 && (argv(1) === 'intros')) { $result = array(); - $r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or (xchan_flags & %d) > 0)", + $r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or (xchan_flags & %d) > 0) ORDER BY abook_created DESC", intval(local_user()), intval(ABOOK_FLAG_PENDING), intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED), diff --git a/mod/settings.php b/mod/settings.php index ea7b2ba06..be6f2cfb9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -449,6 +449,8 @@ function settings_post(&$a) { if(x($_POST,'vnotify11')) $vnotify += intval($_POST['vnotify11']); + $always_show_in_notices = x($_POST,'always_show_in_notices') ? 1 : 0; + $channel = $a->get_channel(); $err = ''; @@ -478,6 +480,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','blocktags',$blocktags); set_pconfig(local_user(),'system','channel_menu',$channel_menu); set_pconfig(local_user(),'system','vnotify',$vnotify); + set_pconfig(local_user(),'system','always_show_in_notices',$always_show_in_notices); set_pconfig(local_user(),'system','evdays',$evdays); $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d", @@ -995,6 +998,7 @@ function settings_content(&$a) { $permissions_role = get_pconfig(local_user(),'system','permissions_role'); $permissions_set = (($permissions_role && $permissions_role != 'custom') ? true : false); $vnotify = get_pconfig(local_user(),'system','vnotify'); + $always_show_in_notices = get_pconfig(local_user(),'system','always_show_in_notices'); if($vnotify === false) $vnotify = (-1); @@ -1080,6 +1084,7 @@ function settings_content(&$a) { '$vnotify9' => array('vnotify9', t('System critical alerts'), ($vnotify & VNOTIFY_ALERT), VNOTIFY_ALERT, t('Recommended')), '$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended')), '$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, ''), + '$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, ''), '$evdays' => array('evdays', t('Notify me of events this many days in advance'), $evdays, t('Must be greater than 0')), diff --git a/view/theme/redbasic/css/mod_events.css b/view/theme/redbasic/css/mod_events.css new file mode 100644 index 000000000..4b93932f0 --- /dev/null +++ b/view/theme/redbasic/css/mod_events.css @@ -0,0 +1,23 @@ +#event-start-text, #event-finish-text { + margin-top: 10px; + margin-bottom: 5px; +} + +#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text { + float: left; +} +#event-datetime-break { + margin-bottom: 10px; +} + +#event-nofinish-break, #event-adjust-break { + clear: both; +} + +#event-desc-text, #event-location-text { + margin-top: 10px; + margin-bottom: 5px; +} +#event-submit { + margin-top: 10px; +} diff --git a/view/theme/redbasic/css/mod_group.php b/view/theme/redbasic/css/mod_group.php new file mode 100644 index 000000000..d1f48a84c --- /dev/null +++ b/view/theme/redbasic/css/mod_group.php @@ -0,0 +1,32 @@ +#group-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} + +#group-members-end { + clear: both; +} + +#group-separator { + margin-top: 10px; + margin-bottom: 10px; +} + +#group-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} + +#group-all-contacts-end { + clear: both; + margin-bottom: 10px; +} + +#group-edit-desc { + margin-top: 15px; +} diff --git a/view/theme/redbasic/css/mod_profile_photo.css b/view/theme/redbasic/css/mod_profile_photo.css new file mode 100644 index 000000000..beda7da4c --- /dev/null +++ b/view/theme/redbasic/css/mod_profile_photo.css @@ -0,0 +1,10 @@ + +#cropimage-wrapper, #cropimage-preview-wrapper { + float: left; + padding: 30px; +} + +#crop-image-form { + margin-top: 30px; + clear: both; +} diff --git a/view/theme/redbasic/css/mod_profiles.css b/view/theme/redbasic/css/mod_profiles.css new file mode 100644 index 000000000..b2b9a9d01 --- /dev/null +++ b/view/theme/redbasic/css/mod_profiles.css @@ -0,0 +1,39 @@ +#profile-edit-wrapper .field label { + margin-top: 20px; + width: 175px; +} + +#profile-edit-wrapper .field input[type="text"] { + margin-top: 20px; + width: 220px; +} + + +#profile-edit-links { + max-width: $converse_width; + padding-top: 15px; + padding-bottom: 15px; +} + +#profile-edit-links .btn { + margin: 0 10px 15px 0; +} + +.profile-import { + vertical-align: top; + text-align: left; +} + +.profile-import b { + color: $link_colour; +} + +.profile-import input { + color: $font_colour; + border: none; +} + +#profile-edit-drop-link { + color: #FFF; + font-weight: normal; +} diff --git a/view/theme/redbasic/css/mod_profperm.css b/view/theme/redbasic/css/mod_profperm.css new file mode 100644 index 000000000..dabd0ceaa --- /dev/null +++ b/view/theme/redbasic/css/mod_profperm.css @@ -0,0 +1,32 @@ +#prof-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} + +#prof-members-end { + clear: both; +} + +#prof-separator { + margin-top: 10px; + margin-bottom: 10px; +} + +#prof-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} + +#prof-all-contacts-end { + clear: both; + margin-bottom: 10px; +} + +#prof-edit-desc { + margin-top: 15px; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index b778c43b5..50b21add9 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -358,61 +358,11 @@ footer { margin-top: 10px; } - -#cropimage-wrapper, #cropimage-preview-wrapper { - float: left; - padding: 30px; -} - -#crop-image-form { - margin-top: 30px; - clear: both; -} - +// Not used anymore? #page-profile .title { font-weight: bold; } -#profile-edit-wrapper .field label { - margin-top: 20px; - width: 175px; -} - -#profile-edit-wrapper .field input[type="text"] { - margin-top: 20px; - width: 220px; -} - - -#profile-edit-links { - max-width: $converse_width; - padding-top: 15px; - padding-bottom: 15px; -} - -#profile-edit-links .btn { - margin: 0 10px 15px 0; -} - -.profile-import { - vertical-align: top; - text-align: left; -} - -.profile-import b { - color: $link_colour; -} - -.profile-import input { - color: $font_colour; - border: none; -} - -#profile-edit-drop-link { - color: #FFF; - font-weight: normal; -} - .fn { font-weight: bold; font-size: 16px; @@ -1044,15 +994,18 @@ footer { margin: 10px; } +/* Not used anymore? */ #identity-manage-desc { margin-top:15px; margin-bottom: 15px; } +/* Not used anymore? */ #identity-manage-choose { margin-bottom: 15px; } +/* Not used anymore? */ #identity-submit { margin-top: 20px; } @@ -1100,114 +1053,27 @@ footer { .side-link { margin-bottom: 15px; } - -#group-members { - margin-top: 20px; - padding: 10px; - height: 250px; - overflow: auto; - border: 1px solid #ddd; -} - -#group-members-end { - clear: both; -} - -#group-separator { - margin-top: 10px; - margin-bottom: 10px; -} - -#group-all-contacts { - padding: 10px; - height: 450px; - overflow: auto; - border: 1px solid #ddd; -} - -#group-all-contacts-end { - clear: both; - margin-bottom: 10px; -} - -#group-edit-desc { - margin-top: 15px; -} - - -#prof-members { - margin-top: 20px; - padding: 10px; - height: 250px; - overflow: auto; - border: 1px solid #ddd; -} - -#prof-members-end { - clear: both; -} - -#prof-separator { - margin-top: 10px; - margin-bottom: 10px; -} - -#prof-all-contacts { - padding: 10px; - height: 450px; - overflow: auto; - border: 1px solid #ddd; -} - -#prof-all-contacts-end { - clear: both; - margin-bottom: 10px; -} - -#prof-edit-desc { - margin-top: 15px; -} - - .required { color: #FF0000; } -#event-start-text, #event-finish-text { - margin-top: 10px; - margin-bottom: 5px; -} - -#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text { - float: left; -} -#event-datetime-break { - margin-bottom: 10px; -} - -#event-nofinish-break, #event-adjust-break { - clear: both; -} - -#event-desc-text, #event-location-text { - margin-top: 10px; - margin-bottom: 5px; -} -#event-submit { - margin-top: 10px; -} - +/* Not used anymore? */ #item-delete-selected { margin-top: 30px; } +/* Not used anymore? */ #item-delete-selected-end { clear: both; } + +/* Not used anymore? */ #item-delete-selected-icon, #item-delete-selected-desc { float: left; margin-right: 5px; } + +/* Not used anymore? */ #item-delete-selected-desc:hover { text-decoration: underline; } @@ -2075,6 +1941,20 @@ nav .badge:hover { background-color: #999; } +nav .badge.home-update, +nav .badge.notify-update, +nav .badge.intro-update, +nav .badge.mail-update { + background-color:#C9302C; +} + +nav .badge.home-update:hover, +nav .badge.notify-update:hover, +nav .badge.intro-update:hover, +nav .badge.mail-update:hover { + background-color:#D9534F; +} + .dropdown-menu { font-size: $body_font_size; border-radius: $radiuspx; diff --git a/view/tpl/attach_edit.tpl b/view/tpl/attach_edit.tpl index 033ee40a7..82f2a7628 100644 --- a/view/tpl/attach_edit.tpl +++ b/view/tpl/attach_edit.tpl @@ -1,6 +1,10 @@ <form action="filestorage/{{$channelnick}}/{{$file.id}}/edit" method="post" > + <input type="hidden" name="channelnick" value="{{$channelnick}}" /> + <input type="hidden" name="filehash" value="{{$file.hash}}" /> + <input type="hidden" name="uid" value="{{$uid}}" /> + <input type="hidden" name="fileid" value="{{$file.id}}" /> - <div id="attach-edit-tools" class="btn-group form-group"> + <div id="attach-edit-tools-share" class="btn-group form-group"> {{if !$isadir}} <a href="/rpost?body=[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" id="attach-btn" class="btn btn-default btn-xs"> <i class="icon-paperclip jot-icons"></i> @@ -10,28 +14,25 @@ <i class="icon-share jot-icons"></i> </button> </div> - <div id="attach-edit-perms" class="btn-group form-group pull-right"> - <button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> - <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i> - </button> - <button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit"> - {{$submit}} - </button> + <div id="attach-edit-tools-perms" class="form-group pull-right{{if $isadir}} btn-group{{/if}}"> + {{if $isadir}} + <div id="attach-edit-perms-recurse" class="btn-group" data-toggle="buttons"> + <label class="btn btn-default btn-xs" title="{{$recurse}}"> + <input type="checkbox" autocomplete="off" name="recurse" value="1"><i class="icon-level-down jot-icons"></i> + </label> + </div> + {{/if}} + <div id="attach-edit-perms" class="btn-group"> + <button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> + <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i> + </button> + <button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit"> + {{$submit}} + </button> + </div> </div> - {{$aclselect}} - <input type="hidden" name="channelnick" value="{{$channelnick}}" /> - <input type="hidden" name="filehash" value="{{$file.hash}}" /> - <input type="hidden" name="uid" value="{{$uid}}" /> - <input type="hidden" name="fileid" value="{{$file.id}}" /> - - {{if $isadir}} - <div class="form-group"> - <label id="attach-edit-recurse-text" class="checkbox-inline" for="attach-recurse-input" > - <input class="checkbox-inline" id="attach-recurse-input" type="checkbox" name="recurse" value="1" />{{$recurse}} - </label> - </div> - {{/if}} + {{$aclselect}} <div id="link-code" class="form-group"> <label for="">{{$cpldesc}}</label> diff --git a/view/tpl/photos_upload.tpl b/view/tpl/photos_upload.tpl index 0b3a0ae81..6cd7e3eb9 100755 --- a/view/tpl/photos_upload.tpl +++ b/view/tpl/photos_upload.tpl @@ -21,26 +21,37 @@ <div class="form-group"> <input id="photos-upload-choose" type="file" name="userfile" /> </div> - <div class="btn-group pull-right"> - <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;"> - <i id="jot-perms-icon" class="icon-{{$lockstate}}"></i> - </button> - <button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="submit" >{{$submit}}</button> - </div> - {{/if}} + <div class="pull-right btn-group form-group"> + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-default btn-sm" title="{{$nosharetext}}"> + <input class="checkbox-inline" id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" /><i class="icon-ban-circle"></i> + </label> + </div> + <div class="btn-group"> + {{if $lockstate}} + <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;"> + <i id="jot-perms-icon" class="icon-{{$lockstate}}"></i> + </button> + {{/if}} + <button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="submit" >{{$submit}}</button> + </div> - <div class="checkbox pull-left"> - <label class="checkbox-inline" for="photos-upload-noshare" > - <input class="checkbox-inline" id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" />{{$nosharetext}} - </label> </div> + {{/if}} <div class="clear"></div> {{if $uploader}} - <div id="photos-upload-perms" class="pull-right"> + <div id="photos-upload-perms" class="btn-group pull-right"> + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-default btn-sm" title="{{$nosharetext}}"> + <input class="checkbox-inline" id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" /><i class="icon-ban-circle"></i> + </label> + </div> + {{if $lockstate}} <button class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;"> <i id="jot-perms-icon" class="icon-{{$lockstate}}"></i> </button> + {{/if}} <div class="pull-right"> {{$uploader}} </div> diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 7fa52677b..47d85d8e4 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -113,6 +113,8 @@ {{include file="field_intcheckbox.tpl" field=$vnotify7}} {{include file="field_intcheckbox.tpl" field=$vnotify8}} {{include file="field_intcheckbox.tpl" field=$vnotify9}} +{{include file="field_intcheckbox.tpl" field=$vnotify11}} +{{include file="field_intcheckbox.tpl" field=$always_show_in_notices}} {{*include file="field_intcheckbox.tpl" field=$vnotify11*}} </div> |