From d10525a375884850b1b643796b839747cbc623b2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 17 Mar 2017 14:22:10 +0100 Subject: fix item_list and item_search templates. make item filer use a bootdtrap modal and some css and class fixes --- Zotlabs/Module/Filer.php | 4 +- include/conversation.php | 7 +- include/widgets.php | 4 +- view/css/conversation.css | 4 - view/js/autocomplete.js | 2 +- view/theme/redbasic/css/style.css | 75 ++---------- view/tpl/admin_aside.tpl | 18 +-- view/tpl/chat.tpl | 32 ++--- view/tpl/chatroomlist.tpl | 6 +- view/tpl/conv_item.tpl | 19 ++- view/tpl/conv_list.tpl | 241 ++++++++++++++++++++++---------------- view/tpl/field_combobox.tpl | 33 +++--- view/tpl/fileas_widget.tpl | 6 +- view/tpl/filer_dialog.tpl | 23 +++- view/tpl/hdr.tpl | 2 +- view/tpl/item_attach.tpl | 2 +- view/tpl/item_filer.tpl | 6 +- view/tpl/jot-header.tpl | 18 +-- view/tpl/search_item.tpl | 58 ++++----- 19 files changed, 276 insertions(+), 284 deletions(-) diff --git a/Zotlabs/Module/Filer.php b/Zotlabs/Module/Filer.php index 6a57cdb2a..af59f28fb 100644 --- a/Zotlabs/Module/Filer.php +++ b/Zotlabs/Module/Filer.php @@ -49,8 +49,10 @@ class Filer extends \Zotlabs\Web\Controller { } $tpl = get_markup_template("filer_dialog.tpl"); $o = replace_macros($tpl, array( - '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')), + '$field' => array('term', t('Enter a folder name'), '', '', $filetags, 'placeholder="' . t('or select an existing folder (doubleclick)') . '"'), '$submit' => t('Save'), + '$title' => t('Save to Folder'), + '$cancel' => t('Cancel') )); echo $o; diff --git a/include/conversation.php b/include/conversation.php index 45b3a53e8..167b10846 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -614,6 +614,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ $owner_photo = ''; $owner_name = ''; $sparkle = ''; + $is_new = false; if($mode === 'search' || $mode === 'community') { if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) @@ -682,6 +683,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ $has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false); + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) + $is_new = true; + $tmp_item = array( 'template' => $tpl, 'toplevel' => 'toplevel_item', @@ -738,6 +742,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ 'wait' => t('Please wait'), 'thread_level' => 1, 'has_tags' => $has_tags, + 'is_new' => $is_new ); $arr = array('item' => $item, 'output' => $tmp_item); @@ -1176,7 +1181,7 @@ function builtin_activity_puller($item, &$conv_responses) { if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) { $name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown')); $url = (($item['author_xchan'] && $item['author']['xchan_photo_s']) - ? '' . '' . urlencode($name) . '' . $name . '' + ? '' . '' . urlencode($name) . '' . $name . '' : '' . $name . '' ); diff --git a/include/widgets.php b/include/widgets.php index f247470b3..b95cbfc26 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1485,7 +1485,7 @@ function widget_forums($arr) { foreach($r1 as $rr) { if($unseen && (! intval($rr['unseen']))) continue; - $o .= ''; + $o .= ''; } $o .= ''; } @@ -1540,7 +1540,7 @@ function widget_activity($arr) { $o .= '

' . t('Activity','widget') . '

'; } diff --git a/view/css/conversation.css b/view/css/conversation.css index b167e3961..e2adf8658 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -140,10 +140,6 @@ a.wall-item-name-link { margin: 0px; } -.wall-item-title-end { - clear: both; -} - .wall-item-body { word-wrap: break-word; } diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 4de9f9c6b..9673312a7 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -60,7 +60,7 @@ function contact_format(item) { var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick); if(typeof desc === 'undefined') desc = ''; if(desc) desc = ' ('+desc+')'; - return "".format(item.taggable, item.photo, item.name, desc, item.link); + return "".format(item.taggable, item.photo, item.name, desc, item.link); } else return "
" + item.text + "
"; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index bcf987b2b..f0b08a738 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -358,10 +358,6 @@ footer { filter:alpha(opacity=100); } -#view-contact-end { - clear: both; -} - #profile-photo-wrapper img { width: 100%; height: 100%; @@ -502,10 +498,6 @@ footer { height: 34px; } -#contact-block-end { - clear: both; -} - .contact-block-img { width:47px; height:47px; @@ -529,15 +521,9 @@ footer { } .wall-item-conv { - padding: 7px 10px; background-color: $comment_item_colour; } - -#conversation-end { - clear: both; -} - #nav-notifications-template { display: none; } @@ -622,11 +608,6 @@ nav .acpopup { text-align: center; } -.profile-match-break, -.profile-match-end { - clear: both; -} - .profile-match-connect { text-align: center; font-weight: bold; @@ -645,9 +626,6 @@ nav .acpopup { float: right; } -#profile-match-wrapper-end { - clear: both; -} .side-link { margin-bottom: 15px; } @@ -660,10 +638,6 @@ nav .acpopup { border: 1px solid #ddd; } -#group-members-end { - clear: both; -} - #group-separator { margin-top: 10px; margin-bottom: 10px; @@ -676,11 +650,6 @@ nav .acpopup { border: 1px solid #ddd; } -#group-all-contacts-end { - clear: both; - margin-bottom: 10px; -} - #group-edit-desc { margin-top: 15px; } @@ -694,10 +663,6 @@ nav .acpopup { border: 1px solid #ddd; } -#prof-members-end { - clear: both; -} - #prof-separator { margin-top: 10px; margin-bottom: 10px; @@ -710,11 +675,6 @@ nav .acpopup { border: 1px solid #ddd; } -#prof-all-contacts-end { - clear: both; - margin-bottom: 10px; -} - #prof-edit-desc { margin-top: 15px; } @@ -728,10 +688,6 @@ nav .acpopup { width: 80px; margin-right: 15px; } -.notification-listing-end { - clear: both; - margin-bottom: 15px; -} /** * OAuth @@ -789,13 +745,6 @@ div.jGrowl div.jGrowl-notification { min-height: 60px; } -#id_term_label { - width:75px; -} -#id_term { - width:100px; -} - #nav-search-text-ac .autocomplete { position: fixed; top: 51px; @@ -884,7 +833,8 @@ a.rconnect:hover, a.rateme:hover, div.rateme:hover { display: block; } -.dropdown-notification { +.dropdown-notification, +.member-item { line-height: 1.1em; font-size: 0.75rem; overflow: hidden; @@ -897,10 +847,6 @@ a.rconnect:hover, a.rateme:hover, div.rateme:hover { margin: 24px; } -.tabs-end { - clear: both; -} - .modal-header .contextual-help-tool { /* Mostly duplicating ".modal-header .close" and ".close" layout settings from bootstrap */ float: right; @@ -1335,11 +1281,6 @@ img.mail-conv-sender-photo { border-top: 0px solid $comment_item_colour; } -.wall-item-like, -.wall-item-dislike { - font-size: 11px; -} - .wall-item-photo { border: none; width: $top_photo !important; @@ -1369,7 +1310,6 @@ img.mail-conv-sender-photo { .chat-item-text, .chat-item-text-self { font-size: $font_size; - clear: both; } .item-tool { @@ -1483,14 +1423,21 @@ nav img { border-radius: $radiuspx; } -.dropdown-menu-img-sm { +.menu-img-3 { width: 3.3em; height: 3.3em; margin-right: 5px; float: left; } -.dropdown-menu-img-xs { +.menu-img-2 { + height: 2.2em; + width: 2.2em; + margin-right: 5px; + float: left; +} + +.menu-img-1 { height: 1.1em; width: 1.1em; margin-right: 5px; diff --git a/view/tpl/admin_aside.tpl b/view/tpl/admin_aside.tpl index 70e1677af..99f139e57 100755 --- a/view/tpl/admin_aside.tpl +++ b/view/tpl/admin_aside.tpl @@ -12,17 +12,17 @@

{{$admtxt}}

-
{{if $admin.update}} -