aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-05-24 05:35:50 -0400
committerAndrew Manning <tamanning@zoho.com>2018-05-24 05:35:50 -0400
commitfc6b337bbbd2fd3b5412c8b957122830f73feb2d (patch)
treee8417e561ac7445a4018c0cf3bf722779493c430 /view/tpl
parent40d99c171678654817e392b7f59050dccce770a8 (diff)
parent9cf8931136c703c66d0bf83e4c6b8fb7f4d2cf0b (diff)
downloadvolse-hubzilla-fc6b337bbbd2fd3b5412c8b957122830f73feb2d.tar.gz
volse-hubzilla-fc6b337bbbd2fd3b5412c8b957122830f73feb2d.tar.bz2
volse-hubzilla-fc6b337bbbd2fd3b5412c8b957122830f73feb2d.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/conv_item.tpl2
-rwxr-xr-xview/tpl/jot-header.tpl94
-rwxr-xr-xview/tpl/jot.tpl6
-rwxr-xr-xview/tpl/js_strings.tpl12
-rwxr-xr-xview/tpl/new_channel.tpl5
5 files changed, 42 insertions, 77 deletions
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index f72737d82..6baf06dda 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -43,7 +43,7 @@
</div>
{{if $item.lock}}
<div class="wall-item-lock dropdown">
- <i class="fa fa-lock lockview" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i>&nbsp;
+ <i class="fa fa-lock lockview{{if $item.privacy_warning}} text-danger{{/if}}" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i>&nbsp;
<div id="panel-{{$item.id}}" class="dropdown-menu"></div>
</div>
{{/if}}
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index f2b68ece0..22413f350 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -5,12 +5,14 @@ var plaintext = '{{$editselect}}';
var pretext = '{{$pretext}}';
function initEditor(cb){
- if (editor==false){
+ if(editor == false){
$("#profile-jot-text-loading").show();
+ $("#profile-jot-reset").removeClass('d-none');
{{$geotag}}
if(plaintext == 'none') {
$("#profile-jot-text-loading").hide();
- $("#profile-jot-text").css({ 'height': 200 });
+ $(".jothidden").show();
+ $("#profile-jot-text").addClass('jot-expanded');
{{if $bbco_autocomplete}}
$("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode
{{/if}}
@@ -21,82 +23,21 @@ function initEditor(cb){
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections
{{/if}}
editor = true;
- $("a#jot-perms-icon").colorbox({
- 'inline' : true,
- 'transition' : 'elastic'
- });
- $(".jothidden").show();
- $("#profile-jot-text").addClass('jot-expanded');
if (typeof cb!="undefined") cb();
if(pretext.length)
addeditortext(pretext);
return;
}
- tinyMCE.init({
- theme : "advanced",
- mode : "specific_textareas",
- editor_selector: {{$editselect}},
- auto_focus: "profile-jot-text",
- plugins : "bbcode,paste,autoresize, inlinepopups",
- theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
- theme_advanced_buttons2 : "",
- theme_advanced_buttons3 : "",
- theme_advanced_toolbar_location : "top",
- theme_advanced_toolbar_align : "center",
- theme_advanced_blockformats : "blockquote,code",
- gecko_spellcheck : true,
- paste_text_sticky : true,
- entity_encoding : "raw",
- add_unload_trigger : false,
- remove_linebreaks : false,
- force_p_newlines : false,
- force_br_newlines : true,
- forced_root_block : '',
- convert_urls: false,
- content_css: "{{$baseurl}}/view/custom_tinymce.css",
- theme_advanced_path : false,
- file_browser_callback : "fcFileBrowser",
- setup : function(ed) {
- cPopup = null;
- ed.onKeyDown.add(function(ed,e) {
- if(cPopup !== null)
- cPopup.onkey(e);
- });
-
- ed.onKeyUp.add(function(ed, e) {
- var txt = tinyMCE.activeEditor.getContent();
- match = txt.match(/@([^ \n]+)$/);
- if(match!==null) {
- if(cPopup === null) {
- cPopup = new ACPopup(this,baseurl+"/acl");
- }
- if(cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]);
- if(! cPopup.ready) cPopup = null;
- }
- else {
- if(cPopup !== null) { cPopup.close(); cPopup = null; }
- }
- });
-
- ed.onInit.add(function(ed) {
- ed.pasteAsPlainText = true;
- $("#profile-jot-text-loading").hide();
- $(".jothidden").show();
- if (typeof cb!="undefined") cb();
- });
-
- }
- });
-
- editor = true;
+ editor = true;
} else {
if (typeof cb!="undefined") cb();
}
}
function enableOnUser(){
- if (editor) return;
- $(this).val("");
+ if(editor)
+ return;
+
initEditor();
}
</script>
@@ -110,8 +51,7 @@ var activeCommentID = 0;
var activeCommentText = '';
$(document).ready(function() {
-
- /* enable tinymce on focus and click */
+
$("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser);
@@ -360,9 +300,19 @@ var activeCommentText = '';
function itemCancel() {
$("#jot-title").val('');
$("#profile-jot-text").val('');
- $("#jot-category").val('');
- postSaveChanges('clean','');
+ $("#jot-category").tagsinput('removeAll');
+
+ postSaveChanges('clean');
+
+ {{if $reset}}
+ $(".jothidden").hide();
+ $("#profile-jot-text").removeClass('jot-expanded');
+ $("#profile-jot-reset").addClass('d-none');
+ $("#jot-preview-content").html('').hide();
+ editor = false;
+ {{else}}
window.history.back();
+ {{/if}}
}
function itemFiler(id) {
@@ -573,7 +523,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
<script>
var postSaveTimer = null;
- function postSaveChanges(action, type) {
+ function postSaveChanges(action) {
if({{$auto_save_draft}}) {
var doctype = $('#jot-webpage').val();
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 9aa330c40..0d1b4bd0d 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -9,6 +9,7 @@
</div>
{{/if}}
<div class="mb-4" id="profile-jot-wrapper">
+
{{if $parent}}
<input type="hidden" name="parent" value="{{$parent}}" />
{{/if}}
@@ -41,6 +42,11 @@
</div>
{{/if}}
<div id="jot-text-wrap">
+ {{if $reset}}
+ <button id="profile-jot-reset" class="btn btn-outline-secondary btn-sm d-none border-0" title="{{$reset}}" onclick="itemCancel(); return false;">
+ <i class="fa fa-close"></i>
+ </button>
+ {{/if}}
<textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex="2" placeholder="{{$placeholdtext}}" >{{$content}}</textarea>
</div>
{{if $attachment}}
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl
index 4243c2ea5..01fc3f993 100755
--- a/view/tpl/js_strings.tpl
+++ b/view/tpl/js_strings.tpl
@@ -23,6 +23,18 @@
'linkurl' : "{{$linkurl}}",
'leavethispage' : "{{$leavethispage}}",
'location' : "{{$location}}",
+ 'lovely' : "{{$lovely}}",
+ 'wonderful' : "{{$wonderful}}",
+ 'fantastic' : "{{$fantastic}}",
+ 'great' : "{{$great}}",
+ 'nick_invld1' : "{{$nick_invld1}}",
+ 'nick_invld2' : "{{$nick_invld2}}",
+ 'nick_valid' : "{{$nick_valid}}",
+ 'name_empty' : "{{$name_empty}}",
+ 'name_ok1' : "{{$name_ok1}}",
+ 'name_ok2' : "{{$name_ok2}}",
+
+
't01' : "{{$t01}}",
't02' : "{{$t02}}",
diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl
index a89208228..51880e1f6 100755
--- a/view/tpl/new_channel.tpl
+++ b/view/tpl/new_channel.tpl
@@ -21,14 +21,11 @@
{{/if}}
{{include file="field_input.tpl" field=$name}}
- <div id="name-spinner" class="spinner-wrapper"><div class="spinner m"></div></div>
{{include file="field_input.tpl" field=$nickname}}
- <div id="nick-spinner" class="spinner-wrapper"><div class="spinner m"></div></div>
+ <button class="btn btn-primary" type="submit" id="newchannel-submit-button">{{$submit}}</button>
- <button class="btn btn-secondary" name="validate" id="newchannel-validate-button" value="{{$validate}}" onclick="validate_channel(); return false;">{{$validate}}</button>
- <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" >{{$submit}}</button>
<div id="newchannel-submit-end" class="clear"></div>
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>