From: rabuzarus Date: Sun, 2 Apr 2017 22:51:34 +0000 (+0200) Subject: Merge develop into 20170321_-_frio-fbbrowser X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ee293f2ce28270e1f8e05ce38991977d41e40c27;p=friendica.git Merge develop into 20170321_-_frio-fbbrowser Conflicts: view/theme/frio/js/filebrowser.js view/theme/frio/js/theme.js view/theme/frio/templates/filebrowser.tpl view/theme/frio/templates/jot.tpl --- ee293f2ce28270e1f8e05ce38991977d41e40c27 diff --cc view/theme/frio/css/mod_events.css index 5ca2230015,6512d1bbec..293ffe06b4 --- a/view/theme/frio/css/mod_events.css +++ b/view/theme/frio/css/mod_events.css @@@ -22,6 -22,6 +22,9 @@@ #fc-header-right { margin-top: -4px; } ++#fc-header-right button { ++ color: inherit; ++} #event-calendar-title { vertical-align: middle; } diff --cc view/theme/frio/css/style.css index ccde6ab689,245cd39fff..f7659117dd --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@@ -153,6 -158,6 +158,7 @@@ a#item-delete-selected font-size: 14px; font-weight: 600; padding: 8px 16px; ++ color: inherit; } .btn-default { @@@ -185,6 -190,12 +191,7 @@@ outline: 0; background: $btn_primary_hover_color !important; } -.btn-default:active, .btn-default.active { - color: $link_color; -} -.btn-default:active:hover, .btn-default.active:hover { - color: $link_hover_color; -} ++ .btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover, .open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus, @@@ -195,11 -206,14 +202,11 @@@ } .btn-link { + border: 0; color: $link_color; - } - .btn-link:focus, .btn-link:hover { - color: #23527c; + padding-left: 0; + padding-right: 0; } -.btn { - color: inherit; -} .btn-eventnav, btn-eventnav:hover { font-size: 16px; background: none; @@@ -1628,10 -1608,11 +1654,15 @@@ code > .hl-main .wall-item-actions .button-comments, .wall-item-actions .button-votes, .wall-item-actions .button-likes { - padding-left: 0px; - padding-right: 0px; text-transform: capitalize; } ++.wall-item-actions button:hover { ++ color: #555; ++ text-decoration: underline; ++} + .wall-item-actions .separator { + margin: 0 .3em; + } /* wall item hover effects */ .wall-item-container .wall-item-links, diff --cc view/theme/frio/js/filebrowser.js index 8260dd547a,d216c40f33..1ca24966a8 --- a/view/theme/frio/js/filebrowser.js +++ b/view/theme/frio/js/filebrowser.js @@@ -87,11 -86,12 +87,11 @@@ var FileBrowser = } }; - console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id ); + console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id); - // We need to add the AjaxUpload to the button - FileBrowser.uploadButtons(); + FileBrowser.postLoad(); - $(".error a.close").on("click", function(e) { + $(".error .close").on("click", function(e) { e.preventDefault(); $(".error").addClass("hidden"); }); diff --cc view/theme/frio/js/theme.js index 09f96da36c,4e8ede07fd..8a3bd41109 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@@ -618,52 -618,23 +618,73 @@@ function htmlToText(htmlString) return text; } + /** + * Sends a /like API call and updates the display of the relevant action button + * before the update reloads the item. + * + * @param {string} ident The id of the relevant item + * @param {string} verb The verb of the action + * @returns {undefined} + */ + function doLikeAction(ident, verb) { + unpause(); + + if (verb.indexOf('attend') === 0) { + $('.item-' + ident + ' .button-event:not(#' + verb + '-' + ident + ')').removeClass('active'); + } + $('#' + verb + '-' + ident).toggleClass('active'); + $('#like-rotator-' + ident.toString()).show(); + $.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate ); + liking = 1; + force_update = true; -} ++} ++ +// Decodes a hexadecimally encoded binary string +function hex2bin (s) { + // discuss at: http://locutus.io/php/hex2bin/ + // original by: Dumitru Uzun (http://duzun.me) + // example 1: hex2bin('44696d61') + // returns 1: 'Dima' + // example 2: hex2bin('00') + // returns 2: '\x00' + // example 3: hex2bin('2f1q') + // returns 3: false + var ret = []; + var i = 0; + var l; + s += ''; + + for (l = s.length; i < l; i += 2) { + var c = parseInt(s.substr(i, 1), 16); + var k = parseInt(s.substr(i + 1, 1), 16); + if (isNaN(c) || isNaN(k)) { + return false; + } + ret.push((c << 4) | k); + } + return String.fromCharCode.apply(String, ret); +} + +// Convert binary data into hexadecimal representation +function bin2hex (s) { + // From: http://phpjs.org/functions + // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfixed by: Onno Marsman + // + bugfixed by: Linuxworld + // + improved by: ntoniazzi (http://phpjs.org/functions/bin2hex:361#comment_177616) + // * example 1: bin2hex('Kev'); + // * returns 1: '4b6576' + // * example 2: bin2hex(String.fromCharCode(0x00)); + // * returns 2: '00' + + var i, l, o = "", n; + + s += ""; + + for (i = 0, l = s.length; i < l; i++) { + n = s.charCodeAt(i).toString(16); + o += n.length < 2 ? "0" + n : n; + } + + return o; - } ++} diff --cc view/theme/frio/templates/filebrowser.tpl index 826b82c545,20227f8796..6fc091d952 --- a/view/theme/frio/templates/filebrowser.tpl +++ b/view/theme/frio/templates/filebrowser.tpl @@@ -12,45 -12,31 +12,45 @@@ - - -
- {{foreach $path as $p}}{{/foreach}} -
- - {{if $folders }} -
- -
- {{/if}} - -
- {{foreach $files as $f}} -
- + + + {{* The breadcrumb navigation *}} + + +
+ + {{* List of photo albums *}} + {{if $folders }} +
+
    + {{foreach $folders as $f}}
  • {{$f.1}}
  • {{/foreach}} +
+
+ {{/if}} + + {{* The main content (images or files) *}} +
+
+ {{foreach $files as $f}} + + {{/foreach}} +
- {{/foreach}}
diff --cc view/theme/frio/templates/jot.tpl index d461f733f5,71fdae7cd3..0e9a6fdde2 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@@ -15,13 -15,24 +15,25 @@@ + {{* The Jot navigation menu for small displays (text input, permissions, preview, filebrowser) *}}