Merge branch 'dev' into oauth2
This commit is contained in:
commit
a4de63ca92
126
CHANGELOG
126
CHANGELOG
@ -1,3 +1,129 @@
|
||||
Hubzilla 3.2 (2018-03-09)
|
||||
- Improve rendering of Readme files in plugin settings
|
||||
- Add pdl file for mod moderate
|
||||
- Update redbasic theme screenshot
|
||||
- Restrict mail messages to max_import_size
|
||||
- Add pdl file for mod thing
|
||||
- Add federation property to webfinger
|
||||
- Provide new member widget which sits beneath the notifications for the first 60 days after an account creation
|
||||
- Rename Addon/Feature settings to Addon Settings
|
||||
- Move privacy groups to the newly created Access Control and Permissions tab
|
||||
- Move oauth_client management and guest access tokens to features rather than auto-enabling at various feature levels
|
||||
- Change undo_post_tagging() to emit quoted tags rather than using underscore replacement if they contain spaces
|
||||
- Require directory servers to be using some modern form of encryption
|
||||
- Change icon set from font-awesome to fork-awesome
|
||||
- Provide opt-out link and text with notification emails
|
||||
- Alter image selection widget to accept/submit on choose (github issue #979)
|
||||
- If hide_in_statistics is set, only include the total channels count and no other statistical info in siteinfo.json
|
||||
- Mark connections where we do not have post_comments permissions with an no entry sign
|
||||
- Click your own profile photo to change it if loged in
|
||||
- Remove street address info from the default basic profile fields
|
||||
- Handle error logging in on cloud page (post method not implemented)
|
||||
- Cloud 'view-as-tiles' toggle wasn't available for guests and they are the most likely to prefer that view
|
||||
- Provide DB compatibility for poll and voting implementations across several platforms
|
||||
- Remove the unused ZotDriver and ProtoDriver classes
|
||||
- Move dreport from zot to lib
|
||||
- Move Zotlabs\Zot\Verify to Zotlabs\Lib\Verify as part of the zot6 re-org
|
||||
- Add event resource_id to iconfig so Diaspora can search on it without looking inside JSON objects
|
||||
- Trim non-existent/deprecated plugins from siteinfo plugin list
|
||||
- Add 'Validate' button to new_channel page
|
||||
- Do not show summary if it is equal to body
|
||||
- Update code tag styling so bbcode [code] blocks and wiki markdown inline code render nicely
|
||||
- Crypto improvements (use pkcs1_oaep_padding instead of the older pkcs1_padding)
|
||||
- Refactor OAuth2Server a bit
|
||||
- Refactor of the DB update system
|
||||
- Extend the oauth2 storage driver so that we can use our own channel table
|
||||
- Provide option to block the public stream unless authenticated
|
||||
- Refactor shares and urn shares into activities
|
||||
- Show likes and dislikes in notices if always_show_in_notices is set
|
||||
- Add hidden config to disallow anonymous comments (github issue #972)
|
||||
- Add flexibility to prefix/suffix string translations for jquery.timeago
|
||||
- Make post titles searchable (github issue #975)
|
||||
- Implement zot6 delivery
|
||||
- Remove mobile_detect library
|
||||
- Separate the parsing of author information from the parsing of item/activity information in feedutils
|
||||
- Provide summaries in feeds under very limited cases
|
||||
- Redirect to the email_validation page if login was attempted after account creation but prior to successful verification
|
||||
- Iprove workflow for form based email validation when auto_channel_create is in effect
|
||||
- Provide a default video image if nothing else is available
|
||||
- Surface the ability to change the landing page after channel creation
|
||||
- Create the 'go' module to present several possible things to do after channel creation
|
||||
- Add unit test for dba_pdo driver class
|
||||
- Add unit test for \DBA factory
|
||||
- Usability improvements to registration/verification workflow
|
||||
- Don't do any bbcode translation within code blocks (except baseurl, observer, and linefeeds)
|
||||
- Improve browser language detection
|
||||
- Remove unused prototype importer template and obsolete reflection cms importer
|
||||
- Update to bootstrap 4 stable
|
||||
- Implement caching of notifications in browser session storage
|
||||
- Code cleanup and simplification in mod_like
|
||||
- Implement new cropper library
|
||||
- Better notifications for edit post/comments which may have been originally posted long ago
|
||||
- Ensure filter words are not empty in include/items.php
|
||||
- Change query in mod search to be compatible with postgres
|
||||
- Provide channel list function in the zot api
|
||||
- Remove deprecated 'qcomment' feature
|
||||
- Simplify webserver logic flow
|
||||
- Simplify interactions with the get_features hook
|
||||
- Provide a local pubstream option (content from this site only)
|
||||
- Simplify dir_tagadelic dramatically
|
||||
- Surface the article feature
|
||||
- Add summary bbcode tag
|
||||
- Move markdown-in-posts/comments feature to plugin
|
||||
- Support tables in markdown posts/comments
|
||||
|
||||
|
||||
Bugfixes
|
||||
- Fix javascript error if there are no notifications
|
||||
- Fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers
|
||||
- Fix unable to reset profile fields to defaults in admin/profs by emptying the textarea
|
||||
⁻ Fix issues with accordions related to bootstrap upgrade
|
||||
- Fix empty dob is set to the date of the first profile save
|
||||
- Fix several email validation issues
|
||||
- Fix issue if logged in locally and mod_display returns nothing owned by your uid; retry with known public uids rather than issue 'permission denied'
|
||||
- Fix public stream app permission check to match the recent fixes to the Module
|
||||
- Fix issues with delivery of edited posts to forums
|
||||
- Fix autoname test
|
||||
- Fix issue where self and pending connections were visible in connections when not loged in
|
||||
- Fix bad query in mod defperms
|
||||
- Fix issue where gnusocial likes were not recognised as like activity
|
||||
- Fix manual queue invocation
|
||||
- Fix unable to delete accounts using tickboxes on admin/accounts
|
||||
- Fix a PHP7.2 warning when a channel has no cards
|
||||
- Fix unable to delete permission groups with space in name (github issue #920)
|
||||
|
||||
Addons
|
||||
Statistic: fix reporting of incorrect register policy in nodeinfo
|
||||
Diaspora: diaspora_init_relay: calls diaspora_import_author with too many arguments
|
||||
Pubcrawl: provide a system 'allowed' for to match the system setting for other protocols
|
||||
Diaspora: fix issue with sending diaspora profile change messages over diaspora_v2
|
||||
Diaspora: provide limited but hopefully adequate support for new Diaspora html5 audio/video
|
||||
Pubcrawl: send zot context with follow requests
|
||||
Pubcrawl: add video to the set of message types we process
|
||||
Pubcrawl: support for activitypub media
|
||||
Openclipatar: remove extra details for each image
|
||||
Diaspora: initial work on event participation
|
||||
Statistic: remove the friendica protocol from nodeinfo until it is fully implemented
|
||||
Statistic: re-arrange the order of the .host-meta/nodeinfo links
|
||||
Pubcrawl: add share verb to activitystreams translator
|
||||
Pubcrawl: post public posts to syschannel
|
||||
Statistics: fix legacy statistics.json interface
|
||||
Gnusocial: improve error checking when processing a salmon message
|
||||
Dirstats: fix sql syntax error
|
||||
Pubcrawl: possibly reduce constraint violations for xchan_store_lowlevel (duplicate entry)
|
||||
Diaspora: ensure we process Friendica-over-Diaspora yearless birthdays correctly
|
||||
Chess: added simple history browsing controls to spectator view
|
||||
Diaspora: support post/comment edits
|
||||
Diaspora: don't redirect fetch requests for non-Diaspora wall-to-wall and forum posts unless they can be redirected to a Diaspora protocol site
|
||||
Chess: added support for publicly visible games
|
||||
Phpmailer: add quickstart notes
|
||||
Chess: choose random color if no color is chosen
|
||||
New Plugin: mdpost - markdown in posts/comments, migrated from core to addon
|
||||
Diaspora: provide a configuration option to import the diaspora firehose, otherwise only import content matching subscribed tags
|
||||
NSFW: load images only after click on the button
|
||||
Twitter: provide configurable tweet length until such time as 280 becomes universal
|
||||
|
||||
|
||||
Hubzilla 3.0 (2018-01-09)
|
||||
- Updated homeinstall script
|
||||
- Sort cloud directory by 1. is_dir and 2. name
|
||||
|
@ -24,7 +24,7 @@ class Site {
|
||||
$siteinfo = ((x($_POST,'siteinfo')) ? trim($_POST['siteinfo']) : '');
|
||||
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
||||
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : '');
|
||||
$theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : '');
|
||||
// $theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : '');
|
||||
// $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : '');
|
||||
$maximagesize = ((x($_POST,'maximagesize')) ? intval(trim($_POST['maximagesize'])) : 0);
|
||||
|
||||
@ -122,11 +122,11 @@ class Site {
|
||||
set_config('system','siteinfo',$siteinfo);
|
||||
set_config('system', 'language', $language);
|
||||
set_config('system', 'theme', $theme);
|
||||
if ( $theme_mobile === '---' ) {
|
||||
del_config('system', 'mobile_theme');
|
||||
} else {
|
||||
set_config('system', 'mobile_theme', $theme_mobile);
|
||||
}
|
||||
// if ( $theme_mobile === '---' ) {
|
||||
// del_config('system', 'mobile_theme');
|
||||
// } else {
|
||||
// set_config('system', 'mobile_theme', $theme_mobile);
|
||||
// }
|
||||
// set_config('system','site_channel', $site_channel);
|
||||
set_config('system','maximagesize', $maximagesize);
|
||||
|
||||
@ -305,7 +305,7 @@ class Site {
|
||||
'$siteinfo' => array('siteinfo', t('Site Information'), get_config('system','siteinfo'), t("Publicly visible description of this site. Displayed on siteinfo page. BBCode can be used here")),
|
||||
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
|
||||
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
|
||||
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile),
|
||||
// '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile),
|
||||
// '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")),
|
||||
'$feed_contacts' => array('feed_contacts', t('Allow Feeds as Connections'),get_config('system','feed_contacts'),t('(Heavy system resource usage)')),
|
||||
'$maximagesize' => array('maximagesize', t("Maximum image size"), intval(get_config('system','maximagesize')), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
|
||||
|
@ -207,7 +207,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
$imagedata = (($os_storage) ? @file_get_contents($imagedata) : $imagedata);
|
||||
$imagedata = (($os_storage) ? @file_get_contents(dbunescbin($imagedata)) : dbunescbin($imagedata));
|
||||
$ph = photo_factory($imagedata, $filetype);
|
||||
|
||||
if(! $ph->is_valid()) {
|
||||
@ -364,6 +364,12 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||
'$embedPhotosModalTitle' => t('Use a photo from your albums'),
|
||||
'$embedPhotosModalCancel' => t('Cancel'),
|
||||
'$embedPhotosModalOK' => t('OK'),
|
||||
'$modalchooseimages' => t('Choose images to embed'),
|
||||
'$modalchoosealbum' => t('Choose an album'),
|
||||
'$modaldiffalbum' => t('Choose a different album'),
|
||||
'$modalerrorlist' => t('Error getting album list'),
|
||||
'$modalerrorlink' => t('Error getting photo link'),
|
||||
'$modalerroralbum' => t('Error getting album'),
|
||||
'$form_security_token' => get_form_security_token("cover_photo"),
|
||||
/// @FIXME - yuk
|
||||
'$select' => t('Select existing photo'),
|
||||
|
27
Zotlabs/Module/Hashtags.php
Normal file
27
Zotlabs/Module/Hashtags.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
|
||||
class Hashtags extends \Zotlabs\Web\Controller {
|
||||
|
||||
function init() {
|
||||
$result = [];
|
||||
|
||||
$t = escape_tags($_REQUEST['t']);
|
||||
if(! $t)
|
||||
json_return_and_die($result);
|
||||
|
||||
$r = q("select distinct(term) from term where term like '%s' and ttype = %d order by term",
|
||||
dbesc($t . '%'),
|
||||
intval(TERM_HASHTAG)
|
||||
);
|
||||
if($r) {
|
||||
foreach($r as $rv) {
|
||||
$result[] = [ 'text' => strtolower($rv['term']) ];
|
||||
}
|
||||
}
|
||||
|
||||
json_return_and_die($result);
|
||||
}
|
||||
}
|
@ -463,6 +463,12 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
'$embedPhotosModalTitle' => t('Use a photo from your albums'),
|
||||
'$embedPhotosModalCancel' => t('Cancel'),
|
||||
'$embedPhotosModalOK' => t('OK'),
|
||||
'$modalchooseimages' => t('Choose images to embed'),
|
||||
'$modalchoosealbum' => t('Choose an album'),
|
||||
'$modaldiffalbum' => t('Choose a different album'),
|
||||
'$modalerrorlist' => t('Error getting album list'),
|
||||
'$modalerrorlink' => t('Error getting photo link'),
|
||||
'$modalerroralbum' => t('Error getting album'),
|
||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||
'$select' => t('Select existing photo'),
|
||||
));
|
||||
|
@ -8,11 +8,11 @@ class _1204 {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
||||
$r1 = q("ALTER TABLE poll ADD poll_guid text NOT NULL");
|
||||
$r2 = q("create index \"poll_guid_idx\" on poll \"poll_guid\"");
|
||||
$r2 = q("create index \"poll_guid_idx\" on poll (\"poll_guid\")");
|
||||
$r3 = q("ALTER TABLE poll_elm ADD pelm_guid text NOT NULL");
|
||||
$r4 = q("create index \"pelm_guid_idx\" on poll_elm \"pelm_guid\"");
|
||||
$r4 = q("create index \"pelm_guid_idx\" on poll_elm (\"pelm_guid\")");
|
||||
$r5 = q("ALTER TABLE vote ADD vote_guid text NOT NULL");
|
||||
$r6 = q("create index \"vote_guid_idx\" on vote \"vote_guid\"");
|
||||
$r6 = q("create index \"vote_guid_idx\" on vote (\"vote_guid\")");
|
||||
|
||||
$r = ($r1 && $r2 && $r3 && $r4 && $r5 && $r6);
|
||||
}
|
||||
|
26
Zotlabs/Update/_1208.php
Normal file
26
Zotlabs/Update/_1208.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1208 {
|
||||
|
||||
function run() {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
||||
$r1 = q("ALTER TABLE poll ADD poll_author text NOT NULL");
|
||||
$r2 = q("create index \"poll_author_idx\" on poll \"poll_author\"");
|
||||
|
||||
$r = ($r1 && $r2);
|
||||
}
|
||||
else {
|
||||
$r = q("ALTER TABLE `poll` ADD `poll_author` VARCHAR(191) NOT NULL AFTER `poll_votes`,
|
||||
ADD INDEX `poll_author` (`poll_author`)");
|
||||
}
|
||||
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
|
||||
}
|
26
Zotlabs/Update/_1209.php
Normal file
26
Zotlabs/Update/_1209.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
class _1209 {
|
||||
|
||||
function run() {
|
||||
|
||||
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
||||
$r1 = q("ALTER TABLE poll_elm ADD pelm_order numeric(6) NOT NULL DEFAULT '0' ");
|
||||
$r2 = q("create index \"pelm_order_idx\" on poll_elm \"pelm_order\"");
|
||||
|
||||
$r = ($r1 && $r2);
|
||||
}
|
||||
else {
|
||||
$r = q("ALTER TABLE `poll_elm` ADD `pelm_order` int(11) NOT NULL DEFAULT 0,
|
||||
ADD INDEX `pelm_order` (`pelm_order`)");
|
||||
}
|
||||
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
|
||||
}
|
2
boot.php
2
boot.php
@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.3.2' );
|
||||
define ( 'ZOT_REVISION', '6.0a' );
|
||||
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1207 );
|
||||
define ( 'DB_UPDATE_VERSION', 1209 );
|
||||
|
||||
define ( 'PROJECT_BASE', __DIR__ );
|
||||
|
||||
|
@ -589,13 +589,16 @@ function zot_refresh($them, $channel = null, $force = false) {
|
||||
|
||||
|
||||
// If there is a default group for this channel, add this connection to it
|
||||
// for pending connections this will happens at acceptance time.
|
||||
|
||||
$default_group = $channel['channel_default_group'];
|
||||
if($default_group) {
|
||||
require_once('include/group.php');
|
||||
$g = group_rec_byhash($channel['channel_id'],$default_group);
|
||||
if($g)
|
||||
group_add_member($channel['channel_id'],'',$x['hash'],$g['id']);
|
||||
if(! intval($new_connection[0]['abook_pending'])) {
|
||||
$default_group = $channel['channel_default_group'];
|
||||
if($default_group) {
|
||||
require_once('include/group.php');
|
||||
$g = group_rec_byhash($channel['channel_id'],$default_group);
|
||||
if($g)
|
||||
group_add_member($channel['channel_id'],'',$x['hash'],$g['id']);
|
||||
}
|
||||
}
|
||||
|
||||
unset($new_connection[0]['abook_id']);
|
||||
|
@ -969,12 +969,14 @@ CREATE TABLE IF NOT EXISTS `poll` (
|
||||
`poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`poll_guid` varchar(191) NOT NULL,
|
||||
`poll_channel` int(10) unsigned NOT NULL DEFAULT 0 ,
|
||||
`poll_author` varchar(191) NOT NULL,
|
||||
`poll_desc` text NOT NULL,
|
||||
`poll_flags` int(11) NOT NULL DEFAULT 0 ,
|
||||
`poll_votes` int(11) NOT NULL DEFAULT 0 ,
|
||||
PRIMARY KEY (`poll_id`),
|
||||
KEY `poll_guid` (`poll_guid`),
|
||||
KEY `poll_channel` (`poll_channel`),
|
||||
KEY `poll_author` (`poll_author`),
|
||||
KEY `poll_flags` (`poll_flags`),
|
||||
KEY `poll_votes` (`poll_votes`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@ -986,10 +988,12 @@ CREATE TABLE IF NOT EXISTS `poll_elm` (
|
||||
`pelm_desc` text NOT NULL,
|
||||
`pelm_flags` int(11) NOT NULL DEFAULT 0 ,
|
||||
`pelm_result` float NOT NULL DEFAULT 0 ,
|
||||
`pelm_order` int(11) NOT NULL DEFAULT 0 ,
|
||||
PRIMARY KEY (`pelm_id`),
|
||||
KEY `pelm_guid` (`pelm_guid`),
|
||||
KEY `pelm_poll` (`pelm_poll`),
|
||||
KEY `pelm_result` (`pelm_result`)
|
||||
KEY `pelm_result` (`pelm_result`),
|
||||
KEY `pelm_order` (`pelm_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `profdef` (
|
||||
|
@ -944,6 +944,7 @@ CREATE TABLE "poll" (
|
||||
"poll_id" serial NOT NULL,
|
||||
"poll_guid" text NOT NULL,
|
||||
"poll_channel" bigint NOT NULL DEFAULT '0',
|
||||
"poll_author" text NOT NULL,
|
||||
"poll_desc" text NOT NULL,
|
||||
"poll_flags" bigint NOT NULL DEFAULT '0',
|
||||
"poll_votes" bigint NOT NULL DEFAULT '0',
|
||||
@ -952,6 +953,7 @@ CREATE TABLE "poll" (
|
||||
);
|
||||
create index "poll_guid" on poll ("poll_guid");
|
||||
create index "poll_channel" on poll ("poll_channel");
|
||||
create index "poll_author" on poll ("poll_author");
|
||||
create index "poll_flags" on poll ("poll_flags");
|
||||
create index "poll_votes" on poll ("poll_votes");
|
||||
CREATE TABLE "poll_elm" (
|
||||
@ -961,11 +963,13 @@ CREATE TABLE "poll_elm" (
|
||||
"pelm_desc" text NOT NULL,
|
||||
"pelm_flags" bigint NOT NULL DEFAULT '0',
|
||||
"pelm_result" float NOT NULL DEFAULT '0',
|
||||
"pelm_order" numeric(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ("pelm_id")
|
||||
);
|
||||
create index "pelm_guid" on poll_elm ("pelm_guid");
|
||||
create index "pelm_poll" on poll_elm ("pelm_poll");
|
||||
create index "pelm_result" on poll_elm ("pelm_result");
|
||||
create index "pelm_order" on poll_elm ("pelm_order");
|
||||
|
||||
CREATE TABLE "profdef" (
|
||||
"id" serial NOT NULL,
|
||||
|
@ -70,3 +70,21 @@
|
||||
margin-top: 0px !important;
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: #F5F5F5;
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
padding: 1em 1.5em;
|
||||
display: block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
code {
|
||||
background: #F5F5F5;
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
display: inline;
|
||||
padding: 0.2em 0.2em;
|
||||
white-space: pre-wrap;
|
||||
}
|
@ -74,6 +74,10 @@ function bbco_format(item) {
|
||||
return "<div class='dropdown-item'>" + item + "</div>";
|
||||
}
|
||||
|
||||
function tag_format(item) {
|
||||
return "<div class='dropdown-item'>" + '#' + item.text + "</div>";
|
||||
}
|
||||
|
||||
function editor_replace(item) {
|
||||
if(typeof item.replace !== 'undefined') {
|
||||
return '$1$2' + item.replace;
|
||||
@ -202,6 +206,16 @@ function string2bb(element) {
|
||||
};
|
||||
|
||||
|
||||
// Autocomplete hashtags
|
||||
tags = {
|
||||
match: /(^|\s)(\#)([^ \n]{2,})$/,
|
||||
index: 3,
|
||||
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
|
||||
replace: function(item) { return "$1$2" + item.text + ' '; },
|
||||
template: tag_format
|
||||
};
|
||||
|
||||
|
||||
smilies = {
|
||||
match: /(^|\s)(:[a-z_:]{2,})$/,
|
||||
index: 2,
|
||||
@ -211,7 +225,7 @@ function string2bb(element) {
|
||||
template: smiley_format
|
||||
};
|
||||
this.attr('autocomplete','off');
|
||||
this.textcomplete([contacts,forums,smilies], {className:'acpopup', zIndex:1020});
|
||||
this.textcomplete([contacts,forums,smilies,tags], {className:'acpopup', zIndex:1020});
|
||||
};
|
||||
})( jQuery );
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('show');
|
||||
};
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><div class="nav nav-pills flex-column">\n\
|
||||
<li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</div><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');
|
||||
var href = $(imageparent).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
window.location.href = 'cover_photo/use/' + ddata['resource_id'];
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
|
||||
} 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 nav-pills flex-column"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var jsAlbumName = albums[i].jstext;
|
||||
var albumLink = '<li class="nav-item">';
|
||||
albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none');
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
@ -1,82 +0,0 @@
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('show');
|
||||
};
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><div class="nav nav-pills flex-column">\n\
|
||||
<li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</div><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');
|
||||
var href = $(imageparent).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
var pf = $('#profile-photo-profiles').val();
|
||||
var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : '');
|
||||
window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof;
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
|
||||
} 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 nav-pills flex-column"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var jsAlbumName = albums[i].jstext;
|
||||
var albumLink = '<li class="nav-item">';
|
||||
albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none');
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
@ -15,13 +15,26 @@ textarea, input, select
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#jot-title {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#jot-title-wrap {
|
||||
border-bottom: none;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#jot-category-wrap {
|
||||
border-bottom: none;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-tagsinput {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
optgroup {
|
||||
color: #CCC !important;
|
||||
color: #CCC !important;
|
||||
}
|
||||
|
||||
option {
|
||||
@ -132,7 +145,7 @@ option {
|
||||
.abook-self {
|
||||
border: 1px solid #222;
|
||||
color: #555;
|
||||
background-color:#111;
|
||||
background-color:#111;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
@ -208,7 +221,7 @@ a.btn, aside a {
|
||||
}
|
||||
.btn-danger:hover, .btn-danger:focus, form#chat-destroy > input:hover, form#chat-destroy > input:focus {
|
||||
color: #FFF !important;
|
||||
background-color: #C9302C !important;
|
||||
background-color: #C9302C !important;
|
||||
border-color: #AC2925 !important;
|
||||
}
|
||||
|
||||
@ -278,7 +291,7 @@ nav .dropdown-menu {
|
||||
border-bottom:1px solid #333;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link.active {
|
||||
.nav-tabs .nav-link.active {
|
||||
color: #fff;
|
||||
background-color: #111;
|
||||
border-color: #333;
|
||||
@ -297,7 +310,7 @@ aside .nav > li > a:hover, aside .nav > li > a:focus {
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
|
||||
a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@ -343,6 +356,10 @@ pre {
|
||||
border:1px solid #090909;
|
||||
}
|
||||
|
||||
#wiki-content-container code {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.notif-item a {
|
||||
color: #ccc;
|
||||
}
|
||||
@ -352,23 +369,23 @@ pre {
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: #222;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.dropdown-menu >li > a {
|
||||
color: #ccc;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
|
||||
color: #ddd;
|
||||
background-color: #333;
|
||||
color: #ddd;
|
||||
background-color: #333;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.open .dropdown-toggle.btn-default, .open .dropdown-toggle.btn-default:focus {
|
||||
color: #ccc;
|
||||
background-color: #222;
|
||||
border-color: #222;
|
||||
color: #ccc;
|
||||
background-color: #222;
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
.pmenu-item:hover a {
|
||||
@ -444,7 +461,7 @@ pre {
|
||||
|
||||
|
||||
.profile-match-wrapper {
|
||||
width: 150px;
|
||||
width: 150px;
|
||||
height: 120px;
|
||||
border: none;
|
||||
}
|
||||
@ -462,5 +479,3 @@ pre {
|
||||
.widget-nav-pills-checkbox:hover + a {
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,12 +9,12 @@
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-collapse">
|
||||
<a data-toggle="collapse" data-target="#{{$g}}-settings-content" href="#" aria-expanded="true" aria-controls="{{$g}}-settings-collapse">
|
||||
{{$f.0}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} in{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
|
||||
<div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} show{{/if}}" data-parent="#settings" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{foreach $f.1 as $fcat}}
|
||||
{{include file="field_checkbox.tpl" field=$fcat.0}}
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
{{include file="field_select.tpl" field=$language}}
|
||||
{{include file="field_select.tpl" field=$theme}}
|
||||
{{include file="field_select.tpl" field=$theme_mobile}}
|
||||
{{* include file="field_select.tpl" field=$theme_mobile *}}
|
||||
{{include file="field_input.tpl" field=$frontpage}}
|
||||
{{include file="field_checkbox.tpl" field=$mirror_frontpage}}
|
||||
{{include file="field_checkbox.tpl" field=$login_on_homepage}}
|
||||
|
@ -1,3 +1,86 @@
|
||||
<script>
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('show');
|
||||
};
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><div class="nav nav-pills flex-column">\n\
|
||||
<li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</div><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');
|
||||
var href = $(imageparent).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
window.location.href = 'cover_photo/use/' + ddata['resource_id'];
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
|
||||
} 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 nav-pills flex-column"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var jsAlbumName = albums[i].jstext;
|
||||
var albumLink = '<li class="nav-item">';
|
||||
albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none');
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
</script>
|
||||
|
||||
<div id="profile-photo-content" class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<h2>{{$title}}</h2>
|
||||
|
@ -80,7 +80,7 @@
|
||||
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
|
||||
</button>
|
||||
{{if $localuser || $nav.pubs}}
|
||||
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white notifications-btn">
|
||||
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn">
|
||||
<i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
@ -80,7 +80,7 @@
|
||||
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
|
||||
</button>
|
||||
{{if $localuser || $nav.pubs}}
|
||||
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white notifications-btn">
|
||||
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn">
|
||||
<i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
@ -49,12 +49,12 @@
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="personal">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#personal-collapse" aria-expanded="true" aria-controls="personal-collapse">
|
||||
<a data-toggle="collapse" data-target="#personal-collapse" href="#" aria-expanded="true" aria-controls="personal-collapse">
|
||||
{{$personal}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="personal-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="personal">
|
||||
<div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{include file="field_input.tpl" field=$profile_name}}
|
||||
|
||||
@ -215,12 +215,12 @@
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="location">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#location-collapse" aria-expanded="true" aria-controls="location-collapse">
|
||||
<a data-toggle="collapse" data-target="#location-collapse" href="#" aria-expanded="true" aria-controls="location-collapse">
|
||||
{{$location}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="location-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="location">
|
||||
<div id="location-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="location">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{if $fields.address}}
|
||||
{{include file="field_input.tpl" field=$address}}
|
||||
@ -260,12 +260,12 @@
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="relation">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#relation-collapse" aria-expanded="true" aria-controls="relation-collapse">
|
||||
<a data-toggle="collapse" data-target="#relation-collapse" href="#" aria-expanded="true" aria-controls="relation-collapse">
|
||||
{{$relation}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="relation-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relation">
|
||||
<div id="relation-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="relation">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{if $fields.marital }}
|
||||
<div id="profile-edit-marital-wrapper" class="form-group field" >
|
||||
@ -307,12 +307,12 @@
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="miscellaneous">
|
||||
<h3>
|
||||
<a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#miscellaneous-collapse" aria-expanded="true" aria-controls="miscellaneous-collapse">
|
||||
<a data-toggle="collapse" data-target="#miscellaneous-collapse" href="#" aria-expanded="true" aria-controls="miscellaneous-collapse">
|
||||
{{$miscellaneous}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="miscellaneous-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="miscellaneous">
|
||||
<div id="miscellaneous-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="miscellaneous">
|
||||
<div class="section-content-tools-wrapper">
|
||||
{{if $fields.homepage}}
|
||||
{{include file="field_input.tpl" field=$homepage}}
|
||||
|
@ -1,3 +1,89 @@
|
||||
<script>
|
||||
var initializeEmbedPhotoDialog = function () {
|
||||
$('.embed-photo-selected-photo').each(function (index) {
|
||||
$(this).removeClass('embed-photo-selected-photo');
|
||||
});
|
||||
getPhotoAlbumList();
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('show');
|
||||
};
|
||||
|
||||
var choosePhotoFromAlbum = function (album) {
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><div class="nav nav-pills flex-column">\n\
|
||||
<li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
<i class="fa fa-chevron-left"></i> \n\
|
||||
{{$modaldiffalbum}}\n\
|
||||
</a>\n\
|
||||
</li>\n\
|
||||
</div><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');
|
||||
var href = $(imageparent).attr('href');
|
||||
$.post("embedphotos/photolink", {href: href},
|
||||
function(ddata) {
|
||||
if (ddata['status']) {
|
||||
var pf = $('#profile-photo-profiles').val();
|
||||
var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : '');
|
||||
window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof;
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
|
||||
} 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 nav-pills flex-column"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var jsAlbumName = albums[i].jstext;
|
||||
var albumLink = '<li class="nav-item">';
|
||||
albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('d-none');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none');
|
||||
} else {
|
||||
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
'json');
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<div id="profile-photo-content" class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<h2>{{$title}}</h2>
|
||||
|
Reference in New Issue
Block a user