aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-03-10 15:10:09 -0500
committerAndrew Manning <tamanning@zoho.com>2018-03-10 15:10:09 -0500
commita4de63ca923583b77cf2a4ad60f4893e006f90e4 (patch)
tree31406e7dffabc54d2b49879272598236949793c7
parent9b13db1c4896e6a8b0a55195530f5449999e811d (diff)
parent78040330b6be3681dd0d6fdd1d3d0960fd88bc06 (diff)
downloadvolse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.tar.gz
volse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.tar.bz2
volse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.zip
Merge branch 'dev' into oauth2
-rw-r--r--CHANGELOG126
-rw-r--r--Zotlabs/Module/Admin/Site.php14
-rw-r--r--Zotlabs/Module/Cover_photo.php8
-rw-r--r--Zotlabs/Module/Hashtags.php27
-rw-r--r--Zotlabs/Module/Profile_photo.php6
-rw-r--r--Zotlabs/Update/_1204.php6
-rw-r--r--Zotlabs/Update/_1208.php26
-rw-r--r--Zotlabs/Update/_1209.php26
-rwxr-xr-xboot.php2
-rw-r--r--include/zot.php17
-rw-r--r--install/schema_mysql.sql6
-rw-r--r--install/schema_postgres.sql4
-rw-r--r--view/css/mod_admin.css18
-rw-r--r--view/js/autocomplete.js16
-rw-r--r--view/js/mod_cover_photo.js80
-rw-r--r--view/js/mod_profile_photo.js82
-rw-r--r--view/theme/redbasic/schema/dark.css45
-rw-r--r--view/tpl/admin_settings_features.tpl4
-rwxr-xr-xview/tpl/admin_site.tpl2
-rwxr-xr-xview/tpl/cover_photo.tpl83
-rwxr-xr-xview/tpl/navbar_default.tpl2
-rwxr-xr-xview/tpl/navbar_tucson.tpl2
-rwxr-xr-xview/tpl/profile_edit.tpl16
-rwxr-xr-xview/tpl/profile_photo.tpl86
24 files changed, 493 insertions, 211 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6e540a04d..ad5e004c8 100644
--- a/CHANGELOG
+++ b/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
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index 880dbbe4b..015c6535c 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -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.")),
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php
index 047bcf3d4..56e35f912 100644
--- a/Zotlabs/Module/Cover_photo.php
+++ b/Zotlabs/Module/Cover_photo.php
@@ -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'),
diff --git a/Zotlabs/Module/Hashtags.php b/Zotlabs/Module/Hashtags.php
new file mode 100644
index 000000000..edb631871
--- /dev/null
+++ b/Zotlabs/Module/Hashtags.php
@@ -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);
+ }
+} \ No newline at end of file
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index 44b7c18c6..2ce8686b9 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -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'),
));
diff --git a/Zotlabs/Update/_1204.php b/Zotlabs/Update/_1204.php
index 93c2e4e3f..0b9204b9b 100644
--- a/Zotlabs/Update/_1204.php
+++ b/Zotlabs/Update/_1204.php
@@ -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);
}
diff --git a/Zotlabs/Update/_1208.php b/Zotlabs/Update/_1208.php
new file mode 100644
index 000000000..4cbcf4322
--- /dev/null
+++ b/Zotlabs/Update/_1208.php
@@ -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;
+
+ }
+
+}
diff --git a/Zotlabs/Update/_1209.php b/Zotlabs/Update/_1209.php
new file mode 100644
index 000000000..5ec449395
--- /dev/null
+++ b/Zotlabs/Update/_1209.php
@@ -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;
+
+ }
+
+}
diff --git a/boot.php b/boot.php
index 5d6bb2ebe..44466b26c 100755
--- a/boot.php
+++ b/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__ );
diff --git a/include/zot.php b/include/zot.php
index 25e30ccbc..c11cace2a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -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
-
- $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']);
+ // for pending connections this will happens at acceptance time.
+
+ 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']);
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 5cd04467d..1f396ee0e 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -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` (
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 84b6a554a..a4f6e9253 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -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,
diff --git a/view/css/mod_admin.css b/view/css/mod_admin.css
index 409744402..5e22fc90c 100644
--- a/view/css/mod_admin.css
+++ b/view/css/mod_admin.css
@@ -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;
+} \ No newline at end of file
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 01def9900..2d017db18 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -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 );
diff --git a/view/js/mod_cover_photo.js b/view/js/mod_cover_photo.js
deleted file mode 100644
index 5b64b8b91..000000000
--- a/view/js/mod_cover_photo.js
+++ /dev/null
@@ -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>&nbsp\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');
- };
diff --git a/view/js/mod_profile_photo.js b/view/js/mod_profile_photo.js
deleted file mode 100644
index c05c8e25e..000000000
--- a/view/js/mod_profile_photo.js
+++ /dev/null
@@ -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>&nbsp\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');
- };
diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css
index 0a142a07f..d0154bfb1 100644
--- a/view/theme/redbasic/schema/dark.css
+++ b/view/theme/redbasic/schema/dark.css
@@ -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;
}
-
-
diff --git a/view/tpl/admin_settings_features.tpl b/view/tpl/admin_settings_features.tpl
index 2d5cf7e0b..86f978e08 100644
--- a/view/tpl/admin_settings_features.tpl
+++ b/view/tpl/admin_settings_features.tpl
@@ -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}}
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 78e3ee245..10b367810 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -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}}
diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl
index cbcf46320..829a3a556 100755
--- a/view/tpl/cover_photo.tpl
+++ b/view/tpl/cover_photo.tpl
@@ -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>&nbsp\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>
diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl
index b0b3198c6..92b067bcb 100755
--- a/view/tpl/navbar_default.tpl
+++ b/view/tpl/navbar_default.tpl
@@ -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}}
diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl
index b0b3198c6..92b067bcb 100755
--- a/view/tpl/navbar_tucson.tpl
+++ b/view/tpl/navbar_tucson.tpl
@@ -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}}
diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl
index 05137479f..95183fdf4 100755
--- a/view/tpl/profile_edit.tpl
+++ b/view/tpl/profile_edit.tpl
@@ -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}}
diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl
index edde6af3f..e48d05330 100755
--- a/view/tpl/profile_photo.tpl
+++ b/view/tpl/profile_photo.tpl
@@ -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>&nbsp\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>