]> git.mxchange.org Git - friendica.git/commitdiff
Merge develop into 20170321_-_frio-fbbrowser
authorrabuzarus <trebor@central-unit>
Sun, 2 Apr 2017 22:51:34 +0000 (00:51 +0200)
committerrabuzarus <trebor@central-unit>
Sun, 2 Apr 2017 22:51:34 +0000 (00:51 +0200)
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

1  2 
view/theme/frio/css/mod_events.css
view/theme/frio/css/style.css
view/theme/frio/js/filebrowser.js
view/theme/frio/js/theme.js
view/theme/frio/templates/filebrowser.tpl
view/theme/frio/templates/jot.tpl

index 5ca22300158eee6f47b20a8d6d800440d4885a6b,6512d1bbec8826c08594b1faa016bc644242807f..293ffe06b4b25de0d0ee947526c41fe1d8729c4a
@@@ -22,6 -22,6 +22,9 @@@
  #fc-header-right {
      margin-top: -4px;
  }
++#fc-header-right button {
++    color: inherit;
++}
  #event-calendar-title {
      vertical-align: middle;
  }
index ccde6ab689f68987047dc5c8239f0901de5be9e5,245cd39fff4bd2690fdee2d3afd7eaced8044f9a..f7659117dd2a2fabdbef769b8871a56f446cfdd4
@@@ -153,6 -158,6 +158,7 @@@ a#item-delete-selected 
      font-size: 14px;
      font-weight: 600;
      padding: 8px 16px;
++    color: inherit;
  }
  
  .btn-default {
      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,
  }
  
  .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,
index 8260dd547a62d20870955c730939fcc2e91908a7,d216c40f33ba94558cde5d3e4ed14ce408d0a2a3..1ca24966a8bd2ff89f434369deff168d38d10c3b
@@@ -87,11 -86,12 +87,11 @@@ var FileBrowser = 
                        }\r
                };\r
  \r
 -              console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id );\r
 +              console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id);\r
  \r
 -              // We need to add the AjaxUpload to the button\r
 -              FileBrowser.uploadButtons();\r
 +              FileBrowser.postLoad();\r
  \r
-               $(".error a.close").on("click", function(e) {\r
+               $(".error .close").on("click", function(e) {\r
                        e.preventDefault();\r
                        $(".error").addClass("hidden");\r
                });\r
index 09f96da36c757d9438bc4b608531fe1e89375a73,4e8ede07fd965289a63c996aa1fec2f0e50e4948..8a3bd4110972ff4235224098dad9f78976368328
@@@ -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;
++}
index 826b82c54533186c265a0ce5b6c48d0f27ab1d11,20227f87965edda0ce0c1c44bd493b1f5292f8f2..6fc091d95250db2b882c6546d8e40e4b75d189aa
                <input id="fb-nickname" type="hidden" name="type" value="{{$nickname}}" />
                <input id="fb-type" type="hidden" name="type" value="{{$type}}" />
  
 -        <div class="error hidden">
 -            <span></span> <button type="button" class="btn btn-link" class="close">X</a>
 -        </div>
 -
 -        <div class="path">
 -            {{foreach $path as $p}}<button type="button" class="btn-link" data-folder="{{$p.0}}">{{$p.1}}</button>{{/foreach}}
 -        </div>
 -
 -        {{if $folders }}
 -        <div class="folders">
 -            <ul>
 -                {{foreach $folders as $f}}<li><button type="button" class="btn-link" data-folder="{{$f.0}}">{{$f.1}}</button></li>{{/foreach}}
 -            </ul>
 -        </div>
 -        {{/if}}
 -
 -        <div class="list">
 -            {{foreach $files as $f}}
 -            <div class="photo-album-image-wrapper">
 -                <button type="button" class="btn btn-link photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
 -                    <img src="{{$f.2}}">
 -                    <p>{{$f.1}}</p>
 -                </button>
 +              <div class="error hidden">
-                       <span></span> <a href="#" class='close'>X</a>
++                      <span></span> <button type="button" class="btn btn-link" class="close">X</a>
 +              </div>
 +
 +              {{* The breadcrumb navigation *}}
 +              <ol class="path breadcrumb">
 +                      {{foreach $path as $p}}<li><a href="#" data-folder="{{$p.0}}">{{$p.1}}</a></li>{{/foreach}}
 +
 +                      {{* Switch between image and file mode *}}
 +                      <div class="fbswitcher btn-group btn-group-xs pull-right">
 +                              <button type="button" class="btn btn-default" data-mode="image"><i class="fa fa-picture-o" aria-hidden="true"></i></button>
 +                              <button type="button" class="btn btn-default" data-mode="file"><i class="fa fa-file-o" aria-hidden="true"></i></button>
 +                      </div>
 +              </ol>
 +
 +              <div class="media">
 +
 +                      {{* List of photo albums *}}
 +                      {{if $folders }}
 +                      <div class="folders media-left">
 +                              <ul>
 +                                      {{foreach $folders as $f}}<li><a href="#" data-folder="{{$f.0}}">{{$f.1}}</a></li>{{/foreach}}
 +                              </ul>
 +                      </div>
 +                      {{/if}}
 +
 +                      {{* The main content (images or files) *}}
 +                      <div class="list {{$type}} media-body">
 +                              <div class="fbrowser-content-container">
 +                                      {{foreach $files as $f}}
 +                                      <div class="photo-album-image-wrapper">
 +                                              <a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
 +                                                      <img src="{{$f.2}}" alt="{{$f.1}}">
 +                                                      <p>{{$f.1}}</p>
 +                                              </a>
 +                                      </div>
 +                                      {{/foreach}}
 +                              </div>
                        </div>
 -                      {{/foreach}}
                </div>
  
                <div class="upload">
index d461f733f571ada7f85b8f72bb4b538bfc942390,71fdae7cd3433063db3045bee528a14a3d735d28..0e9a6fdde29596a847b01f1ae55b3bea650e24a5
                        <ul class="nav nav-tabs hidden-xs jot-nav" role="menubar" data-tabs="tabs">
                                {{* Mark the first list entry as active because it is the first which is active after opening
                                        the modal. Changing of the activity status is done by js in jot.tpl-header *}}
-                               <li class="active" role="menuitem"><a id="jot-text-lnk" class="jot-text-lnk" onclick="jotActive(); return false;">{{$message}}</a></li>
-                               {{if $acl}}<li role="menuitem"><a id="jot-perms-lnk" class="jot-perms-lnk" onclick="aclActive();return false;">{{$shortpermset}}</a></li>{{/if}}
-                               {{if $preview}}<li role="menuitem"><a id="jot-preview-lnk" class="jot-preview-lnk" onclick="previewActive();return false;">{{$preview}}</a></li>{{/if}}
-                               <li role="menuitem"><a id="jot-browser-link" onclick="fbrowserActive(); return false;">{{$browser}}</a></li>
+                               <li class="active" role="menuitem">
+                                       <a class="jot-text-lnk" id="jot-text-lnk" onclick="jotActive(); return false;">{{$message}}</a>
+                               </li>
+                               {{if $acl}}
+                               <li role="menuitem">
+                                       <a class="jot-perms-lnk" id="jot-perms-lnk" onclick="aclActive(); return false;">{{$shortpermset}}</a>
+                               </li>
+                               {{/if}}
+                               {{if $preview}}
+                               <li role="menuitem">
+                                       <a class="jot-preview-lnk" id="jot-preview-lnk" onclick="previewActive(); return false;">{{$preview}}</a>
+                               </li>
+                               {{/if}}
+                               <li role="menuitem">
+                                       <a class="jot-browser-lnk" id="jot-browser-link" onclick="fbrowserActive(); return false;">{{$browser}}</a>
+                               </li>
                        </ul>
  
 +                      {{* The Jot navigation menu for small displays (text input, permissions, preview, filebrowser) *}}
                        <div class="dropdown dropdown-head dropdown-mobile-jot jot-nav hidden-lg hidden-md hidden-sm" role="menubar" data-tabs="tabs" style="float: left;">
                                <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{$message}}&nbsp;<span class="caret"></span></button>
                                <ul class="dropdown-menu nav nav-pills">
                                        </div>
  
                                        <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
