if( $("#jot-popup").is(":hidden")) $("#topbar-second > .container > #navbar-button #jotOpen").hide();
}
- // add search-headding to the scecond navbar
- if( $(".search-headding")) {
- $(".search-headding").appendTo("#topbar-second > .container > #tabmenu");
+ // move shared content in it's own DIV (so we can style it better)
+ $('.wall-item-body .shared_content').each(function() {
+ // create a DIV after ".shared_content" where we will putt in the shared_header
+ // and the "shared_content"
+ $(this).after('<div class="shared-content-wrapper content-card"></div>');
+ // get the shared_header
+ var sheader = $(this).prev();
+ // get the shared-content-wrapper which we have created above
+ var swrapper = $(this).next();
+ // move the "shared_header into the new shared_content DIV
+ $(swrapper).append(sheader);
+ // move the "shared_content" into the new DIV
+ $(swrapper).append(this);
+ });
+
+
+ // show bulk deletion button at network page if checkbox is checked
+ $('input.item-select').change(function(){
+ var checked = false;
+
+ // We need to get all checked items, so it would close the delete button
+ // if we uncheck one item and others are still checked.
+ // So return checked = true if there is any checked item
+ $('input.item-select').each( function() {
+ if($(this).is(':checked')) {
+ checked = true;
+ return false;
+ }
+ });
+
+ if(checked == true) {
+ $("a#item-delete-selected").fadeTo(400, 1);
+ $("a#item-delete-selected").show();
+ } else {
+ $("a#item-delete-selected").fadeTo(400, 0, function(){
+ $("a#item-delete-selected").hide();
+ });
+ }
+ });
+
+ // add search-heading to the scecond navbar
+ if( $(".search-heading")) {
+ $(".search-heading").appendTo("#topbar-second > .container > #tabmenu");
}
}
});
- // Add Colorbox for viewing Network page images
- //var cBoxClasses = new Array();
- $(".wall-item-body a img").each(function(){
- var aElem = $(this).parent();
- var imgHref = aElem.attr("href");
-
- // We need to make sure we only put a Colorbox on links to Friendica images
- // We'll try to do this by looking for links of the form
- // .../photo/ab803d8eg08daf85023adfec08 (with nothing more following), in hopes
- // that that will be unique enough
- if(imgHref.match(/\/photo\/[a-fA-F0-9]+(-[0-9]\.[\w]+?)?$/)) {
-
- // Add a unique class to all the images of a certain post, to allow scrolling through
- var cBoxClass = $(this).closest(".wall-item-body").attr("id") + "-lightbox";
- $(this).addClass(cBoxClass);
-
-// if( $.inArray(cBoxClass, cBoxClasses) < 0 ) {
-// cBoxClasses.push(cBoxClass);
-// }
-
- aElem.colorbox({
- maxHeight: '90%',
- photo: true, // Colorbox doesn't recognize a URL that don't end in .jpg, etc. as a photo
- rel: cBoxClass //$(this).attr("class").match(/wall-item-body-[\d]+-lightbox/)[0]
- });
- }
- });
-
- // overwrite Dialog.show from main js to load the filebrowser into a bs modal
- Dialog.show = function(url) {
- var modal = $('#modal').modal();
- modal
- .find('#modal-body')
- .load(url, function (responseText, textStatus) {
- if ( textStatus === 'success' ||
- textStatus === 'notmodified')
- {
- modal.show();
-
- // get nickname & filebrowser type from the modal content
- var nickname = $("#fb-nickname").attr("value");
- var type = $("#fb-type").attr("value");
-
- // try to fetch the hash form the url
- var match = url.match(/fbrowser\/[a-z]+\/\?mode=modal(.*)/);
- var hash = match[1];
-
- // initialize the filebrowser
- var jsbrowser = function() {
- FileBrowser.init(nickname, type, hash);
- }
- loadScript("view/theme/frio/js/filebrowser.js", jsbrowser);
- }
- });
- };
-
- // overwrite the function _get_url from main.js
- Dialog._get_url = function(type, name, id) {
- var hash = name;
- if (id !== undefined) hash = hash + "-" + id;
- return "fbrowser/"+type+"/?mode=modal#"+hash;
- };
-
});
//function commentOpenUI(obj, id) {
var trimmed = this.replace(/\s+$/g, '');
return trimmed;
};
+