diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/conversation.css | 21 | ||||
-rw-r--r-- | view/js/main.js | 6 | ||||
-rw-r--r-- | view/ru/hmessages.po | 12 | ||||
-rw-r--r-- | view/ru/hstrings.php | 10 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 4 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 19 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 40 |
7 files changed, 90 insertions, 22 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css index f7804f5dd..77e56e200 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -1,15 +1,19 @@ /* jot */ +.jothidden { + display:none; +} -.jothidden input[type="text"] { - border: 0px; - margin: 0px; - height: 2.5rem; - width: 100%; +.jot-poll-option { + position: relative; } -.jothidden { - display:none; +.poll-option-close { + position: absolute; + right: 0; + top: 0; + padding: 0.25rem 0 0.25rem 0.5rem; + cursor: pointer; } #jot-title-wrap, @@ -18,7 +22,8 @@ border-bottom: 1px solid rgba(0, 0, 0, .2); } -#jot-attachment-wrap { +#jot-attachment-wrap, +#jot-poll-wrap { border-top: 1px solid rgba(0, 0, 0, .2); } diff --git a/view/js/main.js b/view/js/main.js index e735e9d6b..94fd940b2 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -581,8 +581,10 @@ function contextualHelpFocus(target, openSidePanel) { function updatePageItems(mode, data) { if(mode === 'append') { + newitemcount = 0; $(data).each(function() { $('#page-end').before($(this)); + newitemcount++; }); if(loadingPage) { @@ -593,6 +595,10 @@ function updatePageItems(mode, data) { var e = document.getElementById('content-complete'); if(e) { pageHasMoreContent = false; + } else { + if (newitemcount < 1) { + pageUpdate(); + } } collapseHeight(); diff --git a/view/ru/hmessages.po b/view/ru/hmessages.po index d8ddafa96..764228ad2 100644 --- a/view/ru/hmessages.po +++ b/view/ru/hmessages.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: hubzilla\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-01-19 11:37+0200\n" -"PO-Revision-Date: 2020-01-19 11:43+0200\n" +"PO-Revision-Date: 2020-02-25 23:38+0200\n" "Last-Translator: Max Kostikov <max@kostikov.co>\n" "Language-Team: Russian (http://www.transifex.com/Friendica/hubzilla/language/ru/)\n" "MIME-Version: 1.0\n" @@ -9583,11 +9583,11 @@ msgstr "Результаты поиска для: %s" #: ../../Zotlabs/Module/Notes.php:56 msgid "Notes App" -msgstr "Приложение \"Заметки\"" +msgstr "Приложение \"Записки\"" #: ../../Zotlabs/Module/Notes.php:57 msgid "A simple notes app with a widget (note: notes are not encrypted)" -msgstr "Простое приложение для заметок с виджетом (примечание: заметки не зашифрованы)" +msgstr "Простое приложение для записок с виджетом (примечание: записки не зашифрованы)" #: ../../Zotlabs/Module/Moderate.php:65 msgid "Comment approved" @@ -11015,7 +11015,7 @@ msgstr "Форумы" #: ../../Zotlabs/Widget/Notes.php:21 ../../Zotlabs/Lib/Apps.php:368 #: ../../extend/addon/hzaddons/workflow/workflow.php:2592 msgid "Notes" -msgstr "Заметки" +msgstr "Записки" #: ../../Zotlabs/Widget/Suggestions.php:53 msgid "Suggestions" @@ -12268,11 +12268,11 @@ msgstr "Восстановить" #: ../../Zotlabs/Lib/Apps.php:567 msgid "Add to app-tray" -msgstr "Добавить в app-tray" +msgstr "Добавить в правое меню" #: ../../Zotlabs/Lib/Apps.php:568 msgid "Remove from app-tray" -msgstr "Удалить из app-tray" +msgstr "Удалить из правого меню" #: ../../Zotlabs/Lib/Apps.php:569 msgid "Pin to navbar" diff --git a/view/ru/hstrings.php b/view/ru/hstrings.php index 122cb48a5..62585df9b 100644 --- a/view/ru/hstrings.php +++ b/view/ru/hstrings.php @@ -2146,8 +2146,8 @@ App::$strings["Welcome to Hubzilla!"] = "Добро пожаловать в Hubz App::$strings["You have got no unseen posts..."] = "У вас нет непросмотренных публикаций..."; App::$strings["Items tagged with: %s"] = "Объекты помечены как: %s"; App::$strings["Search results for: %s"] = "Результаты поиска для: %s"; -App::$strings["Notes App"] = "Приложение \"Заметки\""; -App::$strings["A simple notes app with a widget (note: notes are not encrypted)"] = "Простое приложение для заметок с виджетом (примечание: заметки не зашифрованы)"; +App::$strings["Notes App"] = "Приложение \"Записки\""; +App::$strings["A simple notes app with a widget (note: notes are not encrypted)"] = "Простое приложение для записок с виджетом (примечание: записки не зашифрованы)"; App::$strings["Comment approved"] = "Комментарий одобрен"; App::$strings["Comment deleted"] = "Комментарий удалён"; App::$strings["Webpages App"] = "Приложение \"Веб-страницы\""; @@ -2480,7 +2480,7 @@ App::$strings["View your connections and/or add somebody whose address you alrea App::$strings["View your personal stream (this may be empty until you add some connections)"] = "Ваш персональный поток (может быть пуст пока вы не добавите контакты)"; App::$strings["View the public stream. Warning: this content is not moderated"] = "Просмотр публичного потока. Предупреждение: этот контент не модерируется"; App::$strings["Forums"] = "Форумы"; -App::$strings["Notes"] = "Заметки"; +App::$strings["Notes"] = "Записки"; App::$strings["Suggestions"] = "Рекомендации"; App::$strings["See more..."] = "Просмотреть больше..."; App::$strings["New Network Activity"] = "Новая сетевая активность"; @@ -2772,8 +2772,8 @@ App::$strings["My Chatrooms"] = "Мои чаты"; App::$strings["Channel Export"] = "Экспорт канала"; App::$strings["Purchase"] = "Купить"; App::$strings["Undelete"] = "Восстановить"; -App::$strings["Add to app-tray"] = "Добавить в app-tray"; -App::$strings["Remove from app-tray"] = "Удалить из app-tray"; +App::$strings["Add to app-tray"] = "Добавить в правое меню"; +App::$strings["Remove from app-tray"] = "Удалить из правого меню"; App::$strings["Pin to navbar"] = "Добавить на панель навигации"; App::$strings["Unpin from navbar"] = "Удалить с панели навигации"; App::$strings["Privacy conflict. Discretion advised."] = "Конфиликт настроек конфиденциальности."; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 3bee84378..1ababecfc 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1605,6 +1605,10 @@ dl.bb-dl > dd > li { font-size: 100%; } +.bootstrap-tagsinput input { + height: 2.5rem; +} + /* Abusing theme-green is less work than makeing a new new one */ .theme-green .back-bar .selected-bar { background-color: #000000; diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 7b1f4ee05..d519fd666 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -58,6 +58,9 @@ var activeCommentText = ''; $('#id_mimetype').on('load', jotSetMime); $('#id_mimetype').on('change', jotSetMime); + $('#jot-add-option').on('click', jotAddOption); + $(document).on('click', '.poll-option-close', jotRemoveOption); + function jotSetMime() { var mtype = $('#id_mimetype').val(); if(mtype == 'text/bbcode') @@ -122,6 +125,7 @@ var activeCommentText = ''; activeCommentID = 0; }, }); + }); function deleteCheckedItems() { @@ -309,6 +313,7 @@ var activeCommentText = ''; function itemCancel() { $("#jot-title").val(''); $("#profile-jot-text").val(''); + $(".jot-poll-option input").val(''); $("#jot-category").tagsinput('removeAll'); postSaveChanges('clean'); @@ -317,6 +322,7 @@ var activeCommentText = ''; $(".jothidden").hide(); $("#profile-jot-text").removeClass('jot-expanded'); $("#profile-jot-tools").addClass('d-none'); + $("#jot-poll-wrap").addClass('d-none'); $("#jot-preview-content").html('').hide(); editor = false; {{else}} @@ -512,6 +518,19 @@ var activeCommentText = ''; } + function initPoll() { + $('#jot-poll-wrap').toggleClass('d-none'); + } + + function jotAddOption() { + var option = '<div class="jot-poll-option form-group"><input class="w-100 border-0" name="poll_answers[]" type="text" value="" placeholder="Option"><div class="poll-option-close"><i class="fa fa-close"></i></div></div>'; + $('#jot-poll-options').append(option); + } + + function jotRemoveOption(e) { + $(this).closest('.jot-poll-option').remove(); + } + </script> <script> diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index b4616db6d..4a9717c01 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -30,15 +30,15 @@ {{if $webpage}} <div id="jot-pagetitle-wrap" class="jothidden"> - <input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}"> + <input class="w-100 border-0" name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}"> </div> {{/if}} <div id="jot-title-wrap" class="jothidden"> - <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" tabindex="1" value="{{$title}}"> + <input class="w-100 border-0" name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" tabindex="1" value="{{$title}}"> </div> {{if $catsenabled}} <div id="jot-category-wrap" class="jothidden"> - <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="cat-tagsinput"> + <input class="w-100 border-0" name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="cat-tagsinput"> </div> {{/if}} <div id="jot-text-wrap"> @@ -59,6 +59,34 @@ <input class="jot-attachment" name="attachment" id="jot-attachment" type="text" value="{{$attachment}}" readonly="readonly" onclick="this.select();"> </div> {{/if}} + <div id="jot-poll-wrap" class="p-2 d-none"> + <div id="jot-poll-options"> + <div class="jot-poll-option form-group"> + <input class="w-100 border-0" name="poll_answers[]" type="text" value="" placeholder="{{$poll_option_label}}"> + </div> + <div class="jot-poll-option form-group"> + <input class="w-100 border-0" name="poll_answers[]" type="text" value="" placeholder="{{$poll_option_label}}"> + </div> + </div> + {{include file="field_checkbox.tpl" field=$multiple_answers}} + <div id="jot-poll-tools" class="clearfix"> + <div id="poll-tools-left" class="float-left"> + <button id="jot-add-option" class="btn btn-outline-secondary btn-sm" type="button"> + <i class="fa fa-plus"></i> {{$poll_add_option_label}} + </button> + </div> + <div id="poll-tools-right" class="float-right"> + <div class="input-group"> + <input type="text" name="poll_expire_value" class="form-control" value="10" size="3"> + <select class="form-control" id="duration-select" name="poll_expire_unit"> + <option value="Minutes">{{$poll_expire_unit_label.0}}</option> + <option value="Hours">{{$poll_expire_unit_label.1}}</option> + <option value="Days" selected="selected">{{$poll_expire_unit_label.2}}</option> + </select> + </div> + </div> + </div> + </div> <div id="profile-jot-submit-wrapper" class="clearfix p-2 jothidden"> <div id="profile-jot-submit-left" class="btn-toolbar float-left"> {{if $bbcode}} @@ -132,6 +160,11 @@ <i id="profile-voting" class="fa fa-square-o jot-icons"></i> </button> {{/if}} + + <button type="button" id="profile-poll-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$poll}}" onclick="initPoll();"> + <i id="profile-poll" class="fa fa-bar-chart jot-icons"></i> + </button> + {{if $feature_nocomment}} <button id="profile-nocomment-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$nocommenttitle}}" onclick="toggleNoComment();return false;"> <i id="profile-nocomment" class="fa fa-comments jot-icons"></i> @@ -176,6 +209,7 @@ {{if $feature_voting}} <a class="dropdown-item" href="#" onclick="toggleVoting(); return false;"><i id="profile-voting-sub" class="fa fa-square-o"></i> {{$voting}}</a> {{/if}} + <a class="dropdown-item" href="#" onclick="initPoll(); return false"><i id="profile-poll" class="fa fa-bar-chart jot-icons"></i> {{$poll}}</a> {{if $feature_nocomment}} <a class="dropdown-item" href="#" onclick="toggleNoComment(); return false;"><i id="profile-nocomment-sub" class="fa fa-comments"></i> {{$nocommenttitlesub}}</a> {{/if}} |