Merge branch '2.0RC'
This commit is contained in:
3
view/css/bootstrap-red.css
vendored
3
view/css/bootstrap-red.css
vendored
@@ -60,8 +60,7 @@ aside .nav-pills > li > a,
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.wall-item-tools .dropdown-menu,
|
||||
.section-title-wrapper .dropdown-menu {
|
||||
.wall-item-tools .dropdown-menu {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,6 +203,10 @@ a.wall-item-name-link {
|
||||
filter:alpha(opacity=100);
|
||||
}
|
||||
|
||||
.item-act-list {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.shared_header {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -332,6 +336,19 @@ a.wall-item-name-link {
|
||||
|
||||
/* bb-code */
|
||||
|
||||
/* prevent [toc] bbcode links to scroll the titles behind the navbar */
|
||||
.section-content-wrapper h1,
|
||||
.section-content-wrapper h2,
|
||||
.section-content-wrapper h3,
|
||||
.section-content-wrapper h4 {
|
||||
padding-top: 60px;
|
||||
margin-top: -40px;
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
|
||||
@@ -15,12 +15,14 @@ main {
|
||||
}
|
||||
|
||||
aside {
|
||||
position: relative;
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
padding: 71px 7px 0px 7px;
|
||||
}
|
||||
|
||||
section {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
|
||||
29
view/css/mod_help.css
Normal file
29
view/css/mod_help.css
Normal file
@@ -0,0 +1,29 @@
|
||||
.doco-list-group-item > a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
margin: 3px 0px 10px 10px;
|
||||
}
|
||||
|
||||
#doco-content h3 {
|
||||
border-bottom: #ccc 3px solid;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
#doco-content h4 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#doco-content h5 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#region_1 .widget ul ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.toc-content li,
|
||||
#doco-top-toc li {
|
||||
padding: 3px 0px;
|
||||
}
|
||||
54
view/css/mod_wiki.css
Normal file
54
view/css/mod_wiki.css
Normal file
@@ -0,0 +1,54 @@
|
||||
#ace-editor {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
#editor {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
#id_commitMsg_wrapper {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.fade.in {
|
||||
-webkit-transition: opacity 0.5s 0.5s ease;
|
||||
-moz-transition: opacity 0.5s 0.5s ease;
|
||||
-o-transition: opacity 0.5s 0.5s ease;
|
||||
transition: opacity 0.5s 0.5s ease;
|
||||
}
|
||||
|
||||
#new-wiki-form-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wikis-index {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#wikis-index th:nth-child(1),
|
||||
#wikis-index td:nth-child(1){
|
||||
padding: 7px 3px 7px 10px;
|
||||
}
|
||||
|
||||
#wikis-index th:nth-child(4),
|
||||
#wikis-index td:nth-child(4){
|
||||
padding: 7px 10px 7px 7px;
|
||||
}
|
||||
|
||||
#wikis-index th:nth-child(5),
|
||||
#wikis-index td:nth-child(5){
|
||||
padding: 7px 10px 7px 7px;
|
||||
}
|
||||
|
||||
.wikis-index-tool {
|
||||
padding: 7px 10px;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,41 @@
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.widget-nav-pills-icons {
|
||||
opacity: 0;
|
||||
padding: 6px 10px;
|
||||
float: right;
|
||||
position: relative;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
|
||||
.widget-nav-pills-checkbox {
|
||||
padding: 6px 10px;
|
||||
float: right;
|
||||
position: relative;
|
||||
z-index:1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
i.widget-nav-pills-icons,
|
||||
i.widget-nav-pills-checkbox {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.widget-nav-pills-icons:hover + a {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.widget-nav-pills-checkbox:hover + a {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
li:hover .widget-nav-pills-icons {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
/* suggest */
|
||||
|
||||
.suggest-widget-more {
|
||||
@@ -30,7 +65,7 @@
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
resize: vertical;
|
||||
height: 250px;
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
/* saved searches */
|
||||
@@ -151,3 +186,7 @@ li:hover .group-edit-icon {
|
||||
.cover-photo-subtitle {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
a.wikilist {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
16264
view/de/hmessages.po
16264
view/de/hmessages.po
File diff suppressed because it is too large
Load Diff
3247
view/de/hstrings.php
3247
view/de/hstrings.php
File diff suppressed because it is too large
Load Diff
5
view/en-au/hstrings.php
Normal file
5
view/en-au/hstrings.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
require_once('view/en-gb/strings.php');
|
||||
App::$strings['Welcome %s. Remote authentication successful.'] = "G'day %s. Remote authentication successful";
|
||||
|
||||
|
||||
31
view/en-gb/hstrings.php
Normal file
31
view/en-gb/hstrings.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
App::$strings["Set shadow color, default #000"] = "Set shadow colour, default #000";
|
||||
App::$strings["Set background color"] = "Set background colour";
|
||||
App::$strings["Set section background color"] = "Set section background colour";
|
||||
App::$strings["Set color of items - use hex"] = "Set colour of items - use hex";
|
||||
App::$strings["Set color of links - use hex"] = "Set colour of links - use hex";
|
||||
App::$strings["Set color of fonts - use hex"] = "Set colour of fonts - use hex";
|
||||
App::$strings["Navigation bar background color"] = "Navigation bar background colour";
|
||||
App::$strings["Navigation bar gradient top color"] = "Navigation bar gradient top colour";
|
||||
App::$strings["Navigation bar gradient bottom color"] = "Navigation bar gradient bottom colour";
|
||||
App::$strings["Navigation active button gradient top color"] = "Navigation active button gradient top colour";
|
||||
App::$strings["Navigation active button gradient bottom color"] = "Navigation active button gradient bottom colour";
|
||||
App::$strings["Navigation bar border color "] = "Navigation bar border colour ";
|
||||
App::$strings["Navigation bar icon color "] = "Navigation bar icon colour ";
|
||||
App::$strings["Navigation bar active icon color "] = "Navigation bar active icon colour ";
|
||||
App::$strings["link color"] = "link colour";
|
||||
App::$strings["Set font-color for banner"] = "Set font-colour for banner";
|
||||
App::$strings["Set the background color"] = "Set the background colour";
|
||||
App::$strings["Set the background color of items"] = "Set the background colour of items";
|
||||
App::$strings["Set the background color of comments"] = "Set the background colour of comments";
|
||||
App::$strings["Set the border color of comments"] = "Set the border colour of comments";
|
||||
App::$strings["Set the basic color for item icons"] = "Set the basic colour for item icons";
|
||||
App::$strings["Set the hover color for item icons"] = "Set the hover colour for item icons";
|
||||
App::$strings["Set font-color for posts and comments"] = "Set font-colour for posts and comments";
|
||||
App::$strings["Authorize application connection"] = "Authorise application connection";
|
||||
App::$strings["Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?"] = "Do you want to authorise this application to access your posts and contacts, and/or create new posts for you?";
|
||||
App::$strings["If your certificate is not recognized, members of other sites (who may themselves have valid certificates) will get a warning message on their own site complaining about security issues."] = "If your certificate is not recognised, members of other sites (who may themselves have valid certificates) will get a warning message on their own site complaining about security issues.";
|
||||
App::$strings["This is a hub of the Hubzilla - a global cooperative network of decentralized privacy enhanced websites."] = "This is a hub of the Hubzilla - a global cooperative network of decentralised privacy enhanced websites.";
|
||||
App::$strings["You are cordially invited to join me and some other close friends on the Hubzilla - a revolutionary new decentralized communication and information tool."] = "You are cordially invited to join me and some other close friends on the Hubzilla - a revolutionary new decentralised communication and information tool.";
|
||||
App::$strings["l F d, Y \\@ g:i A"] = "l j F, Y \\@ G:i";
|
||||
App::$strings["D, d M Y - g:i A"] = "D, d M Y - G:i";
|
||||
@@ -28,16 +28,17 @@ $db_type = '{{$dbtype}}'; // an integer. 0 or unset for mysql, 1 for postgres
|
||||
|
||||
App::$config['system']['timezone'] = '{{$timezone}}';
|
||||
|
||||
// What is your site name? DO NOT ADD A TRAILING SLASH!
|
||||
// What is your site url? DO NOT ADD A TRAILING SLASH!
|
||||
|
||||
App::$config['system']['baseurl'] = '{{$siteurl}}';
|
||||
App::$config['system']['sitename'] = "Hubzilla";
|
||||
App::$config['system']['location_hash'] = '{{$site_id}}';
|
||||
|
||||
// Choices are 'basic', 'standard', and 'pro'.
|
||||
// basic sets up the sevrer for basic social networking and removes "complicated" features
|
||||
// basic sets up the server for basic social networking and removes "complicated" features
|
||||
// standard provides most desired features except e-commerce
|
||||
// pro gives you access to everything
|
||||
// pro disables protocol federation plugins and only supports the zot protocol
|
||||
// if you are in doubt or are unsure, it is strongly advised that you select 'standard'.
|
||||
|
||||
App::$config['system']['server_role'] = '{{$server_role}}';
|
||||
|
||||
@@ -109,7 +110,7 @@ App::$config['system']['theme'] = 'redbasic';
|
||||
|
||||
// PHP error logging setup
|
||||
// Before doing this ensure that the webserver has permission
|
||||
// to create and write to php.out in the top level Red directory,
|
||||
// to create and write to php.out in the top level web directory,
|
||||
// or change the name (below) to a file/path where this is allowed.
|
||||
|
||||
// Uncomment the following 4 lines to turn on PHP error logging.
|
||||
|
||||
16259
view/es-es/hmessages.po
16259
view/es-es/hmessages.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -164,6 +164,7 @@ function string2bb(element) {
|
||||
else if(element == 'strike') return 's';
|
||||
else if(element == 'superscript') return 'sup';
|
||||
else if(element == 'subscript') return 'sub';
|
||||
else if(element == 'highlight') return 'hl';
|
||||
else return element;
|
||||
}
|
||||
|
||||
@@ -202,7 +203,7 @@ function string2bb(element) {
|
||||
$.fn.search_autocomplete = function(backend_url) {
|
||||
// Autocomplete contacts
|
||||
contacts = {
|
||||
match: /(^@)([^\n]{2,})$/,
|
||||
match: /(^@)([^\n]{3,})$/,
|
||||
index: 2,
|
||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
|
||||
replace: basic_replace,
|
||||
@@ -269,7 +270,7 @@ function string2bb(element) {
|
||||
$.fn.bbco_autocomplete = function(type) {
|
||||
|
||||
if(type=='bbcode') {
|
||||
var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer'];
|
||||
var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'embed', 'highlight'];
|
||||
var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr', ];
|
||||
|
||||
var elements = open_close_elements.concat(open_elements);
|
||||
|
||||
@@ -249,7 +249,7 @@ var divmore_height = 400;
|
||||
var last_filestorage_id = null;
|
||||
var mediaPlaying = false;
|
||||
var contentHeightDiff = 0;
|
||||
|
||||
var liveRecurse = 0;
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({cache: false});
|
||||
@@ -444,16 +444,26 @@ function contextualHelp() {
|
||||
}
|
||||
|
||||
function contextualHelpFocus(target, openSidePanel) {
|
||||
if (openSidePanel) {
|
||||
$("main").addClass('region_1-on'); // Open the side panel to highlight element
|
||||
}
|
||||
else {
|
||||
$("main").removeClass('region_1-on');
|
||||
}
|
||||
$('html,body').animate({ scrollTop: $(target).offset().top - $('nav').outerHeight(true) - $('#contextual-help-content').outerHeight(true)}, 'slow');
|
||||
for (i = 0; i < 3; i++) {
|
||||
$(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0);
|
||||
}
|
||||
if($(target).length) {
|
||||
if (openSidePanel) {
|
||||
$("main").addClass('region_1-on'); // Open the side panel to highlight element
|
||||
}
|
||||
else {
|
||||
$("main").removeClass('region_1-on');
|
||||
}
|
||||
|
||||
var css_position = $(target).parent().css('position');
|
||||
if (css_position === 'fixed') {
|
||||
$(target).parent().css('position', 'static');
|
||||
}
|
||||
|
||||
$('html,body').animate({ scrollTop: $(target).offset().top - $('nav').outerHeight(true) - $('#contextual-help-content').outerHeight(true)}, 'slow');
|
||||
for (i = 0; i < 3; i++) {
|
||||
$(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0);
|
||||
}
|
||||
|
||||
$(target).parent().css('position', css_position);
|
||||
}
|
||||
}
|
||||
|
||||
function updatePageItems(mode, data) {
|
||||
@@ -664,6 +674,8 @@ function updateConvItems(mode,data) {
|
||||
$('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight');
|
||||
}
|
||||
|
||||
$(document.body).trigger("sticky_kit:recalc");
|
||||
|
||||
}
|
||||
|
||||
function collapseHeight() {
|
||||
@@ -754,6 +766,13 @@ function liveUpdate() {
|
||||
update_mode = 'append';
|
||||
}
|
||||
else {
|
||||
// if(bParam_static) {
|
||||
// in_progress = false;
|
||||
// if(timer) clearTimeout(timer);
|
||||
// timer = setTimeout(NavUpdate,10000);
|
||||
// return;
|
||||
// }
|
||||
|
||||
update_mode = 'update';
|
||||
var orgHeight = $("#region_2").height();
|
||||
}
|
||||
@@ -762,6 +781,27 @@ function liveUpdate() {
|
||||
var dstart = new Date();
|
||||
console.log('LOADING data...');
|
||||
$.get(update_url, function(data) {
|
||||
|
||||
// on shared hosts occasionally the live update process will be killed
|
||||
// leaving an incomplete HTML structure, which leads to conversations getting
|
||||
// truncated and the page messed up if all the divs aren't closed. We will try
|
||||
// again and give up if we can't get a valid HTML response after 10 tries.
|
||||
|
||||
if((data.indexOf("<html>") != (-1)) && (data.indexOf("</html>") == (-1))) {
|
||||
console.log('Incomplete data. Reloading');
|
||||
in_progress = false;
|
||||
liveRecurse ++;
|
||||
if(liveRecurse < 10) {
|
||||
liveUpdate();
|
||||
}
|
||||
else {
|
||||
console.log('Incomplete data. Too many attempts. Giving up.');
|
||||
}
|
||||
}
|
||||
|
||||
// else data was valid - reset the recursion counter
|
||||
liveRecurse = 0;
|
||||
|
||||
var dready = new Date();
|
||||
console.log('DATA ready in: ' + (dready - dstart)/1000 + ' seconds.');
|
||||
|
||||
@@ -1285,7 +1325,6 @@ $(document).ready(function() {
|
||||
numbers : aStr['t17'],
|
||||
};
|
||||
|
||||
$("#toc").toc();
|
||||
});
|
||||
|
||||
function zFormError(elm,x) {
|
||||
|
||||
16557
view/nl/hmessages.po
16557
view/nl/hmessages.po
File diff suppressed because it is too large
Load Diff
3553
view/nl/hstrings.php
3553
view/nl/hstrings.php
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
[region=aside]
|
||||
[widget=wiki_list][/widget]
|
||||
[widget=vcard][/widget]
|
||||
[widget=wiki_pages][/widget]
|
||||
[/region]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<header><?php if(x($page,'header')) echo $page['header']; ?></header>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
|
||||
<main>
|
||||
<aside id="region_1"><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
|
||||
<aside id="region_1"><div id="left_aside_wrapper"><?php if(x($page,'aside')) echo $page['aside']; ?></div></aside>
|
||||
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
|
||||
<div id="page-footer"></div>
|
||||
<div id="pause"></div>
|
||||
|
||||
@@ -26,6 +26,7 @@ head_add_js('library/jquery-textcomplete/jquery.textcomplete.js');
|
||||
//head_add_js('library/colorbox/jquery.colorbox.js');
|
||||
head_add_js('library/jquery.timeago.js');
|
||||
head_add_js('library/readmore.js/readmore.js');
|
||||
head_add_js('library/sticky-kit/sticky-kit.js');
|
||||
//head_add_js('library/jquery_ac/friendica.complete.js');
|
||||
//head_add_js('library/tiptip/jquery.tipTip.minified.js');
|
||||
head_add_js('library/jgrowl/jquery.jgrowl_minimized.js');
|
||||
|
||||
@@ -22,6 +22,7 @@ body {
|
||||
color: $font_colour;
|
||||
margin: 0px;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
aside {
|
||||
@@ -30,24 +31,56 @@ aside {
|
||||
max-width: $aside_widthpx;
|
||||
}
|
||||
|
||||
aside #region_1 {
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
|
||||
aside #left_aside_wrapper {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: $main_widthpx;
|
||||
}
|
||||
|
||||
h1, .h1, h2, .h2 {
|
||||
#overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
z-index: 1029;
|
||||
}
|
||||
|
||||
h1, .h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2, .h2 {
|
||||
font-size: 1.667em;
|
||||
}
|
||||
|
||||
h3, .h3, h4, .h4 {
|
||||
h3, .h3 {
|
||||
font-size: 1.334em;
|
||||
}
|
||||
|
||||
h5, .h5, h6, .h6 {
|
||||
font-size: 0.75rem;
|
||||
h4, .h4 {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h5, .h5 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
h6, .h6 {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
|
||||
.jslider {
|
||||
font-family: sans-serif, arial, freesans;
|
||||
}
|
||||
@@ -109,6 +142,11 @@ input, optgroup, select, textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
#help-content pre code {
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre code {
|
||||
border: none;
|
||||
}
|
||||
@@ -468,7 +506,6 @@ footer {
|
||||
|
||||
#contact-block {
|
||||
width: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#contact-block-numcontacts {
|
||||
@@ -477,12 +514,10 @@ footer {
|
||||
}
|
||||
|
||||
.contact-block-div {
|
||||
float: left;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.contact-block-textdiv {
|
||||
float: left;
|
||||
width: 150px;
|
||||
height: 34px;
|
||||
}
|
||||
@@ -490,12 +525,11 @@ footer {
|
||||
#contact-block-end {
|
||||
clear: both;
|
||||
}
|
||||
.contact-block-link {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.contact-block-img {
|
||||
width:48px;
|
||||
height:48px;
|
||||
width:47px;
|
||||
height:47px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#tag-remove {
|
||||
@@ -1515,7 +1549,11 @@ nav .dropdown-menu {
|
||||
color: $nav_icon_colour;
|
||||
}
|
||||
|
||||
#avatar:hover + #usermenu-caret {
|
||||
.usermenu-head {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.usermenu-head:hover #usermenu-caret {
|
||||
color: $nav_active_icon_colour;
|
||||
}
|
||||
|
||||
@@ -1645,6 +1683,7 @@ main.fullscreen .section-content-wrapper-np {
|
||||
|
||||
.atoken-index-row:hover td,
|
||||
.chatroom-index-row:hover td,
|
||||
.wikis-index-row:hover td,
|
||||
.locs-index-row:hover td,
|
||||
[id^="cloud-index-"]:hover td,
|
||||
.cloud-index-active {
|
||||
@@ -1778,6 +1817,7 @@ nav .badge.mail-update:hover {
|
||||
|
||||
#expand-aside,
|
||||
#expand-tabs,
|
||||
#doco-return-to-top-btn,
|
||||
#context-help-btn {
|
||||
color: $nav_active_icon_colour;
|
||||
padding: 7px 10px;
|
||||
@@ -1825,10 +1865,6 @@ nav .badge.mail-update:hover {
|
||||
border-right: 1px solid $nav_bd;
|
||||
}
|
||||
|
||||
main {
|
||||
transition: all 0.25s ease-in-out;
|
||||
}
|
||||
|
||||
main {
|
||||
left: -$aside_widthpx;
|
||||
width: calc( 100% + $aside_widthpx );
|
||||
@@ -2021,11 +2057,34 @@ dl.bb-dl > dd > li {
|
||||
}
|
||||
|
||||
.embed-photo-selected-photo {
|
||||
border-color: blue;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
border-color: blue;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
}
|
||||
|
||||
#wiki-preview img {
|
||||
max-width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#ace-editor,
|
||||
#editor {
|
||||
border-bottom-left-radius: $radiuspx;
|
||||
border-bottom-right-radius: $radiuspx;
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
margin-top: 10px;
|
||||
padding-left: 15px;
|
||||
border-left: 3px solid #eee;
|
||||
}
|
||||
|
||||
.nav-pills-stacked-icons {
|
||||
padding: 6px 10px;
|
||||
float: right;
|
||||
position: relative;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.nav-pills-stacked-icons:hover + a {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ $(document).ready(function() {
|
||||
if( $('#css3-calc').width() == 10) {
|
||||
$(window).resize(function() {
|
||||
if($(window).width() < 767) {
|
||||
$('main').css('width', $(window).width() + 287 );
|
||||
$('main').css('width', $(window).width() + $('aside').outerWidth() );
|
||||
} else {
|
||||
$('main').css('width', '100%' );
|
||||
}
|
||||
@@ -16,9 +16,25 @@ $(document).ready(function() {
|
||||
}
|
||||
$('#css3-calc').remove(); // Remove the test element
|
||||
|
||||
$('#expand-aside').click(function() {
|
||||
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
|
||||
$('main').toggleClass('region_1-on');
|
||||
if($(window).width() > 767) {
|
||||
$('#left_aside_wrapper').stick_in_parent({
|
||||
offset_top: $('nav').outerHeight(true)
|
||||
});
|
||||
}
|
||||
|
||||
$('#expand-aside').on('click', toggleAside);
|
||||
|
||||
$('section').on('click', function() {
|
||||
if($('main').hasClass('region_1-on')){
|
||||
toggleAside();
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('scroll', function() {
|
||||
if($('main').hasClass('region_1-on') && $(window).scrollLeft() > 5){
|
||||
$(window).scrollLeft(0);
|
||||
toggleAside();
|
||||
}
|
||||
});
|
||||
|
||||
if($('aside').length && $('aside').html().length === 0) {
|
||||
@@ -32,6 +48,12 @@ $(document).ready(function() {
|
||||
$('#expand-tabs-icon').toggleClass('fa-arrow-circle-down').toggleClass('fa-arrow-circle-up');
|
||||
});
|
||||
|
||||
$('.usermenu-head').click(function() {
|
||||
if($('#navbar-collapse-1').hasClass('in')){
|
||||
$('#navbar-collapse-1').removeClass('in');
|
||||
}
|
||||
});
|
||||
|
||||
if($('#tabs-collapse-1').length === 0) {
|
||||
$('#expand-tabs').hide();
|
||||
}
|
||||
@@ -66,5 +88,22 @@ function makeFullScreen(full) {
|
||||
$('#tabs-collapse-1').css({'visibility': ''});
|
||||
$('#inline-btn').hide();
|
||||
$('main').css({'transition': ''});
|
||||
$(document.body).trigger("sticky_kit:recalc");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAside() {
|
||||
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
|
||||
if($('main').hasClass('region_1-on')){
|
||||
$('main').removeClass('region_1-on')
|
||||
$('#overlay').remove();
|
||||
$('#left_aside_wrapper').trigger("sticky_kit:detach");
|
||||
}
|
||||
else {
|
||||
$('main').addClass('region_1-on')
|
||||
$('<div id="overlay"></div>').appendTo('section');
|
||||
$('#left_aside_wrapper').stick_in_parent({
|
||||
offset_top: $('nav').outerHeight(true)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
|
||||
$x .= $schemecss;
|
||||
}
|
||||
|
||||
$aside_width = 287;
|
||||
$aside_width = 288;
|
||||
|
||||
// left aside and right aside are 285px + converse width
|
||||
if($align_left) {
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
{{if $notself}}
|
||||
<div class="dropdown pull-right">
|
||||
<button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-caret-down"></i> {{$tools_label}}
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dLabel">
|
||||
<li><a href="{{$tools.view.url}}" title="{{$tools.view.title}}">{{$tools.view.label}}</a></li>
|
||||
<li><a href="{{$tools.recent.url}}" title="{{$tools.recent.title}}">{{$tools.recent.label}}</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" title="{{$tools.refresh.title}}" onclick="window.location.href='{{$tools.refresh.url}}'; return false;">{{$tools.refresh.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.block.title}}" onclick="window.location.href='{{$tools.block.url}}'; return false;">{{$tools.block.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.ignore.title}}" onclick="window.location.href='{{$tools.ignore.url}}'; return false;">{{$tools.ignore.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.archive.title}}" onclick="window.location.href='{{$tools.archive.url}}'; return false;">{{$tools.archive.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.hide.title}}" onclick="window.location.href='{{$tools.hide.url}}'; return false;">{{$tools.hide.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.delete.title}}" onclick="window.location.href='{{$tools.delete.url}}'; return false;">{{$tools.delete.label}}</a></li>
|
||||
</ul>
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button id="connection-dropdown" class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-caret-down"></i> {{$tools_label}}
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dLabel">
|
||||
<li><a href="{{$tools.view.url}}" title="{{$tools.view.title}}">{{$tools.view.label}}</a></li>
|
||||
<li><a href="{{$tools.recent.url}}" title="{{$tools.recent.title}}">{{$tools.recent.label}}</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" title="{{$tools.refresh.title}}" onclick="window.location.href='{{$tools.refresh.url}}'; return false;">{{$tools.refresh.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.block.title}}" onclick="window.location.href='{{$tools.block.url}}'; return false;">{{$tools.block.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.ignore.title}}" onclick="window.location.href='{{$tools.ignore.url}}'; return false;">{{$tools.ignore.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.archive.title}}" onclick="window.location.href='{{$tools.archive.url}}'; return false;">{{$tools.archive.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.hide.title}}" onclick="window.location.href='{{$tools.hide.url}}'; return false;">{{$tools.hide.label}}</a></li>
|
||||
<li><a href="#" title="{{$tools.delete.title}}" onclick="window.location.href='{{$tools.delete.url}}'; return false;">{{$tools.delete.label}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{if $abook_prev || $abook_next}}
|
||||
<div class="btn-group">
|
||||
{{if $abook_prev}}
|
||||
<a href="connedit/{{$abook_prev}}{{if $section}}?f=§ion={{$section}}{{/if}}" class="btn btn-default btn-xs" ><i class="fa fa-backward"></i></a>
|
||||
{{/if}}
|
||||
{{if $abook_next}}
|
||||
<a href="connedit/{{$abook_next}}{{if $section}}?f=§ion={{$section}}{{/if}}" class="btn btn-default btn-xs" ><i class="fa fa-forward"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<h2>{{$header}}</h2>
|
||||
@@ -51,6 +63,7 @@
|
||||
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
|
||||
|
||||
<input type="hidden" name="contact_id" value="{{$contact_id}}">
|
||||
<input type="hidden" name="section" value="{{$section}}">
|
||||
|
||||
<div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true">
|
||||
{{if $notself}}
|
||||
@@ -84,7 +97,7 @@
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
|
||||
<div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending || $section == 'affinity'}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{if $slide}}
|
||||
<div class="form-group"><strong>{{$lbl_slider}}</strong></div>
|
||||
@@ -115,7 +128,7 @@
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="fitert-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs)}} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
|
||||
<div id="fitert-tool-collapse" class="panel-collapse collapse{{if ( !$is_pending && !($slide || $multiprofs)) || $section == 'filter' }} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{include file="field_textarea.tpl" field=$incl}}
|
||||
{{include file="field_textarea.tpl" field=$excl}}
|
||||
@@ -169,7 +182,7 @@
|
||||
</h3>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div id="perms-tool-collapse" class="panel-collapse collapse{{if $self}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
|
||||
<div id="perms-tool-collapse" class="panel-collapse collapse{{if $self || $section === 'perms'}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
|
||||
<div class="section-content-tools-wrapper">
|
||||
<div class="section-content-warning-wrapper">
|
||||
{{if $notself}}{{$permnote}}{{/if}}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="generic-content-wrapper">
|
||||
<p>{{$newmembertext}}</p>
|
||||
|
||||
{{if $profilebadge}}<div id="profile-badge" class="badges"><img src="images/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $contactbadge}}<div id="contact-badge" class="badges"><img src="images/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $keywordsbadge}}<div id="keywords-badge" class="badges"><img src="images/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $channelsbadge}}<div id="channels-badge" class="badges"><img src="images/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $profilebadge}}<div id="profile-badge" class="badges"><img src="images/emoticons/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $contactbadge}}<div id="contact-badge" class="badges"><img src="images/emoticons/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $keywordsbadge}}<div id="keywords-badge" class="badges"><img src="images/emoticons/smiley-thumbsup.gif"></div>{{/if}}
|
||||
{{if $channelsbadge}}<div id="channels-badge" class="badges"><img src="images/emoticons/smiley-thumbsup.gif"></div>{{/if}}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
{{include file="field_password.tpl" field=$pass1}}
|
||||
{{include file="field_password.tpl" field=$pass2}}
|
||||
|
||||
{{if $z_server_role == 'pro'}}
|
||||
{{include file="field_select.tpl" field=$account_level}}
|
||||
{{else}}
|
||||
<input type="hidden" name="account_level" value="{{$account_level.2}}" />
|
||||
{{/if}}
|
||||
{{include file="field_select.tpl" field=$account_language}}
|
||||
{{include file="field_input.tpl" field=$service_class}}
|
||||
|
||||
|
||||
<input type="submit" name="submit" value="{{$submit}}" />
|
||||
|
||||
</form>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
{{/if}}
|
||||
|
||||
{{include file="field_textarea.tpl" field=$banner}}
|
||||
{{include file="field_textarea.tpl" field=$siteinfo}}
|
||||
{{include file="field_textarea.tpl" field=$admininfo}}
|
||||
{{include file="field_select.tpl" field=$language}}
|
||||
{{include file="field_select.tpl" field=$theme}}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var bParam_wall = {{$wall}};
|
||||
var bParam_list = {{$list}};
|
||||
var bParam_fh = {{$fh}};
|
||||
var bParam_static = {{$static}};
|
||||
|
||||
var bParam_search = "{{$search}}";
|
||||
var bParam_order = "{{$order}}";
|
||||
@@ -36,6 +37,7 @@
|
||||
if(bParam_cmax != 99) bCmd = bCmd + "&cmax=" + bParam_cmax;
|
||||
if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
|
||||
if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
|
||||
if(bParam_static != 0) { bCmd = bCmd + "&static=" + bParam_static; }
|
||||
if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
|
||||
if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
|
||||
if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
<div id="chanview-iframe-border" class="fakelink" onclick="chanviewFull(); return true;" title="{{$full}}" ><i class="fa fa-arrows-alt"></i></div>
|
||||
<iframe id="remote-channel" width="100%" src="{{$url}}" onload="resize_iframe()"></iframe>
|
||||
<a href="{{$url}}">{{$url}}</a>
|
||||
|
||||
@@ -103,27 +103,40 @@
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $item.isevent}}
|
||||
<button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
|
||||
<i class="fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'attendno'); return false;">
|
||||
<i class="fa fa-times{{if $item.my_responses.attendno}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
|
||||
<i class="fa fa-question{{if $item.my_responses.attendmaybe}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<div class="btn-group dropdown">
|
||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-attend-menu-{{$item.id}}" title="{{$item.attend_title}}">
|
||||
<i class="fa fa-calendar-check-o"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-attend-menu-{{$item.id}}">
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.0}}" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
|
||||
<i class="item-act-list fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i> {{$item.attend.0}}</a>
|
||||
</li>
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.1}}" onclick="itemAddToCal({{$item.id}}), dolike({{$item.id}},'attendno'); return false;">
|
||||
<i class="item-act-list fa fa-times{{if $item.my_responses.attendno}} ivoted{{/if}}" ></i> {{$item.attend.1}}</a>
|
||||
</li>
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.2}}" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
|
||||
<i class="item-act-list fa fa-question{{if $item.my_responses.attendmaybe}} ivoted{{/if}}" ></i> {{$item.attend.2}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $item.canvote}}
|
||||
<button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
|
||||
<i class="fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
|
||||
<i class="fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
|
||||
<i class="fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i>
|
||||
</button>
|
||||
<div class="btn-group dropdown">
|
||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-consensus-menu-{{$item.id}}" title="{{$item.vote_title}}">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-consensus-menu-{{$item.id}}">
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.0}}" onclick="dolike({{$item.id}},'agree'); return false;">
|
||||
<i class="item-act-list fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i> {{$item.conlabels.0}}</a>
|
||||
</li>
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.1}}" onclick="dolike({{$item.id}},'disagree'); return false;">
|
||||
<i class="item-act-list fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i> {{$item.conlabels.1}}</a>
|
||||
</li>
|
||||
<li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.2}}" onclick="dolike({{$item.id}},'abstain'); return false;">
|
||||
<i class="item-act-list fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i> {{$item.conlabels.2}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||
<i class="fa fa-caret-down"></i>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if($('#cover-photo').length) {
|
||||
if($('#cover-photo').length && $('main').css('opacity') < 1) {
|
||||
$('main').css('opacity', ($(window).scrollTop()/$('#cover-photo').height()).toFixed(1));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -105,17 +105,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if ! $eid}}
|
||||
{{include file="field_checkbox.tpl" field=$share}}
|
||||
{{/if}}
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="openClose('advanced');">{{$advanced}}</button>
|
||||
<div class="btn-group pull-right">
|
||||
<button id="event-edit-preview-btn" class="btn btn-default" type="button" title="{{$preview}}" onclick="doEventPreview();"><i class="fa fa-eye" ></i></button>
|
||||
{{if ! $eid}}
|
||||
<button id="dbtn-acl" class="btn btn-default" type="button" data-toggle="modal" data-target="#aclModal" title="{{$perms_label}}"><i id="jot-perms-icon" class="fa"></i></button>
|
||||
<button id="dbtn-acl" class="btn btn-default" type="button" data-toggle="modal" data-target="#aclModal" title="{{$perms_label}}"><i id="jot-perms-icon" class="fa fa-{{$lockstate}}"></i></button>
|
||||
{{/if}}
|
||||
<button id="event-submit" class="btn btn-primary" type="submit" name="submit">{{$submit}}</button>
|
||||
</div>
|
||||
|
||||
@@ -153,17 +153,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
// ACL
|
||||
$('#id_distr').change(function() {
|
||||
|
||||
if ($('#id_distr').is(':checked')) {
|
||||
$('#dbtn-acl').show();
|
||||
}
|
||||
else {
|
||||
$('#dbtn-acl').hide();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
<div class="modal-body" id="generic-modal-body-{{$id}}"></div>
|
||||
<div class="modal-footer">
|
||||
<button id="generic-modal-cancel-{{$id}}" type="button" class="btn btn-default" data-dismiss="modal">{{$cancel}}</button>
|
||||
{{if $ok}}
|
||||
<button id="generic-modal-ok-{{$id}}" type="button" class="btn btn-primary">{{$ok}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
{{foreach $groups as $group}}
|
||||
<li>
|
||||
{{if $group.cid}}
|
||||
<a class="pull-right group-edit-tool fakelink" onclick="contactgroupChangeMember('{{$group.id}}','{{$group.enc_cid}}'); return true;"/>
|
||||
<i id="group-{{$group.id}}" class="fa {{if $group.ismember}}fa-check-square-o{{else}}fa-square-o{{/if}}"></i>
|
||||
</a>
|
||||
<i id="group-{{$group.id}}" class="widget-nav-pills-checkbox fa {{if $group.ismember}}fa-check-square-o{{else}}fa-square-o{{/if}}" onclick="contactgroupChangeMember('{{$group.id}}','{{$group.enc_cid}}'); return true;"></i>
|
||||
{{/if}}
|
||||
{{if $group.edit}}
|
||||
<a class="pull-right group-edit-tool" href="{{$group.edit.href}}" title="{{$edittext}}"><i class="group-edit-icon fa fa-pencil"></i></a>
|
||||
<a href="{{$group.edit.href}}" class="widget-nav-pills-icons" title="{{$edittext}}"><i class="fa fa-pencil"></i></a>
|
||||
{{/if}}
|
||||
<a{{if $group.selected}} class="group-selected"{{/if}} href="{{$group.href}}">{{$group.text}}</a>
|
||||
</li>
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
<div id="help-content" class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<h2>{{$title}}</h2>
|
||||
<h2>{{$title}}: {{$heading}}</h2>
|
||||
</div>
|
||||
<div class="section-content-wrapper">
|
||||
{{$content}}
|
||||
<div class="section-content-wrapper" id="doco-content">
|
||||
<h3 id="doco-top-toc-heading">
|
||||
<span class="fakelink" onclick="docoTocToggle(); return false;">
|
||||
<i class="fakelink fa fa-caret-right" id="doco-toc-toggle"></i>
|
||||
{{$tocHeading}}
|
||||
</span>
|
||||
</h3>
|
||||
<ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul>
|
||||
{{$content}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
|
||||
$(document).ready(function () {
|
||||
$('#doco-top-toc').toc({content: "#doco-content", headings: "h3,h4,h5,h6"});
|
||||
});
|
||||
|
||||
function docoTocToggle() {
|
||||
if($('#doco-top-toc').is(':visible')) {
|
||||
$('#doco-toc-toggle').removeClass('fa-caret-down').addClass('fa-caret-right');
|
||||
} else {
|
||||
$('#doco-toc-toggle').removeClass('fa-caret-right').addClass('fa-caret-down');
|
||||
}
|
||||
$('#doco-top-toc').toggle();
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="{{$name}}" /></a></div>
|
||||
<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="" /></a></div>
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $userinfo}}
|
||||
<img class="dropdown-toggle fakelink" data-toggle="dropdown" id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"><span class="caret dropdown-toggle fakelink" data-toggle="dropdown" id="usermenu-caret"></span>
|
||||
<div class="usermenu-head dropdown-toggle fakelink" data-toggle="dropdown">
|
||||
<img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}">
|
||||
<span class="caret" id="usermenu-caret"></span>
|
||||
</div>
|
||||
{{if $localuser}}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="avatar">
|
||||
{{foreach $nav.usermenu as $usermenu}}
|
||||
@@ -42,9 +45,10 @@
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{else}}
|
||||
{{if $nav.lock}}
|
||||
{{if $nav.rusermenu}}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="avatar">
|
||||
<li role="presentation"><a href="{{$nav.lock.0}}" title="{{$nav.lock.3}}" role="menuitem">{{$nav.lock.3}}</a></li>
|
||||
<li role="presentation"><a href="{{$nav.rusermenu.0}}" role="menuitem">{{$nav.rusermenu.1}}</a></li>
|
||||
<li role="presentation"><a href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
<div class="widget">
|
||||
<script>
|
||||
var noteSaveTimer = null;
|
||||
$(document).on('focusout',"#note-text",function(e){
|
||||
if(noteSaveTimer)
|
||||
clearTimeout(noteSaveTimer);
|
||||
notePostFinal();
|
||||
noteSaveTimer = null;
|
||||
});
|
||||
<h3>{{$banner}}</h3>
|
||||
<textarea name="note_text" id="note-text">{{$text}}</textarea>
|
||||
<script>
|
||||
var noteSaveTimer = null;
|
||||
var noteText = $('#note-text');
|
||||
|
||||
$(document).on('focusin',"#note-text",function(e){
|
||||
noteSaveTimer = setTimeout(noteSaveChanges,10000);
|
||||
});
|
||||
$(document).ready(function(){
|
||||
noteText.height(noteText[0].scrollHeight);
|
||||
});
|
||||
|
||||
function notePostFinal() {
|
||||
$.post('notes/sync', { 'note_text' : $('#note-text').val() });
|
||||
}
|
||||
$(document).on('focusout',"#note-text",function(e){
|
||||
if(noteSaveTimer)
|
||||
clearTimeout(noteSaveTimer);
|
||||
notePostFinal();
|
||||
noteSaveTimer = null;
|
||||
});
|
||||
|
||||
function noteSaveChanges() {
|
||||
$.post('notes', { 'note_text' : $('#note-text').val() });
|
||||
noteSaveTimer = setTimeout(noteSaveChanges,10000);
|
||||
}
|
||||
</script>
|
||||
$(document).on('focusin',"#note-text",function(e){
|
||||
noteSaveTimer = setTimeout(noteSaveChanges,10000);
|
||||
});
|
||||
|
||||
<h3>{{$banner}}</h3>
|
||||
<textarea name="note_text" id="note-text">{{$text}}</textarea>
|
||||
function notePostFinal() {
|
||||
$.post('notes/sync', { 'note_text' : $('#note-text').val() });
|
||||
}
|
||||
|
||||
function noteSaveChanges() {
|
||||
$.post('notes', { 'note_text' : $('#note-text').val() });
|
||||
noteSaveTimer = setTimeout(noteSaveChanges,10000);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="{{if !$no_fullscreen_btn}}generic-content-wrapper{{/if}}">
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
{{if $order}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-caret-down"></i> {{$tools_label}}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
{{if $tools}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{$tools.profile.0}}"><i class="fa fa-user"></i> {{$tools.profile.1}}</a>
|
||||
@@ -32,7 +32,7 @@
|
||||
{{if $lock}}
|
||||
<div class="btn-group">
|
||||
<button id="lockview" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" title="{{$lock}}" onclick="lockview('photo',{{$id}});" ><i class="fa fa-lock"></i></button>
|
||||
<ul id="panel-{{$id}}" class="lockview-panel dropdown-menu"></ul>
|
||||
<ul id="panel-{{$id}}" class="lockview-panel dropdown-menu dropdown-menu-right"></ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $prevlink || $nextlink}}
|
||||
|
||||
@@ -9,10 +9,15 @@
|
||||
|
||||
<div id="profile-photo-upload-wrapper">
|
||||
|
||||
{{if $importfile}}
|
||||
<input type="hidden" name="importfile" value="{{$importfile}}">
|
||||
{{else}}
|
||||
<label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label>
|
||||
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
|
||||
{{/if}}
|
||||
<div class="clear"></div>
|
||||
|
||||
|
||||
{{if $single}}
|
||||
<input type="hidden" name="profile" value="{{$profile0.id}}" />
|
||||
{{else}}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
{{if $diaspora}}
|
||||
{{include file="diaspora_vcard.tpl"}}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
<div id="clear"></div>
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
{{include file="field_intcheckbox.tpl" field=$notify2}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify3}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify4}}
|
||||
{{*include file="field_intcheckbox.tpl" field=$notify9*}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify5}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify6}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify7}}
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
{{include file="field_checkbox.tpl" field=$network_list_mode}}
|
||||
{{include file="field_checkbox.tpl" field=$user_scalable}}
|
||||
{{include file="field_checkbox.tpl" field=$preload_images}}
|
||||
{{include file="field_checkbox.tpl" field=$manual_update}}
|
||||
{{if $expert}}
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default "href="pdledit">{{$layout_editor}}</a>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<div id="settings-nick-wrapper" class="section-content-info-wrapper">
|
||||
<div id="settings-nickname-desc">{{$desc}} <strong>'{{$nickname}}@{{$basepath}}'</strong>{{$subdir}}</div>
|
||||
<div id="settings-nickname-desc">{{$desc}} <strong>'{{$nickname}}@{{$basepath}}'</strong></div>
|
||||
{{if $davpath}}
|
||||
<br>
|
||||
<div id="settings-dav-desc">{{$davdesc}} <strong>'{{$davpath}}'</strong></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div id="settings-nick-end" ></div>
|
||||
|
||||
@@ -1,26 +1,41 @@
|
||||
<div class="generic-content-wrapper-styled">
|
||||
<h3>{{$title}}</h3>
|
||||
<p></p>
|
||||
<p>{{$description}}</p>
|
||||
{{if $version}}
|
||||
<p>{{$version}}{{if $commit}}+{{$commit}}{{/if}}</p>
|
||||
<h2>{{$title}}</h2>
|
||||
|
||||
<h3>{{$sitenametxt}}</h3>
|
||||
|
||||
<div>{{$sitename}}</div>
|
||||
|
||||
<h3>{{$headline}}</h3>
|
||||
|
||||
<div>{{if $site_about}}{{$site_about}}{{else}}--{{/if}}</div>
|
||||
|
||||
<h3>{{$admin_headline}}</h3>
|
||||
|
||||
<div>{{if $admin_about}}{{$admin_about}}{{else}}--{{/if}}</div>
|
||||
|
||||
<br><br>
|
||||
<div><a href="help/TermsOfService">{{$terms}}</a></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>{{$prj_header}}</h2>
|
||||
|
||||
<div>{{$prj_name}} ({{$z_server_role}})</div>
|
||||
|
||||
{{if $prj_version}}
|
||||
<div>{{$prj_version}}</div>
|
||||
{{/if}}
|
||||
{{if $tag}}
|
||||
<p>{{$tag_txt}} {{$tag}}</p>
|
||||
{{/if}}
|
||||
{{if $polled}}
|
||||
<p>{{$polled}} {{$lastpoll}}</p>
|
||||
{{/if}}
|
||||
<p>{{$load_average}} {{$loadavg_all}}</p>
|
||||
<p>{{$web_location}}</p>
|
||||
<p>{{$visit}}</p>
|
||||
<p>{{$bug_text}} <a href="{{$bug_link_url}}">{{$bug_link_text}}</a></p>
|
||||
<p>{{$adminlabel}}</p>
|
||||
<p>{{$admininfo}}</p>
|
||||
<p>{{$contact}}</p>
|
||||
<p>{{$plugins_text}}</p>
|
||||
{{if $plugins_list}}
|
||||
<div style="margin-left: 25px; margin-right: 25px;">{{$plugins_list}}</div>
|
||||
{{/if}}
|
||||
<p>{{$donate}}</p>
|
||||
|
||||
|
||||
<h3>{{$prj_linktxt}}</h3>
|
||||
|
||||
<div>{{$prj_link}}</div>
|
||||
|
||||
<h3>{{$prj_srctxt}}</h3>
|
||||
|
||||
<div>{{$prj_src}}</div>
|
||||
|
||||
<br><br>
|
||||
<div>{{$prj_transport}} ({{$transport_link}})</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,476 +1,472 @@
|
||||
<style type="text/css" media="screen">
|
||||
#ace-editor {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
.fade.in {
|
||||
-webkit-transition: opacity 0.5s 0.5s ease;
|
||||
-moz-transition: opacity 0.5s 0.5s ease;
|
||||
-o-transition: opacity 0.5s 0.5s ease;
|
||||
transition: opacity 0.5s 0.5s ease;
|
||||
}
|
||||
</style>
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
{{if $showNewWikiButton}}
|
||||
<button class="btn btn-primary btn-xs acl-form-trigger" onclick="$('#new-page-form-wrapper').hide(); openClose('new-wiki-form-wrapper');" data-form_id="new-wiki-form">New Wiki</button>
|
||||
{{/if}}
|
||||
{{if $showNewPageButton}}
|
||||
<button class="btn btn-success btn-xs" onclick="$('#new-wiki-form-wrapper').hide(); openClose('new-page-form-wrapper');">New Page</button>
|
||||
{{/if}}
|
||||
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();
|
||||
adjustFullscreenTopBarHeight();"><i class="fa fa-expand"></i></button>
|
||||
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);
|
||||
adjustInlineTopBarHeight();"><i class="fa fa-compress"></i></button>
|
||||
</div>
|
||||
<h2><span id="wiki-header-name">{{$wikiheaderName}}</span>: <span id="wiki-header-page">{{$wikiheaderPage}}</span></h2>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="new-wiki-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
|
||||
<form id="new-wiki-form" action="wiki/{{$channel}}/create/wiki" method="post" class="acl-form" data-form_id="new-wiki-form" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
|
||||
<div class="clear"></div>
|
||||
{{include file="field_input.tpl" field=$wikiName}}
|
||||
|
||||
<div id="post-visible-container" class="form-group field checkbox">
|
||||
<span style="font-size:1.2em;" class="pull-left">Send notification post?</span>
|
||||
<div style="margin-left:20px" class="pull-left">
|
||||
<input name="postVisible" id="postVisible" value="0" type="checkbox">
|
||||
<label class="switchlabel" for="postVisible">
|
||||
<span class="onoffswitch-inner" data-on="Post" data-off="None"></span>
|
||||
<span class="onoffswitch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<div id="profile-jot-submit-right" class="btn-group">
|
||||
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="Permission settings" onclick="return false;">
|
||||
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{$bang}}
|
||||
</button>
|
||||
<button id="new-wiki-submit" class="btn btn-primary" type="submit" name="submit" >Create Wiki</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{$acl}}
|
||||
<div class="clear"></div>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div id="new-page-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
|
||||
<form id="new-page-form" action="wiki/create/page" method="post" >
|
||||
<div class="clear"></div>
|
||||
{{include file="field_input.tpl" field=$pageName}}
|
||||
<div class="btn-group pull-right">
|
||||
<button id="new-page-submit" class="btn btn-success" type="submit" name="submit" >Create Page</button>
|
||||
</div>
|
||||
</form> <div class="clear"></div>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div id="rename-page-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
|
||||
<form id="rename-page-form" action="wiki/rename/page" method="post" >
|
||||
<div class="clear"></div>
|
||||
{{include file="field_input.tpl" field=$pageRename}}
|
||||
<div class="btn-group pull-right">
|
||||
<button id="rename-page-submit" class="btn btn-warning" type="submit" name="submit" >Rename Page</button>
|
||||
</div>
|
||||
</form> <div class="clear"></div>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div id="wiki-content-container" class="section-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}>
|
||||
<ul class="nav nav-tabs" id="wiki-nav-tabs">
|
||||
<li><a data-toggle="tab" href="#edit-pane">Edit</a></li>
|
||||
<li class="active"><a data-toggle="tab" href="#preview-pane" id="wiki-get-preview">Preview</a></li>
|
||||
<li {{if $hidePageHistory}}style="display: none;"{{/if}}><a data-toggle="tab" href="#page-history-pane" id="wiki-get-history">History</a></li>
|
||||
{{if $showPageControls}}
|
||||
<li class="dropdown">
|
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a id="save-page" data-toggle="tab" href="#">Save</a></li>
|
||||
<li><a id="rename-page" data-toggle="tab" href="#">Rename</a></li>
|
||||
<li><a id="delete-page" data-toggle="tab" href="#">Delete</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a id="embed-image" data-toggle="tab" href="#">Embed image</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
<div class="tab-content" id="wiki-page-tabs">
|
||||
|
||||
<div id="edit-pane" class="tab-pane fade">
|
||||
<div id="ace-editor"></div>
|
||||
</div>
|
||||
<div id="preview-pane" class="tab-pane fade in active">
|
||||
<div id="wiki-preview" class="section-content-wrapper">
|
||||
{{$renderedContent}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="page-history-pane" class="tab-pane fade" {{if $hidePageHistory}}style="display: none;"{{/if}}>
|
||||
<div id="page-history-list" class="section-content-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{if $showCommitMsg}}
|
||||
<div class="section-content-wrapper">
|
||||
{{include file="field_input.tpl" field=$commitMsg}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="generic-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}>
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right">
|
||||
{{if $showPageControls}}
|
||||
<div id="page-tools" class="btn-group" style="display: none;">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-caret-down"></i> {{$tools_label}}
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
{{if $renamePage}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link rename-page" href="#"><i class="fa fa-edit"></i> {{$renamePage}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li class="nav-item">
|
||||
<a id="embed-image" class="nav-link" href="#"><i class="fa fa-picture-o"></i> Embed Image</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(); adjustFullscreenEditorHeight();"><i class="fa fa-expand"></i></button>
|
||||
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false); adjustInlineEditorHeight()"><i class="fa fa-compress"></i></button>
|
||||
</div>
|
||||
<h2>
|
||||
<span id="wiki-header-name">{{$wikiheaderName}}</span>:
|
||||
<span id="wiki-header-page">{{$wikiheaderPage}}</span>
|
||||
</h2>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="rename-page-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
|
||||
<form id="rename-page-form" action="wiki/rename/page" method="post" >
|
||||
{{include file="field_input.tpl" field=$pageRename}}
|
||||
<div class="form-group">
|
||||
<div class="pull-right">
|
||||
<button id="rename-page-submit" class="btn btn-primary" type="submit" name="submit">Submit</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-default rename-page" type="button">Cancel</button>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="wiki-content-container" class="section-content-wrapper">
|
||||
<ul class="nav nav-tabs" id="wiki-nav-tabs">
|
||||
<li id="edit-pane-tab"><a data-toggle="tab" href="#edit-pane">{{$editOrSourceLabel}}</a></li>
|
||||
<li class="active"><a data-toggle="tab" href="#preview-pane" id="wiki-get-preview">View</a></li>
|
||||
<li><a data-toggle="tab" href="#page-history-pane" id="wiki-get-history">History</a></li>
|
||||
</ul>
|
||||
<div class="tab-content" id="wiki-page-tabs">
|
||||
<div id="edit-pane" class="tab-pane fade">
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
<div id="ace-editor"></div>
|
||||
{{else}}
|
||||
<div id="editor-wrapper">
|
||||
<textarea id="editor">{{$content}}</textarea>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $showPageControls}}
|
||||
<div>
|
||||
<div id="id_{{$commitMsg.0}}_wrapper" class="field input">
|
||||
<div class="input-group">
|
||||
<input class="widget-input" name="{{$commitMsg.0}}" id="id_{{$commitMsg.0}}" type="text" value="{{$commitMsg.2}}"{{if $commitMsg.5}} {{$commitMsg.5}}{{/if}}>
|
||||
<div class="input-group-btn">
|
||||
<button id="save-page" type="button" class="btn btn-primary btn-sm disabled">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div id="preview-pane" class="tab-pane fade in active">
|
||||
<div id="wiki-preview">
|
||||
{{$renderedContent}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="page-history-pane" class="tab-pane fade">
|
||||
<div id="page-history-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{$wikiModal}}
|
||||
|
||||
|
||||
<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="embedPhotoModalBody" >
|
||||
<div id="embedPhotoModalBodyAlbumListDialog" class="hide">
|
||||
<div id="embedPhotoModalBodyAlbumList"></div>
|
||||
</div>
|
||||
<div id="embedPhotoModalBodyAlbumDialog" class="hide">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
|
||||
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="embedPhotoModalBody" >
|
||||
<div id="embedPhotoModalBodyAlbumListDialog" class="hide">
|
||||
<div id="embedPhotoModalBodyAlbumList"></div>
|
||||
</div>
|
||||
<div id="embedPhotoModalBodyAlbumDialog" class="hide"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
|
||||
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script>
|
||||
window.wiki_resource_id = '{{$resource_id}}';
|
||||
window.wiki_page_name = '{{$page}}';
|
||||
window.wiki_page_content = {{$content}};
|
||||
window.wiki_page_commit = '{{$commit}}';
|
||||
|
||||
if (window.wiki_page_name === 'Home') {
|
||||
$('#delete-page').hide();
|
||||
$('#rename-page').hide();
|
||||
}
|
||||
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").removeClass('btn-primary');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").addClass('btn-danger');
|
||||
|
||||
$('#rename-page').click(function (ev) {
|
||||
$('#rename-page-form-wrapper').show();
|
||||
});
|
||||
|
||||
$( "#rename-page-form" ).submit(function( event ) {
|
||||
$.post("wiki/{{$channel}}/rename/page",
|
||||
{
|
||||
oldName: window.wiki_page_name,
|
||||
newName: $('#id_pageRename').val(),
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
$('#rename-page-form-wrapper').hide();
|
||||
window.console.log('data: ' + JSON.stringify(data));
|
||||
window.wiki_page_name = data.name.urlName;
|
||||
$('#wiki-header-page').html(data.name.htmlName);
|
||||
wiki_refresh_page_list();
|
||||
} else {
|
||||
window.console.log('Error renaming page.');
|
||||
}
|
||||
}, 'json');
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
wiki_refresh_page_list();
|
||||
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
|
||||
// Show Edit tab first. Otherwise the Ace editor does not load.
|
||||
$("#wiki-nav-tabs li:eq(1) a").tab('show');
|
||||
});
|
||||
window.wiki_resource_id = '{{$resource_id}}';
|
||||
window.wiki_page_name = '{{$page}}';
|
||||
window.wiki_page_content = {{if !$mimeType || $mimeType == 'text/markdown'}}{{$content}}{{else}}`{{$content}}`{{/if}};
|
||||
window.wiki_page_commit = '{{$commit}}';
|
||||
|
||||
var editor = ace.edit("ace-editor");
|
||||
editor.setTheme("ace/theme/github");
|
||||
editor.getSession().setMode("ace/mode/markdown");
|
||||
editor.getSession().setValue(window.wiki_page_content);
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").removeClass('btn-primary');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").addClass('btn-danger');
|
||||
|
||||
$('#wiki-get-preview').click(function (ev) {
|
||||
$.post("wiki/{{$channel}}/preview", {content: editor.getValue(), resource_id: window.wiki_resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
$('#wiki-preview').html(data.html);
|
||||
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
|
||||
} else {
|
||||
window.console.log('Error previewing page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
$('.rename-page').click(function (ev) {
|
||||
$('#rename-page-form-wrapper').toggle();
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
$('#wiki-get-history').click(function (ev) {
|
||||
$.post("wiki/{{$channel}}/history/page", {name: window.wiki_page_name, resource_id: window.wiki_resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
$('#page-history-list').html(data.historyHTML);
|
||||
} else {
|
||||
window.console.log('Error getting page history.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_delete_wiki(wikiHtmlName, resource_id) {
|
||||
if(!confirm('Are you sure you want to delete the entire wiki: ' + JSON.stringify(wikiHtmlName))) {
|
||||
return;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/delete/wiki", {resource_id: resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Wiki deleted');
|
||||
// Refresh list and redirect page as necessary
|
||||
window.location = 'wiki/{{$channel}}';
|
||||
} else {
|
||||
alert('Error deleting wiki!');
|
||||
window.console.log('Error deleting wiki.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
$( "#rename-page-form" ).submit(function( event ) {
|
||||
$.post("wiki/{{$channel}}/rename/page",
|
||||
{
|
||||
oldName: window.wiki_page_name,
|
||||
newName: $('#id_pageRename').val(),
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
$('#rename-page-form-wrapper').hide();
|
||||
window.console.log('data: ' + JSON.stringify(data));
|
||||
window.wiki_page_name = data.name.urlName;
|
||||
$('#wiki-header-page').html(data.name.htmlName);
|
||||
wiki_refresh_page_list();
|
||||
} else {
|
||||
window.console.log('Error renaming page.');
|
||||
}
|
||||
}, 'json');
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
var editor = ace.edit("ace-editor");
|
||||
editor.setOptions({
|
||||
theme: "ace/theme/github",
|
||||
mode: "ace/mode/markdown",
|
||||
|
||||
$('#new-page-submit').click(function (ev) {
|
||||
if (window.wiki_resource_id === '') {
|
||||
window.console.log('You must have a wiki open in order to create pages.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/create/page", {name: $('#id_pageName').val(), resource_id: window.wiki_resource_id},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
window.location = data.url;
|
||||
} else {
|
||||
window.console.log('Error creating page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_refresh_page_list() {
|
||||
if (window.wiki_resource_id === '') {
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/get/page/list/", {resource_id: window.wiki_resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
$('#wiki_page_list_container').html(data.pages);
|
||||
$('#wiki_page_list_container').show();
|
||||
} else {
|
||||
alert('Error fetching page list!');
|
||||
window.console.log('Error fetching page list!');
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#save-page').click(function (ev) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '') {
|
||||
window.console.log('You must have a wiki page open in order to edit pages.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
var currentContent = editor.getValue();
|
||||
if (window.wiki_page_content === currentContent) {
|
||||
window.console.log('No edits to save.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/save/page",
|
||||
{ content: currentContent,
|
||||
commitMsg: $('#id_commitMsg').val(),
|
||||
name: window.wiki_page_name,
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Page saved successfully.');
|
||||
window.wiki_page_content = currentContent;
|
||||
$('#id_commitMsg').val(''); // Clear the commit message box
|
||||
$('#wiki-get-history').click();
|
||||
} else {
|
||||
alert('Error saving page.'); // TODO: Replace alerts with auto-timeout popups
|
||||
window.console.log('Error saving page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
$('#delete-page').click(function (ev) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '' || window.wiki_page_name === 'Home') {
|
||||
window.console.log('You must have a wiki page open in order to delete pages.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if(!confirm('Are you sure you want to delete the page: ' + window.wiki_page_name)) {
|
||||
return;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/delete/page", {name: window.wiki_page_name, resource_id: window.wiki_resource_id},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Page deleted successfully.');
|
||||
var url = window.location.href;
|
||||
if (url.substr(-1) == '/') url = url.substr(0, url.length - 2);
|
||||
url = url.split('/');
|
||||
url.pop();
|
||||
window.location = url.join('/');
|
||||
} else {
|
||||
alert('Error deleting page.'); // TODO: Replace alerts with auto-timeout popups
|
||||
window.console.log('Error deleting page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_revert_page(commitHash) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '') {
|
||||
window.console.log('You must have a wiki page open in order to revert pages.');
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/revert/page", {commitHash: commitHash, name: window.wiki_page_name, resource_id: window.wiki_resource_id},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
$('button[id^=revert-]').removeClass('btn-success');
|
||||
$('button[id^=revert-]').addClass('btn-danger');
|
||||
$('button[id^=revert-]').html('Revert');
|
||||
$('#revert-'+commitHash).removeClass('btn-danger');
|
||||
$('#revert-'+commitHash).addClass('btn-success');
|
||||
$('#revert-'+commitHash).html('Page reverted<br>but not saved');
|
||||
window.wiki_page_commit = commitHash;
|
||||
// put contents in editor
|
||||
editor.getSession().setValue(data.content);
|
||||
} else {
|
||||
window.console.log('Error reverting page.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function wiki_compare_page(compareCommit) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '' || window.wiki_page_commit === '') {
|
||||
window.console.log('You must have a wiki page open in order to revert pages.');
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/compare/page",
|
||||
{
|
||||
compareCommit: compareCommit,
|
||||
currentCommit: window.wiki_page_commit,
|
||||
name: window.wiki_page_name,
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
var modalBody = $('#generic-modal-body-{{$wikiModalID}}');
|
||||
modalBody.html('<div class="descriptive-text">'+data.diff+'</div>');
|
||||
$('.modal-dialog').width('80%');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").off('click');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").click(function () {
|
||||
wiki_revert_page(compareCommit);
|
||||
$('#generic-modal-{{$wikiModalID}}').modal('hide');
|
||||
});
|
||||
$('#generic-modal-{{$wikiModalID}}').modal();
|
||||
} else {
|
||||
window.console.log('Error comparing page.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
$('#embed-image').click(function (ev) {
|
||||
initializeEmbedPhotoDialog();
|
||||
ev.preventDefault();
|
||||
});
|
||||
maxLines: Infinity,
|
||||
minLines: 30,
|
||||
|
||||
wrap: true,
|
||||
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal();
|
||||
};
|
||||
printMargin: false
|
||||
});
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html('{{$modalchooseimages}}');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><ul class="nav">\n\
|
||||
<li><a href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</ul><br></div>')
|
||||
$('#embedPhotoModalBodyAlbumDialog').append(data['content']);
|
||||
$('#embedPhotoModalBodyAlbumDialog').click(function (evt) {
|
||||
evt.preventDefault();
|
||||
var image = document.getElementById(evt.target.id);
|
||||
if (typeof($(image).parent()[0]) !== 'undefined') {
|
||||
var imageparent = document.getElementById($(image).parent()[0].id);
|
||||
$(imageparent).toggleClass('embed-photo-selected-photo');
|
||||
}
|
||||
});
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('hide');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('hide');
|
||||
$('#embed-photo-OKButton').click(function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
var href = $(this).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n' )
|
||||
editor.getSession().insert(editor.getCursorPosition(), imgURL)
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
});
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
});
|
||||
} else {
|
||||
window.console.log('{{$modalerroralbum}} ' + JSON.stringify(album) + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
editor.getSession().setValue(window.wiki_page_content);
|
||||
window.editor = editor; // Store the editor in the window object so the anonymous function can use it.
|
||||
{{else}}
|
||||
window.editor = editor = $('#editor');
|
||||
{{/if}}
|
||||
|
||||
var getPhotoAlbumList = function () {
|
||||
$.post("embedphotos/albumlist", {},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
|
||||
$('#embedPhotoModalLabel').html('{{$modalchoosealbum}}');
|
||||
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var albumLink = '<li>';
|
||||
albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + albumName + '\');return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('hide');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('hide');
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlist}}' + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
|
||||
{{if !$showPageControls}}
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
editor.setReadOnly(true); // Disable editing if the viewer lacks edit permission
|
||||
{{else}}
|
||||
editor.prop('readonly', true);
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
$('#edit-pane-tab').click(function (ev) {
|
||||
setTimeout(function() {
|
||||
window.editor.focus();
|
||||
if($('main').hasClass('fullscreen')) {
|
||||
adjustFullscreenEditorHeight();
|
||||
}
|
||||
else {
|
||||
adjustInlineEditorHeight();
|
||||
}
|
||||
}, 500); // Return the focus to the editor allowing immediate text entry
|
||||
$('#page-tools').show();
|
||||
});
|
||||
|
||||
$('#wiki-get-preview').click(function (ev) {
|
||||
$.post("wiki/{{$channel}}/preview", {
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
content: editor.getValue(),
|
||||
{{else}}
|
||||
content: editor.val(),
|
||||
{{/if}}
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
$('#wiki-preview').html(data.html);
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
|
||||
{{/if}}
|
||||
$('#page-tools').hide();
|
||||
} else {
|
||||
window.console.log('Error previewing page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
$('#wiki-get-history').click(function (ev) {
|
||||
$.post("wiki/{{$channel}}/history/page", {name: window.wiki_page_name, resource_id: window.wiki_resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
$('#page-history-list').html(data.historyHTML);
|
||||
$('#page-tools').hide();
|
||||
} else {
|
||||
window.console.log('Error getting page history.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_refresh_page_list() {
|
||||
if (window.wiki_resource_id === '') {
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/get/page/list/", {resource_id: window.wiki_resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
$('#wiki_page_list_container').html(data.pages);
|
||||
$('#wiki_page_list_container').show();
|
||||
} else {
|
||||
alert('Error fetching page list!');
|
||||
window.console.log('Error fetching page list!');
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#save-page').click(function (ev) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '') {
|
||||
window.console.log('You must have a wiki page open in order to edit pages.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
var currentContent = editor.getValue();
|
||||
{{else}}
|
||||
var currentContent = editor.val();
|
||||
{{/if}}
|
||||
|
||||
if (window.wiki_page_content === currentContent) {
|
||||
$('#save-page').addClass('disabled'); // Disable the save button
|
||||
window.console.log('No edits to save.');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/save/page", {
|
||||
content: currentContent,
|
||||
commitMsg: $('#id_commitMsg').val(),
|
||||
name: window.wiki_page_name,
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Page saved successfully.');
|
||||
window.wiki_page_content = currentContent;
|
||||
$('#id_commitMsg').val(''); // Clear the commit message box
|
||||
$('#save-page').addClass('disabled'); // Disable the save button
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
window.editor.getSession().getUndoManager().markClean(); // Reset the undo history for the editor
|
||||
{{/if}}
|
||||
|
||||
window.editor.focus(); // Return focus to the editor for continued editing
|
||||
// $('#wiki-get-history').click();
|
||||
} else {
|
||||
alert('Error saving page.'); // TODO: Replace alerts with auto-timeout popups
|
||||
window.console.log('Error saving page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_revert_page(commitHash) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '') {
|
||||
window.console.log('You must have a wiki page open in order to revert pages.');
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/revert/page", {commitHash: commitHash, name: window.wiki_page_name, resource_id: window.wiki_resource_id},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
$('button[id^=revert-]').removeClass('btn-success');
|
||||
$('button[id^=revert-]').addClass('btn-danger');
|
||||
$('button[id^=revert-]').html('Revert');
|
||||
$('#revert-'+commitHash).removeClass('btn-danger');
|
||||
$('#revert-'+commitHash).addClass('btn-success');
|
||||
$('#revert-'+commitHash).html('Page reverted<br>but not saved');
|
||||
window.wiki_page_commit = commitHash;
|
||||
// put contents in editor
|
||||
editor.getSession().setValue(data.content);
|
||||
} else {
|
||||
window.console.log('Error reverting page.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function wiki_compare_page(compareCommit) {
|
||||
if (window.wiki_resource_id === '' || window.wiki_page_name === '' || window.wiki_page_commit === '') {
|
||||
window.console.log('You must have a wiki page open in order to revert pages.');
|
||||
return false;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/compare/page", {
|
||||
compareCommit: compareCommit,
|
||||
currentCommit: window.wiki_page_commit,
|
||||
name: window.wiki_page_name,
|
||||
resource_id: window.wiki_resource_id
|
||||
},
|
||||
function (data) {
|
||||
console.log(data);
|
||||
if (data.success) {
|
||||
var modalBody = $('#generic-modal-body-{{$wikiModalID}}');
|
||||
modalBody.html('<div class="descriptive-text">'+data.diff+'</div>');
|
||||
$('.modal-dialog').addClass('modal-lg');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").off('click');
|
||||
$("#generic-modal-ok-{{$wikiModalID}}").click(function () {
|
||||
wiki_revert_page(compareCommit);
|
||||
$('#generic-modal-{{$wikiModalID}}').modal('hide');
|
||||
});
|
||||
$('#generic-modal-{{$wikiModalID}}').modal();
|
||||
} else {
|
||||
window.console.log('Error comparing page.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function adjustFullscreenEditorHeight() {
|
||||
$('#editor, #ace-editor').height($(window).height() - $('#id_commitMsg_wrapper').outerHeight(true) - $('.section-title-wrapper').outerHeight(true) - $('#wiki-nav-tabs').outerHeight(true) - 17);
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
editor.setOptions({
|
||||
maxLines: null,
|
||||
minLines: null
|
||||
});
|
||||
editor.resize();
|
||||
{{/if}}
|
||||
}
|
||||
|
||||
function adjustInlineEditorHeight() {
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
editor.setOptions({
|
||||
maxLines: Infinity,
|
||||
minLines: 30
|
||||
});
|
||||
editor.resize();
|
||||
{{else}}
|
||||
editor.height(editor[0].scrollHeight);
|
||||
{{/if}}
|
||||
}
|
||||
|
||||
$('#embed-image').click(function (ev) {
|
||||
initializeEmbedPhotoDialog();
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal();
|
||||
};
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html('{{$modalchooseimages}}');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><ul class="nav">\n\
|
||||
<li><a href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</ul><br></div>')
|
||||
$('#embedPhotoModalBodyAlbumDialog').append(data['content']);
|
||||
$('#embedPhotoModalBodyAlbumDialog').click(function (evt) {
|
||||
evt.preventDefault();
|
||||
var image = document.getElementById(evt.target.id);
|
||||
if (typeof($(image).parent()[0]) !== 'undefined') {
|
||||
var imageparent = document.getElementById($(image).parent()[0].id);
|
||||
$(imageparent).toggleClass('embed-photo-selected-photo');
|
||||
}
|
||||
});
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('hide');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('hide');
|
||||
$('#embed-photo-OKButton').click(function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
var href = $(this).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n' )
|
||||
editor.getSession().insert(editor.getCursorPosition(), imgURL)
|
||||
{{else}}
|
||||
var currentContent = $('#editor').val();
|
||||
$('#editor').val(currentContent + ddata['photolink']);
|
||||
{{/if}}
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
});
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
});
|
||||
} else {
|
||||
window.console.log('{{$modalerroralbum}} ' + JSON.stringify(album) + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
|
||||
var getPhotoAlbumList = function () {
|
||||
$.post("embedphotos/albumlist", {},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
|
||||
$('#embedPhotoModalLabel').html('{{$modalchoosealbum}}');
|
||||
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var albumLink = '<li>';
|
||||
albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + albumName + '\');return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('hide');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('hide');
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlist}}' + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
wiki_refresh_page_list();
|
||||
|
||||
{{if !$mimeType || $mimeType == 'text/markdown'}}
|
||||
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
|
||||
window.editor.on("input", function() {
|
||||
if(window.editor.getSession().getUndoManager().isClean()) {
|
||||
$('#save-page').addClass('disabled');
|
||||
} else {
|
||||
$('#save-page').removeClass('disabled');
|
||||
}
|
||||
});
|
||||
{{else}}
|
||||
window.editor.on("input", function() {
|
||||
$('#save-page').removeClass('disabled');
|
||||
});
|
||||
window.editor.bbco_autocomplete('bbcode');
|
||||
{{/if}}
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
if($('main').hasClass('fullscreen')) {
|
||||
adjustFullscreenEditorHeight();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<style>
|
||||
.diff {
|
||||
width:100%;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.diff td{
|
||||
padding:0 0.667em;
|
||||
vertical-align:top;
|
||||
@@ -40,8 +45,10 @@
|
||||
<table id="rev-{{$commit.hash}}" onclick="$('#details-{{$commit.hash}}').show()" width="100%">
|
||||
<tr><td width="10%">Date</td><td width="70%">{{$commit.date}}</td>
|
||||
<td rowspan="3" width="20%" align="right">
|
||||
{{if $permsWrite}}
|
||||
<button id="revert-{{$commit.hash}}" class="btn btn-danger btn-xs" onclick="wiki_revert_page('{{$commit.hash}}')">Revert</button>
|
||||
<br><br>
|
||||
{{/if}}
|
||||
<button id="compare-{{$commit.hash}}" class="btn btn-warning btn-xs" onclick="wiki_compare_page('{{$commit.hash}}')">Compare</button>
|
||||
</td></tr>
|
||||
<tr><td>Name</td><td>{{$commit.name}} <{{$commit.email}}></td></tr>
|
||||
|
||||
@@ -2,9 +2,74 @@
|
||||
<div id="wiki_page_list" class="widget" >
|
||||
<h3>{{$header}}</h3>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{{if $pages}}
|
||||
{{foreach $pages as $page}}
|
||||
<li><a href="/wiki/{{$channel}}/{{$wikiname}}/{{$page.url}}">{{$page.title}}</a></li>
|
||||
<li id="{{$page.link_id}}">
|
||||
{{if $page.resource_id && $canadd}}
|
||||
<i class="widget-nav-pills-icons fa fa-trash-o drop-icons" onclick="wiki_delete_page('{{$page.title}}', '{{$page.url}}', '{{$page.resource_id}}', '{{$page.link_id}}')"></i>
|
||||
{{/if}}
|
||||
<a href="/wiki/{{$channel}}/{{$wikiname}}/{{$page.url}}">{{$page.title}}</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $canadd}}
|
||||
<li><a href="#" onclick="wiki_show_new_page_form(); return false;"><i class="fa fa-plus-circle"></i> {{$addnew}}</a></li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{if $canadd}}
|
||||
<div id="new-page-form-wrapper" class="sub-menu" style="display:none;">
|
||||
<form id="new-page-form" action="wiki/{{$channel}}/create/page" method="post" >
|
||||
{{include file="field_input.tpl" field=$pageName}}
|
||||
<button id="new-page-submit" class="btn btn-primary" type="submit" name="submit" >Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{if $not_refresh}}</div>{{/if}}
|
||||
|
||||
<script>
|
||||
$('#new-page-submit').click(function (ev) {
|
||||
$.post("wiki/{{$channel}}/create/page", {name: $('#id_pageName').val(), resource_id: window.wiki_resource_id},
|
||||
function(data) {
|
||||
if(data.success) {
|
||||
window.location = data.url;
|
||||
} else {
|
||||
window.console.log('Error creating page.');
|
||||
}
|
||||
}, 'json');
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
function wiki_delete_page(wiki_page_name, wiki_page_url, wiki_resource_id, wiki_link_id) {
|
||||
if(!confirm('Are you sure you want to delete the page: ' + wiki_page_name)) {
|
||||
return;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/delete/page", {name: wiki_page_url, resource_id: wiki_resource_id},
|
||||
function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Page deleted successfully.');
|
||||
if(wiki_page_url == window.wiki_page_name) {
|
||||
var url = window.location.href;
|
||||
if(url.substr(-1) == '/')
|
||||
url = url.substr(0, url.length - 2);
|
||||
url = url.split('/');
|
||||
url.pop();
|
||||
window.location = url.join('/');
|
||||
}
|
||||
else {
|
||||
$('#' + wiki_link_id).remove();
|
||||
}
|
||||
} else {
|
||||
alert('Error deleting page.'); // TODO: Replace alerts with auto-timeout popups
|
||||
window.console.log('Error deleting page.');
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
}
|
||||
|
||||
function wiki_show_new_page_form() {
|
||||
$('#new-page-form-wrapper').toggle();
|
||||
$('#id_pageName').focus();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,20 +1,78 @@
|
||||
<div id="wiki_list" class="widget">
|
||||
<h3>{{$header}}</h3>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{{foreach $wikis as $wiki}}
|
||||
<li class="dropdown" id="wiki-{{$wiki.resource_id}}">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<b>{{$wiki.title}}</b><b class="fa fa-caret-down pull-right"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="View {{$wiki.title}}">View</a></li>
|
||||
{{if $showControls}}
|
||||
<li class="divider"></li>
|
||||
<li><a href="#" onclick="wiki_delete_wiki('{{$wiki.title}}','{{$wiki.resource_id}}'); return false;" title="Delete {{$wiki.title}}">Delete wiki</a></li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
{{if $owner}}
|
||||
<button type="button" class="btn btn-success btn-xs pull-right acl-form-trigger" onclick="openClose('new-wiki-form-wrapper');" data-form_id="new-wiki-form"><i class="fa fa-plus-circle"></i> {{$create}}</button>
|
||||
{{/if}}
|
||||
<h2>{{$header}}</h2>
|
||||
</div>
|
||||
{{if $owner}}
|
||||
<div id="new-wiki-form-wrapper" class="section-content-tools-wrapper">
|
||||
<form id="new-wiki-form" action="wiki/{{$channel}}/create/wiki" method="post" class="acl-form" data-form_id="new-wiki-form" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
|
||||
{{include file="field_input.tpl" field=$wikiName}}
|
||||
{{include file="field_select.tpl" field=$mimeType}}
|
||||
{{include file="field_checkbox.tpl" field=$notify}}
|
||||
<div>
|
||||
<div class="btn-group pull-right">
|
||||
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="Permission settings" onclick="return false;">
|
||||
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>
|
||||
</button>
|
||||
<button id="new-wiki-submit" class="btn btn-primary btn-sm" type="submit" name="submit" >{{$submit}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{$acl}}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="section-content-wrapper-np">
|
||||
<table id="wikis-index">
|
||||
<tr>
|
||||
<th width="96%">{{$name}}</th>
|
||||
<th width="1%">{{$type}}</th>
|
||||
<th width="1%" class="wikis-index-tool"></th>
|
||||
<th width="1%" class="wikis-index-tool"></th>
|
||||
{{if $owner}}
|
||||
<th width="1%"></th>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{foreach $wikis as $wiki}}
|
||||
<tr class="wikis-index-row">
|
||||
<td><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="{{$view}}"{{if $wiki.active}} class="active"{{/if}}>{{$wiki.title}}</a></td>
|
||||
<td>{{$wiki.mimeType}}</td>
|
||||
<td class="wiki-index-tool dropdown">
|
||||
{{if $wiki.lock}}
|
||||
<i class="fa fa-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('item',{{$wiki.id}});"></i></button>
|
||||
<ul id="panel-{{$wiki.id}}" class="lockview-panel dropdown-menu dropdown-menu-right"></ul>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="wiki-index-tool"><i class="fa fa-download fakelink" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;"></i></td>
|
||||
{{if $owner}}
|
||||
<td><i class="fa fa-trash-o drop-icons" onclick="wiki_delete_wiki('{{$wiki.title}}', '{{$wiki.resource_id}}'); return false;"></i></td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
{{if $owner}}
|
||||
function wiki_delete_wiki(wikiHtmlName, resource_id) {
|
||||
if(!confirm('Are you sure you want to delete the entire wiki: ' + JSON.stringify(wikiHtmlName))) {
|
||||
return;
|
||||
}
|
||||
$.post("wiki/{{$channel}}/delete/wiki", {resource_id: resource_id}, function (data) {
|
||||
if (data.success) {
|
||||
window.console.log('Wiki deleted');
|
||||
// Refresh list and redirect page as necessary
|
||||
window.location = 'wiki/{{$channel}}';
|
||||
} else {
|
||||
alert('Error deleting wiki!');
|
||||
window.console.log('Error deleting wiki.');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
{{/if}}
|
||||
function wiki_download_wiki(resource_id) {
|
||||
window.location = "wiki/{{$channel}}/download/wiki/" + resource_id;
|
||||
}
|
||||
</script>
|
||||
|
||||
8
view/tpl/wikilist_widget.tpl
Normal file
8
view/tpl/wikilist_widget.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
<div id="wiki_list" class="widget">
|
||||
<h3>{{$header}}</h3>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{{foreach $wikis as $wiki}}
|
||||
<li><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="{{$view}}">{{$wiki.title}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user