-                                               <li><a id="profile-link"  ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="{{$weblink}}"><i class="fa fa-link"></i></a></li>
-                                               <li><a id="profile-video" onclick="jotVideoURL();return false;" title="{{$video}}"><i class="fa fa-film"></i></a></li>
-                                               <li><a id="profile-audio" onclick="jotAudioURL();return false;" title="{{$audio}}"><i class="fa fa-music"></i></a></li>
-                                               <li><a id="profile-location" onclick="jotGetLocation();return false;" title="{{$setloc}}"><i class="fa fa-map-marker"></i></a></li>
 -                                              {{* uncomment the button for "wall-immage-upload" because we have integrated it directly in the jot modal
 -                                              <li><a href="#" id="wall-image-upload" title="{{$upload}}"><i class="fa fa-picture-o"></i></a></li>
 -                                              *}}
 -                                              <li><button type="button" class="btn-link" id="wall-file-upload" title="{{$attach}}"><i class="fa fa-paperclip"></i></button></li>
+                                               <li><button type="button" class="btn-link" id="profile-link"  ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink();" title="{{$weblink}}"><i class="fa fa-link"></i></button></li>
+                                               <li><button type="button" class="btn-link" id="profile-video" onclick="jotVideoURL();" title="{{$video}}"><i class="fa fa-film"></i></button></li>
+                                               <li><button type="button" class="btn-link" id="profile-audio" onclick="jotAudioURL();" title="{{$audio}}"><i class="fa fa-music"></i></button></li>
+                                               <li><button type="button" class="btn-link" id="profile-location" onclick="jotGetLocation();" title="{{$setloc}}"><i class="fa fa-map-marker"></i></button></li>
                                                <!-- TODO: waiting for a better placement
-                                               <li><a id="profile-nolocation" onclick="jotClearLocation();return false;" title="{{$noloc}}">{{$shortnoloc}}</a></li>
+                                               <li><button type="button" class="btn-link" id="profile-nolocation" onclick="jotClearLocation();" title="{{$noloc}}">{{$shortnoloc}}</button></li>
                                                -->
  
                                                <li class="pull-right"><button class="btn btn-primary" id="jot-submit" type="submit" id="profile-jot-submit" name="submit" ><i class="fa fa-slideshare fa-fw"></i> {{$share}}</button></li>