aboutsummaryrefslogtreecommitdiffstats
path: root/view
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 /view
parent9b13db1c4896e6a8b0a55195530f5449999e811d (diff)
parent78040330b6be3681dd0d6fdd1d3d0960fd88bc06 (diff)
downloadvolse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.tar.gz
volse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.tar.bz2
volse-hubzilla-a4de63ca923583b77cf2a4ad60f4893e006f90e4.zip
Merge branch 'dev' into oauth2
Diffstat (limited to 'view')
-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
12 files changed, 245 insertions, 191 deletions
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>